diff --git a/assets/Color-6VNJS4EI-a6PsbFjJ.js b/assets/Color-6VNJS4EI-BncQ8Qgm.js similarity index 99% rename from assets/Color-6VNJS4EI-a6PsbFjJ.js rename to assets/Color-6VNJS4EI-BncQ8Qgm.js index 50ed256432..b35cc2bc97 100644 --- a/assets/Color-6VNJS4EI-a6PsbFjJ.js +++ b/assets/Color-6VNJS4EI-BncQ8Qgm.js @@ -1 +1 @@ -import{n as M,d as ue,T as Me,F as Ce,I as $e,g as Ne}from"./DocsRenderer-NNNQARDV-s8P9JC76.js";import{R as h,r as b}from"./index-TT1qJ6UJ.js";import{g as fe}from"./_commonjsHelpers-4gQjN7DL.js";import{_ as Oe,i as J,a as Ie}from"./_getPrototype-bjD8Yebc.js";import"./iframe-_HOM8AA9.js";import"../sb-preview/runtime.js";import"./react-18-N0svEjlN.js";import"./client-rbWgHzHN.js";import"./index-7vsPyIck.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./bundle.esm-7jAAHVxW.js";import"./index-ogXoivrg.js";import"./index-PPLHz8o0.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},bn=tn;export{tn as ColorControl,bn as default}; +import{n as M,d as ue,T as Me,F as Ce,I as $e,g as Ne}from"./DocsRenderer-NNNQARDV-jtC6Msq5.js";import{R as h,r as b}from"./index-TT1qJ6UJ.js";import{g as fe}from"./_commonjsHelpers-4gQjN7DL.js";import{_ as Oe,i as J,a as Ie}from"./_getPrototype-bjD8Yebc.js";import"./iframe-7PiyMb9T.js";import"../sb-preview/runtime.js";import"./react-18-N0svEjlN.js";import"./client-rbWgHzHN.js";import"./index-7vsPyIck.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./bundle.esm-7jAAHVxW.js";import"./index-ogXoivrg.js";import"./index-PPLHz8o0.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},bn=tn;export{tn as ColorControl,bn as default}; diff --git a/assets/DocsRenderer-NNNQARDV-s8P9JC76.js b/assets/DocsRenderer-NNNQARDV-jtC6Msq5.js similarity index 99% rename from assets/DocsRenderer-NNNQARDV-s8P9JC76.js rename to assets/DocsRenderer-NNNQARDV-jtC6Msq5.js index 1e43aa7a64..bbd04fc39e 100644 --- a/assets/DocsRenderer-NNNQARDV-s8P9JC76.js +++ b/assets/DocsRenderer-NNNQARDV-jtC6Msq5.js @@ -1,4 +1,4 @@ -import{_ as At}from"./iframe-_HOM8AA9.js";import{r as b,a as Il,R as a}from"./index-TT1qJ6UJ.js";import{r as U0,u as W0}from"./react-18-N0svEjlN.js";import{g as Rn,c as sa}from"./_commonjsHelpers-4gQjN7DL.js";import{c as Qr}from"./_commonjs-dynamic-modules-h-SxKiO4.js";import{r as ws,R as G0}from"./index-7vsPyIck.js";import{u as As}from"./bundle.esm-7jAAHVxW.js";import{L as Ss,O as Y0}from"./index-ogXoivrg.js";import{q as Cs,r as K0,s as ks,t as X0,i as $n,v as J0,w as Q0,x as e1,c as _s,y as Os,z as t1,A as Ts,B as r1,C as n1,D as a1,E as o1,F as l1,G as i1,H as Fs,I as s1,J as u1,K as Rs,_ as c1,L as d1,M as p1,N as _o,d as $s,O as Ds,P as Ls,Q as f1,R as m1,U as g1,e as h1,S as Pl,V as Ha,k as ua}from"./_getPrototype-bjD8Yebc.js";import{d as xe}from"./index-PPLHz8o0.js";var He=e=>`control-${e.replace(/\s+/g,"-")}`,Dn=e=>`set-${e.replace(/\s+/g,"-")}`;const{global:b1}=__STORYBOOK_MODULE_GLOBAL__,{logger:y1}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var v1=Object.create,Ms=Object.defineProperty,E1=Object.getOwnPropertyDescriptor,Bs=Object.getOwnPropertyNames,x1=Object.getPrototypeOf,w1=Object.prototype.hasOwnProperty,Oo=(e,t)=>function(){return t||(0,e[Bs(e)[0]])((t={exports:{}}).exports,t),t.exports},A1=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bs(t))!w1.call(e,o)&&o!==r&&Ms(e,o,{get:()=>t[o],enumerable:!(n=E1(t,o))||n.enumerable});return e},Is=(e,t,r)=>(r=e!=null?v1(x1(e)):{},A1(t||!e||!e.__esModule?Ms(r,"default",{value:e,enumerable:!0}):r,e));function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function un(e,t,r){return _1()?un=Reflect.construct.bind():un=function(n,o,l){var i=[null];i.push.apply(i,o);var u=Function.bind.apply(n,i),s=new u;return l&&kr(s,l.prototype),s},un.apply(null,arguments)}function Va(e){var t=typeof Map=="function"?new Map:void 0;return Va=function(r){if(r===null||!k1(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return un(r,arguments,Za(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),kr(n,r)},Va(e)}var O1={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). +import{_ as At}from"./iframe-7PiyMb9T.js";import{r as b,a as Il,R as a}from"./index-TT1qJ6UJ.js";import{r as U0,u as W0}from"./react-18-N0svEjlN.js";import{g as Rn,c as sa}from"./_commonjsHelpers-4gQjN7DL.js";import{c as Qr}from"./_commonjs-dynamic-modules-h-SxKiO4.js";import{r as ws,R as G0}from"./index-7vsPyIck.js";import{u as As}from"./bundle.esm-7jAAHVxW.js";import{L as Ss,O as Y0}from"./index-ogXoivrg.js";import{q as Cs,r as K0,s as ks,t as X0,i as $n,v as J0,w as Q0,x as e1,c as _s,y as Os,z as t1,A as Ts,B as r1,C as n1,D as a1,E as o1,F as l1,G as i1,H as Fs,I as s1,J as u1,K as Rs,_ as c1,L as d1,M as p1,N as _o,d as $s,O as Ds,P as Ls,Q as f1,R as m1,U as g1,e as h1,S as Pl,V as Ha,k as ua}from"./_getPrototype-bjD8Yebc.js";import{d as xe}from"./index-PPLHz8o0.js";var He=e=>`control-${e.replace(/\s+/g,"-")}`,Dn=e=>`set-${e.replace(/\s+/g,"-")}`;const{global:b1}=__STORYBOOK_MODULE_GLOBAL__,{logger:y1}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var v1=Object.create,Ms=Object.defineProperty,E1=Object.getOwnPropertyDescriptor,Bs=Object.getOwnPropertyNames,x1=Object.getPrototypeOf,w1=Object.prototype.hasOwnProperty,Oo=(e,t)=>function(){return t||(0,e[Bs(e)[0]])((t={exports:{}}).exports,t),t.exports},A1=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bs(t))!w1.call(e,o)&&o!==r&&Ms(e,o,{get:()=>t[o],enumerable:!(n=E1(t,o))||n.enumerable});return e},Is=(e,t,r)=>(r=e!=null?v1(x1(e)):{},A1(t||!e||!e.__esModule?Ms(r,"default",{value:e,enumerable:!0}):r,e));function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function un(e,t,r){return _1()?un=Reflect.construct.bind():un=function(n,o,l){var i=[null];i.push.apply(i,o);var u=Function.bind.apply(n,i),s=new u;return l&&kr(s,l.prototype),s},un.apply(null,arguments)}function Va(e){var t=typeof Map=="function"?new Map:void 0;return Va=function(r){if(r===null||!k1(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return un(r,arguments,Za(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),kr(n,r)},Va(e)}var O1={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). `,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }). @@ -226,9 +226,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho path { fill: currentColor; } -`,ve=({icon:e,useSymbol:t,...r})=>a.createElement(gc,{viewBox:"0 0 14 14",width:"14px",height:"14px",...r},t?a.createElement("use",{xlinkHref:`#icon--${e}`}):Pr[e]),Ag=b.memo(function({icons:e=Object.keys(Pr)}){return a.createElement(gc,{viewBox:"0 0 14 14",style:{position:"absolute",width:0,height:0},"data-chromatic":"ignore"},e.map(t=>a.createElement("symbol",{id:`icon--${t}`,key:t},Pr[t])))}),Sg=0,Cg=e=>e.button===Sg&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,kg=(e,t)=>{Cg(e)&&(e.preventDefault(),t(e))},_g=_.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),Og=_.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:Kt(.07,e.color.secondary),"svg path:not([fill])":{fill:Kt(.07,e.color.secondary)}},"&:active":{color:Kt(.1,e.color.secondary),"svg path:not([fill])":{fill:Kt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),wt=({cancel:e,children:t,onClick:r,withArrow:n,containsIcon:o,className:l,...i})=>a.createElement(Og,{...i,onClick:r&&e?u=>kg(u,r):r,className:l},a.createElement(_g,{withArrow:n,containsIcon:o},t,n&&a.createElement(ve,{icon:"arrowright"})));wt.defaultProps={cancel:!0,className:void 0,style:void 0,onClick:void 0,withArrow:!1,containsIcon:!1};var Tg=_.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),Pt=[],lr=null,Fg=b.lazy(async()=>{let{SyntaxHighlighter:e}=await At(()=>import("./syntaxhighlighter-B5GMVT5T-wrhZ0_tZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url);return Pt.length>0&&(Pt.forEach(t=>{e.registerLanguage(...t)}),Pt=[]),lr===null&&(lr=e),{default:t=>a.createElement(e,{...t})}}),Rg=b.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([At(()=>import("./syntaxhighlighter-B5GMVT5T-wrhZ0_tZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),At(()=>import("./formatter-SWP5E3XI-qCqZhePw.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url)]);return Pt.length>0&&(Pt.forEach(r=>{e.registerLanguage(...r)}),Pt=[]),lr===null&&(lr=e),{default:r=>a.createElement(e,{...r,formatter:t})}}),Wn=e=>a.createElement(b.Suspense,{fallback:a.createElement("div",null)},e.format!==!1?a.createElement(Rg,{...e}):a.createElement(Fg,{...e}));Wn.registerLanguage=(...e)=>{if(lr!==null){lr.registerLanguage(...e);return}Pt.push(e)};var $g=e=>typeof e=="number"?e:Number(e),Dg=_.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${Ja}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${Ja}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),Lg=({col:e,row:t,outer:r,children:n,...o})=>{let l=$g(typeof r=="number"||!r?r:e||t);return a.createElement(Dg,{col:e,row:t,outer:l,...o},n)},Mg=_.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),Bg=_.div(),Ig=_.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),hc=({children:e,...t})=>{let[r,n]=b.Children.toArray(e);return a.createElement(Ig,{...t},a.createElement(Mg,null,r),n&&a.createElement(Bg,null,n))},Pg=_.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function jg({scale:e,children:t}){let r=b.useRef(null),[n,o]=b.useState(0),l=b.useCallback(({height:i})=>{i&&o(i/e)},[e]);return b.useEffect(()=>{r.current&&o(r.current.getBoundingClientRect().height)},[e]),As({ref:r,onResize:l}),a.createElement(Pg,{scale:e,elementHeight:n},a.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var Ng=class extends b.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return a.createElement(a.Fragment,null,e)}},bc={Element:jg,IFrame:Ng},{document:Hg}=Pm,Zg=_.strong(({theme:e})=>({color:e.color.orange})),Vg=_.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Oi=_.em(({theme:e})=>({color:e.textMutedColor})),zg=/(Error): (.*)\n/,qg=/at (?:(.*) )?\(?(.+)\)?/,Ug=/([^@]+)?(?:\/<)?@(.+)?/,Wg=/([^@]+)?@(.+)?/,yc=({error:e})=>{if(!e)return a.createElement(b.Fragment,null,"This error has no stack or message");if(!e.stack)return a.createElement(b.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} +`,ve=({icon:e,useSymbol:t,...r})=>a.createElement(gc,{viewBox:"0 0 14 14",width:"14px",height:"14px",...r},t?a.createElement("use",{xlinkHref:`#icon--${e}`}):Pr[e]),Ag=b.memo(function({icons:e=Object.keys(Pr)}){return a.createElement(gc,{viewBox:"0 0 14 14",style:{position:"absolute",width:0,height:0},"data-chromatic":"ignore"},e.map(t=>a.createElement("symbol",{id:`icon--${t}`,key:t},Pr[t])))}),Sg=0,Cg=e=>e.button===Sg&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,kg=(e,t)=>{Cg(e)&&(e.preventDefault(),t(e))},_g=_.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),Og=_.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:Kt(.07,e.color.secondary),"svg path:not([fill])":{fill:Kt(.07,e.color.secondary)}},"&:active":{color:Kt(.1,e.color.secondary),"svg path:not([fill])":{fill:Kt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),wt=({cancel:e,children:t,onClick:r,withArrow:n,containsIcon:o,className:l,...i})=>a.createElement(Og,{...i,onClick:r&&e?u=>kg(u,r):r,className:l},a.createElement(_g,{withArrow:n,containsIcon:o},t,n&&a.createElement(ve,{icon:"arrowright"})));wt.defaultProps={cancel:!0,className:void 0,style:void 0,onClick:void 0,withArrow:!1,containsIcon:!1};var Tg=_.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),Pt=[],lr=null,Fg=b.lazy(async()=>{let{SyntaxHighlighter:e}=await At(()=>import("./syntaxhighlighter-B5GMVT5T-CyhDqoZf.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url);return Pt.length>0&&(Pt.forEach(t=>{e.registerLanguage(...t)}),Pt=[]),lr===null&&(lr=e),{default:t=>a.createElement(e,{...t})}}),Rg=b.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([At(()=>import("./syntaxhighlighter-B5GMVT5T-CyhDqoZf.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),At(()=>import("./formatter-SWP5E3XI-IcSeFhu6.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url)]);return Pt.length>0&&(Pt.forEach(r=>{e.registerLanguage(...r)}),Pt=[]),lr===null&&(lr=e),{default:r=>a.createElement(e,{...r,formatter:t})}}),Wn=e=>a.createElement(b.Suspense,{fallback:a.createElement("div",null)},e.format!==!1?a.createElement(Rg,{...e}):a.createElement(Fg,{...e}));Wn.registerLanguage=(...e)=>{if(lr!==null){lr.registerLanguage(...e);return}Pt.push(e)};var $g=e=>typeof e=="number"?e:Number(e),Dg=_.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${Ja}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${Ja}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),Lg=({col:e,row:t,outer:r,children:n,...o})=>{let l=$g(typeof r=="number"||!r?r:e||t);return a.createElement(Dg,{col:e,row:t,outer:l,...o},n)},Mg=_.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),Bg=_.div(),Ig=_.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),hc=({children:e,...t})=>{let[r,n]=b.Children.toArray(e);return a.createElement(Ig,{...t},a.createElement(Mg,null,r),n&&a.createElement(Bg,null,n))},Pg=_.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function jg({scale:e,children:t}){let r=b.useRef(null),[n,o]=b.useState(0),l=b.useCallback(({height:i})=>{i&&o(i/e)},[e]);return b.useEffect(()=>{r.current&&o(r.current.getBoundingClientRect().height)},[e]),As({ref:r,onResize:l}),a.createElement(Pg,{scale:e,elementHeight:n},a.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var Ng=class extends b.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return a.createElement(a.Fragment,null,e)}},bc={Element:jg,IFrame:Ng},{document:Hg}=Pm,Zg=_.strong(({theme:e})=>({color:e.color.orange})),Vg=_.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Oi=_.em(({theme:e})=>({color:e.textMutedColor})),zg=/(Error): (.*)\n/,qg=/at (?:(.*) )?\(?(.+)\)?/,Ug=/([^@]+)?(?:\/<)?@(.+)?/,Wg=/([^@]+)?@(.+)?/,yc=({error:e})=>{if(!e)return a.createElement(b.Fragment,null,"This error has no stack or message");if(!e.stack)return a.createElement(b.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} -${t}`);let r=t.match(zg);if(!r)return a.createElement(b.Fragment,null,t);let[,n,o]=r,l=t.split(/\n/).slice(1),[,...i]=l.map(u=>{let s=u.match(qg)||u.match(Ug)||u.match(Wg);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(Hg.location.origin,"")}:null}).filter(Boolean);return a.createElement(b.Fragment,null,a.createElement("span",null,n),": ",a.createElement(Zg,null,o),a.createElement("br",null),i.map((u,s)=>u.name?a.createElement(b.Fragment,{key:s}," ","at ",a.createElement(Vg,null,u.name)," (",a.createElement(Oi,null,u.location),")",a.createElement("br",null)):a.createElement(b.Fragment,{key:s}," ","at ",a.createElement(Oi,null,u.location),a.createElement("br",null))))},vc=_.button(({small:e,theme:t})=>({border:0,borderRadius:"3em",cursor:"pointer",display:"inline-block",overflow:"hidden",padding:e?"8px 16px":"13px 20px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:1,margin:0,background:"transparent",fontSize:`${e?t.typography.size.s1:t.typography.size.s2-1}px`,fontWeight:t.typography.weight.bold,lineHeight:"1",svg:{display:"inline-block",height:e?12:14,width:e?12:14,verticalAlign:"top",marginRight:e?4:6,marginTop:e?0:-1,marginBottom:e?0:-1,pointerEvents:"none",path:{fill:"currentColor"}}}),({disabled:e})=>e?{cursor:"not-allowed !important",opacity:.5,"&:hover":{transform:"none"}}:{},({containsIcon:e,small:t})=>e?{svg:{display:"block",margin:0},...t?{padding:10}:{padding:13}}:{},({theme:e,primary:t,secondary:r,gray:n})=>{let o;return n?o=e.color.mediumlight:r?o=e.color.secondary:t&&(o=e.color.primary),o?{background:o,color:n?e.color.darkest:e.color.lightest,"&:hover":{background:Kt(.05,o)},"&:active":{boxShadow:"rgba(0, 0, 0, 0.1) 0 0 0 3em inset"},"&:focus":{boxShadow:`${dt(o,1)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${dt(o,.2)} 0 8px 18px 0px`}}:{}},({theme:e,tertiary:t,inForm:r,small:n})=>t?{background:e.button.background,color:e.input.color,boxShadow:`${e.button.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,...r&&n?{padding:"10px 16px"}:{},"&:hover":{background:e.base==="light"?Kt(.02,e.button.background):dg(.03,e.button.background),...r?{}:{boxShadow:"rgba(0,0,0,.2) 0 2px 6px 0, rgba(0,0,0,.1) 0 0 0 1px inset"}},"&:active":{background:e.button.background},"&:focus":{boxShadow:`${dt(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"}}:{},({theme:e,outline:t})=>t?{boxShadow:`${Ee(.8,e.color.defaultText)} 0 0 0 1px inset`,color:Ee(.3,e.color.defaultText),background:"transparent","&:hover, &:focus":{boxShadow:`${Ee(.5,e.color.defaultText)} 0 0 0 1px inset`,outline:"none"},"&:active":{boxShadow:`${Ee(.5,e.color.defaultText)} 0 0 0 2px inset`,color:Ee(0,e.color.defaultText)}}:{},({theme:e,outline:t,primary:r})=>{let n=e.color.primary;return t&&r?{boxShadow:`${n} 0 0 0 1px inset`,color:n,"svg path:not([fill])":{fill:n},"&:hover":{boxShadow:`${n} 0 0 0 1px inset`,background:"transparent"},"&:active":{background:n,boxShadow:`${n} 0 0 0 1px inset`,color:e.color.tertiary},"&:focus":{boxShadow:`${n} 0 0 0 1px inset, ${dt(n,.4)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${n} 0 0 0 1px inset, ${dt(n,.2)} 0 8px 18px 0px`}}:{}},({theme:e,outline:t,primary:r,secondary:n})=>{let o;return n?o=e.color.secondary:r&&(o=e.color.primary),t&&o?{boxShadow:`${o} 0 0 0 1px inset`,color:o,"svg path:not([fill])":{fill:o},"&:hover":{boxShadow:`${o} 0 0 0 1px inset`,background:"transparent"},"&:active":{background:o,boxShadow:`${o} 0 0 0 1px inset`,color:e.color.tertiary},"&:focus":{boxShadow:`${o} 0 0 0 1px inset, ${dt(o,.4)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${o} 0 0 0 1px inset, ${dt(o,.2)} 0 8px 18px 0px`}}:{}}),Gg=vc.withComponent("a"),Ec=Object.assign(b.forwardRef(function({isLink:e,children:t,...r},n){return e?a.createElement(Gg,{...r,ref:n},t):a.createElement(vc,{...r,ref:n},t)}),{defaultProps:{isLink:!1}}),Yg=_.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),Kg=_.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),xc=({label:e,children:t,...r})=>a.createElement(Yg,{...r},e?a.createElement(Kg,null,a.createElement("span",null,e)):null,t);xc.defaultProps={label:void 0};function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}var Ti=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},Jg=function(e,t){var r=b.useRef();return b.useCallback(function(n){e.current=n,r.current&&Ti(r.current,null),r.current=t,t&&Ti(t,n)},[t])},Qg=Jg,eh=function(){},th=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],rh=function(e,t){e.cacheMeasurements,e.maxRows,e.minRows;var r=e.onChange,n=r===void 0?eh:r;e.onHeightChange;var o=Xg(e,th);o.value;var l=b.useRef(null),i=Qg(l,t);return b.useRef(0),b.useRef(),b.createElement("textarea",po({},o,{onChange:n,ref:i}))},nh=b.forwardRef(rh),ah={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},sl=({theme:e})=>({...ah,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),Gn=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},wc=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},Yn=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},oh=Object.assign(_(b.forwardRef(function({size:e,valid:t,align:r,...n},o){return a.createElement("input",{...n,ref:o})}))(sl,Gn,wc,Yn,{minHeight:32}),{displayName:"Input"}),lh=Object.assign(_(b.forwardRef(function({size:e,valid:t,align:r,...n},o){return a.createElement("select",{...n,ref:o})}))(sl,Gn,Yn,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),ih=Object.assign(_(b.forwardRef(function({size:e,valid:t,align:r,...n},o){return a.createElement(nh,{...n,ref:o})}))(sl,Gn,wc,Yn,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),sh=_(b.forwardRef(function({size:e,valid:t,align:r,...n},o){return a.createElement(Ec,{...n,ref:o})}))(Gn,Yn,{userSelect:"none",overflow:"visible",zIndex:2,"&:hover":{transform:"none"}}),uh=Object.assign(b.forwardRef(function(e,t){return a.createElement(sh,{...e,tertiary:!0,small:!0,inForm:!0,ref:t})}),{displayName:"Button"}),Ne=Object.assign(_.form({boxSizing:"border-box",width:"100%"}),{Field:xc,Input:oh,Select:lh,Textarea:ih,Button:uh}),ch=b.lazy(()=>At(()=>import("./WithTooltip-V3YHNWJZ-V8PFiBER.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url).then(e=>({default:e.WithTooltip}))),dh=e=>a.createElement(b.Suspense,{fallback:a.createElement("div",null)},a.createElement(ch,{...e})),ph=b.lazy(()=>At(()=>import("./WithTooltip-V3YHNWJZ-V8PFiBER.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),Ac=e=>a.createElement(b.Suspense,{fallback:a.createElement("div",null)},a.createElement(ph,{...e})),fh=_.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),mh=_.span(),gh=_.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),hh=_.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),bh=_.div({padding:15,width:280,boxSizing:"border-box"}),Sc=({title:e,desc:t,links:r})=>a.createElement(bh,null,a.createElement(hh,null,e&&a.createElement(fh,null,e),t&&a.createElement(mh,null,t)),r&&a.createElement(gh,null,r.map(({title:n,...o})=>a.createElement(wt,{...o,key:n},n))));Sc.defaultProps={title:null,desc:null,links:null};var yh=_.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),vh=({note:e,...t})=>a.createElement(yh,{...t},e),Eh=_(({active:e,loading:t,disabled:r,...n})=>a.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:Ee(.7,t.color.defaultText)}:{}),xh=_.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),wh=_.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),Ah=_.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),Fi=_.span(({active:e,theme:t})=>e?{"& svg":{opacity:1},"& svg path:not([fill])":{fill:t.color.secondary}}:{},()=>({display:"flex",maxWidth:14})),Sh=_.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),Ch=Ht(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),Cc=({loading:e,left:t,title:r,center:n,right:o,icon:l,active:i,disabled:u,isIndented:s,href:c,onClick:d,LinkWrapper:f,...m})=>{let p=Ch(d,c,f),h={active:i,disabled:u},g=typeof l=="string"&&Pr[l];return a.createElement(Sh,{...h,...m,...p},l?a.createElement(Fi,{...h},g?a.createElement(ve,{icon:l}):l):t&&a.createElement(Fi,{...h},t),r||n?a.createElement(wh,{isIndented:!t&&!l&&s},r&&a.createElement(Eh,{...h,loading:e},r),n&&a.createElement(Ah,{...h},n)):null,o&&a.createElement(xh,{...h},o))};Cc.defaultProps={loading:!1,left:null,title:a.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var ul=Cc,kh=_.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),_h=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:o,...l}=e,{title:i,href:u,active:s}=l,c=b.useCallback(f=>{r(f,l)},[r]),d=!!r;return a.createElement(ul,{title:i,active:s,href:u,id:`list-item-${n}`,LinkWrapper:t,isIndented:o,...l,...d?{onClick:c}:{}})},cl=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.left||n.icon);return a.createElement(kh,null,e.map(({isGatsby:n,...o})=>a.createElement(_h,{key:o.id,LinkWrapper:n?t:null,isIndented:r,...o})))};cl.defaultProps={LinkWrapper:ul.defaultProps.LinkWrapper};var dl=a.forwardRef(({children:e,...t},r)=>t.href!=null?a.createElement("a",{ref:r,...t},e):a.createElement("button",{ref:r,type:"button",...t},e));dl.displayName="ButtonOrLink";var Gr=_(dl,{shouldForwardProp:Fo})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.color.secondary}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent"});Gr.displayName="TabButton";var jt=_(dl,{shouldForwardProp:Fo})(()=>({alignItems:"center",background:"transparent",border:"none",borderRadius:4,color:"inherit",cursor:"pointer",display:"inline-flex",fontSize:13,fontWeight:"bold",height:28,justifyContent:"center",marginTop:6,padding:"8px 7px","& > svg":{width:14}}),({active:e,theme:t})=>e?{backgroundColor:t.background.hoverable,color:t.barSelectedColor}:{},({disabled:e,theme:t})=>e?{opacity:.5,cursor:"not-allowed"}:{"&:hover, &:focus-visible":{background:Ee(.88,t.color.secondary),color:t.barHoverColor},"&:focus-visible":{outline:qn},"&:focus:not(:focus-visible)":{outline:"none"}});jt.displayName="IconButton";var Oh=_.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),Th=_.div(()=>({marginTop:6,padding:7,height:28})),kc=()=>a.createElement(Th,null,a.createElement(Oh,null)),fo=_.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});fo.displayName="Side";var Fh=({children:e,className:t,scrollable:r})=>r?a.createElement(Uo,{vertical:!1,className:t},e):a.createElement("div",{className:t},e),pl=_(Fh)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});pl.displayName="Bar";var Rh=_.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),Kn=({children:e,backgroundColor:t,...r})=>{let[n,o]=b.Children.toArray(e);return a.createElement(pl,{...r},a.createElement(Rh,{bgColor:t},a.createElement(fo,{scrollable:r.scrollable,left:!0},n),o?a.createElement(fo,{right:!0},o):null))};Kn.displayName="FlexBar";var _c=_.div(({active:e})=>e?{display:"block"}:{display:"none"}),Ri=e=>b.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:o}})=>{let l=Array.isArray(o)?o[0]:o;return{title:t,id:r,...n?{color:n}:{},render:typeof l=="function"?l:({active:i})=>a.createElement(_c,{active:i,role:"tabpanel"},l)}}),$h=_.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),Dh=_(Gr)(({active:e,theme:t,preActive:r})=>` +${t}`);let r=t.match(zg);if(!r)return a.createElement(b.Fragment,null,t);let[,n,o]=r,l=t.split(/\n/).slice(1),[,...i]=l.map(u=>{let s=u.match(qg)||u.match(Ug)||u.match(Wg);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(Hg.location.origin,"")}:null}).filter(Boolean);return a.createElement(b.Fragment,null,a.createElement("span",null,n),": ",a.createElement(Zg,null,o),a.createElement("br",null),i.map((u,s)=>u.name?a.createElement(b.Fragment,{key:s}," ","at ",a.createElement(Vg,null,u.name)," (",a.createElement(Oi,null,u.location),")",a.createElement("br",null)):a.createElement(b.Fragment,{key:s}," ","at ",a.createElement(Oi,null,u.location),a.createElement("br",null))))},vc=_.button(({small:e,theme:t})=>({border:0,borderRadius:"3em",cursor:"pointer",display:"inline-block",overflow:"hidden",padding:e?"8px 16px":"13px 20px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:1,margin:0,background:"transparent",fontSize:`${e?t.typography.size.s1:t.typography.size.s2-1}px`,fontWeight:t.typography.weight.bold,lineHeight:"1",svg:{display:"inline-block",height:e?12:14,width:e?12:14,verticalAlign:"top",marginRight:e?4:6,marginTop:e?0:-1,marginBottom:e?0:-1,pointerEvents:"none",path:{fill:"currentColor"}}}),({disabled:e})=>e?{cursor:"not-allowed !important",opacity:.5,"&:hover":{transform:"none"}}:{},({containsIcon:e,small:t})=>e?{svg:{display:"block",margin:0},...t?{padding:10}:{padding:13}}:{},({theme:e,primary:t,secondary:r,gray:n})=>{let o;return n?o=e.color.mediumlight:r?o=e.color.secondary:t&&(o=e.color.primary),o?{background:o,color:n?e.color.darkest:e.color.lightest,"&:hover":{background:Kt(.05,o)},"&:active":{boxShadow:"rgba(0, 0, 0, 0.1) 0 0 0 3em inset"},"&:focus":{boxShadow:`${dt(o,1)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${dt(o,.2)} 0 8px 18px 0px`}}:{}},({theme:e,tertiary:t,inForm:r,small:n})=>t?{background:e.button.background,color:e.input.color,boxShadow:`${e.button.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,...r&&n?{padding:"10px 16px"}:{},"&:hover":{background:e.base==="light"?Kt(.02,e.button.background):dg(.03,e.button.background),...r?{}:{boxShadow:"rgba(0,0,0,.2) 0 2px 6px 0, rgba(0,0,0,.1) 0 0 0 1px inset"}},"&:active":{background:e.button.background},"&:focus":{boxShadow:`${dt(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"}}:{},({theme:e,outline:t})=>t?{boxShadow:`${Ee(.8,e.color.defaultText)} 0 0 0 1px inset`,color:Ee(.3,e.color.defaultText),background:"transparent","&:hover, &:focus":{boxShadow:`${Ee(.5,e.color.defaultText)} 0 0 0 1px inset`,outline:"none"},"&:active":{boxShadow:`${Ee(.5,e.color.defaultText)} 0 0 0 2px inset`,color:Ee(0,e.color.defaultText)}}:{},({theme:e,outline:t,primary:r})=>{let n=e.color.primary;return t&&r?{boxShadow:`${n} 0 0 0 1px inset`,color:n,"svg path:not([fill])":{fill:n},"&:hover":{boxShadow:`${n} 0 0 0 1px inset`,background:"transparent"},"&:active":{background:n,boxShadow:`${n} 0 0 0 1px inset`,color:e.color.tertiary},"&:focus":{boxShadow:`${n} 0 0 0 1px inset, ${dt(n,.4)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${n} 0 0 0 1px inset, ${dt(n,.2)} 0 8px 18px 0px`}}:{}},({theme:e,outline:t,primary:r,secondary:n})=>{let o;return n?o=e.color.secondary:r&&(o=e.color.primary),t&&o?{boxShadow:`${o} 0 0 0 1px inset`,color:o,"svg path:not([fill])":{fill:o},"&:hover":{boxShadow:`${o} 0 0 0 1px inset`,background:"transparent"},"&:active":{background:o,boxShadow:`${o} 0 0 0 1px inset`,color:e.color.tertiary},"&:focus":{boxShadow:`${o} 0 0 0 1px inset, ${dt(o,.4)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${o} 0 0 0 1px inset, ${dt(o,.2)} 0 8px 18px 0px`}}:{}}),Gg=vc.withComponent("a"),Ec=Object.assign(b.forwardRef(function({isLink:e,children:t,...r},n){return e?a.createElement(Gg,{...r,ref:n},t):a.createElement(vc,{...r,ref:n},t)}),{defaultProps:{isLink:!1}}),Yg=_.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),Kg=_.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),xc=({label:e,children:t,...r})=>a.createElement(Yg,{...r},e?a.createElement(Kg,null,a.createElement("span",null,e)):null,t);xc.defaultProps={label:void 0};function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}var Ti=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},Jg=function(e,t){var r=b.useRef();return b.useCallback(function(n){e.current=n,r.current&&Ti(r.current,null),r.current=t,t&&Ti(t,n)},[t])},Qg=Jg,eh=function(){},th=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],rh=function(e,t){e.cacheMeasurements,e.maxRows,e.minRows;var r=e.onChange,n=r===void 0?eh:r;e.onHeightChange;var o=Xg(e,th);o.value;var l=b.useRef(null),i=Qg(l,t);return b.useRef(0),b.useRef(),b.createElement("textarea",po({},o,{onChange:n,ref:i}))},nh=b.forwardRef(rh),ah={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},sl=({theme:e})=>({...ah,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),Gn=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},wc=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},Yn=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},oh=Object.assign(_(b.forwardRef(function({size:e,valid:t,align:r,...n},o){return a.createElement("input",{...n,ref:o})}))(sl,Gn,wc,Yn,{minHeight:32}),{displayName:"Input"}),lh=Object.assign(_(b.forwardRef(function({size:e,valid:t,align:r,...n},o){return a.createElement("select",{...n,ref:o})}))(sl,Gn,Yn,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),ih=Object.assign(_(b.forwardRef(function({size:e,valid:t,align:r,...n},o){return a.createElement(nh,{...n,ref:o})}))(sl,Gn,wc,Yn,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),sh=_(b.forwardRef(function({size:e,valid:t,align:r,...n},o){return a.createElement(Ec,{...n,ref:o})}))(Gn,Yn,{userSelect:"none",overflow:"visible",zIndex:2,"&:hover":{transform:"none"}}),uh=Object.assign(b.forwardRef(function(e,t){return a.createElement(sh,{...e,tertiary:!0,small:!0,inForm:!0,ref:t})}),{displayName:"Button"}),Ne=Object.assign(_.form({boxSizing:"border-box",width:"100%"}),{Field:xc,Input:oh,Select:lh,Textarea:ih,Button:uh}),ch=b.lazy(()=>At(()=>import("./WithTooltip-V3YHNWJZ-XpcFPTRG.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url).then(e=>({default:e.WithTooltip}))),dh=e=>a.createElement(b.Suspense,{fallback:a.createElement("div",null)},a.createElement(ch,{...e})),ph=b.lazy(()=>At(()=>import("./WithTooltip-V3YHNWJZ-XpcFPTRG.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),Ac=e=>a.createElement(b.Suspense,{fallback:a.createElement("div",null)},a.createElement(ph,{...e})),fh=_.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),mh=_.span(),gh=_.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),hh=_.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),bh=_.div({padding:15,width:280,boxSizing:"border-box"}),Sc=({title:e,desc:t,links:r})=>a.createElement(bh,null,a.createElement(hh,null,e&&a.createElement(fh,null,e),t&&a.createElement(mh,null,t)),r&&a.createElement(gh,null,r.map(({title:n,...o})=>a.createElement(wt,{...o,key:n},n))));Sc.defaultProps={title:null,desc:null,links:null};var yh=_.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),vh=({note:e,...t})=>a.createElement(yh,{...t},e),Eh=_(({active:e,loading:t,disabled:r,...n})=>a.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:Ee(.7,t.color.defaultText)}:{}),xh=_.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),wh=_.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),Ah=_.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),Fi=_.span(({active:e,theme:t})=>e?{"& svg":{opacity:1},"& svg path:not([fill])":{fill:t.color.secondary}}:{},()=>({display:"flex",maxWidth:14})),Sh=_.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),Ch=Ht(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),Cc=({loading:e,left:t,title:r,center:n,right:o,icon:l,active:i,disabled:u,isIndented:s,href:c,onClick:d,LinkWrapper:f,...m})=>{let p=Ch(d,c,f),h={active:i,disabled:u},g=typeof l=="string"&&Pr[l];return a.createElement(Sh,{...h,...m,...p},l?a.createElement(Fi,{...h},g?a.createElement(ve,{icon:l}):l):t&&a.createElement(Fi,{...h},t),r||n?a.createElement(wh,{isIndented:!t&&!l&&s},r&&a.createElement(Eh,{...h,loading:e},r),n&&a.createElement(Ah,{...h},n)):null,o&&a.createElement(xh,{...h},o))};Cc.defaultProps={loading:!1,left:null,title:a.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var ul=Cc,kh=_.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),_h=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:o,...l}=e,{title:i,href:u,active:s}=l,c=b.useCallback(f=>{r(f,l)},[r]),d=!!r;return a.createElement(ul,{title:i,active:s,href:u,id:`list-item-${n}`,LinkWrapper:t,isIndented:o,...l,...d?{onClick:c}:{}})},cl=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.left||n.icon);return a.createElement(kh,null,e.map(({isGatsby:n,...o})=>a.createElement(_h,{key:o.id,LinkWrapper:n?t:null,isIndented:r,...o})))};cl.defaultProps={LinkWrapper:ul.defaultProps.LinkWrapper};var dl=a.forwardRef(({children:e,...t},r)=>t.href!=null?a.createElement("a",{ref:r,...t},e):a.createElement("button",{ref:r,type:"button",...t},e));dl.displayName="ButtonOrLink";var Gr=_(dl,{shouldForwardProp:Fo})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.color.secondary}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent"});Gr.displayName="TabButton";var jt=_(dl,{shouldForwardProp:Fo})(()=>({alignItems:"center",background:"transparent",border:"none",borderRadius:4,color:"inherit",cursor:"pointer",display:"inline-flex",fontSize:13,fontWeight:"bold",height:28,justifyContent:"center",marginTop:6,padding:"8px 7px","& > svg":{width:14}}),({active:e,theme:t})=>e?{backgroundColor:t.background.hoverable,color:t.barSelectedColor}:{},({disabled:e,theme:t})=>e?{opacity:.5,cursor:"not-allowed"}:{"&:hover, &:focus-visible":{background:Ee(.88,t.color.secondary),color:t.barHoverColor},"&:focus-visible":{outline:qn},"&:focus:not(:focus-visible)":{outline:"none"}});jt.displayName="IconButton";var Oh=_.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),Th=_.div(()=>({marginTop:6,padding:7,height:28})),kc=()=>a.createElement(Th,null,a.createElement(Oh,null)),fo=_.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});fo.displayName="Side";var Fh=({children:e,className:t,scrollable:r})=>r?a.createElement(Uo,{vertical:!1,className:t},e):a.createElement("div",{className:t},e),pl=_(Fh)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});pl.displayName="Bar";var Rh=_.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),Kn=({children:e,backgroundColor:t,...r})=>{let[n,o]=b.Children.toArray(e);return a.createElement(pl,{...r},a.createElement(Rh,{bgColor:t},a.createElement(fo,{scrollable:r.scrollable,left:!0},n),o?a.createElement(fo,{right:!0},o):null))};Kn.displayName="FlexBar";var _c=_.div(({active:e})=>e?{display:"block"}:{display:"none"}),Ri=e=>b.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:o}})=>{let l=Array.isArray(o)?o[0]:o;return{title:t,id:r,...n?{color:n}:{},render:typeof l=="function"?l:({active:i})=>a.createElement(_c,{active:i,role:"tabpanel"},l)}}),$h=_.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),Dh=_(Gr)(({active:e,theme:t,preActive:r})=>` color: ${r||e?t.color.secondary:t.color.mediumdark}; &:hover { color: ${t.color.secondary}; @@ -308,7 +308,7 @@ ${t}`);let r=t.match(zg);if(!r)return a.createElement(b.Fragment,null,t);let[,n, ${Ke(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${Dt(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${Dt(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${pt(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),$0=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),e9=_($0)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),t9=_.div({display:"flex",alignItems:"center",width:"100%"});function r9(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var n9=({name:e,value:t,onChange:r,min:n=0,max:o=100,step:l=1,onBlur:i,onFocus:u})=>{let s=f=>{r(hx(f.target.value))},c=t!==void 0,d=b.useMemo(()=>r9(l),[l]);return a.createElement(t9,null,a.createElement($0,null,n),a.createElement(Qx,{id:He(e),type:"range",onChange:s,name:e,value:t,min:n,max:o,step:l,onFocus:u,onBlur:i}),a.createElement(e9,{numberOFDecimalsPlaces:d,max:o},c?t.toFixed(d):"--"," / ",o))},a9=_.label({display:"flex"}),o9=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),l9=({name:e,value:t,onChange:r,onFocus:n,onBlur:o,maxLength:l})=>{let i=f=>{r(f.target.value)},[u,s]=b.useState(!1),c=b.useCallback(()=>{r(""),s(!0)},[s]);if(t===void 0)return a.createElement(Ne.Button,{id:Dn(e),onClick:c},"Set string");let d=typeof t=="string";return a.createElement(a9,null,a.createElement(Ne.Textarea,{id:He(e),maxLength:l,onChange:i,size:"flex",placeholder:"Edit string...",autoFocus:u,valid:d?null:"error",name:e,value:d?t:"",onFocus:n,onBlur:o}),l&&a.createElement(o9,{isMaxed:(t==null?void 0:t.length)===l},(t==null?void 0:t.length)??0," / ",l))},i9=_(Ne.Input)({padding:10});function s9(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var u9=({onChange:e,name:t,accept:r="image/*",value:n})=>{let o=b.useRef(null);function l(i){if(!i.target.files)return;let u=Array.from(i.target.files).map(s=>URL.createObjectURL(s));e(u),s9(n)}return b.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),a.createElement(i9,{ref:o,id:He(t),type:"file",name:t,multiple:!0,onChange:l,accept:r,size:"flex"})},c9=b.lazy(()=>At(()=>import("./Color-6VNJS4EI-a6PsbFjJ.js"),__vite__mapDeps([14,2,3,10,1,4,5,6,7,8,9,11]),import.meta.url)),d9=e=>a.createElement(b.Suspense,{fallback:a.createElement("div",null)},a.createElement(c9,{...e})),p9={array:vs,object:vs,boolean:sx,color:d9,date:mx,number:bx,check:Gt,"inline-check":Gt,radio:Gt,"inline-radio":Gt,select:Gt,"multi-select":Gt,range:n9,text:l9,file:u9},Es=()=>a.createElement(a.Fragment,null,"-"),f9=({row:e,arg:t,updateArgs:r,isHovered:n})=>{let{key:o,control:l}=e,[i,u]=b.useState(!1),[s,c]=b.useState({value:t});b.useEffect(()=>{i||c({value:t})},[i,t]);let d=b.useCallback(g=>(c({value:g}),r({[o]:g}),g),[r,o]),f=b.useCallback(()=>u(!1),[]),m=b.useCallback(()=>u(!0),[]);if(!l||l.disable)return n?a.createElement(wt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):a.createElement(Es,null);let p={name:o,argType:e,value:s.value,onChange:d,onBlur:f,onFocus:m},h=p9[l.type]||Es;return a.createElement(h,{...p,...l,controlType:l.type})},m9=_.span({fontWeight:"bold"}),g9=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),h9=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...gt({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),b9=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?4:0})),y9=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),v9=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),ln=e=>{var g;let[t,r]=b.useState(!1),{row:n,updateArgs:o,compact:l,expandable:i,initialExpandedArgs:u}=e,{name:s,description:c}=n,d=n.table||{},f=d.type||n.type,m=d.defaultValue||n.defaultValue,p=(g=n.type)==null?void 0:g.required,h=c!=null&&c!=="";return a.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},a.createElement(v9,{expandable:i},a.createElement(m9,null,s),p?a.createElement(g9,{title:"Required"},"*"):null),l?null:a.createElement("td",null,h&&a.createElement(h9,null,a.createElement(n0,null,c)),d.jsDocTags!=null?a.createElement(a.Fragment,null,a.createElement(y9,{hasDescription:h},a.createElement(Pa,{value:f,initialExpandedArgs:u})),a.createElement(K8,{tags:d.jsDocTags})):a.createElement(b9,{hasDescription:h},a.createElement(Pa,{value:f,initialExpandedArgs:u}))),l?null:a.createElement("td",null,a.createElement(Pa,{value:m,initialExpandedArgs:u})),o?a.createElement("td",null,a.createElement(f9,{...e,isHovered:t})):null)},E9=_(ve)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),x9=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),w9=_.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),A9=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),S9=_.td(()=>({position:"relative"})),C9=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Dt(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),xs=_.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Na=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:o=3})=>{let[l,i]=b.useState(n),u=e==="subsection"?A9:w9,s=(r==null?void 0:r.length)||0,c=e==="subsection"?`${s} item${s!==1?"s":""}`:"",d=l?"arrowdown":"arrowright",f=`${l?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return a.createElement(a.Fragment,null,a.createElement(C9,{title:f},a.createElement(u,{colSpan:1},a.createElement(xs,{onClick:m=>i(!l),tabIndex:0},f),a.createElement(x9,null,a.createElement(E9,{icon:d}),t)),a.createElement(S9,{colSpan:o-1},a.createElement(xs,{onClick:m=>i(!l),tabIndex:-1,style:{outline:"none"}},f),l?null:c)),l?r:null)},sn=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),me=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ie=_.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),ge=[2,4,2,2],k9=()=>a.createElement(a.Fragment,null,a.createElement(sn,null,a.createElement(me,{numColumn:ge[0]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[1]},a.createElement(ie,{width:"30%"})),a.createElement(me,{numColumn:ge[2]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[3]},a.createElement(ie,{width:"60%"}))),a.createElement(sn,null,a.createElement(me,{numColumn:ge[0]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[1]},a.createElement(ie,{width:"80%"}),a.createElement(ie,{width:"30%"})),a.createElement(me,{numColumn:ge[2]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[3]},a.createElement(ie,{width:"60%"}))),a.createElement(sn,null,a.createElement(me,{numColumn:ge[0]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[1]},a.createElement(ie,{width:"80%"}),a.createElement(ie,{width:"30%"})),a.createElement(me,{numColumn:ge[2]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[3]},a.createElement(ie,{width:"60%"}))),a.createElement(sn,null,a.createElement(me,{numColumn:ge[0]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[1]},a.createElement(ie,{width:"80%"}),a.createElement(ie,{width:"30%"})),a.createElement(me,{numColumn:ge[2]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[3]},a.createElement(ie,{width:"60%"})))),_9=_.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),O9=_.div({display:"flex",flexDirection:"column",gap:4,maxWidth:415}),T9=_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textColor})),F9=_.div(({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textMutedColor})),R9=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),$9=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),D9=({inAddonPanel:e})=>{let[t,r]=b.useState(!0);return b.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:a.createElement(_9,{inAddonPanel:e},a.createElement(O9,null,a.createElement(T9,null,e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated"),a.createElement(F9,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically.")),a.createElement(R9,null,e&&a.createElement(a.Fragment,null,a.createElement(wt,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},a.createElement(ve,{icon:"video"})," Watch 5m video"),a.createElement($9,null),a.createElement(wt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Read docs")),!e&&a.createElement(wt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Learn how to set that up")))},L9=_.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?ee(.25,e.color.defaultText):ee(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),M9=_(jt)(({theme:e})=>({color:e.barTextColor,margin:"-4px -12px -4px 0"})),B9=_.span({display:"flex",justifyContent:"space-between"}),I9={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},P9=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([l,i])=>{let{category:u,subcategory:s}=(i==null?void 0:i.table)||{};if(u){let c=r.sections[u]||{ungrouped:[],subsections:{}};if(!s)c.ungrouped.push({key:l,...i});else{let d=c.subsections[s]||[];d.push({key:l,...i}),c.subsections[s]=d}r.sections[u]=c}else if(s){let c=r.ungroupedSubsections[s]||[];c.push({key:l,...i}),r.ungroupedSubsections[s]=c}else r.ungrouped.push({key:l,...i})});let n=I9[t],o=l=>n?Object.keys(l).reduce((i,u)=>({...i,[u]:l[u].sort(n)}),{}):l;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:o(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((l,i)=>({...l,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:o(r.sections[i].subsections)}}),{})}},j9=(e,t,r)=>{try{return Y0(e,t,r)}catch(n){return b8.warn(n.message),!1}},N9=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:o,initialExpandedArgs:l,sort:i="none",isLoading:u}=e;if("error"in e){let{error:w}=e;return a.createElement(y0,null,w," ",a.createElement(wt,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},"Read the docs"))}if(u)return a.createElement(k9,null);let{rows:s,args:c,globals:d}="rows"in e&&e,f=P9(Ay(s,w=>{var v;return!((v=w==null?void 0:w.table)!=null&&v.disable)&&j9(w,c||{},d||{})}),i),m=f.ungrouped.length===0,p=Object.entries(f.sections).length===0,h=Object.entries(f.ungroupedSubsections).length===0;if(m&&p&&h)return a.createElement(D9,{inAddonPanel:o});let g=1;t&&(g+=1),n||(g+=2);let x=Object.keys(f.sections).length>0,y={updateArgs:t,compact:n,inAddonPanel:o,initialExpandedArgs:l};return a.createElement(il,null,a.createElement(L9,{compact:n,inAddonPanel:o,className:"docblock-argstable sb-unstyled"},a.createElement("thead",{className:"docblock-argstable-head"},a.createElement("tr",null,a.createElement("th",null,a.createElement("span",null,"Name")),n?null:a.createElement("th",null,a.createElement("span",null,"Description")),n?null:a.createElement("th",null,a.createElement("span",null,"Default")),t?a.createElement("th",null,a.createElement(B9,null,"Control"," ",!u&&r&&a.createElement(M9,{onClick:()=>r(),title:"Reset controls"},a.createElement(ve,{icon:"undo","aria-hidden":!0})))):null)),a.createElement("tbody",{className:"docblock-argstable-body"},f.ungrouped.map(w=>a.createElement(ln,{key:w.key,row:w,arg:c&&c[w.key],...y})),Object.entries(f.ungroupedSubsections).map(([w,v])=>a.createElement(Na,{key:w,label:w,level:"subsection",colSpan:g},v.map(E=>a.createElement(ln,{key:E.key,row:E,arg:c&&c[E.key],expandable:x,...y})))),Object.entries(f.sections).map(([w,v])=>a.createElement(Na,{key:w,label:w,level:"section",colSpan:g},v.ungrouped.map(E=>a.createElement(ln,{key:E.key,row:E,arg:c&&c[E.key],...y})),Object.entries(v.subsections).map(([E,A])=>a.createElement(Na,{key:E,label:E,level:"subsection",colSpan:g},A.map(S=>a.createElement(ln,{key:S.key,row:S,arg:c&&c[S.key],expandable:x,...y})))))))))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(te,({theme:e})=>({...aa(e),margin:"25px 0 40px",padding:"30px 20px"}));_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));_.div(({theme:e})=>({color:e.base==="light"?ee(.2,e.color.defaultText):ee(.6,e.color.defaultText)}));_.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});_.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));_.div({display:"flex",flexDirection:"row"});_.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));_.div(({theme:e})=>({...aa(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));_.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});_.div({flex:1,display:"flex",flexDirection:"row"});_.div({display:"flex",alignItems:"flex-start"});_.div({flex:"0 0 30%"});_.div({flex:1});_.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));_.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));_.div(({theme:e})=>({...aa(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));_.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});_.div({display:"flex",flexFlow:"row wrap"});var H9=e=>`anchor--${e}`,Z9=({storyId:e,children:t})=>a.createElement("div",{id:H9(e),className:"sb-anchor"},t);$e&&$e.__DOCS_CONTEXT__===void 0&&($e.__DOCS_CONTEXT__=b.createContext(null),$e.__DOCS_CONTEXT__.displayName="DocsContext");var Te=$e?$e.__DOCS_CONTEXT__:b.createContext(null),Yr=(e,t)=>b.useContext(Te).resolveOf(e,t);function V9(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function z9(e,t){let r=Fl([e],t);return r&&r[0]}function Fl(e,t){let[r,n]=b.useState({});return b.useEffect(()=>{Promise.all(e.map(async o=>{let l=await t.loadStory(o);n(i=>i[o]===l?i:{...i,[o]:l})}))}),e.map(o=>{if(r[o])return r[o];try{return t.storyById(o)}catch{return null}})}function D0(e){return d8(e)}var L0=b.createContext({sources:{}}),M0="--unknown--",q9=({children:e,channel:t})=>{let[r,n]=b.useState({});return b.useEffect(()=>{let o=(l,i=null,u=!1)=>{let{id:s,args:c=void 0,source:d,format:f}=typeof l=="string"?{id:l,source:i,format:u}:l,m=c?D0(c):M0;n(p=>({...p,[s]:{...p[s],[m]:{code:d,format:f}}}))};return t.on(Pl,o),()=>t.off(Pl,o)},[]),a.createElement(L0.Provider,{value:{sources:r}},e)},U9=(e=>(e.OPEN="open",e.CLOSED="closed",e.NONE="none",e))(U9||{}),W9=e=>{let t=e.map(r=>{var n,o;return(o=(n=r.parameters.docs)==null?void 0:n.source)==null?void 0:o.state}).filter(Boolean);return t.length===0?"closed":t[0]},G9=(e,t,r)=>{let{sources:n}=r,o=n==null?void 0:n[e];return(o==null?void 0:o[D0(t)])||(o==null?void 0:o[M0])||{code:""}},Y9=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,c,d,f,m,p;let{__isArgsStory:o}=t.parameters,l=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||l.type||ua.AUTO;if(l.code!==void 0)return l.code;let u=i===ua.DYNAMIC||i===ua.AUTO&&e&&o?e:l.originalSource||"";return l.transformSource&&pe(xe`The \`transformSource\` parameter at \`parameters.docs.source.transformSource\` is deprecated, please use \`parameters.docs.source.transform\` instead. + ${Dt(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${pt(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),$0=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),e9=_($0)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),t9=_.div({display:"flex",alignItems:"center",width:"100%"});function r9(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var n9=({name:e,value:t,onChange:r,min:n=0,max:o=100,step:l=1,onBlur:i,onFocus:u})=>{let s=f=>{r(hx(f.target.value))},c=t!==void 0,d=b.useMemo(()=>r9(l),[l]);return a.createElement(t9,null,a.createElement($0,null,n),a.createElement(Qx,{id:He(e),type:"range",onChange:s,name:e,value:t,min:n,max:o,step:l,onFocus:u,onBlur:i}),a.createElement(e9,{numberOFDecimalsPlaces:d,max:o},c?t.toFixed(d):"--"," / ",o))},a9=_.label({display:"flex"}),o9=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),l9=({name:e,value:t,onChange:r,onFocus:n,onBlur:o,maxLength:l})=>{let i=f=>{r(f.target.value)},[u,s]=b.useState(!1),c=b.useCallback(()=>{r(""),s(!0)},[s]);if(t===void 0)return a.createElement(Ne.Button,{id:Dn(e),onClick:c},"Set string");let d=typeof t=="string";return a.createElement(a9,null,a.createElement(Ne.Textarea,{id:He(e),maxLength:l,onChange:i,size:"flex",placeholder:"Edit string...",autoFocus:u,valid:d?null:"error",name:e,value:d?t:"",onFocus:n,onBlur:o}),l&&a.createElement(o9,{isMaxed:(t==null?void 0:t.length)===l},(t==null?void 0:t.length)??0," / ",l))},i9=_(Ne.Input)({padding:10});function s9(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var u9=({onChange:e,name:t,accept:r="image/*",value:n})=>{let o=b.useRef(null);function l(i){if(!i.target.files)return;let u=Array.from(i.target.files).map(s=>URL.createObjectURL(s));e(u),s9(n)}return b.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),a.createElement(i9,{ref:o,id:He(t),type:"file",name:t,multiple:!0,onChange:l,accept:r,size:"flex"})},c9=b.lazy(()=>At(()=>import("./Color-6VNJS4EI-BncQ8Qgm.js"),__vite__mapDeps([14,2,3,10,1,4,5,6,7,8,9,11]),import.meta.url)),d9=e=>a.createElement(b.Suspense,{fallback:a.createElement("div",null)},a.createElement(c9,{...e})),p9={array:vs,object:vs,boolean:sx,color:d9,date:mx,number:bx,check:Gt,"inline-check":Gt,radio:Gt,"inline-radio":Gt,select:Gt,"multi-select":Gt,range:n9,text:l9,file:u9},Es=()=>a.createElement(a.Fragment,null,"-"),f9=({row:e,arg:t,updateArgs:r,isHovered:n})=>{let{key:o,control:l}=e,[i,u]=b.useState(!1),[s,c]=b.useState({value:t});b.useEffect(()=>{i||c({value:t})},[i,t]);let d=b.useCallback(g=>(c({value:g}),r({[o]:g}),g),[r,o]),f=b.useCallback(()=>u(!1),[]),m=b.useCallback(()=>u(!0),[]);if(!l||l.disable)return n?a.createElement(wt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):a.createElement(Es,null);let p={name:o,argType:e,value:s.value,onChange:d,onBlur:f,onFocus:m},h=p9[l.type]||Es;return a.createElement(h,{...p,...l,controlType:l.type})},m9=_.span({fontWeight:"bold"}),g9=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),h9=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...gt({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),b9=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?4:0})),y9=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),v9=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),ln=e=>{var g;let[t,r]=b.useState(!1),{row:n,updateArgs:o,compact:l,expandable:i,initialExpandedArgs:u}=e,{name:s,description:c}=n,d=n.table||{},f=d.type||n.type,m=d.defaultValue||n.defaultValue,p=(g=n.type)==null?void 0:g.required,h=c!=null&&c!=="";return a.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},a.createElement(v9,{expandable:i},a.createElement(m9,null,s),p?a.createElement(g9,{title:"Required"},"*"):null),l?null:a.createElement("td",null,h&&a.createElement(h9,null,a.createElement(n0,null,c)),d.jsDocTags!=null?a.createElement(a.Fragment,null,a.createElement(y9,{hasDescription:h},a.createElement(Pa,{value:f,initialExpandedArgs:u})),a.createElement(K8,{tags:d.jsDocTags})):a.createElement(b9,{hasDescription:h},a.createElement(Pa,{value:f,initialExpandedArgs:u}))),l?null:a.createElement("td",null,a.createElement(Pa,{value:m,initialExpandedArgs:u})),o?a.createElement("td",null,a.createElement(f9,{...e,isHovered:t})):null)},E9=_(ve)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),x9=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),w9=_.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),A9=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),S9=_.td(()=>({position:"relative"})),C9=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Dt(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),xs=_.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Na=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:o=3})=>{let[l,i]=b.useState(n),u=e==="subsection"?A9:w9,s=(r==null?void 0:r.length)||0,c=e==="subsection"?`${s} item${s!==1?"s":""}`:"",d=l?"arrowdown":"arrowright",f=`${l?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return a.createElement(a.Fragment,null,a.createElement(C9,{title:f},a.createElement(u,{colSpan:1},a.createElement(xs,{onClick:m=>i(!l),tabIndex:0},f),a.createElement(x9,null,a.createElement(E9,{icon:d}),t)),a.createElement(S9,{colSpan:o-1},a.createElement(xs,{onClick:m=>i(!l),tabIndex:-1,style:{outline:"none"}},f),l?null:c)),l?r:null)},sn=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),me=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ie=_.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),ge=[2,4,2,2],k9=()=>a.createElement(a.Fragment,null,a.createElement(sn,null,a.createElement(me,{numColumn:ge[0]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[1]},a.createElement(ie,{width:"30%"})),a.createElement(me,{numColumn:ge[2]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[3]},a.createElement(ie,{width:"60%"}))),a.createElement(sn,null,a.createElement(me,{numColumn:ge[0]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[1]},a.createElement(ie,{width:"80%"}),a.createElement(ie,{width:"30%"})),a.createElement(me,{numColumn:ge[2]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[3]},a.createElement(ie,{width:"60%"}))),a.createElement(sn,null,a.createElement(me,{numColumn:ge[0]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[1]},a.createElement(ie,{width:"80%"}),a.createElement(ie,{width:"30%"})),a.createElement(me,{numColumn:ge[2]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[3]},a.createElement(ie,{width:"60%"}))),a.createElement(sn,null,a.createElement(me,{numColumn:ge[0]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[1]},a.createElement(ie,{width:"80%"}),a.createElement(ie,{width:"30%"})),a.createElement(me,{numColumn:ge[2]},a.createElement(ie,{width:"60%"})),a.createElement(me,{numColumn:ge[3]},a.createElement(ie,{width:"60%"})))),_9=_.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),O9=_.div({display:"flex",flexDirection:"column",gap:4,maxWidth:415}),T9=_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textColor})),F9=_.div(({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textMutedColor})),R9=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),$9=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),D9=({inAddonPanel:e})=>{let[t,r]=b.useState(!0);return b.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:a.createElement(_9,{inAddonPanel:e},a.createElement(O9,null,a.createElement(T9,null,e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated"),a.createElement(F9,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically.")),a.createElement(R9,null,e&&a.createElement(a.Fragment,null,a.createElement(wt,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},a.createElement(ve,{icon:"video"})," Watch 5m video"),a.createElement($9,null),a.createElement(wt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Read docs")),!e&&a.createElement(wt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Learn how to set that up")))},L9=_.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?ee(.25,e.color.defaultText):ee(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),M9=_(jt)(({theme:e})=>({color:e.barTextColor,margin:"-4px -12px -4px 0"})),B9=_.span({display:"flex",justifyContent:"space-between"}),I9={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},P9=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([l,i])=>{let{category:u,subcategory:s}=(i==null?void 0:i.table)||{};if(u){let c=r.sections[u]||{ungrouped:[],subsections:{}};if(!s)c.ungrouped.push({key:l,...i});else{let d=c.subsections[s]||[];d.push({key:l,...i}),c.subsections[s]=d}r.sections[u]=c}else if(s){let c=r.ungroupedSubsections[s]||[];c.push({key:l,...i}),r.ungroupedSubsections[s]=c}else r.ungrouped.push({key:l,...i})});let n=I9[t],o=l=>n?Object.keys(l).reduce((i,u)=>({...i,[u]:l[u].sort(n)}),{}):l;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:o(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((l,i)=>({...l,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:o(r.sections[i].subsections)}}),{})}},j9=(e,t,r)=>{try{return Y0(e,t,r)}catch(n){return b8.warn(n.message),!1}},N9=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:o,initialExpandedArgs:l,sort:i="none",isLoading:u}=e;if("error"in e){let{error:w}=e;return a.createElement(y0,null,w," ",a.createElement(wt,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},"Read the docs"))}if(u)return a.createElement(k9,null);let{rows:s,args:c,globals:d}="rows"in e&&e,f=P9(Ay(s,w=>{var v;return!((v=w==null?void 0:w.table)!=null&&v.disable)&&j9(w,c||{},d||{})}),i),m=f.ungrouped.length===0,p=Object.entries(f.sections).length===0,h=Object.entries(f.ungroupedSubsections).length===0;if(m&&p&&h)return a.createElement(D9,{inAddonPanel:o});let g=1;t&&(g+=1),n||(g+=2);let x=Object.keys(f.sections).length>0,y={updateArgs:t,compact:n,inAddonPanel:o,initialExpandedArgs:l};return a.createElement(il,null,a.createElement(L9,{compact:n,inAddonPanel:o,className:"docblock-argstable sb-unstyled"},a.createElement("thead",{className:"docblock-argstable-head"},a.createElement("tr",null,a.createElement("th",null,a.createElement("span",null,"Name")),n?null:a.createElement("th",null,a.createElement("span",null,"Description")),n?null:a.createElement("th",null,a.createElement("span",null,"Default")),t?a.createElement("th",null,a.createElement(B9,null,"Control"," ",!u&&r&&a.createElement(M9,{onClick:()=>r(),title:"Reset controls"},a.createElement(ve,{icon:"undo","aria-hidden":!0})))):null)),a.createElement("tbody",{className:"docblock-argstable-body"},f.ungrouped.map(w=>a.createElement(ln,{key:w.key,row:w,arg:c&&c[w.key],...y})),Object.entries(f.ungroupedSubsections).map(([w,v])=>a.createElement(Na,{key:w,label:w,level:"subsection",colSpan:g},v.map(E=>a.createElement(ln,{key:E.key,row:E,arg:c&&c[E.key],expandable:x,...y})))),Object.entries(f.sections).map(([w,v])=>a.createElement(Na,{key:w,label:w,level:"section",colSpan:g},v.ungrouped.map(E=>a.createElement(ln,{key:E.key,row:E,arg:c&&c[E.key],...y})),Object.entries(v.subsections).map(([E,A])=>a.createElement(Na,{key:E,label:E,level:"subsection",colSpan:g},A.map(S=>a.createElement(ln,{key:S.key,row:S,arg:c&&c[S.key],expandable:x,...y})))))))))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(te,({theme:e})=>({...aa(e),margin:"25px 0 40px",padding:"30px 20px"}));_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));_.div(({theme:e})=>({color:e.base==="light"?ee(.2,e.color.defaultText):ee(.6,e.color.defaultText)}));_.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});_.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));_.div({display:"flex",flexDirection:"row"});_.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));_.div(({theme:e})=>({...aa(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));_.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});_.div({flex:1,display:"flex",flexDirection:"row"});_.div({display:"flex",alignItems:"flex-start"});_.div({flex:"0 0 30%"});_.div({flex:1});_.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));_.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));_.div(({theme:e})=>({...aa(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));_.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});_.div({display:"flex",flexFlow:"row wrap"});var H9=e=>`anchor--${e}`,Z9=({storyId:e,children:t})=>a.createElement("div",{id:H9(e),className:"sb-anchor"},t);$e&&$e.__DOCS_CONTEXT__===void 0&&($e.__DOCS_CONTEXT__=b.createContext(null),$e.__DOCS_CONTEXT__.displayName="DocsContext");var Te=$e?$e.__DOCS_CONTEXT__:b.createContext(null),Yr=(e,t)=>b.useContext(Te).resolveOf(e,t);function V9(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function z9(e,t){let r=Fl([e],t);return r&&r[0]}function Fl(e,t){let[r,n]=b.useState({});return b.useEffect(()=>{Promise.all(e.map(async o=>{let l=await t.loadStory(o);n(i=>i[o]===l?i:{...i,[o]:l})}))}),e.map(o=>{if(r[o])return r[o];try{return t.storyById(o)}catch{return null}})}function D0(e){return d8(e)}var L0=b.createContext({sources:{}}),M0="--unknown--",q9=({children:e,channel:t})=>{let[r,n]=b.useState({});return b.useEffect(()=>{let o=(l,i=null,u=!1)=>{let{id:s,args:c=void 0,source:d,format:f}=typeof l=="string"?{id:l,source:i,format:u}:l,m=c?D0(c):M0;n(p=>({...p,[s]:{...p[s],[m]:{code:d,format:f}}}))};return t.on(Pl,o),()=>t.off(Pl,o)},[]),a.createElement(L0.Provider,{value:{sources:r}},e)},U9=(e=>(e.OPEN="open",e.CLOSED="closed",e.NONE="none",e))(U9||{}),W9=e=>{let t=e.map(r=>{var n,o;return(o=(n=r.parameters.docs)==null?void 0:n.source)==null?void 0:o.state}).filter(Boolean);return t.length===0?"closed":t[0]},G9=(e,t,r)=>{let{sources:n}=r,o=n==null?void 0:n[e];return(o==null?void 0:o[D0(t)])||(o==null?void 0:o[M0])||{code:""}},Y9=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,c,d,f,m,p;let{__isArgsStory:o}=t.parameters,l=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||l.type||ua.AUTO;if(l.code!==void 0)return l.code;let u=i===ua.DYNAMIC||i===ua.AUTO&&e&&o?e:l.originalSource||"";return l.transformSource&&pe(xe`The \`transformSource\` parameter at \`parameters.docs.source.transformSource\` is deprecated, please use \`parameters.docs.source.transform\` instead. Please refer to the migration guide: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#source-block `),(c=t.parameters.docs)!=null&&c.transformSource&&pe(xe`The \`transformSource\` parameter at \`parameters.docs.transformSource\` is deprecated, please use \`parameters.docs.source.transform\` instead. @@ -364,7 +364,7 @@ ${t}`);let r=t.match(zg);if(!r)return a.createElement(b.Fragment,null,t);let[,n, `),o?a.createElement(V0,{of:o.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},Tw=({children:e,disableAnchor:t,...r})=>{if(t||typeof e!="string")return a.createElement(ol,null,e);let n=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return a.createElement($l,{as:"h2",id:n,...r},e)},Fw=_(Tw)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,fontWeight:e.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:e.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),Rw=({title:e="Stories",includePrimary:t=!0})=>{let{componentStories:r}=b.useContext(Te),n=r().filter(o=>{var l,i;return!((i=(l=o.parameters)==null?void 0:l.docs)!=null&&i.disable)});return t||(n=n.slice(1)),!n||n.length===0?null:a.createElement(a.Fragment,null,a.createElement(Fw,null,e),n.map(o=>o&&a.createElement(V0,{key:o.id,of:o.moduleExport,expanded:!0,__forceInitialArgs:!0})))},$w=()=>{let e=Yr("meta",["meta"]),{stories:t}=e.csfFile,r=Object.keys(t).length===1;return a.createElement(a.Fragment,null,a.createElement(Cw,null),a.createElement(kw,null),a.createElement(ko,{of:"meta"}),r?a.createElement(ko,{of:"story"}):null,a.createElement(Ow,null),a.createElement(nw,null),r?null:a.createElement(Rw,null))};function Dw({context:e,docsParameter:t}){let r=t.container||ww,n=t.page||$w;return a.createElement(r,{context:e,theme:t.theme},a.createElement(n,null))}var z0={code:j0,a:N0,...Z0},Lw=class extends b.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?null:a.createElement(a.Fragment,null,t)}},Mw=class{constructor(){this.render=async(e,t,r)=>{let n={...z0,...t==null?void 0:t.components},o=Dw;return new Promise((l,i)=>{At(()=>import("./index-Aiv9N5p3.js"),__vite__mapDeps([15,2,3]),import.meta.url).then(({MDXProvider:u})=>U0(a.createElement(Lw,{showException:i,key:Math.random()},a.createElement(u,{components:n},a.createElement(o,{context:e,docsParameter:t}))),r)).then(()=>l())})},this.unmount=e=>{W0(e)}}};const Xw=Object.freeze(Object.defineProperty({__proto__:null,DocsRenderer:Mw,defaultComponents:z0},Symbol.toStringTag,{value:"Module"}));export{Xw as D,Ne as F,ve as I,Wo as S,vh as T,Im as W,_e as _,Uu as a,Z as b,Du as c,dh as d,He as g,Ht as m,_ as n,Ww as s}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-B5GMVT5T-wrhZ0_tZ.js","./iframe-_HOM8AA9.js","./index-TT1qJ6UJ.js","./_commonjsHelpers-4gQjN7DL.js","./react-18-N0svEjlN.js","./client-rbWgHzHN.js","./index-7vsPyIck.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./bundle.esm-7jAAHVxW.js","./index-ogXoivrg.js","./_getPrototype-bjD8Yebc.js","./index-PPLHz8o0.js","./formatter-SWP5E3XI-qCqZhePw.js","./WithTooltip-V3YHNWJZ-V8PFiBER.js","./Color-6VNJS4EI-a6PsbFjJ.js","./index-Aiv9N5p3.js"] + __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-B5GMVT5T-CyhDqoZf.js","./iframe-7PiyMb9T.js","./index-TT1qJ6UJ.js","./_commonjsHelpers-4gQjN7DL.js","./react-18-N0svEjlN.js","./client-rbWgHzHN.js","./index-7vsPyIck.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./bundle.esm-7jAAHVxW.js","./index-ogXoivrg.js","./_getPrototype-bjD8Yebc.js","./index-PPLHz8o0.js","./formatter-SWP5E3XI-IcSeFhu6.js","./WithTooltip-V3YHNWJZ-XpcFPTRG.js","./Color-6VNJS4EI-BncQ8Qgm.js","./index-Aiv9N5p3.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/WithTooltip-V3YHNWJZ-V8PFiBER.js b/assets/WithTooltip-V3YHNWJZ-XpcFPTRG.js similarity index 75% rename from assets/WithTooltip-V3YHNWJZ-V8PFiBER.js rename to assets/WithTooltip-V3YHNWJZ-XpcFPTRG.js index f90ea83933..6180dcb3ec 100644 --- a/assets/WithTooltip-V3YHNWJZ-V8PFiBER.js +++ b/assets/WithTooltip-V3YHNWJZ-XpcFPTRG.js @@ -1 +1 @@ -import{W as u,W as x,a as P}from"./DocsRenderer-NNNQARDV-s8P9JC76.js";import"./iframe-_HOM8AA9.js";import"../sb-preview/runtime.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-18-N0svEjlN.js";import"./client-rbWgHzHN.js";import"./index-7vsPyIck.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./bundle.esm-7jAAHVxW.js";import"./index-ogXoivrg.js";import"./_getPrototype-bjD8Yebc.js";import"./index-PPLHz8o0.js";export{u as WithToolTipState,x as WithTooltip,P as WithTooltipPure}; +import{W as u,W as x,a as P}from"./DocsRenderer-NNNQARDV-jtC6Msq5.js";import"./iframe-7PiyMb9T.js";import"../sb-preview/runtime.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-18-N0svEjlN.js";import"./client-rbWgHzHN.js";import"./index-7vsPyIck.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./bundle.esm-7jAAHVxW.js";import"./index-ogXoivrg.js";import"./_getPrototype-bjD8Yebc.js";import"./index-PPLHz8o0.js";export{u as WithToolTipState,x as WithTooltip,P as WithTooltipPure}; diff --git a/assets/answer-choices-6SWUlni2.js b/assets/answer-choices-VNdK7gMK.js similarity index 99% rename from assets/answer-choices-6SWUlni2.js rename to assets/answer-choices-VNdK7gMK.js index a08cbeb909..39a6ad0233 100644 --- a/assets/answer-choices-6SWUlni2.js +++ b/assets/answer-choices-VNdK7gMK.js @@ -1,4 +1,4 @@ -import{j as et}from"./jsx-runtime-FVsy8kgq.js";import{a as g,_ as d,b as yt,V as Ce,I as ke}from"./index-6h5t6F0w.js";import{r as o}from"./index-TT1qJ6UJ.js";import{l as v}from"./index-awljIyHI.js";import{C as gr,a as yr}from"./index-o3wWn3Y5.js";import{s as m,c as a,m as ee,b as X,a as br,f as Sr}from"./index-deFLJwr4.js";import{a as bt,b as Qt,L as xr}from"./index-h_CiYGGb.js";import{P as St}from"./index-xuPsLuPk.js";import{c as Gt,m as Cr}from"./minus-bold-ONmDo3Ve.js";import{r as Ie}from"./index-7vsPyIck.js";import{I as vr,x as Ir}from"./index-rfN0X25E.js";import{w as kn}from"./index-CkAxGj88.js";import{P as wr,d as $r}from"./Popper-kGnKOid7.js";import{m as Er}from"./index-YCTzZMik.js";import{u as kr}from"./i18n-context-P5sgPFep.js";import{R as Rr}from"./renderer-VfFjn7ah.js";function Rn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Rn(t));else e.push(s);else return e;return e}function _n(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Rn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const _r=["children","style","tag","testId"],Fr=/^h[1-6]$/,Jt=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),B=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,_r);const f=Fr.test(l),h=_n([Jt.text,f&&Jt.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),Tr=["className","style"];function qe(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,Tr),c=typeof s=="string"?zr[s]:null,{className:f,style:h}=_n([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const zr=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Pr=["testId","tag"],Ve=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Or=qe("div",Ve.default),Br=qe("article",Ve.default),Lr=qe("aside",Ve.default),Dr=qe("nav",Ve.default),Nr=qe("section",Ve.default),Re=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,Pr),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Br,d({},i,{ref:t}));case"aside":return o.createElement(Lr,d({},i,{ref:t}));case"nav":return o.createElement(Dr,d({},i,{ref:t}));case"section":return o.createElement(Nr,d({},i,{ref:t}));case"div":return o.createElement(Or,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let be=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ut=o.createContext(be.Root);ut.displayName="RenderStateContext";let Hr=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ut.Provider,{value:be.Standard},t()):n?o.createElement(ut.Provider,{value:be.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case be.Root:return this._renderAsRootComponent();case be.Initial:return n?n():null;case be.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(be.Root)}}render(){return o.createElement(ut.Consumer,null,e=>this._maybeRender(e))}},Fn=class Tn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Tn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};Fn._factoryUniquenessCounter=0;let Mt=class{get(e){return e}};Mt.Default=new Mt;var Mr=Mt.Default;let Wr=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Mr):null:(this._idFactory||(this._idFactory=new Fn(r)),t(this._idFactory))}render(){return o.createElement(Hr,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Ar=class zn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(zn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Wr,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Ar.defaultId="wb-id";const Z=400,Be=700,qr=900,Rt="@media (max-width: 1023px)",_t="@media (min-width: 1024px)",z={display:"block"},A='Lato, "Noto Sans", sans-serif',en='"Noto Serif", serif',Vr="Inconsolata, monospace",L=v.StyleSheet.create({Title:d({},z,{fontFamily:A,fontWeight:qr,[_t]:{fontSize:36,lineHeight:"40px"},[Rt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},z,{fontFamily:A,fontWeight:Z,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},z,{fontFamily:A,fontWeight:Be,[_t]:{fontSize:28,lineHeight:"32px"},[Rt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},z,{fontFamily:A,fontWeight:Be,[_t]:{fontSize:24,lineHeight:"28px"},[Rt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},z,{fontFamily:A,fontWeight:Be,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},z,{fontFamily:A,fontWeight:Be,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},z,{fontFamily:en,fontWeight:Z,fontSize:22,lineHeight:"28px"}),BodySerif:d({},z,{fontFamily:en,fontWeight:Z,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},z,{fontFamily:Vr,fontWeight:Z,fontSize:17,lineHeight:"22px"}),Body:d({},z,{fontFamily:A,fontWeight:Z,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},z,{fontFamily:A,fontWeight:Be,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},z,{fontFamily:A,fontWeight:Z,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},z,{fontFamily:A,fontWeight:Z,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},z,{fontFamily:A,fontWeight:Z,fontSize:12,lineHeight:"16px"}),Caption:d({},z,{fontFamily:A,fontWeight:Z,fontSize:14,lineHeight:"20px"}),Footnote:d({},z,{fontFamily:A,fontWeight:Z,fontSize:12,lineHeight:"18px"})}),Ur=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,Ur);return o.createElement(B,d({},i,{tag:l,style:[L.Title,n],ref:t}),r)});const Kr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,Kr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingLarge,n],ref:t}),r)});const jr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,jr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingMedium,n],ref:t}),r)});const Xr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Xr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingSmall,n],ref:t}),r)});const Gr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Gr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingXSmall,n],ref:t}),r)});const Zr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Zr);return o.createElement(B,d({},i,{tag:l,style:[L.BodySerifBlock,n],ref:t}),r)});const Yr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Yr);return o.createElement(B,d({},i,{tag:l,style:[L.BodySerif,n],ref:t}),r)});const Qr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Qr);return o.createElement(B,d({},i,{tag:l,style:[L.BodyMonospace,n],ref:t}),r)});const Jr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Jr);return o.createElement(B,d({},i,{tag:l,style:[L.Body,n],ref:t}),r)});const eo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,eo);return o.createElement(B,d({},i,{tag:l,style:[L.LabelLarge,n],ref:t}),r)});const to=["style","children","tag"],Pn=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,to);return o.createElement(B,d({},i,{tag:l,style:[L.LabelMedium,n],ref:t}),r)}),no=["style","children","tag"],ro=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,no);return o.createElement(B,d({},i,{tag:l,style:[L.LabelSmall,n],ref:t}),r)}),oo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,oo);return o.createElement(B,d({},i,{tag:l,style:[L.LabelXSmall,n],ref:t}),r)});const lo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,lo);return o.createElement(B,d({},i,{tag:l,style:[L.Tagline,n],ref:t}),r)});const so=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,so);return o.createElement(B,d({},i,{tag:l,style:[L.Caption,n],ref:t}),r)});const io=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,io);return o.createElement(B,d({},i,{tag:l,style:[L.Footnote,n],ref:t}),r)});const tn=m.large_24,ao={small:{query:"(max-width: 767px)",totalColumns:4,gutterWidth:m.medium_16,marginWidth:m.medium_16},medium:{query:"(min-width: 768px) and (max-width: 1023px)",totalColumns:8,gutterWidth:m.xLarge_32,marginWidth:m.large_24},large:{query:"(min-width: 1024px)",totalColumns:12,gutterWidth:m.xLarge_32,marginWidth:tn,maxWidth:1120+tn*2}},co={ssrSize:"large",mediaSpec:ao},uo=o.createContext(co);uo.displayName="MediaLayoutContext";v.StyleSheet.create({grow:{flexGrow:1}});let gt=class extends o.Component{render(){const{size:e,style:t}=this.props;return o.createElement(Re,{"aria-hidden":"true",style:[ho(e),t]})}};const ho=s=>({width:s,MsFlexBasis:s,MsFlexPreferredSize:s,WebkitFlexBasis:s,flexBasis:s,flexShrink:0}),G={cellMinHeight:m.xxLarge_48,cellPadding:{paddingVertical:m.small_12,paddingHorizontal:m.medium_16},detailCellPadding:{paddingVertical:m.medium_16,paddingHorizontal:m.medium_16},accessoryHorizontalSpacing:m.medium_16},fo=s=>{switch(s){case"inset":return[Ft.horizontalRule,Ft.horizontalRuleInset];case"full-width":return Ft.horizontalRule;case"none":return{}}},Ft=v.StyleSheet.create({horizontalRule:{position:"relative",":after":{width:"100%",content:"''",position:"absolute",bottom:0,right:0,height:m.xxxxSmall_2,boxShadow:`inset 0px -1px 0px ${a.offBlack8}`}},horizontalRuleInset:{":after":{width:`calc(100% - ${G.cellPadding.paddingHorizontal}px)`}}}),po=({leftAccessory:s,leftAccessoryStyle:e,disabled:t})=>s?o.createElement(o.Fragment,null,o.createElement(Re,{style:[W.accessory,t&&W.accessoryDisabled,d({},e)]},s),o.createElement(gt,{size:G.accessoryHorizontalSpacing})):null,mo=({rightAccessory:s,rightAccessoryStyle:e,active:t,disabled:n})=>s?o.createElement(o.Fragment,null,o.createElement(gt,{size:G.accessoryHorizontalSpacing}),o.createElement(Re,{style:[W.accessory,W.accessoryRight,n&&W.accessoryDisabled,d({},e),t&&W.accessoryActive]},s)):null;function nn(s){const{active:e,children:t,disabled:n,horizontalRule:r="inset",contentStyle:l=void 0,leftAccessory:i=void 0,leftAccessoryStyle:c=void 0,rightAccessory:f=void 0,rightAccessoryStyle:h=void 0,style:p,testId:b,innerStyle:x}=s,C=fo(r);return o.createElement(Re,{style:[W.innerWrapper,x,p,C]},o.createElement(po,{leftAccessory:i,leftAccessoryStyle:c,disabled:n}),o.createElement(Re,{style:[W.content,l],testId:b},t),o.createElement(mo,{rightAccessory:f,rightAccessoryStyle:h,active:e,disabled:n}))}const On=s=>{const{active:e,disabled:t,href:n,onClick:r,"aria-label":l,"aria-selected":i,"aria-checked":c,target:f,role:h,rootStyle:p}=s;return r||n?o.createElement(gr,{disabled:t,onClick:r,href:n,hideDefaultFocusRing:!0,"aria-label":l||void 0,"aria-selected":i||void 0,"aria-checked":c,role:h,target:f,style:[W.wrapper,W.clickable,p,e&&W.active,t&&W.disabled],"aria-current":e?"true":void 0},()=>o.createElement(nn,s)):o.createElement(Re,{style:[W.wrapper,p,e&&W.active],"aria-current":e?"true":void 0,role:h},o.createElement(nn,s))},W=v.StyleSheet.create({wrapper:{background:a.white,color:a.offBlack,display:"flex",minHeight:G.cellMinHeight,textAlign:"left",width:"100%"},innerWrapper:{minHeight:G.cellMinHeight,padding:`${G.cellPadding.paddingVertical}px ${G.cellPadding.paddingHorizontal}px`,flexDirection:"row",flex:1,":focus-visible":{padding:`${G.cellPadding.paddingVertical-2}px ${G.cellPadding.paddingHorizontal-2}px`}},content:{alignSelf:"center",flex:1,overflowWrap:"break-word"},accessory:{minWidth:"auto",alignItems:"center",alignSelf:"center"},accessoryRight:{color:a.offBlack64},clickable:{outline:"none",":hover[aria-disabled=true]":{cursor:"not-allowed"},":focus-visible":{borderRadius:m.xxxSmall_4,overflow:"hidden",position:"relative"},":focus-visible:after":{content:"''",position:"absolute",top:0,left:0,zIndex:1,width:`calc(100% - ${m.xxxSmall_4}px)`,height:`calc(100% - ${m.xxxSmall_4}px)`,border:`${m.xxxxSmall_2}px solid ${a.blue}`,borderRadius:m.xxxSmall_4},":hover[aria-disabled=false]":{background:a.offBlack8},":active[aria-disabled=false]":{background:a.offBlack16}},active:{background:a.fadedBlue8,color:a.blue,":hover[aria-disabled=false]":{background:a.fadedBlue16},":active[aria-disabled=false]":{background:a.fadedBlue24}},disabled:{color:a.offBlack32,":focus-visible":{outline:"none"}},accessoryActive:{color:a.blue},accessoryDisabled:{color:a.offBlack,opacity:.32}}),go=["title"],yo=function(e){const{title:t}=e,n=g(e,go);return o.createElement(On,n,typeof t=="string"?o.createElement(Pn,null,t):t)},bo=["title","subtitle1","subtitle2"],rn=({subtitle:s,disabled:e})=>s?typeof s=="string"?o.createElement(ro,{style:!e&&Bn.subtitle},s):s:null,So=function(e){const{title:t,subtitle1:n,subtitle2:r}=e,l=g(e,bo);return o.createElement(On,d({},l,{innerStyle:Bn.innerWrapper}),o.createElement(rn,{subtitle:n,disabled:l.disabled}),n&&o.createElement(gt,{size:m.xxxxSmall_2}),typeof t=="string"?o.createElement(Pn,null,t):t,r&&o.createElement(gt,{size:m.xxxxSmall_2}),o.createElement(rn,{subtitle:r,disabled:l.disabled}))},Bn=v.StyleSheet.create({subtitle:{color:a.offBlack64},innerWrapper:{padding:`${G.detailCellPadding.paddingVertical}px ${G.detailCellPadding.paddingHorizontal}px`}});function Ln(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Ln(t));else e.push(s);else return e;return e}function Dn(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Ln(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const xo=["children","style","tag","testId"],Co=/^h[1-6]$/,on=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,xo);const f=Co.test(l),h=Dn([on.text,f&&on.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)});const vo=["className","style"];function Ue(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,vo),c=typeof s=="string"?Io[s]:null,{className:f,style:h}=Dn([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const Io=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),wo=["testId","tag"],Ke=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),$o=Ue("div",Ke.default),Eo=Ue("article",Ke.default),ko=Ue("aside",Ke.default),Ro=Ue("nav",Ke.default),_o=Ue("section",Ke.default),Fo=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,wo),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Eo,d({},i,{ref:t}));case"aside":return o.createElement(ko,d({},i,{ref:t}));case"nav":return o.createElement(Ro,d({},i,{ref:t}));case"section":return o.createElement(_o,d({},i,{ref:t}));case"div":return o.createElement($o,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let Se=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ht=o.createContext(Se.Root);ht.displayName="RenderStateContext";let To=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ht.Provider,{value:Se.Standard},t()):n?o.createElement(ht.Provider,{value:Se.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case Se.Root:return this._renderAsRootComponent();case Se.Initial:return n?n():null;case Se.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(Se.Root)}}render(){return o.createElement(ht.Consumer,null,e=>this._maybeRender(e))}},Nn=class Hn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Hn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};Nn._factoryUniquenessCounter=0;let Wt=class{get(e){return e}};Wt.Default=new Wt;var zo=Wt.Default;let Po=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(zo):null:(this._idFactory||(this._idFactory=new Nn(r)),t(this._idFactory))}render(){return o.createElement(To,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Oo=class Mn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Mn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Po,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Oo.defaultId="wb-id";const ln=m.large_24,Bo={small:{query:"(max-width: 767px)",totalColumns:4,gutterWidth:m.medium_16,marginWidth:m.medium_16},medium:{query:"(min-width: 768px) and (max-width: 1023px)",totalColumns:8,gutterWidth:m.xLarge_32,marginWidth:m.large_24},large:{query:"(min-width: 1024px)",totalColumns:12,gutterWidth:m.xLarge_32,marginWidth:ln,maxWidth:1120+ln*2}},Lo={ssrSize:"large",mediaSpec:Bo},Do=o.createContext(Lo);Do.displayName="MediaLayoutContext";v.StyleSheet.create({grow:{flexGrow:1}});class de extends o.Component{render(){const{size:e,style:t}=this.props;return o.createElement(Fo,{"aria-hidden":"true",style:[No(e),t]})}}const No=s=>({width:s,MsFlexBasis:s,MsFlexPreferredSize:s,WebkitFlexBasis:s,flexBasis:s,flexShrink:0}),Ho=""+new URL("magnifying-glass-IX5mxYeF.svg",import.meta.url).href;function Wn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Wn(t));else e.push(s);else return e;return e}function An(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Wn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const Mo=["children","style","tag","testId"],Wo=/^h[1-6]$/,sn=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),D=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,Mo);const f=Wo.test(l),h=An([sn.text,f&&sn.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),Ao=["className","style"];function Te(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,Ao),c=typeof s=="string"?qo[s]:null,{className:f,style:h}=An([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const qo=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Vo=["testId","tag"],je=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Uo=Te("div",je.default),Ko=Te("article",je.default),jo=Te("aside",je.default),Xo=Te("nav",je.default),Go=Te("section",je.default),Zo=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,Vo),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Ko,d({},i,{ref:t}));case"aside":return o.createElement(jo,d({},i,{ref:t}));case"nav":return o.createElement(Xo,d({},i,{ref:t}));case"section":return o.createElement(Go,d({},i,{ref:t}));case"div":return o.createElement(Uo,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let xe=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ft=o.createContext(xe.Root);ft.displayName="RenderStateContext";let Yo=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ft.Provider,{value:xe.Standard},t()):n?o.createElement(ft.Provider,{value:xe.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case xe.Root:return this._renderAsRootComponent();case xe.Initial:return n?n():null;case xe.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(xe.Root)}}render(){return o.createElement(ft.Consumer,null,e=>this._maybeRender(e))}},qn=class Vn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Vn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};qn._factoryUniquenessCounter=0;let At=class{get(e){return e}};At.Default=new At;var Qo=At.Default;let Jo=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Qo):null:(this._idFactory||(this._idFactory=new qn(r)),t(this._idFactory))}render(){return o.createElement(Yo,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Un=class Kn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Kn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Jo,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Un.defaultId="wb-id";const Y=400,Le=700,el=900,Tt="@media (max-width: 1023px)",zt="@media (min-width: 1024px)",P={display:"block"},q='Lato, "Noto Sans", sans-serif',an='"Noto Serif", serif',tl="Inconsolata, monospace",T=v.StyleSheet.create({Title:d({},P,{fontFamily:q,fontWeight:el,[zt]:{fontSize:36,lineHeight:"40px"},[Tt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},P,{fontFamily:q,fontWeight:Y,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},P,{fontFamily:q,fontWeight:Le,[zt]:{fontSize:28,lineHeight:"32px"},[Tt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},P,{fontFamily:q,fontWeight:Le,[zt]:{fontSize:24,lineHeight:"28px"},[Tt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},P,{fontFamily:q,fontWeight:Le,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},P,{fontFamily:q,fontWeight:Le,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},P,{fontFamily:an,fontWeight:Y,fontSize:22,lineHeight:"28px"}),BodySerif:d({},P,{fontFamily:an,fontWeight:Y,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},P,{fontFamily:tl,fontWeight:Y,fontSize:17,lineHeight:"22px"}),Body:d({},P,{fontFamily:q,fontWeight:Y,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},P,{fontFamily:q,fontWeight:Le,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},P,{fontFamily:q,fontWeight:Y,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},P,{fontFamily:q,fontWeight:Y,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},P,{fontFamily:q,fontWeight:Y,fontSize:12,lineHeight:"16px"}),Caption:d({},P,{fontFamily:q,fontWeight:Y,fontSize:14,lineHeight:"20px"}),Footnote:d({},P,{fontFamily:q,fontWeight:Y,fontSize:12,lineHeight:"18px"})}),nl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,nl);return o.createElement(D,d({},i,{tag:l,style:[T.Title,n],ref:t}),r)});const rl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,rl);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingLarge,n],ref:t}),r)});const ol=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,ol);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingMedium,n],ref:t}),r)});const ll=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,ll);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingSmall,n],ref:t}),r)});const sl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,sl);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingXSmall,n],ref:t}),r)});const il=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,il);return o.createElement(D,d({},i,{tag:l,style:[T.BodySerifBlock,n],ref:t}),r)});const al=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,al);return o.createElement(D,d({},i,{tag:l,style:[T.BodySerif,n],ref:t}),r)});const dl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,dl);return o.createElement(D,d({},i,{tag:l,style:[T.BodyMonospace,n],ref:t}),r)});const cl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,cl);return o.createElement(D,d({},i,{tag:l,style:[T.Body,n],ref:t}),r)});const ul=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ul);return o.createElement(D,d({},i,{tag:l,style:[T.LabelLarge,n],ref:t}),r)});const hl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,hl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelMedium,n],ref:t}),r)});const fl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,fl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelSmall,n],ref:t}),r)});const pl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,pl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelXSmall,n],ref:t}),r)});const ml=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ml);return o.createElement(D,d({},i,{tag:l,style:[T.Tagline,n],ref:t}),r)});const gl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,gl);return o.createElement(D,d({},i,{tag:l,style:[T.Caption,n],ref:t}),r)});const yl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,yl);return o.createElement(D,d({},i,{tag:l,style:[T.Footnote,n],ref:t}),r)});function jn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...jn(t));else e.push(s);else return e;return e}function Xn(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;jn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const bl=["children","style","tag","testId"],Sl=/^h[1-6]$/,dn=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),N=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,bl);const f=Sl.test(l),h=Xn([dn.text,f&&dn.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),xl=["className","style"];function H(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,xl),c=typeof s=="string"?Cl[s]:null,{className:f,style:h}=Xn([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const Cl=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),vl=["testId","tag"],Xe=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Il=H("div",Xe.default),wl=H("article",Xe.default),$l=H("aside",Xe.default),El=H("nav",Xe.default),kl=H("section",Xe.default),_e=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,vl),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(wl,d({},i,{ref:t}));case"aside":return o.createElement($l,d({},i,{ref:t}));case"nav":return o.createElement(El,d({},i,{ref:t}));case"section":return o.createElement(kl,d({},i,{ref:t}));case"div":return o.createElement(Il,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let ie=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const We=o.createContext(ie.Root);We.displayName="RenderStateContext";class Rl extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(We.Provider,{value:ie.Standard},t()):n?o.createElement(We.Provider,{value:ie.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case ie.Root:return this._renderAsRootComponent();case ie.Initial:return n?n():null;case ie.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(ie.Root)}}render(){return o.createElement(We.Consumer,null,e=>this._maybeRender(e))}}class Ge{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Ge._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}Ge._factoryUniquenessCounter=0;class qt{get(e){return e}}qt.Default=new qt;var Gn=qt.Default;class Zn extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Gn):null:(this._idFactory||(this._idFactory=new Ge(r)),t(this._idFactory))}render(){return o.createElement(Rl,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class Ze extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Ze.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Zn,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}}Ze.defaultId="wb-id";const _l=()=>o.useContext(We),Fl=s=>{const e=_l(),t=o.useRef(null);if(e===ie.Root)throw new Error("Components using useUniqueIdWithMock() should be descendants of ");return e===ie.Initial?Gn:(t.current||(t.current=new Ge(s)),t.current)},Tl=s=>{o.useEffect(s,[])},Q=400,De=700,zl=900,Pt="@media (max-width: 1023px)",Ot="@media (min-width: 1024px)",O={display:"block"},V='Lato, "Noto Sans", sans-serif',cn='"Noto Serif", serif',Pl="Inconsolata, monospace",F=v.StyleSheet.create({Title:d({},O,{fontFamily:V,fontWeight:zl,[Ot]:{fontSize:36,lineHeight:"40px"},[Pt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},O,{fontFamily:V,fontWeight:Q,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},O,{fontFamily:V,fontWeight:De,[Ot]:{fontSize:28,lineHeight:"32px"},[Pt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},O,{fontFamily:V,fontWeight:De,[Ot]:{fontSize:24,lineHeight:"28px"},[Pt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},O,{fontFamily:V,fontWeight:De,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},O,{fontFamily:V,fontWeight:De,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},O,{fontFamily:cn,fontWeight:Q,fontSize:22,lineHeight:"28px"}),BodySerif:d({},O,{fontFamily:cn,fontWeight:Q,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},O,{fontFamily:Pl,fontWeight:Q,fontSize:17,lineHeight:"22px"}),Body:d({},O,{fontFamily:V,fontWeight:Q,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},O,{fontFamily:V,fontWeight:De,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},O,{fontFamily:V,fontWeight:Q,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},O,{fontFamily:V,fontWeight:Q,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},O,{fontFamily:V,fontWeight:Q,fontSize:12,lineHeight:"16px"}),Caption:d({},O,{fontFamily:V,fontWeight:Q,fontSize:14,lineHeight:"20px"}),Footnote:d({},O,{fontFamily:V,fontWeight:Q,fontSize:12,lineHeight:"18px"})}),Ol=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,Ol);return o.createElement(N,d({},i,{tag:l,style:[F.Title,n],ref:t}),r)});const Bl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,Bl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingLarge,n],ref:t}),r)});const Ll=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,Ll);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingMedium,n],ref:t}),r)});const Dl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Dl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingSmall,n],ref:t}),r)});const Nl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Nl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingXSmall,n],ref:t}),r)});const Hl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Hl);return o.createElement(N,d({},i,{tag:l,style:[F.BodySerifBlock,n],ref:t}),r)});const Ml=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Ml);return o.createElement(N,d({},i,{tag:l,style:[F.BodySerif,n],ref:t}),r)});const Wl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Wl);return o.createElement(N,d({},i,{tag:l,style:[F.BodyMonospace,n],ref:t}),r)});const Al=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Al);return o.createElement(N,d({},i,{tag:l,style:[F.Body,n],ref:t}),r)});const ql=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ql);return o.createElement(N,d({},i,{tag:l,style:[F.LabelLarge,n],ref:t}),r)});const Vl=["style","children","tag"],xt=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Vl);return o.createElement(N,d({},i,{tag:l,style:[F.LabelMedium,n],ref:t}),r)}),Ul=["style","children","tag"],we=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Ul);return o.createElement(N,d({},i,{tag:l,style:[F.LabelSmall,n],ref:t}),r)}),Kl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Kl);return o.createElement(N,d({},i,{tag:l,style:[F.LabelXSmall,n],ref:t}),r)});const jl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,jl);return o.createElement(N,d({},i,{tag:l,style:[F.Tagline,n],ref:t}),r)});const Xl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Xl);return o.createElement(N,d({},i,{tag:l,style:[F.Caption,n],ref:t}),r)});const Gl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Gl);return o.createElement(N,d({},i,{tag:l,style:[F.Footnote,n],ref:t}),r)});const Zl=s=>({small:16,medium:24,large:48,xlarge:96})[s],Yl=["color","icon","size","style","testId","className"],Ql=H("span"),Yn=o.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:l="small",style:i,testId:c,className:f}=e,h=g(e,Yl),p=Zl(l),b=`${f??""}`,x=Jl(n,p);return o.createElement(Ql,d({},h,{className:b,style:[Vt.svg,x.icon,{maskImage:`url(${r})`},i],"data-testid":c,ref:t}))}),un={},Jl=(s,e)=>{const t=`${s}-${e}`;if(Vt[t])return Vt[t];const n={icon:{backgroundColor:s,width:e,height:e}};return un[t]=v.StyleSheet.create(n),un[t]},Vt=v.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});Yn.displayName="PhosphorIcon";const es=["checked","disabled","error","groupName","id","testId"];function ts(s){switch(s){case!0:return"true";case!1:return"false";default:return"mixed"}}const{blue:Qn,red:Jn,white:ae,offWhite:ns,offBlack16:rs,offBlack32:os,offBlack50:ls}=a,Ne=m.medium_16,Ut=m.small_12,ss=H("input"),is=o.forwardRef(function(e,t){const{checked:n,disabled:r,error:l,groupName:i,id:c,testId:f}=e,h=g(e,es),p=o.useRef(null);o.useEffect(()=>{p.current!=null&&(p.current.indeterminate=n==null)},[n,p]);const b=()=>{},x=cs(n,l),C=[tt.inputReset,tt.default,!r&&x.default,r&&tt.disabled],I=o.createElement(Yn,{color:r?os:ae,icon:n?Gt:Cr,size:"small",style:[tt.checkboxIcon,{width:Ut,height:Ut}]}),u=ts(n);return o.createElement(o.Fragment,null,o.createElement(ss,d({},h,{ref:y=>{p.current=y,typeof t=="function"?t(y):t!=null&&(t.current=y)},type:"checkbox","aria-checked":u,"aria-invalid":l,checked:n??void 0,disabled:r,id:c,name:i,onChange:b,style:C,"data-testid":f})),n||n==null?I:o.createElement(o.Fragment,null))}),tt=v.StyleSheet.create({inputReset:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none"},default:{height:Ne,width:Ne,minHeight:Ne,minWidth:Ne,margin:0,outline:"none",boxSizing:"border-box",borderStyle:"solid",borderWidth:1,borderRadius:3},disabled:{cursor:"auto",backgroundColor:ns,borderColor:rs,borderWidth:1},checkboxIcon:{position:"absolute",pointerEvents:"none",margin:(Ne-Ut)/2}}),as=ee(a.fadedBlue16,ae),ds=a.activeBlue,pt=ee(a.fadedRed8,ae),er=a.activeRed,hn={default:{faded:as,base:Qn,active:ds},error:{faded:pt,base:Jn,active:er}},nt={},cs=(s,e)=>{const t=`${String(s)}-${String(e)}`;if(nt[t])return nt[t];const n=e?hn.error:hn.default;let r={};return s||s==null?r={default:{backgroundColor:n.base,borderWidth:0,":focus-visible":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.base}`},":hover":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.base}`},":active":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.active}`,background:n.active}}}:r={default:{backgroundColor:e?pt:ae,borderColor:e?Jn:ls,":focus-visible":{backgroundColor:e?pt:ae,borderColor:n.base,borderWidth:2},":hover":{backgroundColor:e?pt:ae,borderColor:n.base,borderWidth:2},":active":{backgroundColor:n.faded,borderColor:e?er:Qn,borderWidth:2}}},nt[t]=v.StyleSheet.create(r),nt[t]},us=["checked","disabled","error","groupName","id","testId"],{blue:tr,red:nr,white:se,offWhite:hs,offBlack16:fs,offBlack32:ps,offBlack50:ms}=a,gs=H("input"),ys=o.forwardRef(function(e,t){const n=()=>{},{checked:r,disabled:l,error:i,groupName:c,id:f,testId:h}=e,p=g(e,us),b=xs(r,i),x=[Bt.inputReset,Bt.default,!l&&b.default,l&&Bt.disabled];return o.createElement(o.Fragment,null,o.createElement(gs,d({},p,{type:"radio","aria-invalid":i,checked:r??void 0,disabled:l,id:f,name:c,onChange:n,style:x,"data-testid":h,ref:t})),l&&r&&o.createElement("span",{style:bs}))}),ce=16,bs={position:"absolute",top:ce/4,left:ce/4,height:ce/2,width:ce/2,borderRadius:"50%",backgroundColor:ps},Bt=v.StyleSheet.create({inputReset:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none"},default:{height:ce,width:ce,minHeight:ce,minWidth:ce,margin:0,outline:"none",boxSizing:"border-box",borderStyle:"solid",borderWidth:1,borderRadius:"50%"},disabled:{cursor:"auto",backgroundColor:hs,borderColor:fs,borderWidth:1}}),Ss=ee(a.fadedBlue16,se),mt=ee(a.fadedRed8,se),fn={default:{faded:Ss,base:tr,active:a.activeBlue},error:{faded:mt,base:nr,active:a.activeRed}},rt={},xs=(s,e)=>{const t=`${String(s)}-${String(e)}`;if(rt[t])return rt[t];const n=e?fn.error:fn.default;let r={};return s?r={default:{backgroundColor:se,borderColor:n.base,borderWidth:ce/4,":focus-visible":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.base}`},":hover":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.base}`},":active":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.active}`,borderColor:n.active}}}:r={default:{backgroundColor:e?mt:se,borderColor:e?nr:ms,":focus-visible":{backgroundColor:e?mt:se,borderColor:n.base,borderWidth:2},":hover":{backgroundColor:e?mt:se,borderColor:n.base,borderWidth:2},":active":{backgroundColor:n.faded,borderColor:e?a.activeRed:tr,borderWidth:2}}},rt[t]=v.StyleSheet.create(r),rt[t]},Cs=["checked","description","disabled","error","id","label","onChange","style","className","variant"],rr=o.forwardRef(function(e,t){const{checked:n,description:r,disabled:l=!1,error:i=!1,id:c,label:f,onChange:h,style:p,className:b,variant:x}=e,C=g(e,Cs),I=()=>{x==="radio"&&n||h(!n)},u=()=>x==="radio"?ys:is,y=w=>o.createElement(xt,{style:[ot.label,l&&ot.disabledLabel]},o.createElement("label",{htmlFor:w},f)),S=w=>o.createElement(we,{style:ot.description,id:w},r),$=u();return o.createElement(Zn,{mockOnFirstRender:!0,scope:"choice"},w=>{const k=c||w.get("main"),E=r?w.get("description"):void 0;return o.createElement(_e,{style:p,className:b},o.createElement(_e,{style:ot.wrapper,tabIndex:-1},o.createElement($,d({},C,{id:k,checked:n,"aria-describedby":E,onClick:I,disabled:l,error:i,ref:t})),o.createElement(de,{size:m.xSmall_8}),f&&y(k)),r&&S(E))})}),ot=v.StyleSheet.create({wrapper:{flexDirection:"row",alignItems:"flex-start",outline:"none"},label:{marginTop:-2},disabledLabel:{color:a.offBlack32},description:{marginLeft:m.medium_16+m.xSmall_8,marginTop:m.xxxSmall_4,color:a.offBlack64}}),vs=o.forwardRef(function(e,t){const{disabled:n=!1,error:r=!1}=e;return o.createElement(rr,d({},e,{variant:"checkbox",disabled:n,error:r,ref:t}))}),Is=["disabled","error"],ws=o.forwardRef(function(e,t){const{disabled:n=!1,error:r=!1}=e,l=g(e,Is);return o.createElement(rr,d({},l,{variant:"radio",disabled:n,error:r,ref:t}))}),$s=["checked","disabled","onChange","value","variant"];o.forwardRef(function(e,t){const{checked:n=!1,disabled:r=!1,onChange:l=()=>{},variant:i}=e,c=g(e,$s),h=(p=>p==="checkbox"?vs:ws)(i);return o.createElement(h,d({},c,{checked:n,disabled:r,onChange:l,ref:t}))});const J=v.StyleSheet.create({fieldset:{border:"none",padding:0,margin:0},legend:{padding:0},description:{marginTop:m.xxxSmall_4,color:a.offBlack64},error:{marginTop:m.xxxSmall_4,color:a.red},defaultLineGap:{marginTop:m.xSmall_8}}),Es=H("fieldset"),ks=H("legend");o.forwardRef(function(e,t){const{children:n,label:r,description:l,errorMessage:i,groupName:c,onChange:f,selectedValues:h,style:p,testId:b}=e,x=(I,u)=>{if(u){const y=h.indexOf(I),S=[...h.slice(0,y),...h.slice(y+1)];f(S)}else f([...h,I])},C=o.Children.toArray(n).filter(Boolean);return o.createElement(Es,{"data-testid":b,style:J.fieldset,ref:t},o.createElement(_e,{style:p},r&&o.createElement(ks,{style:J.legend},o.createElement(xt,null,r)),l&&o.createElement(we,{style:J.description},l),i&&o.createElement(we,{style:J.error},i),(r||l||i)&&o.createElement(de,{size:m.small_12}),C.map((I,u)=>{const{style:y,value:S}=I.props,$=h.includes(S);return o.cloneElement(I,{checked:$,error:!!i,groupName:c,id:`${c}-${S}`,key:S,onChange:()=>x(S,$),style:[u>0&&J.defaultLineGap,y],variant:"checkbox"})})))});const Rs=H("fieldset"),_s=H("legend");o.forwardRef(function(e,t){const{children:n,label:r,description:l,errorMessage:i,groupName:c,onChange:f,selectedValue:h,style:p,testId:b}=e,x=o.Children.toArray(n).filter(Boolean);return o.createElement(Rs,{"data-testid":b,style:J.fieldset,ref:t},o.createElement(_e,{style:p},r&&o.createElement(_s,{style:J.legend},o.createElement(xt,null,r)),l&&o.createElement(we,{style:J.description},l),i&&o.createElement(we,{style:J.error},i),(r||l||i)&&o.createElement(de,{size:m.small_12}),x.map((C,I)=>{const{style:u,value:y}=C.props,S=h===y;return o.cloneElement(C,{checked:S,error:!!i,groupName:c,id:`${c}-${y}`,key:y,onChange:()=>f(y),style:[I>0&&J.defaultLineGap,u],variant:"radio"})})))});const Fs=["id","type","value","name","disabled","onKeyDown","placeholder","style","testId","readOnly","autoFocus","autoComplete","forwardedRef","light","onFocus","onBlur","onValidate","validate","onChange","required"],Ts="This field is required.",zs=H("input");class or extends o.Component{constructor(e){super(e),this.state={error:null},this.maybeValidate=t=>{const{validate:n,onValidate:r,required:l}=this.props;if(n){const i=n(t)||null;this.setState({error:i},()=>{r&&r(i)})}else if(l){const c=t?null:typeof l=="string"?l:Ts;this.setState({error:c},()=>{r&&r(c)})}},this.handleChange=t=>{const{onChange:n}=this.props,r=t.target.value;this.maybeValidate(r),n(r)},this.handleFocus=t=>{const{onFocus:n}=this.props;n&&n(t)},this.handleBlur=t=>{const{onBlur:n}=this.props;n&&n(t)},this.getStyles=()=>{const{disabled:t,light:n}=this.props,{error:r}=this.state,l=[oe.input,F.LabelMedium],i=[oe.default,!t&&oe.defaultFocus,t&&oe.disabled,!!r&&oe.error],c=[oe.light,!t&&oe.lightFocus,t&&oe.lightDisabled,!!r&&oe.lightError];return[...l,...n?c:i]},e.validate&&e.value!==""&&(this.state.error=e.validate(e.value)||null)}componentDidMount(){this.props.value!==""&&this.maybeValidate(this.props.value)}render(){const e=this.props,{id:t,type:n,value:r,name:l,disabled:i,onKeyDown:c,placeholder:f,style:h,testId:p,readOnly:b,autoFocus:x,autoComplete:C,forwardedRef:I}=e,u=g(e,Fs);return o.createElement(Ze,{id:t,scope:"text-field"},y=>o.createElement(zs,d({style:[this.getStyles(),h],id:y,type:n,placeholder:f,value:r,name:l,disabled:i,onChange:this.handleChange,onKeyDown:c,onFocus:this.handleFocus,onBlur:this.handleBlur,"data-testid":p,readOnly:b,autoFocus:x,autoComplete:C,ref:I},u,{"aria-invalid":this.state.error?"true":"false"})))}}or.defaultProps={type:"text",disabled:!1,light:!1};const oe=v.StyleSheet.create({input:{width:"100%",height:40,borderRadius:X.radius.medium_4,boxSizing:"border-box",paddingLeft:m.medium_16,margin:0},default:{background:a.white,border:`1px solid ${a.offBlack50}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},defaultFocus:{":focus-visible":{borderColor:a.blue,outline:`1px solid ${a.blue}`,outlineOffset:0}},error:{background:a.fadedRed8,border:`1px solid ${a.red}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red}},disabled:{background:a.offWhite,border:`1px solid ${a.offBlack16}`,color:a.offBlack64,"::placeholder":{color:a.offBlack64},cursor:"not-allowed",":focus-visible":{outline:"none",boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},light:{background:a.white,border:`1px solid ${a.offBlack16}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},lightFocus:{":focus-visible":{outline:`1px solid ${a.blue}`,outlineOffset:0,borderColor:a.blue,boxShadow:`0px 0px 0px 2px ${a.blue}, 0px 0px 0px 3px ${a.white}`}},lightDisabled:{backgroundColor:"transparent",border:`1px solid ${a.white32}`,color:a.white64,"::placeholder":{color:a.white64},cursor:"not-allowed",":focus-visible":{borderColor:ee(a.white32,a.blue),outline:"none",boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},lightError:{background:a.fadedRed8,border:`1px solid ${a.red}`,boxShadow:`0px 0px 0px 1px ${a.red}, 0px 0px 0px 2px ${a.white}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red,boxShadow:`0px 0px 0px 2px ${a.red}, 0px 0px 0px 3px ${a.white}`}}});var lr=o.forwardRef((s,e)=>o.createElement(or,d({},s,{forwardedRef:e})));const Ps=H("span");class Os extends o.Component{renderLabel(){const{label:e,id:t,required:n,testId:r,light:l}=this.props,i=o.createElement(Ps,{style:l?he.lightRequired:he.required,"aria-hidden":!0}," ","*");return o.createElement(o.Fragment,null,o.createElement(xt,{style:l?he.lightLabel:he.label,tag:"label",htmlFor:t&&`${t}-field`,testId:r&&`${r}-label`},e,n&&i),o.createElement(de,{size:m.xxxSmall_4}))}maybeRenderDescription(){const{description:e,testId:t,light:n}=this.props;return e?o.createElement(o.Fragment,null,o.createElement(we,{style:n?he.lightDescription:he.description,testId:t&&`${t}-description`},e),o.createElement(de,{size:m.xxxSmall_4})):null}maybeRenderError(){const{error:e,id:t,testId:n,light:r}=this.props;return e?o.createElement(o.Fragment,null,o.createElement(de,{size:m.small_12}),o.createElement(we,{style:r?he.lightError:he.error,role:"alert",id:t&&`${t}-error`,testId:n&&`${n}-error`},e)):null}render(){const{field:e,style:t}=this.props;return o.createElement(_e,{style:t},this.renderLabel(),this.maybeRenderDescription(),o.createElement(de,{size:m.xSmall_8}),e,this.maybeRenderError())}}const he=v.StyleSheet.create({label:{color:a.offBlack},lightLabel:{color:a.white},description:{color:a.offBlack64},lightDescription:{color:a.white64},error:{color:a.red},lightError:{color:a.fadedRed},required:{color:a.red},lightRequired:{color:a.fadedRed}}),Bs=["id","type","label","description","value","disabled","required","validate","onChange","onKeyDown","placeholder","light","style","testId","readOnly","autoComplete","forwardedRef","ariaDescribedby","onValidate","onFocus","onBlur"];class sr extends o.Component{constructor(e){super(e),this.handleValidate=t=>{const{onValidate:n}=this.props;this.setState({error:t},()=>{n&&n(t)})},this.handleFocus=t=>{const{onFocus:n}=this.props;this.setState({focused:!0},()=>{n&&n(t)})},this.handleBlur=t=>{const{onBlur:n}=this.props;this.setState({focused:!1},()=>{n&&n(t)})},this.state={error:null,focused:!1}}render(){const e=this.props,{id:t,type:n,label:r,description:l,value:i,disabled:c,required:f,validate:h,onChange:p,onKeyDown:b,placeholder:x,light:C,style:I,testId:u,readOnly:y,autoComplete:S,forwardedRef:$,ariaDescribedby:w}=e,k=g(e,Bs);return o.createElement(Ze,{id:t,scope:"labeled-text-field"},E=>o.createElement(Os,{id:E,testId:u,style:I,light:C,field:o.createElement(lr,d({id:`${E}-field`,"aria-describedby":w||`${E}-error`,"aria-required":f?"true":"false",required:f,testId:u&&`${u}-field`,type:n,value:i,placeholder:x,disabled:c,validate:h,onValidate:this.handleValidate,onChange:p,onKeyDown:b,onFocus:this.handleFocus,onBlur:this.handleBlur,light:C,readOnly:y,autoComplete:S,ref:$},k)),label:r,description:l,required:!!f,error:!this.state.focused&&this.state.error||""}))}}sr.defaultProps={type:"text",disabled:!1,light:!1};o.forwardRef((s,e)=>o.createElement(sr,d({},s,{forwardedRef:e})));const Ls=["onChange","value","placeholder","disabled","id","testId","style","readOnly","autoComplete","name","className","autoFocus","rows","spellCheck","wrap","minLength","maxLength","onClick","onKeyDown","onKeyUp","onFocus","onBlur","validate","onValidate","required","resizeType","light","rootStyle"],Ds="This field is required.",Ns=H("textarea");o.forwardRef(function(e,t){const{onChange:n,value:r,placeholder:l,disabled:i,id:c,testId:f,style:h,readOnly:p,autoComplete:b,name:x,className:C,autoFocus:I,rows:u,spellCheck:y,wrap:S,minLength:$,maxLength:w,onClick:k,onKeyDown:E,onKeyUp:R,onFocus:_,onBlur:j,validate:U,onValidate:te,required:ne,resizeType:Ye,light:It,rootStyle:wt}=e,$t=g(e,Ls),[ze,Pe]=o.useState(null),Oe=Fl("text-area"),Et=c??Oe.get("id"),Qe=re=>{const M=re.target.value;n(M),Je(M)},Je=re=>{if(U){const M=U(re)||null;Pe(M),te&&te(M)}else if(ne){const ge=re?null:typeof ne=="string"?ne:Ds;Pe(ge),te&&te(ge)}};Tl(()=>{r!==""&&Je(r)});const kt=()=>{const re=[le.textarea,F.LabelMedium,Ye&&Hs[Ye]],M=[le.default,!i&&le.defaultFocus,i&&le.disabled,!!ze&&le.error],ge=[le.light,!i&&le.lightFocus,i&&le.lightDisabled,!!ze&&le.lightError];return[...re,...It?ge:M]};return o.createElement(_e,{style:[{width:"100%"},wt]},o.createElement(Ns,d({id:Et,"data-testid":f,ref:t,className:C,style:[kt(),h],value:r,onChange:Qe,placeholder:l,"aria-disabled":i,readOnly:p||i,autoComplete:b,name:x,autoFocus:I,rows:u,spellCheck:y,wrap:S,minLength:$,maxLength:w,onClick:i?void 0:k,onKeyDown:i?void 0:E,onKeyUp:i?void 0:R,onFocus:_,onBlur:j,required:!!ne},$t,{"aria-invalid":!!ze})))});const pn=10,le=v.StyleSheet.create({textarea:{borderRadius:X.radius.medium_4,boxSizing:"border-box",padding:`${pn}px ${m.medium_16}px`,minHeight:`${pn*2+br.lineHeight.medium+2*X.width.hairline}px`},default:{background:a.white,border:`1px solid ${a.offBlack50}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},defaultFocus:{":focus-visible":{borderColor:a.blue,outline:`1px solid ${a.blue}`,outlineOffset:0}},disabled:{background:a.offWhite,border:`1px solid ${a.offBlack16}`,color:a.offBlack64,"::placeholder":{color:a.offBlack64},cursor:"not-allowed",":focus-visible":{outline:"none",boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},error:{background:a.fadedRed8,border:`1px solid ${a.red}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red}},light:{background:a.white,border:`1px solid ${a.offBlack16}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},lightFocus:{":focus-visible":{outline:`1px solid ${a.blue}`,outlineOffset:0,borderColor:a.blue,boxShadow:`0px 0px 0px 2px ${a.blue}, 0px 0px 0px 3px ${a.white}`}},lightDisabled:{backgroundColor:"transparent",border:`1px solid ${a.white32}`,color:a.white64,"::placeholder":{color:a.white64},cursor:"not-allowed",":focus-visible":{borderColor:ee(a.white32,a.blue),outline:"none",boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},lightError:{background:a.fadedRed8,border:`1px solid ${a.red}`,boxShadow:`0px 0px 0px 1px ${a.red}, 0px 0px 0px 2px ${a.white}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red,boxShadow:`0px 0px 0px 2px ${a.red}, 0px 0px 0px 3px ${a.white}`}}}),Hs=v.StyleSheet.create({both:{resize:"both"},none:{resize:"none"},horizontal:{resize:"horizontal"},vertical:{resize:"vertical"}}),Ms=s=>({small:16,medium:24,large:48,xlarge:96})[s],Ws=["color","icon","size","style","testId","className"],As=Te("span"),ir=o.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:l="small",style:i,testId:c,className:f}=e,h=g(e,Ws),p=Ms(l),b=`${f??""}`,x=qs(n,p);return o.createElement(As,d({},h,{className:b,style:[Kt.svg,x.icon,{maskImage:`url(${r})`},i],"data-testid":c,ref:t}))}),mn={},qs=(s,e)=>{const t=`${s}-${e}`;if(Kt[t])return Kt[t];const n={icon:{backgroundColor:s,width:e,height:e}};return mn[t]=v.StyleSheet.create(n),mn[t]},Kt=v.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});ir.displayName="PhosphorIcon";const Vs={clearSearch:"Clear search"},Us=["clearAriaLabel","autoFocus","disabled","light","id","value","placeholder","style","testId","onClick","onChange","onFocus","onBlur"],Ks=o.forwardRef(function(e,t){const{clearAriaLabel:n=Vs.clearSearch,autoFocus:r,disabled:l=!1,light:i=!1,id:c,value:f,placeholder:h,style:p,testId:b,onClick:x,onChange:C,onFocus:I,onBlur:u}=e,y=g(e,Us),S=o.useRef(null),$=()=>{var k;C(""),S==null||(k=S.current)==null||k.focus()},w=()=>f.length?o.createElement(vr,{icon:Ir,kind:"tertiary",onClick:$,style:lt.dismissIcon,"aria-label":n}):null;return o.createElement(Un,{id:c,scope:"search-field"},k=>o.createElement(Zo,{onClick:x,style:[lt.inputContainer,p]},o.createElement(ir,{icon:Ho,size:"medium",color:a.offBlack64,style:lt.searchIcon,"aria-hidden":"true"}),o.createElement(lr,d({id:`${k}-field`,type:"text",autoFocus:r,disabled:l,light:i,onChange:C,onFocus:I,onBlur:u,placeholder:h,ref:E=>{t&&(t.current=E),S.current=E},value:f,style:[lt.inputStyleReset,T.LabelMedium],testId:b},y)),w()))}),lt=v.StyleSheet.create({inputContainer:{boxSizing:"border-box",flexDirection:"row",borderRadius:m.xxxSmall_4,alignItems:"center",height:40},searchIcon:{marginLeft:m.xSmall_8,marginRight:m.xSmall_8,position:"absolute"},dismissIcon:{margin:0,position:"absolute",right:0,":hover":{border:"none"}},inputStyleReset:{display:"flex",flex:1,"::placeholder":{color:a.offBlack64},width:"100%",color:"inherit",paddingLeft:m.large_24+m.medium_16,paddingRight:m.large_24+m.medium_16}});function jt(){return jt=Object.assign||function(s){for(var e=1;e=e?s.call(null):r.id=requestAnimationFrame(n)}var r={id:requestAnimationFrame(n)};return r}var $e=null;function xn(s){if(s===void 0&&(s=!1),$e===null||s){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var n=document.createElement("div"),r=n.style;return r.width="100px",r.height="100px",e.appendChild(n),document.body.appendChild(e),e.scrollLeft>0?$e="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?$e="negative":$e="positive-ascending"),document.body.removeChild(e),$e}return $e}var Qs=150,Js=function(e,t){return e};function ei(s){var e,t=s.getItemOffset,n=s.getEstimatedTotalSize,r=s.getItemSize,l=s.getOffsetForIndexAndAlignment,i=s.getStartIndexForOffset,c=s.getStopIndexForStartIndex,f=s.initInstanceProps,h=s.shouldResetStyleCacheOnItemSizeChange,p=s.validateProps;return e=function(b){js(x,b);function x(I){var u;return u=b.call(this,I)||this,u._instanceProps=f(u.props,gn(u)),u._outerRef=void 0,u._resetIsScrollingTimeoutId=null,u.state={instance:gn(u),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof u.props.initialScrollOffset=="number"?u.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},u._callOnItemsRendered=void 0,u._callOnItemsRendered=Lt(function(y,S,$,w){return u.props.onItemsRendered({overscanStartIndex:y,overscanStopIndex:S,visibleStartIndex:$,visibleStopIndex:w})}),u._callOnScroll=void 0,u._callOnScroll=Lt(function(y,S,$){return u.props.onScroll({scrollDirection:y,scrollOffset:S,scrollUpdateWasRequested:$})}),u._getItemStyle=void 0,u._getItemStyle=function(y){var S=u.props,$=S.direction,w=S.itemSize,k=S.layout,E=u._getItemStyleCache(h&&w,h&&k,h&&$),R;if(E.hasOwnProperty(y))R=E[y];else{var _=t(u.props,y,u._instanceProps),j=r(u.props,y,u._instanceProps),U=$==="horizontal"||k==="horizontal",te=$==="rtl",ne=U?_:0;E[y]=R={position:"absolute",left:te?void 0:ne,right:te?ne:void 0,top:U?0:_,height:U?"100%":j,width:U?j:"100%"}}return R},u._getItemStyleCache=void 0,u._getItemStyleCache=Lt(function(y,S,$){return{}}),u._onScrollHorizontal=function(y){var S=y.currentTarget,$=S.clientWidth,w=S.scrollLeft,k=S.scrollWidth;u.setState(function(E){if(E.scrollOffset===w)return null;var R=u.props.direction,_=w;if(R==="rtl")switch(xn()){case"negative":_=-w;break;case"positive-descending":_=k-$-w;break}return _=Math.max(0,Math.min(_,k-$)),{isScrolling:!0,scrollDirection:E.scrollOffset0)for(var M=Je;M<=kt;M++)re.push(o.createElement(y,{data:j,key:te(M,j),index:M,isScrolling:$t?Pe:void 0,style:this._getItemStyle(M)}));var ge=n(this.props,this._instanceProps);return o.createElement(Ye||It||"div",{className:S,onScroll:Et,ref:this._outerRefSetter,style:jt({position:"relative",height:w,width:ze,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:$},wt)},o.createElement(E||R||"div",{children:re,ref:k,style:{height:Oe?"100%":ge,pointerEvents:Pe?"none":void 0,width:Oe?ge:"100%"}}))},C._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var u=this.props.itemCount;if(u>0){var y=this._getRangeToRender(),S=y[0],$=y[1],w=y[2],k=y[3];this._callOnItemsRendered(S,$,w,k)}}if(typeof this.props.onScroll=="function"){var E=this.state,R=E.scrollDirection,_=E.scrollOffset,j=E.scrollUpdateWasRequested;this._callOnScroll(R,_,j)}},C._getRangeToRender=function(){var u=this.props,y=u.itemCount,S=u.overscanCount,$=this.state,w=$.isScrolling,k=$.scrollDirection,E=$.scrollOffset;if(y===0)return[0,0,0,0];var R=i(this.props,E,this._instanceProps),_=c(this.props,R,E,this._instanceProps),j=!w||k==="backward"?Math.max(1,S):1,U=!w||k==="forward"?Math.max(1,S):1;return[Math.max(0,R-j),Math.max(0,Math.min(y-1,_+U)),R,_]},x}(o.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var ti=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ni=50,Ee=function(e,t,n){var r=e,l=r.itemSize,i=n.itemMetadataMap,c=n.lastMeasuredIndex;if(t>c){var f=0;if(c>=0){var h=i[c];f=h.offset+h.size}for(var p=c+1;p<=t;p++){var b=l(p);i[p]={offset:f,size:b},f+=b}n.lastMeasuredIndex=t}return i[t]},ri=function(e,t,n){var r=t.itemMetadataMap,l=t.lastMeasuredIndex,i=l>0?r[l].offset:0;return i>=n?ar(e,t,l,0,n):oi(e,t,Math.max(0,l),n)},ar=function(e,t,n,r,l){for(;r<=n;){var i=r+Math.floor((n-r)/2),c=Ee(e,i,t).offset;if(c===l)return i;cl&&(n=i-1)}return r>0?r-1:0},oi=function(e,t,n,r){for(var l=e.itemCount,i=1;n=n&&(i=n-1),i>=0){var f=r[i];c=f.offset+f.size}var h=n-i-1,p=h*l;return c+p},li=ei({getItemOffset:function(e,t,n){return Ee(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Cn,getOffsetForIndexAndAlignment:function(e,t,n,r,l){var i=e.direction,c=e.height,f=e.layout,h=e.width,p=i==="horizontal"||f==="horizontal",b=p?h:c,x=Ee(e,t,l),C=Cn(e,l),I=Math.max(0,Math.min(C-b,x.offset)),u=Math.max(0,x.offset-b+x.size);switch(n==="smart"&&(r>=u-b&&r<=I+b?n="auto":n="center"),n){case"start":return I;case"end":return u;case"center":return Math.round(u+(I-u)/2);case"auto":default:return r>=u&&r<=I?r:r`Select all (${s})`,noneSelected:"0 items",someSelected:s=>s===1?"1 item":`${s} items`,allSelected:"All items"},{blue:si,white:vn,offBlack:ii}=a;class Fe extends o.Component{static isClassOf(e){return e&&e.type&&e.type.__IS_ACTION_ITEM__}render(){const{disabled:e,horizontalRule:t,href:n,target:r,indent:l,label:i,lang:c,leftAccessory:f,rightAccessory:h,onClick:p,role:b,style:x,testId:C}=this.props,I=[He.wrapper,x],u=typeof i=="string"?o.createElement(bt,{lang:c,style:He.label},i):o.cloneElement(i,d({lang:c,style:He.label},i.props));return o.createElement(yo,{disabled:e,horizontalRule:t,rootStyle:I,leftAccessory:f,rightAccessory:h,style:[He.shared,l&&He.indent],role:b,testId:C,title:u,href:n,target:r,onClick:p})}}Fe.defaultProps={disabled:!1,horizontalRule:"none",indent:!1,role:"menuitem"};Fe.__IS_ACTION_ITEM__=!0;const He=v.StyleSheet.create({wrapper:{minHeight:me,touchAction:"manipulation",":focus":{borderRadius:m.xxxSmall_4,outline:`${m.xxxxSmall_2}px solid ${a.blue}`,outlineOffset:-m.xxxxSmall_2},":hover[aria-disabled=false]":{color:vn,background:si},"@media not (hover: hover)":{":hover[aria-disabled=false]":{color:vn,background:ii}},":active[aria-disabled=false]":{color:a.fadedBlue,background:a.activeBlue}},shared:{minHeight:me,height:me},label:{whiteSpace:"nowrap",userSelect:"none"},indent:{paddingLeft:m.medium_16*2}}),ai=function(e){const{selected:t}=e;return o.createElement(St,{icon:Gt,size:"small",style:[In.bounds,!t&&In.hide]})},In=v.StyleSheet.create({bounds:{alignSelf:"center",height:m.medium_16,minHeight:m.medium_16,minWidth:m.medium_16},hide:{visibility:"hidden"}}),{offBlack16:di,offBlack50:ci,offWhite:ui}=a,hi=function(e){const{disabled:t,selected:n}=e;return o.createElement(Ce,{className:"checkbox",style:[st.checkbox,n&&!t&&st.noBorder,t&&st.disabledCheckbox]},n&&o.createElement(St,{icon:Gt,size:"small",className:"check",style:[{width:m.small_12,height:m.small_12,margin:m.xxxxSmall_2},t&&n&&st.disabledCheckFormatting]}))},st=v.StyleSheet.create({checkbox:{alignSelf:"center",minHeight:m.medium_16,minWidth:m.medium_16,height:m.medium_16,borderRadius:3,borderWidth:1,borderStyle:"solid",borderColor:ci},noBorder:{borderWidth:0},disabledCheckbox:{borderColor:di,backgroundColor:ui},disabledCheckFormatting:{position:"absolute",top:-1,left:-1}}),fi=["disabled","label","selected","testId","leftAccessory","horizontalRule","parentComponent","rightAccessory","style","subtitle1","subtitle2","value","onClick","onToggle","variant","role"],pi=yt("li");class ve extends o.Component{constructor(...e){super(...e),this.handleClick=()=>{const{onClick:t,onToggle:n,value:r}=this.props;n(r),t&&t()}}static isClassOf(e){return e&&e.type&&e.type.__IS_OPTION_ITEM__}getCheckComponent(){return this.props.variant==="check"?ai:hi}renderCell(){const e=this.props,{disabled:t,label:n,selected:r,testId:l,leftAccessory:i,horizontalRule:c,parentComponent:f,rightAccessory:h,style:p,subtitle1:b,subtitle2:x,role:C}=e,I=g(e,fi),u=this.getCheckComponent(),y=[fe.item,p];return o.createElement(So,d({disabled:t,horizontalRule:c,rootStyle:f==="listbox"?fe.listboxItem:y,style:fe.itemContainer,"aria-selected":f!=="listbox"&&r?"true":"false",role:f!=="listbox"?C:void 0,testId:l,leftAccessory:o.createElement(o.Fragment,null,i?o.createElement(Ce,{style:{flexDirection:"row"}},o.createElement(u,{disabled:t,selected:r}),o.createElement(de,{size:m.xSmall_8}),i):o.createElement(u,{disabled:t,selected:r})),rightAccessory:h,subtitle1:b?o.createElement(Qt,{className:"subtitle"},b):void 0,title:o.createElement(bt,{style:fe.label},n),subtitle2:x?o.createElement(Qt,{className:"subtitle"},x):void 0,onClick:f!=="listbox"?this.handleClick:void 0},I))}render(){const{disabled:e,focused:t,parentComponent:n,role:r,selected:l}=this.props;return n==="listbox"?o.createElement(pi,{onMouseDown:i=>{i.preventDefault()},onClick:this.handleClick,style:[fe.reset,fe.item,t&&fe.itemFocused,e&&fe.itemDisabled],role:r,"aria-selected":l?"true":"false","aria-disabled":e?"true":"false",id:this.props.id,tabIndex:-1},this.renderCell()):this.renderCell()}}ve.defaultProps={disabled:!1,focused:!1,horizontalRule:"none",onToggle:()=>{},role:"option",selected:!1};ve.__IS_OPTION_ITEM__=!0;const{blue:Dt,white:Me,offBlack:mi}=a,wn={borderRadius:m.xxxSmall_4,outline:`${m.xxxxSmall_2}px solid ${a.blue}`,outlineOffset:-m.xxxxSmall_2},fe=v.StyleSheet.create({reset:{margin:0,padding:0,border:0,background:"none",outline:"none",fontSize:"100%",verticalAlign:"baseline",textAlign:"left",textDecoration:"none",listStyle:"none",cursor:"pointer"},listboxItem:{backgroundColor:"transparent",color:"inherit"},item:{backgroundColor:a.white,minHeight:"unset",":focus":wn,":focus-visible":{overflow:"visible"},":hover[aria-disabled=false]":{color:Me,background:Dt},":active[aria-selected=false]":{},":hover[aria-disabled=true]":{cursor:"not-allowed"},":is([aria-disabled=true])":{color:a.offBlack32,":focus-visible":{outline:"none"}},"@media not (hover: hover)":{":hover[aria-disabled=false]":{color:Me,background:mi}},":active[aria-disabled=false]":{color:a.fadedBlue,background:a.activeBlue},":hover[aria-disabled=false] .checkbox":{background:Me},":hover[aria-disabled=false] .check":{color:Dt},":active[aria-disabled=false] .check":{color:a.activeBlue},":is([aria-selected=true]) .checkbox":{background:Dt},":is([aria-selected=true]) .check":{color:Me},":is([aria-disabled=false]) .subtitle":{color:a.offBlack64},":hover[aria-disabled=false] .subtitle":{color:a.offWhite},":active[aria-disabled=false] .subtitle":{color:ee(a.fadedBlue16,Me)}},itemFocused:wn,itemDisabled:{outlineColor:a.offBlack32},itemContainer:{minHeight:"unset",padding:`${m.xSmall_8+m.xxxxSmall_2}px ${m.xSmall_8}px`,paddingRight:m.medium_16,whiteSpace:"nowrap"},label:{whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},hide:{visibility:"hidden"}});class ue extends o.Component{static isClassOf(e){return e&&e.type&&e.type.__IS_SEPARATOR_ITEM__}render(){return o.createElement(Ce,{style:[gi.separator,this.props.style],"aria-hidden":"true"})}}ue.__IS_SEPARATOR_ITEM__=!0;const gi=v.StyleSheet.create({separator:{boxShadow:`0 -1px ${a.offBlack16}`,height:1,minHeight:1,marginTop:m.xxxSmall_4,marginBottom:m.xxxSmall_4}});class Ct extends o.Component{constructor(...e){super(...e),this.getTestIdFromProps=t=>t.testId||t["data-testid"]}renderAnchorChildren(e,t){const{disabled:n,testId:r,text:l,opened:i,"aria-controls":c,"aria-haspopup":f,id:h}=this.props,p=this.props.children(d({},e,{text:l,opened:i})),b=p.props,x=this.getTestIdFromProps(b);return o.cloneElement(p,d({},t,{disabled:n,"aria-controls":c,id:h,"aria-expanded":i?"true":"false","aria-haspopup":f,onClick:b.onClick?C=>{b.onClick(C),t.onClick(C)}:t.onClick,"data-testid":x||r}))}render(){return o.createElement(yr,{onClick:this.props.onClick,disabled:this.props.disabled,tabIndex:0},(e,t)=>this.renderAnchorChildren(e,t))}}Ct.defaultProps={disabled:!1};class yi extends o.Component{render(){const{data:e,index:t,style:n}=this.props,r=e[t];if(ue.isClassOf(r.component))return o.cloneElement(r.component,{style:n});{const{component:l,populatedProps:i,onClick:c,role:f,ref:h}=r;return o.cloneElement(l,d({style:n},i,{key:t,onClick:c,ref:r.focusable&&h,role:f}))}}}function $n(s,e=0){return s.slice(0,hr).reduce((t,n)=>ue.isClassOf(n.component)?t+fr:t+me,e)}class bi extends o.Component{constructor(e){super(e),this.getItemSize=t=>{const n=this.props.data[t];return ue.isClassOf(n.component)?fr:me},this.state={height:$n(e.data),width:e.width}}componentDidMount(){const{schedule:e}=this.props;e.animationFrame(()=>{this.setWidth()})}componentDidUpdate(e){const{data:t,listRef:n}=this.props;e.data.length!==t.length&&(this.setHeight(),n&&n.current&&n.current.resetAfterIndex(1))}setWidth(){const e=Ie.findDOMNode(this),t=e==null?void 0:e.parentElement;if(t){const n=t.getBoundingClientRect().width;this.setState({width:n})}}setHeight(){const e=$n(this.props.data);this.setState({height:e})}renderInitialItems(){const{data:e}=this.props,t=e.map(r=>r.component);return o.Children.toArray(t).filter(Boolean).sort((r,l)=>l.props.label&&r.props.label?l.props.label.length-r.props.label.length:-1).slice(0,hr).map(r=>o.cloneElement(r,{style:{visibility:"hidden"}}))}renderVirtualizedList(e,t){const{data:n,listRef:r}=this.props;return o.createElement(li,{height:t,itemCount:n.length,itemSize:this.getItemSize,itemData:n,style:{overflowX:"hidden"},width:e,overscanCount:5,ref:r},yi)}render(){const{width:e,height:t}=this.state;return e==null?this.renderInitialItems():this.renderVirtualizedList(e,t)}}var Si=kn(bi);function xi({state:s,options:e}){const t=$r(s,e),{y:n}=s.modifiersData.preventOverflow||{x:0,y:0},{height:r}=s.rects.popper,[l]=s.placement.split("-"),c=r-t[l==="top"?"top":"bottom"]-n;s.styles.popper=d({},s.styles.popper,{maxHeight:`${c}px`,"--popper-max-height":`${c}px`})}const Ci={name:"maxHeight",enabled:!0,phase:"main",options:{padding:me},requiresIfExists:["offset","preventOverflow","flip"],fn:xi},vi=[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,tether:!1}},Ci],Ii=function({children:e,alignment:t="left",onPopperElement:n,referenceElement:r}){const l=Er(r)||document.querySelector("body");return l?Ie.createPortal(o.createElement(wr,{innerRef:i=>{i&&n&&n(i)},referenceElement:r,strategy:"fixed",placement:t==="left"?"bottom-start":"bottom-end",modifiers:vi},({placement:i,ref:c,style:f,hasPopperEscaped:h,isReferenceHidden:p})=>{const b=!!(h||p);return o.createElement("div",{ref:c,style:f,"data-testid":"dropdown-popper","data-placement":i},e(b))}),l):null};function wi(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function $i(s,e){let t;return function(...r){const l=()=>{clearTimeout(t),s(...r)};clearTimeout(t),t=setTimeout(l,e)}}function En(s){return typeof s=="string"}function Ae(s){return En(s.label)?s.label:En(s.labelAsText)?s.labelAsText:""}const Ei=125,ki=yt("span");class vt extends o.Component{static sameItemsFocusable(e,t){if(e.length!==t.length)return!1;for(let n=0;n{const{open:n,onOpenChanged:r}=this.props,l=t.target,i=Ie.findDOMNode(this);n&&i&&!i.contains(l)&&this.popperElement&&!this.popperElement.contains(l)&&r(!1)},this.handleKeyDown=t=>{const{enableTypeAhead:n,onOpenChanged:r,open:l,searchText:i}=this.props,c=t.which||t.keyCode;if(n&&wi(t.key)&&(t.stopPropagation(),this.textSuggestion+=t.key,this.handleKeyDownDebounced(this.textSuggestion)),!l){if(c===ye.down){t.preventDefault(),r(!0);return}return}switch(c){case ye.tab:if(this.isSearchFieldFocused()&&i)return;this.restoreTabOrder(),r(!1);return;case ye.space:if(this.isSearchFieldFocused())return;t.preventDefault();return;case ye.up:t.preventDefault(),this.focusPreviousItem();return;case ye.down:t.preventDefault(),this.focusNextItem();return}},this.handleKeyUp=t=>{const{onOpenChanged:n,open:r}=this.props;switch(t.which||t.keyCode){case ye.space:if(this.isSearchFieldFocused())return;t.preventDefault();return;case ye.escape:r&&(t.stopPropagation(),this.restoreTabOrder(),n(!1));return}},this.handleKeyDownDebounceResult=t=>{const n=this.props.items.filter(r=>r.focusable).findIndex(({component:r})=>{if(ue.isClassOf(r))return!1;if(ve.isClassOf(r)){const l=r.props;return Ae(l).toLowerCase().startsWith(t.toLowerCase())}return!1});if(n>=0){const r=!this.props.open;r&&this.props.onOpenChanged(!0),this.focusedIndex=n,this.scheduleToFocusCurrentItem(l=>{this.props.selectionType==="single"&&r&&l&&(l.click(),this.props.onOpenChanged(!1))})}this.textSuggestion=""},this.handleClickFocus=t=>{this.itemsClicked=!0,this.focusedIndex=t,this.focusedOriginalIndex=this.state.itemRefs[this.focusedIndex].originalIndex},this.handleDropdownMouseUp=t=>{t.nativeEvent.stopImmediatePropagation?t.nativeEvent.stopImmediatePropagation():t.stopPropagation()},this.handleItemClick=(t,n)=>{this.handleClickFocus(t),n.component.props.onClick&&n.component.props.onClick(),n.populatedProps.onClick&&n.populatedProps.onClick()},this.handleSearchTextChanged=t=>{const{onSearchTextChanged:n}=this.props;n&&n(t)},this.resetFocusedIndex(),this.state={prevItems:this.props.items,itemRefs:[],sameItemsFocusable:!1,labels:d({noResults:K.noResults,someResults:K.someSelected},e.labels)},this.virtualizedListRef=o.createRef(),this.handleKeyDownDebounced=$i(this.handleKeyDownDebounceResult,500),this.textSuggestion=""}componentDidMount(){this.updateEventListeners(),this.maybeFocusInitialItem()}componentDidUpdate(e){const{open:t,searchText:n}=this.props;if(e.open!==t)this.updateEventListeners(),this.maybeFocusInitialItem();else if(t){const{itemRefs:r,sameItemsFocusable:l}=this.state;if(l||e.searchText!==n)return;{const i=r.findIndex(c=>c.originalIndex===this.focusedOriginalIndex);i===-1?(this.focusedIndex=0,this.itemsClicked=!1,this.scheduleToFocusCurrentItem()):this.focusedIndex=i}this.props.labels!==e.labels&&this.setState({labels:d({},this.state.labels,this.props.labels)})}}componentWillUnmount(){this.removeEventListeners()}resetFocusedIndex(){const{initialFocusedIndex:e}=this.props;if(typeof e<"u")this.focusedIndex=e;else{if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=0}}maybeFocusInitialItem(){const{autoFocus:e,open:t}=this.props;e&&(t?(this.resetFocusedIndex(),this.scheduleToFocusCurrentItem()):t||(this.itemsClicked=!1))}updateEventListeners(){this.props.open?this.addEventListeners():this.removeEventListeners()}addEventListeners(){document.addEventListener("mouseup",this.handleInteract),document.addEventListener("touchend",this.handleInteract)}removeEventListeners(){document.removeEventListener("mouseup",this.handleInteract),document.removeEventListener("touchend",this.handleInteract)}scheduleToFocusCurrentItem(e){this.shouldVirtualizeList()?this.props.schedule.animationFrame(()=>{this.focusCurrentItem(e)}):this.focusCurrentItem(e)}focusCurrentItem(e){const t=this.state.itemRefs[this.focusedIndex];if(t){this.virtualizedListRef.current&&this.virtualizedListRef.current.scrollToItem(t.originalIndex);const n=Ie.findDOMNode(t.ref.current);n&&(n.focus(),this.focusedOriginalIndex=t.originalIndex,e&&e(n))}}focusSearchField(){this.searchFieldRef.current&&this.searchFieldRef.current.focus()}hasSearchField(){return!!this.props.isFilterable}isSearchFieldFocused(){return this.hasSearchField()&&document.activeElement===this.searchFieldRef.current}focusPreviousItem(){if(this.focusedIndex===0||this.isSearchFieldFocused()&&!this.props.enableTypeAhead){if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=this.state.itemRefs.length-1}else this.focusedIndex-=1;this.scheduleToFocusCurrentItem()}focusNextItem(){if(this.focusedIndex===this.state.itemRefs.length-1||this.isSearchFieldFocused()&&!this.props.enableTypeAhead){if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=0}else this.focusedIndex+=1;this.scheduleToFocusCurrentItem()}restoreTabOrder(){this.props.openerElement&&this.props.openerElement.focus()}getItemRole(){const{role:e}=this.props;switch(e){case"listbox":return"option";case"menu":return"menuitem";default:throw new Error(`Expected "listbox" or "menu" for role, but receieved "${e}" instead.`)}}maybeRenderNoResults(){const{items:e,labels:{noResults:t}}=this.props;return e.length===0?o.createElement(bt,{style:pe.noResult,testId:"dropdown-core-no-results"},t):null}shouldVirtualizeList(){return this.props.items.length>Ei}renderList(){let e=0;const t=this.getItemRole();return this.props.items.map((n,r)=>{if(ue.isClassOf(n.component))return n.component;const{component:l,focusable:i,populatedProps:c}=n;i&&(e+=1);const f=e-1,h=this.state.itemRefs[f]?this.state.itemRefs[f].ref:null;return o.cloneElement(l,d({},c,{key:r,onClick:()=>{this.handleItemClick(f,n)},ref:i?h:null,role:c.role||t}))})}parseVirtualizedItems(){let e=0;const t=this.getItemRole();return this.props.items.map((n,r)=>{const{populatedProps:l}=n;!ue.isClassOf(n.component)&&n.focusable&&(e+=1);const i=e-1;return d({},n,{role:l.role||t,ref:n.focusable&&this.state.itemRefs[i]?this.state.itemRefs[i].ref:null,onClick:()=>{this.handleItemClick(i,n)}})})}renderVirtualizedList(){const e=this.parseVirtualizedItems();return o.createElement(Si,{data:e,listRef:this.virtualizedListRef})}renderSearchField(){const{searchText:e}=this.props,{labels:t}=this.state;return o.createElement(Ks,{clearAriaLabel:t.clearSearch,onChange:this.handleSearchTextChanged,placeholder:t.filter,ref:this.searchFieldRef,style:pe.searchInputStyle,value:e||""})}renderDropdownMenu(e,t){const{"aria-invalid":n,"aria-required":r,dropdownStyle:l,isFilterable:i,light:c,openerElement:f,role:h,id:p}=this.props,b=f&&window.getComputedStyle(f),x=b?b.getPropertyValue("width"):0;return o.createElement(Ce,{onMouseUp:this.handleDropdownMouseUp,style:[pe.dropdown,c&&pe.light,t&&pe.hidden,l],testId:"dropdown-core-container"},i&&this.renderSearchField(),o.createElement(Ce,{id:p,role:h,style:[pe.listboxOrMenu,{minWidth:x}],"aria-invalid":h==="listbox"?n:void 0,"aria-required":h==="listbox"?r:void 0},e),this.maybeRenderNoResults())}renderDropdown(){const{alignment:e,openerElement:t}=this.props,n=this.shouldVirtualizeList()?this.renderVirtualizedList():this.renderList();return o.createElement(Ii,{alignment:e,onPopperElement:r=>{this.popperElement=r},referenceElement:t},r=>this.renderDropdownMenu(n,r))}renderLiveRegion(){const{items:e,open:t}=this.props,{labels:n}=this.state,r=e.length;return o.createElement(ki,{"aria-live":"polite","aria-atomic":"true","aria-relevant":"additions text",style:pe.srOnly,"data-testid":"dropdown-live-region"},t&&n.someResults(r))}render(){const{open:e,opener:t,style:n,className:r,disabled:l}=this.props;return o.createElement(Ce,{onKeyDown:l?void 0:this.handleKeyDown,onKeyUp:l?void 0:this.handleKeyUp,style:[pe.menuWrapper,n],className:r},this.renderLiveRegion(),t,e&&this.renderDropdown())}}vt.defaultProps={alignment:"left",autoFocus:!0,enableTypeAhead:!0,labels:{clearSearch:K.clearSearch,filter:K.filter,noResults:K.noResults,someResults:K.someSelected},light:!1,selectionType:"single"};const pe=v.StyleSheet.create({menuWrapper:{width:"fit-content"},dropdown:{backgroundColor:a.white,borderRadius:4,paddingTop:m.xxxSmall_4,paddingBottom:m.xxxSmall_4,border:`solid 1px ${a.offBlack16}`,boxShadow:`0px 8px 8px 0px ${Sr(a.offBlack,.1)}`,maxHeight:"var(--popper-max-height)"},light:{border:"none"},listboxOrMenu:{overflowY:"auto"},hidden:{pointerEvents:"none",visibility:"hidden"},noResult:{color:a.offBlack64,alignSelf:"center",marginTop:m.xxSmall_6},searchInputStyle:{margin:m.xSmall_8,marginTop:m.xxxSmall_4,minHeight:"auto",position:"sticky"},srOnly:{border:0,clip:"rect(0,0,0,0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}});var Zt=kn(vt);const Ri=["children","disabled","focused","hovered","pressed","waiting","testId","opened","aria-label"],_i=yt("button");class Fi extends o.Component{render(){const e=this.props,{children:t,disabled:n,focused:r,hovered:l,pressed:i,testId:c,opened:f,"aria-label":h}=e,p=g(e,Ri),b=a.blue,x=Ti(b),C=n,I=[Nt.shared,C&&Nt.disabled,x.default,C&&x.disabled,!C&&i&&x.active],u=o.createElement(xr,{style:Nt.text},t);return o.createElement(_i,d({"aria-expanded":f?"true":"false","aria-haspopup":"menu","aria-label":h,disabled:C,style:I,type:"button"},p,{"data-testid":c}),o.createElement(Ce,{style:!C&&(l||r)&&x.focus},u),o.createElement(de,{size:m.xxxSmall_4}),o.createElement(St,{size:"small",color:"currentColor",icon:dr,"aria-hidden":"true"}))}}const Nt=v.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:me,border:"none",borderRadius:m.xxxSmall_4,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{height:m.xLarge_32},text:{textAlign:"left",display:"inline-block",alignItems:"center",fontWeight:"bold",userSelect:"none",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"}}),it={},Ti=s=>{const e=s;if(it[e])return it[e];const{offBlack32:t}=a,n=a.activeBlue;let r={};return r={default:{background:"none",color:s},focus:{":after":{content:"''",position:"absolute",height:2,left:0,right:0,bottom:-1,background:"currentColor",borderRadius:2}},active:{color:n},disabled:{color:t,cursor:"default"}},it[e]=v.StyleSheet.create(r),it[e]},zi=["text","opened"];class Pi extends o.Component{constructor(...e){super(...e),this.openerElement=void 0,this.state={opened:!1},this.handleItemSelected=()=>{this.handleOpenChanged(!1),this.openerElement&&this.openerElement.focus()},this.handleOpenChanged=t=>{this.setState({opened:t}),this.props.onToggle&&this.props.onToggle(t)},this.handleOptionSelected=t=>{const{onChange:n,selectedValues:r}=this.props;if(!(!n||!r)){if(r.includes(t)){const l=r.indexOf(t),i=[...r.slice(0,l),...r.slice(l+1)];n(i)}else n([...r,t]);this.handleItemSelected()}},this.handleOpenerRef=t=>{this.openerElement=Ie.findDOMNode(t)},this.handleClick=t=>{this.handleOpenChanged(!this.state.opened)}}static getDerivedStateFromProps(e,t){return{opened:typeof e.opened=="boolean"?e.opened:t.opened}}getMenuItems(){const{children:e,selectedValues:t}=this.props,n=o.Children.toArray(e).filter(Boolean),r=n.some(l=>ve.isClassOf(l));return n.map(l=>{const{value:i,disabled:c}=l.props,f={component:l,focusable:Fe.isClassOf(l)||ve.isClassOf(l)?!c:!1,populatedProps:{}};if(Fe.isClassOf(l))return d({},f,{populatedProps:{indent:r,onClick:this.handleItemSelected}});if(ve.isClassOf(l)){const h=t?t.includes(i):!1;return d({},f,{populatedProps:{onToggle:this.handleOptionSelected,selected:h,variant:"check",role:"menuitemcheckbox","aria-checked":h,"aria-selected":void 0}})}else return f})}renderOpener(e,t){const{disabled:n,menuText:r,opener:l,testId:i,id:c}=this.props;return o.createElement(ke,{id:c,scope:"action-menu-opener"},f=>o.createElement(Ct,{id:f,"aria-controls":t,"aria-haspopup":"menu",onClick:this.handleClick,disabled:e===0||n,text:r,ref:this.handleOpenerRef,testId:l?void 0:i,opened:this.state.opened},l||(h=>{const{opened:p}=h,b=g(h,zi);return o.createElement(Fi,d({},b,{disabled:n,opened:!!p,testId:i}),r)})))}render(){const{alignment:e,dropdownStyle:t,style:n,className:r,dropdownId:l}=this.props,i=this.getMenuItems();return o.createElement(ke,{id:l,scope:"action-menu-dropdown"},c=>o.createElement(Zt,{id:c,role:"menu",style:n,className:r,opener:this.renderOpener(i.length,c),alignment:e,open:this.state.opened,items:i,openerElement:this.openerElement,onOpenChanged:this.handleOpenChanged,dropdownStyle:[Oi.menuTopSpace,t]}))}}Pi.defaultProps={alignment:"left",disabled:!1};const Oi=v.StyleSheet.create({caret:{marginLeft:4},opener:{whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},menuTopSpace:{top:-4}}),Bi=["children","disabled","error","id","isPlaceholder","light","open","testId","onOpenChanged"],Li=yt("button");class Yt extends o.Component{constructor(e){super(e),this.handleClick=t=>{const{open:n}=this.props;this.props.onOpenChanged(!n)},this.handleKeyDown=t=>{const n=t.key;(n==="Enter"||n===" ")&&(this.setState({pressed:!0}),t.preventDefault())},this.handleKeyUp=t=>{const n=t.key;(n==="Enter"||n===" ")&&(this.setState({pressed:!1}),this.handleClick(t))},this.state={pressed:!1}}render(){const e=this.props,{children:t,disabled:n,error:r,id:l,isPlaceholder:i,light:c,open:f,testId:h}=e,p=g(e,Bi),b=Di(c,i,r),x=c?n||r?"currentColor":a.white:n?a.offBlack32:a.offBlack64,C=[Ht.shared,b.default,n&&b.disabled,!n&&this.state.pressed&&b.pressed];return o.createElement(Li,d({},p,{"aria-disabled":n,"aria-expanded":f?"true":"false","aria-haspopup":"listbox","data-testid":h,id:l,style:C,type:"button",onClick:n?void 0:this.handleClick,onKeyDown:n?void 0:this.handleKeyDown,onKeyUp:n?void 0:this.handleKeyUp}),o.createElement(bt,{style:Ht.text},t||" "),o.createElement(St,{icon:dr,color:x,size:"small",style:Ht.caret,"aria-hidden":"true"}))}}Yt.defaultProps={disabled:!1,error:!1,light:!1,isPlaceholder:!1};const Ht=v.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"space-between",color:a.offBlack,height:me,paddingLeft:m.medium_16,paddingRight:m.small_12,borderWidth:0,borderRadius:X.radius.medium_4,borderStyle:"solid",outline:"none",textDecoration:"none",boxSizing:"border-box",whiteSpace:"nowrap",touchAction:"manipulation"},text:{marginRight:m.xSmall_8,whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},caret:{minWidth:16}}),at=m.medium_16-1,dt=m.small_12-1,ct={},Di=(s,e,t)=>{const n=`${s}-${e}-${t}`;if(ct[n])return ct[n];let r={};if(s){const l={borderColor:t?a.red:a.white,borderWidth:m.xxxxSmall_2,paddingLeft:at,paddingRight:dt},i={paddingLeft:at,paddingRight:dt,borderColor:t?a.red:a.fadedBlue,borderWidth:X.width.thin,color:t?a.offBlack64:e?ee(a.white32,a.blue):a.fadedBlue,backgroundColor:t?a.fadedRed:a.activeBlue};r={default:{background:t?a.fadedRed8:"transparent",color:t?a.offBlack64:e?a.white50:a.white,borderColor:t?a.red:a.white50,borderWidth:X.width.hairline,":hover:not([aria-disabled=true])":l,"@media not (hover: hover)":{":hover:not([aria-disabled=true])":{borderColor:t?a.red:a.white50,borderWidth:X.width.hairline,paddingLeft:m.medium_16,paddingRight:m.small_12}},":focus-visible:not([aria-disabled=true])":l,":active:not([aria-disabled=true])":i},disabled:{background:"transparent",borderColor:ee(a.white32,a.blue),color:ee(a.white32,a.blue),cursor:"not-allowed",":focus-visible":{boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},pressed:i}}else{const l={borderColor:t?a.red:a.blue,borderWidth:X.width.thin,paddingLeft:at,paddingRight:dt},i={background:t?a.fadedRed:a.fadedBlue,borderColor:t?a.red:a.activeBlue,borderWidth:X.width.thin,paddingLeft:at,paddingRight:dt};r={default:{background:t?a.fadedRed8:a.white,borderColor:t?a.red:a.offBlack50,borderWidth:X.width.hairline,color:e?a.offBlack64:a.offBlack,":hover:not([aria-disabled=true])":l,"@media not (hover: hover)":{":hover:not([aria-disabled=true])":{borderColor:t?a.red:a.offBlack50,borderWidth:X.width.hairline,paddingLeft:m.medium_16,paddingRight:m.small_12}},":focus-visible:not([aria-disabled=true])":l,":active:not([aria-disabled=true])":i},disabled:{background:a.offWhite,borderColor:a.offBlack16,color:a.offBlack64,cursor:"not-allowed",":focus-visible":{boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},pressed:i}}return ct[n]=v.StyleSheet.create(r),ct[n]},Ni=["children","error","id","light","opener","placeholder","selectedValue","testId","alignment","autoFocus","dropdownStyle","enableTypeAhead","isFilterable","labels","onChange","onToggle","opened","style","className","aria-invalid","aria-required"];class pr extends o.Component{constructor(e){super(e),this.selectedIndex=void 0,this.handleOpenChanged=t=>{this.setState({open:t,searchText:""}),this.props.onToggle&&this.props.onToggle(t)},this.handleToggle=t=>{t!==this.props.selectedValue&&this.props.onChange(t),this.state.open&&this.state.openerElement&&this.state.openerElement.focus(),this.setState({open:!1}),this.props.onToggle&&this.props.onToggle(!1)},this.mapOptionItemsToDropdownItems=t=>{let n=0;return this.selectedIndex=0,t.map(r=>{const{selectedValue:l}=this.props,{disabled:i,value:c}=r.props,f=l===c;return f&&(this.selectedIndex=n),i||(n+=1),{component:r,focusable:!i,populatedProps:{onToggle:this.handleToggle,selected:f,variant:"check"}}})},this.handleSearchTextChanged=t=>{this.setState({searchText:t})},this.handleOpenerRef=t=>{const n=Ie.findDOMNode(t);this.setState({openerElement:n})},this.handleClick=t=>{this.handleOpenChanged(!this.state.open)},this.selectedIndex=0,this.state={open:!1,searchText:""}}static getDerivedStateFromProps(e,t){return{open:e.disabled?!1:typeof e.opened=="boolean"?e.opened:t.open}}filterChildren(e){const{searchText:t}=this.state,n=t.toLowerCase();return e.filter(({props:r})=>!t||Ae(r).toLowerCase().indexOf(n)>-1)}getMenuItems(e){const{isFilterable:t}=this.props;return this.mapOptionItemsToDropdownItems(t?this.filterChildren(e):e)}renderOpener(e,t){const n=this.props,{children:r,error:l,id:i,light:c,opener:f,placeholder:h,selectedValue:p,testId:b}=n,x=g(n,Ni),I=o.Children.toArray(r).find(S=>S.props.value===p),u=I?Ae(I.props):h;return o.createElement(ke,{id:i,scope:"single-select-opener"},S=>f?o.createElement(Ct,{id:S,"aria-controls":t,"aria-haspopup":"listbox",onClick:this.handleClick,disabled:e,ref:this.handleOpenerRef,text:u,opened:this.state.open},f):o.createElement(Yt,d({},x,{"aria-controls":t,disabled:e,id:S,error:l,isPlaceholder:!I,light:c,onOpenChanged:this.handleOpenChanged,open:this.state.open,ref:this.handleOpenerRef,testId:b}),u))}render(){const{alignment:e,autoFocus:t,children:n,className:r,dropdownStyle:l,enableTypeAhead:i,isFilterable:c,labels:f,light:h,style:p,"aria-invalid":b,"aria-required":x,disabled:C,dropdownId:I}=this.props,{searchText:u}=this.state,y=o.Children.toArray(n).filter(Boolean),S=y.filter(k=>!k.props.disabled).length,$=this.getMenuItems(y),w=S===0||C;return o.createElement(ke,{id:I,scope:"single-select-dropdown"},k=>o.createElement(Zt,{id:k,role:"listbox",selectionType:"single",alignment:e,autoFocus:t,enableTypeAhead:i,dropdownStyle:[c&&ur,cr,l],initialFocusedIndex:this.selectedIndex,items:$,light:h,onOpenChanged:this.handleOpenChanged,open:this.state.open,opener:this.renderOpener(w,k),openerElement:this.state.openerElement,style:p,className:r,isFilterable:c,onSearchTextChanged:c?this.handleSearchTextChanged:void 0,searchText:c?u:"",labels:f,"aria-invalid":b,"aria-required":x,disabled:w}))}}pr.defaultProps={alignment:"left",autoFocus:!0,disabled:!1,enableTypeAhead:!0,error:!1,light:!1,labels:{clearSearch:K.clearSearch,filter:K.filter,noResults:K.noResults,someResults:K.someSelected}};const Hi=["id","light","opener","testId","alignment","dropdownStyle","implicitAllEnabled","isFilterable","labels","onChange","onToggle","opened","selectedValues","shortcuts","style","className","aria-invalid","aria-required"];class mr extends o.Component{constructor(e){super(e),this.labels=void 0,this.handleOpenChanged=t=>{this.setState({open:t,searchText:"",lastSelectedValues:this.props.selectedValues}),this.props.onToggle&&this.props.onToggle(t)},this.handleToggle=t=>{const{onChange:n,selectedValues:r}=this.props;if(r.includes(t)){const l=r.indexOf(t),i=[...r.slice(0,l),...r.slice(l+1)];n(i)}else n([...r,t])},this.handleSelectAll=()=>{const{children:t,onChange:n}=this.props,l=o.Children.toArray(t).filter(i=>!!i&&!i.props.disabled).map(i=>i.props.value);n(l)},this.handleSelectNone=()=>{const{onChange:t}=this.props;t([])},this.mapOptionItemToDropdownItem=t=>{const{selectedValues:n}=this.props,{disabled:r,value:l}=t.props;return{component:t,focusable:!r,populatedProps:{onToggle:this.handleToggle,selected:n.includes(l),variant:"checkbox"}}},this.handleOpenerRef=t=>{const n=Ie.findDOMNode(t);this.setState({openerElement:n})},this.handleSearchTextChanged=t=>{this.setState({searchText:t})},this.handleClick=t=>{this.handleOpenChanged(!this.state.open)},this.state={open:!1,searchText:"",lastSelectedValues:[],labels:d({},K,e.labels)},this.labels=d({},K,e.labels)}static getDerivedStateFromProps(e,t){return{open:e.disabled?!1:typeof e.opened=="boolean"?e.opened:t.open}}componentDidUpdate(e){this.props.labels!==e.labels&&this.setState({labels:d({},this.state.labels,this.props.labels)})}getMenuText(e){const{implicitAllEnabled:t,selectedValues:n}=this.props,{noneSelected:r,someSelected:l,allSelected:i}=this.state.labels,c=e.filter(h=>!h.props.disabled).length,f=t?i:r;switch(n.length){case 0:return f;case 1:const h=e.find(p=>p.props.value===n[0]);if(h){const p=Ae(h==null?void 0:h.props);return p||l(1)}return f;case c:return i;default:return l(n.length)}}getShortcuts(e){const{selectedValues:t,shortcuts:n}=this.props,{selectAllLabel:r,selectNoneLabel:l}=this.state.labels;if(n&&!this.state.searchText){const i=e===t.length,c={component:o.createElement(Fe,{disabled:i,label:r(e),indent:!0,onClick:this.handleSelectAll}),focusable:!i,populatedProps:{}},f=t.length===0,h={component:o.createElement(Fe,{disabled:f,label:l,indent:!0,onClick:this.handleSelectNone}),focusable:!f,populatedProps:{}},p={component:o.createElement(ue,{key:"shortcuts-separator"}),focusable:!1,populatedProps:{}};return[c,h,p]}else return[]}getMenuItems(e){const{isFilterable:t}=this.props;if(!t)return e.map(this.mapOptionItemToDropdownItem);const{searchText:n,lastSelectedValues:r}=this.state,l=n.toLowerCase(),i=e.filter(({props:p})=>!n||Ae(p).toLowerCase().indexOf(l)>-1),c=[],f=[];for(const p of i)r.includes(p.props.value)?c.push(p):f.push(p);const h=c.map(this.mapOptionItemToDropdownItem);return c.length&&f.length&&h.push({component:o.createElement(ue,{key:"selected-separator"}),focusable:!1,populatedProps:{}}),[...h,...f.map(this.mapOptionItemToDropdownItem)]}renderOpener(e,t,n){const r=this.props,{id:l,light:i,opener:c,testId:f}=r,h=g(r,Hi),{noneSelected:p}=this.state.labels,b=this.getMenuText(e);return o.createElement(ke,{id:l,scope:"multi-select-opener"},C=>c?o.createElement(Ct,{id:C,"aria-controls":n,"aria-haspopup":"listbox",onClick:this.handleClick,disabled:t,ref:this.handleOpenerRef,text:b,opened:this.state.open},c):o.createElement(Yt,d({},h,{disabled:t,id:C,"aria-controls":n,isPlaceholder:b===p,light:i,onOpenChanged:this.handleOpenChanged,open:this.state.open,ref:this.handleOpenerRef,testId:f}),b))}render(){const{alignment:e,light:t,style:n,className:r,dropdownStyle:l,children:i,isFilterable:c,"aria-invalid":f,"aria-required":h,disabled:p,dropdownId:b}=this.props,{open:x,searchText:C}=this.state,{clearSearch:I,filter:u,noResults:y,someSelected:S}=this.state.labels,$=o.Children.toArray(i).filter(Boolean),w=$.filter(R=>!R.props.disabled).length,k=this.getMenuItems($),E=w===0||p;return o.createElement(ke,{id:b,scope:"multi-select-dropdown"},R=>o.createElement(Zt,{id:R,role:"listbox",alignment:e,dropdownStyle:[c&&ur,cr,l],isFilterable:c,items:[...this.getShortcuts(w),...k],light:t,onOpenChanged:this.handleOpenChanged,open:x,opener:this.renderOpener($,E,R),openerElement:this.state.openerElement,selectionType:"multi",style:n,className:r,onSearchTextChanged:c?this.handleSearchTextChanged:void 0,searchText:c?C:"",labels:{clearSearch:I,filter:u,noResults:y,someResults:S},"aria-invalid":f,"aria-required":h,disabled:E}))}}mr.defaultProps={alignment:"left",disabled:!1,error:!1,light:!1,shortcuts:!1,selectedValues:[]};v.StyleSheet.create({listbox:{outline:"none"},disabled:{color:a.offBlack64}});const Mi=s=>{const{strings:e}=kr(),t=h=>{const{choices:p,onChange:b}=s;b(p.map(x=>h.includes(x.content)))},n=h=>h.map(({content:p})=>et(ve,{value:p,label:et(Rr,{content:p,strings:e,inline:!0})},p)),r=s.choices.filter(h=>h.checked).map(h=>h.content),{opener:l,onToggle:i,disabled:c}=s,f={style:{zIndex:"unset"},children:n(s.choices),opener:l,onToggle:i,disabled:c};return s.multipleSelect?et(mr,{...f,selectedValues:r,onChange:h=>t(h)}):et(pr,{...f,selectedValue:r[0],onChange:h=>t([h]),placeholder:s.choices[0].content})};Mi.__docgenInfo={description:"",methods:[],displayName:"AnswerChoices",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ +import{j as et}from"./jsx-runtime-FVsy8kgq.js";import{a as g,_ as d,b as yt,V as Ce,I as ke}from"./index-6h5t6F0w.js";import{r as o}from"./index-TT1qJ6UJ.js";import{l as v}from"./index-awljIyHI.js";import{C as gr,a as yr}from"./index-o3wWn3Y5.js";import{s as m,c as a,m as ee,b as X,a as br,f as Sr}from"./index-deFLJwr4.js";import{a as bt,b as Qt,L as xr}from"./index-h_CiYGGb.js";import{P as St}from"./index-xuPsLuPk.js";import{c as Gt,m as Cr}from"./minus-bold-ONmDo3Ve.js";import{r as Ie}from"./index-7vsPyIck.js";import{I as vr,x as Ir}from"./index-rfN0X25E.js";import{w as kn}from"./index-CkAxGj88.js";import{P as wr,d as $r}from"./Popper-kGnKOid7.js";import{m as Er}from"./index-YCTzZMik.js";import{u as kr}from"./i18n-context-P5sgPFep.js";import{R as Rr}from"./renderer-JG1Z7r2S.js";function Rn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Rn(t));else e.push(s);else return e;return e}function _n(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Rn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const _r=["children","style","tag","testId"],Fr=/^h[1-6]$/,Jt=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),B=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,_r);const f=Fr.test(l),h=_n([Jt.text,f&&Jt.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),Tr=["className","style"];function qe(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,Tr),c=typeof s=="string"?zr[s]:null,{className:f,style:h}=_n([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const zr=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Pr=["testId","tag"],Ve=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Or=qe("div",Ve.default),Br=qe("article",Ve.default),Lr=qe("aside",Ve.default),Dr=qe("nav",Ve.default),Nr=qe("section",Ve.default),Re=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,Pr),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Br,d({},i,{ref:t}));case"aside":return o.createElement(Lr,d({},i,{ref:t}));case"nav":return o.createElement(Dr,d({},i,{ref:t}));case"section":return o.createElement(Nr,d({},i,{ref:t}));case"div":return o.createElement(Or,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let be=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ut=o.createContext(be.Root);ut.displayName="RenderStateContext";let Hr=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ut.Provider,{value:be.Standard},t()):n?o.createElement(ut.Provider,{value:be.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case be.Root:return this._renderAsRootComponent();case be.Initial:return n?n():null;case be.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(be.Root)}}render(){return o.createElement(ut.Consumer,null,e=>this._maybeRender(e))}},Fn=class Tn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Tn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};Fn._factoryUniquenessCounter=0;let Mt=class{get(e){return e}};Mt.Default=new Mt;var Mr=Mt.Default;let Wr=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Mr):null:(this._idFactory||(this._idFactory=new Fn(r)),t(this._idFactory))}render(){return o.createElement(Hr,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Ar=class zn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(zn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Wr,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Ar.defaultId="wb-id";const Z=400,Be=700,qr=900,Rt="@media (max-width: 1023px)",_t="@media (min-width: 1024px)",z={display:"block"},A='Lato, "Noto Sans", sans-serif',en='"Noto Serif", serif',Vr="Inconsolata, monospace",L=v.StyleSheet.create({Title:d({},z,{fontFamily:A,fontWeight:qr,[_t]:{fontSize:36,lineHeight:"40px"},[Rt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},z,{fontFamily:A,fontWeight:Z,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},z,{fontFamily:A,fontWeight:Be,[_t]:{fontSize:28,lineHeight:"32px"},[Rt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},z,{fontFamily:A,fontWeight:Be,[_t]:{fontSize:24,lineHeight:"28px"},[Rt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},z,{fontFamily:A,fontWeight:Be,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},z,{fontFamily:A,fontWeight:Be,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},z,{fontFamily:en,fontWeight:Z,fontSize:22,lineHeight:"28px"}),BodySerif:d({},z,{fontFamily:en,fontWeight:Z,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},z,{fontFamily:Vr,fontWeight:Z,fontSize:17,lineHeight:"22px"}),Body:d({},z,{fontFamily:A,fontWeight:Z,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},z,{fontFamily:A,fontWeight:Be,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},z,{fontFamily:A,fontWeight:Z,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},z,{fontFamily:A,fontWeight:Z,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},z,{fontFamily:A,fontWeight:Z,fontSize:12,lineHeight:"16px"}),Caption:d({},z,{fontFamily:A,fontWeight:Z,fontSize:14,lineHeight:"20px"}),Footnote:d({},z,{fontFamily:A,fontWeight:Z,fontSize:12,lineHeight:"18px"})}),Ur=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,Ur);return o.createElement(B,d({},i,{tag:l,style:[L.Title,n],ref:t}),r)});const Kr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,Kr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingLarge,n],ref:t}),r)});const jr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,jr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingMedium,n],ref:t}),r)});const Xr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Xr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingSmall,n],ref:t}),r)});const Gr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Gr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingXSmall,n],ref:t}),r)});const Zr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Zr);return o.createElement(B,d({},i,{tag:l,style:[L.BodySerifBlock,n],ref:t}),r)});const Yr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Yr);return o.createElement(B,d({},i,{tag:l,style:[L.BodySerif,n],ref:t}),r)});const Qr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Qr);return o.createElement(B,d({},i,{tag:l,style:[L.BodyMonospace,n],ref:t}),r)});const Jr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Jr);return o.createElement(B,d({},i,{tag:l,style:[L.Body,n],ref:t}),r)});const eo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,eo);return o.createElement(B,d({},i,{tag:l,style:[L.LabelLarge,n],ref:t}),r)});const to=["style","children","tag"],Pn=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,to);return o.createElement(B,d({},i,{tag:l,style:[L.LabelMedium,n],ref:t}),r)}),no=["style","children","tag"],ro=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,no);return o.createElement(B,d({},i,{tag:l,style:[L.LabelSmall,n],ref:t}),r)}),oo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,oo);return o.createElement(B,d({},i,{tag:l,style:[L.LabelXSmall,n],ref:t}),r)});const lo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,lo);return o.createElement(B,d({},i,{tag:l,style:[L.Tagline,n],ref:t}),r)});const so=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,so);return o.createElement(B,d({},i,{tag:l,style:[L.Caption,n],ref:t}),r)});const io=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,io);return o.createElement(B,d({},i,{tag:l,style:[L.Footnote,n],ref:t}),r)});const tn=m.large_24,ao={small:{query:"(max-width: 767px)",totalColumns:4,gutterWidth:m.medium_16,marginWidth:m.medium_16},medium:{query:"(min-width: 768px) and (max-width: 1023px)",totalColumns:8,gutterWidth:m.xLarge_32,marginWidth:m.large_24},large:{query:"(min-width: 1024px)",totalColumns:12,gutterWidth:m.xLarge_32,marginWidth:tn,maxWidth:1120+tn*2}},co={ssrSize:"large",mediaSpec:ao},uo=o.createContext(co);uo.displayName="MediaLayoutContext";v.StyleSheet.create({grow:{flexGrow:1}});let gt=class extends o.Component{render(){const{size:e,style:t}=this.props;return o.createElement(Re,{"aria-hidden":"true",style:[ho(e),t]})}};const ho=s=>({width:s,MsFlexBasis:s,MsFlexPreferredSize:s,WebkitFlexBasis:s,flexBasis:s,flexShrink:0}),G={cellMinHeight:m.xxLarge_48,cellPadding:{paddingVertical:m.small_12,paddingHorizontal:m.medium_16},detailCellPadding:{paddingVertical:m.medium_16,paddingHorizontal:m.medium_16},accessoryHorizontalSpacing:m.medium_16},fo=s=>{switch(s){case"inset":return[Ft.horizontalRule,Ft.horizontalRuleInset];case"full-width":return Ft.horizontalRule;case"none":return{}}},Ft=v.StyleSheet.create({horizontalRule:{position:"relative",":after":{width:"100%",content:"''",position:"absolute",bottom:0,right:0,height:m.xxxxSmall_2,boxShadow:`inset 0px -1px 0px ${a.offBlack8}`}},horizontalRuleInset:{":after":{width:`calc(100% - ${G.cellPadding.paddingHorizontal}px)`}}}),po=({leftAccessory:s,leftAccessoryStyle:e,disabled:t})=>s?o.createElement(o.Fragment,null,o.createElement(Re,{style:[W.accessory,t&&W.accessoryDisabled,d({},e)]},s),o.createElement(gt,{size:G.accessoryHorizontalSpacing})):null,mo=({rightAccessory:s,rightAccessoryStyle:e,active:t,disabled:n})=>s?o.createElement(o.Fragment,null,o.createElement(gt,{size:G.accessoryHorizontalSpacing}),o.createElement(Re,{style:[W.accessory,W.accessoryRight,n&&W.accessoryDisabled,d({},e),t&&W.accessoryActive]},s)):null;function nn(s){const{active:e,children:t,disabled:n,horizontalRule:r="inset",contentStyle:l=void 0,leftAccessory:i=void 0,leftAccessoryStyle:c=void 0,rightAccessory:f=void 0,rightAccessoryStyle:h=void 0,style:p,testId:b,innerStyle:x}=s,C=fo(r);return o.createElement(Re,{style:[W.innerWrapper,x,p,C]},o.createElement(po,{leftAccessory:i,leftAccessoryStyle:c,disabled:n}),o.createElement(Re,{style:[W.content,l],testId:b},t),o.createElement(mo,{rightAccessory:f,rightAccessoryStyle:h,active:e,disabled:n}))}const On=s=>{const{active:e,disabled:t,href:n,onClick:r,"aria-label":l,"aria-selected":i,"aria-checked":c,target:f,role:h,rootStyle:p}=s;return r||n?o.createElement(gr,{disabled:t,onClick:r,href:n,hideDefaultFocusRing:!0,"aria-label":l||void 0,"aria-selected":i||void 0,"aria-checked":c,role:h,target:f,style:[W.wrapper,W.clickable,p,e&&W.active,t&&W.disabled],"aria-current":e?"true":void 0},()=>o.createElement(nn,s)):o.createElement(Re,{style:[W.wrapper,p,e&&W.active],"aria-current":e?"true":void 0,role:h},o.createElement(nn,s))},W=v.StyleSheet.create({wrapper:{background:a.white,color:a.offBlack,display:"flex",minHeight:G.cellMinHeight,textAlign:"left",width:"100%"},innerWrapper:{minHeight:G.cellMinHeight,padding:`${G.cellPadding.paddingVertical}px ${G.cellPadding.paddingHorizontal}px`,flexDirection:"row",flex:1,":focus-visible":{padding:`${G.cellPadding.paddingVertical-2}px ${G.cellPadding.paddingHorizontal-2}px`}},content:{alignSelf:"center",flex:1,overflowWrap:"break-word"},accessory:{minWidth:"auto",alignItems:"center",alignSelf:"center"},accessoryRight:{color:a.offBlack64},clickable:{outline:"none",":hover[aria-disabled=true]":{cursor:"not-allowed"},":focus-visible":{borderRadius:m.xxxSmall_4,overflow:"hidden",position:"relative"},":focus-visible:after":{content:"''",position:"absolute",top:0,left:0,zIndex:1,width:`calc(100% - ${m.xxxSmall_4}px)`,height:`calc(100% - ${m.xxxSmall_4}px)`,border:`${m.xxxxSmall_2}px solid ${a.blue}`,borderRadius:m.xxxSmall_4},":hover[aria-disabled=false]":{background:a.offBlack8},":active[aria-disabled=false]":{background:a.offBlack16}},active:{background:a.fadedBlue8,color:a.blue,":hover[aria-disabled=false]":{background:a.fadedBlue16},":active[aria-disabled=false]":{background:a.fadedBlue24}},disabled:{color:a.offBlack32,":focus-visible":{outline:"none"}},accessoryActive:{color:a.blue},accessoryDisabled:{color:a.offBlack,opacity:.32}}),go=["title"],yo=function(e){const{title:t}=e,n=g(e,go);return o.createElement(On,n,typeof t=="string"?o.createElement(Pn,null,t):t)},bo=["title","subtitle1","subtitle2"],rn=({subtitle:s,disabled:e})=>s?typeof s=="string"?o.createElement(ro,{style:!e&&Bn.subtitle},s):s:null,So=function(e){const{title:t,subtitle1:n,subtitle2:r}=e,l=g(e,bo);return o.createElement(On,d({},l,{innerStyle:Bn.innerWrapper}),o.createElement(rn,{subtitle:n,disabled:l.disabled}),n&&o.createElement(gt,{size:m.xxxxSmall_2}),typeof t=="string"?o.createElement(Pn,null,t):t,r&&o.createElement(gt,{size:m.xxxxSmall_2}),o.createElement(rn,{subtitle:r,disabled:l.disabled}))},Bn=v.StyleSheet.create({subtitle:{color:a.offBlack64},innerWrapper:{padding:`${G.detailCellPadding.paddingVertical}px ${G.detailCellPadding.paddingHorizontal}px`}});function Ln(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Ln(t));else e.push(s);else return e;return e}function Dn(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Ln(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const xo=["children","style","tag","testId"],Co=/^h[1-6]$/,on=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,xo);const f=Co.test(l),h=Dn([on.text,f&&on.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)});const vo=["className","style"];function Ue(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,vo),c=typeof s=="string"?Io[s]:null,{className:f,style:h}=Dn([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const Io=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),wo=["testId","tag"],Ke=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),$o=Ue("div",Ke.default),Eo=Ue("article",Ke.default),ko=Ue("aside",Ke.default),Ro=Ue("nav",Ke.default),_o=Ue("section",Ke.default),Fo=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,wo),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Eo,d({},i,{ref:t}));case"aside":return o.createElement(ko,d({},i,{ref:t}));case"nav":return o.createElement(Ro,d({},i,{ref:t}));case"section":return o.createElement(_o,d({},i,{ref:t}));case"div":return o.createElement($o,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let Se=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ht=o.createContext(Se.Root);ht.displayName="RenderStateContext";let To=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ht.Provider,{value:Se.Standard},t()):n?o.createElement(ht.Provider,{value:Se.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case Se.Root:return this._renderAsRootComponent();case Se.Initial:return n?n():null;case Se.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(Se.Root)}}render(){return o.createElement(ht.Consumer,null,e=>this._maybeRender(e))}},Nn=class Hn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Hn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};Nn._factoryUniquenessCounter=0;let Wt=class{get(e){return e}};Wt.Default=new Wt;var zo=Wt.Default;let Po=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(zo):null:(this._idFactory||(this._idFactory=new Nn(r)),t(this._idFactory))}render(){return o.createElement(To,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Oo=class Mn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Mn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Po,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Oo.defaultId="wb-id";const ln=m.large_24,Bo={small:{query:"(max-width: 767px)",totalColumns:4,gutterWidth:m.medium_16,marginWidth:m.medium_16},medium:{query:"(min-width: 768px) and (max-width: 1023px)",totalColumns:8,gutterWidth:m.xLarge_32,marginWidth:m.large_24},large:{query:"(min-width: 1024px)",totalColumns:12,gutterWidth:m.xLarge_32,marginWidth:ln,maxWidth:1120+ln*2}},Lo={ssrSize:"large",mediaSpec:Bo},Do=o.createContext(Lo);Do.displayName="MediaLayoutContext";v.StyleSheet.create({grow:{flexGrow:1}});class de extends o.Component{render(){const{size:e,style:t}=this.props;return o.createElement(Fo,{"aria-hidden":"true",style:[No(e),t]})}}const No=s=>({width:s,MsFlexBasis:s,MsFlexPreferredSize:s,WebkitFlexBasis:s,flexBasis:s,flexShrink:0}),Ho=""+new URL("magnifying-glass-IX5mxYeF.svg",import.meta.url).href;function Wn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Wn(t));else e.push(s);else return e;return e}function An(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Wn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const Mo=["children","style","tag","testId"],Wo=/^h[1-6]$/,sn=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),D=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,Mo);const f=Wo.test(l),h=An([sn.text,f&&sn.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),Ao=["className","style"];function Te(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,Ao),c=typeof s=="string"?qo[s]:null,{className:f,style:h}=An([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const qo=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Vo=["testId","tag"],je=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Uo=Te("div",je.default),Ko=Te("article",je.default),jo=Te("aside",je.default),Xo=Te("nav",je.default),Go=Te("section",je.default),Zo=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,Vo),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Ko,d({},i,{ref:t}));case"aside":return o.createElement(jo,d({},i,{ref:t}));case"nav":return o.createElement(Xo,d({},i,{ref:t}));case"section":return o.createElement(Go,d({},i,{ref:t}));case"div":return o.createElement(Uo,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let xe=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ft=o.createContext(xe.Root);ft.displayName="RenderStateContext";let Yo=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ft.Provider,{value:xe.Standard},t()):n?o.createElement(ft.Provider,{value:xe.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case xe.Root:return this._renderAsRootComponent();case xe.Initial:return n?n():null;case xe.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(xe.Root)}}render(){return o.createElement(ft.Consumer,null,e=>this._maybeRender(e))}},qn=class Vn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Vn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};qn._factoryUniquenessCounter=0;let At=class{get(e){return e}};At.Default=new At;var Qo=At.Default;let Jo=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Qo):null:(this._idFactory||(this._idFactory=new qn(r)),t(this._idFactory))}render(){return o.createElement(Yo,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Un=class Kn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Kn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Jo,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Un.defaultId="wb-id";const Y=400,Le=700,el=900,Tt="@media (max-width: 1023px)",zt="@media (min-width: 1024px)",P={display:"block"},q='Lato, "Noto Sans", sans-serif',an='"Noto Serif", serif',tl="Inconsolata, monospace",T=v.StyleSheet.create({Title:d({},P,{fontFamily:q,fontWeight:el,[zt]:{fontSize:36,lineHeight:"40px"},[Tt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},P,{fontFamily:q,fontWeight:Y,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},P,{fontFamily:q,fontWeight:Le,[zt]:{fontSize:28,lineHeight:"32px"},[Tt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},P,{fontFamily:q,fontWeight:Le,[zt]:{fontSize:24,lineHeight:"28px"},[Tt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},P,{fontFamily:q,fontWeight:Le,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},P,{fontFamily:q,fontWeight:Le,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},P,{fontFamily:an,fontWeight:Y,fontSize:22,lineHeight:"28px"}),BodySerif:d({},P,{fontFamily:an,fontWeight:Y,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},P,{fontFamily:tl,fontWeight:Y,fontSize:17,lineHeight:"22px"}),Body:d({},P,{fontFamily:q,fontWeight:Y,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},P,{fontFamily:q,fontWeight:Le,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},P,{fontFamily:q,fontWeight:Y,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},P,{fontFamily:q,fontWeight:Y,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},P,{fontFamily:q,fontWeight:Y,fontSize:12,lineHeight:"16px"}),Caption:d({},P,{fontFamily:q,fontWeight:Y,fontSize:14,lineHeight:"20px"}),Footnote:d({},P,{fontFamily:q,fontWeight:Y,fontSize:12,lineHeight:"18px"})}),nl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,nl);return o.createElement(D,d({},i,{tag:l,style:[T.Title,n],ref:t}),r)});const rl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,rl);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingLarge,n],ref:t}),r)});const ol=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,ol);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingMedium,n],ref:t}),r)});const ll=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,ll);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingSmall,n],ref:t}),r)});const sl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,sl);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingXSmall,n],ref:t}),r)});const il=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,il);return o.createElement(D,d({},i,{tag:l,style:[T.BodySerifBlock,n],ref:t}),r)});const al=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,al);return o.createElement(D,d({},i,{tag:l,style:[T.BodySerif,n],ref:t}),r)});const dl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,dl);return o.createElement(D,d({},i,{tag:l,style:[T.BodyMonospace,n],ref:t}),r)});const cl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,cl);return o.createElement(D,d({},i,{tag:l,style:[T.Body,n],ref:t}),r)});const ul=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ul);return o.createElement(D,d({},i,{tag:l,style:[T.LabelLarge,n],ref:t}),r)});const hl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,hl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelMedium,n],ref:t}),r)});const fl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,fl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelSmall,n],ref:t}),r)});const pl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,pl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelXSmall,n],ref:t}),r)});const ml=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ml);return o.createElement(D,d({},i,{tag:l,style:[T.Tagline,n],ref:t}),r)});const gl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,gl);return o.createElement(D,d({},i,{tag:l,style:[T.Caption,n],ref:t}),r)});const yl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,yl);return o.createElement(D,d({},i,{tag:l,style:[T.Footnote,n],ref:t}),r)});function jn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...jn(t));else e.push(s);else return e;return e}function Xn(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;jn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const bl=["children","style","tag","testId"],Sl=/^h[1-6]$/,dn=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),N=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,bl);const f=Sl.test(l),h=Xn([dn.text,f&&dn.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),xl=["className","style"];function H(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,xl),c=typeof s=="string"?Cl[s]:null,{className:f,style:h}=Xn([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const Cl=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),vl=["testId","tag"],Xe=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Il=H("div",Xe.default),wl=H("article",Xe.default),$l=H("aside",Xe.default),El=H("nav",Xe.default),kl=H("section",Xe.default),_e=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,vl),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(wl,d({},i,{ref:t}));case"aside":return o.createElement($l,d({},i,{ref:t}));case"nav":return o.createElement(El,d({},i,{ref:t}));case"section":return o.createElement(kl,d({},i,{ref:t}));case"div":return o.createElement(Il,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let ie=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const We=o.createContext(ie.Root);We.displayName="RenderStateContext";class Rl extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(We.Provider,{value:ie.Standard},t()):n?o.createElement(We.Provider,{value:ie.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case ie.Root:return this._renderAsRootComponent();case ie.Initial:return n?n():null;case ie.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(ie.Root)}}render(){return o.createElement(We.Consumer,null,e=>this._maybeRender(e))}}class Ge{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Ge._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}Ge._factoryUniquenessCounter=0;class qt{get(e){return e}}qt.Default=new qt;var Gn=qt.Default;class Zn extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Gn):null:(this._idFactory||(this._idFactory=new Ge(r)),t(this._idFactory))}render(){return o.createElement(Rl,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class Ze extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Ze.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Zn,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}}Ze.defaultId="wb-id";const _l=()=>o.useContext(We),Fl=s=>{const e=_l(),t=o.useRef(null);if(e===ie.Root)throw new Error("Components using useUniqueIdWithMock() should be descendants of ");return e===ie.Initial?Gn:(t.current||(t.current=new Ge(s)),t.current)},Tl=s=>{o.useEffect(s,[])},Q=400,De=700,zl=900,Pt="@media (max-width: 1023px)",Ot="@media (min-width: 1024px)",O={display:"block"},V='Lato, "Noto Sans", sans-serif',cn='"Noto Serif", serif',Pl="Inconsolata, monospace",F=v.StyleSheet.create({Title:d({},O,{fontFamily:V,fontWeight:zl,[Ot]:{fontSize:36,lineHeight:"40px"},[Pt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},O,{fontFamily:V,fontWeight:Q,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},O,{fontFamily:V,fontWeight:De,[Ot]:{fontSize:28,lineHeight:"32px"},[Pt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},O,{fontFamily:V,fontWeight:De,[Ot]:{fontSize:24,lineHeight:"28px"},[Pt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},O,{fontFamily:V,fontWeight:De,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},O,{fontFamily:V,fontWeight:De,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},O,{fontFamily:cn,fontWeight:Q,fontSize:22,lineHeight:"28px"}),BodySerif:d({},O,{fontFamily:cn,fontWeight:Q,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},O,{fontFamily:Pl,fontWeight:Q,fontSize:17,lineHeight:"22px"}),Body:d({},O,{fontFamily:V,fontWeight:Q,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},O,{fontFamily:V,fontWeight:De,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},O,{fontFamily:V,fontWeight:Q,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},O,{fontFamily:V,fontWeight:Q,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},O,{fontFamily:V,fontWeight:Q,fontSize:12,lineHeight:"16px"}),Caption:d({},O,{fontFamily:V,fontWeight:Q,fontSize:14,lineHeight:"20px"}),Footnote:d({},O,{fontFamily:V,fontWeight:Q,fontSize:12,lineHeight:"18px"})}),Ol=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,Ol);return o.createElement(N,d({},i,{tag:l,style:[F.Title,n],ref:t}),r)});const Bl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,Bl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingLarge,n],ref:t}),r)});const Ll=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,Ll);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingMedium,n],ref:t}),r)});const Dl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Dl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingSmall,n],ref:t}),r)});const Nl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Nl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingXSmall,n],ref:t}),r)});const Hl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Hl);return o.createElement(N,d({},i,{tag:l,style:[F.BodySerifBlock,n],ref:t}),r)});const Ml=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Ml);return o.createElement(N,d({},i,{tag:l,style:[F.BodySerif,n],ref:t}),r)});const Wl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Wl);return o.createElement(N,d({},i,{tag:l,style:[F.BodyMonospace,n],ref:t}),r)});const Al=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Al);return o.createElement(N,d({},i,{tag:l,style:[F.Body,n],ref:t}),r)});const ql=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ql);return o.createElement(N,d({},i,{tag:l,style:[F.LabelLarge,n],ref:t}),r)});const Vl=["style","children","tag"],xt=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Vl);return o.createElement(N,d({},i,{tag:l,style:[F.LabelMedium,n],ref:t}),r)}),Ul=["style","children","tag"],we=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Ul);return o.createElement(N,d({},i,{tag:l,style:[F.LabelSmall,n],ref:t}),r)}),Kl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Kl);return o.createElement(N,d({},i,{tag:l,style:[F.LabelXSmall,n],ref:t}),r)});const jl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,jl);return o.createElement(N,d({},i,{tag:l,style:[F.Tagline,n],ref:t}),r)});const Xl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Xl);return o.createElement(N,d({},i,{tag:l,style:[F.Caption,n],ref:t}),r)});const Gl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Gl);return o.createElement(N,d({},i,{tag:l,style:[F.Footnote,n],ref:t}),r)});const Zl=s=>({small:16,medium:24,large:48,xlarge:96})[s],Yl=["color","icon","size","style","testId","className"],Ql=H("span"),Yn=o.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:l="small",style:i,testId:c,className:f}=e,h=g(e,Yl),p=Zl(l),b=`${f??""}`,x=Jl(n,p);return o.createElement(Ql,d({},h,{className:b,style:[Vt.svg,x.icon,{maskImage:`url(${r})`},i],"data-testid":c,ref:t}))}),un={},Jl=(s,e)=>{const t=`${s}-${e}`;if(Vt[t])return Vt[t];const n={icon:{backgroundColor:s,width:e,height:e}};return un[t]=v.StyleSheet.create(n),un[t]},Vt=v.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});Yn.displayName="PhosphorIcon";const es=["checked","disabled","error","groupName","id","testId"];function ts(s){switch(s){case!0:return"true";case!1:return"false";default:return"mixed"}}const{blue:Qn,red:Jn,white:ae,offWhite:ns,offBlack16:rs,offBlack32:os,offBlack50:ls}=a,Ne=m.medium_16,Ut=m.small_12,ss=H("input"),is=o.forwardRef(function(e,t){const{checked:n,disabled:r,error:l,groupName:i,id:c,testId:f}=e,h=g(e,es),p=o.useRef(null);o.useEffect(()=>{p.current!=null&&(p.current.indeterminate=n==null)},[n,p]);const b=()=>{},x=cs(n,l),C=[tt.inputReset,tt.default,!r&&x.default,r&&tt.disabled],I=o.createElement(Yn,{color:r?os:ae,icon:n?Gt:Cr,size:"small",style:[tt.checkboxIcon,{width:Ut,height:Ut}]}),u=ts(n);return o.createElement(o.Fragment,null,o.createElement(ss,d({},h,{ref:y=>{p.current=y,typeof t=="function"?t(y):t!=null&&(t.current=y)},type:"checkbox","aria-checked":u,"aria-invalid":l,checked:n??void 0,disabled:r,id:c,name:i,onChange:b,style:C,"data-testid":f})),n||n==null?I:o.createElement(o.Fragment,null))}),tt=v.StyleSheet.create({inputReset:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none"},default:{height:Ne,width:Ne,minHeight:Ne,minWidth:Ne,margin:0,outline:"none",boxSizing:"border-box",borderStyle:"solid",borderWidth:1,borderRadius:3},disabled:{cursor:"auto",backgroundColor:ns,borderColor:rs,borderWidth:1},checkboxIcon:{position:"absolute",pointerEvents:"none",margin:(Ne-Ut)/2}}),as=ee(a.fadedBlue16,ae),ds=a.activeBlue,pt=ee(a.fadedRed8,ae),er=a.activeRed,hn={default:{faded:as,base:Qn,active:ds},error:{faded:pt,base:Jn,active:er}},nt={},cs=(s,e)=>{const t=`${String(s)}-${String(e)}`;if(nt[t])return nt[t];const n=e?hn.error:hn.default;let r={};return s||s==null?r={default:{backgroundColor:n.base,borderWidth:0,":focus-visible":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.base}`},":hover":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.base}`},":active":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.active}`,background:n.active}}}:r={default:{backgroundColor:e?pt:ae,borderColor:e?Jn:ls,":focus-visible":{backgroundColor:e?pt:ae,borderColor:n.base,borderWidth:2},":hover":{backgroundColor:e?pt:ae,borderColor:n.base,borderWidth:2},":active":{backgroundColor:n.faded,borderColor:e?er:Qn,borderWidth:2}}},nt[t]=v.StyleSheet.create(r),nt[t]},us=["checked","disabled","error","groupName","id","testId"],{blue:tr,red:nr,white:se,offWhite:hs,offBlack16:fs,offBlack32:ps,offBlack50:ms}=a,gs=H("input"),ys=o.forwardRef(function(e,t){const n=()=>{},{checked:r,disabled:l,error:i,groupName:c,id:f,testId:h}=e,p=g(e,us),b=xs(r,i),x=[Bt.inputReset,Bt.default,!l&&b.default,l&&Bt.disabled];return o.createElement(o.Fragment,null,o.createElement(gs,d({},p,{type:"radio","aria-invalid":i,checked:r??void 0,disabled:l,id:f,name:c,onChange:n,style:x,"data-testid":h,ref:t})),l&&r&&o.createElement("span",{style:bs}))}),ce=16,bs={position:"absolute",top:ce/4,left:ce/4,height:ce/2,width:ce/2,borderRadius:"50%",backgroundColor:ps},Bt=v.StyleSheet.create({inputReset:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none"},default:{height:ce,width:ce,minHeight:ce,minWidth:ce,margin:0,outline:"none",boxSizing:"border-box",borderStyle:"solid",borderWidth:1,borderRadius:"50%"},disabled:{cursor:"auto",backgroundColor:hs,borderColor:fs,borderWidth:1}}),Ss=ee(a.fadedBlue16,se),mt=ee(a.fadedRed8,se),fn={default:{faded:Ss,base:tr,active:a.activeBlue},error:{faded:mt,base:nr,active:a.activeRed}},rt={},xs=(s,e)=>{const t=`${String(s)}-${String(e)}`;if(rt[t])return rt[t];const n=e?fn.error:fn.default;let r={};return s?r={default:{backgroundColor:se,borderColor:n.base,borderWidth:ce/4,":focus-visible":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.base}`},":hover":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.base}`},":active":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.active}`,borderColor:n.active}}}:r={default:{backgroundColor:e?mt:se,borderColor:e?nr:ms,":focus-visible":{backgroundColor:e?mt:se,borderColor:n.base,borderWidth:2},":hover":{backgroundColor:e?mt:se,borderColor:n.base,borderWidth:2},":active":{backgroundColor:n.faded,borderColor:e?a.activeRed:tr,borderWidth:2}}},rt[t]=v.StyleSheet.create(r),rt[t]},Cs=["checked","description","disabled","error","id","label","onChange","style","className","variant"],rr=o.forwardRef(function(e,t){const{checked:n,description:r,disabled:l=!1,error:i=!1,id:c,label:f,onChange:h,style:p,className:b,variant:x}=e,C=g(e,Cs),I=()=>{x==="radio"&&n||h(!n)},u=()=>x==="radio"?ys:is,y=w=>o.createElement(xt,{style:[ot.label,l&&ot.disabledLabel]},o.createElement("label",{htmlFor:w},f)),S=w=>o.createElement(we,{style:ot.description,id:w},r),$=u();return o.createElement(Zn,{mockOnFirstRender:!0,scope:"choice"},w=>{const k=c||w.get("main"),E=r?w.get("description"):void 0;return o.createElement(_e,{style:p,className:b},o.createElement(_e,{style:ot.wrapper,tabIndex:-1},o.createElement($,d({},C,{id:k,checked:n,"aria-describedby":E,onClick:I,disabled:l,error:i,ref:t})),o.createElement(de,{size:m.xSmall_8}),f&&y(k)),r&&S(E))})}),ot=v.StyleSheet.create({wrapper:{flexDirection:"row",alignItems:"flex-start",outline:"none"},label:{marginTop:-2},disabledLabel:{color:a.offBlack32},description:{marginLeft:m.medium_16+m.xSmall_8,marginTop:m.xxxSmall_4,color:a.offBlack64}}),vs=o.forwardRef(function(e,t){const{disabled:n=!1,error:r=!1}=e;return o.createElement(rr,d({},e,{variant:"checkbox",disabled:n,error:r,ref:t}))}),Is=["disabled","error"],ws=o.forwardRef(function(e,t){const{disabled:n=!1,error:r=!1}=e,l=g(e,Is);return o.createElement(rr,d({},l,{variant:"radio",disabled:n,error:r,ref:t}))}),$s=["checked","disabled","onChange","value","variant"];o.forwardRef(function(e,t){const{checked:n=!1,disabled:r=!1,onChange:l=()=>{},variant:i}=e,c=g(e,$s),h=(p=>p==="checkbox"?vs:ws)(i);return o.createElement(h,d({},c,{checked:n,disabled:r,onChange:l,ref:t}))});const J=v.StyleSheet.create({fieldset:{border:"none",padding:0,margin:0},legend:{padding:0},description:{marginTop:m.xxxSmall_4,color:a.offBlack64},error:{marginTop:m.xxxSmall_4,color:a.red},defaultLineGap:{marginTop:m.xSmall_8}}),Es=H("fieldset"),ks=H("legend");o.forwardRef(function(e,t){const{children:n,label:r,description:l,errorMessage:i,groupName:c,onChange:f,selectedValues:h,style:p,testId:b}=e,x=(I,u)=>{if(u){const y=h.indexOf(I),S=[...h.slice(0,y),...h.slice(y+1)];f(S)}else f([...h,I])},C=o.Children.toArray(n).filter(Boolean);return o.createElement(Es,{"data-testid":b,style:J.fieldset,ref:t},o.createElement(_e,{style:p},r&&o.createElement(ks,{style:J.legend},o.createElement(xt,null,r)),l&&o.createElement(we,{style:J.description},l),i&&o.createElement(we,{style:J.error},i),(r||l||i)&&o.createElement(de,{size:m.small_12}),C.map((I,u)=>{const{style:y,value:S}=I.props,$=h.includes(S);return o.cloneElement(I,{checked:$,error:!!i,groupName:c,id:`${c}-${S}`,key:S,onChange:()=>x(S,$),style:[u>0&&J.defaultLineGap,y],variant:"checkbox"})})))});const Rs=H("fieldset"),_s=H("legend");o.forwardRef(function(e,t){const{children:n,label:r,description:l,errorMessage:i,groupName:c,onChange:f,selectedValue:h,style:p,testId:b}=e,x=o.Children.toArray(n).filter(Boolean);return o.createElement(Rs,{"data-testid":b,style:J.fieldset,ref:t},o.createElement(_e,{style:p},r&&o.createElement(_s,{style:J.legend},o.createElement(xt,null,r)),l&&o.createElement(we,{style:J.description},l),i&&o.createElement(we,{style:J.error},i),(r||l||i)&&o.createElement(de,{size:m.small_12}),x.map((C,I)=>{const{style:u,value:y}=C.props,S=h===y;return o.cloneElement(C,{checked:S,error:!!i,groupName:c,id:`${c}-${y}`,key:y,onChange:()=>f(y),style:[I>0&&J.defaultLineGap,u],variant:"radio"})})))});const Fs=["id","type","value","name","disabled","onKeyDown","placeholder","style","testId","readOnly","autoFocus","autoComplete","forwardedRef","light","onFocus","onBlur","onValidate","validate","onChange","required"],Ts="This field is required.",zs=H("input");class or extends o.Component{constructor(e){super(e),this.state={error:null},this.maybeValidate=t=>{const{validate:n,onValidate:r,required:l}=this.props;if(n){const i=n(t)||null;this.setState({error:i},()=>{r&&r(i)})}else if(l){const c=t?null:typeof l=="string"?l:Ts;this.setState({error:c},()=>{r&&r(c)})}},this.handleChange=t=>{const{onChange:n}=this.props,r=t.target.value;this.maybeValidate(r),n(r)},this.handleFocus=t=>{const{onFocus:n}=this.props;n&&n(t)},this.handleBlur=t=>{const{onBlur:n}=this.props;n&&n(t)},this.getStyles=()=>{const{disabled:t,light:n}=this.props,{error:r}=this.state,l=[oe.input,F.LabelMedium],i=[oe.default,!t&&oe.defaultFocus,t&&oe.disabled,!!r&&oe.error],c=[oe.light,!t&&oe.lightFocus,t&&oe.lightDisabled,!!r&&oe.lightError];return[...l,...n?c:i]},e.validate&&e.value!==""&&(this.state.error=e.validate(e.value)||null)}componentDidMount(){this.props.value!==""&&this.maybeValidate(this.props.value)}render(){const e=this.props,{id:t,type:n,value:r,name:l,disabled:i,onKeyDown:c,placeholder:f,style:h,testId:p,readOnly:b,autoFocus:x,autoComplete:C,forwardedRef:I}=e,u=g(e,Fs);return o.createElement(Ze,{id:t,scope:"text-field"},y=>o.createElement(zs,d({style:[this.getStyles(),h],id:y,type:n,placeholder:f,value:r,name:l,disabled:i,onChange:this.handleChange,onKeyDown:c,onFocus:this.handleFocus,onBlur:this.handleBlur,"data-testid":p,readOnly:b,autoFocus:x,autoComplete:C,ref:I},u,{"aria-invalid":this.state.error?"true":"false"})))}}or.defaultProps={type:"text",disabled:!1,light:!1};const oe=v.StyleSheet.create({input:{width:"100%",height:40,borderRadius:X.radius.medium_4,boxSizing:"border-box",paddingLeft:m.medium_16,margin:0},default:{background:a.white,border:`1px solid ${a.offBlack50}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},defaultFocus:{":focus-visible":{borderColor:a.blue,outline:`1px solid ${a.blue}`,outlineOffset:0}},error:{background:a.fadedRed8,border:`1px solid ${a.red}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red}},disabled:{background:a.offWhite,border:`1px solid ${a.offBlack16}`,color:a.offBlack64,"::placeholder":{color:a.offBlack64},cursor:"not-allowed",":focus-visible":{outline:"none",boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},light:{background:a.white,border:`1px solid ${a.offBlack16}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},lightFocus:{":focus-visible":{outline:`1px solid ${a.blue}`,outlineOffset:0,borderColor:a.blue,boxShadow:`0px 0px 0px 2px ${a.blue}, 0px 0px 0px 3px ${a.white}`}},lightDisabled:{backgroundColor:"transparent",border:`1px solid ${a.white32}`,color:a.white64,"::placeholder":{color:a.white64},cursor:"not-allowed",":focus-visible":{borderColor:ee(a.white32,a.blue),outline:"none",boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},lightError:{background:a.fadedRed8,border:`1px solid ${a.red}`,boxShadow:`0px 0px 0px 1px ${a.red}, 0px 0px 0px 2px ${a.white}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red,boxShadow:`0px 0px 0px 2px ${a.red}, 0px 0px 0px 3px ${a.white}`}}});var lr=o.forwardRef((s,e)=>o.createElement(or,d({},s,{forwardedRef:e})));const Ps=H("span");class Os extends o.Component{renderLabel(){const{label:e,id:t,required:n,testId:r,light:l}=this.props,i=o.createElement(Ps,{style:l?he.lightRequired:he.required,"aria-hidden":!0}," ","*");return o.createElement(o.Fragment,null,o.createElement(xt,{style:l?he.lightLabel:he.label,tag:"label",htmlFor:t&&`${t}-field`,testId:r&&`${r}-label`},e,n&&i),o.createElement(de,{size:m.xxxSmall_4}))}maybeRenderDescription(){const{description:e,testId:t,light:n}=this.props;return e?o.createElement(o.Fragment,null,o.createElement(we,{style:n?he.lightDescription:he.description,testId:t&&`${t}-description`},e),o.createElement(de,{size:m.xxxSmall_4})):null}maybeRenderError(){const{error:e,id:t,testId:n,light:r}=this.props;return e?o.createElement(o.Fragment,null,o.createElement(de,{size:m.small_12}),o.createElement(we,{style:r?he.lightError:he.error,role:"alert",id:t&&`${t}-error`,testId:n&&`${n}-error`},e)):null}render(){const{field:e,style:t}=this.props;return o.createElement(_e,{style:t},this.renderLabel(),this.maybeRenderDescription(),o.createElement(de,{size:m.xSmall_8}),e,this.maybeRenderError())}}const he=v.StyleSheet.create({label:{color:a.offBlack},lightLabel:{color:a.white},description:{color:a.offBlack64},lightDescription:{color:a.white64},error:{color:a.red},lightError:{color:a.fadedRed},required:{color:a.red},lightRequired:{color:a.fadedRed}}),Bs=["id","type","label","description","value","disabled","required","validate","onChange","onKeyDown","placeholder","light","style","testId","readOnly","autoComplete","forwardedRef","ariaDescribedby","onValidate","onFocus","onBlur"];class sr extends o.Component{constructor(e){super(e),this.handleValidate=t=>{const{onValidate:n}=this.props;this.setState({error:t},()=>{n&&n(t)})},this.handleFocus=t=>{const{onFocus:n}=this.props;this.setState({focused:!0},()=>{n&&n(t)})},this.handleBlur=t=>{const{onBlur:n}=this.props;this.setState({focused:!1},()=>{n&&n(t)})},this.state={error:null,focused:!1}}render(){const e=this.props,{id:t,type:n,label:r,description:l,value:i,disabled:c,required:f,validate:h,onChange:p,onKeyDown:b,placeholder:x,light:C,style:I,testId:u,readOnly:y,autoComplete:S,forwardedRef:$,ariaDescribedby:w}=e,k=g(e,Bs);return o.createElement(Ze,{id:t,scope:"labeled-text-field"},E=>o.createElement(Os,{id:E,testId:u,style:I,light:C,field:o.createElement(lr,d({id:`${E}-field`,"aria-describedby":w||`${E}-error`,"aria-required":f?"true":"false",required:f,testId:u&&`${u}-field`,type:n,value:i,placeholder:x,disabled:c,validate:h,onValidate:this.handleValidate,onChange:p,onKeyDown:b,onFocus:this.handleFocus,onBlur:this.handleBlur,light:C,readOnly:y,autoComplete:S,ref:$},k)),label:r,description:l,required:!!f,error:!this.state.focused&&this.state.error||""}))}}sr.defaultProps={type:"text",disabled:!1,light:!1};o.forwardRef((s,e)=>o.createElement(sr,d({},s,{forwardedRef:e})));const Ls=["onChange","value","placeholder","disabled","id","testId","style","readOnly","autoComplete","name","className","autoFocus","rows","spellCheck","wrap","minLength","maxLength","onClick","onKeyDown","onKeyUp","onFocus","onBlur","validate","onValidate","required","resizeType","light","rootStyle"],Ds="This field is required.",Ns=H("textarea");o.forwardRef(function(e,t){const{onChange:n,value:r,placeholder:l,disabled:i,id:c,testId:f,style:h,readOnly:p,autoComplete:b,name:x,className:C,autoFocus:I,rows:u,spellCheck:y,wrap:S,minLength:$,maxLength:w,onClick:k,onKeyDown:E,onKeyUp:R,onFocus:_,onBlur:j,validate:U,onValidate:te,required:ne,resizeType:Ye,light:It,rootStyle:wt}=e,$t=g(e,Ls),[ze,Pe]=o.useState(null),Oe=Fl("text-area"),Et=c??Oe.get("id"),Qe=re=>{const M=re.target.value;n(M),Je(M)},Je=re=>{if(U){const M=U(re)||null;Pe(M),te&&te(M)}else if(ne){const ge=re?null:typeof ne=="string"?ne:Ds;Pe(ge),te&&te(ge)}};Tl(()=>{r!==""&&Je(r)});const kt=()=>{const re=[le.textarea,F.LabelMedium,Ye&&Hs[Ye]],M=[le.default,!i&&le.defaultFocus,i&&le.disabled,!!ze&&le.error],ge=[le.light,!i&&le.lightFocus,i&&le.lightDisabled,!!ze&&le.lightError];return[...re,...It?ge:M]};return o.createElement(_e,{style:[{width:"100%"},wt]},o.createElement(Ns,d({id:Et,"data-testid":f,ref:t,className:C,style:[kt(),h],value:r,onChange:Qe,placeholder:l,"aria-disabled":i,readOnly:p||i,autoComplete:b,name:x,autoFocus:I,rows:u,spellCheck:y,wrap:S,minLength:$,maxLength:w,onClick:i?void 0:k,onKeyDown:i?void 0:E,onKeyUp:i?void 0:R,onFocus:_,onBlur:j,required:!!ne},$t,{"aria-invalid":!!ze})))});const pn=10,le=v.StyleSheet.create({textarea:{borderRadius:X.radius.medium_4,boxSizing:"border-box",padding:`${pn}px ${m.medium_16}px`,minHeight:`${pn*2+br.lineHeight.medium+2*X.width.hairline}px`},default:{background:a.white,border:`1px solid ${a.offBlack50}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},defaultFocus:{":focus-visible":{borderColor:a.blue,outline:`1px solid ${a.blue}`,outlineOffset:0}},disabled:{background:a.offWhite,border:`1px solid ${a.offBlack16}`,color:a.offBlack64,"::placeholder":{color:a.offBlack64},cursor:"not-allowed",":focus-visible":{outline:"none",boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},error:{background:a.fadedRed8,border:`1px solid ${a.red}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red}},light:{background:a.white,border:`1px solid ${a.offBlack16}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},lightFocus:{":focus-visible":{outline:`1px solid ${a.blue}`,outlineOffset:0,borderColor:a.blue,boxShadow:`0px 0px 0px 2px ${a.blue}, 0px 0px 0px 3px ${a.white}`}},lightDisabled:{backgroundColor:"transparent",border:`1px solid ${a.white32}`,color:a.white64,"::placeholder":{color:a.white64},cursor:"not-allowed",":focus-visible":{borderColor:ee(a.white32,a.blue),outline:"none",boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},lightError:{background:a.fadedRed8,border:`1px solid ${a.red}`,boxShadow:`0px 0px 0px 1px ${a.red}, 0px 0px 0px 2px ${a.white}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red,boxShadow:`0px 0px 0px 2px ${a.red}, 0px 0px 0px 3px ${a.white}`}}}),Hs=v.StyleSheet.create({both:{resize:"both"},none:{resize:"none"},horizontal:{resize:"horizontal"},vertical:{resize:"vertical"}}),Ms=s=>({small:16,medium:24,large:48,xlarge:96})[s],Ws=["color","icon","size","style","testId","className"],As=Te("span"),ir=o.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:l="small",style:i,testId:c,className:f}=e,h=g(e,Ws),p=Ms(l),b=`${f??""}`,x=qs(n,p);return o.createElement(As,d({},h,{className:b,style:[Kt.svg,x.icon,{maskImage:`url(${r})`},i],"data-testid":c,ref:t}))}),mn={},qs=(s,e)=>{const t=`${s}-${e}`;if(Kt[t])return Kt[t];const n={icon:{backgroundColor:s,width:e,height:e}};return mn[t]=v.StyleSheet.create(n),mn[t]},Kt=v.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});ir.displayName="PhosphorIcon";const Vs={clearSearch:"Clear search"},Us=["clearAriaLabel","autoFocus","disabled","light","id","value","placeholder","style","testId","onClick","onChange","onFocus","onBlur"],Ks=o.forwardRef(function(e,t){const{clearAriaLabel:n=Vs.clearSearch,autoFocus:r,disabled:l=!1,light:i=!1,id:c,value:f,placeholder:h,style:p,testId:b,onClick:x,onChange:C,onFocus:I,onBlur:u}=e,y=g(e,Us),S=o.useRef(null),$=()=>{var k;C(""),S==null||(k=S.current)==null||k.focus()},w=()=>f.length?o.createElement(vr,{icon:Ir,kind:"tertiary",onClick:$,style:lt.dismissIcon,"aria-label":n}):null;return o.createElement(Un,{id:c,scope:"search-field"},k=>o.createElement(Zo,{onClick:x,style:[lt.inputContainer,p]},o.createElement(ir,{icon:Ho,size:"medium",color:a.offBlack64,style:lt.searchIcon,"aria-hidden":"true"}),o.createElement(lr,d({id:`${k}-field`,type:"text",autoFocus:r,disabled:l,light:i,onChange:C,onFocus:I,onBlur:u,placeholder:h,ref:E=>{t&&(t.current=E),S.current=E},value:f,style:[lt.inputStyleReset,T.LabelMedium],testId:b},y)),w()))}),lt=v.StyleSheet.create({inputContainer:{boxSizing:"border-box",flexDirection:"row",borderRadius:m.xxxSmall_4,alignItems:"center",height:40},searchIcon:{marginLeft:m.xSmall_8,marginRight:m.xSmall_8,position:"absolute"},dismissIcon:{margin:0,position:"absolute",right:0,":hover":{border:"none"}},inputStyleReset:{display:"flex",flex:1,"::placeholder":{color:a.offBlack64},width:"100%",color:"inherit",paddingLeft:m.large_24+m.medium_16,paddingRight:m.large_24+m.medium_16}});function jt(){return jt=Object.assign||function(s){for(var e=1;e=e?s.call(null):r.id=requestAnimationFrame(n)}var r={id:requestAnimationFrame(n)};return r}var $e=null;function xn(s){if(s===void 0&&(s=!1),$e===null||s){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var n=document.createElement("div"),r=n.style;return r.width="100px",r.height="100px",e.appendChild(n),document.body.appendChild(e),e.scrollLeft>0?$e="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?$e="negative":$e="positive-ascending"),document.body.removeChild(e),$e}return $e}var Qs=150,Js=function(e,t){return e};function ei(s){var e,t=s.getItemOffset,n=s.getEstimatedTotalSize,r=s.getItemSize,l=s.getOffsetForIndexAndAlignment,i=s.getStartIndexForOffset,c=s.getStopIndexForStartIndex,f=s.initInstanceProps,h=s.shouldResetStyleCacheOnItemSizeChange,p=s.validateProps;return e=function(b){js(x,b);function x(I){var u;return u=b.call(this,I)||this,u._instanceProps=f(u.props,gn(u)),u._outerRef=void 0,u._resetIsScrollingTimeoutId=null,u.state={instance:gn(u),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof u.props.initialScrollOffset=="number"?u.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},u._callOnItemsRendered=void 0,u._callOnItemsRendered=Lt(function(y,S,$,w){return u.props.onItemsRendered({overscanStartIndex:y,overscanStopIndex:S,visibleStartIndex:$,visibleStopIndex:w})}),u._callOnScroll=void 0,u._callOnScroll=Lt(function(y,S,$){return u.props.onScroll({scrollDirection:y,scrollOffset:S,scrollUpdateWasRequested:$})}),u._getItemStyle=void 0,u._getItemStyle=function(y){var S=u.props,$=S.direction,w=S.itemSize,k=S.layout,E=u._getItemStyleCache(h&&w,h&&k,h&&$),R;if(E.hasOwnProperty(y))R=E[y];else{var _=t(u.props,y,u._instanceProps),j=r(u.props,y,u._instanceProps),U=$==="horizontal"||k==="horizontal",te=$==="rtl",ne=U?_:0;E[y]=R={position:"absolute",left:te?void 0:ne,right:te?ne:void 0,top:U?0:_,height:U?"100%":j,width:U?j:"100%"}}return R},u._getItemStyleCache=void 0,u._getItemStyleCache=Lt(function(y,S,$){return{}}),u._onScrollHorizontal=function(y){var S=y.currentTarget,$=S.clientWidth,w=S.scrollLeft,k=S.scrollWidth;u.setState(function(E){if(E.scrollOffset===w)return null;var R=u.props.direction,_=w;if(R==="rtl")switch(xn()){case"negative":_=-w;break;case"positive-descending":_=k-$-w;break}return _=Math.max(0,Math.min(_,k-$)),{isScrolling:!0,scrollDirection:E.scrollOffset0)for(var M=Je;M<=kt;M++)re.push(o.createElement(y,{data:j,key:te(M,j),index:M,isScrolling:$t?Pe:void 0,style:this._getItemStyle(M)}));var ge=n(this.props,this._instanceProps);return o.createElement(Ye||It||"div",{className:S,onScroll:Et,ref:this._outerRefSetter,style:jt({position:"relative",height:w,width:ze,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:$},wt)},o.createElement(E||R||"div",{children:re,ref:k,style:{height:Oe?"100%":ge,pointerEvents:Pe?"none":void 0,width:Oe?ge:"100%"}}))},C._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var u=this.props.itemCount;if(u>0){var y=this._getRangeToRender(),S=y[0],$=y[1],w=y[2],k=y[3];this._callOnItemsRendered(S,$,w,k)}}if(typeof this.props.onScroll=="function"){var E=this.state,R=E.scrollDirection,_=E.scrollOffset,j=E.scrollUpdateWasRequested;this._callOnScroll(R,_,j)}},C._getRangeToRender=function(){var u=this.props,y=u.itemCount,S=u.overscanCount,$=this.state,w=$.isScrolling,k=$.scrollDirection,E=$.scrollOffset;if(y===0)return[0,0,0,0];var R=i(this.props,E,this._instanceProps),_=c(this.props,R,E,this._instanceProps),j=!w||k==="backward"?Math.max(1,S):1,U=!w||k==="forward"?Math.max(1,S):1;return[Math.max(0,R-j),Math.max(0,Math.min(y-1,_+U)),R,_]},x}(o.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var ti=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ni=50,Ee=function(e,t,n){var r=e,l=r.itemSize,i=n.itemMetadataMap,c=n.lastMeasuredIndex;if(t>c){var f=0;if(c>=0){var h=i[c];f=h.offset+h.size}for(var p=c+1;p<=t;p++){var b=l(p);i[p]={offset:f,size:b},f+=b}n.lastMeasuredIndex=t}return i[t]},ri=function(e,t,n){var r=t.itemMetadataMap,l=t.lastMeasuredIndex,i=l>0?r[l].offset:0;return i>=n?ar(e,t,l,0,n):oi(e,t,Math.max(0,l),n)},ar=function(e,t,n,r,l){for(;r<=n;){var i=r+Math.floor((n-r)/2),c=Ee(e,i,t).offset;if(c===l)return i;cl&&(n=i-1)}return r>0?r-1:0},oi=function(e,t,n,r){for(var l=e.itemCount,i=1;n=n&&(i=n-1),i>=0){var f=r[i];c=f.offset+f.size}var h=n-i-1,p=h*l;return c+p},li=ei({getItemOffset:function(e,t,n){return Ee(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Cn,getOffsetForIndexAndAlignment:function(e,t,n,r,l){var i=e.direction,c=e.height,f=e.layout,h=e.width,p=i==="horizontal"||f==="horizontal",b=p?h:c,x=Ee(e,t,l),C=Cn(e,l),I=Math.max(0,Math.min(C-b,x.offset)),u=Math.max(0,x.offset-b+x.size);switch(n==="smart"&&(r>=u-b&&r<=I+b?n="auto":n="center"),n){case"start":return I;case"end":return u;case"center":return Math.round(u+(I-u)/2);case"auto":default:return r>=u&&r<=I?r:r`Select all (${s})`,noneSelected:"0 items",someSelected:s=>s===1?"1 item":`${s} items`,allSelected:"All items"},{blue:si,white:vn,offBlack:ii}=a;class Fe extends o.Component{static isClassOf(e){return e&&e.type&&e.type.__IS_ACTION_ITEM__}render(){const{disabled:e,horizontalRule:t,href:n,target:r,indent:l,label:i,lang:c,leftAccessory:f,rightAccessory:h,onClick:p,role:b,style:x,testId:C}=this.props,I=[He.wrapper,x],u=typeof i=="string"?o.createElement(bt,{lang:c,style:He.label},i):o.cloneElement(i,d({lang:c,style:He.label},i.props));return o.createElement(yo,{disabled:e,horizontalRule:t,rootStyle:I,leftAccessory:f,rightAccessory:h,style:[He.shared,l&&He.indent],role:b,testId:C,title:u,href:n,target:r,onClick:p})}}Fe.defaultProps={disabled:!1,horizontalRule:"none",indent:!1,role:"menuitem"};Fe.__IS_ACTION_ITEM__=!0;const He=v.StyleSheet.create({wrapper:{minHeight:me,touchAction:"manipulation",":focus":{borderRadius:m.xxxSmall_4,outline:`${m.xxxxSmall_2}px solid ${a.blue}`,outlineOffset:-m.xxxxSmall_2},":hover[aria-disabled=false]":{color:vn,background:si},"@media not (hover: hover)":{":hover[aria-disabled=false]":{color:vn,background:ii}},":active[aria-disabled=false]":{color:a.fadedBlue,background:a.activeBlue}},shared:{minHeight:me,height:me},label:{whiteSpace:"nowrap",userSelect:"none"},indent:{paddingLeft:m.medium_16*2}}),ai=function(e){const{selected:t}=e;return o.createElement(St,{icon:Gt,size:"small",style:[In.bounds,!t&&In.hide]})},In=v.StyleSheet.create({bounds:{alignSelf:"center",height:m.medium_16,minHeight:m.medium_16,minWidth:m.medium_16},hide:{visibility:"hidden"}}),{offBlack16:di,offBlack50:ci,offWhite:ui}=a,hi=function(e){const{disabled:t,selected:n}=e;return o.createElement(Ce,{className:"checkbox",style:[st.checkbox,n&&!t&&st.noBorder,t&&st.disabledCheckbox]},n&&o.createElement(St,{icon:Gt,size:"small",className:"check",style:[{width:m.small_12,height:m.small_12,margin:m.xxxxSmall_2},t&&n&&st.disabledCheckFormatting]}))},st=v.StyleSheet.create({checkbox:{alignSelf:"center",minHeight:m.medium_16,minWidth:m.medium_16,height:m.medium_16,borderRadius:3,borderWidth:1,borderStyle:"solid",borderColor:ci},noBorder:{borderWidth:0},disabledCheckbox:{borderColor:di,backgroundColor:ui},disabledCheckFormatting:{position:"absolute",top:-1,left:-1}}),fi=["disabled","label","selected","testId","leftAccessory","horizontalRule","parentComponent","rightAccessory","style","subtitle1","subtitle2","value","onClick","onToggle","variant","role"],pi=yt("li");class ve extends o.Component{constructor(...e){super(...e),this.handleClick=()=>{const{onClick:t,onToggle:n,value:r}=this.props;n(r),t&&t()}}static isClassOf(e){return e&&e.type&&e.type.__IS_OPTION_ITEM__}getCheckComponent(){return this.props.variant==="check"?ai:hi}renderCell(){const e=this.props,{disabled:t,label:n,selected:r,testId:l,leftAccessory:i,horizontalRule:c,parentComponent:f,rightAccessory:h,style:p,subtitle1:b,subtitle2:x,role:C}=e,I=g(e,fi),u=this.getCheckComponent(),y=[fe.item,p];return o.createElement(So,d({disabled:t,horizontalRule:c,rootStyle:f==="listbox"?fe.listboxItem:y,style:fe.itemContainer,"aria-selected":f!=="listbox"&&r?"true":"false",role:f!=="listbox"?C:void 0,testId:l,leftAccessory:o.createElement(o.Fragment,null,i?o.createElement(Ce,{style:{flexDirection:"row"}},o.createElement(u,{disabled:t,selected:r}),o.createElement(de,{size:m.xSmall_8}),i):o.createElement(u,{disabled:t,selected:r})),rightAccessory:h,subtitle1:b?o.createElement(Qt,{className:"subtitle"},b):void 0,title:o.createElement(bt,{style:fe.label},n),subtitle2:x?o.createElement(Qt,{className:"subtitle"},x):void 0,onClick:f!=="listbox"?this.handleClick:void 0},I))}render(){const{disabled:e,focused:t,parentComponent:n,role:r,selected:l}=this.props;return n==="listbox"?o.createElement(pi,{onMouseDown:i=>{i.preventDefault()},onClick:this.handleClick,style:[fe.reset,fe.item,t&&fe.itemFocused,e&&fe.itemDisabled],role:r,"aria-selected":l?"true":"false","aria-disabled":e?"true":"false",id:this.props.id,tabIndex:-1},this.renderCell()):this.renderCell()}}ve.defaultProps={disabled:!1,focused:!1,horizontalRule:"none",onToggle:()=>{},role:"option",selected:!1};ve.__IS_OPTION_ITEM__=!0;const{blue:Dt,white:Me,offBlack:mi}=a,wn={borderRadius:m.xxxSmall_4,outline:`${m.xxxxSmall_2}px solid ${a.blue}`,outlineOffset:-m.xxxxSmall_2},fe=v.StyleSheet.create({reset:{margin:0,padding:0,border:0,background:"none",outline:"none",fontSize:"100%",verticalAlign:"baseline",textAlign:"left",textDecoration:"none",listStyle:"none",cursor:"pointer"},listboxItem:{backgroundColor:"transparent",color:"inherit"},item:{backgroundColor:a.white,minHeight:"unset",":focus":wn,":focus-visible":{overflow:"visible"},":hover[aria-disabled=false]":{color:Me,background:Dt},":active[aria-selected=false]":{},":hover[aria-disabled=true]":{cursor:"not-allowed"},":is([aria-disabled=true])":{color:a.offBlack32,":focus-visible":{outline:"none"}},"@media not (hover: hover)":{":hover[aria-disabled=false]":{color:Me,background:mi}},":active[aria-disabled=false]":{color:a.fadedBlue,background:a.activeBlue},":hover[aria-disabled=false] .checkbox":{background:Me},":hover[aria-disabled=false] .check":{color:Dt},":active[aria-disabled=false] .check":{color:a.activeBlue},":is([aria-selected=true]) .checkbox":{background:Dt},":is([aria-selected=true]) .check":{color:Me},":is([aria-disabled=false]) .subtitle":{color:a.offBlack64},":hover[aria-disabled=false] .subtitle":{color:a.offWhite},":active[aria-disabled=false] .subtitle":{color:ee(a.fadedBlue16,Me)}},itemFocused:wn,itemDisabled:{outlineColor:a.offBlack32},itemContainer:{minHeight:"unset",padding:`${m.xSmall_8+m.xxxxSmall_2}px ${m.xSmall_8}px`,paddingRight:m.medium_16,whiteSpace:"nowrap"},label:{whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},hide:{visibility:"hidden"}});class ue extends o.Component{static isClassOf(e){return e&&e.type&&e.type.__IS_SEPARATOR_ITEM__}render(){return o.createElement(Ce,{style:[gi.separator,this.props.style],"aria-hidden":"true"})}}ue.__IS_SEPARATOR_ITEM__=!0;const gi=v.StyleSheet.create({separator:{boxShadow:`0 -1px ${a.offBlack16}`,height:1,minHeight:1,marginTop:m.xxxSmall_4,marginBottom:m.xxxSmall_4}});class Ct extends o.Component{constructor(...e){super(...e),this.getTestIdFromProps=t=>t.testId||t["data-testid"]}renderAnchorChildren(e,t){const{disabled:n,testId:r,text:l,opened:i,"aria-controls":c,"aria-haspopup":f,id:h}=this.props,p=this.props.children(d({},e,{text:l,opened:i})),b=p.props,x=this.getTestIdFromProps(b);return o.cloneElement(p,d({},t,{disabled:n,"aria-controls":c,id:h,"aria-expanded":i?"true":"false","aria-haspopup":f,onClick:b.onClick?C=>{b.onClick(C),t.onClick(C)}:t.onClick,"data-testid":x||r}))}render(){return o.createElement(yr,{onClick:this.props.onClick,disabled:this.props.disabled,tabIndex:0},(e,t)=>this.renderAnchorChildren(e,t))}}Ct.defaultProps={disabled:!1};class yi extends o.Component{render(){const{data:e,index:t,style:n}=this.props,r=e[t];if(ue.isClassOf(r.component))return o.cloneElement(r.component,{style:n});{const{component:l,populatedProps:i,onClick:c,role:f,ref:h}=r;return o.cloneElement(l,d({style:n},i,{key:t,onClick:c,ref:r.focusable&&h,role:f}))}}}function $n(s,e=0){return s.slice(0,hr).reduce((t,n)=>ue.isClassOf(n.component)?t+fr:t+me,e)}class bi extends o.Component{constructor(e){super(e),this.getItemSize=t=>{const n=this.props.data[t];return ue.isClassOf(n.component)?fr:me},this.state={height:$n(e.data),width:e.width}}componentDidMount(){const{schedule:e}=this.props;e.animationFrame(()=>{this.setWidth()})}componentDidUpdate(e){const{data:t,listRef:n}=this.props;e.data.length!==t.length&&(this.setHeight(),n&&n.current&&n.current.resetAfterIndex(1))}setWidth(){const e=Ie.findDOMNode(this),t=e==null?void 0:e.parentElement;if(t){const n=t.getBoundingClientRect().width;this.setState({width:n})}}setHeight(){const e=$n(this.props.data);this.setState({height:e})}renderInitialItems(){const{data:e}=this.props,t=e.map(r=>r.component);return o.Children.toArray(t).filter(Boolean).sort((r,l)=>l.props.label&&r.props.label?l.props.label.length-r.props.label.length:-1).slice(0,hr).map(r=>o.cloneElement(r,{style:{visibility:"hidden"}}))}renderVirtualizedList(e,t){const{data:n,listRef:r}=this.props;return o.createElement(li,{height:t,itemCount:n.length,itemSize:this.getItemSize,itemData:n,style:{overflowX:"hidden"},width:e,overscanCount:5,ref:r},yi)}render(){const{width:e,height:t}=this.state;return e==null?this.renderInitialItems():this.renderVirtualizedList(e,t)}}var Si=kn(bi);function xi({state:s,options:e}){const t=$r(s,e),{y:n}=s.modifiersData.preventOverflow||{x:0,y:0},{height:r}=s.rects.popper,[l]=s.placement.split("-"),c=r-t[l==="top"?"top":"bottom"]-n;s.styles.popper=d({},s.styles.popper,{maxHeight:`${c}px`,"--popper-max-height":`${c}px`})}const Ci={name:"maxHeight",enabled:!0,phase:"main",options:{padding:me},requiresIfExists:["offset","preventOverflow","flip"],fn:xi},vi=[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,tether:!1}},Ci],Ii=function({children:e,alignment:t="left",onPopperElement:n,referenceElement:r}){const l=Er(r)||document.querySelector("body");return l?Ie.createPortal(o.createElement(wr,{innerRef:i=>{i&&n&&n(i)},referenceElement:r,strategy:"fixed",placement:t==="left"?"bottom-start":"bottom-end",modifiers:vi},({placement:i,ref:c,style:f,hasPopperEscaped:h,isReferenceHidden:p})=>{const b=!!(h||p);return o.createElement("div",{ref:c,style:f,"data-testid":"dropdown-popper","data-placement":i},e(b))}),l):null};function wi(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function $i(s,e){let t;return function(...r){const l=()=>{clearTimeout(t),s(...r)};clearTimeout(t),t=setTimeout(l,e)}}function En(s){return typeof s=="string"}function Ae(s){return En(s.label)?s.label:En(s.labelAsText)?s.labelAsText:""}const Ei=125,ki=yt("span");class vt extends o.Component{static sameItemsFocusable(e,t){if(e.length!==t.length)return!1;for(let n=0;n{const{open:n,onOpenChanged:r}=this.props,l=t.target,i=Ie.findDOMNode(this);n&&i&&!i.contains(l)&&this.popperElement&&!this.popperElement.contains(l)&&r(!1)},this.handleKeyDown=t=>{const{enableTypeAhead:n,onOpenChanged:r,open:l,searchText:i}=this.props,c=t.which||t.keyCode;if(n&&wi(t.key)&&(t.stopPropagation(),this.textSuggestion+=t.key,this.handleKeyDownDebounced(this.textSuggestion)),!l){if(c===ye.down){t.preventDefault(),r(!0);return}return}switch(c){case ye.tab:if(this.isSearchFieldFocused()&&i)return;this.restoreTabOrder(),r(!1);return;case ye.space:if(this.isSearchFieldFocused())return;t.preventDefault();return;case ye.up:t.preventDefault(),this.focusPreviousItem();return;case ye.down:t.preventDefault(),this.focusNextItem();return}},this.handleKeyUp=t=>{const{onOpenChanged:n,open:r}=this.props;switch(t.which||t.keyCode){case ye.space:if(this.isSearchFieldFocused())return;t.preventDefault();return;case ye.escape:r&&(t.stopPropagation(),this.restoreTabOrder(),n(!1));return}},this.handleKeyDownDebounceResult=t=>{const n=this.props.items.filter(r=>r.focusable).findIndex(({component:r})=>{if(ue.isClassOf(r))return!1;if(ve.isClassOf(r)){const l=r.props;return Ae(l).toLowerCase().startsWith(t.toLowerCase())}return!1});if(n>=0){const r=!this.props.open;r&&this.props.onOpenChanged(!0),this.focusedIndex=n,this.scheduleToFocusCurrentItem(l=>{this.props.selectionType==="single"&&r&&l&&(l.click(),this.props.onOpenChanged(!1))})}this.textSuggestion=""},this.handleClickFocus=t=>{this.itemsClicked=!0,this.focusedIndex=t,this.focusedOriginalIndex=this.state.itemRefs[this.focusedIndex].originalIndex},this.handleDropdownMouseUp=t=>{t.nativeEvent.stopImmediatePropagation?t.nativeEvent.stopImmediatePropagation():t.stopPropagation()},this.handleItemClick=(t,n)=>{this.handleClickFocus(t),n.component.props.onClick&&n.component.props.onClick(),n.populatedProps.onClick&&n.populatedProps.onClick()},this.handleSearchTextChanged=t=>{const{onSearchTextChanged:n}=this.props;n&&n(t)},this.resetFocusedIndex(),this.state={prevItems:this.props.items,itemRefs:[],sameItemsFocusable:!1,labels:d({noResults:K.noResults,someResults:K.someSelected},e.labels)},this.virtualizedListRef=o.createRef(),this.handleKeyDownDebounced=$i(this.handleKeyDownDebounceResult,500),this.textSuggestion=""}componentDidMount(){this.updateEventListeners(),this.maybeFocusInitialItem()}componentDidUpdate(e){const{open:t,searchText:n}=this.props;if(e.open!==t)this.updateEventListeners(),this.maybeFocusInitialItem();else if(t){const{itemRefs:r,sameItemsFocusable:l}=this.state;if(l||e.searchText!==n)return;{const i=r.findIndex(c=>c.originalIndex===this.focusedOriginalIndex);i===-1?(this.focusedIndex=0,this.itemsClicked=!1,this.scheduleToFocusCurrentItem()):this.focusedIndex=i}this.props.labels!==e.labels&&this.setState({labels:d({},this.state.labels,this.props.labels)})}}componentWillUnmount(){this.removeEventListeners()}resetFocusedIndex(){const{initialFocusedIndex:e}=this.props;if(typeof e<"u")this.focusedIndex=e;else{if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=0}}maybeFocusInitialItem(){const{autoFocus:e,open:t}=this.props;e&&(t?(this.resetFocusedIndex(),this.scheduleToFocusCurrentItem()):t||(this.itemsClicked=!1))}updateEventListeners(){this.props.open?this.addEventListeners():this.removeEventListeners()}addEventListeners(){document.addEventListener("mouseup",this.handleInteract),document.addEventListener("touchend",this.handleInteract)}removeEventListeners(){document.removeEventListener("mouseup",this.handleInteract),document.removeEventListener("touchend",this.handleInteract)}scheduleToFocusCurrentItem(e){this.shouldVirtualizeList()?this.props.schedule.animationFrame(()=>{this.focusCurrentItem(e)}):this.focusCurrentItem(e)}focusCurrentItem(e){const t=this.state.itemRefs[this.focusedIndex];if(t){this.virtualizedListRef.current&&this.virtualizedListRef.current.scrollToItem(t.originalIndex);const n=Ie.findDOMNode(t.ref.current);n&&(n.focus(),this.focusedOriginalIndex=t.originalIndex,e&&e(n))}}focusSearchField(){this.searchFieldRef.current&&this.searchFieldRef.current.focus()}hasSearchField(){return!!this.props.isFilterable}isSearchFieldFocused(){return this.hasSearchField()&&document.activeElement===this.searchFieldRef.current}focusPreviousItem(){if(this.focusedIndex===0||this.isSearchFieldFocused()&&!this.props.enableTypeAhead){if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=this.state.itemRefs.length-1}else this.focusedIndex-=1;this.scheduleToFocusCurrentItem()}focusNextItem(){if(this.focusedIndex===this.state.itemRefs.length-1||this.isSearchFieldFocused()&&!this.props.enableTypeAhead){if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=0}else this.focusedIndex+=1;this.scheduleToFocusCurrentItem()}restoreTabOrder(){this.props.openerElement&&this.props.openerElement.focus()}getItemRole(){const{role:e}=this.props;switch(e){case"listbox":return"option";case"menu":return"menuitem";default:throw new Error(`Expected "listbox" or "menu" for role, but receieved "${e}" instead.`)}}maybeRenderNoResults(){const{items:e,labels:{noResults:t}}=this.props;return e.length===0?o.createElement(bt,{style:pe.noResult,testId:"dropdown-core-no-results"},t):null}shouldVirtualizeList(){return this.props.items.length>Ei}renderList(){let e=0;const t=this.getItemRole();return this.props.items.map((n,r)=>{if(ue.isClassOf(n.component))return n.component;const{component:l,focusable:i,populatedProps:c}=n;i&&(e+=1);const f=e-1,h=this.state.itemRefs[f]?this.state.itemRefs[f].ref:null;return o.cloneElement(l,d({},c,{key:r,onClick:()=>{this.handleItemClick(f,n)},ref:i?h:null,role:c.role||t}))})}parseVirtualizedItems(){let e=0;const t=this.getItemRole();return this.props.items.map((n,r)=>{const{populatedProps:l}=n;!ue.isClassOf(n.component)&&n.focusable&&(e+=1);const i=e-1;return d({},n,{role:l.role||t,ref:n.focusable&&this.state.itemRefs[i]?this.state.itemRefs[i].ref:null,onClick:()=>{this.handleItemClick(i,n)}})})}renderVirtualizedList(){const e=this.parseVirtualizedItems();return o.createElement(Si,{data:e,listRef:this.virtualizedListRef})}renderSearchField(){const{searchText:e}=this.props,{labels:t}=this.state;return o.createElement(Ks,{clearAriaLabel:t.clearSearch,onChange:this.handleSearchTextChanged,placeholder:t.filter,ref:this.searchFieldRef,style:pe.searchInputStyle,value:e||""})}renderDropdownMenu(e,t){const{"aria-invalid":n,"aria-required":r,dropdownStyle:l,isFilterable:i,light:c,openerElement:f,role:h,id:p}=this.props,b=f&&window.getComputedStyle(f),x=b?b.getPropertyValue("width"):0;return o.createElement(Ce,{onMouseUp:this.handleDropdownMouseUp,style:[pe.dropdown,c&&pe.light,t&&pe.hidden,l],testId:"dropdown-core-container"},i&&this.renderSearchField(),o.createElement(Ce,{id:p,role:h,style:[pe.listboxOrMenu,{minWidth:x}],"aria-invalid":h==="listbox"?n:void 0,"aria-required":h==="listbox"?r:void 0},e),this.maybeRenderNoResults())}renderDropdown(){const{alignment:e,openerElement:t}=this.props,n=this.shouldVirtualizeList()?this.renderVirtualizedList():this.renderList();return o.createElement(Ii,{alignment:e,onPopperElement:r=>{this.popperElement=r},referenceElement:t},r=>this.renderDropdownMenu(n,r))}renderLiveRegion(){const{items:e,open:t}=this.props,{labels:n}=this.state,r=e.length;return o.createElement(ki,{"aria-live":"polite","aria-atomic":"true","aria-relevant":"additions text",style:pe.srOnly,"data-testid":"dropdown-live-region"},t&&n.someResults(r))}render(){const{open:e,opener:t,style:n,className:r,disabled:l}=this.props;return o.createElement(Ce,{onKeyDown:l?void 0:this.handleKeyDown,onKeyUp:l?void 0:this.handleKeyUp,style:[pe.menuWrapper,n],className:r},this.renderLiveRegion(),t,e&&this.renderDropdown())}}vt.defaultProps={alignment:"left",autoFocus:!0,enableTypeAhead:!0,labels:{clearSearch:K.clearSearch,filter:K.filter,noResults:K.noResults,someResults:K.someSelected},light:!1,selectionType:"single"};const pe=v.StyleSheet.create({menuWrapper:{width:"fit-content"},dropdown:{backgroundColor:a.white,borderRadius:4,paddingTop:m.xxxSmall_4,paddingBottom:m.xxxSmall_4,border:`solid 1px ${a.offBlack16}`,boxShadow:`0px 8px 8px 0px ${Sr(a.offBlack,.1)}`,maxHeight:"var(--popper-max-height)"},light:{border:"none"},listboxOrMenu:{overflowY:"auto"},hidden:{pointerEvents:"none",visibility:"hidden"},noResult:{color:a.offBlack64,alignSelf:"center",marginTop:m.xxSmall_6},searchInputStyle:{margin:m.xSmall_8,marginTop:m.xxxSmall_4,minHeight:"auto",position:"sticky"},srOnly:{border:0,clip:"rect(0,0,0,0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}});var Zt=kn(vt);const Ri=["children","disabled","focused","hovered","pressed","waiting","testId","opened","aria-label"],_i=yt("button");class Fi extends o.Component{render(){const e=this.props,{children:t,disabled:n,focused:r,hovered:l,pressed:i,testId:c,opened:f,"aria-label":h}=e,p=g(e,Ri),b=a.blue,x=Ti(b),C=n,I=[Nt.shared,C&&Nt.disabled,x.default,C&&x.disabled,!C&&i&&x.active],u=o.createElement(xr,{style:Nt.text},t);return o.createElement(_i,d({"aria-expanded":f?"true":"false","aria-haspopup":"menu","aria-label":h,disabled:C,style:I,type:"button"},p,{"data-testid":c}),o.createElement(Ce,{style:!C&&(l||r)&&x.focus},u),o.createElement(de,{size:m.xxxSmall_4}),o.createElement(St,{size:"small",color:"currentColor",icon:dr,"aria-hidden":"true"}))}}const Nt=v.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:me,border:"none",borderRadius:m.xxxSmall_4,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{height:m.xLarge_32},text:{textAlign:"left",display:"inline-block",alignItems:"center",fontWeight:"bold",userSelect:"none",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"}}),it={},Ti=s=>{const e=s;if(it[e])return it[e];const{offBlack32:t}=a,n=a.activeBlue;let r={};return r={default:{background:"none",color:s},focus:{":after":{content:"''",position:"absolute",height:2,left:0,right:0,bottom:-1,background:"currentColor",borderRadius:2}},active:{color:n},disabled:{color:t,cursor:"default"}},it[e]=v.StyleSheet.create(r),it[e]},zi=["text","opened"];class Pi extends o.Component{constructor(...e){super(...e),this.openerElement=void 0,this.state={opened:!1},this.handleItemSelected=()=>{this.handleOpenChanged(!1),this.openerElement&&this.openerElement.focus()},this.handleOpenChanged=t=>{this.setState({opened:t}),this.props.onToggle&&this.props.onToggle(t)},this.handleOptionSelected=t=>{const{onChange:n,selectedValues:r}=this.props;if(!(!n||!r)){if(r.includes(t)){const l=r.indexOf(t),i=[...r.slice(0,l),...r.slice(l+1)];n(i)}else n([...r,t]);this.handleItemSelected()}},this.handleOpenerRef=t=>{this.openerElement=Ie.findDOMNode(t)},this.handleClick=t=>{this.handleOpenChanged(!this.state.opened)}}static getDerivedStateFromProps(e,t){return{opened:typeof e.opened=="boolean"?e.opened:t.opened}}getMenuItems(){const{children:e,selectedValues:t}=this.props,n=o.Children.toArray(e).filter(Boolean),r=n.some(l=>ve.isClassOf(l));return n.map(l=>{const{value:i,disabled:c}=l.props,f={component:l,focusable:Fe.isClassOf(l)||ve.isClassOf(l)?!c:!1,populatedProps:{}};if(Fe.isClassOf(l))return d({},f,{populatedProps:{indent:r,onClick:this.handleItemSelected}});if(ve.isClassOf(l)){const h=t?t.includes(i):!1;return d({},f,{populatedProps:{onToggle:this.handleOptionSelected,selected:h,variant:"check",role:"menuitemcheckbox","aria-checked":h,"aria-selected":void 0}})}else return f})}renderOpener(e,t){const{disabled:n,menuText:r,opener:l,testId:i,id:c}=this.props;return o.createElement(ke,{id:c,scope:"action-menu-opener"},f=>o.createElement(Ct,{id:f,"aria-controls":t,"aria-haspopup":"menu",onClick:this.handleClick,disabled:e===0||n,text:r,ref:this.handleOpenerRef,testId:l?void 0:i,opened:this.state.opened},l||(h=>{const{opened:p}=h,b=g(h,zi);return o.createElement(Fi,d({},b,{disabled:n,opened:!!p,testId:i}),r)})))}render(){const{alignment:e,dropdownStyle:t,style:n,className:r,dropdownId:l}=this.props,i=this.getMenuItems();return o.createElement(ke,{id:l,scope:"action-menu-dropdown"},c=>o.createElement(Zt,{id:c,role:"menu",style:n,className:r,opener:this.renderOpener(i.length,c),alignment:e,open:this.state.opened,items:i,openerElement:this.openerElement,onOpenChanged:this.handleOpenChanged,dropdownStyle:[Oi.menuTopSpace,t]}))}}Pi.defaultProps={alignment:"left",disabled:!1};const Oi=v.StyleSheet.create({caret:{marginLeft:4},opener:{whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},menuTopSpace:{top:-4}}),Bi=["children","disabled","error","id","isPlaceholder","light","open","testId","onOpenChanged"],Li=yt("button");class Yt extends o.Component{constructor(e){super(e),this.handleClick=t=>{const{open:n}=this.props;this.props.onOpenChanged(!n)},this.handleKeyDown=t=>{const n=t.key;(n==="Enter"||n===" ")&&(this.setState({pressed:!0}),t.preventDefault())},this.handleKeyUp=t=>{const n=t.key;(n==="Enter"||n===" ")&&(this.setState({pressed:!1}),this.handleClick(t))},this.state={pressed:!1}}render(){const e=this.props,{children:t,disabled:n,error:r,id:l,isPlaceholder:i,light:c,open:f,testId:h}=e,p=g(e,Bi),b=Di(c,i,r),x=c?n||r?"currentColor":a.white:n?a.offBlack32:a.offBlack64,C=[Ht.shared,b.default,n&&b.disabled,!n&&this.state.pressed&&b.pressed];return o.createElement(Li,d({},p,{"aria-disabled":n,"aria-expanded":f?"true":"false","aria-haspopup":"listbox","data-testid":h,id:l,style:C,type:"button",onClick:n?void 0:this.handleClick,onKeyDown:n?void 0:this.handleKeyDown,onKeyUp:n?void 0:this.handleKeyUp}),o.createElement(bt,{style:Ht.text},t||" "),o.createElement(St,{icon:dr,color:x,size:"small",style:Ht.caret,"aria-hidden":"true"}))}}Yt.defaultProps={disabled:!1,error:!1,light:!1,isPlaceholder:!1};const Ht=v.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"space-between",color:a.offBlack,height:me,paddingLeft:m.medium_16,paddingRight:m.small_12,borderWidth:0,borderRadius:X.radius.medium_4,borderStyle:"solid",outline:"none",textDecoration:"none",boxSizing:"border-box",whiteSpace:"nowrap",touchAction:"manipulation"},text:{marginRight:m.xSmall_8,whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},caret:{minWidth:16}}),at=m.medium_16-1,dt=m.small_12-1,ct={},Di=(s,e,t)=>{const n=`${s}-${e}-${t}`;if(ct[n])return ct[n];let r={};if(s){const l={borderColor:t?a.red:a.white,borderWidth:m.xxxxSmall_2,paddingLeft:at,paddingRight:dt},i={paddingLeft:at,paddingRight:dt,borderColor:t?a.red:a.fadedBlue,borderWidth:X.width.thin,color:t?a.offBlack64:e?ee(a.white32,a.blue):a.fadedBlue,backgroundColor:t?a.fadedRed:a.activeBlue};r={default:{background:t?a.fadedRed8:"transparent",color:t?a.offBlack64:e?a.white50:a.white,borderColor:t?a.red:a.white50,borderWidth:X.width.hairline,":hover:not([aria-disabled=true])":l,"@media not (hover: hover)":{":hover:not([aria-disabled=true])":{borderColor:t?a.red:a.white50,borderWidth:X.width.hairline,paddingLeft:m.medium_16,paddingRight:m.small_12}},":focus-visible:not([aria-disabled=true])":l,":active:not([aria-disabled=true])":i},disabled:{background:"transparent",borderColor:ee(a.white32,a.blue),color:ee(a.white32,a.blue),cursor:"not-allowed",":focus-visible":{boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},pressed:i}}else{const l={borderColor:t?a.red:a.blue,borderWidth:X.width.thin,paddingLeft:at,paddingRight:dt},i={background:t?a.fadedRed:a.fadedBlue,borderColor:t?a.red:a.activeBlue,borderWidth:X.width.thin,paddingLeft:at,paddingRight:dt};r={default:{background:t?a.fadedRed8:a.white,borderColor:t?a.red:a.offBlack50,borderWidth:X.width.hairline,color:e?a.offBlack64:a.offBlack,":hover:not([aria-disabled=true])":l,"@media not (hover: hover)":{":hover:not([aria-disabled=true])":{borderColor:t?a.red:a.offBlack50,borderWidth:X.width.hairline,paddingLeft:m.medium_16,paddingRight:m.small_12}},":focus-visible:not([aria-disabled=true])":l,":active:not([aria-disabled=true])":i},disabled:{background:a.offWhite,borderColor:a.offBlack16,color:a.offBlack64,cursor:"not-allowed",":focus-visible":{boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},pressed:i}}return ct[n]=v.StyleSheet.create(r),ct[n]},Ni=["children","error","id","light","opener","placeholder","selectedValue","testId","alignment","autoFocus","dropdownStyle","enableTypeAhead","isFilterable","labels","onChange","onToggle","opened","style","className","aria-invalid","aria-required"];class pr extends o.Component{constructor(e){super(e),this.selectedIndex=void 0,this.handleOpenChanged=t=>{this.setState({open:t,searchText:""}),this.props.onToggle&&this.props.onToggle(t)},this.handleToggle=t=>{t!==this.props.selectedValue&&this.props.onChange(t),this.state.open&&this.state.openerElement&&this.state.openerElement.focus(),this.setState({open:!1}),this.props.onToggle&&this.props.onToggle(!1)},this.mapOptionItemsToDropdownItems=t=>{let n=0;return this.selectedIndex=0,t.map(r=>{const{selectedValue:l}=this.props,{disabled:i,value:c}=r.props,f=l===c;return f&&(this.selectedIndex=n),i||(n+=1),{component:r,focusable:!i,populatedProps:{onToggle:this.handleToggle,selected:f,variant:"check"}}})},this.handleSearchTextChanged=t=>{this.setState({searchText:t})},this.handleOpenerRef=t=>{const n=Ie.findDOMNode(t);this.setState({openerElement:n})},this.handleClick=t=>{this.handleOpenChanged(!this.state.open)},this.selectedIndex=0,this.state={open:!1,searchText:""}}static getDerivedStateFromProps(e,t){return{open:e.disabled?!1:typeof e.opened=="boolean"?e.opened:t.open}}filterChildren(e){const{searchText:t}=this.state,n=t.toLowerCase();return e.filter(({props:r})=>!t||Ae(r).toLowerCase().indexOf(n)>-1)}getMenuItems(e){const{isFilterable:t}=this.props;return this.mapOptionItemsToDropdownItems(t?this.filterChildren(e):e)}renderOpener(e,t){const n=this.props,{children:r,error:l,id:i,light:c,opener:f,placeholder:h,selectedValue:p,testId:b}=n,x=g(n,Ni),I=o.Children.toArray(r).find(S=>S.props.value===p),u=I?Ae(I.props):h;return o.createElement(ke,{id:i,scope:"single-select-opener"},S=>f?o.createElement(Ct,{id:S,"aria-controls":t,"aria-haspopup":"listbox",onClick:this.handleClick,disabled:e,ref:this.handleOpenerRef,text:u,opened:this.state.open},f):o.createElement(Yt,d({},x,{"aria-controls":t,disabled:e,id:S,error:l,isPlaceholder:!I,light:c,onOpenChanged:this.handleOpenChanged,open:this.state.open,ref:this.handleOpenerRef,testId:b}),u))}render(){const{alignment:e,autoFocus:t,children:n,className:r,dropdownStyle:l,enableTypeAhead:i,isFilterable:c,labels:f,light:h,style:p,"aria-invalid":b,"aria-required":x,disabled:C,dropdownId:I}=this.props,{searchText:u}=this.state,y=o.Children.toArray(n).filter(Boolean),S=y.filter(k=>!k.props.disabled).length,$=this.getMenuItems(y),w=S===0||C;return o.createElement(ke,{id:I,scope:"single-select-dropdown"},k=>o.createElement(Zt,{id:k,role:"listbox",selectionType:"single",alignment:e,autoFocus:t,enableTypeAhead:i,dropdownStyle:[c&&ur,cr,l],initialFocusedIndex:this.selectedIndex,items:$,light:h,onOpenChanged:this.handleOpenChanged,open:this.state.open,opener:this.renderOpener(w,k),openerElement:this.state.openerElement,style:p,className:r,isFilterable:c,onSearchTextChanged:c?this.handleSearchTextChanged:void 0,searchText:c?u:"",labels:f,"aria-invalid":b,"aria-required":x,disabled:w}))}}pr.defaultProps={alignment:"left",autoFocus:!0,disabled:!1,enableTypeAhead:!0,error:!1,light:!1,labels:{clearSearch:K.clearSearch,filter:K.filter,noResults:K.noResults,someResults:K.someSelected}};const Hi=["id","light","opener","testId","alignment","dropdownStyle","implicitAllEnabled","isFilterable","labels","onChange","onToggle","opened","selectedValues","shortcuts","style","className","aria-invalid","aria-required"];class mr extends o.Component{constructor(e){super(e),this.labels=void 0,this.handleOpenChanged=t=>{this.setState({open:t,searchText:"",lastSelectedValues:this.props.selectedValues}),this.props.onToggle&&this.props.onToggle(t)},this.handleToggle=t=>{const{onChange:n,selectedValues:r}=this.props;if(r.includes(t)){const l=r.indexOf(t),i=[...r.slice(0,l),...r.slice(l+1)];n(i)}else n([...r,t])},this.handleSelectAll=()=>{const{children:t,onChange:n}=this.props,l=o.Children.toArray(t).filter(i=>!!i&&!i.props.disabled).map(i=>i.props.value);n(l)},this.handleSelectNone=()=>{const{onChange:t}=this.props;t([])},this.mapOptionItemToDropdownItem=t=>{const{selectedValues:n}=this.props,{disabled:r,value:l}=t.props;return{component:t,focusable:!r,populatedProps:{onToggle:this.handleToggle,selected:n.includes(l),variant:"checkbox"}}},this.handleOpenerRef=t=>{const n=Ie.findDOMNode(t);this.setState({openerElement:n})},this.handleSearchTextChanged=t=>{this.setState({searchText:t})},this.handleClick=t=>{this.handleOpenChanged(!this.state.open)},this.state={open:!1,searchText:"",lastSelectedValues:[],labels:d({},K,e.labels)},this.labels=d({},K,e.labels)}static getDerivedStateFromProps(e,t){return{open:e.disabled?!1:typeof e.opened=="boolean"?e.opened:t.open}}componentDidUpdate(e){this.props.labels!==e.labels&&this.setState({labels:d({},this.state.labels,this.props.labels)})}getMenuText(e){const{implicitAllEnabled:t,selectedValues:n}=this.props,{noneSelected:r,someSelected:l,allSelected:i}=this.state.labels,c=e.filter(h=>!h.props.disabled).length,f=t?i:r;switch(n.length){case 0:return f;case 1:const h=e.find(p=>p.props.value===n[0]);if(h){const p=Ae(h==null?void 0:h.props);return p||l(1)}return f;case c:return i;default:return l(n.length)}}getShortcuts(e){const{selectedValues:t,shortcuts:n}=this.props,{selectAllLabel:r,selectNoneLabel:l}=this.state.labels;if(n&&!this.state.searchText){const i=e===t.length,c={component:o.createElement(Fe,{disabled:i,label:r(e),indent:!0,onClick:this.handleSelectAll}),focusable:!i,populatedProps:{}},f=t.length===0,h={component:o.createElement(Fe,{disabled:f,label:l,indent:!0,onClick:this.handleSelectNone}),focusable:!f,populatedProps:{}},p={component:o.createElement(ue,{key:"shortcuts-separator"}),focusable:!1,populatedProps:{}};return[c,h,p]}else return[]}getMenuItems(e){const{isFilterable:t}=this.props;if(!t)return e.map(this.mapOptionItemToDropdownItem);const{searchText:n,lastSelectedValues:r}=this.state,l=n.toLowerCase(),i=e.filter(({props:p})=>!n||Ae(p).toLowerCase().indexOf(l)>-1),c=[],f=[];for(const p of i)r.includes(p.props.value)?c.push(p):f.push(p);const h=c.map(this.mapOptionItemToDropdownItem);return c.length&&f.length&&h.push({component:o.createElement(ue,{key:"selected-separator"}),focusable:!1,populatedProps:{}}),[...h,...f.map(this.mapOptionItemToDropdownItem)]}renderOpener(e,t,n){const r=this.props,{id:l,light:i,opener:c,testId:f}=r,h=g(r,Hi),{noneSelected:p}=this.state.labels,b=this.getMenuText(e);return o.createElement(ke,{id:l,scope:"multi-select-opener"},C=>c?o.createElement(Ct,{id:C,"aria-controls":n,"aria-haspopup":"listbox",onClick:this.handleClick,disabled:t,ref:this.handleOpenerRef,text:b,opened:this.state.open},c):o.createElement(Yt,d({},h,{disabled:t,id:C,"aria-controls":n,isPlaceholder:b===p,light:i,onOpenChanged:this.handleOpenChanged,open:this.state.open,ref:this.handleOpenerRef,testId:f}),b))}render(){const{alignment:e,light:t,style:n,className:r,dropdownStyle:l,children:i,isFilterable:c,"aria-invalid":f,"aria-required":h,disabled:p,dropdownId:b}=this.props,{open:x,searchText:C}=this.state,{clearSearch:I,filter:u,noResults:y,someSelected:S}=this.state.labels,$=o.Children.toArray(i).filter(Boolean),w=$.filter(R=>!R.props.disabled).length,k=this.getMenuItems($),E=w===0||p;return o.createElement(ke,{id:b,scope:"multi-select-dropdown"},R=>o.createElement(Zt,{id:R,role:"listbox",alignment:e,dropdownStyle:[c&&ur,cr,l],isFilterable:c,items:[...this.getShortcuts(w),...k],light:t,onOpenChanged:this.handleOpenChanged,open:x,opener:this.renderOpener($,E,R),openerElement:this.state.openerElement,selectionType:"multi",style:n,className:r,onSearchTextChanged:c?this.handleSearchTextChanged:void 0,searchText:c?C:"",labels:{clearSearch:I,filter:u,noResults:y,someResults:S},"aria-invalid":f,"aria-required":h,disabled:E}))}}mr.defaultProps={alignment:"left",disabled:!1,error:!1,light:!1,shortcuts:!1,selectedValues:[]};v.StyleSheet.create({listbox:{outline:"none"},disabled:{color:a.offBlack64}});const Mi=s=>{const{strings:e}=kr(),t=h=>{const{choices:p,onChange:b}=s;b(p.map(x=>h.includes(x.content)))},n=h=>h.map(({content:p})=>et(ve,{value:p,label:et(Rr,{content:p,strings:e,inline:!0})},p)),r=s.choices.filter(h=>h.checked).map(h=>h.content),{opener:l,onToggle:i,disabled:c}=s,f={style:{zIndex:"unset"},children:n(s.choices),opener:l,onToggle:i,disabled:c};return s.multipleSelect?et(mr,{...f,selectedValues:r,onChange:h=>t(h)}):et(pr,{...f,selectedValue:r[0],onChange:h=>t([h]),placeholder:s.choices[0].content})};Mi.__docgenInfo={description:"",methods:[],displayName:"AnswerChoices",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ // The answer string, can be plain text or a TeX expression. content: string; // Whether the answer is selected. diff --git a/assets/answer-choices-IbySI0ZR.js b/assets/answer-choices-Zdsv-TtU.js similarity index 93% rename from assets/answer-choices-IbySI0ZR.js rename to assets/answer-choices-Zdsv-TtU.js index 97e836f6fb..c34fbab85e 100644 --- a/assets/answer-choices-IbySI0ZR.js +++ b/assets/answer-choices-Zdsv-TtU.js @@ -1,3 +1,3 @@ -import{a as c,j as e}from"./jsx-runtime-FVsy8kgq.js";import{b as R}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as x}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{l as t}from"./index-awljIyHI.js";import{F as N}from"./form-wrapped-text-field-A2kf-LD-.js";import{r as T}from"./index-TT1qJ6UJ.js";import{a as q}from"./global-colors-VIVU4Od4.js";const S="javascript:void(0)",h=class h extends T.Component{render(){const{children:s,className:i,highlighted:n,href:d,inlineStyles:k,referrer:p,style:m,target:f,testId:b,element:g,...w}=this.props,[C,v]=d?d.split("#"):[S];let o=C;p&&(o.indexOf("?")>-1?o+="&ref="+p:o+="?ref="+p),v&&(o+="#"+v);const u=[E.link,n&&E.highlighted];Array.isArray(m)?u.push(...m):u.push(m);const I=i?" "+i:"",M=g==="a"?{href:o}:{to:o};let y=w.rel;return f==="_blank"&&!y&&(y="noopener noreferrer"),T.createElement(g,{"data-testid":b,...w,...M,className:t.css(...u)+I,style:k,target:f,rel:y},s)}};h.defaultProps={highlighted:!1,href:S,style:[],element:"a"};let l=h;const E=t.StyleSheet.create({link:{backgroundColor:"transparent",color:"inherit",textDecoration:"none",":hover":{textDecoration:"underline"}},highlighted:{textDecoration:"underline"}});l.__docgenInfo={description:"A wrapper that creates an anchor tag with normalized styles",methods:[],displayName:"Link",props:{element:{required:!1,tsType:{name:"ReactElementType",raw:"React.ElementType"},description:"",defaultValue:{value:'"a"',computed:!1}},highlighted:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},href:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"javascript:void(0)"',computed:!1}},style:{required:!1,tsType:{name:"union",raw:"CSSProperties | Array",elements:[{name:"CSSProperties"},{name:"Array",elements:[{name:"CSSProperties"}],raw:"Array"}]},description:"",defaultValue:{value:"[]",computed:!1}},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""},inlineStyles:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{a as c,j as e}from"./jsx-runtime-FVsy8kgq.js";import{b as R}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as x}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{l as t}from"./index-awljIyHI.js";import{F as N}from"./form-wrapped-text-field-A2kf-LD-.js";import{r as T}from"./index-TT1qJ6UJ.js";import{a as q}from"./global-colors-VIVU4Od4.js";const S="javascript:void(0)",h=class h extends T.Component{render(){const{children:s,className:i,highlighted:n,href:d,inlineStyles:k,referrer:p,style:m,target:f,testId:b,element:g,...w}=this.props,[C,v]=d?d.split("#"):[S];let o=C;p&&(o.indexOf("?")>-1?o+="&ref="+p:o+="?ref="+p),v&&(o+="#"+v);const u=[E.link,n&&E.highlighted];Array.isArray(m)?u.push(...m):u.push(m);const I=i?" "+i:"",M=g==="a"?{href:o}:{to:o};let y=w.rel;return f==="_blank"&&!y&&(y="noopener noreferrer"),T.createElement(g,{"data-testid":b,...w,...M,className:t.css(...u)+I,style:k,target:f,rel:y},s)}};h.defaultProps={highlighted:!1,href:S,style:[],element:"a"};let l=h;const E=t.StyleSheet.create({link:{backgroundColor:"transparent",color:"inherit",textDecoration:"none",":hover":{textDecoration:"underline"}},highlighted:{textDecoration:"underline"}});l.__docgenInfo={description:"A wrapper that creates an anchor tag with normalized styles",methods:[],displayName:"Link",props:{element:{required:!1,tsType:{name:"ReactElementType",raw:"React.ElementType"},description:"",defaultValue:{value:'"a"',computed:!1}},highlighted:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},href:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"javascript:void(0)"',computed:!1}},style:{required:!1,tsType:{name:"union",raw:"CSSProperties | Array",elements:[{name:"CSSProperties"},{name:"Array",elements:[{name:"CSSProperties"}],raw:"Array"}]},description:"",defaultValue:{value:"[]",computed:!1}},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""},inlineStyles:{required:!1,tsType:{name:"signature",type:"object",raw:`{ [key: string]: any; }`,signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}},description:""},referrer:{required:!1,tsType:{name:"string"},description:""},target:{required:!1,tsType:{name:"string"},description:""},rel:{required:!1,tsType:{name:"string"},description:""},testId:{required:!1,tsType:{name:"string"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseOver:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseLeave:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseEnter:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.SyntheticEvent) => unknown",signature:{arguments:[{type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.SyntheticEvent) => unknown",signature:{arguments:[{type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onKeyDown:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.KeyboardEvent) => unknown",signature:{arguments:[{type:{name:"ReactKeyboardEvent",raw:"React.KeyboardEvent"},name:"e"}],return:{name:"unknown"}}},description:""},"aria-label":{required:!1,tsType:{name:"string"},description:""},"aria-selected":{required:!1,tsType:{name:"boolean"},description:""},"aria-current":{required:!1,tsType:{name:"boolean"},description:""},role:{required:!1,tsType:{name:"literal",value:'"tab"'},description:""},title:{required:!1,tsType:{name:"string"},description:""},id:{required:!1,tsType:{name:"string"},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""}}};const{Icon:A}=x,z={path:"M11 11V7a1 1 0 0 1 2 0v4h4a1 1 0 0 1 0 2h-4v4a1 1 0 0 1-2 0v-4H7a1 1 0 0 1 0-2h4zm1 13C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12-5.373 12-12 12zm0-2c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",width:24,height:24},B={path:"M12 24C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12-5.373 12-12 12zm0-2c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zm-5-9a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2H7z",width:24,height:24},D=()=>c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",children:[c("filter",{id:"draggable-grip-shadow",width:"112.5%",height:"116.7%",x:"-6.2%",y:"-8.3%",filterUnits:"objectBoundingBox",children:[e("feGaussianBlur",{in:"SourceAlpha",stdDeviation:".5",result:"shadowBlurInner"}),e("feOffset",{in:"shadowBlurInner",dy:"1",result:"shadowOffsetInner"}),e("feComposite",{in:"shadowOffsetInner",in2:"SourceAlpha",k2:"-1",k3:"1",operator:"arithmetic",result:"shadowInnerInner"}),e("feColorMatrix",{in:"shadowInnerInner",values:"0 0 0 0 0.129411765 0 0 0 0 0.141176471 0 0 0 0 0.17254902 0 0 0 0.2 0"})]}),e("path",{d:"M1 4a1 1 0 1 1 0-2h14a1 1 0 0 1 0 2H1zm0 10a1 1 0 0 1 0-2h14a1 1 0 0 1 0 2H1zm0-5a1 1 0 1 1 0-2h14a1 1 0 0 1 0 2H1z",fill:q,filter:"url(#draggable-grip-shadow)"})]}),P=({onClick:r})=>c(l,{className:t.css(a.addAnswer,F.addAnswer),onClick:r,children:[e(A,{icon:z,size:24}),e("div",{className:t.css(a.spacer)}),"Add an answer choice"]}),j=({answer:r,onChange:s,onRemove:i})=>c("li",{className:t.css(a.answer),children:[e(l,{onClick:i,children:e(A,{icon:B,size:24,color:"#D92916"})}),e("div",{className:t.css(a.spacer)}),e(N,{grow:1,onChange:n=>s(n.target.value),value:r}),e("div",{className:t.css(a.spacer)}),e(l,{style:[a.disabled],title:"Answer reordering is not implemented.",children:e(D,{})})]}),H=({choices:r,onChange:s})=>c("div",{children:[e("div",{className:t.css(a.title),children:"Answer Choices"}),e("ul",{className:t.css(a.answers),children:r.map((i,n)=>e(j,{answer:i,onChange:d=>s([...r.slice(0,n),d,...r.slice(n+1)]),onRemove:()=>s([...r.slice(0,n),...r.slice(n+1)])},n))}),e(P,{onClick:()=>s([...r,""])})]}),a=t.StyleSheet.create({title:{...R,marginBottom:6,color:q},answers:{marginTop:12,marginBottom:12},answer:{display:"flex",flexDirection:"row",alignItems:"center",":not(:first-child)":{marginTop:12}},addAnswer:{...R,display:"flex",flexDirection:"row",alignItems:"center",color:"#1865f2"},spacer:{width:16},disabled:{cursor:"not-allowed"}}),F=t.StyleSheet.create({addAnswer:{":link":{color:"#1865f2"}}});H.__docgenInfo={description:"The list of choices, handles adding, removing and reording of answers.",methods:[],displayName:"AnswerChoices",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(choices: ReadonlyArray) => void",signature:{arguments:[{type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},name:"choices"}],return:{name:"void"}}},description:""}}};export{H as A}; diff --git a/assets/answer-choices.stories-0IwvODoA.js b/assets/answer-choices.stories-6QsApMfj.js similarity index 86% rename from assets/answer-choices.stories-0IwvODoA.js rename to assets/answer-choices.stories-6QsApMfj.js index e0bb97ea11..3afcb057bd 100644 --- a/assets/answer-choices.stories-0IwvODoA.js +++ b/assets/answer-choices.stories-6QsApMfj.js @@ -1,4 +1,4 @@ -import{j as t,a as _,F as a}from"./jsx-runtime-FVsy8kgq.js";import{L as y}from"./index-h_CiYGGb.js";import{r as c}from"./index-TT1qJ6UJ.js";import{A as b}from"./answer-choices-6SWUlni2.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./index-7vsPyIck.js";import"./index-rfN0X25E.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-YCTzZMik.js";import"./i18n-context-P5sgPFep.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";const ue={title:"Perseus/Widgets/Label Image/Answer Choices"},A=[{content:"Lamborghini",checked:!1},{content:"BMW",checked:!1},{content:"Volkswagen",checked:!1},{content:"Fiat",checked:!1},{content:"$\\displaystyle f(x)=\\frac{1}{x}$",checked:!1},{content:"Porsche",checked:!1},{content:"Ferrari",checked:!1}],u=({multipleSelect:s=!1})=>{const[i,g]=c.useState([...A]),[f,S]=c.useState(!1),k=e=>{g([...i.map((C,x)=>({...C,checked:e[x]}))])};return _(a,{children:[t(b,{choices:i,multipleSelect:s,onChange:e=>k(e),opener:()=>t("button",{children:f?"Close":"Open"}),onToggle:e=>S(e),disabled:!1}),t(a,{children:i.filter(({checked:e})=>e).map(({content:e})=>t(y,{children:e},e))})]})},r=s=>t(u,{}),o=s=>t(u,{multipleSelect:!0});r.__docgenInfo={description:"",methods:[],displayName:"SingleSelect"};o.__docgenInfo={description:"",methods:[],displayName:"MultipleSelect"};var p,m,n;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t,a as _,F as a}from"./jsx-runtime-FVsy8kgq.js";import{L as y}from"./index-h_CiYGGb.js";import{r as c}from"./index-TT1qJ6UJ.js";import{A as b}from"./answer-choices-VNdK7gMK.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./index-7vsPyIck.js";import"./index-rfN0X25E.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-YCTzZMik.js";import"./i18n-context-P5sgPFep.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";const ue={title:"Perseus/Widgets/Label Image/Answer Choices"},A=[{content:"Lamborghini",checked:!1},{content:"BMW",checked:!1},{content:"Volkswagen",checked:!1},{content:"Fiat",checked:!1},{content:"$\\displaystyle f(x)=\\frac{1}{x}$",checked:!1},{content:"Porsche",checked:!1},{content:"Ferrari",checked:!1}],u=({multipleSelect:s=!1})=>{const[i,g]=c.useState([...A]),[f,S]=c.useState(!1),k=e=>{g([...i.map((C,x)=>({...C,checked:e[x]}))])};return _(a,{children:[t(b,{choices:i,multipleSelect:s,onChange:e=>k(e),opener:()=>t("button",{children:f?"Close":"Open"}),onToggle:e=>S(e),disabled:!1}),t(a,{children:i.filter(({checked:e})=>e).map(({content:e})=>t(y,{children:e},e))})]})},r=s=>t(u,{}),o=s=>t(u,{multipleSelect:!0});r.__docgenInfo={description:"",methods:[],displayName:"SingleSelect"};o.__docgenInfo={description:"",methods:[],displayName:"MultipleSelect"};var p,m,n;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(n=(m=r.parameters)==null?void 0:m.docs)==null?void 0:n.source}}};var l,d,h;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/answer-choices.stories-dAkI2OZl.js b/assets/answer-choices.stories-TRpG87Yt.js similarity index 76% rename from assets/answer-choices.stories-dAkI2OZl.js rename to assets/answer-choices.stories-TRpG87Yt.js index 121291422b..8df1b7a2f5 100644 --- a/assets/answer-choices.stories-dAkI2OZl.js +++ b/assets/answer-choices.stories-TRpG87Yt.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a as y}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as C}from"./index-awljIyHI.js";import{r as S}from"./index-TT1qJ6UJ.js";import{A as v}from"./answer-choices-IbySI0ZR.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";const ut={title:"PerseusEditor/Widgets/Label Image/Answer Choices"},E=C.StyleSheet.create({wrapper:{width:338}}),s=r=>o("div",{className:C.css(E.wrapper),children:o(v,{...r,onChange:(...t)=>{y("onChange")(...t),r.onChange(...t)}})});class N extends S.Component{constructor(){super(...arguments),this.state={choices:[]}}render(){const{choices:t}=this.state;return o(s,{choices:t,onChange:m=>this.setState({choices:m})})}}const i=r=>o(s,{...{choices:[],onChange:(...m)=>{}}}),e=r=>o(s,{...{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],onChange:(...m)=>{}}}),p=r=>o(N,{});i.__docgenInfo={description:"",methods:[],displayName:"EmptyNonInteractive"};e.__docgenInfo={description:"",methods:[],displayName:"FilledNonInteractive"};p.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var a,n,c;i.parameters={...i.parameters,docs:{...(a=i.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a as y}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as C}from"./index-awljIyHI.js";import{r as S}from"./index-TT1qJ6UJ.js";import{A as v}from"./answer-choices-Zdsv-TtU.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";const ut={title:"PerseusEditor/Widgets/Label Image/Answer Choices"},E=C.StyleSheet.create({wrapper:{width:338}}),s=r=>o("div",{className:C.css(E.wrapper),children:o(v,{...r,onChange:(...t)=>{y("onChange")(...t),r.onChange(...t)}})});class N extends S.Component{constructor(){super(...arguments),this.state={choices:[]}}render(){const{choices:t}=this.state;return o(s,{choices:t,onChange:m=>this.setState({choices:m})})}}const i=r=>o(s,{...{choices:[],onChange:(...m)=>{}}}),e=r=>o(s,{...{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],onChange:(...m)=>{}}}),p=r=>o(N,{});i.__docgenInfo={description:"",methods:[],displayName:"EmptyNonInteractive"};e.__docgenInfo={description:"",methods:[],displayName:"FilledNonInteractive"};p.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var a,n,c;i.parameters={...i.parameters,docs:{...(a=i.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ choices: [], onChange: (...args) => {} diff --git a/assets/answer-pill-0VqGKN9U.js b/assets/answer-pill-DPPg5zNJ.js similarity index 98% rename from assets/answer-pill-0VqGKN9U.js rename to assets/answer-pill-DPPg5zNJ.js index 88b8151576..60b863470e 100644 --- a/assets/answer-pill-0VqGKN9U.js +++ b/assets/answer-pill-DPPg5zNJ.js @@ -1 +1 @@ -import{j as k}from"./jsx-runtime-FVsy8kgq.js";import{V as B,u as I}from"./index-6h5t6F0w.js";import{r as d}from"./index-TT1qJ6UJ.js";import{l as C}from"./index-awljIyHI.js";import{C as R}from"./index-o3wWn3Y5.js";import{s as n,c as l,m as P}from"./index-deFLJwr4.js";import{c as T,B as E,b as O}from"./index-h_CiYGGb.js";import{P as L}from"./Popper-kGnKOid7.js";import{u as q}from"./i18n-context-P5sgPFep.js";import{R as j}from"./renderer-VfFjn7ah.js";function w(){return w=Object.assign?Object.assign.bind():function(a){for(var e=1;e=0)&&(t[o]=a[o]);return t}const $=["id","children","kind","size","role","onClick","style","testId","tabIndex"],_=a=>{const{children:e,size:t}=a;return typeof e!="string"?e:t==="small"?d.createElement(T,null,a.children):t==="large"?d.createElement(E,null,e):d.createElement(O,null,e)},A=d.forwardRef(function(e,t){const{id:r,children:o,kind:i="neutral",size:s="medium",role:p,onClick:c,style:u,testId:f,tabIndex:S}=e,g=z(e,$);let m;switch(s){case"small":m=h.wrapperSmall;break;case"large":m=h.wrapperLarge;break;default:m=h.wrapperMedium}const x=M(!!c,i),b=[h.wrapper,x.pill,m];return c?d.createElement(R,w({id:r,role:p,onClick:c,style:[b,x.clickableWrapper,u],testId:f,ref:t,tabIndex:S},g),()=>d.createElement(_,{size:s},o)):d.createElement(B,w({id:r,role:p,style:[b,u],testId:f,ref:t},g),d.createElement(_,{size:s},o))}),h=C.StyleSheet.create({wrapper:{display:"inline-flex",width:"fit-content"},wrapperSmall:{paddingLeft:n.xSmall_8,paddingRight:n.xSmall_8,borderRadius:n.xxSmall_6,height:20},wrapperMedium:{paddingLeft:n.xSmall_8,paddingRight:n.xSmall_8,borderRadius:n.xxSmall_6,height:n.large_24},wrapperLarge:{paddingLeft:n.small_12,paddingRight:n.small_12,paddingTop:n.xxSmall_6,paddingBottom:n.xxSmall_6,borderRadius:n.large_24,height:n.xLarge_32}}),y={},M=(a,e)=>{const t=`${e}-${a.toString()}`;if(y[t])return y[t];let r;switch(e){case"accent":r=l.blue;break;case"info":r=l.fadedBlue16;break;case"success":r=l.fadedGreen16;break;case"warning":r=l.fadedGold16;break;case"critical":r=l.fadedRed16;break;case"transparent":r="transparent";break;case"neutral":default:r=l.offBlack8}const o=e==="neutral"||e==="transparent"?l.offBlack16:P(l.offBlack32,r),i=e==="accent"?l.white:l.offBlack,s=e==="critical"?l.red:l.blue,p=e==="critical"?l.activeRed:l.activeBlue,c=e==="transparent"?`1px solid ${l.offBlack16}`:"none",u={pill:{backgroundColor:r,outline:c,color:i,alignItems:"center",justifyContent:"center"},clickableWrapper:{outline:c,":hover":{outline:`2px solid ${s}`,outlineOffset:n.xxxxSmall_2},":active":{backgroundColor:o,outline:`2px solid ${p}`,outlineOffset:n.xxxxSmall_2},":focus-visible":{outline:`2px solid ${s}`,outlineOffset:n.xxxxSmall_2}}};return y[t]=C.StyleSheet.create(u),y[t]},W={boxShadow:`0 8px 8px ${l.offBlack64}`,zIndex:1e3},F=a=>{const{selectedAnswers:e,showCorrectness:t,markerRef:r,side:o,onClick:i,style:s,focused:p,hovered:c}=a,u=I(),{strings:f}=q(),S=e.length>1?f.answers({num:e.length}):e[0],g=t==="correct",m=t==="incorrect";return k(L,{placement:o,referenceElement:r,modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport"}}],children:({ref:x,style:b})=>k(A,{size:"large",kind:"accent",id:u.get("perseus-label-image-widget-answer-pill"),onClick:g?void 0:i,ref:x,style:[s,b,v.pill,g&&v.correct,m&&v.incorrect,(p||c)&&W],children:k(j,{content:S,strings:f,inline:!0})})})},v=C.StyleSheet.create({correct:{backgroundColor:"#00880b"},incorrect:{backgroundColor:l.offBlack64},pill:{height:"auto"}});F.__docgenInfo={description:"",methods:[],displayName:"AnswerPill",props:{selectedAnswers:{required:!0,tsType:{name:"unknown"},description:""},showCorrectness:{required:!1,tsType:{name:"union",raw:'"correct" | "incorrect"',elements:[{name:"literal",value:'"correct"'},{name:"literal",value:'"incorrect"'}]},description:""},markerRef:{required:!1,tsType:{name:"HTMLElement"},description:""},side:{required:!0,tsType:{name:"union",raw:'"top" | "bottom" | "left" | "right"',elements:[{name:"literal",value:'"top"'},{name:"literal",value:'"bottom"'},{name:"literal",value:'"left"'},{name:"literal",value:'"right"'}]},description:""},style:{required:!1,tsType:{name:"CSSProperties"},description:""},hovered:{required:!1,tsType:{name:"boolean"},description:""},focused:{required:!1,tsType:{name:"boolean"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};export{F as A}; +import{j as k}from"./jsx-runtime-FVsy8kgq.js";import{V as B,u as I}from"./index-6h5t6F0w.js";import{r as d}from"./index-TT1qJ6UJ.js";import{l as C}from"./index-awljIyHI.js";import{C as R}from"./index-o3wWn3Y5.js";import{s as n,c as l,m as P}from"./index-deFLJwr4.js";import{c as T,B as E,b as O}from"./index-h_CiYGGb.js";import{P as L}from"./Popper-kGnKOid7.js";import{u as q}from"./i18n-context-P5sgPFep.js";import{R as j}from"./renderer-JG1Z7r2S.js";function w(){return w=Object.assign?Object.assign.bind():function(a){for(var e=1;e=0)&&(t[o]=a[o]);return t}const $=["id","children","kind","size","role","onClick","style","testId","tabIndex"],_=a=>{const{children:e,size:t}=a;return typeof e!="string"?e:t==="small"?d.createElement(T,null,a.children):t==="large"?d.createElement(E,null,e):d.createElement(O,null,e)},A=d.forwardRef(function(e,t){const{id:r,children:o,kind:i="neutral",size:s="medium",role:p,onClick:c,style:u,testId:f,tabIndex:S}=e,g=z(e,$);let m;switch(s){case"small":m=h.wrapperSmall;break;case"large":m=h.wrapperLarge;break;default:m=h.wrapperMedium}const x=M(!!c,i),b=[h.wrapper,x.pill,m];return c?d.createElement(R,w({id:r,role:p,onClick:c,style:[b,x.clickableWrapper,u],testId:f,ref:t,tabIndex:S},g),()=>d.createElement(_,{size:s},o)):d.createElement(B,w({id:r,role:p,style:[b,u],testId:f,ref:t},g),d.createElement(_,{size:s},o))}),h=C.StyleSheet.create({wrapper:{display:"inline-flex",width:"fit-content"},wrapperSmall:{paddingLeft:n.xSmall_8,paddingRight:n.xSmall_8,borderRadius:n.xxSmall_6,height:20},wrapperMedium:{paddingLeft:n.xSmall_8,paddingRight:n.xSmall_8,borderRadius:n.xxSmall_6,height:n.large_24},wrapperLarge:{paddingLeft:n.small_12,paddingRight:n.small_12,paddingTop:n.xxSmall_6,paddingBottom:n.xxSmall_6,borderRadius:n.large_24,height:n.xLarge_32}}),y={},M=(a,e)=>{const t=`${e}-${a.toString()}`;if(y[t])return y[t];let r;switch(e){case"accent":r=l.blue;break;case"info":r=l.fadedBlue16;break;case"success":r=l.fadedGreen16;break;case"warning":r=l.fadedGold16;break;case"critical":r=l.fadedRed16;break;case"transparent":r="transparent";break;case"neutral":default:r=l.offBlack8}const o=e==="neutral"||e==="transparent"?l.offBlack16:P(l.offBlack32,r),i=e==="accent"?l.white:l.offBlack,s=e==="critical"?l.red:l.blue,p=e==="critical"?l.activeRed:l.activeBlue,c=e==="transparent"?`1px solid ${l.offBlack16}`:"none",u={pill:{backgroundColor:r,outline:c,color:i,alignItems:"center",justifyContent:"center"},clickableWrapper:{outline:c,":hover":{outline:`2px solid ${s}`,outlineOffset:n.xxxxSmall_2},":active":{backgroundColor:o,outline:`2px solid ${p}`,outlineOffset:n.xxxxSmall_2},":focus-visible":{outline:`2px solid ${s}`,outlineOffset:n.xxxxSmall_2}}};return y[t]=C.StyleSheet.create(u),y[t]},W={boxShadow:`0 8px 8px ${l.offBlack64}`,zIndex:1e3},F=a=>{const{selectedAnswers:e,showCorrectness:t,markerRef:r,side:o,onClick:i,style:s,focused:p,hovered:c}=a,u=I(),{strings:f}=q(),S=e.length>1?f.answers({num:e.length}):e[0],g=t==="correct",m=t==="incorrect";return k(L,{placement:o,referenceElement:r,modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport"}}],children:({ref:x,style:b})=>k(A,{size:"large",kind:"accent",id:u.get("perseus-label-image-widget-answer-pill"),onClick:g?void 0:i,ref:x,style:[s,b,v.pill,g&&v.correct,m&&v.incorrect,(p||c)&&W],children:k(j,{content:S,strings:f,inline:!0})})})},v=C.StyleSheet.create({correct:{backgroundColor:"#00880b"},incorrect:{backgroundColor:l.offBlack64},pill:{height:"auto"}});F.__docgenInfo={description:"",methods:[],displayName:"AnswerPill",props:{selectedAnswers:{required:!0,tsType:{name:"unknown"},description:""},showCorrectness:{required:!1,tsType:{name:"union",raw:'"correct" | "incorrect"',elements:[{name:"literal",value:'"correct"'},{name:"literal",value:'"incorrect"'}]},description:""},markerRef:{required:!1,tsType:{name:"HTMLElement"},description:""},side:{required:!0,tsType:{name:"union",raw:'"top" | "bottom" | "left" | "right"',elements:[{name:"literal",value:'"top"'},{name:"literal",value:'"bottom"'},{name:"literal",value:'"left"'},{name:"literal",value:'"right"'}]},description:""},style:{required:!1,tsType:{name:"CSSProperties"},description:""},hovered:{required:!1,tsType:{name:"boolean"},description:""},focused:{required:!1,tsType:{name:"boolean"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};export{F as A}; diff --git a/assets/answer-pill.stories-j3TFj4M7.js b/assets/answer-pill.stories-8gXsreK8.js similarity index 88% rename from assets/answer-pill.stories-j3TFj4M7.js rename to assets/answer-pill.stories-8gXsreK8.js index d585a15284..aa750e28b8 100644 --- a/assets/answer-pill.stories-j3TFj4M7.js +++ b/assets/answer-pill.stories-8gXsreK8.js @@ -1,4 +1,4 @@ -import{j as C}from"./jsx-runtime-FVsy8kgq.js";import{A as t}from"./answer-pill-0VqGKN9U.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./index-7vsPyIck.js";import"./i18n-context-P5sgPFep.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";const or={title:"Perseus/Widgets/Label Image/Answer Pill",component:t,render:k=>C(t,{...k}),argTypes:{showCorrectness:{options:["not answered","correct","incorrect"],control:{type:"radio"}}}},r={args:{id:"1",selectedAnswers:["Answer Pill"],markerRef:null,side:"top",onClick:()=>{}}},e={args:{id:"1",selectedAnswers:["Answer 1","Answer 2"],markerRef:null,side:"top",onClick:()=>{}}},s={args:{id:"1",selectedAnswers:["Right Answer"],showCorrectness:"correct",markerRef:null,side:"top",onClick:()=>{}}},o={args:{id:"1",selectedAnswers:["Wrong Answer"],showCorrectness:"incorrect",markerRef:null,side:"top",onClick:()=>{}}};var n,i,c;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{j as C}from"./jsx-runtime-FVsy8kgq.js";import{A as t}from"./answer-pill-DPPg5zNJ.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./index-7vsPyIck.js";import"./i18n-context-P5sgPFep.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";const or={title:"Perseus/Widgets/Label Image/Answer Pill",component:t,render:k=>C(t,{...k}),argTypes:{showCorrectness:{options:["not answered","correct","incorrect"],control:{type:"radio"}}}},r={args:{id:"1",selectedAnswers:["Answer Pill"],markerRef:null,side:"top",onClick:()=>{}}},e={args:{id:"1",selectedAnswers:["Answer 1","Answer 2"],markerRef:null,side:"top",onClick:()=>{}}},s={args:{id:"1",selectedAnswers:["Right Answer"],showCorrectness:"correct",markerRef:null,side:"top",onClick:()=>{}}},o={args:{id:"1",selectedAnswers:["Wrong Answer"],showCorrectness:"incorrect",markerRef:null,side:"top",onClick:()=>{}}};var n,i,c;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ args: { id: "1", selectedAnswers: ["Answer Pill"], diff --git a/assets/article-editor-Hyxtmbid.js b/assets/article-editor-dmW6w6Eg.js similarity index 95% rename from assets/article-editor-Hyxtmbid.js rename to assets/article-editor-dmW6w6Eg.js index 70b8bd927a..362bdeb56f 100644 --- a/assets/article-editor-Hyxtmbid.js +++ b/assets/article-editor-dmW6w6Eg.js @@ -1,4 +1,4 @@ -import{j as t,a as s}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import{_ as i}from"./jquery-yG1GhClm.js";import{P as d,E as c}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as u}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as g}from"./components-V6aclUoQ.js";import{i as v}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{r as w}from"./index-TT1qJ6UJ.js";import{D as R}from"./device-framer-eGajQcXC.js";import{I as _,J as k}from"./register-all-widgets-and-editors-for-testing-2mH-ZU77.js";import{S as o}from"./section-control-button-GM2LQRww.js";import{E as b}from"./editor-Y01VX-A3.js";import{i as h,a as P,b as C}from"./icon-paths-EoBkHOLI.js";const{HUD:A,InlineIcon:S}=g,m=class m extends w.Component{constructor(){super(...arguments),this.state={highlightLint:!0},this._handleJsonChange=n=>{this.props.onChange({json:n})},this._handleEditorChange=(n,e)=>{const a=i.clone(this._sections());a[n]=i.extend({},a[n],e),this.props.onChange({json:a})}}componentDidMount(){this._updatePreviewFrames()}componentDidUpdate(){this._updatePreviewFrames()}_updatePreviewFrames(){this.props.mode==="preview"?this.refs["frame-all"].sendNewData({type:"article-all",data:this._sections().map((n,e)=>this._apiOptionsForSection(n,e))}):this.props.mode==="edit"&&this._sections().forEach((n,e)=>{this.refs["frame-"+e].sendNewData({type:"article",data:this._apiOptionsForSection(n,e)})})}_apiOptionsForSection(n,e){const a=this.refs[`editor${e}`];return{apiOptions:{...u.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},json:n,useNewStyles:this.props.useNewStyles,linterContext:{contentType:"article",highlightLint:this.state.highlightLint,paths:this.props.contentPaths},legacyPerseusLint:a?a.getSaveWarnings():[]}}_sections(){return Array.isArray(this.props.json)?this.props.json:[this.props.json]}_renderEditor(){const{imageUploader:n,sectionImageUploadGenerator:e}=this.props,a={...u.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},p=this._sections();return s("div",{className:"perseus-editor-table",children:[p.map((y,r)=>[s("div",{className:"perseus-editor-row",children:[s("div",{className:"perseus-editor-left-cell",children:[s("div",{className:"pod-title",children:["Section ",r+1,s("div",{style:{display:"inline-block",float:"right"},children:[e(r),t(o,{icon:h,onClick:()=>{this._handleAddSectionAfter(r)},title:"Add a new section after this one"}),r+1{this._handleMoveSectionLater(r)},title:"Move this section down"}),r>0&&t(o,{icon:C,onClick:()=>{this._handleMoveSectionEarlier(r)},title:"Move this section up"}),t(o,{icon:v,onClick:()=>{const f="Are you sure you want to delete section "+(r+1)+"?";confirm(f)&&this._handleRemoveSection(r)},title:"Delete this section"})]})]}),t(b,{...y,apiOptions:a,imageUploader:n,onChange:i.partial(this._handleEditorChange,r),placeholder:"Type your section text here...",ref:"editor"+r})]}),t("div",{className:"editor-preview",children:this._renderIframePreview(r,!0)})]},r)]),this._renderAddSection(),this._renderLinterHUD()]})}_renderAddSection(){return t("div",{className:"perseus-editor-row",children:t("div",{className:"perseus-editor-left-cell",children:s("a",{href:"#",className:"simple-button orange",onClick:()=>{this._handleAddSectionAfter(this._sections().length-1)},children:[t(S,{...h})," Add a section"]})})})}_renderLinterHUD(){return t(A,{message:"Style warnings",enabled:this.state.highlightLint,onClick:()=>{this.setState({highlightLint:!this.state.highlightLint})}})}_renderIframePreview(n,e){const a=this.props.screen==="phone"||this.props.screen==="tablet";return t(R,{deviceType:this.props.screen,nochrome:e,children:t(_,{ref:"frame-"+n,datasetKey:"mobile",datasetValue:a,seamless:e,url:this.props.previewURL},this.props.screen)})}_renderPreviewMode(){return t("div",{className:"standalone-preview",children:this._renderIframePreview("all",!1)})}_handleMoveSectionEarlier(n){if(n===0)return;const e=i.clone(this._sections()),a=e[n];e.splice(n,1),e.splice(n-1,0,a),this.props.onChange({json:e})}_handleMoveSectionLater(n){const e=i.clone(this._sections());if(n+1===e.length)return;const a=e[n];e.splice(n,1),e.splice(n+1,0,a),this.props.onChange({json:e})}_handleAddSectionAfter(n){const e=i.clone(this.serialize()),a=n>=0?{widgets:e[n].widgets}:{};e.splice(n+1,0,a),this.props.onChange({json:e})}_handleRemoveSection(n){const e=i.clone(this._sections());e.splice(n,1),this.props.onChange({json:e})}serialize(){if(this.props.mode==="edit")return this._sections().map((n,e)=>this.refs["editor"+e].serialize());if(this.props.mode==="preview"||this.props.mode==="json")return this.props.json;throw new d("Could not serialize; mode "+this.props.mode+" not found",c.Internal)}getSaveWarnings(){if(this.props.mode!=="edit")throw new d("Can only get save warnings in edit mode.",c.NotAllowed);return this._sections().map((n,e)=>this.refs["editor"+e].getSaveWarnings())}render(){return s("div",{className:"framework-perseus perseus-article-editor",children:[this.props.mode==="edit"&&this._renderEditor(),this.props.mode==="preview"&&this._renderPreviewMode(),this.props.mode==="json"&&s("div",{className:"json-editor",children:[t("div",{className:"json-editor-warning",children:t("span",{children:"Warning: Editing in this mode can lead to broken articles!"})}),t(k,{multiLine:!0,onChange:this._handleJsonChange,value:this.props.json})]})]})}};m.defaultProps={contentPaths:[],json:[{}],mode:"edit",screen:"desktop",sectionImageUploadGenerator:()=>t("span",{}),useNewStyles:!1};let l=m;l.__docgenInfo={description:"",methods:[{name:"_updatePreviewFrames",docblock:null,modifiers:[],params:[],returns:null},{name:"_apiOptionsForSection",docblock:null,modifiers:[],params:[{name:"section",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{j as t,a as s}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import{_ as i}from"./jquery-yG1GhClm.js";import{P as d,E as c}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import{A as u}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as g}from"./components-yT7oveOH.js";import{i as v}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{r as w}from"./index-TT1qJ6UJ.js";import{D as R}from"./device-framer-eGajQcXC.js";import{I as _,J as k}from"./register-all-widgets-and-editors-for-testing-Tl0n0XMq.js";import{S as o}from"./section-control-button-SLh88dRF.js";import{E as b}from"./editor-1XE8pcNh.js";import{i as h,a as P,b as C}from"./icon-paths-EoBkHOLI.js";const{HUD:A,InlineIcon:S}=g,m=class m extends w.Component{constructor(){super(...arguments),this.state={highlightLint:!0},this._handleJsonChange=n=>{this.props.onChange({json:n})},this._handleEditorChange=(n,e)=>{const a=i.clone(this._sections());a[n]=i.extend({},a[n],e),this.props.onChange({json:a})}}componentDidMount(){this._updatePreviewFrames()}componentDidUpdate(){this._updatePreviewFrames()}_updatePreviewFrames(){this.props.mode==="preview"?this.refs["frame-all"].sendNewData({type:"article-all",data:this._sections().map((n,e)=>this._apiOptionsForSection(n,e))}):this.props.mode==="edit"&&this._sections().forEach((n,e)=>{this.refs["frame-"+e].sendNewData({type:"article",data:this._apiOptionsForSection(n,e)})})}_apiOptionsForSection(n,e){const a=this.refs[`editor${e}`];return{apiOptions:{...u.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},json:n,useNewStyles:this.props.useNewStyles,linterContext:{contentType:"article",highlightLint:this.state.highlightLint,paths:this.props.contentPaths},legacyPerseusLint:a?a.getSaveWarnings():[]}}_sections(){return Array.isArray(this.props.json)?this.props.json:[this.props.json]}_renderEditor(){const{imageUploader:n,sectionImageUploadGenerator:e}=this.props,a={...u.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},p=this._sections();return s("div",{className:"perseus-editor-table",children:[p.map((y,r)=>[s("div",{className:"perseus-editor-row",children:[s("div",{className:"perseus-editor-left-cell",children:[s("div",{className:"pod-title",children:["Section ",r+1,s("div",{style:{display:"inline-block",float:"right"},children:[e(r),t(o,{icon:h,onClick:()=>{this._handleAddSectionAfter(r)},title:"Add a new section after this one"}),r+1{this._handleMoveSectionLater(r)},title:"Move this section down"}),r>0&&t(o,{icon:C,onClick:()=>{this._handleMoveSectionEarlier(r)},title:"Move this section up"}),t(o,{icon:v,onClick:()=>{const f="Are you sure you want to delete section "+(r+1)+"?";confirm(f)&&this._handleRemoveSection(r)},title:"Delete this section"})]})]}),t(b,{...y,apiOptions:a,imageUploader:n,onChange:i.partial(this._handleEditorChange,r),placeholder:"Type your section text here...",ref:"editor"+r})]}),t("div",{className:"editor-preview",children:this._renderIframePreview(r,!0)})]},r)]),this._renderAddSection(),this._renderLinterHUD()]})}_renderAddSection(){return t("div",{className:"perseus-editor-row",children:t("div",{className:"perseus-editor-left-cell",children:s("a",{href:"#",className:"simple-button orange",onClick:()=>{this._handleAddSectionAfter(this._sections().length-1)},children:[t(S,{...h})," Add a section"]})})})}_renderLinterHUD(){return t(A,{message:"Style warnings",enabled:this.state.highlightLint,onClick:()=>{this.setState({highlightLint:!this.state.highlightLint})}})}_renderIframePreview(n,e){const a=this.props.screen==="phone"||this.props.screen==="tablet";return t(R,{deviceType:this.props.screen,nochrome:e,children:t(_,{ref:"frame-"+n,datasetKey:"mobile",datasetValue:a,seamless:e,url:this.props.previewURL},this.props.screen)})}_renderPreviewMode(){return t("div",{className:"standalone-preview",children:this._renderIframePreview("all",!1)})}_handleMoveSectionEarlier(n){if(n===0)return;const e=i.clone(this._sections()),a=e[n];e.splice(n,1),e.splice(n-1,0,a),this.props.onChange({json:e})}_handleMoveSectionLater(n){const e=i.clone(this._sections());if(n+1===e.length)return;const a=e[n];e.splice(n,1),e.splice(n+1,0,a),this.props.onChange({json:e})}_handleAddSectionAfter(n){const e=i.clone(this.serialize()),a=n>=0?{widgets:e[n].widgets}:{};e.splice(n+1,0,a),this.props.onChange({json:e})}_handleRemoveSection(n){const e=i.clone(this._sections());e.splice(n,1),this.props.onChange({json:e})}serialize(){if(this.props.mode==="edit")return this._sections().map((n,e)=>this.refs["editor"+e].serialize());if(this.props.mode==="preview"||this.props.mode==="json")return this.props.json;throw new d("Could not serialize; mode "+this.props.mode+" not found",c.Internal)}getSaveWarnings(){if(this.props.mode!=="edit")throw new d("Can only get save warnings in edit mode.",c.NotAllowed);return this._sections().map((n,e)=>this.refs["editor"+e].getSaveWarnings())}render(){return s("div",{className:"framework-perseus perseus-article-editor",children:[this.props.mode==="edit"&&this._renderEditor(),this.props.mode==="preview"&&this._renderPreviewMode(),this.props.mode==="json"&&s("div",{className:"json-editor",children:[t("div",{className:"json-editor-warning",children:t("span",{children:"Warning: Editing in this mode can lead to broken articles!"})}),t(k,{multiLine:!0,onChange:this._handleJsonChange,value:this.props.json})]})]})}};m.defaultProps={contentPaths:[],json:[{}],mode:"edit",screen:"desktop",sectionImageUploadGenerator:()=>t("span",{}),useNewStyles:!1};let l=m;l.__docgenInfo={description:"",methods:[{name:"_updatePreviewFrames",docblock:null,modifiers:[],params:[],returns:null},{name:"_apiOptionsForSection",docblock:null,modifiers:[],params:[{name:"section",optional:!1,type:{name:"signature",type:"object",raw:`{ content?: string; widgets?: any; images?: any; diff --git a/assets/article-editor.stories-h9tAUrgN.js b/assets/article-editor.stories-Yb88TQ9m.js similarity index 52% rename from assets/article-editor.stories-h9tAUrgN.js rename to assets/article-editor.stories-Yb88TQ9m.js index 6dab867e7d..54c7b85d47 100644 --- a/assets/article-editor.stories-h9tAUrgN.js +++ b/assets/article-editor.stories-Yb88TQ9m.js @@ -1,4 +1,4 @@ -import{a as d,F as u,j as r}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as f}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{r as i}from"./index-TT1qJ6UJ.js";import{A as g}from"./article-editor-Hyxtmbid.js";import{r as h}from"./register-all-widgets-and-editors-for-testing-2mH-ZU77.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-6SWUlni2.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-Ts3i1VPI.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-0_QL8uoF.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./components-V6aclUoQ.js";import"./device-framer-eGajQcXC.js";import"./constants-p_UgHLsb.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./editor-Y01VX-A3.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./categorizer-editor-3QAla4Wt.js";import"./editor-jsonify-yjAz4UcO.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-jFzP_8M9.js";import"./dropdown-editor-8wTJqqrY.js";import"./explanation-editor-_xuXa3EA.js";import"./expression-editor-TOSGrK7r.js";import"./graph-settings-6z3yJikg.js";import"./image-editor-oat1qOOh.js";import"./input-number-editor-Bkjav5mB.js";import"./index-6m5XMHRW.js";import"./interactive-graph-editor-sXGG56UO.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-BlpUEkpl.js";import"./locked-figures-section-MyNRaNP3.js";import"./locked-ellipse-settings-2CzQImqt.js";import"./locked-figure-aria-8qS88jMt.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-My12ABKT.js";import"./color-select-ZBceqrDu.js";import"./util-w4oIPZJv.js";import"./line-stroke-select-OUNHgM-H.js";import"./locked-function-settings-mVk4KOOh.js";import"./line-swatch-tbLkNsXV.js";import"./locked-line-settings-GmLOdRhN.js";import"./locked-point-settings-75zYMwR0.js";import"./labeled-switch-Fn8JZIE3.js";import"./locked-polygon-settings-CLRPaxRY.js";import"./locked-vector-settings-nyZ3gue2.js";import"./label-image-editor-AWRkHIaL.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-IbySI0ZR.js";import"./behavior-Or9dqpn7.js";import"./question-markers-rbcwtTwt.js";import"./marker-4IxQ8C94.js";import"./select-image-cPUSf5YP.js";import"./matcher-editor-w387bK5J.js";import"./number-line-editor-g8WyXFkD.js";import"./numeric-input-editor-wcLIK9qM.js";import"./phet-simulation-editor-KZoPAnLO.js";import"./python-program-editor-ReCi12oY.js";import"./editor-DsbDBOGq.js";import"./sorter-editor-RE_zqP0r.js";h();const so={title:"PerseusEditor/ArticleEditor"},t=()=>{const[s,n]=i.useState(),o=i.useRef();function a(c){n(c.json)}function l(){console.log(o.current.serialize())}return d(u,{children:[r("button",{onClick:l,children:"Serialize"}),r("hr",{}),r(g,{apiOptions:f.defaults,imageUploader:()=>{},json:s,onChange:a,previewURL:"/perseus/frame",ref:o})]})};t.__docgenInfo={description:"",methods:[],displayName:"Base"};var p,m,e;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`(): React.ReactElement => { +import{a as d,F as u,j as r}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import{A as f}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{r as i}from"./index-TT1qJ6UJ.js";import{A as g}from"./article-editor-dmW6w6Eg.js";import{r as h}from"./register-all-widgets-and-editors-for-testing-Tl0n0XMq.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-VNdK7gMK.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-MKIRfGVo.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-lqQAegUH.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./components-yT7oveOH.js";import"./device-framer-eGajQcXC.js";import"./constants-p_UgHLsb.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./editor-1XE8pcNh.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./categorizer-editor-cvgo7rUS.js";import"./editor-jsonify-4Li1SRv8.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-yKychsEi.js";import"./dropdown-editor-owePQkYW.js";import"./explanation-editor-7sIPvPkn.js";import"./expression-editor-qSSWTw9p.js";import"./graph-settings-VTKCtXa5.js";import"./image-editor-xcASymG3.js";import"./input-number-editor-Z-c49jcj.js";import"./index-JX1pDXLf.js";import"./interactive-graph-editor-sYnTC31H.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-K1uO-oSP.js";import"./locked-figures-section-TPfsudBG.js";import"./locked-ellipse-settings-y-e2vVG9.js";import"./locked-figure-aria-cizi6QSj.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-7eVXvZDY.js";import"./color-select-Ou1zrjGq.js";import"./util-a_JWUtR1.js";import"./line-stroke-select-1i4OFJVH.js";import"./locked-function-settings-leQQyqbk.js";import"./line-swatch-EI3Byz66.js";import"./locked-line-settings-8WmBPF8G.js";import"./locked-point-settings-dcN0AtwC.js";import"./labeled-switch-zT89YLZ0.js";import"./locked-polygon-settings-5YNPD6lU.js";import"./locked-vector-settings-f_p_9H7b.js";import"./label-image-editor-kPCp3zRh.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-Zdsv-TtU.js";import"./behavior-xJJumj3W.js";import"./question-markers-0U-M3sRj.js";import"./marker-de7YvUxA.js";import"./select-image-e-hQhRt5.js";import"./matcher-editor-nUcHc7yM.js";import"./number-line-editor-hnXuQMSB.js";import"./numeric-input-editor-xQu1_JCK.js";import"./phet-simulation-editor-1KD7oC0a.js";import"./python-program-editor-kfW7ZX3D.js";import"./editor-EbDgkB5I.js";import"./sorter-editor-VTfqPYS3.js";h();const so={title:"PerseusEditor/ArticleEditor"},t=()=>{const[s,n]=i.useState(),o=i.useRef();function a(c){n(c.json)}function l(){console.log(o.current.serialize())}return d(u,{children:[r("button",{onClick:l,children:"Serialize"}),r("hr",{}),r(g,{apiOptions:f.defaults,imageUploader:()=>{},json:s,onChange:a,previewURL:"/perseus/frame",ref:o})]})};t.__docgenInfo={description:"",methods:[],displayName:"Base"};var p,m,e;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`(): React.ReactElement => { const [state, setState] = useState(); const articleEditorRef = useRef(); function handleChange(value) { diff --git a/assets/article-renderer-GCz9idJ2.js b/assets/article-renderer-ub6lGcPc.js similarity index 99% rename from assets/article-renderer-GCz9idJ2.js rename to assets/article-renderer-ub6lGcPc.js index f4d95936eb..ab52090a45 100644 --- a/assets/article-renderer-GCz9idJ2.js +++ b/assets/article-renderer-ub6lGcPc.js @@ -1,4 +1,4 @@ -import{a as f,j as u,F as M}from"./jsx-runtime-FVsy8kgq.js";import{P as Le,E as we,p as hr,g as Pr,K as Ve,U as L,e as Kn,D as Ho,h as Ia,t as Go,c as Bo}from"./util-F8-MDmsT.js";import{M as Ko}from"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./mobile-keypad-wPUeR8mM.js";import"./button-assets-txIojR3b.js";import{K as Yo}from"./enums-x5qaTru7.js";import{l as Y,S as V,R as K,P as za,D as Xo,m as Yn,J as Qo,p as Jo}from"./renderer-VfFjn7ah.js";import{V as G,U as Zo,c as el,d as rl,b as Mi,u as Di,_ as Zt}from"./index-6h5t6F0w.js";import{T as Xn}from"./index-K9BSJPWl.js";import{b as Na,a as Vi}from"./index-h_CiYGGb.js";import{l as j}from"./index-awljIyHI.js";import{c as je}from"./index-dnMhQZ-1.js";import{r as v,R as Hi}from"./index-TT1qJ6UJ.js";import{R as B,r as qr}from"./index-7vsPyIck.js";import{_ as g,$ as P}from"./jquery-yG1GhClm.js";import{P as S,u as $r}from"./i18n-context-P5sgPFep.js";import{a as Ut,M as tl}from"./math-input-JZMGF6RZ.js";import{u as Qn,g as qe,D as nl}from"./dependencies-8XILypbq.js";import"./version-akiLXZts.js";import{P as al}from"./index-k-0mNqHS.js";import{A as he,C as Pe}from"./perseus-api-Nq3s7IMx.js";import{L as Jn,a as X,r as il,K as W,s as Ea,b as Cr,I as z,S as Fr,W as Ir,c as sl,d as St,f as nr,v as ar,p as ol,g as ll,h as Gi,i as st,j as ot,k as Bi,e as ul,n as ee,q as Gt,t as La,u as We,w as _a,x as dl,y as Pa,z as yl,G as Rr,A as $a,C as ml,B as Zn}from"./svg-image-vbtSDKh6.js";import{s as de,c as N,a as gl,b as hl}from"./index-deFLJwr4.js";import{I as Ki}from"./input-with-examples-pL_l1Dse.js";import{S as Ur}from"./simple-keypad-input-LEkrmlga.js";import{B as pl}from"./base-radio-13woGQGc.js";import{I as ir}from"./inline-icon-NjJlm7d0.js";import{d as cl,e as bl,f as vl,g as wl,h as fl,j as kl}from"./icon-paths-5JCXzGsq.js";import{m as en}from"./media-queries-gbofTbz-.js";import{s as Fa}from"./shared-4TdECMLk.js";import{u as ql,n as He,s as Ee,g as lt,v as Yi,e as Tl,i as Xi}from"./constants-iPV6vHZm.js";import{C as ea}from"./index-WNT3sUKf.js";import{P as Al,a as Rl}from"./index-BPSWBbj5.js";import{B as Ol,a as xl}from"./phet-simulation-wNzquKfW.js";import{O as Ua,S as jl,A as Wl}from"./answer-choices-6SWUlni2.js";import{B as xe}from"./choice-I73s7vIV.js";import{B as Cl}from"./button-group-nsoLlHtM.js";import{c as ra}from"./asset-context-I7yIqWki.js";import{c as Vr,g as Il}from"./_commonjsHelpers-4gQjN7DL.js";import{G as zl}from"./graph-6kifrlu5.js";import{w as pr}from"./index-J2t_5nK1.js";import{v as R,C as Nl,E as El,P as ut,a as dt,L as Sa,b as zr,T as Ll,u as _l,c as Qi,M as Ma}from"./index-IIMKO4_x.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./multi-button-group-atHe8dYZ.js";import{N as Ji}from"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import{T as Pl}from"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{i as ie}from"./tiny-invariant-bHgPayXn.js";import{m as $l,c as Fl,u as Ul,a as Sl,T as Ml}from"./index-rfN0X25E.js";import{M as Dl}from"./marker-AnHLRo1F.js";import{S as rn}from"./sortable-PVTgDRY4.js";import{F as Vl}from"./fixed-to-responsive-AkRQxH3P.js";import{V as Hl}from"./video-transcript-link-Ts3i1VPI.js";const Gl=["PLUS","MINUS","NEGATIVE","TIMES","DIVIDE","DECIMAL","PERIOD","PERCENT","CDOT","EQUAL","NEQ","GT","LT","GEQ","LEQ","FRAC_INCLUSIVE","FRAC_EXCLUSIVE","FRAC","EXP","EXP_2","EXP_3","SQRT","CUBE_ROOT","RADICAL","LEFT_PAREN","RIGHT_PAREN","LN","LOG","LOG_N","SIN","COS","TAN","PI","THETA","UP","RIGHT","DOWN","LEFT","BACKSPACE","DISMISS","JUMP_OUT_PARENTHESES","JUMP_OUT_EXPONENT","JUMP_OUT_BASE","JUMP_INTO_NUMERATOR","JUMP_OUT_NUMERATOR","JUMP_OUT_DENOMINATOR","NUM_0","NUM_1","NUM_2","NUM_3","NUM_4","NUM_5","NUM_6","NUM_7","NUM_8","NUM_9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Bl=["key","ref","containerSizeClass","widgetId","onChange","problemNum","apiOptions","widgetIsOpen","questionCompleted","findWidgets","onRemove","id","onBlur","onFocus","trackInteraction","keypadElement"],Kl=`Usage: +import{a as f,j as u,F as M}from"./jsx-runtime-FVsy8kgq.js";import{P as Le,E as we,p as hr,g as Pr,K as Ve,U as L,e as Kn,D as Ho,h as Ia,t as Go,c as Bo}from"./util-F8-MDmsT.js";import{M as Ko}from"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./mobile-keypad-wPUeR8mM.js";import"./button-assets-txIojR3b.js";import{K as Yo}from"./enums-x5qaTru7.js";import{l as Y,S as V,R as K,P as za,D as Xo,m as Yn,J as Qo,p as Jo}from"./renderer-JG1Z7r2S.js";import{V as G,U as Zo,c as el,d as rl,b as Mi,u as Di,_ as Zt}from"./index-6h5t6F0w.js";import{T as Xn}from"./index-K9BSJPWl.js";import{b as Na,a as Vi}from"./index-h_CiYGGb.js";import{l as j}from"./index-awljIyHI.js";import{c as je}from"./index-dnMhQZ-1.js";import{r as v,R as Hi}from"./index-TT1qJ6UJ.js";import{R as B,r as qr}from"./index-7vsPyIck.js";import{_ as g,$ as P}from"./jquery-yG1GhClm.js";import{P as S,u as $r}from"./i18n-context-P5sgPFep.js";import{a as Ut,M as tl}from"./math-input-JZMGF6RZ.js";import{u as Qn,g as qe,D as nl}from"./dependencies-d8cZibFS.js";import"./version-akiLXZts.js";import{P as al}from"./index-k-0mNqHS.js";import{A as he,C as Pe}from"./perseus-api-Nq3s7IMx.js";import{L as Jn,a as X,r as il,K as W,s as Ea,b as Cr,I as z,S as Fr,W as Ir,c as sl,d as St,f as nr,v as ar,p as ol,g as ll,h as Gi,i as st,j as ot,k as Bi,e as ul,n as ee,q as Gt,t as La,u as We,w as _a,x as dl,y as Pa,z as yl,G as Rr,A as $a,C as ml,B as Zn}from"./svg-image-4Vh9uTQ6.js";import{s as de,c as N,a as gl,b as hl}from"./index-deFLJwr4.js";import{I as Ki}from"./input-with-examples-Jnnd0mF0.js";import{S as Ur}from"./simple-keypad-input-LEkrmlga.js";import{B as pl}from"./base-radio-SM-baXgO.js";import{I as ir}from"./inline-icon-NjJlm7d0.js";import{d as cl,e as bl,f as vl,g as wl,h as fl,j as kl}from"./icon-paths-5JCXzGsq.js";import{m as en}from"./media-queries-gbofTbz-.js";import{s as Fa}from"./shared-4TdECMLk.js";import{u as ql,n as He,s as Ee,g as lt,v as Yi,e as Tl,i as Xi}from"./constants-iPV6vHZm.js";import{C as ea}from"./index-2dmvOE3q.js";import{P as Al,a as Rl}from"./index-BPSWBbj5.js";import{B as Ol,a as xl}from"./phet-simulation-9PbE2pxN.js";import{O as Ua,S as jl,A as Wl}from"./answer-choices-VNdK7gMK.js";import{B as xe}from"./choice-I73s7vIV.js";import{B as Cl}from"./button-group-nsoLlHtM.js";import{c as ra}from"./asset-context-I7yIqWki.js";import{c as Vr,g as Il}from"./_commonjsHelpers-4gQjN7DL.js";import{G as zl}from"./graph-2fIs0C28.js";import{w as pr}from"./index-J2t_5nK1.js";import{v as R,C as Nl,E as El,P as ut,a as dt,L as Sa,b as zr,T as Ll,u as _l,c as Qi,M as Ma}from"./index-IIMKO4_x.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./multi-button-group-atHe8dYZ.js";import{N as Ji}from"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import{T as Pl}from"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{i as ie}from"./tiny-invariant-bHgPayXn.js";import{m as $l,c as Fl,u as Ul,a as Sl,T as Ml}from"./index-rfN0X25E.js";import{M as Dl}from"./marker-Tbl1FJz5.js";import{S as rn}from"./sortable-1xjW6Ojf.js";import{F as Vl}from"./fixed-to-responsive-AkRQxH3P.js";import{V as Hl}from"./video-transcript-link-MKIRfGVo.js";const Gl=["PLUS","MINUS","NEGATIVE","TIMES","DIVIDE","DECIMAL","PERIOD","PERCENT","CDOT","EQUAL","NEQ","GT","LT","GEQ","LEQ","FRAC_INCLUSIVE","FRAC_EXCLUSIVE","FRAC","EXP","EXP_2","EXP_3","SQRT","CUBE_ROOT","RADICAL","LEFT_PAREN","RIGHT_PAREN","LN","LOG","LOG_N","SIN","COS","TAN","PI","THETA","UP","RIGHT","DOWN","LEFT","BACKSPACE","DISMISS","JUMP_OUT_PARENTHESES","JUMP_OUT_EXPONENT","JUMP_OUT_BASE","JUMP_INTO_NUMERATOR","JUMP_OUT_NUMERATOR","JUMP_OUT_DENOMINATOR","NUM_0","NUM_1","NUM_2","NUM_3","NUM_4","NUM_5","NUM_6","NUM_7","NUM_8","NUM_9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Bl=["key","ref","containerSizeClass","widgetId","onChange","problemNum","apiOptions","widgetIsOpen","questionCompleted","findWidgets","onRemove","id","onBlur","onFocus","trackInteraction","keypadElement"],Kl=`Usage: this.change({propName: 5}, callback); this.change("propName", 5, callback); this.change("propName")`,Zi=function(t,e,r){const n=g.omit(t.props,Bl),a=g.extend(n,e);t.props.onChange(a,r)},es=function(t,e,r,n){if(r===void 0)return g.partial(es,t,e);const a={};a[e]=r,Zi(t,a,n)},ne=function(t,e,r){if(g.isObject(t)&&r===void 0)return r=e,Zi(this,t,r);if(typeof t=="string")return es(this,t,e,r);throw new Le("Invalid types sent to this.change(): "+g.toArray(arguments).join()+` diff --git a/assets/article-renderer.stories-20NlBfrZ.js b/assets/article-renderer.stories-HmvvxvzH.js similarity index 83% rename from assets/article-renderer.stories-20NlBfrZ.js rename to assets/article-renderer.stories-HmvvxvzH.js index 231b17a152..bf107fa37b 100644 --- a/assets/article-renderer.stories-20NlBfrZ.js +++ b/assets/article-renderer.stories-HmvvxvzH.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{a as _}from"./mobile-keypad-wPUeR8mM.js";import{a as j}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{s as p}from"./test-dependencies-zutb-QBJ.js";import{s as k,m as M,p as W,a as T,b as D}from"./article-renderer.testdata-spwNviYy.js";import{A as m}from"./article-renderer-GCz9idJ2.js";import{T as b}from"./test-keypad-context-wrapper-3gH8DCC_.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./prop-types-SKtvHVtl.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";const Rr={title:"Perseus/Renderers/Article Renderer",argTypes:{useNewStyles:{control:"boolean"}}},t=e=>r(m,{json:k,dependencies:p,useNewStyles:e.useNewStyles}),o=e=>r(m,{json:M,dependencies:p,useNewStyles:e.useNewStyles}),i=({useNewStyles:e})=>r(m,{json:W,dependencies:p,useNewStyles:e}),s=({useNewStyles:e})=>r(b,{children:r(_.Consumer,{children:({keypadElement:a,setRenderer:c})=>r(m,{ref:d=>{c(d)},json:T,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0,onFocusChange:j("onFocusChange")},keypadElement:a})})}),n=({useNewStyles:e})=>r(b,{children:r(_.Consumer,{children:({keypadElement:a,setRenderer:c})=>r(m,{ref:d=>{c(d)},json:D,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0},keypadElement:a})})});t.__docgenInfo={description:"",methods:[],displayName:"ASingleSectionArticle"};o.__docgenInfo={description:"",methods:[],displayName:"BMultiSectionArticle"};i.__docgenInfo={description:"",methods:[],displayName:"PassageArticle"};s.__docgenInfo={description:"",methods:[],displayName:"ExpressionArticle"};n.__docgenInfo={description:"",methods:[],displayName:"MultiSectionedExpressionArticle"};var l,u,y;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args: { +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{a as _}from"./mobile-keypad-wPUeR8mM.js";import{a as j}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{s as p}from"./test-dependencies-fGmEXWK4.js";import{s as k,m as M,p as W,a as T,b as D}from"./article-renderer.testdata-spwNviYy.js";import{A as m}from"./article-renderer-ub6lGcPc.js";import{T as b}from"./test-keypad-context-wrapper-3gH8DCC_.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./prop-types-SKtvHVtl.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";const Rr={title:"Perseus/Renderers/Article Renderer",argTypes:{useNewStyles:{control:"boolean"}}},t=e=>r(m,{json:k,dependencies:p,useNewStyles:e.useNewStyles}),o=e=>r(m,{json:M,dependencies:p,useNewStyles:e.useNewStyles}),i=({useNewStyles:e})=>r(m,{json:W,dependencies:p,useNewStyles:e}),s=({useNewStyles:e})=>r(b,{children:r(_.Consumer,{children:({keypadElement:a,setRenderer:c})=>r(m,{ref:d=>{c(d)},json:T,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0,onFocusChange:j("onFocusChange")},keypadElement:a})})}),n=({useNewStyles:e})=>r(b,{children:r(_.Consumer,{children:({keypadElement:a,setRenderer:c})=>r(m,{ref:d=>{c(d)},json:D,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0},keypadElement:a})})});t.__docgenInfo={description:"",methods:[],displayName:"ASingleSectionArticle"};o.__docgenInfo={description:"",methods:[],displayName:"BMultiSectionArticle"};i.__docgenInfo={description:"",methods:[],displayName:"PassageArticle"};s.__docgenInfo={description:"",methods:[],displayName:"ExpressionArticle"};n.__docgenInfo={description:"",methods:[],displayName:"MultiSectionedExpressionArticle"};var l,u,y;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args: { useNewStyles; }): React.ReactElement => { return ; diff --git a/assets/base-radio-13woGQGc.js b/assets/base-radio-SM-baXgO.js similarity index 99% rename from assets/base-radio-13woGQGc.js rename to assets/base-radio-SM-baXgO.js index e37bbd11f4..7ac5aab1ee 100644 --- a/assets/base-radio-13woGQGc.js +++ b/assets/base-radio-SM-baXgO.js @@ -1,4 +1,4 @@ -import{a as J,j as c}from"./jsx-runtime-FVsy8kgq.js";import{l as b}from"./index-awljIyHI.js";import{c as j}from"./index-dnMhQZ-1.js";import{r as q}from"./index-TT1qJ6UJ.js";import{R as F}from"./index-7vsPyIck.js";import{_ as X}from"./jquery-yG1GhClm.js";import{u as Z}from"./i18n-context-P5sgPFep.js";import{C as T}from"./perseus-api-Nq3s7IMx.js";import{h as ee,r as W,n as I,s as U}from"./constants-iPV6vHZm.js";import{m as N}from"./media-queries-gbofTbz-.js";import{s as re}from"./shared-4TdECMLk.js";import{U as te}from"./util-F8-MDmsT.js";import{C as ne}from"./choice-I73s7vIV.js";import{C as ae}from"./choice-none-above-0_QL8uoF.js";typeof HTMLElement<"u"&&!HTMLElement.prototype.scrollTo&&(HTMLElement.prototype.scrollTo=function(e,a){this.scrollLeft=e,this.scrollTop=a});const M=(e,a)=>{typeof e.scrollTo=="function"?e.scrollTo(0,a):"scrollTop"in e&&(e.scrollTop=a)},ie=(e,a,i=0,t)=>{const o=e===window?window.pageYOffset:e.scrollTop,u=a,h=u-o,d=17,f=i/d;let p=0;const R=setInterval(function(){if(pe===document.body||e==null?window:e.scrollHeight>e.clientHeight?e:S(e.parentElement),se=750,oe=(e,a)=>{setTimeout(()=>{const i=S(e),t=e.getBoundingClientRect(),o=i===window?{top:0,bottom:window.innerHeight}:i.getBoundingClientRect();let u=0;const h=i===window?window.scrollY:i.scrollTop;if(t.bottom>o.bottom){let d=t.bottom-o.bottom;t.top+d{if(e.canScrollPage&&p&&a&&!k.current){const r=t.findIndex(n=>n.checked);if(r>=0){const n=O.current[r],l=F.findDOMNode(n.current);l&&oe(l)}}k.current=a},[e,t,p,a]);function C(r,n){let y;n.checked&&!u?y=t.map(g=>!1):y=t.map(g=>g.checked);const l=t.map(g=>g.crossedOut);y[r]=n.checked,l[r]=n.crossedOut,R({checked:y,crossedOut:l})}v==null||v(r=>{const n=O.current[r||0],l=F.findDOMNode(n.current);if(l)l.focus();else return!1;return!0});const x=e.isMobile,D=t[0].highlighted,H=t[t.length-1].highlighted,V=j("perseus-widget-radio",!o&&"perseus-rendered-radio",b.css(s.radio,s.responsiveRadioContainer,D&&x&&s.radioContainerFirstHighlighted,H&&x&&s.radioContainerLastHighlighted)),G=j("instructions",b.css(s.instructions,x&&s.instructionsMobile)),z=ue(u,d,f,A),K=b.css(s.responsiveFieldset),B=J("fieldset",{className:`perseus-widget-radio-fieldset ${K}`,children:[c("legend",{className:"perseus-sr-only",children:z}),c("div",{className:G,"aria-hidden":"true",children:z}),c("ul",{className:V,style:{listStyle:"none"},children:t.map((r,n)=>{let y=ne;const l=q.createRef();O.current[n]=l;const g={apiOptions:e,multipleSelect:u,checked:r.checked,crossedOut:r.crossedOut,previouslyAnswered:r.previouslyAnswered,reviewMode:i,correct:r.correct,rationale:r.rationale,content:r.content,disabled:e.readOnly||r.disabled,showCorrectness:i||!!r.showCorrectness,showRationale:r.hasRationale&&(i||r.showRationale),pos:n,onChange:m=>{o||C(n,m)}};r.isNoneOfTheAbove&&(y=ae,X.extend(g,{showContent:r.revealNoneOfTheAbove}));const E=t[n+1],Y=!!E&&E.highlighted,L=m=>b.css(re.aboveScratchpad,s.item,s.responsiveItem,m&&s.selectedItem,m&&r.highlighted&&s.aboveBackdrop,m&&r.highlighted&&e.isMobile&&s.aboveBackdropMobile,Y&&e.isMobile&&s.nextHighlighted);L(!0);let _;i&&a&&(_=a.choices[n].correct?T.CORRECT:T.INCORRECT);const Q=j(L(r.checked),T.RADIO.OPTION,r.checked&&T.RADIO.SELECTED,_);let P=null,$;return o&&($=m=>{let w=m.target;for(;w&&w!==P;){if(w.getAttribute("data-is-radio-icon")){C(n,{checked:!r.checked,crossedOut:r.crossedOut});return}w=w.parentNode}}),c("li",{ref:m=>P=m,className:Q,onClick:$,onTouchStart:h?void 0:le,children:c(y,{...g,ref:l})},n)})})]});return c("div",{className:b.css(s.responsiveContainer),children:B})},s=b.StyleSheet.create({instructions:{display:"block",color:ee,fontSize:14,lineHeight:1.25,fontFamily:"inherit",fontStyle:"normal",fontWeight:"bold",marginBottom:16},instructionsMobile:{fontSize:18,[N.smOrSmaller]:{fontSize:16},[N.xl]:{fontSize:20}},radio:{padding:0},responsiveRadioContainer:{borderBottom:`1px solid ${W}`,borderTop:`1px solid ${W}`,width:"auto",[N.smOrSmaller]:{marginLeft:I,marginRight:I}},radioContainerFirstHighlighted:{borderTop:"1px solid rgba(0, 0, 0, 0)"},radioContainerLastHighlighted:{borderBottom:"1px solid rgba(0, 0, 0, 0)"},item:{marginLeft:20},responsiveItem:{marginLeft:0,padding:0,":not(:last-child)":{borderBottom:`1px solid ${W}`}},selectedItem:{background:"white"},aboveBackdrop:{position:"relative",zIndex:1062},aboveBackdropMobile:{boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2),0 0 2px 0 rgba(0, 0, 0, 0.1)",":not(:last-child)":{borderBottom:"1px solid rgba(0, 0, 0, 0)"}},nextHighlighted:{":not(:last-child)":{borderBottom:"1px solid rgba(0, 0, 0, 0)"}},responsiveContainer:{overflow:"auto",marginLeft:I,paddingLeft:U},responsiveFieldset:{paddingRight:U,minWidth:"auto"}});de.__docgenInfo={description:"",methods:[],displayName:"BaseRadio",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ +import{a as J,j as c}from"./jsx-runtime-FVsy8kgq.js";import{l as b}from"./index-awljIyHI.js";import{c as j}from"./index-dnMhQZ-1.js";import{r as q}from"./index-TT1qJ6UJ.js";import{R as F}from"./index-7vsPyIck.js";import{_ as X}from"./jquery-yG1GhClm.js";import{u as Z}from"./i18n-context-P5sgPFep.js";import{C as T}from"./perseus-api-Nq3s7IMx.js";import{h as ee,r as W,n as I,s as U}from"./constants-iPV6vHZm.js";import{m as N}from"./media-queries-gbofTbz-.js";import{s as re}from"./shared-4TdECMLk.js";import{U as te}from"./util-F8-MDmsT.js";import{C as ne}from"./choice-I73s7vIV.js";import{C as ae}from"./choice-none-above-lqQAegUH.js";typeof HTMLElement<"u"&&!HTMLElement.prototype.scrollTo&&(HTMLElement.prototype.scrollTo=function(e,a){this.scrollLeft=e,this.scrollTop=a});const M=(e,a)=>{typeof e.scrollTo=="function"?e.scrollTo(0,a):"scrollTop"in e&&(e.scrollTop=a)},ie=(e,a,i=0,t)=>{const o=e===window?window.pageYOffset:e.scrollTop,u=a,h=u-o,d=17,f=i/d;let p=0;const R=setInterval(function(){if(pe===document.body||e==null?window:e.scrollHeight>e.clientHeight?e:S(e.parentElement),se=750,oe=(e,a)=>{setTimeout(()=>{const i=S(e),t=e.getBoundingClientRect(),o=i===window?{top:0,bottom:window.innerHeight}:i.getBoundingClientRect();let u=0;const h=i===window?window.scrollY:i.scrollTop;if(t.bottom>o.bottom){let d=t.bottom-o.bottom;t.top+d{if(e.canScrollPage&&p&&a&&!k.current){const r=t.findIndex(n=>n.checked);if(r>=0){const n=O.current[r],l=F.findDOMNode(n.current);l&&oe(l)}}k.current=a},[e,t,p,a]);function C(r,n){let y;n.checked&&!u?y=t.map(g=>!1):y=t.map(g=>g.checked);const l=t.map(g=>g.crossedOut);y[r]=n.checked,l[r]=n.crossedOut,R({checked:y,crossedOut:l})}v==null||v(r=>{const n=O.current[r||0],l=F.findDOMNode(n.current);if(l)l.focus();else return!1;return!0});const x=e.isMobile,D=t[0].highlighted,H=t[t.length-1].highlighted,V=j("perseus-widget-radio",!o&&"perseus-rendered-radio",b.css(s.radio,s.responsiveRadioContainer,D&&x&&s.radioContainerFirstHighlighted,H&&x&&s.radioContainerLastHighlighted)),G=j("instructions",b.css(s.instructions,x&&s.instructionsMobile)),z=ue(u,d,f,A),K=b.css(s.responsiveFieldset),B=J("fieldset",{className:`perseus-widget-radio-fieldset ${K}`,children:[c("legend",{className:"perseus-sr-only",children:z}),c("div",{className:G,"aria-hidden":"true",children:z}),c("ul",{className:V,style:{listStyle:"none"},children:t.map((r,n)=>{let y=ne;const l=q.createRef();O.current[n]=l;const g={apiOptions:e,multipleSelect:u,checked:r.checked,crossedOut:r.crossedOut,previouslyAnswered:r.previouslyAnswered,reviewMode:i,correct:r.correct,rationale:r.rationale,content:r.content,disabled:e.readOnly||r.disabled,showCorrectness:i||!!r.showCorrectness,showRationale:r.hasRationale&&(i||r.showRationale),pos:n,onChange:m=>{o||C(n,m)}};r.isNoneOfTheAbove&&(y=ae,X.extend(g,{showContent:r.revealNoneOfTheAbove}));const E=t[n+1],Y=!!E&&E.highlighted,L=m=>b.css(re.aboveScratchpad,s.item,s.responsiveItem,m&&s.selectedItem,m&&r.highlighted&&s.aboveBackdrop,m&&r.highlighted&&e.isMobile&&s.aboveBackdropMobile,Y&&e.isMobile&&s.nextHighlighted);L(!0);let _;i&&a&&(_=a.choices[n].correct?T.CORRECT:T.INCORRECT);const Q=j(L(r.checked),T.RADIO.OPTION,r.checked&&T.RADIO.SELECTED,_);let P=null,$;return o&&($=m=>{let w=m.target;for(;w&&w!==P;){if(w.getAttribute("data-is-radio-icon")){C(n,{checked:!r.checked,crossedOut:r.crossedOut});return}w=w.parentNode}}),c("li",{ref:m=>P=m,className:Q,onClick:$,onTouchStart:h?void 0:le,children:c(y,{...g,ref:l})},n)})})]});return c("div",{className:b.css(s.responsiveContainer),children:B})},s=b.StyleSheet.create({instructions:{display:"block",color:ee,fontSize:14,lineHeight:1.25,fontFamily:"inherit",fontStyle:"normal",fontWeight:"bold",marginBottom:16},instructionsMobile:{fontSize:18,[N.smOrSmaller]:{fontSize:16},[N.xl]:{fontSize:20}},radio:{padding:0},responsiveRadioContainer:{borderBottom:`1px solid ${W}`,borderTop:`1px solid ${W}`,width:"auto",[N.smOrSmaller]:{marginLeft:I,marginRight:I}},radioContainerFirstHighlighted:{borderTop:"1px solid rgba(0, 0, 0, 0)"},radioContainerLastHighlighted:{borderBottom:"1px solid rgba(0, 0, 0, 0)"},item:{marginLeft:20},responsiveItem:{marginLeft:0,padding:0,":not(:last-child)":{borderBottom:`1px solid ${W}`}},selectedItem:{background:"white"},aboveBackdrop:{position:"relative",zIndex:1062},aboveBackdropMobile:{boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2),0 0 2px 0 rgba(0, 0, 0, 0.1)",":not(:last-child)":{borderBottom:"1px solid rgba(0, 0, 0, 0)"}},nextHighlighted:{":not(:last-child)":{borderBottom:"1px solid rgba(0, 0, 0, 0)"}},responsiveContainer:{overflow:"auto",marginLeft:I,paddingLeft:U},responsiveFieldset:{paddingRight:U,minWidth:"auto"}});de.__docgenInfo={description:"",methods:[],displayName:"BaseRadio",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ isArticle?: boolean; onFocusChange?: ( newFocusPath: FocusPath, diff --git a/assets/base-radio.stories-8MJpt5sR.js b/assets/base-radio.stories-lNQF0G1Q.js similarity index 95% rename from assets/base-radio.stories-8MJpt5sR.js rename to assets/base-radio.stories-lNQF0G1Q.js index c26254792b..6c5e5048dc 100644 --- a/assets/base-radio.stories-8MJpt5sR.js +++ b/assets/base-radio.stories-lNQF0G1Q.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a as U}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{B as n}from"./base-radio-13woGQGc.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-awljIyHI.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./jquery-yG1GhClm.js";import"./i18n-context-P5sgPFep.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./constants-iPV6vHZm.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./renderer-VfFjn7ah.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";function r(t){return{...{checked:!1,crossedOut:!1,content:"",rationale:"",hasRationale:!1,showRationale:!1,showCorrectness:!1,correct:!1,isNoneOfTheAbove:!1,highlighted:!1,previouslyAnswered:!1,revealNoneOfTheAbove:!1,disabled:!1},...t}}const Ge={title:"Perseus/Widgets/Radio/Base Radio",args:{multipleSelect:!1,editMode:!1,countChoices:!1}},i={apiOptions:{},reviewMode:!1,choices:[r({content:"Content 1"}),r({content:"Content 2"}),r({content:"Content 3",correct:!0}),r({isNoneOfTheAbove:!0})],deselectEnabled:!1,editMode:!1,labelWrap:!1,countChoices:!1,numCorrect:1,multipleSelect:!1,onChange:U("changed"),isLastUsedWidget:!1},a=t=>{const e={...i,...t};return o(n,{...e})},l=t=>{const e={...i,multipleSelect:!1};return o(n,{...e})},p=t=>{const e={...i,multipleSelect:!0};return o(n,{...e})},u=t=>{const e={...i,multipleSelect:!0,numCorrect:2,countChoices:!0};return o(n,{...e})},d=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`}));e[1].checked=!0;const s={...i,multipleSelect:!1,choices:e};return o(n,{...s})},m=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`}));e[1].checked=!0,e[2].checked=!0;const s={...i,multipleSelect:!0,choices:e};return o(n,{...s})},h=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].correct=!0;const s={...i,multipleSelect:!1,choices:e};return o(n,{...s})},S=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].checked=!0,e[2].correct=!0,e[3].correct=!0;const s={...i,multipleSelect:!0,numCorrect:2,choices:e};return o(n,{...s})};a.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};l.__docgenInfo={description:"",methods:[],displayName:"SingleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};u.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithCountChoicesLabel",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};d.__docgenInfo={description:"",methods:[],displayName:"SingleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"MultipleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};h.__docgenInfo={description:"",methods:[],displayName:"SingleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};S.__docgenInfo={description:"",methods:[],displayName:"MultipleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};var f,y,C;a.parameters={...a.parameters,docs:{...(f=a.parameters)==null?void 0:f.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a as U}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{B as n}from"./base-radio-SM-baXgO.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-awljIyHI.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./jquery-yG1GhClm.js";import"./i18n-context-P5sgPFep.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./constants-iPV6vHZm.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./renderer-JG1Z7r2S.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";function r(t){return{...{checked:!1,crossedOut:!1,content:"",rationale:"",hasRationale:!1,showRationale:!1,showCorrectness:!1,correct:!1,isNoneOfTheAbove:!1,highlighted:!1,previouslyAnswered:!1,revealNoneOfTheAbove:!1,disabled:!1},...t}}const Ge={title:"Perseus/Widgets/Radio/Base Radio",args:{multipleSelect:!1,editMode:!1,countChoices:!1}},i={apiOptions:{},reviewMode:!1,choices:[r({content:"Content 1"}),r({content:"Content 2"}),r({content:"Content 3",correct:!0}),r({isNoneOfTheAbove:!0})],deselectEnabled:!1,editMode:!1,labelWrap:!1,countChoices:!1,numCorrect:1,multipleSelect:!1,onChange:U("changed"),isLastUsedWidget:!1},a=t=>{const e={...i,...t};return o(n,{...e})},l=t=>{const e={...i,multipleSelect:!1};return o(n,{...e})},p=t=>{const e={...i,multipleSelect:!0};return o(n,{...e})},u=t=>{const e={...i,multipleSelect:!0,numCorrect:2,countChoices:!0};return o(n,{...e})},d=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`}));e[1].checked=!0;const s={...i,multipleSelect:!1,choices:e};return o(n,{...s})},m=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`}));e[1].checked=!0,e[2].checked=!0;const s={...i,multipleSelect:!0,choices:e};return o(n,{...s})},h=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].correct=!0;const s={...i,multipleSelect:!1,choices:e};return o(n,{...s})},S=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].checked=!0,e[2].correct=!0,e[3].correct=!0;const s={...i,multipleSelect:!0,numCorrect:2,choices:e};return o(n,{...s})};a.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};l.__docgenInfo={description:"",methods:[],displayName:"SingleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};u.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithCountChoicesLabel",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};d.__docgenInfo={description:"",methods:[],displayName:"SingleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"MultipleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};h.__docgenInfo={description:"",methods:[],displayName:"SingleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};S.__docgenInfo={description:"",methods:[],displayName:"MultipleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};var f,y,C;a.parameters={...a.parameters,docs:{...(f=a.parameters)==null?void 0:f.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const overwrittenProps = ({ ...defaultProps, ...args diff --git a/assets/behavior-Or9dqpn7.js b/assets/behavior-xJJumj3W.js similarity index 95% rename from assets/behavior-Or9dqpn7.js rename to assets/behavior-xJJumj3W.js index bb5c8f0298..fb4760646b 100644 --- a/assets/behavior-Or9dqpn7.js +++ b/assets/behavior-xJJumj3W.js @@ -1,4 +1,4 @@ -import{j as e,a}from"./jsx-runtime-FVsy8kgq.js";import{b as R}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{l as t}from"./index-awljIyHI.js";import{c as f}from"./index-deFLJwr4.js";import{r as y}from"./index-TT1qJ6UJ.js";import{b as F,g as D,a as w}from"./global-colors-VIVU4Od4.js";const v=class v extends y.Component{constructor(n){super(n),this.handleClick=r=>{this.props.disabled||(this.props.shouldUpdate()&&(this.waitingForClick=!1),this.props.onClick&&!this.props.disabled&&this.props.onClick(r))},this.handleMouseEnter=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!0})},this.handleMouseLeave=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!1})},this.handleTouchStart=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({hovered:!0})},this.handleTouchEnd=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({hovered:!1}),this.waitingForClick=!0)},this.handleMouseDown=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({focused:!1}),this.focusFlag=!0)},this.handleBlur=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({focused:!1})},this.handleFocus=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.focusFlag?this.focusFlag=!1:this.setState({focused:!0}))},this.state={focused:!1,hovered:n.startHovered}}render(){const n={onBlur:this.handleBlur,onClick:this.handleClick,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},{children:r}=this.props;return(r==null?void 0:r(this.state,n))||null}};v.defaultProps={startHovered:!1,shouldUpdate:()=>!0};let c=v;c.__docgenInfo={description:"",methods:[{name:"handleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null},{name:"handleMouseEnter",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseLeave",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchStart",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseDown",docblock:null,modifiers:[],params:[],returns:null},{name:"handleBlur",docblock:null,modifiers:[],params:[],returns:null},{name:"handleFocus",docblock:null,modifiers:[],params:[],returns:null}],displayName:"HoverBehavior",props:{children:{required:!1,tsType:{name:"signature",type:"function",raw:"(state: State, handlers: Handlers) => React.ReactElement",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{ +import{j as e,a}from"./jsx-runtime-FVsy8kgq.js";import{b as R}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{l as t}from"./index-awljIyHI.js";import{c as f}from"./index-deFLJwr4.js";import{r as y}from"./index-TT1qJ6UJ.js";import{b as F,g as D,a as w}from"./global-colors-VIVU4Od4.js";const v=class v extends y.Component{constructor(n){super(n),this.handleClick=r=>{this.props.disabled||(this.props.shouldUpdate()&&(this.waitingForClick=!1),this.props.onClick&&!this.props.disabled&&this.props.onClick(r))},this.handleMouseEnter=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!0})},this.handleMouseLeave=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!1})},this.handleTouchStart=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({hovered:!0})},this.handleTouchEnd=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({hovered:!1}),this.waitingForClick=!0)},this.handleMouseDown=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({focused:!1}),this.focusFlag=!0)},this.handleBlur=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({focused:!1})},this.handleFocus=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.focusFlag?this.focusFlag=!1:this.setState({focused:!0}))},this.state={focused:!1,hovered:n.startHovered}}render(){const n={onBlur:this.handleBlur,onClick:this.handleClick,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},{children:r}=this.props;return(r==null?void 0:r(this.state,n))||null}};v.defaultProps={startHovered:!1,shouldUpdate:()=>!0};let c=v;c.__docgenInfo={description:"",methods:[{name:"handleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null},{name:"handleMouseEnter",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseLeave",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchStart",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseDown",docblock:null,modifiers:[],params:[],returns:null},{name:"handleBlur",docblock:null,modifiers:[],params:[],returns:null},{name:"handleFocus",docblock:null,modifiers:[],params:[],returns:null}],displayName:"HoverBehavior",props:{children:{required:!1,tsType:{name:"signature",type:"function",raw:"(state: State, handlers: Handlers) => React.ReactElement",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{ focused: boolean; hovered: boolean; }`,signature:{properties:[{key:"focused",value:{name:"boolean",required:!0}},{key:"hovered",value:{name:"boolean",required:!0}}]}},name:"state"},{type:{name:"signature",type:"object",raw:`{ diff --git a/assets/behavior.stories-oSRdFebJ.js b/assets/behavior.stories-vmcJgHdJ.js similarity index 73% rename from assets/behavior.stories-oSRdFebJ.js rename to assets/behavior.stories-vmcJgHdJ.js index 923cb62938..853c0927cb 100644 --- a/assets/behavior.stories-oSRdFebJ.js +++ b/assets/behavior.stories-vmcJgHdJ.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{B as l}from"./behavior-Or9dqpn7.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./global-colors-VIVU4Od4.js";const ir={title:"PerseusEditor/Widgets/Label Image/Behavior"},t=u=>{const[r,e]=c.useState({multipleAnswers:!1,hideChoicesFromInstructions:!1}),s={multipleAnswers:r.multipleAnswers,hideChoicesFromInstructions:r.hideChoicesFromInstructions,onChange:o=>{a("onChange")(o),e({...r,...o})}};return n(l,{preferredPopoverDirection:"NONE",...s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{B as l}from"./behavior-xJJumj3W.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./global-colors-VIVU4Od4.js";const ir={title:"PerseusEditor/Widgets/Label Image/Behavior"},t=u=>{const[r,e]=c.useState({multipleAnswers:!1,hideChoicesFromInstructions:!1}),s={multipleAnswers:r.multipleAnswers,hideChoicesFromInstructions:r.hideChoicesFromInstructions,onChange:o=>{a("onChange")(o),e({...r,...o})}};return n(l,{preferredPopoverDirection:"NONE",...s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const [state, setState] = React.useState({ multipleAnswers: false, hideChoicesFromInstructions: false diff --git a/assets/categorizer-editor-3QAla4Wt.js b/assets/categorizer-editor-cvgo7rUS.js similarity index 79% rename from assets/categorizer-editor-3QAla4Wt.js rename to assets/categorizer-editor-cvgo7rUS.js index 2929a9d283..3bb476121e 100644 --- a/assets/categorizer-editor-3QAla4Wt.js +++ b/assets/categorizer-editor-cvgo7rUS.js @@ -1 +1 @@ -import{a as o,j as r}from"./jsx-runtime-FVsy8kgq.js";import{C as p,c as n,p as m}from"./article-renderer-GCz9idJ2.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as c}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as u}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{E as d}from"./editor-jsonify-yjAz4UcO.js";import{C as f}from"./index-QCAhLhLD.js";import{P as s}from"./index-0C4KXdeC.js";import{r as h}from"./index-TT1qJ6UJ.js";const{TextListEditor:i}=u,g=p.widget,a=class a extends h.Component{constructor(){super(...arguments),this.change=(...e)=>n.apply(this,e),this.serialize=()=>d.serialize.call(this)}render(){return o("div",{children:[r("div",{className:"perseus-widget-row",children:r(f,{label:"Randomize item order",checked:this.props.randomizeItems,onChange:e=>{this.props.onChange({randomizeItems:e})}})}),"Categories:",r(i,{options:this.props.categories,onChange:e=>{this.change("categories",e)},layout:"horizontal"}),"Items:",r(i,{options:this.props.items,onChange:e=>{this.change({items:e,values:l.first(this.props.values,e.length)})},layout:"vertical"}),r(g,{apiOptions:this.props.apiOptions,items:this.props.items,categories:this.props.categories,values:this.props.values,onChange:e=>{this.props.onChange(e)},trackInteraction:function(){}})]})}};a.propTypes={...m,apiOptions:c.propTypes,items:s.arrayOf(s.string),categories:s.arrayOf(s.string),values:s.arrayOf(s.number),randomizeItems:s.bool},a.widgetName="categorizer",a.defaultProps={items:[],categories:[],values:[],randomizeItems:!1};let t=a;t.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CategorizerEditor",props:{items:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},categories:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},values:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},randomizeItems:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};export{t as C}; +import{a as o,j as r}from"./jsx-runtime-FVsy8kgq.js";import{C as p,c as n,p as m}from"./article-renderer-ub6lGcPc.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import{A as c}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as u}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{E as d}from"./editor-jsonify-4Li1SRv8.js";import{C as f}from"./index-QCAhLhLD.js";import{P as s}from"./index-0C4KXdeC.js";import{r as h}from"./index-TT1qJ6UJ.js";const{TextListEditor:i}=u,g=p.widget,a=class a extends h.Component{constructor(){super(...arguments),this.change=(...e)=>n.apply(this,e),this.serialize=()=>d.serialize.call(this)}render(){return o("div",{children:[r("div",{className:"perseus-widget-row",children:r(f,{label:"Randomize item order",checked:this.props.randomizeItems,onChange:e=>{this.props.onChange({randomizeItems:e})}})}),"Categories:",r(i,{options:this.props.categories,onChange:e=>{this.change("categories",e)},layout:"horizontal"}),"Items:",r(i,{options:this.props.items,onChange:e=>{this.change({items:e,values:l.first(this.props.values,e.length)})},layout:"vertical"}),r(g,{apiOptions:this.props.apiOptions,items:this.props.items,categories:this.props.categories,values:this.props.values,onChange:e=>{this.props.onChange(e)},trackInteraction:function(){}})]})}};a.propTypes={...m,apiOptions:c.propTypes,items:s.arrayOf(s.string),categories:s.arrayOf(s.string),values:s.arrayOf(s.number),randomizeItems:s.bool},a.widgetName="categorizer",a.defaultProps={items:[],categories:[],values:[],randomizeItems:!1};let t=a;t.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CategorizerEditor",props:{items:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},categories:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},values:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},randomizeItems:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};export{t as C}; diff --git a/assets/categorizer-editor.stories-3pYdcpt3.js b/assets/categorizer-editor.stories-kpPdQNhv.js similarity index 62% rename from assets/categorizer-editor.stories-3pYdcpt3.js rename to assets/categorizer-editor.stories-kpPdQNhv.js index a6e0df4fac..3f4f8ca2d2 100644 --- a/assets/categorizer-editor.stories-3pYdcpt3.js +++ b/assets/categorizer-editor.stories-kpPdQNhv.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as m}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{a as e}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as a}from"./categorizer-editor-3QAla4Wt.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-6SWUlni2.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-Ts3i1VPI.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-0_QL8uoF.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./components-V6aclUoQ.js";import"./editor-jsonify-yjAz4UcO.js";import"./index-0C4KXdeC.js";const tt={title:"PerseusEditor/Widgets/Categorizer Editor"},r=s=>p(a,{onChange:e("onChange"),apiOptions:m.defaults});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import{A as m}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{a as e}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as a}from"./categorizer-editor-cvgo7rUS.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-VNdK7gMK.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-MKIRfGVo.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-lqQAegUH.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./components-yT7oveOH.js";import"./editor-jsonify-4Li1SRv8.js";import"./index-0C4KXdeC.js";const tt={title:"PerseusEditor/Widgets/Categorizer Editor"},r=s=>p(a,{onChange:e("onChange"),apiOptions:m.defaults});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const ot=["Default"];export{r as Default,ot as __namedExportsOrder,tt as default}; diff --git a/assets/categorizer.stories-CN_tLkCT.js b/assets/categorizer.stories-thEPuyEF.js similarity index 71% rename from assets/categorizer.stories-CN_tLkCT.js rename to assets/categorizer.stories-thEPuyEF.js index 58e7489243..5c3966fdac 100644 --- a/assets/categorizer.stories-CN_tLkCT.js +++ b/assets/categorizer.stories-thEPuyEF.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as e}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const m={content:`**Classify each graph according to the kind of relationship it suggests.** +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as e}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const m={content:`**Classify each graph according to the kind of relationship it suggests.** $\\qquad\\qquad\\quad\\text{Graph 1}\\qquad\\qquad\\quad\\qquad\\qquad\\quad\\text{Graph 2}$ diff --git a/assets/choice-I73s7vIV.js b/assets/choice-I73s7vIV.js index 9b5adb5917..5e75dcb92c 100644 --- a/assets/choice-I73s7vIV.js +++ b/assets/choice-I73s7vIV.js @@ -1 +1 @@ -import{j as m,a as N}from"./jsx-runtime-FVsy8kgq.js";import{b as V,a as K,_ as L,V as D}from"./index-6h5t6F0w.js";import{r as a}from"./index-TT1qJ6UJ.js";import{c as Z,L as ae}from"./react-router-dom-W_e8xVUu.js";import{i as ne,g as de}from"./index-o3wWn3Y5.js";import{l as H}from"./index-awljIyHI.js";import{b as le,L as se}from"./index-h_CiYGGb.js";import{C as ce}from"./index-ngddCaVG.js";import{m as ue,c as fe,u as pe,a as be,T as me}from"./index-rfN0X25E.js";import{c as i,b as k,s as h,a as M}from"./index-deFLJwr4.js";import{P as U}from"./index-xuPsLuPk.js";import{C as X}from"./index-WNT3sUKf.js";import{S as ge}from"./index-qUyqkRvh.js";import{P as ye,b as he}from"./index-BPSWBbj5.js";import{c as Y}from"./index-dnMhQZ-1.js";import{u as xe}from"./i18n-context-P5sgPFep.js";import{I as ve}from"./icon-R5gZamfG.js";import{C as Ce,A as ke}from"./perseus-api-Nq3s7IMx.js";import{m as we}from"./media-queries-gbofTbz-.js";import{g as j,C as Se}from"./choice-icon-StuadxRF.js";import{O as Ie}from"./option-status-Yr5mIJZ4.js";const q={color:{bg:{action:{default:i.blue,active:i.activeBlue,inverse:i.fadedBlue},critical:{default:i.red,active:i.activeRed,inverse:i.fadedRed},primary:{default:i.white,disabled:i.offBlack32,inverse:i.darkBlue},secondary:{default:"none",inverse:"none",focus:i.white,active:{action:i.fadedBlue,critical:i.fadedRed}},tertiary:{hover:i.white},icon:{secondaryHover:"transparent"}},text:{disabled:i.offBlack32,inverse:i.white,primary:{disabled:i.white64},secondary:{inverse:i.white50},icon:{secondaryHover:"inherit"}},border:{disabled:i.offBlack32,primary:{inverse:i.white},secondary:{action:i.offBlack50,critical:i.offBlack50,inverse:i.white50},tertiary:{inverse:i.white}}},border:{width:{secondary:k.width.hairline,focused:k.width.thin,disabled:k.width.thin},radius:{default:k.radius.medium_4,tertiary:k.radius.xSmall_2,small:k.radius.medium_4,large:k.radius.large_6,icon:k.radius.full}},size:{height:{tertiaryHover:h.xxxxSmall_2,small:h.xLarge_32,medium:40,large:56}},margin:{icon:{offset:-h.xxxxSmall_2}},padding:{xsmall:h.xxxxSmall_2,small:h.xxSmall_6,medium:h.small_12,large:h.medium_16,xLarge:h.xLarge_32},font:{size:{large:18},lineHeight:{large:M.lineHeight.medium},weight:{default:M.weight.bold}}},Be=ue(q,{color:{bg:{secondary:{default:i.offWhite,active:{action:i.fadedBlue8,critical:i.fadedRed8},focus:i.offWhite},icon:{secondaryHover:i.fadedBlue16}},border:{secondary:{action:i.fadedBlue,critical:i.fadedRed}},text:{icon:{secondaryHover:i.blue}}},border:{radius:{default:k.radius.xLarge_12,small:k.radius.large_6,large:k.radius.xLarge_12},width:{focused:k.width.hairline}},margin:{icon:{offset:-h.xSmall_8}},font:{weight:{default:M.weight.regular}}}),Oe={default:q,khanmigo:Be},ee=fe(q);function ze(o){const n=a.useContext(me),r=Oe[n]||q;return a.createElement(ee.Provider,{value:r},o.children)}function G({icon:o,size:n,style:r,testId:l}){const e={"aria-hidden":!0,color:"currentColor",style:r,testId:l};switch(n){case"small":return a.createElement(U,L({},e,{size:"small",icon:o}));case"medium":default:return a.createElement(U,L({},e,{size:"medium",icon:o}))}}const Ee=["children","skipClientNav","color","disabled","focused","hovered","href","kind","labelStyle","light","pressed","size","style","testId","type","spinner","startIcon","endIcon","id","waiting"],Le=V("a"),_e=V("button"),Te=V(ae),We=a.forwardRef(function(n,r){const{theme:l,themeName:e}=pe(ee),t=be(Re,l),s=x=>{const{children:d,skipClientNav:u,color:g,disabled:C,focused:f,hovered:S,href:I=void 0,kind:v="primary",labelStyle:_,light:B=!1,pressed:c,size:y="medium",style:$,testId:p,type:T=void 0,spinner:O,startIcon:z,endIcon:b,id:W}=n,R=K(n,Ee),w=Ne(g,v,B,y,l,e),E=O||C,re=[t.shared,E&&t.disabled,z&&t.withStartIcon,b&&t.withEndIcon,w.default,E&&w.disabled,v!=="tertiary"&&!E&&(c?w.active:(S||f)&&w.focus),v==="tertiary"&&!c&&f&&[w.focus,E&&w.disabledFocus],y==="small"&&t.small,y==="large"&&t.large],A=L({"data-testid":p,id:W,role:"button",style:[re,$]},R),oe=y==="small"?le:se,te=a.createElement(oe,{style:[t.text,y==="large"&&t.largeText,_,O&&t.hiddenText,v==="tertiary"&&t.textWithFocus,v==="tertiary"&&!E&&(c?[w.hover,w.active]:S&&w.hover)],testId:p?`${p}-inner-label`:void 0},d),ie={medium:"small",small:"xsmall",large:"medium"},Q=y==="small"?"small":"medium",F=a.createElement(a.Fragment,null,z&&a.createElement(D,{style:t.iconWrapper},a.createElement(G,{size:Q,icon:z,style:[t.startIcon,v==="tertiary"&&t.tertiaryStartIcon],testId:p?`${p}-start-icon`:void 0})),te,O&&a.createElement(ce,{style:t.spinner,size:ie[y],light:v==="primary",testId:`${p||"button"}-spinner`}),b&&a.createElement(D,{testId:p?`${p}-end-icon-wrapper`:void 0,style:[P.endIcon,t.iconWrapper,t.endIconWrapper,v==="tertiary"&&t.endIconWrapperTertiary,(f||S)&&v!=="primary"&&t.iconWrapperSecondaryHovered]},a.createElement(G,{size:Q,icon:b,testId:p?`${p}-end-icon`:void 0})));return I&&!E?x&&!u&&ne(I)?a.createElement(Te,L({},A,{to:I,ref:r}),F):a.createElement(Le,L({},A,{href:I,ref:r}),F):a.createElement(_e,L({type:T||"button"},A,{"aria-disabled":E,ref:r}),F)};return a.createElement(Z.Consumer,null,x=>s(x))}),Re=o=>({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:o.size.height.medium,paddingTop:0,paddingBottom:0,paddingLeft:o.padding.large,paddingRight:o.padding.large,border:"none",borderRadius:o.border.radius.default,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{borderRadius:o.border.radius.small,height:o.size.height.small},large:{borderRadius:o.border.radius.large,height:o.size.height.large},text:{alignItems:"center",fontWeight:o.font.weight.default,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",pointerEvents:"none"},largeText:{fontSize:o.font.size.large,lineHeight:`${o.font.lineHeight.large}px`},textWithFocus:{position:"relative"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"},startIcon:{marginRight:o.padding.small,marginLeft:o.margin.icon.offset},tertiaryStartIcon:{marginLeft:0},endIcon:{marginLeft:o.padding.small},iconWrapper:{borderRadius:o.border.radius.icon,padding:o.padding.xsmall,minWidth:"auto"},iconWrapperSecondaryHovered:{backgroundColor:o.color.bg.icon.secondaryHover,color:o.color.text.icon.secondaryHover},endIconWrapper:{marginLeft:o.padding.small,marginRight:o.margin.icon.offset},endIconWrapperTertiary:{marginRight:0}}),P={},Ne=(o="default",n,r,l,e,t)=>{const s=o==="destructive"?e.color.bg.critical.default:e.color.bg.action.default,x=`${s}-${n}-${r}-${l}-${t}`;if(P[x])return P[x];const d=o==="destructive"?e.color.bg.critical.inverse:e.color.bg.action.inverse,u=o==="destructive"?e.color.bg.critical.active:e.color.bg.action.active,g=l==="large"?e.padding.xLarge:e.padding.large;let C={};if(n==="primary"){const f=r?e.color.bg.primary.inverse:e.color.bg.primary.default;C={default:{background:r?e.color.bg.primary.default:s,color:r?s:e.color.text.inverse,paddingLeft:g,paddingRight:g},focus:{boxShadow:`0 0 0 1px ${f}, 0 0 0 3px ${r?e.color.bg.primary.default:s}`},active:{boxShadow:`0 0 0 1px ${f}, 0 0 0 3px ${r?d:u}`,background:r?d:u,color:r?u:d},disabled:{background:r?d:e.color.bg.primary.disabled,color:r?s:e.color.text.primary.disabled,cursor:"default",":focus":{boxShadow:`0 0 0 1px ${r?e.color.bg.primary.disabled:e.color.bg.primary.default}, 0 0 0 3px ${r?d:e.color.bg.primary.disabled}`}}}}else if(n==="secondary"){const f=o==="destructive"?e.color.border.secondary.critical:e.color.border.secondary.action,S=o==="destructive"?e.color.bg.secondary.active.critical:e.color.bg.secondary.active.action;C={default:{background:r?e.color.bg.secondary.inverse:e.color.bg.secondary.default,color:r?e.color.text.inverse:s,borderColor:r?e.color.border.secondary.inverse:f,borderStyle:"solid",borderWidth:e.border.width.secondary,paddingLeft:g,paddingRight:g},focus:{background:r?e.color.bg.secondary.inverse:e.color.bg.secondary.focus,borderColor:"transparent",outlineColor:r?e.color.border.primary.inverse:s,outlineStyle:"solid",outlineWidth:e.border.width.focused},active:{background:r?u:S,color:r?d:u,borderColor:"transparent",outlineColor:r?d:u,outlineStyle:"solid",outlineWidth:e.border.width.focused},disabled:{color:r?e.color.text.secondary.inverse:e.color.text.disabled,outlineColor:r?d:e.color.border.disabled,cursor:"default",":focus":{outlineColor:r?e.color.border.secondary.inverse:e.color.border.disabled,outlineStyle:"solid",outlineWidth:e.border.width.disabled}}}}else if(n==="tertiary")C={default:{background:"none",color:r?e.color.text.inverse:s,paddingLeft:0,paddingRight:0},hover:{":after":{content:"''",position:"absolute",height:e.size.height.tertiaryHover,width:"100%",right:0,bottom:0,background:r?e.color.bg.tertiary.hover:s,borderRadius:e.border.radius.tertiary}},focus:{outlineStyle:"solid",outlineColor:r?e.color.border.tertiary.inverse:s,outlineWidth:e.border.width.focused,borderRadius:e.border.radius.default},active:{color:r?d:u,":after":{height:e.size.height.tertiaryHover,background:r?d:u}},disabled:{color:r?d:e.color.text.disabled,cursor:"default"},disabledFocus:{outlineColor:r?e.color.border.tertiary.inverse:e.color.border.disabled}};else throw new Error("Button kind not recognized");return P[x]=H.StyleSheet.create(C),P[x]},$e=["href","type","children","skipClientNav","onClick","beforeNav","safeWithNav","tabIndex","target","rel","color","kind","light","size","disabled","spinner"],Pe=a.forwardRef(function(n,r){const{href:l=void 0,type:e=void 0,children:t,skipClientNav:s,onClick:x,beforeNav:d=void 0,safeWithNav:u=void 0,tabIndex:g,target:C,rel:f,color:S="default",kind:I="primary",light:v=!1,size:_="medium",disabled:B=!1,spinner:c=!1}=n,y=K(n,$e),$=p=>{const T=de(l,s,p),O=(z,b)=>a.createElement(We,L({},y,z,b,{disabled:B,spinner:c||z.waiting,color:S,kind:I,light:v,size:_,skipClientNav:s,href:l,target:C,type:e,tabIndex:g,ref:r}),t);return d?a.createElement(T,{disabled:c||B,href:l,role:"button",type:e,onClick:x,beforeNav:d,safeWithNav:u,rel:f},O):a.createElement(T,{disabled:c||B,href:l,role:"button",type:e,onClick:x,safeWithNav:u,target:C,rel:f},O)};return a.createElement(ze,null,a.createElement(Z.Consumer,null,p=>$(p)))});function He(o,n,r,l,e,t){return e&&r?n?t.choiceCheckedCorrect({letter:o}):l?t.choiceCrossedOutCorrect({letter:o}):t.choiceCorrect({letter:o}):e&&!r?n?t.choiceCheckedIncorrect({letter:o}):l?t.choiceCrossedOutIncorrect({letter:o}):t.choiceIncorrect({letter:o}):n?t.choiceChecked({letter:o}):l?t.choiceCrossedOut({letter:o}):t.choice({letter:o})}const qe="16px 16px",Ae="12px 16px",Fe={path:"M27.218 6.82l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836zm36.27 0l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836zm36.27 0l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836z",width:100,height:27.284},je=function(o){const{disabled:n=!1,checked:r=!1,content:l,crossedOut:e,showCorrectness:t,multipleSelect:s,onChange:x=b=>{},reviewMode:d,correct:u=!1,apiOptions:g=ke.defaults,previouslyAnswered:C=!1,pos:f=0,showRationale:S=!1,rationale:I,forwardedRef:v}=o,[_,B]=a.useState(!1),{strings:c}=xe();a.useEffect(()=>{_&&n&&B(!1)},[n,_,B]);function y(b){const W=b.checked??r,R=b.crossedOut??e;x({checked:W,crossedOut:R})}const $=Y("description",H.css(J.description)),p=Y("perseus-radio-rationale-content",H.css(J.rationale)),T=!d&&g.readOnly||e,O=j(f,c),z=He(O,r,u,e,t,c);return N("div",{style:{dispay:"flex",flexDirection:"column",color:i.offBlack},className:$,children:[N("div",{style:{display:"flex",flexDirection:"row",opacity:T?.5:1,overflowX:"auto",overflowY:"hidden"},children:[m("div",{className:"perseus-sr-only",children:N("label",{children:[z,"   ",l,m("input",{type:s?"checkbox":"radio",checked:r,onClick:()=>{y({checked:!r,crossedOut:!1})},onChange:()=>{},disabled:n||g.readOnly,tabIndex:-1,className:Ce.RADIO.OPTION_CONTENT})]})}),m(X,{onClick:()=>{y({checked:!r,crossedOut:!1})},disabled:n||g.readOnly,style:{flex:1,color:i.offBlack,userSelect:"text"},ref:v,"aria-hidden":"true",children:({hovered:b,focused:W,pressed:R})=>N("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"center",paddingTop:h.xSmall_8,paddingBottom:h.xSmall_8,paddingLeft:h.xSmall_8},children:[m(Se,{pos:f,correct:u,crossedOut:e,pressed:R,focused:W,checked:r,hovered:b,showCorrectness:t,multipleSelect:s,reviewMode:d,previouslyAnswered:C}),N("span",{style:{paddingLeft:h.small_12,textAlign:"left",flex:1,paddingTop:4},children:[m("div",{children:m(Ie,{checked:r,correct:u,crossedOut:e,previouslyAnswered:C,reviewMode:d})}),m("div",{children:l})]})]})}),g.crossOutEnabled&&!d&&m(ye,{dismissEnabled:!0,content:({close:b})=>m(he,{title:c.crossOut,content:c.crossOutOption,closeButtonVisible:!0,actions:N(D,{children:[m(ge,{size:h.medium_16}),m(Pe,{kind:"primary","aria-label":c.crossOutChoice({letter:j(f,c)}),disabled:g.readOnly||d,onClick:()=>{y(e?{crossedOut:!1}:{checked:!1,crossedOut:!0}),b()},children:e?c.bringBack:c.crossOut})]})}),children:({open:b})=>m(X,{onClick:b,"aria-label":c.openMenuForChoice({letter:j(f,c)}),style:{alignSelf:"center",padding:"5px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"10px"},children:({hovered:W,focused:R,pressed:w})=>m(ve,{icon:Fe,size:3,color:i.offBlack64})})})]}),S&&m("div",{className:p,"data-testid":`perseus-radio-rationale-content-${f}`,children:I})]})},J=H.StyleSheet.create({description:{display:"inline-block",width:"100%"},rationale:{display:"block",padding:qe,paddingTop:0,marginLeft:54,color:i.offBlack64,[we.smOrSmaller]:{padding:Ae,paddingTop:0}}}),cr=a.forwardRef((o,n)=>m(je,{...o,forwardedRef:n}));export{Pe as B,cr as C}; +import{j as m,a as N}from"./jsx-runtime-FVsy8kgq.js";import{b as V,a as K,_ as L,V as D}from"./index-6h5t6F0w.js";import{r as a}from"./index-TT1qJ6UJ.js";import{c as Z,L as ae}from"./react-router-dom-W_e8xVUu.js";import{i as ne,g as de}from"./index-o3wWn3Y5.js";import{l as H}from"./index-awljIyHI.js";import{b as le,L as se}from"./index-h_CiYGGb.js";import{C as ce}from"./index-ngddCaVG.js";import{m as ue,c as fe,u as pe,a as be,T as me}from"./index-rfN0X25E.js";import{c as i,b as k,s as h,a as M}from"./index-deFLJwr4.js";import{P as U}from"./index-xuPsLuPk.js";import{C as X}from"./index-2dmvOE3q.js";import{S as ge}from"./index-qUyqkRvh.js";import{P as ye,b as he}from"./index-BPSWBbj5.js";import{c as Y}from"./index-dnMhQZ-1.js";import{u as xe}from"./i18n-context-P5sgPFep.js";import{I as ve}from"./icon-R5gZamfG.js";import{C as Ce,A as ke}from"./perseus-api-Nq3s7IMx.js";import{m as we}from"./media-queries-gbofTbz-.js";import{g as j,C as Se}from"./choice-icon-StuadxRF.js";import{O as Ie}from"./option-status-Yr5mIJZ4.js";const q={color:{bg:{action:{default:i.blue,active:i.activeBlue,inverse:i.fadedBlue},critical:{default:i.red,active:i.activeRed,inverse:i.fadedRed},primary:{default:i.white,disabled:i.offBlack32,inverse:i.darkBlue},secondary:{default:"none",inverse:"none",focus:i.white,active:{action:i.fadedBlue,critical:i.fadedRed}},tertiary:{hover:i.white},icon:{secondaryHover:"transparent"}},text:{disabled:i.offBlack32,inverse:i.white,primary:{disabled:i.white64},secondary:{inverse:i.white50},icon:{secondaryHover:"inherit"}},border:{disabled:i.offBlack32,primary:{inverse:i.white},secondary:{action:i.offBlack50,critical:i.offBlack50,inverse:i.white50},tertiary:{inverse:i.white}}},border:{width:{secondary:k.width.hairline,focused:k.width.thin,disabled:k.width.thin},radius:{default:k.radius.medium_4,tertiary:k.radius.xSmall_2,small:k.radius.medium_4,large:k.radius.large_6,icon:k.radius.full}},size:{height:{tertiaryHover:h.xxxxSmall_2,small:h.xLarge_32,medium:40,large:56}},margin:{icon:{offset:-h.xxxxSmall_2}},padding:{xsmall:h.xxxxSmall_2,small:h.xxSmall_6,medium:h.small_12,large:h.medium_16,xLarge:h.xLarge_32},font:{size:{large:18},lineHeight:{large:M.lineHeight.medium},weight:{default:M.weight.bold}}},Be=ue(q,{color:{bg:{secondary:{default:i.offWhite,active:{action:i.fadedBlue8,critical:i.fadedRed8},focus:i.offWhite},icon:{secondaryHover:i.fadedBlue16}},border:{secondary:{action:i.fadedBlue,critical:i.fadedRed}},text:{icon:{secondaryHover:i.blue}}},border:{radius:{default:k.radius.xLarge_12,small:k.radius.large_6,large:k.radius.xLarge_12},width:{focused:k.width.hairline}},margin:{icon:{offset:-h.xSmall_8}},font:{weight:{default:M.weight.regular}}}),Oe={default:q,khanmigo:Be},ee=fe(q);function ze(o){const n=a.useContext(me),r=Oe[n]||q;return a.createElement(ee.Provider,{value:r},o.children)}function G({icon:o,size:n,style:r,testId:l}){const e={"aria-hidden":!0,color:"currentColor",style:r,testId:l};switch(n){case"small":return a.createElement(U,L({},e,{size:"small",icon:o}));case"medium":default:return a.createElement(U,L({},e,{size:"medium",icon:o}))}}const Ee=["children","skipClientNav","color","disabled","focused","hovered","href","kind","labelStyle","light","pressed","size","style","testId","type","spinner","startIcon","endIcon","id","waiting"],Le=V("a"),_e=V("button"),Te=V(ae),We=a.forwardRef(function(n,r){const{theme:l,themeName:e}=pe(ee),t=be(Re,l),s=x=>{const{children:d,skipClientNav:u,color:g,disabled:C,focused:f,hovered:S,href:I=void 0,kind:v="primary",labelStyle:_,light:B=!1,pressed:c,size:y="medium",style:$,testId:p,type:T=void 0,spinner:O,startIcon:z,endIcon:b,id:W}=n,R=K(n,Ee),w=Ne(g,v,B,y,l,e),E=O||C,re=[t.shared,E&&t.disabled,z&&t.withStartIcon,b&&t.withEndIcon,w.default,E&&w.disabled,v!=="tertiary"&&!E&&(c?w.active:(S||f)&&w.focus),v==="tertiary"&&!c&&f&&[w.focus,E&&w.disabledFocus],y==="small"&&t.small,y==="large"&&t.large],A=L({"data-testid":p,id:W,role:"button",style:[re,$]},R),oe=y==="small"?le:se,te=a.createElement(oe,{style:[t.text,y==="large"&&t.largeText,_,O&&t.hiddenText,v==="tertiary"&&t.textWithFocus,v==="tertiary"&&!E&&(c?[w.hover,w.active]:S&&w.hover)],testId:p?`${p}-inner-label`:void 0},d),ie={medium:"small",small:"xsmall",large:"medium"},Q=y==="small"?"small":"medium",F=a.createElement(a.Fragment,null,z&&a.createElement(D,{style:t.iconWrapper},a.createElement(G,{size:Q,icon:z,style:[t.startIcon,v==="tertiary"&&t.tertiaryStartIcon],testId:p?`${p}-start-icon`:void 0})),te,O&&a.createElement(ce,{style:t.spinner,size:ie[y],light:v==="primary",testId:`${p||"button"}-spinner`}),b&&a.createElement(D,{testId:p?`${p}-end-icon-wrapper`:void 0,style:[P.endIcon,t.iconWrapper,t.endIconWrapper,v==="tertiary"&&t.endIconWrapperTertiary,(f||S)&&v!=="primary"&&t.iconWrapperSecondaryHovered]},a.createElement(G,{size:Q,icon:b,testId:p?`${p}-end-icon`:void 0})));return I&&!E?x&&!u&&ne(I)?a.createElement(Te,L({},A,{to:I,ref:r}),F):a.createElement(Le,L({},A,{href:I,ref:r}),F):a.createElement(_e,L({type:T||"button"},A,{"aria-disabled":E,ref:r}),F)};return a.createElement(Z.Consumer,null,x=>s(x))}),Re=o=>({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:o.size.height.medium,paddingTop:0,paddingBottom:0,paddingLeft:o.padding.large,paddingRight:o.padding.large,border:"none",borderRadius:o.border.radius.default,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{borderRadius:o.border.radius.small,height:o.size.height.small},large:{borderRadius:o.border.radius.large,height:o.size.height.large},text:{alignItems:"center",fontWeight:o.font.weight.default,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",pointerEvents:"none"},largeText:{fontSize:o.font.size.large,lineHeight:`${o.font.lineHeight.large}px`},textWithFocus:{position:"relative"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"},startIcon:{marginRight:o.padding.small,marginLeft:o.margin.icon.offset},tertiaryStartIcon:{marginLeft:0},endIcon:{marginLeft:o.padding.small},iconWrapper:{borderRadius:o.border.radius.icon,padding:o.padding.xsmall,minWidth:"auto"},iconWrapperSecondaryHovered:{backgroundColor:o.color.bg.icon.secondaryHover,color:o.color.text.icon.secondaryHover},endIconWrapper:{marginLeft:o.padding.small,marginRight:o.margin.icon.offset},endIconWrapperTertiary:{marginRight:0}}),P={},Ne=(o="default",n,r,l,e,t)=>{const s=o==="destructive"?e.color.bg.critical.default:e.color.bg.action.default,x=`${s}-${n}-${r}-${l}-${t}`;if(P[x])return P[x];const d=o==="destructive"?e.color.bg.critical.inverse:e.color.bg.action.inverse,u=o==="destructive"?e.color.bg.critical.active:e.color.bg.action.active,g=l==="large"?e.padding.xLarge:e.padding.large;let C={};if(n==="primary"){const f=r?e.color.bg.primary.inverse:e.color.bg.primary.default;C={default:{background:r?e.color.bg.primary.default:s,color:r?s:e.color.text.inverse,paddingLeft:g,paddingRight:g},focus:{boxShadow:`0 0 0 1px ${f}, 0 0 0 3px ${r?e.color.bg.primary.default:s}`},active:{boxShadow:`0 0 0 1px ${f}, 0 0 0 3px ${r?d:u}`,background:r?d:u,color:r?u:d},disabled:{background:r?d:e.color.bg.primary.disabled,color:r?s:e.color.text.primary.disabled,cursor:"default",":focus":{boxShadow:`0 0 0 1px ${r?e.color.bg.primary.disabled:e.color.bg.primary.default}, 0 0 0 3px ${r?d:e.color.bg.primary.disabled}`}}}}else if(n==="secondary"){const f=o==="destructive"?e.color.border.secondary.critical:e.color.border.secondary.action,S=o==="destructive"?e.color.bg.secondary.active.critical:e.color.bg.secondary.active.action;C={default:{background:r?e.color.bg.secondary.inverse:e.color.bg.secondary.default,color:r?e.color.text.inverse:s,borderColor:r?e.color.border.secondary.inverse:f,borderStyle:"solid",borderWidth:e.border.width.secondary,paddingLeft:g,paddingRight:g},focus:{background:r?e.color.bg.secondary.inverse:e.color.bg.secondary.focus,borderColor:"transparent",outlineColor:r?e.color.border.primary.inverse:s,outlineStyle:"solid",outlineWidth:e.border.width.focused},active:{background:r?u:S,color:r?d:u,borderColor:"transparent",outlineColor:r?d:u,outlineStyle:"solid",outlineWidth:e.border.width.focused},disabled:{color:r?e.color.text.secondary.inverse:e.color.text.disabled,outlineColor:r?d:e.color.border.disabled,cursor:"default",":focus":{outlineColor:r?e.color.border.secondary.inverse:e.color.border.disabled,outlineStyle:"solid",outlineWidth:e.border.width.disabled}}}}else if(n==="tertiary")C={default:{background:"none",color:r?e.color.text.inverse:s,paddingLeft:0,paddingRight:0},hover:{":after":{content:"''",position:"absolute",height:e.size.height.tertiaryHover,width:"100%",right:0,bottom:0,background:r?e.color.bg.tertiary.hover:s,borderRadius:e.border.radius.tertiary}},focus:{outlineStyle:"solid",outlineColor:r?e.color.border.tertiary.inverse:s,outlineWidth:e.border.width.focused,borderRadius:e.border.radius.default},active:{color:r?d:u,":after":{height:e.size.height.tertiaryHover,background:r?d:u}},disabled:{color:r?d:e.color.text.disabled,cursor:"default"},disabledFocus:{outlineColor:r?e.color.border.tertiary.inverse:e.color.border.disabled}};else throw new Error("Button kind not recognized");return P[x]=H.StyleSheet.create(C),P[x]},$e=["href","type","children","skipClientNav","onClick","beforeNav","safeWithNav","tabIndex","target","rel","color","kind","light","size","disabled","spinner"],Pe=a.forwardRef(function(n,r){const{href:l=void 0,type:e=void 0,children:t,skipClientNav:s,onClick:x,beforeNav:d=void 0,safeWithNav:u=void 0,tabIndex:g,target:C,rel:f,color:S="default",kind:I="primary",light:v=!1,size:_="medium",disabled:B=!1,spinner:c=!1}=n,y=K(n,$e),$=p=>{const T=de(l,s,p),O=(z,b)=>a.createElement(We,L({},y,z,b,{disabled:B,spinner:c||z.waiting,color:S,kind:I,light:v,size:_,skipClientNav:s,href:l,target:C,type:e,tabIndex:g,ref:r}),t);return d?a.createElement(T,{disabled:c||B,href:l,role:"button",type:e,onClick:x,beforeNav:d,safeWithNav:u,rel:f},O):a.createElement(T,{disabled:c||B,href:l,role:"button",type:e,onClick:x,safeWithNav:u,target:C,rel:f},O)};return a.createElement(ze,null,a.createElement(Z.Consumer,null,p=>$(p)))});function He(o,n,r,l,e,t){return e&&r?n?t.choiceCheckedCorrect({letter:o}):l?t.choiceCrossedOutCorrect({letter:o}):t.choiceCorrect({letter:o}):e&&!r?n?t.choiceCheckedIncorrect({letter:o}):l?t.choiceCrossedOutIncorrect({letter:o}):t.choiceIncorrect({letter:o}):n?t.choiceChecked({letter:o}):l?t.choiceCrossedOut({letter:o}):t.choice({letter:o})}const qe="16px 16px",Ae="12px 16px",Fe={path:"M27.218 6.82l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836zm36.27 0l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836zm36.27 0l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836z",width:100,height:27.284},je=function(o){const{disabled:n=!1,checked:r=!1,content:l,crossedOut:e,showCorrectness:t,multipleSelect:s,onChange:x=b=>{},reviewMode:d,correct:u=!1,apiOptions:g=ke.defaults,previouslyAnswered:C=!1,pos:f=0,showRationale:S=!1,rationale:I,forwardedRef:v}=o,[_,B]=a.useState(!1),{strings:c}=xe();a.useEffect(()=>{_&&n&&B(!1)},[n,_,B]);function y(b){const W=b.checked??r,R=b.crossedOut??e;x({checked:W,crossedOut:R})}const $=Y("description",H.css(J.description)),p=Y("perseus-radio-rationale-content",H.css(J.rationale)),T=!d&&g.readOnly||e,O=j(f,c),z=He(O,r,u,e,t,c);return N("div",{style:{dispay:"flex",flexDirection:"column",color:i.offBlack},className:$,children:[N("div",{style:{display:"flex",flexDirection:"row",opacity:T?.5:1,overflowX:"auto",overflowY:"hidden"},children:[m("div",{className:"perseus-sr-only",children:N("label",{children:[z,"   ",l,m("input",{type:s?"checkbox":"radio",checked:r,onClick:()=>{y({checked:!r,crossedOut:!1})},onChange:()=>{},disabled:n||g.readOnly,tabIndex:-1,className:Ce.RADIO.OPTION_CONTENT})]})}),m(X,{onClick:()=>{y({checked:!r,crossedOut:!1})},disabled:n||g.readOnly,style:{flex:1,color:i.offBlack,userSelect:"text"},ref:v,"aria-hidden":"true",children:({hovered:b,focused:W,pressed:R})=>N("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"center",paddingTop:h.xSmall_8,paddingBottom:h.xSmall_8,paddingLeft:h.xSmall_8},children:[m(Se,{pos:f,correct:u,crossedOut:e,pressed:R,focused:W,checked:r,hovered:b,showCorrectness:t,multipleSelect:s,reviewMode:d,previouslyAnswered:C}),N("span",{style:{paddingLeft:h.small_12,textAlign:"left",flex:1,paddingTop:4},children:[m("div",{children:m(Ie,{checked:r,correct:u,crossedOut:e,previouslyAnswered:C,reviewMode:d})}),m("div",{children:l})]})]})}),g.crossOutEnabled&&!d&&m(ye,{dismissEnabled:!0,content:({close:b})=>m(he,{title:c.crossOut,content:c.crossOutOption,closeButtonVisible:!0,actions:N(D,{children:[m(ge,{size:h.medium_16}),m(Pe,{kind:"primary","aria-label":c.crossOutChoice({letter:j(f,c)}),disabled:g.readOnly||d,onClick:()=>{y(e?{crossedOut:!1}:{checked:!1,crossedOut:!0}),b()},children:e?c.bringBack:c.crossOut})]})}),children:({open:b})=>m(X,{onClick:b,"aria-label":c.openMenuForChoice({letter:j(f,c)}),style:{alignSelf:"center",padding:"5px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"10px"},children:({hovered:W,focused:R,pressed:w})=>m(ve,{icon:Fe,size:3,color:i.offBlack64})})})]}),S&&m("div",{className:p,"data-testid":`perseus-radio-rationale-content-${f}`,children:I})]})},J=H.StyleSheet.create({description:{display:"inline-block",width:"100%"},rationale:{display:"block",padding:qe,paddingTop:0,marginLeft:54,color:i.offBlack64,[we.smOrSmaller]:{padding:Ae,paddingTop:0}}}),cr=a.forwardRef((o,n)=>m(je,{...o,forwardedRef:n}));export{Pe as B,cr as C}; diff --git a/assets/choice-none-above-0_QL8uoF.js b/assets/choice-none-above-lqQAegUH.js similarity index 86% rename from assets/choice-none-above-0_QL8uoF.js rename to assets/choice-none-above-lqQAegUH.js index 13a2504c84..84b7ab0467 100644 --- a/assets/choice-none-above-0_QL8uoF.js +++ b/assets/choice-none-above-lqQAegUH.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{r as f}from"./index-TT1qJ6UJ.js";import{u as i}from"./i18n-context-P5sgPFep.js";import{R as m}from"./renderer-VfFjn7ah.js";import{C as a}from"./choice-I73s7vIV.js";const p=function({content:o,forwardedRef:e,showContent:t=!0,...s}){const{strings:n}=i(),c={...s,content:t?o:r(m,{content:n.noneOfTheAbove,strings:n},"noneOfTheAboveRenderer")};return r(a,{...c,ref:e})},b=f.forwardRef((o,e)=>r(p,{...o,forwardedRef:e}));export{b as C}; +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{r as f}from"./index-TT1qJ6UJ.js";import{u as i}from"./i18n-context-P5sgPFep.js";import{R as m}from"./renderer-JG1Z7r2S.js";import{C as a}from"./choice-I73s7vIV.js";const p=function({content:o,forwardedRef:e,showContent:t=!0,...s}){const{strings:n}=i(),c={...s,content:t?o:r(m,{content:n.noneOfTheAbove,strings:n},"noneOfTheAboveRenderer")};return r(a,{...c,ref:e})},b=f.forwardRef((o,e)=>r(p,{...o,forwardedRef:e}));export{b as C}; diff --git a/assets/choice-none-above.stories-mgVLpm8Y.js b/assets/choice-none-above.stories-PqS2oYRl.js similarity index 81% rename from assets/choice-none-above.stories-mgVLpm8Y.js rename to assets/choice-none-above.stories-PqS2oYRl.js index b9aab91f8d..68fc22093d 100644 --- a/assets/choice-none-above.stories-mgVLpm8Y.js +++ b/assets/choice-none-above.stories-PqS2oYRl.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as s}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as a}from"./choice-none-above-0_QL8uoF.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./i18n-context-P5sgPFep.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./icon-R5gZamfG.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";const lo={title:"Perseus/Widgets/Radio/Choice None of the Above",args:{showContent:!1,content:"This is a possible choice"}},n={checked:!1,rationale:"This is a good rational",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,apiOptions:{},onChange:s("changed")},o=i=>{const p={...n,...i};return m(a,{...p})};o.__docgenInfo={description:"",methods:[],displayName:"Example",props:{content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},showContent:{required:!1,tsType:{name:"boolean"},description:""}}};var t,r,e;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as s}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as a}from"./choice-none-above-lqQAegUH.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./i18n-context-P5sgPFep.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./icon-R5gZamfG.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";const lo={title:"Perseus/Widgets/Radio/Choice None of the Above",args:{showContent:!1,content:"This is a possible choice"}},n={checked:!1,rationale:"This is a good rational",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,apiOptions:{},onChange:s("changed")},o=i=>{const p={...n,...i};return m(a,{...p})};o.__docgenInfo={description:"",methods:[],displayName:"Example",props:{content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},showContent:{required:!1,tsType:{name:"boolean"},description:""}}};var t,r,e;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const combineProps = ({ ...ChoiceDefaults, ...args diff --git a/assets/choice.stories-8Al8ddbo.js b/assets/choice.stories-8Al8ddbo.js index cfa04b8d6c..f8b0d28e84 100644 --- a/assets/choice.stories-8Al8ddbo.js +++ b/assets/choice.stories-8Al8ddbo.js @@ -1,4 +1,4 @@ -import{j as r,a as p,F as l}from"./jsx-runtime-FVsy8kgq.js";import{a as C}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as t}from"./choice-I73s7vIV.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";const i={checked:!1,rationale:"This is a good rationale",content:"This is a possible choice",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,onChange:C("changed")},le={title:"Perseus/Widgets/Radio/Choice",args:i},o=a=>r(t,{...a}),n=a=>{const e={...i,checked:!0,showCorrectness:!0},d={...e,correct:!0,content:"This choice is correct"},u={...e,correct:!1,content:"This choice is incorrect"};return p(l,{children:[r(t,{...d}),r(t,{...u})]})},s=a=>{const e={...i,showCorrectness:!0,reviewMode:!0,multipleSelect:!0};return p(l,{children:[r(t,{...e,correct:!0,checked:!0,content:"This choice was correct and checked"}),r(t,{...e,correct:!0,content:"This choice was also correct and not checked"}),r(t,{...e,correct:!1,checked:!0,content:"This choice was incorrect and checked"}),r(t,{...e,correct:!1,content:"This choice was also incorrect and not checked"})]})},c=a=>{const e={...i,checked:!0,showCorrectness:!0,showRationale:!0,reviewMode:!0},d={...e,correct:!0,content:"This choice is correct",rationale:"It was correct because of the way it is"},u={...e,correct:!1,content:"This choice is incorrect",rationale:"It was incorrect because of the way it is"};return p(l,{children:[r(t,{...d}),r(t,{...u})]})};o.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};n.__docgenInfo={description:"",methods:[],displayName:"Checked",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"ReviewMode",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};c.__docgenInfo={description:"",methods:[],displayName:"Rationale",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};var m,h,y;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r,a as p,F as l}from"./jsx-runtime-FVsy8kgq.js";import{a as C}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as t}from"./choice-I73s7vIV.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";const i={checked:!1,rationale:"This is a good rationale",content:"This is a possible choice",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,onChange:C("changed")},le={title:"Perseus/Widgets/Radio/Choice",args:i},o=a=>r(t,{...a}),n=a=>{const e={...i,checked:!0,showCorrectness:!0},d={...e,correct:!0,content:"This choice is correct"},u={...e,correct:!1,content:"This choice is incorrect"};return p(l,{children:[r(t,{...d}),r(t,{...u})]})},s=a=>{const e={...i,showCorrectness:!0,reviewMode:!0,multipleSelect:!0};return p(l,{children:[r(t,{...e,correct:!0,checked:!0,content:"This choice was correct and checked"}),r(t,{...e,correct:!0,content:"This choice was also correct and not checked"}),r(t,{...e,correct:!1,checked:!0,content:"This choice was incorrect and checked"}),r(t,{...e,correct:!1,content:"This choice was also incorrect and not checked"})]})},c=a=>{const e={...i,checked:!0,showCorrectness:!0,showRationale:!0,reviewMode:!0},d={...e,correct:!0,content:"This choice is correct",rationale:"It was correct because of the way it is"},u={...e,correct:!1,content:"This choice is incorrect",rationale:"It was incorrect because of the way it is"};return p(l,{children:[r(t,{...d}),r(t,{...u})]})};o.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};n.__docgenInfo={description:"",methods:[],displayName:"Checked",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"ReviewMode",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};c.__docgenInfo={description:"",methods:[],displayName:"Rationale",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};var m,h,y;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(y=(h=o.parameters)==null?void 0:h.docs)==null?void 0:y.source}}};var b,w,T;n.parameters={...n.parameters,docs:{...(b=n.parameters)==null?void 0:b.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const sharedProps = ({ diff --git a/assets/color-select-ZBceqrDu.js b/assets/color-select-Ou1zrjGq.js similarity index 69% rename from assets/color-select-ZBceqrDu.js rename to assets/color-select-Ou1zrjGq.js index 99fb4e515a..ac35d02e3a 100644 --- a/assets/color-select-ZBceqrDu.js +++ b/assets/color-select-Ou1zrjGq.js @@ -1 +1 @@ -import{j as e,a as l}from"./jsx-runtime-FVsy8kgq.js";import{l as a}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as n}from"./index-6h5t6F0w.js";import{S as c,O as d}from"./answer-choices-6SWUlni2.js";import{S as u}from"./index-qUyqkRvh.js";import{s as y}from"./index-deFLJwr4.js";import{a as f}from"./index-h_CiYGGb.js";import{l as g}from"./index-awljIyHI.js";import{C as S}from"./util-w4oIPZJv.js";const C=Object.keys(a),o=i=>{const{selectedValue:s,style:m,onChange:p}=i;return e(n,{style:[t.row,m],children:l(f,{tag:"label",style:t.row,children:["color",e(u,{size:y.xxSmall_6}),e(c,{selectedValue:s,onChange:p,placeholder:"",children:C.map(r=>e(d,{value:r,label:r,leftAccessory:e(S,{color:r,decorative:!0})},r))})]})})},t=g.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:"auto"}}),ee=o;o.__docgenInfo={description:"",methods:[],displayName:"ColorSelect",props:{selectedValue:{required:!0,tsType:{name:"LockedFigureColor"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{ee as C}; +import{j as e,a as l}from"./jsx-runtime-FVsy8kgq.js";import{l as a}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as n}from"./index-6h5t6F0w.js";import{S as c,O as d}from"./answer-choices-VNdK7gMK.js";import{S as u}from"./index-qUyqkRvh.js";import{s as y}from"./index-deFLJwr4.js";import{a as f}from"./index-h_CiYGGb.js";import{l as g}from"./index-awljIyHI.js";import{C as S}from"./util-a_JWUtR1.js";const C=Object.keys(a),o=i=>{const{selectedValue:s,style:m,onChange:p}=i;return e(n,{style:[t.row,m],children:l(f,{tag:"label",style:t.row,children:["color",e(u,{size:y.xxSmall_6}),e(c,{selectedValue:s,onChange:p,placeholder:"",children:C.map(r=>e(d,{value:r,label:r,leftAccessory:e(S,{color:r,decorative:!0})},r))})]})})},t=g.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:"auto"}}),ee=o;o.__docgenInfo={description:"",methods:[],displayName:"ColorSelect",props:{selectedValue:{required:!0,tsType:{name:"LockedFigureColor"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{ee as C}; diff --git a/assets/color-select.stories-pjneE4Wx.js b/assets/color-select.stories-1iI004eu.js similarity index 72% rename from assets/color-select.stories-pjneE4Wx.js rename to assets/color-select.stories-1iI004eu.js index 1ef385dee8..579d2b47e6 100644 --- a/assets/color-select.stories-pjneE4Wx.js +++ b/assets/color-select.stories-1iI004eu.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as g}from"./index-TT1qJ6UJ.js";import{C as t}from"./color-select-ZBceqrDu.js";import{g as f}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";const pr={title:"PerseusEditor/Components/Color Select",component:t},o=e=>s(t,{...e}),c=f("point").color;o.args={id:"color-select",selectedValue:c,onChange:()=>{}};const r={render:function(){const[d,u]=g.useState(c);return s(t,{selectedValue:d,onChange:C=>{u(C)}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,i,p;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as g}from"./index-TT1qJ6UJ.js";import{C as t}from"./color-select-Ou1zrjGq.js";import{g as f}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";const pr={title:"PerseusEditor/Components/Color Select",component:t},o=e=>s(t,{...e}),c=f("point").color;o.args={id:"color-select",selectedValue:c,onChange:()=>{}};const r={render:function(){const[d,u]=g.useState(c);return s(t,{selectedValue:d,onChange:C=>{u(C)}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,i,p;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(p=(i=o.parameters)==null?void 0:i.docs)==null?void 0:p.source}}};var a,l,n;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/color-swatch.stories-wLV4bEBM.js b/assets/color-swatch.stories-aMy-KwxK.js similarity index 64% rename from assets/color-swatch.stories-wLV4bEBM.js rename to assets/color-swatch.stories-aMy-KwxK.js index 485ee3de55..29f8874097 100644 --- a/assets/color-swatch.stories-wLV4bEBM.js +++ b/assets/color-swatch.stories-aMy-KwxK.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{C as p,g as a}from"./util-w4oIPZJv.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";const Wo={title:"PerseusEditor/Components/Color Swatch",component:p},o=i=>e(p,{...i});o.args={color:a("point").color,filled:!0};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{C as p,g as a}from"./util-a_JWUtR1.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";const Wo={title:"PerseusEditor/Components/Color Swatch",component:p},o=i=>e(p,{...i});o.args={color:a("point").color,filled:!0};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(m=(t=o.parameters)==null?void 0:t.docs)==null?void 0:m.source}}};const Xo=["Default"];export{o as Default,Xo as __namedExportsOrder,Wo as default}; diff --git a/assets/components-V6aclUoQ.js b/assets/components-yT7oveOH.js similarity index 85% rename from assets/components-V6aclUoQ.js rename to assets/components-yT7oveOH.js index f3e4bf4c1a..c70ad13021 100644 --- a/assets/components-V6aclUoQ.js +++ b/assets/components-yT7oveOH.js @@ -1 +1 @@ -import{B as o}from"./button-group-nsoLlHtM.js";import{G as r}from"./graph-6kifrlu5.js";import{a as t,S as m}from"./svg-image-vbtSDKh6.js";import{H as p}from"./hud-4BOtaFc1.js";import{I as a}from"./icon-R5gZamfG.js";import{I as i}from"./index-K9BSJPWl.js";import{I as e}from"./inline-icon-NjJlm7d0.js";import{M as n}from"./math-input-JZMGF6RZ.js";import{M as s}from"./multi-button-group-atHe8dYZ.js";import{N as f}from"./number-input-AfYHd3vF.js";import{R as u}from"./range-input-gZ_c3T2F.js";import{T as I}from"./text-input-15gEhfDF.js";import{T as c}from"./text-list-editor-Jz35fIN1.js";const v=Object.freeze(Object.defineProperty({__proto__:null,ButtonGroup:o,Graph:r,Graphie:t,HUD:p,Icon:a,InfoTip:i,InlineIcon:e,MathInput:n,MultiButtonGroup:s,NumberInput:f,RangeInput:u,SvgImage:m,TextInput:I,TextListEditor:c},Symbol.toStringTag,{value:"Module"}));export{v as c}; +import{B as o}from"./button-group-nsoLlHtM.js";import{G as r}from"./graph-2fIs0C28.js";import{a as t,S as m}from"./svg-image-4Vh9uTQ6.js";import{H as p}from"./hud-4BOtaFc1.js";import{I as a}from"./icon-R5gZamfG.js";import{I as i}from"./index-K9BSJPWl.js";import{I as e}from"./inline-icon-NjJlm7d0.js";import{M as n}from"./math-input-JZMGF6RZ.js";import{M as s}from"./multi-button-group-atHe8dYZ.js";import{N as f}from"./number-input-AfYHd3vF.js";import{R as u}from"./range-input-gZ_c3T2F.js";import{T as I}from"./text-input-15gEhfDF.js";import{T as c}from"./text-list-editor-Jz35fIN1.js";const v=Object.freeze(Object.defineProperty({__proto__:null,ButtonGroup:o,Graph:r,Graphie:t,HUD:p,Icon:a,InfoTip:i,InlineIcon:e,MathInput:n,MultiButtonGroup:s,NumberInput:f,RangeInput:u,SvgImage:m,TextInput:I,TextListEditor:c},Symbol.toStringTag,{value:"Module"}));export{v as c}; diff --git a/assets/content-preview.stories-gjwicJrS.js b/assets/content-preview.stories-YyFS4sfW.js similarity index 81% rename from assets/content-preview.stories-gjwicJrS.js rename to assets/content-preview.stories-YyFS4sfW.js index efab3b62a1..a3394e5ba3 100644 --- a/assets/content-preview.stories-gjwicJrS.js +++ b/assets/content-preview.stories-YyFS4sfW.js @@ -1,4 +1,4 @@ -import{j as e,a as x,F as W}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import{R as D}from"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import{u as R,a as A,m as $}from"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as m}from"./index-6h5t6F0w.js";import{s as b}from"./index-deFLJwr4.js";import{r as I}from"./index-TT1qJ6UJ.js";import{c as L}from"./article-renderer.testdata-spwNviYy.js";import{b as O}from"./radio.testdata-sITJ8lxE.js";import{D as _}from"./device-framer-eGajQcXC.js";import{V as k}from"./viewport-resizer-pZjHp3_4.js";import{S as V,a as H,M}from"./mobile-keypad-wPUeR8mM.js";import"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./button-assets-txIojR3b.js";import{l as j}from"./index-awljIyHI.js";import{l as z}from"./constants-p_UgHLsb.js";/* empty css */import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./answer-choices-6SWUlni2.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./index-J2t_5nK1.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-Ts3i1VPI.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./invariant-bu5zBsRS.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-0_QL8uoF.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./components-V6aclUoQ.js";import"./icon-paths-EoBkHOLI.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";function p({question:t,apiOptions:r,seamless:s,linterContext:P,legacyPerseusLint:T,previewDevice:q}){const C=R(),a=q!=="desktop";return e(m,{className:`framework-perseus ${a?"perseus-mobile":""}`,style:[c.container,s?void 0:c.gutter],children:e(V,{children:e(H.Consumer,{children:({setKeypadActive:S,keypadElement:E,setKeypadElement:N})=>x(W,{children:[e(D,{strings:C.strings,apiOptions:{...r,isMobile:a},keypadElement:E,linterContext:P,legacyPerseusLint:T,...t}),e(M,{onAnalyticsEvent:()=>Promise.resolve(),onDismiss:()=>S(!1),onElementMounted:N})]})})})})}const c=j.StyleSheet.create({container:{padding:b.xxxSmall_4,containerType:"inline-size",containerName:"perseus-root"},gutter:{marginRight:z}});p.__docgenInfo={description:"The `ContentPreview` component provides a simple preview system for Perseus\nContent. Due to how Persus styles are built, the preview styling matches the\ncurrent device based on the viewport width (using `@media` queries for\n`min-width` and `max-width`).\n\nThe preview will render the mobile variant (styling and layout) when the\n`previewDevice` is phone or tablet. Note that the styling cannot be matched\n100% due to the above `@media` query limitation.",methods:[],displayName:"ContentPreview",props:{question:{required:!1,tsType:{name:"PerseusRenderer"},description:""},apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},seamless:{required:!1,tsType:{name:"boolean"},description:""},linterContext:{required:!1,tsType:{name:"LinterContextProps"},description:""},legacyPerseusLint:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},previewDevice:{required:!0,tsType:{name:"DeviceType"},description:""}}};const F=t=>{const[r,s]=I.useState("phone");return x(m,{children:[e(k,{deviceType:r,onViewportSizeChanged:s}),e(_,{nochrome:!1,deviceType:r,children:e(p,{...t})})]})},Vt={title:"PerseusEditor/Content Preview",component:p,decorators:[t=>e(m,{style:{margin:b.xxSmall_6},children:e(A,{strings:$,locale:"en",children:e(t,{})})})],render:t=>e(F,{...t})},o={args:{question:O}},i={args:{question:L}},n={args:{linterContext:{contentType:"exercise",highlightLint:!0,stack:[],paths:[]},question:{content:`# H1s bad +import{j as e,a as x,F as W}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import{R as D}from"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import{u as R,a as A,m as $}from"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as m}from"./index-6h5t6F0w.js";import{s as b}from"./index-deFLJwr4.js";import{r as I}from"./index-TT1qJ6UJ.js";import{c as L}from"./article-renderer.testdata-spwNviYy.js";import{b as O}from"./radio.testdata-sITJ8lxE.js";import{D as _}from"./device-framer-eGajQcXC.js";import{V as k}from"./viewport-resizer-rIRGcoAM.js";import{S as V,a as H,M}from"./mobile-keypad-wPUeR8mM.js";import"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./button-assets-txIojR3b.js";import{l as j}from"./index-awljIyHI.js";import{l as z}from"./constants-p_UgHLsb.js";/* empty css */import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./answer-choices-VNdK7gMK.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./index-J2t_5nK1.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-MKIRfGVo.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./invariant-bu5zBsRS.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-lqQAegUH.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./components-yT7oveOH.js";import"./icon-paths-EoBkHOLI.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";function p({question:t,apiOptions:r,seamless:s,linterContext:P,legacyPerseusLint:T,previewDevice:q}){const C=R(),a=q!=="desktop";return e(m,{className:`framework-perseus ${a?"perseus-mobile":""}`,style:[c.container,s?void 0:c.gutter],children:e(V,{children:e(H.Consumer,{children:({setKeypadActive:S,keypadElement:E,setKeypadElement:N})=>x(W,{children:[e(D,{strings:C.strings,apiOptions:{...r,isMobile:a},keypadElement:E,linterContext:P,legacyPerseusLint:T,...t}),e(M,{onAnalyticsEvent:()=>Promise.resolve(),onDismiss:()=>S(!1),onElementMounted:N})]})})})})}const c=j.StyleSheet.create({container:{padding:b.xxxSmall_4,containerType:"inline-size",containerName:"perseus-root"},gutter:{marginRight:z}});p.__docgenInfo={description:"The `ContentPreview` component provides a simple preview system for Perseus\nContent. Due to how Persus styles are built, the preview styling matches the\ncurrent device based on the viewport width (using `@media` queries for\n`min-width` and `max-width`).\n\nThe preview will render the mobile variant (styling and layout) when the\n`previewDevice` is phone or tablet. Note that the styling cannot be matched\n100% due to the above `@media` query limitation.",methods:[],displayName:"ContentPreview",props:{question:{required:!1,tsType:{name:"PerseusRenderer"},description:""},apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},seamless:{required:!1,tsType:{name:"boolean"},description:""},linterContext:{required:!1,tsType:{name:"LinterContextProps"},description:""},legacyPerseusLint:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},previewDevice:{required:!0,tsType:{name:"DeviceType"},description:""}}};const F=t=>{const[r,s]=I.useState("phone");return x(m,{children:[e(k,{deviceType:r,onViewportSizeChanged:s}),e(_,{nochrome:!1,deviceType:r,children:e(p,{...t})})]})},Vt={title:"PerseusEditor/Content Preview",component:p,decorators:[t=>e(m,{style:{margin:b.xxSmall_6},children:e(A,{strings:$,locale:"en",children:e(t,{})})})],render:t=>e(F,{...t})},o={args:{question:O}},i={args:{question:L}},n={args:{linterContext:{contentType:"exercise",highlightLint:!0,stack:[],paths:[]},question:{content:`# H1s bad Here is some unclosed math: $1+1=3 diff --git a/assets/cs-program.stories-K9D9krLM.js b/assets/cs-program.stories-nubd7Hub.js similarity index 64% rename from assets/cs-program.stories-K9D9krLM.js rename to assets/cs-program.stories-nubd7Hub.js index 22a2777008..db7dce8cba 100644 --- a/assets/cs-program.stories-K9D9krLM.js +++ b/assets/cs-program.stories-nubd7Hub.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const e={content:`[[☃ cs-program 1]] +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const e={content:`[[☃ cs-program 1]] `,images:{},widgets:{"cs-program 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"cs-program",options:{settings:[{name:"",value:""},{name:"",value:""}],height:540,width:640,programID:"6293105639817216",static:!1,showButtons:!1,showEditor:!1},alignment:"block"}}},Xr={title:"Perseus/Widgets/CS Program"},r=s=>m(p,{question:e});r.__docgenInfo={description:"",methods:[],displayName:"Question1"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/definition-editor-jFzP_8M9.js b/assets/definition-editor-yKychsEi.js similarity index 75% rename from assets/definition-editor-jFzP_8M9.js rename to assets/definition-editor-yKychsEi.js index 5e21f141c5..6f84e695bf 100644 --- a/assets/definition-editor-jFzP_8M9.js +++ b/assets/definition-editor-yKychsEi.js @@ -1 +1 @@ -import{a as n,j as e}from"./jsx-runtime-FVsy8kgq.js";import{c as a,p}from"./article-renderer-GCz9idJ2.js";import{_ as m}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as l}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{E as d}from"./editor-jsonify-yjAz4UcO.js";import{P as o}from"./index-0C4KXdeC.js";import{r as c}from"./index-TT1qJ6UJ.js";import{E as f}from"./editor-Y01VX-A3.js";const{TextInput:u}=l,t=class t extends c.Component{constructor(){super(...arguments),this.change=(...i)=>a.apply(this,i),this.serialize=()=>d.serialize.call(this)}render(){return n("div",{className:"perseus-widget-definition-editor",children:[e("a",{href:"https://docs.google.com/document/d/1udaPef4imOfTMhmLDlWq4SM0mxL0r3YHFZE-5J1uGfo",target:"_blank",children:"Definition style guide"}),e("div",{className:"perseus-widget-row",children:n("label",{children:["Word to be defined:"," ",e(u,{value:this.props.togglePrompt,onChange:this.change("togglePrompt"),placeholder:"define me"})]})}),e("div",{className:"perseus-widget-row",children:e(f,{apiOptions:this.props.apiOptions,content:this.props.definition,widgetEnabled:!1,placeholder:"definition goes here",onChange:i=>{const s={};m.has(i,"content")&&(s.definition=i.content),this.change(s)}})})]})}};t.propTypes={...p,togglePrompt:o.string,definition:o.string,apiOptions:o.any},t.widgetName="definition",t.defaultProps={togglePrompt:"",definition:""};let r=t;r.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DefinitionEditor",props:{togglePrompt:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},definition:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{r as D}; +import{a as n,j as e}from"./jsx-runtime-FVsy8kgq.js";import{c as a,p}from"./article-renderer-ub6lGcPc.js";import{_ as m}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as l}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{E as d}from"./editor-jsonify-4Li1SRv8.js";import{P as o}from"./index-0C4KXdeC.js";import{r as c}from"./index-TT1qJ6UJ.js";import{E as f}from"./editor-1XE8pcNh.js";const{TextInput:u}=l,t=class t extends c.Component{constructor(){super(...arguments),this.change=(...i)=>a.apply(this,i),this.serialize=()=>d.serialize.call(this)}render(){return n("div",{className:"perseus-widget-definition-editor",children:[e("a",{href:"https://docs.google.com/document/d/1udaPef4imOfTMhmLDlWq4SM0mxL0r3YHFZE-5J1uGfo",target:"_blank",children:"Definition style guide"}),e("div",{className:"perseus-widget-row",children:n("label",{children:["Word to be defined:"," ",e(u,{value:this.props.togglePrompt,onChange:this.change("togglePrompt"),placeholder:"define me"})]})}),e("div",{className:"perseus-widget-row",children:e(f,{apiOptions:this.props.apiOptions,content:this.props.definition,widgetEnabled:!1,placeholder:"definition goes here",onChange:i=>{const s={};m.has(i,"content")&&(s.definition=i.content),this.change(s)}})})]})}};t.propTypes={...p,togglePrompt:o.string,definition:o.string,apiOptions:o.any},t.widgetName="definition",t.defaultProps={togglePrompt:"",definition:""};let r=t;r.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DefinitionEditor",props:{togglePrompt:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},definition:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{r as D}; diff --git a/assets/definition-editor.stories-h51NZcV6.js b/assets/definition-editor.stories-4xCkZX5f.js similarity index 68% rename from assets/definition-editor.stories-h51NZcV6.js rename to assets/definition-editor.stories-4xCkZX5f.js index eb79a98ae3..2667817d52 100644 --- a/assets/definition-editor.stories-h51NZcV6.js +++ b/assets/definition-editor.stories-4xCkZX5f.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{D as e}from"./definition-editor-jFzP_8M9.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./editor-jsonify-yjAz4UcO.js";import"./index-0C4KXdeC.js";import"./editor-Y01VX-A3.js";import"./index-fuycm_QE.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const st={title:"PerseusEditor/Widgets/Definition Editor"},o=a=>m(e,{onChange:p("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,r,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{D as e}from"./definition-editor-yKychsEi.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./editor-jsonify-4Li1SRv8.js";import"./index-0C4KXdeC.js";import"./editor-1XE8pcNh.js";import"./index-fuycm_QE.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const st={title:"PerseusEditor/Widgets/Definition Editor"},o=a=>m(e,{onChange:p("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,r,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(r=o.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const dt=["Default"];export{o as Default,dt as __namedExportsOrder,st as default}; diff --git a/assets/definition.stories-aVazkzpq.js b/assets/definition.stories-p21nh182.js similarity index 80% rename from assets/definition.stories-aVazkzpq.js rename to assets/definition.stories-p21nh182.js index b1d321cb46..34708b4cbd 100644 --- a/assets/definition.stories-aVazkzpq.js +++ b/assets/definition.stories-p21nh182.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{R as f}from"./renderer-with-debug-ui-Ty_P7koE.js";import{s as h}from"./test-dependencies-zutb-QBJ.js";import{A as g}from"./article-renderer-GCz9idJ2.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./side-by-side-kGWaKY6T.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Dj-_XIAo.js";import"./renderer-VfFjn7ah.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./hints-renderer-PJ9GMfp4.js";import"./shared-4TdECMLk.js";import"./base-radio-13woGQGc.js";import"./choice-none-above-0_QL8uoF.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./enums-x5qaTru7.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-6SWUlni2.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";const mt={title:"Perseus/Widgets/Definition"},w={content:`Read the excerpt and answer the question below. +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{R as f}from"./renderer-with-debug-ui-DcZbZSiB.js";import{s as h}from"./test-dependencies-fGmEXWK4.js";import{A as g}from"./article-renderer-ub6lGcPc.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./side-by-side-kGWaKY6T.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-d8cZibFS.js";import"./multi-renderer-la0A-h33.js";import"./renderer-JG1Z7r2S.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./hints-renderer-eYcfi__L.js";import"./shared-4TdECMLk.js";import"./base-radio-SM-baXgO.js";import"./choice-none-above-lqQAegUH.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./enums-x5qaTru7.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-VNdK7gMK.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";const mt={title:"Perseus/Widgets/Definition"},w={content:`Read the excerpt and answer the question below. The Governor and Council of the Massachusetts had much conference many days; and at last . . . . concluded a peace and friendship with [[☃ definition 1]], upon these conditions.`,images:{},widgets:{"definition 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"definition",options:{definition:"A Native American people in Connecticut; white settlers in New England, the Pequots, and their respective allies were at war from 1636-1638.",togglePrompt:"the Pequots",static:!1},alignment:"default"}}},y={content:`Read the excerpt and answer the question below. diff --git a/assets/dependencies-8XILypbq.js b/assets/dependencies-d8cZibFS.js similarity index 52% rename from assets/dependencies-8XILypbq.js rename to assets/dependencies-d8cZibFS.js index 9ceb36a9dc..9735691d15 100644 --- a/assets/dependencies-8XILypbq.js +++ b/assets/dependencies-d8cZibFS.js @@ -1,2 +1,2 @@ import{r as n}from"./index-TT1qJ6UJ.js";let e=null;const r=s=>{e=s},o=()=>{if(e)return e;throw new Error(["Perseus has not been provided required dependencies.","setDependencies(dependencies) must be called first.","Make sure Perseus is being imported from javascript/perseus/perseus.js."].join(` -`))},t=n.createContext({analytics:{onAnalyticsEvent:async()=>{}}}),c=()=>n.useContext(t),d=Object.freeze(Object.defineProperty({__proto__:null,DependenciesContext:t,getDependencies:o,setDependencies:r,useDependencies:c},Symbol.toStringTag,{value:"Module"}));export{t as D,d as a,o as g,r as s,c as u}; +`))},t=n.createContext({analytics:{onAnalyticsEvent:async()=>{}},useVideo:()=>{throw new Error("useVideo dependency not provided in Perseus dependencies")}}),d=()=>n.useContext(t),c=Object.freeze(Object.defineProperty({__proto__:null,DependenciesContext:t,getDependencies:o,setDependencies:r,useDependencies:d},Symbol.toStringTag,{value:"Module"}));export{t as D,c as a,o as g,r as s,d as u}; diff --git a/assets/deprecated-standin.stories-RHHubafV.js b/assets/deprecated-standin.stories-n7shHy9h.js similarity index 67% rename from assets/deprecated-standin.stories-RHHubafV.js rename to assets/deprecated-standin.stories-n7shHy9h.js index 1c668f4883..238e5ad708 100644 --- a/assets/deprecated-standin.stories-RHHubafV.js +++ b/assets/deprecated-standin.stories-n7shHy9h.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const Vt={title:"Perseus/Widgets/Deprecated Standin"},e={content:`$\\overleftrightarrow{MN}$ is the perpendicular bisector of segment $\\overline{JL}$. +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const Vt={title:"Perseus/Widgets/Deprecated Standin"},e={content:`$\\overleftrightarrow{MN}$ is the perpendicular bisector of segment $\\overline{JL}$. **Perform a reflection that proves $M$ must be equidistant from $J$ and $L$ and select the option which explains the proof.** The statement must be true for any point $M$ which lies on the perpendicular bisector. diff --git a/assets/dropdown-editor-8wTJqqrY.js b/assets/dropdown-editor-owePQkYW.js similarity index 88% rename from assets/dropdown-editor-8wTJqqrY.js rename to assets/dropdown-editor-owePQkYW.js index 80b7efc9a7..8ce18d5464 100644 --- a/assets/dropdown-editor-8wTJqqrY.js +++ b/assets/dropdown-editor-owePQkYW.js @@ -1,4 +1,4 @@ -import{a as s,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import{_ as a}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as d}from"./components-V6aclUoQ.js";import{i as m}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{E as u}from"./editor-jsonify-yjAz4UcO.js";import{P as i}from"./index-0C4KXdeC.js";import{r as f}from"./index-TT1qJ6UJ.js";import{R as C}from"./index-7vsPyIck.js";import{i as g}from"./icon-paths-EoBkHOLI.js";const{InfoTip:p,InlineIcon:h}=d,c=class c extends f.Component{constructor(){super(...arguments),this.onPlaceholderChange=o=>{const n=o.target.value;this.props.onChange({placeholder:n})},this.onCorrectChange=o=>{const n=a.map(this.props.choices,function(e,r){return a.extend({},e,{correct:r===o})});this.props.onChange({choices:n})},this.onContentChange=(o,n)=>{const e=this.props.choices.slice(),r=a.clone(e[o]);r.content=n.target.value,e[o]=r,this.props.onChange({choices:e})},this.addChoice=o=>{o.preventDefault();const n=this.props.choices,e={content:"",correct:!1};this.props.onChange({choices:n.concat([e])},this.focus.bind(this,n.length))},this.removeChoice=(o,n)=>{n.preventDefault();const e=a(this.props.choices).clone();e.splice(o,1),this.props.onChange({choices:e})},this.focus=o=>(C.findDOMNode(this.refs["editor"+o]).focus(),!0),this.serialize=()=>u.serialize.call(this)}render(){const o=a.uniqueId("perseus_dropdown_");return s("div",{className:"perseus-widget-dropdown",children:[s("div",{className:"dropdown-info",children:["Dropdown",t(p,{children:s("p",{children:["The drop down is useful for making inequalities in a custom format. We normally use the symbols ","<",","," ",">",', ≤, ≥ (in that order) which you can copy into the choices. When possible, use the "multiple choice" answer type instead.']})})]}),s("div",{className:"dropdown-placeholder",children:[t("input",{type:"text",placeholder:"Placeholder value",value:this.props.placeholder,onChange:this.onPlaceholderChange}),t(p,{children:t("p",{children:"This value will appear as the drop down default. It should give the user some indication of the values available in the drop down itself, e.g., Yes/No/Maybe."})})]}),t("div",{className:"clearfix"}),t("ul",{className:"dropdown-choices",children:this.props.choices.map(function(n,e){const r=n.correct?"correct":"incorrect";return t("li",{children:s("div",{children:[t("input",{ref:"radio"+e,type:"radio",name:o,checked:n.correct?"checked":"",onChange:this.onCorrectChange.bind(this,e),value:e}),t("input",{type:"text",ref:"editor"+e,onChange:this.onContentChange.bind(this,e),className:r,value:n.content}),t("a",{href:"#",className:"simple-button orange","aria-label":"Delete choice",onClick:this.removeChoice.bind(this,e),children:t("span",{className:"remove-choice",children:t(h,{...m})})})]})},""+e)},this)}),t("div",{className:"add-choice-container",children:s("a",{href:"#",className:"simple-button orange",onClick:this.addChoice,children:[t(h,{...g})," Add a choice"," "]})})]})}};c.propTypes={choices:i.arrayOf(i.shape({content:i.string,correct:i.bool})),placeholder:i.string},c.widgetName="dropdown",c.defaultProps={placeholder:"",choices:[{content:"",correct:!1}]};let l=c;l.__docgenInfo={description:"",methods:[{name:"onPlaceholderChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onCorrectChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"removeChoice",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DropdownEditor",props:{placeholder:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},choices:{defaultValue:{value:`[ +import{a as s,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import{_ as a}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as d}from"./components-yT7oveOH.js";import{i as m}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{E as u}from"./editor-jsonify-4Li1SRv8.js";import{P as i}from"./index-0C4KXdeC.js";import{r as f}from"./index-TT1qJ6UJ.js";import{R as C}from"./index-7vsPyIck.js";import{i as g}from"./icon-paths-EoBkHOLI.js";const{InfoTip:p,InlineIcon:h}=d,c=class c extends f.Component{constructor(){super(...arguments),this.onPlaceholderChange=o=>{const n=o.target.value;this.props.onChange({placeholder:n})},this.onCorrectChange=o=>{const n=a.map(this.props.choices,function(e,r){return a.extend({},e,{correct:r===o})});this.props.onChange({choices:n})},this.onContentChange=(o,n)=>{const e=this.props.choices.slice(),r=a.clone(e[o]);r.content=n.target.value,e[o]=r,this.props.onChange({choices:e})},this.addChoice=o=>{o.preventDefault();const n=this.props.choices,e={content:"",correct:!1};this.props.onChange({choices:n.concat([e])},this.focus.bind(this,n.length))},this.removeChoice=(o,n)=>{n.preventDefault();const e=a(this.props.choices).clone();e.splice(o,1),this.props.onChange({choices:e})},this.focus=o=>(C.findDOMNode(this.refs["editor"+o]).focus(),!0),this.serialize=()=>u.serialize.call(this)}render(){const o=a.uniqueId("perseus_dropdown_");return s("div",{className:"perseus-widget-dropdown",children:[s("div",{className:"dropdown-info",children:["Dropdown",t(p,{children:s("p",{children:["The drop down is useful for making inequalities in a custom format. We normally use the symbols ","<",","," ",">",', ≤, ≥ (in that order) which you can copy into the choices. When possible, use the "multiple choice" answer type instead.']})})]}),s("div",{className:"dropdown-placeholder",children:[t("input",{type:"text",placeholder:"Placeholder value",value:this.props.placeholder,onChange:this.onPlaceholderChange}),t(p,{children:t("p",{children:"This value will appear as the drop down default. It should give the user some indication of the values available in the drop down itself, e.g., Yes/No/Maybe."})})]}),t("div",{className:"clearfix"}),t("ul",{className:"dropdown-choices",children:this.props.choices.map(function(n,e){const r=n.correct?"correct":"incorrect";return t("li",{children:s("div",{children:[t("input",{ref:"radio"+e,type:"radio",name:o,checked:n.correct?"checked":"",onChange:this.onCorrectChange.bind(this,e),value:e}),t("input",{type:"text",ref:"editor"+e,onChange:this.onContentChange.bind(this,e),className:r,value:n.content}),t("a",{href:"#",className:"simple-button orange","aria-label":"Delete choice",onClick:this.removeChoice.bind(this,e),children:t("span",{className:"remove-choice",children:t(h,{...m})})})]})},""+e)},this)}),t("div",{className:"add-choice-container",children:s("a",{href:"#",className:"simple-button orange",onClick:this.addChoice,children:[t(h,{...g})," Add a choice"," "]})})]})}};c.propTypes={choices:i.arrayOf(i.shape({content:i.string,correct:i.bool})),placeholder:i.string},c.widgetName="dropdown",c.defaultProps={placeholder:"",choices:[{content:"",correct:!1}]};let l=c;l.__docgenInfo={description:"",methods:[{name:"onPlaceholderChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onCorrectChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"removeChoice",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DropdownEditor",props:{placeholder:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},choices:{defaultValue:{value:`[ { content: "", correct: false, diff --git a/assets/dropdown-editor.stories-STi-BTv8.js b/assets/dropdown-editor.stories-Br1uepP1.js similarity index 68% rename from assets/dropdown-editor.stories-STi-BTv8.js rename to assets/dropdown-editor.stories-Br1uepP1.js index dd45bd6843..b56e737a8a 100644 --- a/assets/dropdown-editor.stories-STi-BTv8.js +++ b/assets/dropdown-editor.stories-Br1uepP1.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{D as e}from"./dropdown-editor-8wTJqqrY.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./editor-jsonify-yjAz4UcO.js";import"./index-0C4KXdeC.js";import"./icon-paths-EoBkHOLI.js";const tr={title:"PerseusEditor/Widgets/Dropdown Editor"},o=a=>p(e,{onChange:m("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,i;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{D as e}from"./dropdown-editor-owePQkYW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./editor-jsonify-4Li1SRv8.js";import"./index-0C4KXdeC.js";import"./icon-paths-EoBkHOLI.js";const tr={title:"PerseusEditor/Widgets/Dropdown Editor"},o=a=>p(e,{onChange:m("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,i;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=o.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const ir=["Default"];export{o as Default,ir as __namedExportsOrder,tr as default}; diff --git a/assets/dropdown.stories-r1lGSq2V.js b/assets/dropdown.stories-0zo_eCab.js similarity index 65% rename from assets/dropdown.stories-r1lGSq2V.js rename to assets/dropdown.stories-0zo_eCab.js index 9b378be040..8eccab60e4 100644 --- a/assets/dropdown.stories-r1lGSq2V.js +++ b/assets/dropdown.stories-0zo_eCab.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const e={content:"The total number of boxes the forklift can carry is [[☃ dropdown 1]] $60$.",images:{},widgets:{"dropdown 1":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"greater/less than or equal to",choices:[{content:"greater than or equal to",correct:!1},{content:"less than or equal to",correct:!0}]},version:{major:0,minor:0}}}},Vt={title:"Perseus/Widgets/Dropdown"},t=s=>p(m,{question:e});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const e={content:"The total number of boxes the forklift can carry is [[☃ dropdown 1]] $60$.",images:{},widgets:{"dropdown 1":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"greater/less than or equal to",choices:[{content:"greater than or equal to",correct:!1},{content:"less than or equal to",correct:!0}]},version:{major:0,minor:0}}}},Vt={title:"Perseus/Widgets/Dropdown"},t=s=>p(m,{question:e});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(r=t.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const Xt=["Question1"];export{t as Question1,Xt as __namedExportsOrder,Vt as default}; diff --git a/assets/editor-Y01VX-A3.js b/assets/editor-1XE8pcNh.js similarity index 99% rename from assets/editor-Y01VX-A3.js rename to assets/editor-1XE8pcNh.js index 0e15dfd314..cadf5287c2 100644 --- a/assets/editor-Y01VX-A3.js +++ b/assets/editor-1XE8pcNh.js @@ -1,4 +1,4 @@ -import{j as X,a as Y0,F as bi}from"./jsx-runtime-FVsy8kgq.js";import{S as wi,d as Si}from"./article-renderer-GCz9idJ2.js";import{_ as Y,$ as ki}from"./jquery-yG1GhClm.js";import{U as H0,P as Ai,E as Ci}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import{d as Ut,g as Mi,s as Bi,u as zi,e as Ti,f as Aa,h as Ei,i as Di,P as Ht,j as _i}from"./renderer-VfFjn7ah.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import{L as qi}from"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./dependencies-8XILypbq.js";import"./version-akiLXZts.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{c as Ni,g as Fi}from"./_commonjsHelpers-4gQjN7DL.js";import{r as we}from"./index-TT1qJ6UJ.js";import{c as Ii}from"./index-fuycm_QE.js";import{P as et}from"./index-0C4KXdeC.js";import{c as Oi}from"./components-V6aclUoQ.js";import{c as Ri,i as Li}from"./icon-paths-5JCXzGsq.js";import{u as Pi}from"./index-6h5t6F0w.js";import{S as $i}from"./index-qUyqkRvh.js";import{S as Wi}from"./index-SM3muJE2.js";import{g as Hi}from"./icon-paths-EoBkHOLI.js";import{S as Gi}from"./section-control-button-GM2LQRww.js";import{T as Ui}from"./tex-error-view-Y2BSLjwB.js";var Ba={exports:{}};(function(l,h){(function(S,M){l.exports=M()})(typeof self<"u"?self:Ni,function(){return function(v){var S={};function M(B){if(S[B])return S[B].exports;var N=S[B]={i:B,l:!1,exports:{}};return v[B].call(N.exports,N,N.exports,M),N.l=!0,N.exports}return M.m=v,M.c=S,M.d=function(B,N,R){M.o(B,N)||Object.defineProperty(B,N,{enumerable:!0,get:R})},M.r=function(B){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},M.t=function(B,N){if(N&1&&(B=M(B)),N&8||N&4&&typeof B=="object"&&B&&B.__esModule)return B;var R=Object.create(null);if(M.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:B}),N&2&&typeof B!="string")for(var C in B)M.d(R,C,(function(n0){return B[n0]}).bind(null,C));return R},M.n=function(B){var N=B&&B.__esModule?function(){return B.default}:function(){return B};return M.d(N,"a",N),N},M.o=function(B,N){return Object.prototype.hasOwnProperty.call(B,N)},M.p="",M(M.s=1)}([function(v,S,M){},function(v,S,M){M.r(S),M(0);var B=function(){function o(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return o.range=function(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new o(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc},o}(),N=function(){function o(t,r){this.text=void 0,this.loc=void 0,this.text=t,this.loc=r}var e=o.prototype;return e.range=function(r,a){return new o(a,B.range(this,r))},o}(),R=function o(e,t){this.position=void 0;var r="KaTeX parse error: "+e,a,i=t&&t.loc;if(i&&i.start<=i.end){var u=i.lexer.input;a=i.start;var m=i.end;a===u.length?r+=" at end of input: ":r+=" at position "+(a+1)+": ";var d=u.slice(a,m).replace(/[^]/g,"$&̲"),f;a>15?f="…"+u.slice(a-15,a):f=u.slice(0,a);var x;m+15":">","<":"<",'"':""","'":"'"},k0=/[&><"']/g;function T0(o){return String(o).replace(k0,function(e){return Z[e]})}var Q=function o(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?o(e.body[0]):e:e.type==="font"?o(e.body):e},v0=function(e){var t=Q(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},e0=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},A0=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},F={contains:n0,deflt:c0,escape:T0,hyphenate:a0,getBaseElem:Q,isCharacterBox:v0,protocolFromUrl:A0},j0=function(){function o(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,t=t||{},this.displayMode=F.deflt(t.displayMode,!1),this.output=F.deflt(t.output,"htmlAndMathml"),this.leqno=F.deflt(t.leqno,!1),this.fleqn=F.deflt(t.fleqn,!1),this.throwOnError=F.deflt(t.throwOnError,!0),this.errorColor=F.deflt(t.errorColor,"#cc0000"),this.macros=t.macros||{},this.minRuleThickness=Math.max(0,F.deflt(t.minRuleThickness,0)),this.colorIsTextColor=F.deflt(t.colorIsTextColor,!1),this.strict=F.deflt(t.strict,"warn"),this.trust=F.deflt(t.trust,!1),this.maxSize=Math.max(0,F.deflt(t.maxSize,1/0)),this.maxExpand=Math.max(0,F.deflt(t.maxExpand,1e3))}var e=o.prototype;return e.reportNonstrict=function(r,a,i){var u=this.strict;if(typeof u=="function"&&(u=u(r,a,i)),!(!u||u==="ignore")){if(u===!0||u==="error")throw new C("LaTeX-incompatible input and strict mode is set to 'error': "+(a+" ["+r+"]"),i);u==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(a+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+u+"': "+a+" ["+r+"]"))}},e.useStrictBehavior=function(r,a,i){var u=this.strict;if(typeof u=="function")try{u=u(r,a,i)}catch{u="error"}return!u||u==="ignore"?!1:u===!0||u==="error"?!0:u==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(a+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+u+"': "+a+" ["+r+"]")),!1)},e.isTrusted=function(r){r.url&&!r.protocol&&(r.protocol=F.protocolFromUrl(r.url));var a=typeof this.trust=="function"?this.trust(r):this.trust;return!!a},o}(),_0=function(){function o(t,r,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=a}var e=o.prototype;return e.sup=function(){return W0[_a[this.id]]},e.sub=function(){return W0[qa[this.id]]},e.fracNum=function(){return W0[Na[this.id]]},e.fracDen=function(){return W0[Fa[this.id]]},e.cramp=function(){return W0[Ia[this.id]]},e.text=function(){return W0[Oa[this.id]]},e.isTight=function(){return this.size>=2},o}(),at=0,_e=1,he=2,G0=3,Se=4,N0=5,me=6,C0=7,W0=[new _0(at,0,!1),new _0(_e,0,!0),new _0(he,1,!1),new _0(G0,1,!0),new _0(Se,2,!1),new _0(N0,2,!0),new _0(me,3,!1),new _0(C0,3,!0)],_a=[Se,N0,Se,N0,me,C0,me,C0],qa=[N0,N0,N0,N0,C0,C0,C0,C0],Na=[he,G0,Se,N0,me,C0,me,C0],Fa=[G0,G0,N0,N0,C0,C0,C0,C0],Ia=[_e,_e,G0,G0,N0,N0,C0,C0],Oa=[at,_e,he,G0,he,G0,he,G0],$={DISPLAY:W0[at],TEXT:W0[he],SCRIPT:W0[Se],SCRIPTSCRIPT:W0[me]},nt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ra(o){for(var e=0;e=a[0]&&o<=a[1])return t.name}return null}var ke=[];nt.forEach(function(o){return o.blocks.forEach(function(e){return ke.push.apply(ke,e)})});function Yt(o){for(var e=0;e=ke[e]&&o<=ke[e+1])return!0;return!1}var de=80,La=function(e,t){return"M95,"+(622+e+t)+` +import{j as X,a as Y0,F as bi}from"./jsx-runtime-FVsy8kgq.js";import{S as wi,d as Si}from"./article-renderer-ub6lGcPc.js";import{_ as Y,$ as ki}from"./jquery-yG1GhClm.js";import{U as H0,P as Ai,E as Ci}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import{d as Ut,g as Mi,s as Bi,u as zi,e as Ti,f as Aa,h as Ei,i as Di,P as Ht,j as _i}from"./renderer-JG1Z7r2S.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import{L as qi}from"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./dependencies-d8cZibFS.js";import"./version-akiLXZts.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{c as Ni,g as Fi}from"./_commonjsHelpers-4gQjN7DL.js";import{r as we}from"./index-TT1qJ6UJ.js";import{c as Ii}from"./index-fuycm_QE.js";import{P as et}from"./index-0C4KXdeC.js";import{c as Oi}from"./components-yT7oveOH.js";import{c as Ri,i as Li}from"./icon-paths-5JCXzGsq.js";import{u as Pi}from"./index-6h5t6F0w.js";import{S as $i}from"./index-qUyqkRvh.js";import{S as Wi}from"./index-SM3muJE2.js";import{g as Hi}from"./icon-paths-EoBkHOLI.js";import{S as Gi}from"./section-control-button-SLh88dRF.js";import{T as Ui}from"./tex-error-view-Y2BSLjwB.js";var Ba={exports:{}};(function(l,h){(function(S,M){l.exports=M()})(typeof self<"u"?self:Ni,function(){return function(v){var S={};function M(B){if(S[B])return S[B].exports;var N=S[B]={i:B,l:!1,exports:{}};return v[B].call(N.exports,N,N.exports,M),N.l=!0,N.exports}return M.m=v,M.c=S,M.d=function(B,N,R){M.o(B,N)||Object.defineProperty(B,N,{enumerable:!0,get:R})},M.r=function(B){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},M.t=function(B,N){if(N&1&&(B=M(B)),N&8||N&4&&typeof B=="object"&&B&&B.__esModule)return B;var R=Object.create(null);if(M.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:B}),N&2&&typeof B!="string")for(var C in B)M.d(R,C,(function(n0){return B[n0]}).bind(null,C));return R},M.n=function(B){var N=B&&B.__esModule?function(){return B.default}:function(){return B};return M.d(N,"a",N),N},M.o=function(B,N){return Object.prototype.hasOwnProperty.call(B,N)},M.p="",M(M.s=1)}([function(v,S,M){},function(v,S,M){M.r(S),M(0);var B=function(){function o(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return o.range=function(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new o(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc},o}(),N=function(){function o(t,r){this.text=void 0,this.loc=void 0,this.text=t,this.loc=r}var e=o.prototype;return e.range=function(r,a){return new o(a,B.range(this,r))},o}(),R=function o(e,t){this.position=void 0;var r="KaTeX parse error: "+e,a,i=t&&t.loc;if(i&&i.start<=i.end){var u=i.lexer.input;a=i.start;var m=i.end;a===u.length?r+=" at end of input: ":r+=" at position "+(a+1)+": ";var d=u.slice(a,m).replace(/[^]/g,"$&̲"),f;a>15?f="…"+u.slice(a-15,a):f=u.slice(0,a);var x;m+15":">","<":"<",'"':""","'":"'"},k0=/[&><"']/g;function T0(o){return String(o).replace(k0,function(e){return Z[e]})}var Q=function o(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?o(e.body[0]):e:e.type==="font"?o(e.body):e},v0=function(e){var t=Q(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},e0=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},A0=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},F={contains:n0,deflt:c0,escape:T0,hyphenate:a0,getBaseElem:Q,isCharacterBox:v0,protocolFromUrl:A0},j0=function(){function o(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,t=t||{},this.displayMode=F.deflt(t.displayMode,!1),this.output=F.deflt(t.output,"htmlAndMathml"),this.leqno=F.deflt(t.leqno,!1),this.fleqn=F.deflt(t.fleqn,!1),this.throwOnError=F.deflt(t.throwOnError,!0),this.errorColor=F.deflt(t.errorColor,"#cc0000"),this.macros=t.macros||{},this.minRuleThickness=Math.max(0,F.deflt(t.minRuleThickness,0)),this.colorIsTextColor=F.deflt(t.colorIsTextColor,!1),this.strict=F.deflt(t.strict,"warn"),this.trust=F.deflt(t.trust,!1),this.maxSize=Math.max(0,F.deflt(t.maxSize,1/0)),this.maxExpand=Math.max(0,F.deflt(t.maxExpand,1e3))}var e=o.prototype;return e.reportNonstrict=function(r,a,i){var u=this.strict;if(typeof u=="function"&&(u=u(r,a,i)),!(!u||u==="ignore")){if(u===!0||u==="error")throw new C("LaTeX-incompatible input and strict mode is set to 'error': "+(a+" ["+r+"]"),i);u==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(a+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+u+"': "+a+" ["+r+"]"))}},e.useStrictBehavior=function(r,a,i){var u=this.strict;if(typeof u=="function")try{u=u(r,a,i)}catch{u="error"}return!u||u==="ignore"?!1:u===!0||u==="error"?!0:u==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(a+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+u+"': "+a+" ["+r+"]")),!1)},e.isTrusted=function(r){r.url&&!r.protocol&&(r.protocol=F.protocolFromUrl(r.url));var a=typeof this.trust=="function"?this.trust(r):this.trust;return!!a},o}(),_0=function(){function o(t,r,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=a}var e=o.prototype;return e.sup=function(){return W0[_a[this.id]]},e.sub=function(){return W0[qa[this.id]]},e.fracNum=function(){return W0[Na[this.id]]},e.fracDen=function(){return W0[Fa[this.id]]},e.cramp=function(){return W0[Ia[this.id]]},e.text=function(){return W0[Oa[this.id]]},e.isTight=function(){return this.size>=2},o}(),at=0,_e=1,he=2,G0=3,Se=4,N0=5,me=6,C0=7,W0=[new _0(at,0,!1),new _0(_e,0,!0),new _0(he,1,!1),new _0(G0,1,!0),new _0(Se,2,!1),new _0(N0,2,!0),new _0(me,3,!1),new _0(C0,3,!0)],_a=[Se,N0,Se,N0,me,C0,me,C0],qa=[N0,N0,N0,N0,C0,C0,C0,C0],Na=[he,G0,Se,N0,me,C0,me,C0],Fa=[G0,G0,N0,N0,C0,C0,C0,C0],Ia=[_e,_e,G0,G0,N0,N0,C0,C0],Oa=[at,_e,he,G0,he,G0,he,G0],$={DISPLAY:W0[at],TEXT:W0[he],SCRIPT:W0[Se],SCRIPTSCRIPT:W0[me]},nt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ra(o){for(var e=0;e=a[0]&&o<=a[1])return t.name}return null}var ke=[];nt.forEach(function(o){return o.blocks.forEach(function(e){return ke.push.apply(ke,e)})});function Yt(o){for(var e=0;e=ke[e]&&o<=ke[e+1])return!0;return!1}var de=80,La=function(e,t){return"M95,"+(622+e+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 diff --git a/assets/editor-DsbDBOGq.js b/assets/editor-EbDgkB5I.js similarity index 93% rename from assets/editor-DsbDBOGq.js rename to assets/editor-EbDgkB5I.js index ebf5289e25..07ddce8d7a 100644 --- a/assets/editor-DsbDBOGq.js +++ b/assets/editor-EbDgkB5I.js @@ -1 +1 @@ -import{j as t,a}from"./jsx-runtime-FVsy8kgq.js";import{c as v,p as N}from"./article-renderer-GCz9idJ2.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as g}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import{B as O}from"./base-radio-13woGQGc.js";import{c as k}from"./components-V6aclUoQ.js";import{i as T}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{C as p}from"./index-QCAhLhLD.js";import{P as n}from"./index-0C4KXdeC.js";import{r as y}from"./index-TT1qJ6UJ.js";import{E as C}from"./editor-Y01VX-A3.js";import{i as b}from"./icon-paths-EoBkHOLI.js";const{InlineIcon:h}=k,m=class m extends y.Component{render(){const e=this.props.choice.correct?"correct":"incorrect";let s="Type a choice here...";this.props.choice.isNoneOfTheAbove&&(s=this.props.choice.correct?"Type the answer to reveal to the user...":"None of the above");const o=t(C,{ref:"content-editor",apiOptions:this.props.apiOptions,content:this.props.choice.content||"",widgetEnabled:!1,placeholder:s,disabled:this.props.choice.isNoneOfTheAbove&&!this.props.choice.correct,onChange:this.props.onContentChange}),i=t(C,{ref:"clue-editor",apiOptions:this.props.apiOptions,content:this.props.choice.clue||"",widgetEnabled:!1,placeholder:`Why is this choice ${e}?`,onChange:this.props.onClueChange}),c=t("a",{className:"simple-button orange delete-choice",href:"#",onClick:f=>{f.stopPropagation(),f.preventDefault(),this.props.onDelete()},title:"Remove this choice",children:t(h,{...T})});return a("div",{className:"choice-clue-editors",children:[t("div",{className:`choice-editor ${e}`,children:o}),t("div",{className:"clue-editor",children:i}),this.props.showDelete&&c]})}};m.propTypes={apiOptions:g.propTypes,choice:n.object,showDelete:n.bool,onClueChange:n.func,onContentChange:n.func,onDelete:n.func};let u=m;const r=class r extends y.Component{constructor(){super(...arguments),this.change=(...e)=>v.apply(this,e),this.onMultipleSelectChange=e=>{e=e.multipleSelect;const s=l.reduce(this.props.choices,function(o,i){return i.correct?o+1:o},0);if(!e&&s>1){const o=l.map(this.props.choices,function(i){return l.defaults({correct:!1},i)});this.props.onChange({multipleSelect:e,choices:o})}else this.props.onChange({multipleSelect:e})},this.onCountChoicesChange=e=>{e=e.countChoices,this.props.onChange({countChoices:e})},this.onChange=({checked:e})=>{const s=l.map(this.props.choices,(o,i)=>l.extend({},o,{correct:e[i],content:o.isNoneOfTheAbove&&!e[i]?"":o.content}));this.props.onChange({choices:s})},this.onContentChange=(e,s)=>{const o=this.props.choices.slice();o[e]=l.extend({},o[e],{content:s}),this.props.onChange({choices:o})},this.onClueChange=(e,s)=>{const o=this.props.choices.slice();o[e]=l.extend({},o[e],{clue:s}),s===""&&delete o[e].clue,this.props.onChange({choices:o})},this.onDelete=e=>{const s=this.props.choices.slice(),o=s[e];s.splice(e,1),this.props.onChange({choices:s,hasNoneOfTheAbove:this.props.hasNoneOfTheAbove&&!o.isNoneOfTheAbove})},this.addChoice=(e,s)=>{s.preventDefault();const o=this.props.choices.slice(),i={isNoneOfTheAbove:e},c=o.length-(this.props.hasNoneOfTheAbove?1:0);o.splice(c,0,i),this.props.onChange({choices:o,hasNoneOfTheAbove:e||this.props.hasNoneOfTheAbove},()=>{this.refs[`choice-editor${c}`].refs["content-editor"].focus()})},this.setDisplayCount=e=>{this.props.onChange({displayCount:e})},this.focus=()=>(this.refs["choice-editor0"].refs["content-editor"].focus(),!0),this.getSaveWarnings=()=>l.some(l.pluck(this.props.choices,"correct"))?[]:["No choice is marked as correct."],this.serialize=()=>l.pick(this.props,"choices","randomize","multipleSelect","countChoices","displayCount","hasNoneOfTheAbove","deselectEnabled")}render(){const e=l.reduce(this.props.choices,function(s,o){return o.correct?s+1:s},0);return a("div",{children:[a("div",{className:"perseus-widget-row",children:[t("a",{href:"https://docs.google.com/document/d/1frZf7yrWVWb1n4tVjqlzqVUiv1pn4cZXbxgP62-JDBY/edit#heading=h.8ng1isya19nu",target:"_blank",children:"Multiple choice style guide"}),t("br",{}),t("div",{className:"perseus-widget-left-col",children:t(p,{label:"Multiple selections",checked:this.props.multipleSelect,onChange:s=>{this.onMultipleSelectChange({multipleSelect:s})}})}),t("div",{className:"perseus-widget-right-col",children:t(p,{label:"Randomize order",checked:this.props.randomize,onChange:s=>{this.props.onChange({randomize:s})}})}),this.props.multipleSelect&&t("div",{className:"perseus-widget-left-col",children:t(p,{label:"Specify number correct",checked:this.props.countChoices,onChange:s=>{this.onCountChoicesChange({countChoices:s})}})})]}),t(O,{multipleSelect:this.props.multipleSelect,countChoices:this.props.countChoices,numCorrect:e,editMode:!0,labelWrap:!1,apiOptions:this.props.apiOptions,reviewMode:!1,choices:this.props.choices.map((s,o)=>({content:t(u,{ref:`choice-editor${o}`,apiOptions:this.props.apiOptions,choice:s,onContentChange:i=>{"content"in i&&this.onContentChange(o,i.content)},onClueChange:i=>{"content"in i&&this.onClueChange(o,i.content)},onDelete:()=>this.onDelete(o),showDelete:this.props.choices.length>=2}),isNoneOfTheAbove:s.isNoneOfTheAbove,checked:s.correct}),this),onChange:this.onChange}),a("div",{className:"add-choice-container",children:[a("a",{className:"simple-button orange",href:"#",onClick:this.addChoice.bind(this,!1),children:[t(h,{...b})," Add a choice"," "]}),!this.props.hasNoneOfTheAbove&&a("a",{className:"simple-button",href:"#",onClick:this.addChoice.bind(this,!0),children:[t(h,{...b})," None of the above"," "]})]})]})}};r.propTypes={...N,apiOptions:g.propTypes,choices:n.arrayOf(n.shape({content:n.string,clue:n.string,correct:n.bool})),displayCount:n.number,randomize:n.bool,hasNoneOfTheAbove:n.bool,multipleSelect:n.bool,countChoices:n.bool,deselectEnabled:n.bool,static:n.bool},r.widgetName="radio",r.defaultProps={choices:[{},{},{},{}],displayCount:null,randomize:!1,hasNoneOfTheAbove:!1,multipleSelect:!1,countChoices:!1,deselectEnabled:!1};let d=r;d.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMultipleSelectChange",docblock:null,modifiers:[],params:[{name:"allowMultiple",optional:!1,type:null}],returns:null},{name:"onCountChoicesChange",docblock:null,modifiers:[],params:[{name:"count",optional:!1,type:null}],returns:null},{name:"onChange",docblock:null,modifiers:[],params:[{name:"{checked}",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newContent",optional:!1,type:null}],returns:null},{name:"onClueChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newClue",optional:!1,type:null}],returns:null},{name:"onDelete",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"noneOfTheAbove",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setDisplayCount",docblock:null,modifiers:[],params:[{name:"num",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RadioEditor",props:{choices:{defaultValue:{value:"[{}, {}, {}, {}]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{content:{name:"string",required:!1},clue:{name:"string",required:!1},correct:{name:"bool",required:!1}}}},required:!1},displayCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},randomize:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},hasNoneOfTheAbove:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},multipleSelect:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},countChoices:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},deselectEnabled:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1},static:{description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};export{d as R}; +import{j as t,a}from"./jsx-runtime-FVsy8kgq.js";import{c as v,p as N}from"./article-renderer-ub6lGcPc.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import{A as g}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import{B as O}from"./base-radio-SM-baXgO.js";import{c as k}from"./components-yT7oveOH.js";import{i as T}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{C as p}from"./index-QCAhLhLD.js";import{P as n}from"./index-0C4KXdeC.js";import{r as y}from"./index-TT1qJ6UJ.js";import{E as C}from"./editor-1XE8pcNh.js";import{i as b}from"./icon-paths-EoBkHOLI.js";const{InlineIcon:h}=k,m=class m extends y.Component{render(){const e=this.props.choice.correct?"correct":"incorrect";let s="Type a choice here...";this.props.choice.isNoneOfTheAbove&&(s=this.props.choice.correct?"Type the answer to reveal to the user...":"None of the above");const o=t(C,{ref:"content-editor",apiOptions:this.props.apiOptions,content:this.props.choice.content||"",widgetEnabled:!1,placeholder:s,disabled:this.props.choice.isNoneOfTheAbove&&!this.props.choice.correct,onChange:this.props.onContentChange}),i=t(C,{ref:"clue-editor",apiOptions:this.props.apiOptions,content:this.props.choice.clue||"",widgetEnabled:!1,placeholder:`Why is this choice ${e}?`,onChange:this.props.onClueChange}),c=t("a",{className:"simple-button orange delete-choice",href:"#",onClick:f=>{f.stopPropagation(),f.preventDefault(),this.props.onDelete()},title:"Remove this choice",children:t(h,{...T})});return a("div",{className:"choice-clue-editors",children:[t("div",{className:`choice-editor ${e}`,children:o}),t("div",{className:"clue-editor",children:i}),this.props.showDelete&&c]})}};m.propTypes={apiOptions:g.propTypes,choice:n.object,showDelete:n.bool,onClueChange:n.func,onContentChange:n.func,onDelete:n.func};let u=m;const r=class r extends y.Component{constructor(){super(...arguments),this.change=(...e)=>v.apply(this,e),this.onMultipleSelectChange=e=>{e=e.multipleSelect;const s=l.reduce(this.props.choices,function(o,i){return i.correct?o+1:o},0);if(!e&&s>1){const o=l.map(this.props.choices,function(i){return l.defaults({correct:!1},i)});this.props.onChange({multipleSelect:e,choices:o})}else this.props.onChange({multipleSelect:e})},this.onCountChoicesChange=e=>{e=e.countChoices,this.props.onChange({countChoices:e})},this.onChange=({checked:e})=>{const s=l.map(this.props.choices,(o,i)=>l.extend({},o,{correct:e[i],content:o.isNoneOfTheAbove&&!e[i]?"":o.content}));this.props.onChange({choices:s})},this.onContentChange=(e,s)=>{const o=this.props.choices.slice();o[e]=l.extend({},o[e],{content:s}),this.props.onChange({choices:o})},this.onClueChange=(e,s)=>{const o=this.props.choices.slice();o[e]=l.extend({},o[e],{clue:s}),s===""&&delete o[e].clue,this.props.onChange({choices:o})},this.onDelete=e=>{const s=this.props.choices.slice(),o=s[e];s.splice(e,1),this.props.onChange({choices:s,hasNoneOfTheAbove:this.props.hasNoneOfTheAbove&&!o.isNoneOfTheAbove})},this.addChoice=(e,s)=>{s.preventDefault();const o=this.props.choices.slice(),i={isNoneOfTheAbove:e},c=o.length-(this.props.hasNoneOfTheAbove?1:0);o.splice(c,0,i),this.props.onChange({choices:o,hasNoneOfTheAbove:e||this.props.hasNoneOfTheAbove},()=>{this.refs[`choice-editor${c}`].refs["content-editor"].focus()})},this.setDisplayCount=e=>{this.props.onChange({displayCount:e})},this.focus=()=>(this.refs["choice-editor0"].refs["content-editor"].focus(),!0),this.getSaveWarnings=()=>l.some(l.pluck(this.props.choices,"correct"))?[]:["No choice is marked as correct."],this.serialize=()=>l.pick(this.props,"choices","randomize","multipleSelect","countChoices","displayCount","hasNoneOfTheAbove","deselectEnabled")}render(){const e=l.reduce(this.props.choices,function(s,o){return o.correct?s+1:s},0);return a("div",{children:[a("div",{className:"perseus-widget-row",children:[t("a",{href:"https://docs.google.com/document/d/1frZf7yrWVWb1n4tVjqlzqVUiv1pn4cZXbxgP62-JDBY/edit#heading=h.8ng1isya19nu",target:"_blank",children:"Multiple choice style guide"}),t("br",{}),t("div",{className:"perseus-widget-left-col",children:t(p,{label:"Multiple selections",checked:this.props.multipleSelect,onChange:s=>{this.onMultipleSelectChange({multipleSelect:s})}})}),t("div",{className:"perseus-widget-right-col",children:t(p,{label:"Randomize order",checked:this.props.randomize,onChange:s=>{this.props.onChange({randomize:s})}})}),this.props.multipleSelect&&t("div",{className:"perseus-widget-left-col",children:t(p,{label:"Specify number correct",checked:this.props.countChoices,onChange:s=>{this.onCountChoicesChange({countChoices:s})}})})]}),t(O,{multipleSelect:this.props.multipleSelect,countChoices:this.props.countChoices,numCorrect:e,editMode:!0,labelWrap:!1,apiOptions:this.props.apiOptions,reviewMode:!1,choices:this.props.choices.map((s,o)=>({content:t(u,{ref:`choice-editor${o}`,apiOptions:this.props.apiOptions,choice:s,onContentChange:i=>{"content"in i&&this.onContentChange(o,i.content)},onClueChange:i=>{"content"in i&&this.onClueChange(o,i.content)},onDelete:()=>this.onDelete(o),showDelete:this.props.choices.length>=2}),isNoneOfTheAbove:s.isNoneOfTheAbove,checked:s.correct}),this),onChange:this.onChange}),a("div",{className:"add-choice-container",children:[a("a",{className:"simple-button orange",href:"#",onClick:this.addChoice.bind(this,!1),children:[t(h,{...b})," Add a choice"," "]}),!this.props.hasNoneOfTheAbove&&a("a",{className:"simple-button",href:"#",onClick:this.addChoice.bind(this,!0),children:[t(h,{...b})," None of the above"," "]})]})]})}};r.propTypes={...N,apiOptions:g.propTypes,choices:n.arrayOf(n.shape({content:n.string,clue:n.string,correct:n.bool})),displayCount:n.number,randomize:n.bool,hasNoneOfTheAbove:n.bool,multipleSelect:n.bool,countChoices:n.bool,deselectEnabled:n.bool,static:n.bool},r.widgetName="radio",r.defaultProps={choices:[{},{},{},{}],displayCount:null,randomize:!1,hasNoneOfTheAbove:!1,multipleSelect:!1,countChoices:!1,deselectEnabled:!1};let d=r;d.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMultipleSelectChange",docblock:null,modifiers:[],params:[{name:"allowMultiple",optional:!1,type:null}],returns:null},{name:"onCountChoicesChange",docblock:null,modifiers:[],params:[{name:"count",optional:!1,type:null}],returns:null},{name:"onChange",docblock:null,modifiers:[],params:[{name:"{checked}",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newContent",optional:!1,type:null}],returns:null},{name:"onClueChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newClue",optional:!1,type:null}],returns:null},{name:"onDelete",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"noneOfTheAbove",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setDisplayCount",docblock:null,modifiers:[],params:[{name:"num",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RadioEditor",props:{choices:{defaultValue:{value:"[{}, {}, {}, {}]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{content:{name:"string",required:!1},clue:{name:"string",required:!1},correct:{name:"bool",required:!1}}}},required:!1},displayCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},randomize:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},hasNoneOfTheAbove:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},multipleSelect:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},countChoices:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},deselectEnabled:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1},static:{description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};export{d as R}; diff --git a/assets/editor-jsonify-yjAz4UcO.js b/assets/editor-jsonify-4Li1SRv8.js similarity index 61% rename from assets/editor-jsonify-yjAz4UcO.js rename to assets/editor-jsonify-4Li1SRv8.js index e5ff141a3f..3610003ac4 100644 --- a/assets/editor-jsonify-yjAz4UcO.js +++ b/assets/editor-jsonify-4Li1SRv8.js @@ -1 +1 @@ -import{_ as o}from"./jquery-yG1GhClm.js";import{d as i}from"./article-renderer-GCz9idJ2.js";const s={serialize:function(){return o.omit(this.props,i)}};export{s as E}; +import{_ as o}from"./jquery-yG1GhClm.js";import{d as i}from"./article-renderer-ub6lGcPc.js";const s={serialize:function(){return o.omit(this.props,i)}};export{s as E}; diff --git a/assets/editor-page-m--8Qm1D.js b/assets/editor-page-gACWJwm7.js similarity index 96% rename from assets/editor-page-m--8Qm1D.js rename to assets/editor-page-gACWJwm7.js index 056303fdd2..b23d3a8031 100644 --- a/assets/editor-page-m--8Qm1D.js +++ b/assets/editor-page-gACWJwm7.js @@ -1,4 +1,4 @@ -import{a,j as s}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import{_ as o}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as k,C as I}from"./perseus-api-Nq3s7IMx.js";import{c as M}from"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as b}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{r as p}from"./index-TT1qJ6UJ.js";import{I as T,J as R}from"./register-all-widgets-and-editors-for-testing-2mH-ZU77.js";import{V as A}from"./viewport-resizer-pZjHp3_4.js";import{i as O}from"./icon-paths-5JCXzGsq.js";import{D as q}from"./device-framer-eGajQcXC.js";import{E as C}from"./editor-Y01VX-A3.js";import{a as U,b as E,i as D}from"./icon-paths-EoBkHOLI.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{I as L}from"./item-extras-editor-p-SH0jeI.js";const{InfoTip:N,InlineIcon:d}=b,f=class f extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.handleChange=e=>{this.props.onChange({replace:e.target.checked})},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var t;return(t=this.editor.current)==null?void 0:t.serialize(e)}}render(){return a("div",{className:"perseus-hint-editor "+this.props.className,children:[this.props.showTitle&&s("div",{className:"pod-title",children:"Hint"}),s(C,{ref:this.editor,apiOptions:this.props.apiOptions,widgets:this.props.widgets||void 0,content:this.props.content||void 0,images:this.props.images,replace:this.props.replace,placeholder:"Type your hint here...",imageUploader:this.props.imageUploader,onChange:this.props.onChange},this.props.itemId),a("div",{className:"hint-controls-container clearfix",children:[this.props.showMoveButtons&&a("span",{className:"reorder-hints",children:[s("button",{type:"button",className:this.props.isLast?"hidden":"",onClick:o.partial(this.props.onMove,1),children:s(d,{...U})})," ",s("button",{type:"button",className:this.props.isFirst?"hidden":"",onClick:o.partial(this.props.onMove,-1),children:s(d,{...E})})," ",this.props.isLast&&s(N,{children:s("p",{children:"The last hint is automatically bolded."})})]}),s("input",{type:"checkbox",checked:this.props.replace,onChange:this.handleChange}),"Replace previous hint",this.props.showRemoveButton&&a("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.props.onRemove,children:[s(d,{...O}),"Remove this hint"," "]})]})]})}};f.defaultProps={className:"",content:"",replace:!1,showMoveButtons:!0,showTitle:!0,showRemoveButton:!0};let l=f;const y=class y extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.frame=p.createRef(),this.updatePreview=()=>{var t;const e=this.props.isLast&&!/\*\*/.test(this.props.hint.content);(t=this.frame.current)==null||t.sendNewData({type:"hint",data:{hint:this.props.hint,bold:e,pos:this.props.pos,apiOptions:this.props.apiOptions,linterContext:{contentType:"hint",highlightLint:this.props.highlightLint,paths:this.props.contentPaths}}})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var t;return(t=this.editor.current)==null?void 0:t.serialize(e)},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()}}componentDidMount(){this.updatePreview()}componentDidUpdate(){this.updatePreview()}render(){const e=this.props.deviceType==="phone"||this.props.deviceType==="tablet";return a("div",{className:"perseus-combined-hint-editor perseus-editor-row",children:[s("div",{className:"perseus-editor-left-cell",children:s(l,{ref:this.editor,itemId:this.props.itemId,isFirst:this.props.isFirst,isLast:this.props.isLast,widgets:this.props.hint.widgets,content:this.props.hint.content,images:this.props.hint.images,replace:this.props.hint.replace,imageUploader:this.props.imageUploader,onChange:this.props.onChange,onRemove:this.props.onRemove,onMove:this.props.onMove,apiOptions:this.props.apiOptions})}),s("div",{className:"perseus-editor-right-cell",children:s(q,{deviceType:this.props.deviceType,nochrome:!0,children:s(T,{ref:this.frame,datasetKey:"mobile",datasetValue:e,seamless:!0,url:this.props.previewURL})})})]})}};y.defaultProps={highlightLint:!1};let c=y;const m=class m extends p.Component{constructor(){super(...arguments),this.handleHintChange=(e,t,i,n)=>{const r=[...this.props.hints];r[e]=o.extend({},this.serializeHint(e,{keepDeletedWidgets:!0}),t),this.props.onChange({hints:r},i,n)},this.handleHintRemove=e=>{if(!confirm("Are you sure you want to delete this hint?"))return;const t=[...this.props.hints];t.splice(e,1),this.props.onChange({hints:t})},this.handleHintMove=(e,t)=>{const i=[...this.props.hints],n=i.splice(e,1)[0];i.splice(e+t,0,n),this.props.onChange({hints:i},()=>{this.refs["hintEditor"+(e+t)].focus()})},this.addHint=()=>{const e=this.props.hints.concat([{content:"",images:{},widgets:{}}]);this.props.onChange({hints:e},()=>{const t=e.length-1;this.refs["hintEditor"+t].focus()})},this.getSaveWarnings=()=>o.chain(this.props.hints).map((e,t)=>o.map(this.refs["hintEditor"+t].getSaveWarnings(),i=>"Hint "+(t+1)+": "+i)).flatten(!0).value(),this.serialize=e=>this.props.hints.map((t,i)=>this.serializeHint(i,e)),this.serializeHint=(e,t)=>this.refs["hintEditor"+e].serialize(t)}render(){const{itemId:e,hints:t}=this.props,i=o.map(t,function(n,r){return s(c,{ref:"hintEditor"+r,isFirst:r===0,isLast:r+1===t.length,itemId:e,hint:n,pos:r,imageUploader:this.props.imageUploader,onChange:this.handleHintChange.bind(this,r),onRemove:this.handleHintRemove.bind(this,r),onMove:this.handleHintMove.bind(this,r),deviceType:this.props.deviceType,apiOptions:this.props.apiOptions,highlightLint:this.props.highlightLint,previewURL:this.props.previewURL,contentPaths:[]},"hintEditor"+r)},this);return a("div",{className:"perseus-hints-editor perseus-editor-table",children:[i,s("div",{className:"perseus-editor-row",children:s("div",{className:"add-hint-container perseus-editor-left-cell",children:a("button",{type:"button",className:"add-hint simple-button orange",onClick:this.addHint,children:[s(d,{...D})," Add a hint"]})})})]})}};m.HintEditor=l,m.defaultProps={onChange:()=>{},hints:[],highlightLint:!1};let h=m;l.__docgenInfo={description:"",methods:[{name:"handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactChangeEvent",raw:"React.ChangeEvent",elements:[{name:"HTMLInputElement"}],alias:"React.ChangeEvent"}}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"HintEditor",props:{itemId:{required:!1,tsType:{name:"string"},description:""},apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageUploader:{required:!1,tsType:{name:"ImageUploader"},description:""},showMoveButtons:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showRemoveButton:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showTitle:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},content:{required:!1,tsType:{name:"union",raw:"string | null | undefined",elements:[{name:"string"},{name:"null"},{name:"undefined"}]},description:"",defaultValue:{value:'""',computed:!1}},replace:{required:!1,tsType:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}]},description:"",defaultValue:{value:"false",computed:!1}},widgets:{required:!1,tsType:{name:"union",raw:"PerseusWidgetsMap | null | undefined",elements:[{name:"PerseusWidgetsMap"},{name:"null"},{name:"undefined"}]},description:""},images:{required:!1,tsType:{name:"union",raw:"ImageDict | null | undefined",elements:[{name:"ImageDict"},{name:"null"},{name:"undefined"}]},description:""},isLast:{required:!0,tsType:{name:"boolean"},description:""},isFirst:{required:!0,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(direction: number) => unknown",signature:{arguments:[{type:{name:"number"},name:"direction"}],return:{name:"unknown"}}},description:""},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},onChange:{required:!0,tsType:{name:"ChangeHandler"},description:""},__type:{required:!1,tsType:{name:"literal",value:'"hint"'},description:""}}};h.__docgenInfo={description:"",methods:[{name:"handleHintChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:{name:"number"}},{name:"newProps",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{a,j as s}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import{_ as o}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import{A as k,C as I}from"./perseus-api-Nq3s7IMx.js";import{c as M}from"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as b}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{r as p}from"./index-TT1qJ6UJ.js";import{I as T,J as R}from"./register-all-widgets-and-editors-for-testing-Tl0n0XMq.js";import{V as A}from"./viewport-resizer-rIRGcoAM.js";import{i as O}from"./icon-paths-5JCXzGsq.js";import{D as q}from"./device-framer-eGajQcXC.js";import{E as C}from"./editor-1XE8pcNh.js";import{a as U,b as E,i as D}from"./icon-paths-EoBkHOLI.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{I as L}from"./item-extras-editor-DOkMw5hS.js";const{InfoTip:N,InlineIcon:d}=b,f=class f extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.handleChange=e=>{this.props.onChange({replace:e.target.checked})},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var t;return(t=this.editor.current)==null?void 0:t.serialize(e)}}render(){return a("div",{className:"perseus-hint-editor "+this.props.className,children:[this.props.showTitle&&s("div",{className:"pod-title",children:"Hint"}),s(C,{ref:this.editor,apiOptions:this.props.apiOptions,widgets:this.props.widgets||void 0,content:this.props.content||void 0,images:this.props.images,replace:this.props.replace,placeholder:"Type your hint here...",imageUploader:this.props.imageUploader,onChange:this.props.onChange},this.props.itemId),a("div",{className:"hint-controls-container clearfix",children:[this.props.showMoveButtons&&a("span",{className:"reorder-hints",children:[s("button",{type:"button",className:this.props.isLast?"hidden":"",onClick:o.partial(this.props.onMove,1),children:s(d,{...U})})," ",s("button",{type:"button",className:this.props.isFirst?"hidden":"",onClick:o.partial(this.props.onMove,-1),children:s(d,{...E})})," ",this.props.isLast&&s(N,{children:s("p",{children:"The last hint is automatically bolded."})})]}),s("input",{type:"checkbox",checked:this.props.replace,onChange:this.handleChange}),"Replace previous hint",this.props.showRemoveButton&&a("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.props.onRemove,children:[s(d,{...O}),"Remove this hint"," "]})]})]})}};f.defaultProps={className:"",content:"",replace:!1,showMoveButtons:!0,showTitle:!0,showRemoveButton:!0};let l=f;const y=class y extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.frame=p.createRef(),this.updatePreview=()=>{var t;const e=this.props.isLast&&!/\*\*/.test(this.props.hint.content);(t=this.frame.current)==null||t.sendNewData({type:"hint",data:{hint:this.props.hint,bold:e,pos:this.props.pos,apiOptions:this.props.apiOptions,linterContext:{contentType:"hint",highlightLint:this.props.highlightLint,paths:this.props.contentPaths}}})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var t;return(t=this.editor.current)==null?void 0:t.serialize(e)},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()}}componentDidMount(){this.updatePreview()}componentDidUpdate(){this.updatePreview()}render(){const e=this.props.deviceType==="phone"||this.props.deviceType==="tablet";return a("div",{className:"perseus-combined-hint-editor perseus-editor-row",children:[s("div",{className:"perseus-editor-left-cell",children:s(l,{ref:this.editor,itemId:this.props.itemId,isFirst:this.props.isFirst,isLast:this.props.isLast,widgets:this.props.hint.widgets,content:this.props.hint.content,images:this.props.hint.images,replace:this.props.hint.replace,imageUploader:this.props.imageUploader,onChange:this.props.onChange,onRemove:this.props.onRemove,onMove:this.props.onMove,apiOptions:this.props.apiOptions})}),s("div",{className:"perseus-editor-right-cell",children:s(q,{deviceType:this.props.deviceType,nochrome:!0,children:s(T,{ref:this.frame,datasetKey:"mobile",datasetValue:e,seamless:!0,url:this.props.previewURL})})})]})}};y.defaultProps={highlightLint:!1};let c=y;const m=class m extends p.Component{constructor(){super(...arguments),this.handleHintChange=(e,t,i,n)=>{const r=[...this.props.hints];r[e]=o.extend({},this.serializeHint(e,{keepDeletedWidgets:!0}),t),this.props.onChange({hints:r},i,n)},this.handleHintRemove=e=>{if(!confirm("Are you sure you want to delete this hint?"))return;const t=[...this.props.hints];t.splice(e,1),this.props.onChange({hints:t})},this.handleHintMove=(e,t)=>{const i=[...this.props.hints],n=i.splice(e,1)[0];i.splice(e+t,0,n),this.props.onChange({hints:i},()=>{this.refs["hintEditor"+(e+t)].focus()})},this.addHint=()=>{const e=this.props.hints.concat([{content:"",images:{},widgets:{}}]);this.props.onChange({hints:e},()=>{const t=e.length-1;this.refs["hintEditor"+t].focus()})},this.getSaveWarnings=()=>o.chain(this.props.hints).map((e,t)=>o.map(this.refs["hintEditor"+t].getSaveWarnings(),i=>"Hint "+(t+1)+": "+i)).flatten(!0).value(),this.serialize=e=>this.props.hints.map((t,i)=>this.serializeHint(i,e)),this.serializeHint=(e,t)=>this.refs["hintEditor"+e].serialize(t)}render(){const{itemId:e,hints:t}=this.props,i=o.map(t,function(n,r){return s(c,{ref:"hintEditor"+r,isFirst:r===0,isLast:r+1===t.length,itemId:e,hint:n,pos:r,imageUploader:this.props.imageUploader,onChange:this.handleHintChange.bind(this,r),onRemove:this.handleHintRemove.bind(this,r),onMove:this.handleHintMove.bind(this,r),deviceType:this.props.deviceType,apiOptions:this.props.apiOptions,highlightLint:this.props.highlightLint,previewURL:this.props.previewURL,contentPaths:[]},"hintEditor"+r)},this);return a("div",{className:"perseus-hints-editor perseus-editor-table",children:[i,s("div",{className:"perseus-editor-row",children:s("div",{className:"add-hint-container perseus-editor-left-cell",children:a("button",{type:"button",className:"add-hint simple-button orange",onClick:this.addHint,children:[s(d,{...D})," Add a hint"]})})})]})}};m.HintEditor=l,m.defaultProps={onChange:()=>{},hints:[],highlightLint:!1};let h=m;l.__docgenInfo={description:"",methods:[{name:"handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactChangeEvent",raw:"React.ChangeEvent",elements:[{name:"HTMLInputElement"}],alias:"React.ChangeEvent"}}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"HintEditor",props:{itemId:{required:!1,tsType:{name:"string"},description:""},apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageUploader:{required:!1,tsType:{name:"ImageUploader"},description:""},showMoveButtons:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showRemoveButton:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showTitle:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},content:{required:!1,tsType:{name:"union",raw:"string | null | undefined",elements:[{name:"string"},{name:"null"},{name:"undefined"}]},description:"",defaultValue:{value:'""',computed:!1}},replace:{required:!1,tsType:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}]},description:"",defaultValue:{value:"false",computed:!1}},widgets:{required:!1,tsType:{name:"union",raw:"PerseusWidgetsMap | null | undefined",elements:[{name:"PerseusWidgetsMap"},{name:"null"},{name:"undefined"}]},description:""},images:{required:!1,tsType:{name:"union",raw:"ImageDict | null | undefined",elements:[{name:"ImageDict"},{name:"null"},{name:"undefined"}]},description:""},isLast:{required:!0,tsType:{name:"boolean"},description:""},isFirst:{required:!0,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(direction: number) => unknown",signature:{arguments:[{type:{name:"number"},name:"direction"}],return:{name:"unknown"}}},description:""},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},onChange:{required:!0,tsType:{name:"ChangeHandler"},description:""},__type:{required:!1,tsType:{name:"literal",value:'"hint"'},description:""}}};h.__docgenInfo={description:"",methods:[{name:"handleHintChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:{name:"number"}},{name:"newProps",optional:!1,type:{name:"signature",type:"object",raw:`{ apiOptions?: APIOptions; deviceType: DeviceType; imageUploader?: ImageUploader; diff --git a/assets/editor-page-with-storybook-preview--akIa83W.js b/assets/editor-page-with-storybook-preview-XU3ula-b.js similarity index 76% rename from assets/editor-page-with-storybook-preview--akIa83W.js rename to assets/editor-page-with-storybook-preview-XU3ula-b.js index 01ad09c295..523b37d290 100644 --- a/assets/editor-page-with-storybook-preview--akIa83W.js +++ b/assets/editor-page-with-storybook-preview-XU3ula-b.js @@ -1 +1 @@ -import{a as l,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import{R as f}from"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import{m as h}from"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{B as I}from"./choice-I73s7vIV.js";import{V as a}from"./index-6h5t6F0w.js";import{I as _}from"./locked-label-settings-My12ABKT.js";import{S as A}from"./index-qUyqkRvh.js";import{c as g,s as o}from"./index-deFLJwr4.js";import{L as q}from"./index-h_CiYGGb.js";import{x as B}from"./index-rfN0X25E.js";import{a as C}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as R}from"./index-awljIyHI.js";import{r as i}from"./index-TT1qJ6UJ.js";import{E}from"./editor-page-m--8Qm1D.js";import{f as O}from"./flags-for-api-options-FcV02OR3.js";const j=C("onChange");function M(m){const[y,w]=i.useState("phone"),[S,b]=i.useState(!1),[x,v]=i.useState(),[d,P]=i.useState(m.question),[n,k]=i.useState(m.hints),[s,c]=i.useState(!0),p=m.apiOptions??{isMobile:!1,flags:O};return l(a,{children:[t(E,{apiOptions:p,previewDevice:y,onPreviewDeviceChange:e=>w(e),developerMode:!0,jsonMode:S,answerArea:x,question:d,hints:n,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:e=>{j(e),"jsonMode"in e&&b(e.jsonMode),"answerArea"in e&&v(e.answerArea),"question"in e&&P(e.question),"hints"in e&&k(e.hints)}}),!s&&t(I,{onClick:()=>c(!s),style:r.openPanelButton,children:"Open preview (storybook only)"}),s&&l(a,{style:r.panel,children:[t(_,{icon:B,onClick:()=>c(!s),style:r.closeButton}),t(a,{style:r.panelInner,children:t(f,{strings:h,apiOptions:p,...d})}),n==null?void 0:n.map((e,u)=>l(a,{style:r.panelInner,children:[t(A,{size:o.medium_16}),t(q,{children:`Hint ${u+1}`}),t(f,{strings:h,apiOptions:p,...e})]},u))]})]})}const r=R.StyleSheet.create({panel:{position:"fixed",right:0,minWidth:500,height:"90vh",overflow:"auto",flex:"none",backgroundColor:g.fadedBlue16,padding:o.medium_16,borderRadius:o.small_12,alignItems:"end"},panelInner:{flex:"none",backgroundColor:g.white,borderRadius:o.xSmall_8,marginTop:o.medium_16,width:"100%",padding:o.xSmall_8},closeButton:{margin:0},openPanelButton:{position:"fixed",right:o.medium_16,bottom:o.xxxLarge_64}});M.__docgenInfo={description:"",methods:[],displayName:"EditorPageWithStorybookPreview",props:{apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},question:{required:!1,tsType:{name:"PerseusRenderer"},description:""},hints:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"Hint"}],raw:"ReadonlyArray"},description:""}}};export{M as E}; +import{a as l,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import{R as f}from"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import{m as h}from"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{B as I}from"./choice-I73s7vIV.js";import{V as a}from"./index-6h5t6F0w.js";import{I as _}from"./locked-label-settings-7eVXvZDY.js";import{S as A}from"./index-qUyqkRvh.js";import{c as g,s as o}from"./index-deFLJwr4.js";import{L as q}from"./index-h_CiYGGb.js";import{x as B}from"./index-rfN0X25E.js";import{a as C}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as R}from"./index-awljIyHI.js";import{r as i}from"./index-TT1qJ6UJ.js";import{E}from"./editor-page-gACWJwm7.js";import{f as O}from"./flags-for-api-options-eINmxSCP.js";const j=C("onChange");function M(m){const[y,w]=i.useState("phone"),[S,b]=i.useState(!1),[x,v]=i.useState(),[d,P]=i.useState(m.question),[n,k]=i.useState(m.hints),[s,c]=i.useState(!0),p=m.apiOptions??{isMobile:!1,flags:O};return l(a,{children:[t(E,{apiOptions:p,previewDevice:y,onPreviewDeviceChange:e=>w(e),developerMode:!0,jsonMode:S,answerArea:x,question:d,hints:n,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:e=>{j(e),"jsonMode"in e&&b(e.jsonMode),"answerArea"in e&&v(e.answerArea),"question"in e&&P(e.question),"hints"in e&&k(e.hints)}}),!s&&t(I,{onClick:()=>c(!s),style:r.openPanelButton,children:"Open preview (storybook only)"}),s&&l(a,{style:r.panel,children:[t(_,{icon:B,onClick:()=>c(!s),style:r.closeButton}),t(a,{style:r.panelInner,children:t(f,{strings:h,apiOptions:p,...d})}),n==null?void 0:n.map((e,u)=>l(a,{style:r.panelInner,children:[t(A,{size:o.medium_16}),t(q,{children:`Hint ${u+1}`}),t(f,{strings:h,apiOptions:p,...e})]},u))]})]})}const r=R.StyleSheet.create({panel:{position:"fixed",right:0,minWidth:500,height:"90vh",overflow:"auto",flex:"none",backgroundColor:g.fadedBlue16,padding:o.medium_16,borderRadius:o.small_12,alignItems:"end"},panelInner:{flex:"none",backgroundColor:g.white,borderRadius:o.xSmall_8,marginTop:o.medium_16,width:"100%",padding:o.xSmall_8},closeButton:{margin:0},openPanelButton:{position:"fixed",right:o.medium_16,bottom:o.xxxLarge_64}});M.__docgenInfo={description:"",methods:[],displayName:"EditorPageWithStorybookPreview",props:{apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},question:{required:!1,tsType:{name:"PerseusRenderer"},description:""},hints:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"Hint"}],raw:"ReadonlyArray"},description:""}}};export{M as E}; diff --git a/assets/editor-page.stories-YFwl7FAq.js b/assets/editor-page.stories-YFwl7FAq.js deleted file mode 100644 index d12e5b48b6..0000000000 --- a/assets/editor-page.stories-YFwl7FAq.js +++ /dev/null @@ -1,3 +0,0 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{r as p}from"./register-all-widgets-and-editors-for-testing-2mH-ZU77.js";import{E as e}from"./editor-page-with-storybook-preview--akIa83W.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-fuycm_QE.js";import"./invariant-bu5zBsRS.js";import"./jquery-yG1GhClm.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./categorizer-editor-3QAla4Wt.js";import"./components-V6aclUoQ.js";import"./editor-jsonify-yjAz4UcO.js";import"./index-0C4KXdeC.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-jFzP_8M9.js";import"./editor-Y01VX-A3.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./dropdown-editor-8wTJqqrY.js";import"./explanation-editor-_xuXa3EA.js";import"./expression-editor-TOSGrK7r.js";import"./graph-settings-6z3yJikg.js";import"./image-editor-oat1qOOh.js";import"./input-number-editor-Bkjav5mB.js";import"./index-6m5XMHRW.js";import"./interactive-graph-editor-sXGG56UO.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-BlpUEkpl.js";import"./locked-figures-section-MyNRaNP3.js";import"./locked-ellipse-settings-2CzQImqt.js";import"./locked-figure-aria-8qS88jMt.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-My12ABKT.js";import"./color-select-ZBceqrDu.js";import"./util-w4oIPZJv.js";import"./line-stroke-select-OUNHgM-H.js";import"./locked-function-settings-mVk4KOOh.js";import"./line-swatch-tbLkNsXV.js";import"./locked-line-settings-GmLOdRhN.js";import"./locked-point-settings-75zYMwR0.js";import"./labeled-switch-Fn8JZIE3.js";import"./locked-polygon-settings-CLRPaxRY.js";import"./locked-vector-settings-nyZ3gue2.js";import"./label-image-editor-AWRkHIaL.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-IbySI0ZR.js";import"./behavior-Or9dqpn7.js";import"./question-markers-rbcwtTwt.js";import"./marker-4IxQ8C94.js";import"./select-image-cPUSf5YP.js";import"./matcher-editor-w387bK5J.js";import"./number-line-editor-g8WyXFkD.js";import"./numeric-input-editor-wcLIK9qM.js";import"./phet-simulation-editor-KZoPAnLO.js";import"./python-program-editor-ReCi12oY.js";import"./editor-DsbDBOGq.js";import"./sorter-editor-RE_zqP0r.js";import"./chunk-WFFRPTHA-zlNDxfrq.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./editor-page-m--8Qm1D.js";import"./viewport-resizer-pZjHp3_4.js";import"./constants-p_UgHLsb.js";import"./device-framer-eGajQcXC.js";import"./item-extras-editor-p-SH0jeI.js";import"./flags-for-api-options-FcV02OR3.js";p();const pt={title:"PerseusEditor/EditorPage"},r=()=>m(e,{});r.__docgenInfo={description:"",methods:[],displayName:"Demo"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(): React.ReactElement => { - return ; -}`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const et=["Demo"];export{r as Demo,et as __namedExportsOrder,pt as default}; diff --git a/assets/editor-page.stories-bJQLROcU.js b/assets/editor-page.stories-bJQLROcU.js new file mode 100644 index 0000000000..29b9ac998e --- /dev/null +++ b/assets/editor-page.stories-bJQLROcU.js @@ -0,0 +1,3 @@ +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{r as p}from"./register-all-widgets-and-editors-for-testing-Tl0n0XMq.js";import{E as e}from"./editor-page-with-storybook-preview-XU3ula-b.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-fuycm_QE.js";import"./invariant-bu5zBsRS.js";import"./jquery-yG1GhClm.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./categorizer-editor-cvgo7rUS.js";import"./components-yT7oveOH.js";import"./editor-jsonify-4Li1SRv8.js";import"./index-0C4KXdeC.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-yKychsEi.js";import"./editor-1XE8pcNh.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./dropdown-editor-owePQkYW.js";import"./explanation-editor-7sIPvPkn.js";import"./expression-editor-qSSWTw9p.js";import"./graph-settings-VTKCtXa5.js";import"./image-editor-xcASymG3.js";import"./input-number-editor-Z-c49jcj.js";import"./index-JX1pDXLf.js";import"./interactive-graph-editor-sYnTC31H.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-K1uO-oSP.js";import"./locked-figures-section-TPfsudBG.js";import"./locked-ellipse-settings-y-e2vVG9.js";import"./locked-figure-aria-cizi6QSj.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-7eVXvZDY.js";import"./color-select-Ou1zrjGq.js";import"./util-a_JWUtR1.js";import"./line-stroke-select-1i4OFJVH.js";import"./locked-function-settings-leQQyqbk.js";import"./line-swatch-EI3Byz66.js";import"./locked-line-settings-8WmBPF8G.js";import"./locked-point-settings-dcN0AtwC.js";import"./labeled-switch-zT89YLZ0.js";import"./locked-polygon-settings-5YNPD6lU.js";import"./locked-vector-settings-f_p_9H7b.js";import"./label-image-editor-kPCp3zRh.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-Zdsv-TtU.js";import"./behavior-xJJumj3W.js";import"./question-markers-0U-M3sRj.js";import"./marker-de7YvUxA.js";import"./select-image-e-hQhRt5.js";import"./matcher-editor-nUcHc7yM.js";import"./number-line-editor-hnXuQMSB.js";import"./numeric-input-editor-xQu1_JCK.js";import"./phet-simulation-editor-1KD7oC0a.js";import"./python-program-editor-kfW7ZX3D.js";import"./editor-EbDgkB5I.js";import"./sorter-editor-VTfqPYS3.js";import"./chunk-WFFRPTHA-zlNDxfrq.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./editor-page-gACWJwm7.js";import"./viewport-resizer-rIRGcoAM.js";import"./constants-p_UgHLsb.js";import"./device-framer-eGajQcXC.js";import"./item-extras-editor-DOkMw5hS.js";import"./flags-for-api-options-eINmxSCP.js";p();const pt={title:"PerseusEditor/EditorPage"},r=()=>m(e,{});r.__docgenInfo={description:"",methods:[],displayName:"Demo"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(): React.ReactElement => { + return ; +}`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const et=["Demo"];export{r as Demo,et as __namedExportsOrder,pt as default}; diff --git a/assets/editor.stories-DpL0KZWi.js b/assets/editor.stories-KtEWbF29.js similarity index 66% rename from assets/editor.stories-DpL0KZWi.js rename to assets/editor.stories-KtEWbF29.js index ebe3effa7d..9783358e2a 100644 --- a/assets/editor.stories-DpL0KZWi.js +++ b/assets/editor.stories-KtEWbF29.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{V as R}from"./index-6h5t6F0w.js";import{a as O}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as e}from"./index-TT1qJ6UJ.js";import"./index-LBTd2Ozi.js";import{S as C}from"./side-by-side-kGWaKY6T.js";import{r as x}from"./register-all-widgets-and-editors-for-testing-2mH-ZU77.js";import{a as u}from"./flags-for-api-options-FcV02OR3.js";import{E as f}from"./editor-Y01VX-A3.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./version-akiLXZts.js";import"./article-editor-Hyxtmbid.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./device-framer-eGajQcXC.js";import"./constants-p_UgHLsb.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./icon-paths-EoBkHOLI.js";import"./viewport-resizer-pZjHp3_4.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-EmSySxnw.js";import"./text-diff-yU5JXCsK.js";import"./tags-diff-Nd2k4lKQ.js";import"./editor-page-m--8Qm1D.js";import"./item-extras-editor-p-SH0jeI.js";import"./multi-items-JojuRZeA.js";import"./index-fuycm_QE.js";/* empty css */import"./categorizer-editor-3QAla4Wt.js";import"./editor-jsonify-yjAz4UcO.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-jFzP_8M9.js";import"./dropdown-editor-8wTJqqrY.js";import"./explanation-editor-_xuXa3EA.js";import"./expression-editor-TOSGrK7r.js";import"./graph-settings-6z3yJikg.js";import"./image-editor-oat1qOOh.js";import"./input-number-editor-Bkjav5mB.js";import"./index-6m5XMHRW.js";import"./interactive-graph-editor-sXGG56UO.js";import"./heading-8aCiuWUg.js";import"./toggleable-caret-lFiCktzo.js";import"./interactive-graph-settings-BlpUEkpl.js";import"./locked-figures-section-MyNRaNP3.js";import"./locked-ellipse-settings-2CzQImqt.js";import"./locked-figure-aria-8qS88jMt.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-My12ABKT.js";import"./color-select-ZBceqrDu.js";import"./util-w4oIPZJv.js";import"./line-stroke-select-OUNHgM-H.js";import"./locked-function-settings-mVk4KOOh.js";import"./line-swatch-tbLkNsXV.js";import"./locked-line-settings-GmLOdRhN.js";import"./locked-point-settings-75zYMwR0.js";import"./labeled-switch-Fn8JZIE3.js";import"./locked-polygon-settings-CLRPaxRY.js";import"./locked-vector-settings-nyZ3gue2.js";import"./label-image-editor-AWRkHIaL.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-IbySI0ZR.js";import"./behavior-Or9dqpn7.js";import"./question-markers-rbcwtTwt.js";import"./marker-4IxQ8C94.js";import"./select-image-cPUSf5YP.js";import"./matcher-editor-w387bK5J.js";import"./number-line-editor-g8WyXFkD.js";import"./numeric-input-editor-wcLIK9qM.js";import"./phet-simulation-editor-KZoPAnLO.js";import"./python-program-editor-ReCi12oY.js";import"./editor-DsbDBOGq.js";import"./sorter-editor-RE_zqP0r.js";import"./index-SM3muJE2.js";import"./tex-error-view-Y2BSLjwB.js";const n={content:`A sequence is defined recursively as follows: +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{V as R}from"./index-6h5t6F0w.js";import{a as O}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as e}from"./index-TT1qJ6UJ.js";import"./index-n67YmpRR.js";import{S as C}from"./side-by-side-kGWaKY6T.js";import{r as x}from"./register-all-widgets-and-editors-for-testing-Tl0n0XMq.js";import{a as u}from"./flags-for-api-options-eINmxSCP.js";import{E as f}from"./editor-1XE8pcNh.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./version-akiLXZts.js";import"./article-editor-dmW6w6Eg.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./device-framer-eGajQcXC.js";import"./constants-p_UgHLsb.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./icon-paths-EoBkHOLI.js";import"./viewport-resizer-rIRGcoAM.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-UZ_vLVui.js";import"./text-diff-ftiYrVyQ.js";import"./tags-diff-wQwsbtqj.js";import"./editor-page-gACWJwm7.js";import"./item-extras-editor-DOkMw5hS.js";import"./multi-items-MiSsRMrN.js";import"./index-fuycm_QE.js";/* empty css */import"./categorizer-editor-cvgo7rUS.js";import"./editor-jsonify-4Li1SRv8.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-yKychsEi.js";import"./dropdown-editor-owePQkYW.js";import"./explanation-editor-7sIPvPkn.js";import"./expression-editor-qSSWTw9p.js";import"./graph-settings-VTKCtXa5.js";import"./image-editor-xcASymG3.js";import"./input-number-editor-Z-c49jcj.js";import"./index-JX1pDXLf.js";import"./interactive-graph-editor-sYnTC31H.js";import"./heading-8aCiuWUg.js";import"./toggleable-caret-lFiCktzo.js";import"./interactive-graph-settings-K1uO-oSP.js";import"./locked-figures-section-TPfsudBG.js";import"./locked-ellipse-settings-y-e2vVG9.js";import"./locked-figure-aria-cizi6QSj.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-7eVXvZDY.js";import"./color-select-Ou1zrjGq.js";import"./util-a_JWUtR1.js";import"./line-stroke-select-1i4OFJVH.js";import"./locked-function-settings-leQQyqbk.js";import"./line-swatch-EI3Byz66.js";import"./locked-line-settings-8WmBPF8G.js";import"./locked-point-settings-dcN0AtwC.js";import"./labeled-switch-zT89YLZ0.js";import"./locked-polygon-settings-5YNPD6lU.js";import"./locked-vector-settings-f_p_9H7b.js";import"./label-image-editor-kPCp3zRh.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-Zdsv-TtU.js";import"./behavior-xJJumj3W.js";import"./question-markers-0U-M3sRj.js";import"./marker-de7YvUxA.js";import"./select-image-e-hQhRt5.js";import"./matcher-editor-nUcHc7yM.js";import"./number-line-editor-hnXuQMSB.js";import"./numeric-input-editor-xQu1_JCK.js";import"./phet-simulation-editor-1KD7oC0a.js";import"./python-program-editor-kfW7ZX3D.js";import"./editor-EbDgkB5I.js";import"./sorter-editor-VTfqPYS3.js";import"./index-SM3muJE2.js";import"./tex-error-view-Y2BSLjwB.js";const n={content:`A sequence is defined recursively as follows: $\\qquad\\displaystyle{{a}_{n}}=-\\frac{1}{a_{n-1}-1} diff --git a/assets/explanation-editor-_xuXa3EA.js b/assets/explanation-editor-7sIPvPkn.js similarity index 79% rename from assets/explanation-editor-_xuXa3EA.js rename to assets/explanation-editor-7sIPvPkn.js index 5455683f39..47d79423e6 100644 --- a/assets/explanation-editor-_xuXa3EA.js +++ b/assets/explanation-editor-7sIPvPkn.js @@ -1,3 +1,3 @@ -import{a as o,j as t}from"./jsx-runtime-FVsy8kgq.js";import{c as l,p as m}from"./article-renderer-GCz9idJ2.js";import{_ as n}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as d}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{E as c}from"./editor-jsonify-yjAz4UcO.js";import{P as i}from"./index-0C4KXdeC.js";import{r as h}from"./index-TT1qJ6UJ.js";import{E as u}from"./editor-Y01VX-A3.js";const{TextInput:p}=d,g={showPrompt:"Explain",hidePrompt:"Hide explanation",explanation:`explanation goes here +import{a as o,j as t}from"./jsx-runtime-FVsy8kgq.js";import{c as l,p as m}from"./article-renderer-ub6lGcPc.js";import{_ as n}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as d}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{E as c}from"./editor-jsonify-4Li1SRv8.js";import{P as i}from"./index-0C4KXdeC.js";import{r as h}from"./index-TT1qJ6UJ.js";import{E as u}from"./editor-1XE8pcNh.js";const{TextInput:p}=d,g={showPrompt:"Explain",hidePrompt:"Hide explanation",explanation:`explanation goes here more explanation`,widgets:{}},s=class s extends h.Component{constructor(){super(...arguments),this.state={},this.change=(...e)=>l.apply(this,e),this.serialize=()=>c.serialize.call(this)}render(){return o("div",{className:"perseus-widget-explanation-editor",children:[t("div",{className:"perseus-widget-row",children:o("label",{children:["Prompt to show explanation:"," ",t(p,{value:this.props.showPrompt,onChange:this.change("showPrompt")})]})}),t("div",{className:"perseus-widget-row",children:o("label",{children:["Prompt to hide explanation:"," ",t(p,{value:this.props.hidePrompt,onChange:this.change("hidePrompt")})]})}),t("div",{className:"perseus-widget-row",children:t(u,{apiOptions:this.props.apiOptions,content:this.props.explanation,widgets:this.props.widgets,widgetEnabled:!0,immutableWidgets:!1,onChange:e=>{const a={};n.has(e,"content")&&(a.explanation=e.content),n.has(e,"widgets")&&(a.widgets=e.widgets),this.change(a)}})})]})}};s.propTypes={...m,showPrompt:i.string,hidePrompt:i.string,explanation:i.string,widgets:i.object,apiOptions:i.any},s.widgetName="explanation",s.defaultProps=g;let r=s;r.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ExplanationEditor",props:{showPrompt:{defaultValue:{value:'"Explain"',computed:!1},description:"",type:{name:"string"},required:!1},hidePrompt:{defaultValue:{value:'"Hide explanation"',computed:!1},description:"",type:{name:"string"},required:!1},explanation:{defaultValue:{value:'"explanation goes here\\n\\nmore explanation"',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{r as E}; diff --git a/assets/explanation-editor.stories-QdYZ9u0O.js b/assets/explanation-editor.stories-V_cD4PEf.js similarity index 68% rename from assets/explanation-editor.stories-QdYZ9u0O.js rename to assets/explanation-editor.stories-V_cD4PEf.js index 0a1f1a25ef..7318f59662 100644 --- a/assets/explanation-editor.stories-QdYZ9u0O.js +++ b/assets/explanation-editor.stories-V_cD4PEf.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{E as a}from"./explanation-editor-_xuXa3EA.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./editor-jsonify-yjAz4UcO.js";import"./index-0C4KXdeC.js";import"./editor-Y01VX-A3.js";import"./index-fuycm_QE.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const st={title:"PerseusEditor/Widgets/Explanation Editor"},o=e=>p(a,{onChange:m("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,r,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{E as a}from"./explanation-editor-7sIPvPkn.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./editor-jsonify-4Li1SRv8.js";import"./index-0C4KXdeC.js";import"./editor-1XE8pcNh.js";import"./index-fuycm_QE.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const st={title:"PerseusEditor/Widgets/Explanation Editor"},o=e=>p(a,{onChange:m("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,r,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(r=o.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const dt=["Default"];export{o as Default,dt as __namedExportsOrder,st as default}; diff --git a/assets/explanation.stories-oAoeTIET.js b/assets/explanation.stories-Z14k2UD8.js similarity index 84% rename from assets/explanation.stories-oAoeTIET.js rename to assets/explanation.stories-Z14k2UD8.js index dceedd0123..a656100648 100644 --- a/assets/explanation.stories-oAoeTIET.js +++ b/assets/explanation.stories-Z14k2UD8.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const v={content:`Here's the explanation +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const v={content:`Here's the explanation [[☃ explanation 1]] Did you get that?`,images:{},widgets:{"explanation 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"explanation",options:{hidePrompt:"Hide explanation!",widgets:{},explanation:"This is an explanation",static:!1,showPrompt:"Explanation"},alignment:"default"}}},b={content:`Here's the explanation [[☃ explanation 1]] diff --git a/assets/expression-editor-TOSGrK7r.js b/assets/expression-editor-qSSWTw9p.js similarity index 96% rename from assets/expression-editor-TOSGrK7r.js rename to assets/expression-editor-qSSWTw9p.js index 871694fb1d..a21f3ae1e4 100644 --- a/assets/expression-editor-TOSGrK7r.js +++ b/assets/expression-editor-qSSWTw9p.js @@ -1,2 +1,2 @@ -import{j as n,a as c,F as I}from"./jsx-runtime-FVsy8kgq.js";import{p as N}from"./util-F8-MDmsT.js";import{c as C,P as R,E as _}from"./article-renderer-GCz9idJ2.js";import{_ as g}from"./jquery-yG1GhClm.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import{l as w}from"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as T}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import{f as q}from"./index-J2t_5nK1.js";import"./index-IIMKO4_x.js";import{B as f}from"./choice-I73s7vIV.js";import{C as m,l as S}from"./index-QCAhLhLD.js";import{S as O}from"./index-qUyqkRvh.js";import{s as p,c as y}from"./index-deFLJwr4.js";import{H as k,d as L}from"./index-h_CiYGGb.js";import{l}from"./index-awljIyHI.js";import{r as D}from"./index-TT1qJ6UJ.js";import{c as F}from"./index-fuycm_QE.js";import{P as B}from"./index-0C4KXdeC.js";import{R as Y}from"./index-7vsPyIck.js";const d=B,z=F({propTypes:{className:d.string,components:d.arrayOf(d.node).isRequired,onReorder:d.func.isRequired,style:d.any,verify:d.func},getDefaultProps:function(){return{verify:()=>!0}},getInitialState:function(){return{dragging:null,components:this.props.components}},componentDidMount:function(){this._setDragEvents()},UNSAFE_componentWillReceiveProps:function(r){this.setState({components:r.components})},componentDidUpdate:function(){this._setDragEvents()},onDragStart:function(r){this.setState({dragging:r})},onDrop:function(){this.setState({dragging:null}),this.props.onReorder(this.state.components)},onDragEnter:function(r){if(this.state.dragging===r)return;const i=this.state.components.slice(),e=i.splice(this.state.dragging,1);i.splice(r,0,e[0]);const t=this.props.verify(i);return t&&this.setState({dragging:r,components:i}),t},_listenEvent:function(r){r.dataTransfer.setData("hackhackhack","because browsers!")},_cancelEvent:function(r){r.preventDefault()},_setDragEvents:function(){this._dragItems=this._dragItems||[];const r=Y.findDOMNode(this).querySelectorAll("[draggable=true]"),i=[],e=[];for(let t=0;tn(P,{index:e,component:i,area:this,draggable:i.props.draggable,dragging:e===this.state.dragging},i.key));return n("ol",{className:this.props.className,style:this.props.style,children:r})}}),P=F({propTypes:{area:d.shape({onDragEnter:d.func.isRequired,onDragStart:d.func.isRequired,onDrop:d.func.isRequired}),component:d.node.isRequired,dragging:d.bool.isRequired,draggable:d.bool.isRequired,index:d.number.isRequired},handleDragStart:function(r){r.nativeEvent.dataTransfer.effectAllowed="move",this.props.area.onDragStart(this.props.index)},handleDrop:function(){this.props.area.onDrop(this.props.index)},handleDragEnter:function(r){const i=this.props.area.onDragEnter(this.props.index);r.nativeEvent.dataTransfer.effectAllowed=i?"move":"none"},handleDragOver:function(r){r.preventDefault()},render:function(){let r="sortable-disabled";return this.props.dragging?r="sortable-dragging":this.props.draggable&&(r="sortable-enabled"),n("li",{draggable:this.props.draggable,className:[r,l.css(U.sortableListItem)].join(" "),onDragStart:this.handleDragStart,onDrop:this.handleDrop,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,children:this.props.component})}}),U=l.StyleSheet.create({sortableListItem:{margin:"5px 0"}}),{InfoTip:u}=T,A=["basic","trig","prealgebra","logarithms","basic relations","advanced relations"],E=({key:r})=>Number.parseInt(r??""),V=r=>{const i=[];r.forEach(e=>{i[E(e)]=!0});for(let e=0;e{const e=["value","form","simplify","considered","key"],t=["answerForms","buttonSets","functions","times","visibleLabel","ariaLabel"],s=this.props.answerForms.map(a=>g(a).pick(e));return w(this.props).set(["answerForms"],s).mod([],a=>g(a).pick(t)).freeze()},this.getSaveWarnings=()=>{const e=[];return this.props.answerForms.length===0?e.push("No answers specified"):(this.props.answerForms.some(s=>s.considered==="correct")||e.push("No correct answer specified"),g(this.props.answerForms).each((s,a)=>{if(this.props.value==="")e.push(`Answer ${a+1} is empty`);else{const h=N(s.value,{functions:this.props.functions});h.parsed?s.simplify&&!h.expr.isSimplified()&&e.push(`${s.value} isn't simplified, but is required" + +import{j as n,a as c,F as I}from"./jsx-runtime-FVsy8kgq.js";import{p as N}from"./util-F8-MDmsT.js";import{c as C,P as R,E as _}from"./article-renderer-ub6lGcPc.js";import{_ as g}from"./jquery-yG1GhClm.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import{l as w}from"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as T}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import{f as q}from"./index-J2t_5nK1.js";import"./index-IIMKO4_x.js";import{B as f}from"./choice-I73s7vIV.js";import{C as m,l as S}from"./index-QCAhLhLD.js";import{S as O}from"./index-qUyqkRvh.js";import{s as p,c as y}from"./index-deFLJwr4.js";import{H as k,d as L}from"./index-h_CiYGGb.js";import{l}from"./index-awljIyHI.js";import{r as D}from"./index-TT1qJ6UJ.js";import{c as F}from"./index-fuycm_QE.js";import{P as B}from"./index-0C4KXdeC.js";import{R as Y}from"./index-7vsPyIck.js";const d=B,z=F({propTypes:{className:d.string,components:d.arrayOf(d.node).isRequired,onReorder:d.func.isRequired,style:d.any,verify:d.func},getDefaultProps:function(){return{verify:()=>!0}},getInitialState:function(){return{dragging:null,components:this.props.components}},componentDidMount:function(){this._setDragEvents()},UNSAFE_componentWillReceiveProps:function(r){this.setState({components:r.components})},componentDidUpdate:function(){this._setDragEvents()},onDragStart:function(r){this.setState({dragging:r})},onDrop:function(){this.setState({dragging:null}),this.props.onReorder(this.state.components)},onDragEnter:function(r){if(this.state.dragging===r)return;const i=this.state.components.slice(),e=i.splice(this.state.dragging,1);i.splice(r,0,e[0]);const t=this.props.verify(i);return t&&this.setState({dragging:r,components:i}),t},_listenEvent:function(r){r.dataTransfer.setData("hackhackhack","because browsers!")},_cancelEvent:function(r){r.preventDefault()},_setDragEvents:function(){this._dragItems=this._dragItems||[];const r=Y.findDOMNode(this).querySelectorAll("[draggable=true]"),i=[],e=[];for(let t=0;tn(P,{index:e,component:i,area:this,draggable:i.props.draggable,dragging:e===this.state.dragging},i.key));return n("ol",{className:this.props.className,style:this.props.style,children:r})}}),P=F({propTypes:{area:d.shape({onDragEnter:d.func.isRequired,onDragStart:d.func.isRequired,onDrop:d.func.isRequired}),component:d.node.isRequired,dragging:d.bool.isRequired,draggable:d.bool.isRequired,index:d.number.isRequired},handleDragStart:function(r){r.nativeEvent.dataTransfer.effectAllowed="move",this.props.area.onDragStart(this.props.index)},handleDrop:function(){this.props.area.onDrop(this.props.index)},handleDragEnter:function(r){const i=this.props.area.onDragEnter(this.props.index);r.nativeEvent.dataTransfer.effectAllowed=i?"move":"none"},handleDragOver:function(r){r.preventDefault()},render:function(){let r="sortable-disabled";return this.props.dragging?r="sortable-dragging":this.props.draggable&&(r="sortable-enabled"),n("li",{draggable:this.props.draggable,className:[r,l.css(U.sortableListItem)].join(" "),onDragStart:this.handleDragStart,onDrop:this.handleDrop,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,children:this.props.component})}}),U=l.StyleSheet.create({sortableListItem:{margin:"5px 0"}}),{InfoTip:u}=T,A=["basic","trig","prealgebra","logarithms","basic relations","advanced relations"],E=({key:r})=>Number.parseInt(r??""),V=r=>{const i=[];r.forEach(e=>{i[E(e)]=!0});for(let e=0;e{const e=["value","form","simplify","considered","key"],t=["answerForms","buttonSets","functions","times","visibleLabel","ariaLabel"],s=this.props.answerForms.map(a=>g(a).pick(e));return w(this.props).set(["answerForms"],s).mod([],a=>g(a).pick(t)).freeze()},this.getSaveWarnings=()=>{const e=[];return this.props.answerForms.length===0?e.push("No answers specified"):(this.props.answerForms.some(s=>s.considered==="correct")||e.push("No correct answer specified"),g(this.props.answerForms).each((s,a)=>{if(this.props.value==="")e.push(`Answer ${a+1} is empty`);else{const h=N(s.value,{functions:this.props.functions});h.parsed?s.simplify&&!h.expr.isSimplified()&&e.push(`${s.value} isn't simplified, but is required" + " to be`):e.push(`Couldn't parse ${s.value}`)}})),e},this._newEmptyAnswerForm=()=>({considered:"correct",form:!1,key:V(this.props.answerForms),simplify:!1,value:""}),this.newAnswer=()=>{const e=this.props.answerForms.slice();e.push(this._newEmptyAnswerForm()),this.change({answerForms:e})},this.handleRemoveForm=e=>{const t=this.props.answerForms.slice();t.splice(e,1),this.change({answerForms:t})},this.updateForm=(e,t)=>{const s=w(this.props.answerForms).merge([e],t).freeze();this.change({answerForms:s})},this.handleReorder=e=>{const t=e.map(s=>{const a=g(s.props).pick("considered","form","simplify","value");return a.key=s.key,a});this.change({answerForms:t})},this.handleButtonSet=e=>{const s=A.filter(a=>this.props.buttonSets.includes(a)!==(a===e));this.props.onChange({buttonSets:s})},this.handleToggleDiv=()=>{let e,t;this.props.buttonSets.includes("basic+div")?(e="basic",t="basic+div"):(e="basic+div",t="basic");const s=this.props.buttonSets.filter(a=>a!==t).concat(e);this.change("buttonSets",s)},this.handleTexInsert=e=>{this.refs.expression.insert(e)},this.handleFunctions=e=>{this.setState({functionsInternal:e});const t={};t.functions=e.split(/[ ,]+/).filter(q),this.props.onChange(t)},this.state={functionsInternal:this.props.functions.join(" ")}}change(...i){return C.apply(this,i)}render(){const i=this.props.answerForms.map(s=>{const a=E(s),h={times:this.props.times,functions:this.props.functions,buttonSets:this.props.buttonSets,buttonsVisible:"focused",form:s.form,simplify:s.simplify,value:s.value,onChange:v=>this.updateForm(a,v),trackInteraction:()=>{},widgetId:this.props.widgetId+"-"+s.key};return w(s).merge([],{key:a,draggable:!0,onChange:v=>this.updateForm(Number.parseInt(s.key??""),v),onDelete:()=>this.handleRemoveForm(a),expressionProps:h}).freeze()}).map(s=>n(j,{...s},s.key)),e=n(z,{components:i,onReorder:this.handleReorder}),t=A.map(s=>{const a=s==="basic",h=this.props.buttonSets.includes(s)||a;return n(m,{label:s,checked:h,disabled:a,onChange:()=>this.handleButtonSet(s)},s)});return t.unshift(n(m,{label:"show ÷ button",checked:this.props.buttonSets.includes("basic+div"),onChange:this.handleToggleDiv},"show ÷ button")),c("div",{children:[n(k,{children:"Global Options"}),c("div",{className:l.css(o.paddedY),children:[n(S,{label:"Visible label",value:this.props.visibleLabel||"",onChange:this.change("visibleLabel")}),n(u,{children:n("p",{children:"Optional visible text; strongly encouraged to help learners using dictation software, but can be omitted if the surrounding content provides enough context."})})]}),c("div",{className:l.css(o.paddedY),children:[n(S,{label:"Aria label",value:this.props.ariaLabel||"",onChange:this.change("ariaLabel")}),n(u,{children:c("p",{children:["Label text that's read by screen readers. Highly recommend adding a label here to ensure your exercise is accessible. For more information on writting accessible labels, please see"," ",n("a",{href:"https://www.w3.org/WAI/tips/designing/#ensure-that-form-elements-include-clearly-associated-labels",target:"_blank",children:"this article."})]})})]}),c("div",{className:l.css(o.paddedY),children:[n(S,{label:"Function variables",value:this.state.functionsInternal,onChange:this.handleFunctions}),n(u,{children:n("p",{children:'Single-letter variables listed here will be interpreted as functions. This let us know that f(x) means "f of x" and not "f times x".'})})]}),c("div",{className:l.css(o.paddedY),children:[n(m,{label:"Use × instead of ⋅ for multiplication",checked:this.props.times,onChange:s=>{this.props.onChange({times:s})}}),n(u,{children:n("p",{children:"For pre-algebra problems this option displays multiplication as \\times instead of \\cdot in both the rendered output and the acceptable formats examples."})})]}),c("div",{className:l.css(o.paddedY),children:[n(L,{children:"Button Sets"}),t]}),n(k,{children:"Answers"}),n("p",{style:{margin:"4px 0"},children:"student responses area matched against these from top to bottom"}),e,n("div",{children:n(f,{size:"small",onClick:this.newAnswer,children:"Add new answer"})})]})}};b.widgetName="expression",b.defaultProps={answerForms:[],times:!1,buttonSets:["basic"],functions:["f","g","h"]};let x=b;const W=function(r,i){let e=r.indexOf(i);return e=(e+1)%r.length,r[e]};class j extends D.Component{constructor(){super(...arguments),this.state={deleteFocused:!1},this.change=(...i)=>C.apply(this,i),this.handleImSure=()=>{this.props.onDelete()},this.handleCancelDelete=()=>{this.setState({deleteFocused:!1})},this.handleDelete=()=>{this.setState({deleteFocused:!0})},this.toggleConsidered=()=>{const i=W(R,this.props.considered);this.change({considered:i})}}render(){const i=this.state.deleteFocused?c(I,{children:[n(f,{size:"small",onClick:this.handleImSure,color:"destructive",children:"I'm sure!"}),n(O,{size:p.small_12}),n(f,{size:"small",onClick:this.handleCancelDelete,light:!0,children:"Cancel"})]}):n(f,{size:"small",onClick:this.handleDelete,color:"destructive",light:!0,children:"Delete"}),e=l.css(o.answerStatus,this.props.considered==="wrong"&&o.answerStatusWrong,this.props.considered==="correct"&&o.answerStatusCorrect,this.props.considered==="ungraded"&&o.answerStatusUngraded);return c("div",{className:l.css(o.answerOption),children:[n("div",{className:l.css(o.answerHandle)}),c("div",{className:l.css(o.answerBody),children:[c("div",{children:[n("button",{onClick:this.toggleConsidered,className:e,children:this.props.considered}),n("div",{children:n(_,{...this.props.expressionProps})})]}),c("div",{className:l.css(o.paddedY,o.paddedX),children:[n(m,{label:"Answer expression must have the same form.",checked:this.props.form,onChange:t=>{this.props.onChange({form:t})}}),n(u,{children:n("p",{children:"The student's answer must be in the same form. Commutativity and excess negative signs are ignored."})})]}),c("div",{className:l.css(o.paddedY,o.paddedX),children:[n(m,{label:"Answer expression must be fully expanded and simplified.",checked:this.props.simplify,onChange:t=>{this.props.onChange({simplify:t})}}),n(u,{children:n("p",{children:`The student's answer must be fully expanded and simplified. Answering this equation (x^2+2x+1) with this factored equation (x+1)^2 will render this response "Your answer is not fully expanded and simplified."`})})]}),n("div",{className:l.css(o.buttonRow,o.paddedY),children:i})]})]})}}const o=l.StyleSheet.create({paddedX:{paddingLeft:p.xSmall_8,paddingRight:p.xSmall_8},paddedY:{paddingTop:p.xxSmall_6,paddingBottom:p.xxSmall_6},answerOption:{border:"1px solid #ddd",borderRadius:"3px",display:"flex"},answerHandle:{background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) no-repeat 50% 50%",borderRight:"1px solid #ddd",cursor:"move",width:"20px",minWidth:"20px"},answerStatus:{border:"none",userSelect:"none",width:"100px",paddingTop:p.small_12,paddingBottom:p.small_12},answerStatusWrong:{backgroundColor:y.fadedRed16},answerStatusCorrect:{backgroundColor:y.fadedGreen16},answerStatusUngraded:{backgroundColor:y.fadedBlue16},answerBody:{},buttonRow:{display:"flex"}});x.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"_newEmptyAnswerForm",docblock:null,modifiers:[],params:[],returns:null},{name:"newAnswer",docblock:null,modifiers:[],params:[],returns:null},{name:"handleRemoveForm",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null}],returns:null},{name:"updateForm",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"props",optional:!1,type:null}],returns:null},{name:"handleReorder",docblock:null,modifiers:[],params:[{name:"components",optional:!1,type:null}],returns:null},{name:"handleButtonSet",docblock:null,modifiers:[],params:[{name:"changingName",optional:!1,type:null}],returns:null},{name:"handleToggleDiv",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTexInsert",docblock:null,modifiers:[],params:[{name:"str",optional:!1,type:null}],returns:null},{name:"handleFunctions",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null}],displayName:"ExpressionEditor",props:{widgetId:{required:!1,tsType:{name:"any"},description:""},value:{required:!1,tsType:{name:"string"},description:""},answerForms:{defaultValue:{value:"[]",computed:!1},required:!1},times:{defaultValue:{value:"false",computed:!1},required:!1},buttonSets:{defaultValue:{value:'["basic"]',computed:!1},required:!1},functions:{defaultValue:{value:'["f", "g", "h"]',computed:!1},required:!1}}};export{x as E}; diff --git a/assets/expression-editor.stories-heyf0mwD.js b/assets/expression-editor.stories-eY-Wcqix.js similarity index 71% rename from assets/expression-editor.stories-heyf0mwD.js rename to assets/expression-editor.stories-eY-Wcqix.js index 6d5a13332f..4ef4a84356 100644 --- a/assets/expression-editor.stories-heyf0mwD.js +++ b/assets/expression-editor.stories-eY-Wcqix.js @@ -1,4 +1,4 @@ -import{j as i,a as c}from"./jsx-runtime-FVsy8kgq.js";import{l as p}from"./index-awljIyHI.js";import{r as u}from"./index-TT1qJ6UJ.js";import{R as g}from"./renderer-with-debug-ui-Ty_P7koE.js";import{E as l}from"./expression-editor-TOSGrK7r.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./components-V6aclUoQ.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";const nr={title:"PerseusEditor/Widgets/Expression Editor"};class f extends u.Component{constructor(e){super(e);const t=r.widgets["expression 1"].options;this.state={answerForms:t.answerForms,times:t.times,buttonSets:t.buttonSets,functions:t.functions}}mergeQuestionWithState(){return{...r,widgets:{...r.widgets,"expression 1":{...r.widgets["expression 1"],options:{...r.widgets["expression 1"].options,...this.state}}}}}render(){const e=Object.freeze({});return c("div",{className:p.css(m.wrapper),children:[i("div",{className:p.css(m.editorWrapper),children:i(l,{...this.state,onChange:t=>{this.setState({...t})}})}),i(g,{question:this.mergeQuestionWithState(),apiOptions:e,reviewMode:!0})]})}}const o=d=>i(f,{}),r={content:`This is a cool expression question +import{j as i,a as c}from"./jsx-runtime-FVsy8kgq.js";import{l as p}from"./index-awljIyHI.js";import{r as u}from"./index-TT1qJ6UJ.js";import{R as g}from"./renderer-with-debug-ui-DcZbZSiB.js";import{E as l}from"./expression-editor-qSSWTw9p.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./components-yT7oveOH.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";const nr={title:"PerseusEditor/Widgets/Expression Editor"};class f extends u.Component{constructor(e){super(e);const t=r.widgets["expression 1"].options;this.state={answerForms:t.answerForms,times:t.times,buttonSets:t.buttonSets,functions:t.functions}}mergeQuestionWithState(){return{...r,widgets:{...r.widgets,"expression 1":{...r.widgets["expression 1"],options:{...r.widgets["expression 1"].options,...this.state}}}}}render(){const e=Object.freeze({});return c("div",{className:p.css(m.wrapper),children:[i("div",{className:p.css(m.editorWrapper),children:i(l,{...this.state,onChange:t=>{this.setState({...t})}})}),i(g,{question:this.mergeQuestionWithState(),apiOptions:e,reviewMode:!0})]})}}const o=d=>i(f,{}),r={content:`This is a cool expression question [[☃ expression 1]] diff --git a/assets/expression.stories-xvO0oD0k.js b/assets/expression.stories-t4fnlBjg.js similarity index 85% rename from assets/expression.stories-xvO0oD0k.js rename to assets/expression.stories-t4fnlBjg.js index 58a9ded437..5a455a7d6b 100644 --- a/assets/expression.stories-xvO0oD0k.js +++ b/assets/expression.stories-t4fnlBjg.js @@ -1,4 +1,4 @@ -import{j as r,a as l}from"./jsx-runtime-FVsy8kgq.js";import{a as R}from"./mobile-keypad-wPUeR8mM.js";import"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./button-assets-txIojR3b.js";import{K as _}from"./enums-x5qaTru7.js";import{a as W}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as L}from"./server-item-renderer-with-debug-ui-Idt1fZew.js";import{T as M}from"./test-keypad-context-wrapper-3gH8DCC_.js";import{I as N,e as j}from"./article-renderer-GCz9idJ2.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./choice-I73s7vIV.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Dj-_XIAo.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./hints-renderer-PJ9GMfp4.js";import"./shared-4TdECMLk.js";import"./base-radio-13woGQGc.js";import"./choice-none-above-0_QL8uoF.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-VwVxZMGJ.js";import"./side-by-side-kGWaKY6T.js";import"./test-dependencies-zutb-QBJ.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-6SWUlni2.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";const c=(e,t)=>({question:{content:"[[☃ expression 1]]",images:{},widgets:{"expression 1":{type:"expression",graded:!0,options:e,version:t}}},answer:null,answerArea:Object.fromEntries(N.map(m=>[m,!1])),itemDataVersion:{major:0,minor:1},hints:[]});c({answerForms:[],times:!1,buttonSets:["basic"],functions:[],buttonsVisible:"always",ariaLabel:"Test aria label",visibleLabel:"Test visible label"},{major:1,minor:0});const D=c({answerForms:[{considered:"correct",form:!1,simplify:!1,value:"123-x"},{considered:"correct",form:!1,simplify:!1,value:"x-123"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"always"},{major:1,minor:0}),A={answerForms:[{considered:"ungraded",form:!1,simplify:!1,value:"x+1"},{considered:"wrong",form:!1,simplify:!1,value:"y+1"},{considered:"correct",form:!1,simplify:!1,value:"z+1"},{considered:"correct",form:!1,simplify:!1,value:"a+1"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"focused",visibleLabel:"number of cm",ariaLabel:"number of centimeters"},d=c(A,{major:1,minor:0}),n=({item:e,customKeypad:t,isMobile:m=!1})=>r(M,{children:r(R.Consumer,{children:({keypadElement:T})=>r(L,{item:e,keypadElement:T,apiOptions:{isMobile:m,customKeypad:t,onFocusChange:W("onFocusChange")}})})}),o=e=>{const t={keypadType:_.EXPRESSION,extraKeys:["x","y","z"]};return r("div",{style:{padding:"2rem"},children:r(j.widget,{alignment:null,value:"",visibleLabel:"",ariaLabel:"",containerSizeClass:"small",findWidgets:m=>[],isLastUsedWidget:!1,onChange:()=>{},problemNum:1,static:!1,trackInteraction:()=>{},widgetId:"expression",keypadConfiguration:t,reviewMode:!1})})},s=e=>r(n,{item:d,customKeypad:!1}),i=e=>l("div",{children:[l("p",{children:["MathInput uses touch events;"," ",r("a",{href:"https://developer.chrome.com/docs/devtools/device-mode/",children:"emulate mobile"})," ","to use the custom keypad."]}),r(n,{item:d,customKeypad:!0,isMobile:!0})]}),a=e=>r(n,{item:D,customKeypad:e.customKeypad}),p=e=>r(n,{item:d,customKeypad:e.customKeypad}),Lr={title:"Perseus/Widgets/Expression",argTypes:{customKeypad:{control:"boolean"}}};o.__docgenInfo={description:"",methods:[],displayName:"DesktopKitchenSink",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"Desktop",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};i.__docgenInfo={description:"",methods:[],displayName:"Mobile",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem2",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem3",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};var u,y,f;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r,a as l}from"./jsx-runtime-FVsy8kgq.js";import{a as R}from"./mobile-keypad-wPUeR8mM.js";import"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./button-assets-txIojR3b.js";import{K as _}from"./enums-x5qaTru7.js";import{a as W}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as L}from"./server-item-renderer-with-debug-ui-_MpsO46x.js";import{T as M}from"./test-keypad-context-wrapper-3gH8DCC_.js";import{I as N,e as j}from"./article-renderer-ub6lGcPc.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./choice-I73s7vIV.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-d8cZibFS.js";import"./multi-renderer-la0A-h33.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./hints-renderer-eYcfi__L.js";import"./shared-4TdECMLk.js";import"./base-radio-SM-baXgO.js";import"./choice-none-above-lqQAegUH.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-VwVxZMGJ.js";import"./side-by-side-kGWaKY6T.js";import"./test-dependencies-fGmEXWK4.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-VNdK7gMK.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";const c=(e,t)=>({question:{content:"[[☃ expression 1]]",images:{},widgets:{"expression 1":{type:"expression",graded:!0,options:e,version:t}}},answer:null,answerArea:Object.fromEntries(N.map(m=>[m,!1])),itemDataVersion:{major:0,minor:1},hints:[]});c({answerForms:[],times:!1,buttonSets:["basic"],functions:[],buttonsVisible:"always",ariaLabel:"Test aria label",visibleLabel:"Test visible label"},{major:1,minor:0});const D=c({answerForms:[{considered:"correct",form:!1,simplify:!1,value:"123-x"},{considered:"correct",form:!1,simplify:!1,value:"x-123"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"always"},{major:1,minor:0}),A={answerForms:[{considered:"ungraded",form:!1,simplify:!1,value:"x+1"},{considered:"wrong",form:!1,simplify:!1,value:"y+1"},{considered:"correct",form:!1,simplify:!1,value:"z+1"},{considered:"correct",form:!1,simplify:!1,value:"a+1"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"focused",visibleLabel:"number of cm",ariaLabel:"number of centimeters"},d=c(A,{major:1,minor:0}),n=({item:e,customKeypad:t,isMobile:m=!1})=>r(M,{children:r(R.Consumer,{children:({keypadElement:T})=>r(L,{item:e,keypadElement:T,apiOptions:{isMobile:m,customKeypad:t,onFocusChange:W("onFocusChange")}})})}),o=e=>{const t={keypadType:_.EXPRESSION,extraKeys:["x","y","z"]};return r("div",{style:{padding:"2rem"},children:r(j.widget,{alignment:null,value:"",visibleLabel:"",ariaLabel:"",containerSizeClass:"small",findWidgets:m=>[],isLastUsedWidget:!1,onChange:()=>{},problemNum:1,static:!1,trackInteraction:()=>{},widgetId:"expression",keypadConfiguration:t,reviewMode:!1})})},s=e=>r(n,{item:d,customKeypad:!1}),i=e=>l("div",{children:[l("p",{children:["MathInput uses touch events;"," ",r("a",{href:"https://developer.chrome.com/docs/devtools/device-mode/",children:"emulate mobile"})," ","to use the custom keypad."]}),r(n,{item:d,customKeypad:!0,isMobile:!0})]}),a=e=>r(n,{item:D,customKeypad:e.customKeypad}),p=e=>r(n,{item:d,customKeypad:e.customKeypad}),Lr={title:"Perseus/Widgets/Expression",argTypes:{customKeypad:{control:"boolean"}}};o.__docgenInfo={description:"",methods:[],displayName:"DesktopKitchenSink",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"Desktop",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};i.__docgenInfo={description:"",methods:[],displayName:"Mobile",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem2",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem3",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};var u,y,f;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const keypadConfiguration = { keypadType: KeypadType.EXPRESSION, extraKeys: (["x", "y", "z"] as Array) diff --git a/assets/fixed-to-responsive.stories-AjZdl-mI.js b/assets/fixed-to-responsive.stories-8DiLgWgI.js similarity index 98% rename from assets/fixed-to-responsive.stories-AjZdl-mI.js rename to assets/fixed-to-responsive.stories-8DiLgWgI.js index 20293e3e0d..b86870d282 100644 --- a/assets/fixed-to-responsive.stories-AjZdl-mI.js +++ b/assets/fixed-to-responsive.stories-8DiLgWgI.js @@ -1,4 +1,4 @@ -import{j as e,a as O}from"./jsx-runtime-FVsy8kgq.js";import{g as s}from"./dependencies-8XILypbq.js";import{F as r}from"./fixed-to-responsive-AkRQxH3P.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-dnMhQZ-1.js";import"./constants-iPV6vHZm.js";const a="https://www.khanacademy.org/images/ohnoes-concerned.svg",B="https://www.khanacademy.org/images/hand-tree.new.png",t=200,g=600,i=1024,n=1024,J={title:"Perseus/Components/Fixed to Responsive"},l=o=>e(r,{width:n,height:t,children:e("img",{alt:"",width:t,height:t,src:s().staticUrl(a)})}),d=o=>e(r,{width:n,height:g,children:e("img",{alt:"",width:g,height:g,src:s().staticUrl(a)})}),c=o=>e(r,{width:n,height:i,children:e("img",{alt:"",width:i,height:i,src:s().staticUrl(a)})}),m=o=>e(r,{width:n,height:t,children:e("img",{alt:"",width:i,height:i,src:s().staticUrl(a)})}),h=o=>O(r,{width:n,height:t,children:[e("img",{alt:"",width:t,height:t,src:B},1),e("img",{alt:"",width:t,height:t,src:s().staticUrl(a)},2)]}),p=o=>e(r,{width:n,height:i,constrainHeight:!0,children:e("img",{alt:"",width:i,height:i,src:s().staticUrl(a)})}),u=o=>e(r,{width:n,height:g,allowFullBleed:!0,children:e("img",{alt:"",width:g,height:g,src:s().staticUrl(a)})});l.__docgenInfo={description:"",methods:[],displayName:"SmallImageWithSmallContainer"};d.__docgenInfo={description:"",methods:[],displayName:"SmallImageWithMediumContainer"};c.__docgenInfo={description:"",methods:[],displayName:"LargeImageWithLargeContainer"};m.__docgenInfo={description:"",methods:[],displayName:"LargeImageWithSmallerContainer"};h.__docgenInfo={description:"",methods:[],displayName:"TwoOverlayedImagesInsteadOneResponsiveContainer"};p.__docgenInfo={description:"",methods:[],displayName:"HeightConstrainingAnImage"};u.__docgenInfo={description:"",methods:[],displayName:"AllowingFullBleed"};var w,S,R;l.parameters={...l.parameters,docs:{...(w=l.parameters)==null?void 0:w.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as e,a as O}from"./jsx-runtime-FVsy8kgq.js";import{g as s}from"./dependencies-d8cZibFS.js";import{F as r}from"./fixed-to-responsive-AkRQxH3P.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-dnMhQZ-1.js";import"./constants-iPV6vHZm.js";const a="https://www.khanacademy.org/images/ohnoes-concerned.svg",B="https://www.khanacademy.org/images/hand-tree.new.png",t=200,g=600,i=1024,n=1024,J={title:"Perseus/Components/Fixed to Responsive"},l=o=>e(r,{width:n,height:t,children:e("img",{alt:"",width:t,height:t,src:s().staticUrl(a)})}),d=o=>e(r,{width:n,height:g,children:e("img",{alt:"",width:g,height:g,src:s().staticUrl(a)})}),c=o=>e(r,{width:n,height:i,children:e("img",{alt:"",width:i,height:i,src:s().staticUrl(a)})}),m=o=>e(r,{width:n,height:t,children:e("img",{alt:"",width:i,height:i,src:s().staticUrl(a)})}),h=o=>O(r,{width:n,height:t,children:[e("img",{alt:"",width:t,height:t,src:B},1),e("img",{alt:"",width:t,height:t,src:s().staticUrl(a)},2)]}),p=o=>e(r,{width:n,height:i,constrainHeight:!0,children:e("img",{alt:"",width:i,height:i,src:s().staticUrl(a)})}),u=o=>e(r,{width:n,height:g,allowFullBleed:!0,children:e("img",{alt:"",width:g,height:g,src:s().staticUrl(a)})});l.__docgenInfo={description:"",methods:[],displayName:"SmallImageWithSmallContainer"};d.__docgenInfo={description:"",methods:[],displayName:"SmallImageWithMediumContainer"};c.__docgenInfo={description:"",methods:[],displayName:"LargeImageWithLargeContainer"};m.__docgenInfo={description:"",methods:[],displayName:"LargeImageWithSmallerContainer"};h.__docgenInfo={description:"",methods:[],displayName:"TwoOverlayedImagesInsteadOneResponsiveContainer"};p.__docgenInfo={description:"",methods:[],displayName:"HeightConstrainingAnImage"};u.__docgenInfo={description:"",methods:[],displayName:"AllowingFullBleed"};var w,S,R;l.parameters={...l.parameters,docs:{...(w=l.parameters)==null?void 0:w.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/flags-for-api-options-FcV02OR3.js b/assets/flags-for-api-options-eINmxSCP.js similarity index 61% rename from assets/flags-for-api-options-FcV02OR3.js rename to assets/flags-for-api-options-eINmxSCP.js index 57aca26b38..0f538d6b63 100644 --- a/assets/flags-for-api-options-FcV02OR3.js +++ b/assets/flags-for-api-options-eINmxSCP.js @@ -1 +1 @@ -import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as t}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";const r={mafs:{angle:!0,segment:!0,circle:!0,quadratic:!0,sinusoid:!0,polygon:!0,linear:!0,"linear-system":!0,ray:!0,point:!0,none:!0,"interactive-graph-locked-features-labels":!0,"locked-figures-aria":!0,"locked-point-labels":!0,"locked-line-labels":!0,"locked-vector-labels":!0,"locked-ellipse-labels":!0,"locked-polygon-labels":!0,"locked-function-labels":!0}},z={...t.defaults,flags:{...t.defaults.flags,...r}};export{z as a,r as f}; +import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import{A as t}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";const r={mafs:{angle:!0,segment:!0,circle:!0,quadratic:!0,sinusoid:!0,polygon:!0,linear:!0,"linear-system":!0,ray:!0,point:!0,none:!0,"interactive-graph-locked-features-labels":!0,"locked-figures-aria":!0,"locked-point-labels":!0,"locked-line-labels":!0,"locked-vector-labels":!0,"locked-ellipse-labels":!0,"locked-polygon-labels":!0,"locked-function-labels":!0}},z={...t.defaults,flags:{...t.defaults.flags,...r}};export{z as a,r as f}; diff --git a/assets/formatter-SWP5E3XI-qCqZhePw.js b/assets/formatter-SWP5E3XI-IcSeFhu6.js similarity index 99% rename from assets/formatter-SWP5E3XI-qCqZhePw.js rename to assets/formatter-SWP5E3XI-IcSeFhu6.js index d1f0ca04cb..ea344638ba 100644 --- a/assets/formatter-SWP5E3XI-qCqZhePw.js +++ b/assets/formatter-SWP5E3XI-IcSeFhu6.js @@ -1,4 +1,4 @@ -import{_ as ea,m as pl,b as ta}from"./DocsRenderer-NNNQARDV-s8P9JC76.js";import"./iframe-_HOM8AA9.js";import"../sb-preview/runtime.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-18-N0svEjlN.js";import"./client-rbWgHzHN.js";import"./index-7vsPyIck.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./bundle.esm-7jAAHVxW.js";import"./index-ogXoivrg.js";import"./_getPrototype-bjD8Yebc.js";import"./index-PPLHz8o0.js";var cl=ta({"node_modules/prettier/parser-html.js"(Jr,Xr){(function(Ae){if(typeof Jr=="object"&&typeof Xr=="object")Xr.exports=Ae();else if(typeof define=="function"&&define.amd)define(Ae);else{var Yt=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};Yt.prettierPlugins=Yt.prettierPlugins||{},Yt.prettierPlugins.html=Ae()}})(function(){var Ae=(ot,Ne)=>()=>(Ne||ot((Ne={exports:{}}).exports,Ne),Ne.exports),Yt=Ae((ot,Ne)=>{var Se=function(Oe){return Oe&&Oe.Math==Math&&Oe};Ne.exports=Se(typeof globalThis=="object"&&globalThis)||Se(typeof window=="object"&&window)||Se(typeof self=="object"&&self)||Se(typeof global=="object"&&global)||function(){return this}()||Function("return this")()}),hr=Ae((ot,Ne)=>{Ne.exports=function(Se){try{return!!Se()}catch{return!0}}}),br=Ae((ot,Ne)=>{var Se=hr();Ne.exports=!Se(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),Hr=Ae((ot,Ne)=>{var Se=hr();Ne.exports=!Se(function(){var Oe=(function(){}).bind();return typeof Oe!="function"||Oe.hasOwnProperty("prototype")})}),gr=Ae((ot,Ne)=>{var Se=Hr(),Oe=Function.prototype.call;Ne.exports=Se?Oe.bind(Oe):function(){return Oe.apply(Oe,arguments)}}),Dn=Ae(ot=>{var Ne={}.propertyIsEnumerable,Se=Object.getOwnPropertyDescriptor,Oe=Se&&!Ne.call({1:2},1);ot.f=Oe?function(ee){var V=Se(this,ee);return!!V&&V.enumerable}:Ne}),Lr=Ae((ot,Ne)=>{Ne.exports=function(Se,Oe){return{enumerable:!(Se&1),configurable:!(Se&2),writable:!(Se&4),value:Oe}}}),Dr=Ae((ot,Ne)=>{var Se=Hr(),Oe=Function.prototype,ee=Oe.call,V=Se&&Oe.bind.bind(ee,ee);Ne.exports=Se?V:function(W){return function(){return ee.apply(W,arguments)}}}),Br=Ae((ot,Ne)=>{var Se=Dr(),Oe=Se({}.toString),ee=Se("".slice);Ne.exports=function(V){return ee(Oe(V),8,-1)}}),Zr=Ae((ot,Ne)=>{var Se=Dr(),Oe=hr(),ee=Br(),V=Object,W=Se("".split);Ne.exports=Oe(function(){return!V("z").propertyIsEnumerable(0)})?function(Z){return ee(Z)=="String"?W(Z,""):V(Z)}:V}),nn=Ae((ot,Ne)=>{Ne.exports=function(Se){return Se==null}}),qn=Ae((ot,Ne)=>{var Se=nn(),Oe=TypeError;Ne.exports=function(ee){if(Se(ee))throw Oe("Can't call method on "+ee);return ee}}),dn=Ae((ot,Ne)=>{var Se=Zr(),Oe=qn();Ne.exports=function(ee){return Se(Oe(ee))}}),Vn=Ae((ot,Ne)=>{var Se=typeof document=="object"&&document.all,Oe=typeof Se>"u"&&Se!==void 0;Ne.exports={all:Se,IS_HTMLDDA:Oe}}),dr=Ae((ot,Ne)=>{var Se=Vn(),Oe=Se.all;Ne.exports=Se.IS_HTMLDDA?function(ee){return typeof ee=="function"||ee===Oe}:function(ee){return typeof ee=="function"}}),Or=Ae((ot,Ne)=>{var Se=dr(),Oe=Vn(),ee=Oe.all;Ne.exports=Oe.IS_HTMLDDA?function(V){return typeof V=="object"?V!==null:Se(V)||V===ee}:function(V){return typeof V=="object"?V!==null:Se(V)}}),un=Ae((ot,Ne)=>{var Se=Yt(),Oe=dr(),ee=function(V){return Oe(V)?V:void 0};Ne.exports=function(V,W){return arguments.length<2?ee(Se[V]):Se[V]&&Se[V][W]}}),Un=Ae((ot,Ne)=>{var Se=Dr();Ne.exports=Se({}.isPrototypeOf)}),ii=Ae((ot,Ne)=>{var Se=un();Ne.exports=Se("navigator","userAgent")||""}),si=Ae((ot,Ne)=>{var Se=Yt(),Oe=ii(),ee=Se.process,V=Se.Deno,W=ee&&ee.versions||V&&V.version,Z=W&&W.v8,Y,ne;Z&&(Y=Z.split("."),ne=Y[0]>0&&Y[0]<4?1:+(Y[0]+Y[1])),!ne&&Oe&&(Y=Oe.match(/Edge\/(\d+)/),(!Y||Y[1]>=74)&&(Y=Oe.match(/Chrome\/(\d+)/),Y&&(ne=+Y[1]))),Ne.exports=ne}),Gn=Ae((ot,Ne)=>{var Se=si(),Oe=hr();Ne.exports=!!Object.getOwnPropertySymbols&&!Oe(function(){var ee=Symbol();return!String(ee)||!(Object(ee)instanceof Symbol)||!Symbol.sham&&Se&&Se<41})}),Jn=Ae((ot,Ne)=>{var Se=Gn();Ne.exports=Se&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),Xn=Ae((ot,Ne)=>{var Se=un(),Oe=dr(),ee=Un(),V=Jn(),W=Object;Ne.exports=V?function(Z){return typeof Z=="symbol"}:function(Z){var Y=Se("Symbol");return Oe(Y)&&ee(Y.prototype,W(Z))}}),fn=Ae((ot,Ne)=>{var Se=String;Ne.exports=function(Oe){try{return Se(Oe)}catch{return"Object"}}}),sn=Ae((ot,Ne)=>{var Se=dr(),Oe=fn(),ee=TypeError;Ne.exports=function(V){if(Se(V))return V;throw ee(Oe(V)+" is not a function")}}),mn=Ae((ot,Ne)=>{var Se=sn(),Oe=nn();Ne.exports=function(ee,V){var W=ee[V];return Oe(W)?void 0:Se(W)}}),ai=Ae((ot,Ne)=>{var Se=gr(),Oe=dr(),ee=Or(),V=TypeError;Ne.exports=function(W,Z){var Y,ne;if(Z==="string"&&Oe(Y=W.toString)&&!ee(ne=Se(Y,W))||Oe(Y=W.valueOf)&&!ee(ne=Se(Y,W))||Z!=="string"&&Oe(Y=W.toString)&&!ee(ne=Se(Y,W)))return ne;throw V("Can't convert object to primitive value")}}),oi=Ae((ot,Ne)=>{Ne.exports=!1}),hn=Ae((ot,Ne)=>{var Se=Yt(),Oe=Object.defineProperty;Ne.exports=function(ee,V){try{Oe(Se,ee,{value:V,configurable:!0,writable:!0})}catch{Se[ee]=V}return V}}),gn=Ae((ot,Ne)=>{var Se=Yt(),Oe=hn(),ee="__core-js_shared__",V=Se[ee]||Oe(ee,{});Ne.exports=V}),Wn=Ae((ot,Ne)=>{var Se=oi(),Oe=gn();(Ne.exports=function(ee,V){return Oe[ee]||(Oe[ee]=V!==void 0?V:{})})("versions",[]).push({version:"3.26.1",mode:Se?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})}),Sn=Ae((ot,Ne)=>{var Se=qn(),Oe=Object;Ne.exports=function(ee){return Oe(Se(ee))}}),kr=Ae((ot,Ne)=>{var Se=Dr(),Oe=Sn(),ee=Se({}.hasOwnProperty);Ne.exports=Object.hasOwn||function(V,W){return ee(Oe(V),W)}}),zn=Ae((ot,Ne)=>{var Se=Dr(),Oe=0,ee=Math.random(),V=Se(1 .toString);Ne.exports=function(W){return"Symbol("+(W===void 0?"":W)+")_"+V(++Oe+ee,36)}}),$r=Ae((ot,Ne)=>{var Se=Yt(),Oe=Wn(),ee=kr(),V=zn(),W=Gn(),Z=Jn(),Y=Oe("wks"),ne=Se.Symbol,Fe=ne&&ne.for,je=Z?ne:ne&&ne.withoutSetter||V;Ne.exports=function(he){if(!ee(Y,he)||!(W||typeof Y[he]=="string")){var qe="Symbol."+he;W&&ee(ne,he)?Y[he]=ne[he]:Z&&Fe?Y[he]=Fe(qe):Y[he]=je(qe)}return Y[he]}}),li=Ae((ot,Ne)=>{var Se=gr(),Oe=Or(),ee=Xn(),V=mn(),W=ai(),Z=$r(),Y=TypeError,ne=Z("toPrimitive");Ne.exports=function(Fe,je){if(!Oe(Fe)||ee(Fe))return Fe;var he=V(Fe,ne),qe;if(he){if(je===void 0&&(je="default"),qe=Se(he,Fe,je),!Oe(qe)||ee(qe))return qe;throw Y("Can't convert object to primitive value")}return je===void 0&&(je="number"),W(Fe,je)}}),yn=Ae((ot,Ne)=>{var Se=li(),Oe=Xn();Ne.exports=function(ee){var V=Se(ee,"string");return Oe(V)?V:V+""}}),pi=Ae((ot,Ne)=>{var Se=Yt(),Oe=Or(),ee=Se.document,V=Oe(ee)&&Oe(ee.createElement);Ne.exports=function(W){return V?ee.createElement(W):{}}}),Hn=Ae((ot,Ne)=>{var Se=br(),Oe=hr(),ee=pi();Ne.exports=!Se&&!Oe(function(){return Object.defineProperty(ee("div"),"a",{get:function(){return 7}}).a!=7})}),Yn=Ae(ot=>{var Ne=br(),Se=gr(),Oe=Dn(),ee=Lr(),V=dn(),W=yn(),Z=kr(),Y=Hn(),ne=Object.getOwnPropertyDescriptor;ot.f=Ne?ne:function(Fe,je){if(Fe=V(Fe),je=W(je),Y)try{return ne(Fe,je)}catch{}if(Z(Fe,je))return ee(!Se(Oe.f,Fe,je),Fe[je])}}),ci=Ae((ot,Ne)=>{var Se=br(),Oe=hr();Ne.exports=Se&&Oe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})}),Wr=Ae((ot,Ne)=>{var Se=Or(),Oe=String,ee=TypeError;Ne.exports=function(V){if(Se(V))return V;throw ee(Oe(V)+" is not an object")}}),en=Ae(ot=>{var Ne=br(),Se=Hn(),Oe=ci(),ee=Wr(),V=yn(),W=TypeError,Z=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,ne="enumerable",Fe="configurable",je="writable";ot.f=Ne?Oe?function(he,qe,et){if(ee(he),qe=V(qe),ee(et),typeof he=="function"&&qe==="prototype"&&"value"in et&&je in et&&!et[je]){var Ze=Y(he,qe);Ze&&Ze[je]&&(he[qe]=et.value,et={configurable:Fe in et?et[Fe]:Ze[Fe],enumerable:ne in et?et[ne]:Ze[ne],writable:!1})}return Z(he,qe,et)}:Z:function(he,qe,et){if(ee(he),qe=V(qe),ee(et),Se)try{return Z(he,qe,et)}catch{}if("get"in et||"set"in et)throw W("Accessors not supported");return"value"in et&&(he[qe]=et.value),he}}),Kn=Ae((ot,Ne)=>{var Se=br(),Oe=en(),ee=Lr();Ne.exports=Se?function(V,W,Z){return Oe.f(V,W,ee(1,Z))}:function(V,W,Z){return V[W]=Z,V}}),Di=Ae((ot,Ne)=>{var Se=br(),Oe=kr(),ee=Function.prototype,V=Se&&Object.getOwnPropertyDescriptor,W=Oe(ee,"name"),Z=W&&(function(){}).name==="something",Y=W&&(!Se||Se&&V(ee,"name").configurable);Ne.exports={EXISTS:W,PROPER:Z,CONFIGURABLE:Y}}),Qn=Ae((ot,Ne)=>{var Se=Dr(),Oe=dr(),ee=gn(),V=Se(Function.toString);Oe(ee.inspectSource)||(ee.inspectSource=function(W){return V(W)}),Ne.exports=ee.inspectSource}),di=Ae((ot,Ne)=>{var Se=Yt(),Oe=dr(),ee=Se.WeakMap;Ne.exports=Oe(ee)&&/native code/.test(String(ee))}),fi=Ae((ot,Ne)=>{var Se=Wn(),Oe=zn(),ee=Se("keys");Ne.exports=function(V){return ee[V]||(ee[V]=Oe(V))}}),Zn=Ae((ot,Ne)=>{Ne.exports={}}),mi=Ae((ot,Ne)=>{var Se=di(),Oe=Yt(),ee=Or(),V=Kn(),W=kr(),Z=gn(),Y=fi(),ne=Zn(),Fe="Object already initialized",je=Oe.TypeError,he=Oe.WeakMap,qe,et,Ze,nt=function(At){return Ze(At)?et(At):qe(At,{})},rt=function(At){return function(Lt){var qt;if(!ee(Lt)||(qt=et(Lt)).type!==At)throw je("Incompatible receiver, "+At+" required");return qt}};Se||Z.state?($=Z.state||(Z.state=new he),$.get=$.get,$.has=$.has,$.set=$.set,qe=function(At,Lt){if($.has(At))throw je(Fe);return Lt.facade=At,$.set(At,Lt),Lt},et=function(At){return $.get(At)||{}},Ze=function(At){return $.has(At)}):(Ft=Y("state"),ne[Ft]=!0,qe=function(At,Lt){if(W(At,Ft))throw je(Fe);return Lt.facade=At,V(At,Ft,Lt),Lt},et=function(At){return W(At,Ft)?At[Ft]:{}},Ze=function(At){return W(At,Ft)});var $,Ft;Ne.exports={set:qe,get:et,has:Ze,enforce:nt,getterFor:rt}}),gu=Ae((ot,Ne)=>{var Se=hr(),Oe=dr(),ee=kr(),V=br(),W=Di().CONFIGURABLE,Z=Qn(),Y=mi(),ne=Y.enforce,Fe=Y.get,je=Object.defineProperty,he=V&&!Se(function(){return je(function(){},"length",{value:8}).length!==8}),qe=String(String).split("String"),et=Ne.exports=function(Ze,nt,rt){String(nt).slice(0,7)==="Symbol("&&(nt="["+String(nt).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),rt&&rt.getter&&(nt="get "+nt),rt&&rt.setter&&(nt="set "+nt),(!ee(Ze,"name")||W&&Ze.name!==nt)&&(V?je(Ze,"name",{value:nt,configurable:!0}):Ze.name=nt),he&&rt&&ee(rt,"arity")&&Ze.length!==rt.arity&&je(Ze,"length",{value:rt.arity});try{rt&&ee(rt,"constructor")&&rt.constructor?V&&je(Ze,"prototype",{writable:!1}):Ze.prototype&&(Ze.prototype=void 0)}catch{}var $=ne(Ze);return ee($,"source")||($.source=qe.join(typeof nt=="string"?nt:"")),Ze};Function.prototype.toString=et(function(){return Oe(this)&&Fe(this).source||Z(this)},"toString")}),hi=Ae((ot,Ne)=>{var Se=dr(),Oe=en(),ee=gu(),V=hn();Ne.exports=function(W,Z,Y,ne){ne||(ne={});var Fe=ne.enumerable,je=ne.name!==void 0?ne.name:Z;if(Se(Y)&&ee(Y,je,ne),ne.global)Fe?W[Z]=Y:V(Z,Y);else{try{ne.unsafe?W[Z]&&(Fe=!0):delete W[Z]}catch{}Fe?W[Z]=Y:Oe.f(W,Z,{value:Y,enumerable:!1,configurable:!ne.nonConfigurable,writable:!ne.nonWritable})}return W}}),gi=Ae((ot,Ne)=>{var Se=Math.ceil,Oe=Math.floor;Ne.exports=Math.trunc||function(ee){var V=+ee;return(V>0?Oe:Se)(V)}}),xn=Ae((ot,Ne)=>{var Se=gi();Ne.exports=function(Oe){var ee=+Oe;return ee!==ee||ee===0?0:Se(ee)}}),yi=Ae((ot,Ne)=>{var Se=xn(),Oe=Math.max,ee=Math.min;Ne.exports=function(V,W){var Z=Se(V);return Z<0?Oe(Z+W,0):ee(Z,W)}}),Ei=Ae((ot,Ne)=>{var Se=xn(),Oe=Math.min;Ne.exports=function(ee){return ee>0?Oe(Se(ee),9007199254740991):0}}),tn=Ae((ot,Ne)=>{var Se=Ei();Ne.exports=function(Oe){return Se(Oe.length)}}),Ci=Ae((ot,Ne)=>{var Se=dn(),Oe=yi(),ee=tn(),V=function(W){return function(Z,Y,ne){var Fe=Se(Z),je=ee(Fe),he=Oe(ne,je),qe;if(W&&Y!=Y){for(;je>he;)if(qe=Fe[he++],qe!=qe)return!0}else for(;je>he;he++)if((W||he in Fe)&&Fe[he]===Y)return W||he||0;return!W&&-1}};Ne.exports={includes:V(!0),indexOf:V(!1)}}),Fi=Ae((ot,Ne)=>{var Se=Dr(),Oe=kr(),ee=dn(),V=Ci().indexOf,W=Zn(),Z=Se([].push);Ne.exports=function(Y,ne){var Fe=ee(Y),je=0,he=[],qe;for(qe in Fe)!Oe(W,qe)&&Oe(Fe,qe)&&Z(he,qe);for(;ne.length>je;)Oe(Fe,qe=ne[je++])&&(~V(he,qe)||Z(he,qe));return he}}),Ai=Ae((ot,Ne)=>{Ne.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),vi=Ae(ot=>{var Ne=Fi(),Se=Ai(),Oe=Se.concat("length","prototype");ot.f=Object.getOwnPropertyNames||function(ee){return Ne(ee,Oe)}}),bi=Ae(ot=>{ot.f=Object.getOwnPropertySymbols}),Si=Ae((ot,Ne)=>{var Se=un(),Oe=Dr(),ee=vi(),V=bi(),W=Wr(),Z=Oe([].concat);Ne.exports=Se("Reflect","ownKeys")||function(Y){var ne=ee.f(W(Y)),Fe=V.f;return Fe?Z(ne,Fe(Y)):ne}}),xi=Ae((ot,Ne)=>{var Se=kr(),Oe=Si(),ee=Yn(),V=en();Ne.exports=function(W,Z,Y){for(var ne=Oe(Z),Fe=V.f,je=ee.f,he=0;he{var Se=hr(),Oe=dr(),ee=/#|\.prototype\./,V=function(Fe,je){var he=Z[W(Fe)];return he==ne?!0:he==Y?!1:Oe(je)?Se(je):!!je},W=V.normalize=function(Fe){return String(Fe).replace(ee,".").toLowerCase()},Z=V.data={},Y=V.NATIVE="N",ne=V.POLYFILL="P";Ne.exports=V}),an=Ae((ot,Ne)=>{var Se=Yt(),Oe=Yn().f,ee=Kn(),V=hi(),W=hn(),Z=xi(),Y=Ti();Ne.exports=function(ne,Fe){var je=ne.target,he=ne.global,qe=ne.stat,et,Ze,nt,rt,$,Ft;if(he?Ze=Se:qe?Ze=Se[je]||W(je,{}):Ze=(Se[je]||{}).prototype,Ze)for(nt in Fe){if($=Fe[nt],ne.dontCallGetSet?(Ft=Oe(Ze,nt),rt=Ft&&Ft.value):rt=Ze[nt],et=Y(he?nt:je+(qe?".":"#")+nt,ne.forced),!et&&rt!==void 0){if(typeof $==typeof rt)continue;Z($,rt)}(ne.sham||rt&&rt.sham)&&ee($,"sham",!0),V(Ze,nt,$,ne)}}}),yu=Ae(()=>{var ot=an(),Ne=Yt();ot({global:!0,forced:Ne.globalThis!==Ne},{globalThis:Ne})}),Bi=Ae(()=>{yu()}),Eu=Ae((ot,Ne)=>{var Se=Br();Ne.exports=Array.isArray||function(Oe){return Se(Oe)=="Array"}}),Cu=Ae((ot,Ne)=>{var Se=TypeError,Oe=9007199254740991;Ne.exports=function(ee){if(ee>Oe)throw Se("Maximum allowed index exceeded");return ee}}),Fu=Ae((ot,Ne)=>{var Se=Br(),Oe=Dr();Ne.exports=function(ee){if(Se(ee)==="Function")return Oe(ee)}}),Au=Ae((ot,Ne)=>{var Se=Fu(),Oe=sn(),ee=Hr(),V=Se(Se.bind);Ne.exports=function(W,Z){return Oe(W),Z===void 0?W:ee?V(W,Z):function(){return W.apply(Z,arguments)}}}),vu=Ae((ot,Ne)=>{var Se=Eu(),Oe=tn(),ee=Cu(),V=Au(),W=function(Z,Y,ne,Fe,je,he,qe,et){for(var Ze=je,nt=0,rt=qe?V(qe,et):!1,$,Ft;nt0&&Se($)?(Ft=Oe($),Ze=W(Z,Y,$,Ft,Ze,he-1)-1):(ee(Ze+1),Z[Ze]=$),Ze++),nt++;return Ze};Ne.exports=W}),wi=Ae((ot,Ne)=>{var Se=$r(),Oe=Se("toStringTag"),ee={};ee[Oe]="z",Ne.exports=String(ee)==="[object z]"}),bu=Ae((ot,Ne)=>{var Se=wi(),Oe=dr(),ee=Br(),V=$r(),W=V("toStringTag"),Z=Object,Y=ee(function(){return arguments}())=="Arguments",ne=function(Fe,je){try{return Fe[je]}catch{}};Ne.exports=Se?ee:function(Fe){var je,he,qe;return Fe===void 0?"Undefined":Fe===null?"Null":typeof(he=ne(je=Z(Fe),W))=="string"?he:Y?ee(je):(qe=ee(je))=="Object"&&Oe(je.callee)?"Arguments":qe}}),Su=Ae((ot,Ne)=>{var Se=Dr(),Oe=hr(),ee=dr(),V=bu(),W=un(),Z=Qn(),Y=function(){},ne=[],Fe=W("Reflect","construct"),je=/^\s*(?:class|function)\b/,he=Se(je.exec),qe=!je.exec(Y),et=function(nt){if(!ee(nt))return!1;try{return Fe(Y,ne,nt),!0}catch{return!1}},Ze=function(nt){if(!ee(nt))return!1;switch(V(nt)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return qe||!!he(je,Z(nt))}catch{return!0}};Ze.sham=!0,Ne.exports=!Fe||Oe(function(){var nt;return et(et.call)||!et(Object)||!et(function(){nt=!0})||nt})?Ze:et}),Ni=Ae((ot,Ne)=>{var Se=Eu(),Oe=Su(),ee=Or(),V=$r(),W=V("species"),Z=Array;Ne.exports=function(Y){var ne;return Se(Y)&&(ne=Y.constructor,Oe(ne)&&(ne===Z||Se(ne.prototype))?ne=void 0:ee(ne)&&(ne=ne[W],ne===null&&(ne=void 0))),ne===void 0?Z:ne}}),xu=Ae((ot,Ne)=>{var Se=Ni();Ne.exports=function(Oe,ee){return new(Se(Oe))(ee===0?0:ee)}}),_i=Ae(()=>{var ot=an(),Ne=vu(),Se=sn(),Oe=Sn(),ee=tn(),V=xu();ot({target:"Array",proto:!0},{flatMap:function(W){var Z=Oe(this),Y=ee(Z),ne;return Se(W),ne=V(Z,0),ne.length=Ne(ne,Z,Z,Y,0,1,W,arguments.length>1?arguments[1]:void 0),ne}})}),eu=Ae((ot,Ne)=>{Ne.exports={}}),ki=Ae((ot,Ne)=>{var Se=$r(),Oe=eu(),ee=Se("iterator"),V=Array.prototype;Ne.exports=function(W){return W!==void 0&&(Oe.Array===W||V[ee]===W)}}),Tu=Ae((ot,Ne)=>{var Se=bu(),Oe=mn(),ee=nn(),V=eu(),W=$r(),Z=W("iterator");Ne.exports=function(Y){if(!ee(Y))return Oe(Y,Z)||Oe(Y,"@@iterator")||V[Se(Y)]}}),Pi=Ae((ot,Ne)=>{var Se=gr(),Oe=sn(),ee=Wr(),V=fn(),W=Tu(),Z=TypeError;Ne.exports=function(Y,ne){var Fe=arguments.length<2?W(Y):ne;if(Oe(Fe))return ee(Se(Fe,Y));throw Z(V(Y)+" is not iterable")}}),Ii=Ae((ot,Ne)=>{var Se=gr(),Oe=Wr(),ee=mn();Ne.exports=function(V,W,Z){var Y,ne;Oe(V);try{if(Y=ee(V,"return"),!Y){if(W==="throw")throw Z;return Z}Y=Se(Y,V)}catch(Fe){ne=!0,Y=Fe}if(W==="throw")throw Z;if(ne)throw Y;return Oe(Y),Z}}),ji=Ae((ot,Ne)=>{var Se=Au(),Oe=gr(),ee=Wr(),V=fn(),W=ki(),Z=tn(),Y=Un(),ne=Pi(),Fe=Tu(),je=Ii(),he=TypeError,qe=function(Ze,nt){this.stopped=Ze,this.result=nt},et=qe.prototype;Ne.exports=function(Ze,nt,rt){var $=rt&&rt.that,Ft=!!(rt&&rt.AS_ENTRIES),At=!!(rt&&rt.IS_RECORD),Lt=!!(rt&&rt.IS_ITERATOR),qt=!!(rt&&rt.INTERRUPTED),Zt=Se(nt,$),ue,yr,Pr,zr,fr,Rr,mr,rn=function(Fr){return ue&&je(ue,"normal",Fr),new qe(!0,Fr)},wr=function(Fr){return Ft?(ee(Fr),qt?Zt(Fr[0],Fr[1],rn):Zt(Fr[0],Fr[1])):qt?Zt(Fr,rn):Zt(Fr)};if(At)ue=Ze.iterator;else if(Lt)ue=Ze;else{if(yr=Fe(Ze),!yr)throw he(V(Ze)+" is not iterable");if(W(yr)){for(Pr=0,zr=Z(Ze);zr>Pr;Pr++)if(fr=wr(Ze[Pr]),fr&&Y(et,fr))return fr;return new qe(!1)}ue=ne(Ze,yr)}for(Rr=At?Ze.next:ue.next;!(mr=Oe(Rr,ue)).done;){try{fr=wr(mr.value)}catch(Fr){je(ue,"throw",Fr)}if(typeof fr=="object"&&fr&&Y(et,fr))return fr}return new qe(!1)}}),Li=Ae((ot,Ne)=>{var Se=yn(),Oe=en(),ee=Lr();Ne.exports=function(V,W,Z){var Y=Se(W);Y in V?Oe.f(V,Y,ee(0,Z)):V[Y]=Z}}),Oi=Ae(()=>{var ot=an(),Ne=ji(),Se=Li();ot({target:"Object",stat:!0},{fromEntries:function(Oe){var ee={};return Ne(Oe,function(V,W){Se(ee,V,W)},{AS_ENTRIES:!0}),ee}})}),$i=Ae((ot,Ne)=>{var Se=["cliName","cliCategory","cliDescription"];function Oe(L,re){if(L==null)return{};var ge=ee(L,re),Ee,Pe;if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(L);for(Pe=0;Pe=0)&&Object.prototype.propertyIsEnumerable.call(L,Ee)&&(ge[Ee]=L[Ee])}return ge}function ee(L,re){if(L==null)return{};var ge={},Ee=Object.keys(L),Pe,ie;for(ie=0;ie=0)&&(ge[Pe]=L[Pe]);return ge}Bi(),_i(),Oi();var V=Object.create,W=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,Y=Object.getOwnPropertyNames,ne=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty,je=(L,re)=>function(){return L&&(re=(0,L[Y(L)[0]])(L=0)),re},he=(L,re)=>function(){return re||(0,L[Y(L)[0]])((re={exports:{}}).exports,re),re.exports},qe=(L,re)=>{for(var ge in re)W(L,ge,{get:re[ge],enumerable:!0})},et=(L,re,ge,Ee)=>{if(re&&typeof re=="object"||typeof re=="function")for(let Pe of Y(re))!Fe.call(L,Pe)&&Pe!==ge&&W(L,Pe,{get:()=>re[Pe],enumerable:!(Ee=Z(re,Pe))||Ee.enumerable});return L},Ze=(L,re,ge)=>(ge=L!=null?V(ne(L)):{},et(re||!L||!L.__esModule?W(ge,"default",{value:L,enumerable:!0}):ge,L)),nt=L=>et(W({},"__esModule",{value:!0}),L),rt,$=je({""(){rt={env:{},argv:[]}}}),Ft=he({"node_modules/angular-html-parser/lib/compiler/src/chars.js"(L){$(),Object.defineProperty(L,"__esModule",{value:!0}),L.$EOF=0,L.$BSPACE=8,L.$TAB=9,L.$LF=10,L.$VTAB=11,L.$FF=12,L.$CR=13,L.$SPACE=32,L.$BANG=33,L.$DQ=34,L.$HASH=35,L.$$=36,L.$PERCENT=37,L.$AMPERSAND=38,L.$SQ=39,L.$LPAREN=40,L.$RPAREN=41,L.$STAR=42,L.$PLUS=43,L.$COMMA=44,L.$MINUS=45,L.$PERIOD=46,L.$SLASH=47,L.$COLON=58,L.$SEMICOLON=59,L.$LT=60,L.$EQ=61,L.$GT=62,L.$QUESTION=63,L.$0=48,L.$7=55,L.$9=57,L.$A=65,L.$E=69,L.$F=70,L.$X=88,L.$Z=90,L.$LBRACKET=91,L.$BACKSLASH=92,L.$RBRACKET=93,L.$CARET=94,L.$_=95,L.$a=97,L.$b=98,L.$e=101,L.$f=102,L.$n=110,L.$r=114,L.$t=116,L.$u=117,L.$v=118,L.$x=120,L.$z=122,L.$LBRACE=123,L.$BAR=124,L.$RBRACE=125,L.$NBSP=160,L.$PIPE=124,L.$TILDA=126,L.$AT=64,L.$BT=96;function re(Ue){return Ue>=L.$TAB&&Ue<=L.$SPACE||Ue==L.$NBSP}L.isWhitespace=re;function ge(Ue){return L.$0<=Ue&&Ue<=L.$9}L.isDigit=ge;function Ee(Ue){return Ue>=L.$a&&Ue<=L.$z||Ue>=L.$A&&Ue<=L.$Z}L.isAsciiLetter=Ee;function Pe(Ue){return Ue>=L.$a&&Ue<=L.$f||Ue>=L.$A&&Ue<=L.$F||ge(Ue)}L.isAsciiHexDigit=Pe;function ie(Ue){return Ue===L.$LF||Ue===L.$CR}L.isNewLine=ie;function de(Ue){return L.$0<=Ue&&Ue<=L.$7}L.isOctalDigit=de}}),At=he({"node_modules/angular-html-parser/lib/compiler/src/aot/static_symbol.js"(L){$(),Object.defineProperty(L,"__esModule",{value:!0});var re=class{constructor(Ee,Pe,ie){this.filePath=Ee,this.name=Pe,this.members=ie}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}};L.StaticSymbol=re;var ge=class{constructor(){this.cache=new Map}get(Ee,Pe,ie){ie=ie||[];let de=ie.length?`.${ie.join(".")}`:"",Ue=`"${Ee}".${Pe}${de}`,Ge=this.cache.get(Ue);return Ge||(Ge=new re(Ee,Pe,ie),this.cache.set(Ue,Ge)),Ge}};L.StaticSymbolCache=ge}}),Lt=he({"node_modules/angular-html-parser/lib/compiler/src/util.js"(L){$(),Object.defineProperty(L,"__esModule",{value:!0});var re=/-+([a-z0-9])/g;function ge(le){return le.replace(re,function(){for(var We=arguments.length,Me=new Array(We),at=0;atde(Me,this,We))}visitStringMap(le,We){let Me={};return Object.keys(le).forEach(at=>{Me[at]=de(le[at],this,We)}),Me}visitPrimitive(le,We){return le}visitOther(le,We){return le}};L.ValueTransformer=gt,L.SyncAsync={assertSync:le=>{if(st(le))throw new Error("Illegal state: value cannot be a promise");return le},then:(le,We)=>st(le)?le.then(We):We(le),all:le=>le.some(st)?Promise.all(le):le};function ce(le){throw new Error(`Internal Error: ${le}`)}L.error=ce;function ve(le,We){let Me=Error(le);return Me[Ve]=!0,We&&(Me[He]=We),Me}L.syntaxError=ve;var Ve="ngSyntaxError",He="ngParseErrors";function Je(le){return le[Ve]}L.isSyntaxError=Je;function Qe(le){return le[He]||[]}L.getParseErrors=Qe;function yt(le){return le.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}L.escapeRegExp=yt;var _t=Object.getPrototypeOf({});function ct(le){return typeof le=="object"&&le!==null&&Object.getPrototypeOf(le)===_t}function kt(le){let We="";for(let Me=0;Me=55296&&at<=56319&&le.length>Me+1){let Jt=le.charCodeAt(Me+1);Jt>=56320&&Jt<=57343&&(Me++,at=(at-55296<<10)+Jt-56320+65536)}at<=127?We+=String.fromCharCode(at):at<=2047?We+=String.fromCharCode(at>>6&31|192,at&63|128):at<=65535?We+=String.fromCharCode(at>>12|224,at>>6&63|128,at&63|128):at<=2097151&&(We+=String.fromCharCode(at>>18&7|240,at>>12&63|128,at>>6&63|128,at&63|128))}return We}L.utf8Encode=kt;function $t(le){if(typeof le=="string")return le;if(le instanceof Array)return"["+le.map($t).join(", ")+"]";if(le==null)return""+le;if(le.overriddenName)return`${le.overriddenName}`;if(le.name)return`${le.name}`;if(!le.toString)return"object";let We=le.toString();if(We==null)return""+We;let Me=We.indexOf(` +import{_ as ea,m as pl,b as ta}from"./DocsRenderer-NNNQARDV-jtC6Msq5.js";import"./iframe-7PiyMb9T.js";import"../sb-preview/runtime.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-18-N0svEjlN.js";import"./client-rbWgHzHN.js";import"./index-7vsPyIck.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./bundle.esm-7jAAHVxW.js";import"./index-ogXoivrg.js";import"./_getPrototype-bjD8Yebc.js";import"./index-PPLHz8o0.js";var cl=ta({"node_modules/prettier/parser-html.js"(Jr,Xr){(function(Ae){if(typeof Jr=="object"&&typeof Xr=="object")Xr.exports=Ae();else if(typeof define=="function"&&define.amd)define(Ae);else{var Yt=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};Yt.prettierPlugins=Yt.prettierPlugins||{},Yt.prettierPlugins.html=Ae()}})(function(){var Ae=(ot,Ne)=>()=>(Ne||ot((Ne={exports:{}}).exports,Ne),Ne.exports),Yt=Ae((ot,Ne)=>{var Se=function(Oe){return Oe&&Oe.Math==Math&&Oe};Ne.exports=Se(typeof globalThis=="object"&&globalThis)||Se(typeof window=="object"&&window)||Se(typeof self=="object"&&self)||Se(typeof global=="object"&&global)||function(){return this}()||Function("return this")()}),hr=Ae((ot,Ne)=>{Ne.exports=function(Se){try{return!!Se()}catch{return!0}}}),br=Ae((ot,Ne)=>{var Se=hr();Ne.exports=!Se(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),Hr=Ae((ot,Ne)=>{var Se=hr();Ne.exports=!Se(function(){var Oe=(function(){}).bind();return typeof Oe!="function"||Oe.hasOwnProperty("prototype")})}),gr=Ae((ot,Ne)=>{var Se=Hr(),Oe=Function.prototype.call;Ne.exports=Se?Oe.bind(Oe):function(){return Oe.apply(Oe,arguments)}}),Dn=Ae(ot=>{var Ne={}.propertyIsEnumerable,Se=Object.getOwnPropertyDescriptor,Oe=Se&&!Ne.call({1:2},1);ot.f=Oe?function(ee){var V=Se(this,ee);return!!V&&V.enumerable}:Ne}),Lr=Ae((ot,Ne)=>{Ne.exports=function(Se,Oe){return{enumerable:!(Se&1),configurable:!(Se&2),writable:!(Se&4),value:Oe}}}),Dr=Ae((ot,Ne)=>{var Se=Hr(),Oe=Function.prototype,ee=Oe.call,V=Se&&Oe.bind.bind(ee,ee);Ne.exports=Se?V:function(W){return function(){return ee.apply(W,arguments)}}}),Br=Ae((ot,Ne)=>{var Se=Dr(),Oe=Se({}.toString),ee=Se("".slice);Ne.exports=function(V){return ee(Oe(V),8,-1)}}),Zr=Ae((ot,Ne)=>{var Se=Dr(),Oe=hr(),ee=Br(),V=Object,W=Se("".split);Ne.exports=Oe(function(){return!V("z").propertyIsEnumerable(0)})?function(Z){return ee(Z)=="String"?W(Z,""):V(Z)}:V}),nn=Ae((ot,Ne)=>{Ne.exports=function(Se){return Se==null}}),qn=Ae((ot,Ne)=>{var Se=nn(),Oe=TypeError;Ne.exports=function(ee){if(Se(ee))throw Oe("Can't call method on "+ee);return ee}}),dn=Ae((ot,Ne)=>{var Se=Zr(),Oe=qn();Ne.exports=function(ee){return Se(Oe(ee))}}),Vn=Ae((ot,Ne)=>{var Se=typeof document=="object"&&document.all,Oe=typeof Se>"u"&&Se!==void 0;Ne.exports={all:Se,IS_HTMLDDA:Oe}}),dr=Ae((ot,Ne)=>{var Se=Vn(),Oe=Se.all;Ne.exports=Se.IS_HTMLDDA?function(ee){return typeof ee=="function"||ee===Oe}:function(ee){return typeof ee=="function"}}),Or=Ae((ot,Ne)=>{var Se=dr(),Oe=Vn(),ee=Oe.all;Ne.exports=Oe.IS_HTMLDDA?function(V){return typeof V=="object"?V!==null:Se(V)||V===ee}:function(V){return typeof V=="object"?V!==null:Se(V)}}),un=Ae((ot,Ne)=>{var Se=Yt(),Oe=dr(),ee=function(V){return Oe(V)?V:void 0};Ne.exports=function(V,W){return arguments.length<2?ee(Se[V]):Se[V]&&Se[V][W]}}),Un=Ae((ot,Ne)=>{var Se=Dr();Ne.exports=Se({}.isPrototypeOf)}),ii=Ae((ot,Ne)=>{var Se=un();Ne.exports=Se("navigator","userAgent")||""}),si=Ae((ot,Ne)=>{var Se=Yt(),Oe=ii(),ee=Se.process,V=Se.Deno,W=ee&&ee.versions||V&&V.version,Z=W&&W.v8,Y,ne;Z&&(Y=Z.split("."),ne=Y[0]>0&&Y[0]<4?1:+(Y[0]+Y[1])),!ne&&Oe&&(Y=Oe.match(/Edge\/(\d+)/),(!Y||Y[1]>=74)&&(Y=Oe.match(/Chrome\/(\d+)/),Y&&(ne=+Y[1]))),Ne.exports=ne}),Gn=Ae((ot,Ne)=>{var Se=si(),Oe=hr();Ne.exports=!!Object.getOwnPropertySymbols&&!Oe(function(){var ee=Symbol();return!String(ee)||!(Object(ee)instanceof Symbol)||!Symbol.sham&&Se&&Se<41})}),Jn=Ae((ot,Ne)=>{var Se=Gn();Ne.exports=Se&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),Xn=Ae((ot,Ne)=>{var Se=un(),Oe=dr(),ee=Un(),V=Jn(),W=Object;Ne.exports=V?function(Z){return typeof Z=="symbol"}:function(Z){var Y=Se("Symbol");return Oe(Y)&&ee(Y.prototype,W(Z))}}),fn=Ae((ot,Ne)=>{var Se=String;Ne.exports=function(Oe){try{return Se(Oe)}catch{return"Object"}}}),sn=Ae((ot,Ne)=>{var Se=dr(),Oe=fn(),ee=TypeError;Ne.exports=function(V){if(Se(V))return V;throw ee(Oe(V)+" is not a function")}}),mn=Ae((ot,Ne)=>{var Se=sn(),Oe=nn();Ne.exports=function(ee,V){var W=ee[V];return Oe(W)?void 0:Se(W)}}),ai=Ae((ot,Ne)=>{var Se=gr(),Oe=dr(),ee=Or(),V=TypeError;Ne.exports=function(W,Z){var Y,ne;if(Z==="string"&&Oe(Y=W.toString)&&!ee(ne=Se(Y,W))||Oe(Y=W.valueOf)&&!ee(ne=Se(Y,W))||Z!=="string"&&Oe(Y=W.toString)&&!ee(ne=Se(Y,W)))return ne;throw V("Can't convert object to primitive value")}}),oi=Ae((ot,Ne)=>{Ne.exports=!1}),hn=Ae((ot,Ne)=>{var Se=Yt(),Oe=Object.defineProperty;Ne.exports=function(ee,V){try{Oe(Se,ee,{value:V,configurable:!0,writable:!0})}catch{Se[ee]=V}return V}}),gn=Ae((ot,Ne)=>{var Se=Yt(),Oe=hn(),ee="__core-js_shared__",V=Se[ee]||Oe(ee,{});Ne.exports=V}),Wn=Ae((ot,Ne)=>{var Se=oi(),Oe=gn();(Ne.exports=function(ee,V){return Oe[ee]||(Oe[ee]=V!==void 0?V:{})})("versions",[]).push({version:"3.26.1",mode:Se?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})}),Sn=Ae((ot,Ne)=>{var Se=qn(),Oe=Object;Ne.exports=function(ee){return Oe(Se(ee))}}),kr=Ae((ot,Ne)=>{var Se=Dr(),Oe=Sn(),ee=Se({}.hasOwnProperty);Ne.exports=Object.hasOwn||function(V,W){return ee(Oe(V),W)}}),zn=Ae((ot,Ne)=>{var Se=Dr(),Oe=0,ee=Math.random(),V=Se(1 .toString);Ne.exports=function(W){return"Symbol("+(W===void 0?"":W)+")_"+V(++Oe+ee,36)}}),$r=Ae((ot,Ne)=>{var Se=Yt(),Oe=Wn(),ee=kr(),V=zn(),W=Gn(),Z=Jn(),Y=Oe("wks"),ne=Se.Symbol,Fe=ne&&ne.for,je=Z?ne:ne&&ne.withoutSetter||V;Ne.exports=function(he){if(!ee(Y,he)||!(W||typeof Y[he]=="string")){var qe="Symbol."+he;W&&ee(ne,he)?Y[he]=ne[he]:Z&&Fe?Y[he]=Fe(qe):Y[he]=je(qe)}return Y[he]}}),li=Ae((ot,Ne)=>{var Se=gr(),Oe=Or(),ee=Xn(),V=mn(),W=ai(),Z=$r(),Y=TypeError,ne=Z("toPrimitive");Ne.exports=function(Fe,je){if(!Oe(Fe)||ee(Fe))return Fe;var he=V(Fe,ne),qe;if(he){if(je===void 0&&(je="default"),qe=Se(he,Fe,je),!Oe(qe)||ee(qe))return qe;throw Y("Can't convert object to primitive value")}return je===void 0&&(je="number"),W(Fe,je)}}),yn=Ae((ot,Ne)=>{var Se=li(),Oe=Xn();Ne.exports=function(ee){var V=Se(ee,"string");return Oe(V)?V:V+""}}),pi=Ae((ot,Ne)=>{var Se=Yt(),Oe=Or(),ee=Se.document,V=Oe(ee)&&Oe(ee.createElement);Ne.exports=function(W){return V?ee.createElement(W):{}}}),Hn=Ae((ot,Ne)=>{var Se=br(),Oe=hr(),ee=pi();Ne.exports=!Se&&!Oe(function(){return Object.defineProperty(ee("div"),"a",{get:function(){return 7}}).a!=7})}),Yn=Ae(ot=>{var Ne=br(),Se=gr(),Oe=Dn(),ee=Lr(),V=dn(),W=yn(),Z=kr(),Y=Hn(),ne=Object.getOwnPropertyDescriptor;ot.f=Ne?ne:function(Fe,je){if(Fe=V(Fe),je=W(je),Y)try{return ne(Fe,je)}catch{}if(Z(Fe,je))return ee(!Se(Oe.f,Fe,je),Fe[je])}}),ci=Ae((ot,Ne)=>{var Se=br(),Oe=hr();Ne.exports=Se&&Oe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})}),Wr=Ae((ot,Ne)=>{var Se=Or(),Oe=String,ee=TypeError;Ne.exports=function(V){if(Se(V))return V;throw ee(Oe(V)+" is not an object")}}),en=Ae(ot=>{var Ne=br(),Se=Hn(),Oe=ci(),ee=Wr(),V=yn(),W=TypeError,Z=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,ne="enumerable",Fe="configurable",je="writable";ot.f=Ne?Oe?function(he,qe,et){if(ee(he),qe=V(qe),ee(et),typeof he=="function"&&qe==="prototype"&&"value"in et&&je in et&&!et[je]){var Ze=Y(he,qe);Ze&&Ze[je]&&(he[qe]=et.value,et={configurable:Fe in et?et[Fe]:Ze[Fe],enumerable:ne in et?et[ne]:Ze[ne],writable:!1})}return Z(he,qe,et)}:Z:function(he,qe,et){if(ee(he),qe=V(qe),ee(et),Se)try{return Z(he,qe,et)}catch{}if("get"in et||"set"in et)throw W("Accessors not supported");return"value"in et&&(he[qe]=et.value),he}}),Kn=Ae((ot,Ne)=>{var Se=br(),Oe=en(),ee=Lr();Ne.exports=Se?function(V,W,Z){return Oe.f(V,W,ee(1,Z))}:function(V,W,Z){return V[W]=Z,V}}),Di=Ae((ot,Ne)=>{var Se=br(),Oe=kr(),ee=Function.prototype,V=Se&&Object.getOwnPropertyDescriptor,W=Oe(ee,"name"),Z=W&&(function(){}).name==="something",Y=W&&(!Se||Se&&V(ee,"name").configurable);Ne.exports={EXISTS:W,PROPER:Z,CONFIGURABLE:Y}}),Qn=Ae((ot,Ne)=>{var Se=Dr(),Oe=dr(),ee=gn(),V=Se(Function.toString);Oe(ee.inspectSource)||(ee.inspectSource=function(W){return V(W)}),Ne.exports=ee.inspectSource}),di=Ae((ot,Ne)=>{var Se=Yt(),Oe=dr(),ee=Se.WeakMap;Ne.exports=Oe(ee)&&/native code/.test(String(ee))}),fi=Ae((ot,Ne)=>{var Se=Wn(),Oe=zn(),ee=Se("keys");Ne.exports=function(V){return ee[V]||(ee[V]=Oe(V))}}),Zn=Ae((ot,Ne)=>{Ne.exports={}}),mi=Ae((ot,Ne)=>{var Se=di(),Oe=Yt(),ee=Or(),V=Kn(),W=kr(),Z=gn(),Y=fi(),ne=Zn(),Fe="Object already initialized",je=Oe.TypeError,he=Oe.WeakMap,qe,et,Ze,nt=function(At){return Ze(At)?et(At):qe(At,{})},rt=function(At){return function(Lt){var qt;if(!ee(Lt)||(qt=et(Lt)).type!==At)throw je("Incompatible receiver, "+At+" required");return qt}};Se||Z.state?($=Z.state||(Z.state=new he),$.get=$.get,$.has=$.has,$.set=$.set,qe=function(At,Lt){if($.has(At))throw je(Fe);return Lt.facade=At,$.set(At,Lt),Lt},et=function(At){return $.get(At)||{}},Ze=function(At){return $.has(At)}):(Ft=Y("state"),ne[Ft]=!0,qe=function(At,Lt){if(W(At,Ft))throw je(Fe);return Lt.facade=At,V(At,Ft,Lt),Lt},et=function(At){return W(At,Ft)?At[Ft]:{}},Ze=function(At){return W(At,Ft)});var $,Ft;Ne.exports={set:qe,get:et,has:Ze,enforce:nt,getterFor:rt}}),gu=Ae((ot,Ne)=>{var Se=hr(),Oe=dr(),ee=kr(),V=br(),W=Di().CONFIGURABLE,Z=Qn(),Y=mi(),ne=Y.enforce,Fe=Y.get,je=Object.defineProperty,he=V&&!Se(function(){return je(function(){},"length",{value:8}).length!==8}),qe=String(String).split("String"),et=Ne.exports=function(Ze,nt,rt){String(nt).slice(0,7)==="Symbol("&&(nt="["+String(nt).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),rt&&rt.getter&&(nt="get "+nt),rt&&rt.setter&&(nt="set "+nt),(!ee(Ze,"name")||W&&Ze.name!==nt)&&(V?je(Ze,"name",{value:nt,configurable:!0}):Ze.name=nt),he&&rt&&ee(rt,"arity")&&Ze.length!==rt.arity&&je(Ze,"length",{value:rt.arity});try{rt&&ee(rt,"constructor")&&rt.constructor?V&&je(Ze,"prototype",{writable:!1}):Ze.prototype&&(Ze.prototype=void 0)}catch{}var $=ne(Ze);return ee($,"source")||($.source=qe.join(typeof nt=="string"?nt:"")),Ze};Function.prototype.toString=et(function(){return Oe(this)&&Fe(this).source||Z(this)},"toString")}),hi=Ae((ot,Ne)=>{var Se=dr(),Oe=en(),ee=gu(),V=hn();Ne.exports=function(W,Z,Y,ne){ne||(ne={});var Fe=ne.enumerable,je=ne.name!==void 0?ne.name:Z;if(Se(Y)&&ee(Y,je,ne),ne.global)Fe?W[Z]=Y:V(Z,Y);else{try{ne.unsafe?W[Z]&&(Fe=!0):delete W[Z]}catch{}Fe?W[Z]=Y:Oe.f(W,Z,{value:Y,enumerable:!1,configurable:!ne.nonConfigurable,writable:!ne.nonWritable})}return W}}),gi=Ae((ot,Ne)=>{var Se=Math.ceil,Oe=Math.floor;Ne.exports=Math.trunc||function(ee){var V=+ee;return(V>0?Oe:Se)(V)}}),xn=Ae((ot,Ne)=>{var Se=gi();Ne.exports=function(Oe){var ee=+Oe;return ee!==ee||ee===0?0:Se(ee)}}),yi=Ae((ot,Ne)=>{var Se=xn(),Oe=Math.max,ee=Math.min;Ne.exports=function(V,W){var Z=Se(V);return Z<0?Oe(Z+W,0):ee(Z,W)}}),Ei=Ae((ot,Ne)=>{var Se=xn(),Oe=Math.min;Ne.exports=function(ee){return ee>0?Oe(Se(ee),9007199254740991):0}}),tn=Ae((ot,Ne)=>{var Se=Ei();Ne.exports=function(Oe){return Se(Oe.length)}}),Ci=Ae((ot,Ne)=>{var Se=dn(),Oe=yi(),ee=tn(),V=function(W){return function(Z,Y,ne){var Fe=Se(Z),je=ee(Fe),he=Oe(ne,je),qe;if(W&&Y!=Y){for(;je>he;)if(qe=Fe[he++],qe!=qe)return!0}else for(;je>he;he++)if((W||he in Fe)&&Fe[he]===Y)return W||he||0;return!W&&-1}};Ne.exports={includes:V(!0),indexOf:V(!1)}}),Fi=Ae((ot,Ne)=>{var Se=Dr(),Oe=kr(),ee=dn(),V=Ci().indexOf,W=Zn(),Z=Se([].push);Ne.exports=function(Y,ne){var Fe=ee(Y),je=0,he=[],qe;for(qe in Fe)!Oe(W,qe)&&Oe(Fe,qe)&&Z(he,qe);for(;ne.length>je;)Oe(Fe,qe=ne[je++])&&(~V(he,qe)||Z(he,qe));return he}}),Ai=Ae((ot,Ne)=>{Ne.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),vi=Ae(ot=>{var Ne=Fi(),Se=Ai(),Oe=Se.concat("length","prototype");ot.f=Object.getOwnPropertyNames||function(ee){return Ne(ee,Oe)}}),bi=Ae(ot=>{ot.f=Object.getOwnPropertySymbols}),Si=Ae((ot,Ne)=>{var Se=un(),Oe=Dr(),ee=vi(),V=bi(),W=Wr(),Z=Oe([].concat);Ne.exports=Se("Reflect","ownKeys")||function(Y){var ne=ee.f(W(Y)),Fe=V.f;return Fe?Z(ne,Fe(Y)):ne}}),xi=Ae((ot,Ne)=>{var Se=kr(),Oe=Si(),ee=Yn(),V=en();Ne.exports=function(W,Z,Y){for(var ne=Oe(Z),Fe=V.f,je=ee.f,he=0;he{var Se=hr(),Oe=dr(),ee=/#|\.prototype\./,V=function(Fe,je){var he=Z[W(Fe)];return he==ne?!0:he==Y?!1:Oe(je)?Se(je):!!je},W=V.normalize=function(Fe){return String(Fe).replace(ee,".").toLowerCase()},Z=V.data={},Y=V.NATIVE="N",ne=V.POLYFILL="P";Ne.exports=V}),an=Ae((ot,Ne)=>{var Se=Yt(),Oe=Yn().f,ee=Kn(),V=hi(),W=hn(),Z=xi(),Y=Ti();Ne.exports=function(ne,Fe){var je=ne.target,he=ne.global,qe=ne.stat,et,Ze,nt,rt,$,Ft;if(he?Ze=Se:qe?Ze=Se[je]||W(je,{}):Ze=(Se[je]||{}).prototype,Ze)for(nt in Fe){if($=Fe[nt],ne.dontCallGetSet?(Ft=Oe(Ze,nt),rt=Ft&&Ft.value):rt=Ze[nt],et=Y(he?nt:je+(qe?".":"#")+nt,ne.forced),!et&&rt!==void 0){if(typeof $==typeof rt)continue;Z($,rt)}(ne.sham||rt&&rt.sham)&&ee($,"sham",!0),V(Ze,nt,$,ne)}}}),yu=Ae(()=>{var ot=an(),Ne=Yt();ot({global:!0,forced:Ne.globalThis!==Ne},{globalThis:Ne})}),Bi=Ae(()=>{yu()}),Eu=Ae((ot,Ne)=>{var Se=Br();Ne.exports=Array.isArray||function(Oe){return Se(Oe)=="Array"}}),Cu=Ae((ot,Ne)=>{var Se=TypeError,Oe=9007199254740991;Ne.exports=function(ee){if(ee>Oe)throw Se("Maximum allowed index exceeded");return ee}}),Fu=Ae((ot,Ne)=>{var Se=Br(),Oe=Dr();Ne.exports=function(ee){if(Se(ee)==="Function")return Oe(ee)}}),Au=Ae((ot,Ne)=>{var Se=Fu(),Oe=sn(),ee=Hr(),V=Se(Se.bind);Ne.exports=function(W,Z){return Oe(W),Z===void 0?W:ee?V(W,Z):function(){return W.apply(Z,arguments)}}}),vu=Ae((ot,Ne)=>{var Se=Eu(),Oe=tn(),ee=Cu(),V=Au(),W=function(Z,Y,ne,Fe,je,he,qe,et){for(var Ze=je,nt=0,rt=qe?V(qe,et):!1,$,Ft;nt0&&Se($)?(Ft=Oe($),Ze=W(Z,Y,$,Ft,Ze,he-1)-1):(ee(Ze+1),Z[Ze]=$),Ze++),nt++;return Ze};Ne.exports=W}),wi=Ae((ot,Ne)=>{var Se=$r(),Oe=Se("toStringTag"),ee={};ee[Oe]="z",Ne.exports=String(ee)==="[object z]"}),bu=Ae((ot,Ne)=>{var Se=wi(),Oe=dr(),ee=Br(),V=$r(),W=V("toStringTag"),Z=Object,Y=ee(function(){return arguments}())=="Arguments",ne=function(Fe,je){try{return Fe[je]}catch{}};Ne.exports=Se?ee:function(Fe){var je,he,qe;return Fe===void 0?"Undefined":Fe===null?"Null":typeof(he=ne(je=Z(Fe),W))=="string"?he:Y?ee(je):(qe=ee(je))=="Object"&&Oe(je.callee)?"Arguments":qe}}),Su=Ae((ot,Ne)=>{var Se=Dr(),Oe=hr(),ee=dr(),V=bu(),W=un(),Z=Qn(),Y=function(){},ne=[],Fe=W("Reflect","construct"),je=/^\s*(?:class|function)\b/,he=Se(je.exec),qe=!je.exec(Y),et=function(nt){if(!ee(nt))return!1;try{return Fe(Y,ne,nt),!0}catch{return!1}},Ze=function(nt){if(!ee(nt))return!1;switch(V(nt)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return qe||!!he(je,Z(nt))}catch{return!0}};Ze.sham=!0,Ne.exports=!Fe||Oe(function(){var nt;return et(et.call)||!et(Object)||!et(function(){nt=!0})||nt})?Ze:et}),Ni=Ae((ot,Ne)=>{var Se=Eu(),Oe=Su(),ee=Or(),V=$r(),W=V("species"),Z=Array;Ne.exports=function(Y){var ne;return Se(Y)&&(ne=Y.constructor,Oe(ne)&&(ne===Z||Se(ne.prototype))?ne=void 0:ee(ne)&&(ne=ne[W],ne===null&&(ne=void 0))),ne===void 0?Z:ne}}),xu=Ae((ot,Ne)=>{var Se=Ni();Ne.exports=function(Oe,ee){return new(Se(Oe))(ee===0?0:ee)}}),_i=Ae(()=>{var ot=an(),Ne=vu(),Se=sn(),Oe=Sn(),ee=tn(),V=xu();ot({target:"Array",proto:!0},{flatMap:function(W){var Z=Oe(this),Y=ee(Z),ne;return Se(W),ne=V(Z,0),ne.length=Ne(ne,Z,Z,Y,0,1,W,arguments.length>1?arguments[1]:void 0),ne}})}),eu=Ae((ot,Ne)=>{Ne.exports={}}),ki=Ae((ot,Ne)=>{var Se=$r(),Oe=eu(),ee=Se("iterator"),V=Array.prototype;Ne.exports=function(W){return W!==void 0&&(Oe.Array===W||V[ee]===W)}}),Tu=Ae((ot,Ne)=>{var Se=bu(),Oe=mn(),ee=nn(),V=eu(),W=$r(),Z=W("iterator");Ne.exports=function(Y){if(!ee(Y))return Oe(Y,Z)||Oe(Y,"@@iterator")||V[Se(Y)]}}),Pi=Ae((ot,Ne)=>{var Se=gr(),Oe=sn(),ee=Wr(),V=fn(),W=Tu(),Z=TypeError;Ne.exports=function(Y,ne){var Fe=arguments.length<2?W(Y):ne;if(Oe(Fe))return ee(Se(Fe,Y));throw Z(V(Y)+" is not iterable")}}),Ii=Ae((ot,Ne)=>{var Se=gr(),Oe=Wr(),ee=mn();Ne.exports=function(V,W,Z){var Y,ne;Oe(V);try{if(Y=ee(V,"return"),!Y){if(W==="throw")throw Z;return Z}Y=Se(Y,V)}catch(Fe){ne=!0,Y=Fe}if(W==="throw")throw Z;if(ne)throw Y;return Oe(Y),Z}}),ji=Ae((ot,Ne)=>{var Se=Au(),Oe=gr(),ee=Wr(),V=fn(),W=ki(),Z=tn(),Y=Un(),ne=Pi(),Fe=Tu(),je=Ii(),he=TypeError,qe=function(Ze,nt){this.stopped=Ze,this.result=nt},et=qe.prototype;Ne.exports=function(Ze,nt,rt){var $=rt&&rt.that,Ft=!!(rt&&rt.AS_ENTRIES),At=!!(rt&&rt.IS_RECORD),Lt=!!(rt&&rt.IS_ITERATOR),qt=!!(rt&&rt.INTERRUPTED),Zt=Se(nt,$),ue,yr,Pr,zr,fr,Rr,mr,rn=function(Fr){return ue&&je(ue,"normal",Fr),new qe(!0,Fr)},wr=function(Fr){return Ft?(ee(Fr),qt?Zt(Fr[0],Fr[1],rn):Zt(Fr[0],Fr[1])):qt?Zt(Fr,rn):Zt(Fr)};if(At)ue=Ze.iterator;else if(Lt)ue=Ze;else{if(yr=Fe(Ze),!yr)throw he(V(Ze)+" is not iterable");if(W(yr)){for(Pr=0,zr=Z(Ze);zr>Pr;Pr++)if(fr=wr(Ze[Pr]),fr&&Y(et,fr))return fr;return new qe(!1)}ue=ne(Ze,yr)}for(Rr=At?Ze.next:ue.next;!(mr=Oe(Rr,ue)).done;){try{fr=wr(mr.value)}catch(Fr){je(ue,"throw",Fr)}if(typeof fr=="object"&&fr&&Y(et,fr))return fr}return new qe(!1)}}),Li=Ae((ot,Ne)=>{var Se=yn(),Oe=en(),ee=Lr();Ne.exports=function(V,W,Z){var Y=Se(W);Y in V?Oe.f(V,Y,ee(0,Z)):V[Y]=Z}}),Oi=Ae(()=>{var ot=an(),Ne=ji(),Se=Li();ot({target:"Object",stat:!0},{fromEntries:function(Oe){var ee={};return Ne(Oe,function(V,W){Se(ee,V,W)},{AS_ENTRIES:!0}),ee}})}),$i=Ae((ot,Ne)=>{var Se=["cliName","cliCategory","cliDescription"];function Oe(L,re){if(L==null)return{};var ge=ee(L,re),Ee,Pe;if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(L);for(Pe=0;Pe=0)&&Object.prototype.propertyIsEnumerable.call(L,Ee)&&(ge[Ee]=L[Ee])}return ge}function ee(L,re){if(L==null)return{};var ge={},Ee=Object.keys(L),Pe,ie;for(ie=0;ie=0)&&(ge[Pe]=L[Pe]);return ge}Bi(),_i(),Oi();var V=Object.create,W=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,Y=Object.getOwnPropertyNames,ne=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty,je=(L,re)=>function(){return L&&(re=(0,L[Y(L)[0]])(L=0)),re},he=(L,re)=>function(){return re||(0,L[Y(L)[0]])((re={exports:{}}).exports,re),re.exports},qe=(L,re)=>{for(var ge in re)W(L,ge,{get:re[ge],enumerable:!0})},et=(L,re,ge,Ee)=>{if(re&&typeof re=="object"||typeof re=="function")for(let Pe of Y(re))!Fe.call(L,Pe)&&Pe!==ge&&W(L,Pe,{get:()=>re[Pe],enumerable:!(Ee=Z(re,Pe))||Ee.enumerable});return L},Ze=(L,re,ge)=>(ge=L!=null?V(ne(L)):{},et(re||!L||!L.__esModule?W(ge,"default",{value:L,enumerable:!0}):ge,L)),nt=L=>et(W({},"__esModule",{value:!0}),L),rt,$=je({""(){rt={env:{},argv:[]}}}),Ft=he({"node_modules/angular-html-parser/lib/compiler/src/chars.js"(L){$(),Object.defineProperty(L,"__esModule",{value:!0}),L.$EOF=0,L.$BSPACE=8,L.$TAB=9,L.$LF=10,L.$VTAB=11,L.$FF=12,L.$CR=13,L.$SPACE=32,L.$BANG=33,L.$DQ=34,L.$HASH=35,L.$$=36,L.$PERCENT=37,L.$AMPERSAND=38,L.$SQ=39,L.$LPAREN=40,L.$RPAREN=41,L.$STAR=42,L.$PLUS=43,L.$COMMA=44,L.$MINUS=45,L.$PERIOD=46,L.$SLASH=47,L.$COLON=58,L.$SEMICOLON=59,L.$LT=60,L.$EQ=61,L.$GT=62,L.$QUESTION=63,L.$0=48,L.$7=55,L.$9=57,L.$A=65,L.$E=69,L.$F=70,L.$X=88,L.$Z=90,L.$LBRACKET=91,L.$BACKSLASH=92,L.$RBRACKET=93,L.$CARET=94,L.$_=95,L.$a=97,L.$b=98,L.$e=101,L.$f=102,L.$n=110,L.$r=114,L.$t=116,L.$u=117,L.$v=118,L.$x=120,L.$z=122,L.$LBRACE=123,L.$BAR=124,L.$RBRACE=125,L.$NBSP=160,L.$PIPE=124,L.$TILDA=126,L.$AT=64,L.$BT=96;function re(Ue){return Ue>=L.$TAB&&Ue<=L.$SPACE||Ue==L.$NBSP}L.isWhitespace=re;function ge(Ue){return L.$0<=Ue&&Ue<=L.$9}L.isDigit=ge;function Ee(Ue){return Ue>=L.$a&&Ue<=L.$z||Ue>=L.$A&&Ue<=L.$Z}L.isAsciiLetter=Ee;function Pe(Ue){return Ue>=L.$a&&Ue<=L.$f||Ue>=L.$A&&Ue<=L.$F||ge(Ue)}L.isAsciiHexDigit=Pe;function ie(Ue){return Ue===L.$LF||Ue===L.$CR}L.isNewLine=ie;function de(Ue){return L.$0<=Ue&&Ue<=L.$7}L.isOctalDigit=de}}),At=he({"node_modules/angular-html-parser/lib/compiler/src/aot/static_symbol.js"(L){$(),Object.defineProperty(L,"__esModule",{value:!0});var re=class{constructor(Ee,Pe,ie){this.filePath=Ee,this.name=Pe,this.members=ie}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}};L.StaticSymbol=re;var ge=class{constructor(){this.cache=new Map}get(Ee,Pe,ie){ie=ie||[];let de=ie.length?`.${ie.join(".")}`:"",Ue=`"${Ee}".${Pe}${de}`,Ge=this.cache.get(Ue);return Ge||(Ge=new re(Ee,Pe,ie),this.cache.set(Ue,Ge)),Ge}};L.StaticSymbolCache=ge}}),Lt=he({"node_modules/angular-html-parser/lib/compiler/src/util.js"(L){$(),Object.defineProperty(L,"__esModule",{value:!0});var re=/-+([a-z0-9])/g;function ge(le){return le.replace(re,function(){for(var We=arguments.length,Me=new Array(We),at=0;atde(Me,this,We))}visitStringMap(le,We){let Me={};return Object.keys(le).forEach(at=>{Me[at]=de(le[at],this,We)}),Me}visitPrimitive(le,We){return le}visitOther(le,We){return le}};L.ValueTransformer=gt,L.SyncAsync={assertSync:le=>{if(st(le))throw new Error("Illegal state: value cannot be a promise");return le},then:(le,We)=>st(le)?le.then(We):We(le),all:le=>le.some(st)?Promise.all(le):le};function ce(le){throw new Error(`Internal Error: ${le}`)}L.error=ce;function ve(le,We){let Me=Error(le);return Me[Ve]=!0,We&&(Me[He]=We),Me}L.syntaxError=ve;var Ve="ngSyntaxError",He="ngParseErrors";function Je(le){return le[Ve]}L.isSyntaxError=Je;function Qe(le){return le[He]||[]}L.getParseErrors=Qe;function yt(le){return le.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}L.escapeRegExp=yt;var _t=Object.getPrototypeOf({});function ct(le){return typeof le=="object"&&le!==null&&Object.getPrototypeOf(le)===_t}function kt(le){let We="";for(let Me=0;Me=55296&&at<=56319&&le.length>Me+1){let Jt=le.charCodeAt(Me+1);Jt>=56320&&Jt<=57343&&(Me++,at=(at-55296<<10)+Jt-56320+65536)}at<=127?We+=String.fromCharCode(at):at<=2047?We+=String.fromCharCode(at>>6&31|192,at&63|128):at<=65535?We+=String.fromCharCode(at>>12|224,at>>6&63|128,at&63|128):at<=2097151&&(We+=String.fromCharCode(at>>18&7|240,at>>12&63|128,at>>6&63|128,at&63|128))}return We}L.utf8Encode=kt;function $t(le){if(typeof le=="string")return le;if(le instanceof Array)return"["+le.map($t).join(", ")+"]";if(le==null)return""+le;if(le.overriddenName)return`${le.overriddenName}`;if(le.name)return`${le.name}`;if(!le.toString)return"object";let We=le.toString();if(We==null)return""+We;let Me=We.indexOf(` `);return Me===-1?We:We.substring(0,Me)}L.stringify=$t;function ir(le){return typeof le=="function"&&le.hasOwnProperty("__forward_ref__")?le():le}L.resolveForwardRef=ir;function st(le){return!!le&&typeof le.then=="function"}L.isPromise=st;var Ot=class{constructor(le){this.full=le;let We=le.split(".");this.major=We[0],this.minor=We[1],this.patch=We.slice(2).join(".")}};L.Version=Ot;var Vt=typeof window<"u"&&window,Ut=typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self,rr=typeof globalThis<"u"&&globalThis,z=rr||Vt||Ut;L.global=z}}),qt=he({"node_modules/angular-html-parser/lib/compiler/src/compile_metadata.js"(L){$(),Object.defineProperty(L,"__esModule",{value:!0});var re=At(),ge=Lt(),Ee=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function Pe(Me){return Me.replace(/\W/g,"_")}L.sanitizeIdentifier=Pe;var ie=0;function de(Me){if(!Me||!Me.reference)return null;let at=Me.reference;if(at instanceof re.StaticSymbol)return at.name;if(at.__anonymousType)return at.__anonymousType;let Jt=ge.stringify(at);return Jt.indexOf("(")>=0?(Jt=`anonymous_${ie++}`,at.__anonymousType=Jt):Jt=Pe(Jt),Jt}L.identifierName=de;function Ue(Me){let at=Me.reference;return at instanceof re.StaticSymbol?at.filePath:`./${ge.stringify(at)}`}L.identifierModuleUrl=Ue;function Ge(Me,at){return`View_${de({reference:Me})}_${at}`}L.viewClassName=Ge;function gt(Me){return`RenderType_${de({reference:Me})}`}L.rendererTypeName=gt;function ce(Me){return`HostView_${de({reference:Me})}`}L.hostViewClassName=ce;function ve(Me){return`${de({reference:Me})}NgFactory`}L.componentFactoryName=ve;var Ve;(function(Me){Me[Me.Pipe=0]="Pipe",Me[Me.Directive=1]="Directive",Me[Me.NgModule=2]="NgModule",Me[Me.Injectable=3]="Injectable"})(Ve=L.CompileSummaryKind||(L.CompileSummaryKind={}));function He(Me){return Me.value!=null?Pe(Me.value):de(Me.identifier)}L.tokenName=He;function Je(Me){return Me.identifier!=null?Me.identifier.reference:Me.value}L.tokenReference=Je;var Qe=class{constructor(){let{moduleUrl:Me,styles:at,styleUrls:Jt}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.moduleUrl=Me||null,this.styles=st(at),this.styleUrls=st(Jt)}};L.CompileStylesheetMetadata=Qe;var yt=class{constructor(Me){let{encapsulation:at,template:Jt,templateUrl:er,htmlAst:Ar,styles:Er,styleUrls:_r,externalStylesheets:xr,animations:Ir,ngContentSelectors:Mr,interpolation:or,isInline:lt,preserveWhitespaces:mt}=Me;if(this.encapsulation=at,this.template=Jt,this.templateUrl=er,this.htmlAst=Ar,this.styles=st(Er),this.styleUrls=st(_r),this.externalStylesheets=st(xr),this.animations=Ir?Vt(Ir):[],this.ngContentSelectors=Mr||[],or&&or.length!=2)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=or,this.isInline=lt,this.preserveWhitespaces=mt}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};L.CompileTemplateMetadata=yt;var _t=class{static create(Me){let{isHost:at,type:Jt,isComponent:er,selector:Ar,exportAs:Er,changeDetection:_r,inputs:xr,outputs:Ir,host:Mr,providers:or,viewProviders:lt,queries:mt,guards:St,viewQueries:xt,entryComponents:Kt,template:sr,componentViewType:lr,rendererType:Qt,componentFactory:Kr}=Me,Pn={},In={},Hu={};Mr!=null&&Object.keys(Mr).forEach(vr=>{let Qr=Mr[vr],cn=vr.match(Ee);cn===null?Hu[vr]=Qr:cn[1]!=null?In[cn[1]]=Qr:cn[2]!=null&&(Pn[cn[2]]=Qr)});let Yu={};xr==null||xr.forEach(vr=>{let Qr=ge.splitAtColon(vr,[vr,vr]);Yu[Qr[0]]=Qr[1]});let Ku={};return Ir==null||Ir.forEach(vr=>{let Qr=ge.splitAtColon(vr,[vr,vr]);Ku[Qr[0]]=Qr[1]}),new _t({isHost:at,type:Jt,isComponent:!!er,selector:Ar,exportAs:Er,changeDetection:_r,inputs:Yu,outputs:Ku,hostListeners:Pn,hostProperties:In,hostAttributes:Hu,providers:or,viewProviders:lt,queries:mt,guards:St,viewQueries:xt,entryComponents:Kt,template:sr,componentViewType:lr,rendererType:Qt,componentFactory:Kr})}constructor(Me){let{isHost:at,type:Jt,isComponent:er,selector:Ar,exportAs:Er,changeDetection:_r,inputs:xr,outputs:Ir,hostListeners:Mr,hostProperties:or,hostAttributes:lt,providers:mt,viewProviders:St,queries:xt,guards:Kt,viewQueries:sr,entryComponents:lr,template:Qt,componentViewType:Kr,rendererType:Pn,componentFactory:In}=Me;this.isHost=!!at,this.type=Jt,this.isComponent=er,this.selector=Ar,this.exportAs=Er,this.changeDetection=_r,this.inputs=xr,this.outputs=Ir,this.hostListeners=Mr,this.hostProperties=or,this.hostAttributes=lt,this.providers=st(mt),this.viewProviders=st(St),this.queries=st(xt),this.guards=Kt,this.viewQueries=st(sr),this.entryComponents=st(lr),this.template=Qt,this.componentViewType=Kr,this.rendererType=Pn,this.componentFactory=In}toSummary(){return{summaryKind:Ve.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}};L.CompileDirectiveMetadata=_t;var ct=class{constructor(Me){let{type:at,name:Jt,pure:er}=Me;this.type=at,this.name=Jt,this.pure=!!er}toSummary(){return{summaryKind:Ve.Pipe,type:this.type,name:this.name,pure:this.pure}}};L.CompilePipeMetadata=ct;var kt=class{};L.CompileShallowModuleMetadata=kt;var $t=class{constructor(Me){let{type:at,providers:Jt,declaredDirectives:er,exportedDirectives:Ar,declaredPipes:Er,exportedPipes:_r,entryComponents:xr,bootstrapComponents:Ir,importedModules:Mr,exportedModules:or,schemas:lt,transitiveModule:mt,id:St}=Me;this.type=at||null,this.declaredDirectives=st(er),this.exportedDirectives=st(Ar),this.declaredPipes=st(Er),this.exportedPipes=st(_r),this.providers=st(Jt),this.entryComponents=st(xr),this.bootstrapComponents=st(Ir),this.importedModules=st(Mr),this.exportedModules=st(or),this.schemas=st(lt),this.id=St||null,this.transitiveModule=mt||null}toSummary(){let Me=this.transitiveModule;return{summaryKind:Ve.NgModule,type:this.type,entryComponents:Me.entryComponents,providers:Me.providers,modules:Me.modules,exportedDirectives:Me.exportedDirectives,exportedPipes:Me.exportedPipes}}};L.CompileNgModuleMetadata=$t;var ir=class{constructor(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}addProvider(Me,at){this.providers.push({provider:Me,module:at})}addDirective(Me){this.directivesSet.has(Me.reference)||(this.directivesSet.add(Me.reference),this.directives.push(Me))}addExportedDirective(Me){this.exportedDirectivesSet.has(Me.reference)||(this.exportedDirectivesSet.add(Me.reference),this.exportedDirectives.push(Me))}addPipe(Me){this.pipesSet.has(Me.reference)||(this.pipesSet.add(Me.reference),this.pipes.push(Me))}addExportedPipe(Me){this.exportedPipesSet.has(Me.reference)||(this.exportedPipesSet.add(Me.reference),this.exportedPipes.push(Me))}addModule(Me){this.modulesSet.has(Me.reference)||(this.modulesSet.add(Me.reference),this.modules.push(Me))}addEntryComponent(Me){this.entryComponentsSet.has(Me.componentType)||(this.entryComponentsSet.add(Me.componentType),this.entryComponents.push(Me))}};L.TransitiveCompileNgModuleMetadata=ir;function st(Me){return Me||[]}var Ot=class{constructor(Me,at){let{useClass:Jt,useValue:er,useExisting:Ar,useFactory:Er,deps:_r,multi:xr}=at;this.token=Me,this.useClass=Jt||null,this.useValue=er,this.useExisting=Ar,this.useFactory=Er||null,this.dependencies=_r||null,this.multi=!!xr}};L.ProviderMeta=Ot;function Vt(Me){return Me.reduce((at,Jt)=>{let er=Array.isArray(Jt)?Vt(Jt):Jt;return at.concat(er)},[])}L.flatten=Vt;function Ut(Me){return Me.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}function rr(Me,at,Jt){let er;return Jt.isInline?at.type.reference instanceof re.StaticSymbol?er=`${at.type.reference.filePath}.${at.type.reference.name}.html`:er=`${de(Me)}/${de(at.type)}.html`:er=Jt.templateUrl,at.type.reference instanceof re.StaticSymbol?er:Ut(er)}L.templateSourceUrl=rr;function z(Me,at){let Jt=Me.moduleUrl.split(/\/\\/g),er=Jt[Jt.length-1];return Ut(`css/${at}${er}.ngstyle.js`)}L.sharedStylesheetJitUrl=z;function le(Me){return Ut(`${de(Me.type)}/module.ngfactory.js`)}L.ngModuleJitUrl=le;function We(Me,at){return Ut(`${de(Me)}/${de(at.type)}.ngfactory.js`)}L.templateJitUrl=We}}),Zt=he({"node_modules/angular-html-parser/lib/compiler/src/parse_util.js"(L){$(),Object.defineProperty(L,"__esModule",{value:!0});var re=Ft(),ge=qt(),Ee=class{constructor(ce,ve,Ve,He){this.file=ce,this.offset=ve,this.line=Ve,this.col=He}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(ce){let ve=this.file.content,Ve=ve.length,He=this.offset,Je=this.line,Qe=this.col;for(;He>0&&ce<0;)if(He--,ce++,ve.charCodeAt(He)==re.$LF){Je--;let yt=ve.substr(0,He-1).lastIndexOf(String.fromCharCode(re.$LF));Qe=yt>0?He-yt:He}else Qe--;for(;He0;){let yt=ve.charCodeAt(He);He++,ce--,yt==re.$LF?(Je++,Qe=0):Qe++}return new Ee(this.file,He,Je,Qe)}getContext(ce,ve){let Ve=this.file.content,He=this.offset;if(He!=null){He>Ve.length-1&&(He=Ve.length-1);let Je=He,Qe=0,yt=0;for(;Qe0&&(He--,Qe++,!(Ve[He]==` `&&++yt==ve)););for(Qe=0,yt=0;Qe2&&arguments[2]!==void 0?arguments[2]:null;this.start=ce,this.end=ve,this.details=Ve}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}};L.ParseSourceSpan=ie,L.EMPTY_PARSE_LOCATION=new Ee(new Pe("",""),0,0,0),L.EMPTY_SOURCE_SPAN=new ie(L.EMPTY_PARSE_LOCATION,L.EMPTY_PARSE_LOCATION);var de;(function(ce){ce[ce.WARNING=0]="WARNING",ce[ce.ERROR=1]="ERROR"})(de=L.ParseErrorLevel||(L.ParseErrorLevel={}));var Ue=class{constructor(ce,ve){let Ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:de.ERROR;this.span=ce,this.msg=ve,this.level=Ve}contextualMessage(){let ce=this.span.start.getContext(100,3);return ce?`${this.msg} ("${ce.before}[${de[this.level]} ->]${ce.after}")`:this.msg}toString(){let ce=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${ce}`}};L.ParseError=Ue;function Ge(ce,ve){let Ve=ge.identifierModuleUrl(ve),He=Ve!=null?`in ${ce} ${ge.identifierName(ve)} in ${Ve}`:`in ${ce} ${ge.identifierName(ve)}`,Je=new Pe("",He);return new ie(new Ee(Je,-1,-1,-1),new Ee(Je,-1,-1,-1))}L.typeSourceSpan=Ge;function gt(ce,ve,Ve){let He=`in ${ce} ${ve} in ${Ve}`,Je=new Pe("",He);return new ie(new Ee(Je,-1,-1,-1),new Ee(Je,-1,-1,-1))}L.r3JitTypeSourceSpan=gt}}),ue=he({"src/utils/front-matter/parse.js"(L,re){$();var ge=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function Ee(Pe){let ie=Pe.match(ge);if(!ie)return{content:Pe};let{startDelimiter:de,language:Ue,value:Ge="",endDelimiter:gt}=ie.groups,ce=Ue.trim()||"yaml";if(de==="+++"&&(ce="toml"),ce!=="yaml"&&de!==gt)return{content:Pe};let[ve]=ie;return{frontMatter:{type:"front-matter",lang:ce,value:Ge,startDelimiter:de,endDelimiter:gt,raw:ve.replace(/\n$/,"")},content:ve.replace(/[^\n]/g," ")+Pe.slice(ve.length)}}re.exports=Ee}}),yr=he({"src/utils/get-last.js"(L,re){$();var ge=Ee=>Ee[Ee.length-1];re.exports=ge}}),Pr=he({"src/common/parser-create-error.js"(L,re){$();function ge(Ee,Pe){let ie=new SyntaxError(Ee+" ("+Pe.start.line+":"+Pe.start.column+")");return ie.loc=Pe,ie}re.exports=ge}}),zr={};qe(zr,{default:()=>fr});function fr(L){if(typeof L!="string")throw new TypeError("Expected a string");return L.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Rr=je({"node_modules/escape-string-regexp/index.js"(){$()}}),mr=he({"node_modules/semver/internal/debug.js"(L,re){$();var ge=typeof rt=="object"&&rt.env&&rt.env.NODE_DEBUG&&/\bsemver\b/i.test(rt.env.NODE_DEBUG)?function(){for(var Ee=arguments.length,Pe=new Array(Ee),ie=0;ie{};re.exports=ge}}),rn=he({"node_modules/semver/internal/constants.js"(L,re){$();var ge="2.0.0",Ee=256,Pe=Number.MAX_SAFE_INTEGER||9007199254740991,ie=16;re.exports={SEMVER_SPEC_VERSION:ge,MAX_LENGTH:Ee,MAX_SAFE_INTEGER:Pe,MAX_SAFE_COMPONENT_LENGTH:ie}}}),wr=he({"node_modules/semver/internal/re.js"(L,re){$();var{MAX_SAFE_COMPONENT_LENGTH:ge}=rn(),Ee=mr();L=re.exports={};var Pe=L.re=[],ie=L.src=[],de=L.t={},Ue=0,Ge=(gt,ce,ve)=>{let Ve=Ue++;Ee(gt,Ve,ce),de[gt]=Ve,ie[Ve]=ce,Pe[Ve]=new RegExp(ce,ve?"g":void 0)};Ge("NUMERICIDENTIFIER","0|[1-9]\\d*"),Ge("NUMERICIDENTIFIERLOOSE","[0-9]+"),Ge("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),Ge("MAINVERSION",`(${ie[de.NUMERICIDENTIFIER]})\\.(${ie[de.NUMERICIDENTIFIER]})\\.(${ie[de.NUMERICIDENTIFIER]})`),Ge("MAINVERSIONLOOSE",`(${ie[de.NUMERICIDENTIFIERLOOSE]})\\.(${ie[de.NUMERICIDENTIFIERLOOSE]})\\.(${ie[de.NUMERICIDENTIFIERLOOSE]})`),Ge("PRERELEASEIDENTIFIER",`(?:${ie[de.NUMERICIDENTIFIER]}|${ie[de.NONNUMERICIDENTIFIER]})`),Ge("PRERELEASEIDENTIFIERLOOSE",`(?:${ie[de.NUMERICIDENTIFIERLOOSE]}|${ie[de.NONNUMERICIDENTIFIER]})`),Ge("PRERELEASE",`(?:-(${ie[de.PRERELEASEIDENTIFIER]}(?:\\.${ie[de.PRERELEASEIDENTIFIER]})*))`),Ge("PRERELEASELOOSE",`(?:-?(${ie[de.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ie[de.PRERELEASEIDENTIFIERLOOSE]})*))`),Ge("BUILDIDENTIFIER","[0-9A-Za-z-]+"),Ge("BUILD",`(?:\\+(${ie[de.BUILDIDENTIFIER]}(?:\\.${ie[de.BUILDIDENTIFIER]})*))`),Ge("FULLPLAIN",`v?${ie[de.MAINVERSION]}${ie[de.PRERELEASE]}?${ie[de.BUILD]}?`),Ge("FULL",`^${ie[de.FULLPLAIN]}$`),Ge("LOOSEPLAIN",`[v=\\s]*${ie[de.MAINVERSIONLOOSE]}${ie[de.PRERELEASELOOSE]}?${ie[de.BUILD]}?`),Ge("LOOSE",`^${ie[de.LOOSEPLAIN]}$`),Ge("GTLT","((?:<|>)?=?)"),Ge("XRANGEIDENTIFIERLOOSE",`${ie[de.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),Ge("XRANGEIDENTIFIER",`${ie[de.NUMERICIDENTIFIER]}|x|X|\\*`),Ge("XRANGEPLAIN",`[v=\\s]*(${ie[de.XRANGEIDENTIFIER]})(?:\\.(${ie[de.XRANGEIDENTIFIER]})(?:\\.(${ie[de.XRANGEIDENTIFIER]})(?:${ie[de.PRERELEASE]})?${ie[de.BUILD]}?)?)?`),Ge("XRANGEPLAINLOOSE",`[v=\\s]*(${ie[de.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ie[de.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ie[de.XRANGEIDENTIFIERLOOSE]})(?:${ie[de.PRERELEASELOOSE]})?${ie[de.BUILD]}?)?)?`),Ge("XRANGE",`^${ie[de.GTLT]}\\s*${ie[de.XRANGEPLAIN]}$`),Ge("XRANGELOOSE",`^${ie[de.GTLT]}\\s*${ie[de.XRANGEPLAINLOOSE]}$`),Ge("COERCE",`(^|[^\\d])(\\d{1,${ge}})(?:\\.(\\d{1,${ge}}))?(?:\\.(\\d{1,${ge}}))?(?:$|[^\\d])`),Ge("COERCERTL",ie[de.COERCE],!0),Ge("LONETILDE","(?:~>?)"),Ge("TILDETRIM",`(\\s*)${ie[de.LONETILDE]}\\s+`,!0),L.tildeTrimReplace="$1~",Ge("TILDE",`^${ie[de.LONETILDE]}${ie[de.XRANGEPLAIN]}$`),Ge("TILDELOOSE",`^${ie[de.LONETILDE]}${ie[de.XRANGEPLAINLOOSE]}$`),Ge("LONECARET","(?:\\^)"),Ge("CARETTRIM",`(\\s*)${ie[de.LONECARET]}\\s+`,!0),L.caretTrimReplace="$1^",Ge("CARET",`^${ie[de.LONECARET]}${ie[de.XRANGEPLAIN]}$`),Ge("CARETLOOSE",`^${ie[de.LONECARET]}${ie[de.XRANGEPLAINLOOSE]}$`),Ge("COMPARATORLOOSE",`^${ie[de.GTLT]}\\s*(${ie[de.LOOSEPLAIN]})$|^$`),Ge("COMPARATOR",`^${ie[de.GTLT]}\\s*(${ie[de.FULLPLAIN]})$|^$`),Ge("COMPARATORTRIM",`(\\s*)${ie[de.GTLT]}\\s*(${ie[de.LOOSEPLAIN]}|${ie[de.XRANGEPLAIN]})`,!0),L.comparatorTrimReplace="$1$2$3",Ge("HYPHENRANGE",`^\\s*(${ie[de.XRANGEPLAIN]})\\s+-\\s+(${ie[de.XRANGEPLAIN]})\\s*$`),Ge("HYPHENRANGELOOSE",`^\\s*(${ie[de.XRANGEPLAINLOOSE]})\\s+-\\s+(${ie[de.XRANGEPLAINLOOSE]})\\s*$`),Ge("STAR","(<|>)?=?\\s*\\*"),Ge("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),Ge("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}),Fr=he({"node_modules/semver/internal/parse-options.js"(L,re){$();var ge=["includePrerelease","loose","rtl"],Ee=Pe=>Pe?typeof Pe!="object"?{loose:!0}:ge.filter(ie=>Pe[ie]).reduce((ie,de)=>(ie[de]=!0,ie),{}):{};re.exports=Ee}}),Tn=he({"node_modules/semver/internal/identifiers.js"(L,re){$();var ge=/^[0-9]+$/,Ee=(ie,de)=>{let Ue=ge.test(ie),Ge=ge.test(de);return Ue&&Ge&&(ie=+ie,de=+de),ie===de?0:Ue&&!Ge?-1:Ge&&!Ue?1:ieEe(de,ie);re.exports={compareIdentifiers:Ee,rcompareIdentifiers:Pe}}}),Bn=he({"node_modules/semver/classes/semver.js"(L,re){$();var ge=mr(),{MAX_LENGTH:Ee,MAX_SAFE_INTEGER:Pe}=rn(),{re:ie,t:de}=wr(),Ue=Fr(),{compareIdentifiers:Ge}=Tn(),gt=class{constructor(ce,ve){if(ve=Ue(ve),ce instanceof gt){if(ce.loose===!!ve.loose&&ce.includePrerelease===!!ve.includePrerelease)return ce;ce=ce.version}else if(typeof ce!="string")throw new TypeError(`Invalid Version: ${ce}`);if(ce.length>Ee)throw new TypeError(`version is longer than ${Ee} characters`);ge("SemVer",ce,ve),this.options=ve,this.loose=!!ve.loose,this.includePrerelease=!!ve.includePrerelease;let Ve=ce.trim().match(ve.loose?ie[de.LOOSE]:ie[de.FULL]);if(!Ve)throw new TypeError(`Invalid Version: ${ce}`);if(this.raw=ce,this.major=+Ve[1],this.minor=+Ve[2],this.patch=+Ve[3],this.major>Pe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Pe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Pe||this.patch<0)throw new TypeError("Invalid patch version");Ve[4]?this.prerelease=Ve[4].split(".").map(He=>{if(/^[0-9]+$/.test(He)){let Je=+He;if(Je>=0&&Je=0;)typeof this.prerelease[Ve]=="number"&&(this.prerelease[Ve]++,Ve=-2);Ve===-1&&this.prerelease.push(0)}ve&&(Ge(this.prerelease[0],ve)===0?isNaN(this.prerelease[1])&&(this.prerelease=[ve,0]):this.prerelease=[ve,0]);break;default:throw new Error(`invalid increment argument: ${ce}`)}return this.format(),this.raw=this.version,this}};re.exports=gt}}),on=he({"node_modules/semver/functions/compare.js"(L,re){$();var ge=Bn(),Ee=(Pe,ie,de)=>new ge(Pe,de).compare(new ge(ie,de));re.exports=Ee}}),Nr=he({"node_modules/semver/functions/lt.js"(L,re){$();var ge=on(),Ee=(Pe,ie,de)=>ge(Pe,ie,de)<0;re.exports=Ee}}),Bu=he({"node_modules/semver/functions/gte.js"(L,re){$();var ge=on(),Ee=(Pe,ie,de)=>ge(Pe,ie,de)>=0;re.exports=Ee}}),Ri=he({"src/utils/arrayify.js"(L,re){$(),re.exports=(ge,Ee)=>Object.entries(ge).map(Pe=>{let[ie,de]=Pe;return Object.assign({[Ee]:ie},de)})}}),wu=he({"package.json"(L,re){re.exports={version:"2.8.8"}}}),Mi=he({"node_modules/outdent/lib/index.js"(L,re){$(),Object.defineProperty(L,"__esModule",{value:!0}),L.outdent=void 0;function ge(){for(var ct=[],kt=0;kt{},onAnalyticsEvent:async()=>{}},argTypes:{advancedRelations:{control:"boolean",table:{category:s}},basicRelations:{control:"boolean",table:{category:s}},divisionKey:{control:"boolean",table:{category:l}},logarithms:{control:"boolean",table:{category:s}},fractionsOnly:{control:"boolean",table:{category:I}},multiplicationDot:{control:"boolean",table:{category:l}},preAlgebra:{control:"boolean",table:{category:s}},trigonometry:{control:"boolean",table:{category:S}}}},e=w=>O(F,{...w,onClickKey:c("onClickKey"),onAnalyticsEvent:async D=>c("onAnalyticsEvent")(D)}),i=e.bind({}),a=e.bind({});a.args={preAlgebra:!0};const o=e.bind({});o.args={preAlgebra:!0,trigonometry:!0};const t=e.bind({});t.args={fractionsOnly:!0};const r=e.bind({});r.args={advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!1,preAlgebra:!0,trigonometry:!0,expandedView:!0,showDismiss:!0,extraKeys:["a","b","c"]};const n=e.bind({});n.args={advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!1,preAlgebra:!0,trigonometry:!0,expandedView:!1,showDismiss:!0,extraKeys:["a","b","c"]};var p,y,m;i.parameters={...i.parameters,docs:{...(p=i.parameters)==null?void 0:p.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(m=(y=i.parameters)==null?void 0:y.docs)==null?void 0:m.source}}};var g,d,u;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(u=(d=a.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};var b,v,K;o.parameters={...o.parameters,docs:{...(b=o.parameters)==null?void 0:b.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(K=(v=o.parameters)==null?void 0:v.docs)==null?void 0:K.source}}};var f,E,A;t.parameters={...t.parameters,docs:{...(f=t.parameters)==null?void 0:f.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(A=(E=t.parameters)==null?void 0:E.docs)==null?void 0:A.source}}};var R,P,k;r.parameters={...r.parameters,docs:{...(R=r.parameters)==null?void 0:R.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(k=(P=r.parameters)==null?void 0:P.docs)==null?void 0:k.source}}};var h,C,T;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(T=(C=n.parameters)==null?void 0:C.docs)==null?void 0:T.source}}};const ne=["Default","PreAlgebra","Trigonometry","FractionsOnly","Everything","EverythingMinusNavigationPad"];export{i as Default,r as Everything,n as EverythingMinusNavigationPad,t as FractionsOnly,a as PreAlgebra,o as Trigonometry,ne as __namedExportsOrder,re as default}; +import{j as O}from"./jsx-runtime-FVsy8kgq.js";import{a as c}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as x}from"./index-VDi1Le_1.js";import{K as F}from"./mobile-keypad-wPUeR8mM.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";const s="Operators Page",l="Numbers Page",S="Geometry Page",I="Fractions Page",re={title:"math-input/Full Keypad",parameters:{backgrounds:{values:[{name:"light background",value:"white",default:!0}]},viewport:{defaultViewport:"iphone6",viewports:x}},component:F,args:{advancedRelations:!1,basicRelations:!1,divisionKey:!1,logarithms:!1,fractionsOnly:!1,convertDotToTimes:!1,preAlgebra:!1,trigonometry:!1,sendEvent:()=>{},onAnalyticsEvent:async()=>{}},argTypes:{advancedRelations:{control:"boolean",table:{category:s}},basicRelations:{control:"boolean",table:{category:s}},divisionKey:{control:"boolean",table:{category:l}},logarithms:{control:"boolean",table:{category:s}},fractionsOnly:{control:"boolean",table:{category:I}},multiplicationDot:{control:"boolean",table:{category:l}},preAlgebra:{control:"boolean",table:{category:s}},trigonometry:{control:"boolean",table:{category:S}}}},e=w=>O(F,{...w,onClickKey:c("onClickKey"),onAnalyticsEvent:async D=>c("onAnalyticsEvent")(D)}),i=e.bind({}),a=e.bind({});a.args={preAlgebra:!0};const o=e.bind({});o.args={preAlgebra:!0,trigonometry:!0};const t=e.bind({});t.args={fractionsOnly:!0};const r=e.bind({});r.args={advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!1,preAlgebra:!0,trigonometry:!0,expandedView:!0,showDismiss:!0,extraKeys:["a","b","c"]};const n=e.bind({});n.args={advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!1,preAlgebra:!0,trigonometry:!0,expandedView:!1,showDismiss:!0,extraKeys:["a","b","c"]};var p,y,m;i.parameters={...i.parameters,docs:{...(p=i.parameters)==null?void 0:p.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(m=(y=i.parameters)==null?void 0:y.docs)==null?void 0:m.source}}};var g,d,u;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(u=(d=a.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};var b,v,K;o.parameters={...o.parameters,docs:{...(b=o.parameters)==null?void 0:b.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(K=(v=o.parameters)==null?void 0:v.docs)==null?void 0:K.source}}};var f,E,A;t.parameters={...t.parameters,docs:{...(f=t.parameters)==null?void 0:f.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(A=(E=t.parameters)==null?void 0:E.docs)==null?void 0:A.source}}};var R,P,k;r.parameters={...r.parameters,docs:{...(R=r.parameters)==null?void 0:R.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(k=(P=r.parameters)==null?void 0:P.docs)==null?void 0:k.source}}};var h,C,T;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(T=(C=n.parameters)==null?void 0:C.docs)==null?void 0:T.source}}};const ne=["Default","PreAlgebra","Trigonometry","FractionsOnly","Everything","EverythingMinusNavigationPad"];export{i as Default,r as Everything,n as EverythingMinusNavigationPad,t as FractionsOnly,a as PreAlgebra,o as Trigonometry,ne as __namedExportsOrder,re as default}; diff --git a/assets/full-mobile-input.stories-jwUl9wLW.js b/assets/full-mobile-input.stories-jwUl9wLW.js index 866d9d61b7..fc44f7dbd4 100644 --- a/assets/full-mobile-input.stories-jwUl9wLW.js +++ b/assets/full-mobile-input.stories-jwUl9wLW.js @@ -1,4 +1,4 @@ -import{j as e,a as u}from"./jsx-runtime-FVsy8kgq.js";import{S,a as M,M as T}from"./mobile-keypad-wPUeR8mM.js";import{a as I}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r}from"./index-TT1qJ6UJ.js";import{M as b}from"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./button-assets-txIojR3b.js";import{K as d}from"./enums-x5qaTru7.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";const ot={title:"math-input/Full Mobile MathInput",parameters:{backgrounds:{default:"light background",values:[{name:"light background",value:"lightgrey",default:!0}]}}},N=({keypadElement:t,setKeypadElement:a})=>{const[h,v]=r.useState(""),[i,g]=r.useState(!1),[n,y]=r.useState(!0),[m,K]=r.useState(!0),x=r.useRef(null),C=n?"CDOT":"TIMES";return r.useEffect(()=>{t==null||t.configure({keypadType:i?d.EXPRESSION:d.FRACTION,extraKeys:i?["x","y","PI","THETA"]:[],times:n},()=>{})},[t,i,n]),u("div",{style:{padding:"1rem 2rem"},children:[u("div",{children:[e("div",{children:"NOTE: To properly test the input interaction, you will need to simulate a device using the dev tools. MathInput requires touch events (not click events)."}),u("div",{style:{padding:"1rem 0"},children:[e("button",{onClick:()=>g(!i),children:`Use ${i?"Fraction":"Expression"} Keypad`}),e("button",{onClick:()=>K(!m),children:`Use ${m?"Legacy":"New"} Keypad`}),e("button",{onClick:()=>y(!n),children:"Toggle to "+C})]})]}),e(b,{value:h,ref:x,keypadElement:t,onChange:(o,p)=>{v(o),p==null||p()},onFocus:()=>{t==null||t.activate()},onBlur:()=>{t==null||t.dismiss()},ariaLabel:"Mobile input"}),e(T,{onElementMounted:o=>{o&&a(o)},onDismiss:()=>{},onAnalyticsEvent:async o=>I("onAnalyticsEvent")(o)})]})};function s(){return e(S,{children:e(M.Consumer,{children:({keypadElement:t,setKeypadElement:a})=>e(N,{keypadElement:t,setKeypadElement:a})})})}s.__docgenInfo={description:"",methods:[],displayName:"Wrapped"};var c,l,f;s.parameters={...s.parameters,docs:{...(c=s.parameters)==null?void 0:c.docs,source:{originalSource:`function Wrapped() { +import{j as e,a as u}from"./jsx-runtime-FVsy8kgq.js";import{S,a as M,M as T}from"./mobile-keypad-wPUeR8mM.js";import{a as I}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r}from"./index-TT1qJ6UJ.js";import{M as b}from"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./button-assets-txIojR3b.js";import{K as d}from"./enums-x5qaTru7.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";const ot={title:"math-input/Full Mobile MathInput",parameters:{backgrounds:{default:"light background",values:[{name:"light background",value:"lightgrey",default:!0}]}}},N=({keypadElement:t,setKeypadElement:a})=>{const[h,v]=r.useState(""),[i,g]=r.useState(!1),[n,y]=r.useState(!0),[m,K]=r.useState(!0),x=r.useRef(null),C=n?"CDOT":"TIMES";return r.useEffect(()=>{t==null||t.configure({keypadType:i?d.EXPRESSION:d.FRACTION,extraKeys:i?["x","y","PI","THETA"]:[],times:n},()=>{})},[t,i,n]),u("div",{style:{padding:"1rem 2rem"},children:[u("div",{children:[e("div",{children:"NOTE: To properly test the input interaction, you will need to simulate a device using the dev tools. MathInput requires touch events (not click events)."}),u("div",{style:{padding:"1rem 0"},children:[e("button",{onClick:()=>g(!i),children:`Use ${i?"Fraction":"Expression"} Keypad`}),e("button",{onClick:()=>K(!m),children:`Use ${m?"Legacy":"New"} Keypad`}),e("button",{onClick:()=>y(!n),children:"Toggle to "+C})]})]}),e(b,{value:h,ref:x,keypadElement:t,onChange:(o,p)=>{v(o),p==null||p()},onFocus:()=>{t==null||t.activate()},onBlur:()=>{t==null||t.dismiss()},ariaLabel:"Mobile input"}),e(T,{onElementMounted:o=>{o&&a(o)},onDismiss:()=>{},onAnalyticsEvent:async o=>I("onAnalyticsEvent")(o)})]})};function s(){return e(S,{children:e(M.Consumer,{children:({keypadElement:t,setKeypadElement:a})=>e(N,{keypadElement:t,setKeypadElement:a})})})}s.__docgenInfo={description:"",methods:[],displayName:"Wrapped"};var c,l,f;s.parameters={...s.parameters,docs:{...(c=s.parameters)==null?void 0:c.docs,source:{originalSource:`function Wrapped() { return {({ diff --git a/assets/graded-group-set.stories-0IRlHspa.js b/assets/graded-group-set.stories-JouYjcvg.js similarity index 86% rename from assets/graded-group-set.stories-0IRlHspa.js rename to assets/graded-group-set.stories-JouYjcvg.js index c2e851add9..610879db5e 100644 --- a/assets/graded-group-set.stories-0IRlHspa.js +++ b/assets/graded-group-set.stories-JouYjcvg.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as s}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const n={content:`#Section 1: Adding tenths less than one +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as s}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const n={content:`#Section 1: Adding tenths less than one [[☃ graded-group-set 1]] diff --git a/assets/graded-group.stories-OTYvBJb2.js b/assets/graded-group.stories-m7TMGy4R.js similarity index 77% rename from assets/graded-group.stories-OTYvBJb2.js rename to assets/graded-group.stories-m7TMGy4R.js index ef26699ba1..795077a130 100644 --- a/assets/graded-group.stories-OTYvBJb2.js +++ b/assets/graded-group.stories-m7TMGy4R.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const m={content:`--- +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const m={content:`--- ##Check your understanding! diff --git a/assets/graph-6kifrlu5.js b/assets/graph-2fIs0C28.js similarity index 99% rename from assets/graph-6kifrlu5.js rename to assets/graph-2fIs0C28.js index e0619714cc..bf1f4d2723 100644 --- a/assets/graph-6kifrlu5.js +++ b/assets/graph-2fIs0C28.js @@ -1,4 +1,4 @@ -import{j as g,a as S}from"./jsx-runtime-FVsy8kgq.js";import{U as k}from"./util-F8-MDmsT.js";import{G as M,m as p,S as _}from"./svg-image-vbtSDKh6.js";import{_ as u,$ as d}from"./jquery-yG1GhClm.js";import{r as q}from"./index-TT1qJ6UJ.js";import{R as x}from"./index-7vsPyIck.js";import{c as C}from"./asset-context-I7yIqWki.js";import{i as G}from"./constants-iPV6vHZm.js";const D={url:null},N={fontStyle:"italic",fontWeight:"bold",fontSize:"32px",width:"100%",height:"100%",textAlign:"center",backgroundColor:"white",position:"absolute",zIndex:1,transition:"opacity .25s ease-in-out"},O={position:"relative",top:"25%"};function R(y,s){return Math.floor((y[1]-y[0])/s)}const v=class v extends q.Component{constructor(){super(...arguments),this.reset=()=>{this._setupGraphie(!1)},this.graphie=()=>this._graphie,this.pointsFromNormalized=(s,e)=>{const n=this;return u.map(s,function(a){return u.map(a,function(i,o){const l=n.props.range[o];if(e)return l[0]+(l[1]-l[0])*i;const m=n.props.step[o],t=R(l,m),h=Math.round(i*t);return l[0]+m*h})})},this._setupGraphie=s=>{if(this._hasSetupGraphieThisUpdate)return;const e=x.findDOMNode(this.refs.graphieDiv);d(e).empty();const n=this.props.labels.map(r=>k.unescapeMathMode(r)),a=this.props.range,i=this._graphie=M.createGraphie(e),o=this._getGridConfig();i.snap=this.props.snapStep,this.props.markings==="graph"?(i.graphInit({range:a,scale:p(o,r=>r.scale),axisArrows:"<->",labelFormat:function(r){return"\\small{"+r+"}"},gridStep:this.props.gridStep,tickStep:p(o,r=>r.tickStep),labelStep:1,unityLabels:p(o,r=>r.unityLabel),isMobile:this.props.isMobile}),i.label([0,a[1][1]],n[1],this.props.isMobile?"below right":"above"),i.label([a[0][1],0],n[0],this.props.isMobile?"above left":"right")):this.props.markings==="grid"?i.graphInit({range:a,scale:p(o,r=>r.scale),gridStep:this.props.gridStep,axes:!1,ticks:!1,labels:!1,isMobile:this.props.isMobile}):this.props.markings==="none"&&i.init({range:a,scale:p(o,r=>r.scale),isMobile:this.props.isMobile});const l=.5,m=0;let t;if(this.props.instructions){t=d("
"),u.each(N,function(c,f){t.css(f,c)}),t.css("opacity",l);const r=d("",{text:this.props.instructions});u.each(O,function(c,f){r.css(f,c)}),t.append(r),d(e).append(t)}else t=void 0;const h=t||this.props.onMouseDown?u.bind(function(r){t&&(t.remove(),t=null),this.props.onMouseDown(r)},this):void 0,w=t?function(){t&&t.css("opacity",m)}:void 0,T=t?function(){t&&t.css("opacity",l)}:void 0;i.addMouseLayer({onClick:this.props.onClick,onMouseDown:h,onMouseOver:w,onMouseOut:T,onMouseMove:this.props.onMouseMove,allowScratchpad:!0,setDrawingAreaAvailable:this.props.setDrawingAreaAvailable}),this._updateProtractor(),this._updateRuler(),this._hasSetupGraphieThisUpdate=!0,!s&&this.props.onGraphieUpdated&&this.props.onGraphieUpdated(i)},this._getGridConfig=()=>p(this.props.step,(s,e)=>k.gridDimensionConfig(s,this.props.range[e],this.props.box[e],this.props.gridStep[e])),this._updateProtractor=()=>{if(this.protractor&&this.protractor.remove(),this.props.showProtractor){const s=this.pointsFromNormalized([[.5,.05]])[0];this.protractor=this._graphie.protractor(s)}},this._updateRuler=()=>{if(this.ruler&&this.ruler.remove(),this.props.showRuler){const s=this.pointsFromNormalized([[.5,.25]])[0],e=this._graphie.range[0][1]-this._graphie.range[0][0];this.ruler=this._graphie.ruler({center:s,label:this.props.rulerLabel,pixelsPerUnit:this._graphie.scale[0],ticksPerUnit:this.props.rulerTicks,units:Math.round(.8*e)})}},this.toJSON=()=>u.pick(this.props,"range","step","markings","labels","backgroundImage","showProtractor","showRuler","rulerLabel","rulerTicks","gridStep","snapStep")}componentDidMount(){this._setupGraphie(!0)}UNSAFE_componentWillReceiveProps(s){const e=["labels","range","step","markings","showProtractor","showRuler","rulerLabel","rulerTicks","gridStep","snapStep"],n=this;u.each(e,function(a){u.isEqual(n.props[a],s[a])||(n._shouldSetupGraphie=!0)})}componentDidUpdate(){this._hasSetupGraphieThisUpdate=!1,this._shouldSetupGraphie&&(this._setupGraphie(!1),this._shouldSetupGraphie=!1)}render(){let s;const e=this.props.backgroundImage;if(e.url){const n=this.props.box[0]/G.defaultBoxSize;s=g(C.Consumer,{children:({setAssetStatus:a})=>g(_,{src:e.url,width:e.width,height:e.height,scale:n,responsive:!1,setAssetStatus:a})})}else s=null;return S("div",{className:"graphie-container above-scratchpad",style:{width:this.props.box[0],height:this.props.box[1]},onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,onClick:this.onClick,children:[s,g("div",{className:"graphie",ref:"graphieDiv"})]})}};v.defaultProps={labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[.5,.5],markings:"graph",backgroundImage:D,showProtractor:!1,showRuler:!1,rulerLabel:"",rulerTicks:10,isMobile:!1};let b=v;b.__docgenInfo={description:"",methods:[{name:"reset",docblock:null,modifiers:[],params:[],returns:null},{name:"graphie",docblock:null,modifiers:[],params:[],returns:null},{name:"pointsFromNormalized",docblock:null,modifiers:[],params:[{name:"coordsList",optional:!1,type:null},{name:"noSnap",optional:!1,type:null}],returns:null},{name:"_setupGraphie",docblock:null,modifiers:[],params:[{name:"initialMount",optional:!1,type:null}],returns:null},{name:"_getGridConfig",docblock:null,modifiers:[],params:[],returns:null},{name:"_updateProtractor",docblock:null,modifiers:[],params:[],returns:null},{name:"_updateRuler",docblock:null,modifiers:[],params:[],returns:null},{name:"toJSON",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Graph",props:{box:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},labels:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'["x", "y"]',computed:!1}},range:{required:!1,tsType:{name:"tuple",raw:"[Coord, Coord]",elements:[{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]}]},description:"",defaultValue:{value:`[ +import{j as g,a as S}from"./jsx-runtime-FVsy8kgq.js";import{U as k}from"./util-F8-MDmsT.js";import{G as M,m as p,S as _}from"./svg-image-4Vh9uTQ6.js";import{_ as u,$ as d}from"./jquery-yG1GhClm.js";import{r as q}from"./index-TT1qJ6UJ.js";import{R as x}from"./index-7vsPyIck.js";import{c as C}from"./asset-context-I7yIqWki.js";import{i as G}from"./constants-iPV6vHZm.js";const D={url:null},N={fontStyle:"italic",fontWeight:"bold",fontSize:"32px",width:"100%",height:"100%",textAlign:"center",backgroundColor:"white",position:"absolute",zIndex:1,transition:"opacity .25s ease-in-out"},O={position:"relative",top:"25%"};function R(y,s){return Math.floor((y[1]-y[0])/s)}const v=class v extends q.Component{constructor(){super(...arguments),this.reset=()=>{this._setupGraphie(!1)},this.graphie=()=>this._graphie,this.pointsFromNormalized=(s,e)=>{const n=this;return u.map(s,function(a){return u.map(a,function(i,o){const l=n.props.range[o];if(e)return l[0]+(l[1]-l[0])*i;const m=n.props.step[o],t=R(l,m),h=Math.round(i*t);return l[0]+m*h})})},this._setupGraphie=s=>{if(this._hasSetupGraphieThisUpdate)return;const e=x.findDOMNode(this.refs.graphieDiv);d(e).empty();const n=this.props.labels.map(r=>k.unescapeMathMode(r)),a=this.props.range,i=this._graphie=M.createGraphie(e),o=this._getGridConfig();i.snap=this.props.snapStep,this.props.markings==="graph"?(i.graphInit({range:a,scale:p(o,r=>r.scale),axisArrows:"<->",labelFormat:function(r){return"\\small{"+r+"}"},gridStep:this.props.gridStep,tickStep:p(o,r=>r.tickStep),labelStep:1,unityLabels:p(o,r=>r.unityLabel),isMobile:this.props.isMobile}),i.label([0,a[1][1]],n[1],this.props.isMobile?"below right":"above"),i.label([a[0][1],0],n[0],this.props.isMobile?"above left":"right")):this.props.markings==="grid"?i.graphInit({range:a,scale:p(o,r=>r.scale),gridStep:this.props.gridStep,axes:!1,ticks:!1,labels:!1,isMobile:this.props.isMobile}):this.props.markings==="none"&&i.init({range:a,scale:p(o,r=>r.scale),isMobile:this.props.isMobile});const l=.5,m=0;let t;if(this.props.instructions){t=d("
"),u.each(N,function(c,f){t.css(f,c)}),t.css("opacity",l);const r=d("",{text:this.props.instructions});u.each(O,function(c,f){r.css(f,c)}),t.append(r),d(e).append(t)}else t=void 0;const h=t||this.props.onMouseDown?u.bind(function(r){t&&(t.remove(),t=null),this.props.onMouseDown(r)},this):void 0,w=t?function(){t&&t.css("opacity",m)}:void 0,T=t?function(){t&&t.css("opacity",l)}:void 0;i.addMouseLayer({onClick:this.props.onClick,onMouseDown:h,onMouseOver:w,onMouseOut:T,onMouseMove:this.props.onMouseMove,allowScratchpad:!0,setDrawingAreaAvailable:this.props.setDrawingAreaAvailable}),this._updateProtractor(),this._updateRuler(),this._hasSetupGraphieThisUpdate=!0,!s&&this.props.onGraphieUpdated&&this.props.onGraphieUpdated(i)},this._getGridConfig=()=>p(this.props.step,(s,e)=>k.gridDimensionConfig(s,this.props.range[e],this.props.box[e],this.props.gridStep[e])),this._updateProtractor=()=>{if(this.protractor&&this.protractor.remove(),this.props.showProtractor){const s=this.pointsFromNormalized([[.5,.05]])[0];this.protractor=this._graphie.protractor(s)}},this._updateRuler=()=>{if(this.ruler&&this.ruler.remove(),this.props.showRuler){const s=this.pointsFromNormalized([[.5,.25]])[0],e=this._graphie.range[0][1]-this._graphie.range[0][0];this.ruler=this._graphie.ruler({center:s,label:this.props.rulerLabel,pixelsPerUnit:this._graphie.scale[0],ticksPerUnit:this.props.rulerTicks,units:Math.round(.8*e)})}},this.toJSON=()=>u.pick(this.props,"range","step","markings","labels","backgroundImage","showProtractor","showRuler","rulerLabel","rulerTicks","gridStep","snapStep")}componentDidMount(){this._setupGraphie(!0)}UNSAFE_componentWillReceiveProps(s){const e=["labels","range","step","markings","showProtractor","showRuler","rulerLabel","rulerTicks","gridStep","snapStep"],n=this;u.each(e,function(a){u.isEqual(n.props[a],s[a])||(n._shouldSetupGraphie=!0)})}componentDidUpdate(){this._hasSetupGraphieThisUpdate=!1,this._shouldSetupGraphie&&(this._setupGraphie(!1),this._shouldSetupGraphie=!1)}render(){let s;const e=this.props.backgroundImage;if(e.url){const n=this.props.box[0]/G.defaultBoxSize;s=g(C.Consumer,{children:({setAssetStatus:a})=>g(_,{src:e.url,width:e.width,height:e.height,scale:n,responsive:!1,setAssetStatus:a})})}else s=null;return S("div",{className:"graphie-container above-scratchpad",style:{width:this.props.box[0],height:this.props.box[1]},onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,onClick:this.onClick,children:[s,g("div",{className:"graphie",ref:"graphieDiv"})]})}};v.defaultProps={labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[.5,.5],markings:"graph",backgroundImage:D,showProtractor:!1,showRuler:!1,rulerLabel:"",rulerTicks:10,isMobile:!1};let b=v;b.__docgenInfo={description:"",methods:[{name:"reset",docblock:null,modifiers:[],params:[],returns:null},{name:"graphie",docblock:null,modifiers:[],params:[],returns:null},{name:"pointsFromNormalized",docblock:null,modifiers:[],params:[{name:"coordsList",optional:!1,type:null},{name:"noSnap",optional:!1,type:null}],returns:null},{name:"_setupGraphie",docblock:null,modifiers:[],params:[{name:"initialMount",optional:!1,type:null}],returns:null},{name:"_getGridConfig",docblock:null,modifiers:[],params:[],returns:null},{name:"_updateProtractor",docblock:null,modifiers:[],params:[],returns:null},{name:"_updateRuler",docblock:null,modifiers:[],params:[],returns:null},{name:"toJSON",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Graph",props:{box:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},labels:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'["x", "y"]',computed:!1}},range:{required:!1,tsType:{name:"tuple",raw:"[Coord, Coord]",elements:[{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]}]},description:"",defaultValue:{value:`[ [-10, 10], [-10, 10], ]`,computed:!1}},step:{required:!1,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:"",defaultValue:{value:"[1, 1]",computed:!1}},gridStep:{required:!1,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:"",defaultValue:{value:"[1, 1]",computed:!1}},snapStep:{required:!1,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:"",defaultValue:{value:"[0.5, 0.5]",computed:!1}},markings:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"graph"',computed:!1}},backgroundImage:{required:!1,tsType:{name:"signature",type:"object",raw:`{ diff --git a/assets/graph-settings-6z3yJikg.js b/assets/graph-settings-VTKCtXa5.js similarity index 95% rename from assets/graph-settings-6z3yJikg.js rename to assets/graph-settings-VTKCtXa5.js index 1e27fe55cd..9bc5b05c06 100644 --- a/assets/graph-settings-6z3yJikg.js +++ b/assets/graph-settings-VTKCtXa5.js @@ -1 +1 @@ -import{j as a,a as o}from"./jsx-runtime-FVsy8kgq.js";import{p as v,c as T}from"./article-renderer-GCz9idJ2.js";import{_ as i}from"./jquery-yG1GhClm.js";import{U as g,K as f}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import{g as k}from"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as w}from"./components-V6aclUoQ.js";import{i as x}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{C as m}from"./index-QCAhLhLD.js";import{c as y}from"./index-fuycm_QE.js";import{P as n}from"./index-0C4KXdeC.js";import{R as N}from"./index-7vsPyIck.js";const{ButtonGroup:R,InfoTip:G,RangeInput:u}=w,C={url:null,width:0,height:0};function I(e,s){return Math.floor((e[1]-e[0])/s)}const F=y({displayName:"GraphSettings",propTypes:{...v,editableSettings:n.arrayOf(n.oneOf(["canvas","graph","snap","image","measure"])),box:n.arrayOf(n.number),labels:n.arrayOf(n.string),range:n.arrayOf(n.arrayOf(n.number)),step:n.arrayOf(n.number),gridStep:n.arrayOf(n.number),snapStep:n.arrayOf(n.number),valid:n.oneOfType([n.bool,n.string]),backgroundImage:n.object,markings:n.oneOf(["graph","grid","none"]),showProtractor:n.bool,showRuler:n.bool,showTooltips:n.bool,rulerLabel:n.string,rulerTicks:n.number},getDefaultProps:function(){return{editableSettings:["graph","snap","image","measure"],box:[x.defaultBoxSizeSmall,x.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:C,markings:"graph",showProtractor:!1,showRuler:!1,showTooltips:!1,rulerLabel:"",rulerTicks:10}},getInitialState:function(){return this.stateFromProps(this.props)},componentDidMount:function(){this._isMounted=!0,this.changeGraph=i.debounce(this.changeGraph,300)},UNSAFE_componentWillReceiveProps:function(e){(!i.isEqual(this.props.labels,e.labels)||!i.isEqual(this.props.gridStep,e.gridStep)||!i.isEqual(this.props.snapStep,e.snapStep)||!i.isEqual(this.props.step,e.step)||!i.isEqual(this.props.range,e.range)||!i.isEqual(this.props.backgroundImage,e.backgroundImage))&&this.setState(this.stateFromProps(e))},componentWillUnmount:function(){this._isMounted=!1},stateFromProps:function(e){return{labelsTextbox:e.labels,gridStepTextbox:e.gridStep,snapStepTextbox:e.snapStep,stepTextbox:e.step,rangeTextbox:e.range,backgroundImage:i.clone(e.backgroundImage)}},change(...e){return T.apply(this,e)},changeRulerLabel:function(e){this.change({rulerLabel:e.target.value})},changeRulerTicks:function(e){this.change({rulerTicks:+e.target.value})},changeBackgroundUrl:function(e){if(e.type==="keypress"&&e.key!=="Enter")return;const s=(l,c,h)=>{const r=i.clone(this.props.backgroundImage);r.url=l,r.width=c,r.height=h,this.setState({backgroundImage:r},this.changeGraph)},t=N.findDOMNode(this.refs["bg-url"]).value;t?g.getImageSize(t,(l,c)=>{this._isMounted&&s(t,l,c)}):s(null,0,0)},renderLabelChoices:function(e){return i.map(e,function([s,t]){return a("option",{value:t,children:s},t)})},validRange:function(e){return i.every(e,function(t){return i.isFinite(t)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number"},validateStepValue:function(e){const{step:s,range:t,name:l,minTicks:c,maxTicks:h}=e;if(!i.isFinite(s))return l+" must be a valid number";const r=I(t,s);return rh?l+" is too small, there can be at most "+h+" ticks.":!0},validSnapStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Snap step",minTicks:5,maxTicks:60})},validGridStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Grid step",minTicks:3,maxTicks:60})},validStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Step",minTicks:3,maxTicks:20})},validBackgroundImageSize:function(e){return e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0},validateGraphSettings:function(e,s,t,l,c){const h=this;let r;if(!i.every(e,function(p){return r=h.validRange(p),r===!0})||!i.every(s,function(p,d){return r=h.validStep(p,e[d]),r===!0})||!i.every(t,function(p,d){return r=h.validGridStep(p,e[d]),r===!0})||!i.every(l,function(p,d){return r=h.validSnapStep(p,e[d]),r===!0}))return r;const S=this.validBackgroundImageSize(c);return S!==!0?(r=S,r):!0},changeLabel:function(e,s){const t=s.target.value,l=this.state.labelsTextbox.slice();l[e]=t,this.setState({labelsTextbox:l},this.changeGraph)},changeRange:function(e,s){const t=this.state.rangeTextbox.slice();t[e]=s;const l=this.state.stepTextbox.slice(),c=this.state.gridStepTextbox.slice(),h=this.state.snapStepTextbox.slice(),r=g.scaleFromExtent(t[e],this.props.box[e]);this.validRange(t[e])===!0&&(l[e]=g.tickStepFromExtent(t[e],this.props.box[e]),c[e]=g.gridStepFromTickStep(l[e],r),h[e]=c[e]/2),this.setState({stepTextbox:l,gridStepTextbox:c,snapStepTextbox:h,rangeTextbox:t},this.changeGraph)},changeStep:function(e){this.setState({stepTextbox:e},this.changeGraph)},changeSnapStep:function(e){this.setState({snapStepTextbox:e},this.changeGraph)},changeGridStep:function(e){this.setState({gridStepTextbox:e,snapStepTextbox:i.map(e,function(s){return s/2})},this.changeGraph)},changeGraph:function(){const e=this.state.labelsTextbox,s=i.map(this.state.rangeTextbox,function(b){return i.map(b,Number)}),t=i.map(this.state.stepTextbox,Number),l=this.state.gridStepTextbox,c=this.state.snapStepTextbox,h=this.state.backgroundImage,r=this.validateGraphSettings(s,t,l,c,h);r===!0?this.change({valid:!0,labels:e,range:s,step:t,gridStep:l,snapStep:c,backgroundImage:h}):this.change({valid:r})},render:function(){const e=[f.roundTo(2,g.scaleFromExtent(this.props.range[0],this.props.box[0])),f.roundTo(2,g.scaleFromExtent(this.props.range[1],this.props.box[1]))],{TeX:s}=k();return o("div",{children:[i.contains(this.props.editableSettings,"canvas")&&o("div",{className:"graph-settings",children:[o("div",{className:"perseus-widget-row",children:[a("label",{htmlFor:"canvas-size",children:"Canvas size (x,y pixels)"}),a(u,{id:"canvas-size",value:this.props.box,onChange:t=>{this.change({box:t})}})]}),o("div",{className:"perseus-widget-row",children:["Scale (px per div):"," ",a(s,{children:"("+e[0]+", "+e[1]+")"})]})]}),i.contains(this.props.editableSettings,"graph")&&o("div",{className:"graph-settings",children:[o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"labels-x",children:"x Label"}),a("input",{id:"labels-x",type:"text",className:"graph-settings-axis-label",ref:"labels-0",onChange:t=>this.changeLabel(0,t),value:this.state.labelsTextbox[0]||""})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"labels-y",children:"y Label"}),a("input",{id:"labels-y",type:"text",className:"graph-settings-axis-label",ref:"labels-1",onChange:t=>this.changeLabel(1,t),value:this.state.labelsTextbox[1]||""})]})]}),o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"range-x",children:"x Range"}),a(u,{id:"range-x",value:this.state.rangeTextbox[0],onChange:t=>this.changeRange(0,t)})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"range-y",children:"y Range"}),a(u,{id:"range-y",value:this.state.rangeTextbox[1],onChange:t=>this.changeRange(1,t)})]})]}),o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"tick-step",children:"Tick Step"}),a(u,{id:"tick-step",value:this.state.stepTextbox,onChange:this.changeStep})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"grid-step",children:"Grid Step"}),a(u,{id:"grid-step",value:this.state.gridStepTextbox,onChange:this.changeGridStep})]})]}),i.contains(this.props.editableSettings,"snap")&&a("div",{className:"perseus-widget-row",children:o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"snap-step",children:"Snap Step"}),a(u,{id:"snap-step",value:this.state.snapStepTextbox,onChange:this.changeSnapStep})]})}),o("div",{className:"perseus-widget-row",children:[a("label",{children:"Markings: "}),a(R,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})]}),a("div",{className:"perseus-widget-left-col",children:a(m,{label:"Show tooltips",checked:this.props.showTooltips,onChange:t=>{this.change({showTooltips:t})}})})]}),i.contains(this.props.editableSettings,"image")&&o("div",{className:"image-settings",children:[a("div",{children:"Background image:"}),o("div",{children:[a("label",{htmlFor:"bg-url",children:"Url:"}),a("input",{id:"bg-url",type:"text",className:"graph-settings-background-url",ref:"bg-url",value:this.state.backgroundImage.url||"",onChange:t=>{const l=i.clone(this.props.backgroundImage);l.url=t.target.value,this.setState({backgroundImage:l})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a(G,{children:a("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]})]}),i.contains(this.props.editableSettings,"measure")&&o("div",{className:"misc-settings",children:[o("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(m,{label:"Show ruler",checked:this.props.showRuler,onChange:t=>{this.change({showRuler:t})}})}),a("div",{className:"perseus-widget-right-col",children:a(m,{label:"Show protractor",checked:this.props.showProtractor,onChange:t=>{this.change({showProtractor:t})}})})]}),this.props.showRuler&&o("div",{children:[a("div",{children:o("label",{children:[" ","Ruler label:"," ",o("select",{onChange:this.changeRulerLabel,value:this.props.rulerLabel,children:[a("option",{value:"",children:"None"}),a("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),a("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),a("div",{children:o("label",{children:[" ","Ruler ticks:"," ",a("select",{onChange:this.changeRulerTicks,value:this.props.rulerTicks,children:i.map([1,2,4,8,10,16],function(t){return a("option",{value:t,children:t},t)})})]})})]})]})]})}}),ae=F;export{ae as G}; +import{j as a,a as o}from"./jsx-runtime-FVsy8kgq.js";import{p as v,c as T}from"./article-renderer-ub6lGcPc.js";import{_ as i}from"./jquery-yG1GhClm.js";import{U as g,K as f}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import{g as k}from"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as w}from"./components-yT7oveOH.js";import{i as x}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{C as m}from"./index-QCAhLhLD.js";import{c as y}from"./index-fuycm_QE.js";import{P as n}from"./index-0C4KXdeC.js";import{R as N}from"./index-7vsPyIck.js";const{ButtonGroup:R,InfoTip:G,RangeInput:u}=w,C={url:null,width:0,height:0};function I(e,s){return Math.floor((e[1]-e[0])/s)}const F=y({displayName:"GraphSettings",propTypes:{...v,editableSettings:n.arrayOf(n.oneOf(["canvas","graph","snap","image","measure"])),box:n.arrayOf(n.number),labels:n.arrayOf(n.string),range:n.arrayOf(n.arrayOf(n.number)),step:n.arrayOf(n.number),gridStep:n.arrayOf(n.number),snapStep:n.arrayOf(n.number),valid:n.oneOfType([n.bool,n.string]),backgroundImage:n.object,markings:n.oneOf(["graph","grid","none"]),showProtractor:n.bool,showRuler:n.bool,showTooltips:n.bool,rulerLabel:n.string,rulerTicks:n.number},getDefaultProps:function(){return{editableSettings:["graph","snap","image","measure"],box:[x.defaultBoxSizeSmall,x.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:C,markings:"graph",showProtractor:!1,showRuler:!1,showTooltips:!1,rulerLabel:"",rulerTicks:10}},getInitialState:function(){return this.stateFromProps(this.props)},componentDidMount:function(){this._isMounted=!0,this.changeGraph=i.debounce(this.changeGraph,300)},UNSAFE_componentWillReceiveProps:function(e){(!i.isEqual(this.props.labels,e.labels)||!i.isEqual(this.props.gridStep,e.gridStep)||!i.isEqual(this.props.snapStep,e.snapStep)||!i.isEqual(this.props.step,e.step)||!i.isEqual(this.props.range,e.range)||!i.isEqual(this.props.backgroundImage,e.backgroundImage))&&this.setState(this.stateFromProps(e))},componentWillUnmount:function(){this._isMounted=!1},stateFromProps:function(e){return{labelsTextbox:e.labels,gridStepTextbox:e.gridStep,snapStepTextbox:e.snapStep,stepTextbox:e.step,rangeTextbox:e.range,backgroundImage:i.clone(e.backgroundImage)}},change(...e){return T.apply(this,e)},changeRulerLabel:function(e){this.change({rulerLabel:e.target.value})},changeRulerTicks:function(e){this.change({rulerTicks:+e.target.value})},changeBackgroundUrl:function(e){if(e.type==="keypress"&&e.key!=="Enter")return;const s=(l,c,h)=>{const r=i.clone(this.props.backgroundImage);r.url=l,r.width=c,r.height=h,this.setState({backgroundImage:r},this.changeGraph)},t=N.findDOMNode(this.refs["bg-url"]).value;t?g.getImageSize(t,(l,c)=>{this._isMounted&&s(t,l,c)}):s(null,0,0)},renderLabelChoices:function(e){return i.map(e,function([s,t]){return a("option",{value:t,children:s},t)})},validRange:function(e){return i.every(e,function(t){return i.isFinite(t)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number"},validateStepValue:function(e){const{step:s,range:t,name:l,minTicks:c,maxTicks:h}=e;if(!i.isFinite(s))return l+" must be a valid number";const r=I(t,s);return rh?l+" is too small, there can be at most "+h+" ticks.":!0},validSnapStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Snap step",minTicks:5,maxTicks:60})},validGridStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Grid step",minTicks:3,maxTicks:60})},validStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Step",minTicks:3,maxTicks:20})},validBackgroundImageSize:function(e){return e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0},validateGraphSettings:function(e,s,t,l,c){const h=this;let r;if(!i.every(e,function(p){return r=h.validRange(p),r===!0})||!i.every(s,function(p,d){return r=h.validStep(p,e[d]),r===!0})||!i.every(t,function(p,d){return r=h.validGridStep(p,e[d]),r===!0})||!i.every(l,function(p,d){return r=h.validSnapStep(p,e[d]),r===!0}))return r;const S=this.validBackgroundImageSize(c);return S!==!0?(r=S,r):!0},changeLabel:function(e,s){const t=s.target.value,l=this.state.labelsTextbox.slice();l[e]=t,this.setState({labelsTextbox:l},this.changeGraph)},changeRange:function(e,s){const t=this.state.rangeTextbox.slice();t[e]=s;const l=this.state.stepTextbox.slice(),c=this.state.gridStepTextbox.slice(),h=this.state.snapStepTextbox.slice(),r=g.scaleFromExtent(t[e],this.props.box[e]);this.validRange(t[e])===!0&&(l[e]=g.tickStepFromExtent(t[e],this.props.box[e]),c[e]=g.gridStepFromTickStep(l[e],r),h[e]=c[e]/2),this.setState({stepTextbox:l,gridStepTextbox:c,snapStepTextbox:h,rangeTextbox:t},this.changeGraph)},changeStep:function(e){this.setState({stepTextbox:e},this.changeGraph)},changeSnapStep:function(e){this.setState({snapStepTextbox:e},this.changeGraph)},changeGridStep:function(e){this.setState({gridStepTextbox:e,snapStepTextbox:i.map(e,function(s){return s/2})},this.changeGraph)},changeGraph:function(){const e=this.state.labelsTextbox,s=i.map(this.state.rangeTextbox,function(b){return i.map(b,Number)}),t=i.map(this.state.stepTextbox,Number),l=this.state.gridStepTextbox,c=this.state.snapStepTextbox,h=this.state.backgroundImage,r=this.validateGraphSettings(s,t,l,c,h);r===!0?this.change({valid:!0,labels:e,range:s,step:t,gridStep:l,snapStep:c,backgroundImage:h}):this.change({valid:r})},render:function(){const e=[f.roundTo(2,g.scaleFromExtent(this.props.range[0],this.props.box[0])),f.roundTo(2,g.scaleFromExtent(this.props.range[1],this.props.box[1]))],{TeX:s}=k();return o("div",{children:[i.contains(this.props.editableSettings,"canvas")&&o("div",{className:"graph-settings",children:[o("div",{className:"perseus-widget-row",children:[a("label",{htmlFor:"canvas-size",children:"Canvas size (x,y pixels)"}),a(u,{id:"canvas-size",value:this.props.box,onChange:t=>{this.change({box:t})}})]}),o("div",{className:"perseus-widget-row",children:["Scale (px per div):"," ",a(s,{children:"("+e[0]+", "+e[1]+")"})]})]}),i.contains(this.props.editableSettings,"graph")&&o("div",{className:"graph-settings",children:[o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"labels-x",children:"x Label"}),a("input",{id:"labels-x",type:"text",className:"graph-settings-axis-label",ref:"labels-0",onChange:t=>this.changeLabel(0,t),value:this.state.labelsTextbox[0]||""})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"labels-y",children:"y Label"}),a("input",{id:"labels-y",type:"text",className:"graph-settings-axis-label",ref:"labels-1",onChange:t=>this.changeLabel(1,t),value:this.state.labelsTextbox[1]||""})]})]}),o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"range-x",children:"x Range"}),a(u,{id:"range-x",value:this.state.rangeTextbox[0],onChange:t=>this.changeRange(0,t)})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"range-y",children:"y Range"}),a(u,{id:"range-y",value:this.state.rangeTextbox[1],onChange:t=>this.changeRange(1,t)})]})]}),o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"tick-step",children:"Tick Step"}),a(u,{id:"tick-step",value:this.state.stepTextbox,onChange:this.changeStep})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"grid-step",children:"Grid Step"}),a(u,{id:"grid-step",value:this.state.gridStepTextbox,onChange:this.changeGridStep})]})]}),i.contains(this.props.editableSettings,"snap")&&a("div",{className:"perseus-widget-row",children:o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"snap-step",children:"Snap Step"}),a(u,{id:"snap-step",value:this.state.snapStepTextbox,onChange:this.changeSnapStep})]})}),o("div",{className:"perseus-widget-row",children:[a("label",{children:"Markings: "}),a(R,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})]}),a("div",{className:"perseus-widget-left-col",children:a(m,{label:"Show tooltips",checked:this.props.showTooltips,onChange:t=>{this.change({showTooltips:t})}})})]}),i.contains(this.props.editableSettings,"image")&&o("div",{className:"image-settings",children:[a("div",{children:"Background image:"}),o("div",{children:[a("label",{htmlFor:"bg-url",children:"Url:"}),a("input",{id:"bg-url",type:"text",className:"graph-settings-background-url",ref:"bg-url",value:this.state.backgroundImage.url||"",onChange:t=>{const l=i.clone(this.props.backgroundImage);l.url=t.target.value,this.setState({backgroundImage:l})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a(G,{children:a("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]})]}),i.contains(this.props.editableSettings,"measure")&&o("div",{className:"misc-settings",children:[o("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(m,{label:"Show ruler",checked:this.props.showRuler,onChange:t=>{this.change({showRuler:t})}})}),a("div",{className:"perseus-widget-right-col",children:a(m,{label:"Show protractor",checked:this.props.showProtractor,onChange:t=>{this.change({showProtractor:t})}})})]}),this.props.showRuler&&o("div",{children:[a("div",{children:o("label",{children:[" ","Ruler label:"," ",o("select",{onChange:this.changeRulerLabel,value:this.props.rulerLabel,children:[a("option",{value:"",children:"None"}),a("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),a("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),a("div",{children:o("label",{children:[" ","Ruler ticks:"," ",a("select",{onChange:this.changeRulerTicks,value:this.props.rulerTicks,children:i.map([1,2,4,8,10,16],function(t){return a("option",{value:t,children:t},t)})})]})})]})]})]})}}),ae=F;export{ae as G}; diff --git a/assets/graph-settings.stories-y6746yqW.js b/assets/graph-settings.stories-i5cvuxUm.js similarity index 70% rename from assets/graph-settings.stories-y6746yqW.js rename to assets/graph-settings.stories-i5cvuxUm.js index ec07803b58..208bee00c7 100644 --- a/assets/graph-settings.stories-y6746yqW.js +++ b/assets/graph-settings.stories-i5cvuxUm.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{G as i}from"./graph-settings-6z3yJikg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";const a={editableSettings:{control:{type:"array",options:["canvas","graph","snap","image","measure"]}},box:{control:{type:"array"}},range:{control:{type:"object"}},labels:{control:{type:"object"}},step:{control:{type:"object"}},gridStep:{control:{type:"object"}},snapStep:{control:{type:"object"}},valid:{control:{type:"text"}},backgroundImage:{control:{type:"object"}},markings:{control:{type:"select"},table:{type:{summary:'"graph" | "grid" | "none"'}},type:{name:"enum",value:["graph","grid","none"],required:!1}},rulerLabel:{control:{type:"text"}},rulerTicks:{control:{type:"number"}},showTooltips:{control:{type:"boolean"}},onChange:{control:{type:"function"}}},Yt={title:"PerseusEditor/Components/Graph Settings",component:i,argTypes:a},t=m=>e(i,{...m});t.args={range:[[-10,10],[-10,10]]};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,o,p;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{G as i}from"./graph-settings-VTKCtXa5.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";const a={editableSettings:{control:{type:"array",options:["canvas","graph","snap","image","measure"]}},box:{control:{type:"array"}},range:{control:{type:"object"}},labels:{control:{type:"object"}},step:{control:{type:"object"}},gridStep:{control:{type:"object"}},snapStep:{control:{type:"object"}},valid:{control:{type:"text"}},backgroundImage:{control:{type:"object"}},markings:{control:{type:"select"},table:{type:{summary:'"graph" | "grid" | "none"'}},type:{name:"enum",value:["graph","grid","none"],required:!1}},rulerLabel:{control:{type:"text"}},rulerTicks:{control:{type:"number"}},showTooltips:{control:{type:"boolean"}},onChange:{control:{type:"function"}}},Yt={title:"PerseusEditor/Components/Graph Settings",component:i,argTypes:a},t=m=>e(i,{...m});t.args={range:[[-10,10],[-10,10]]};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,o,p;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(p=(o=t.parameters)==null?void 0:o.docs)==null?void 0:p.source}}};const Zt=["Default"];export{t as Default,Zt as __namedExportsOrder,Yt as default}; diff --git a/assets/graph.stories-B0iV-0at.js b/assets/graph.stories-oiGBefIM.js similarity index 82% rename from assets/graph.stories-B0iV-0at.js rename to assets/graph.stories-oiGBefIM.js index eef0f380f4..2c1355a6f6 100644 --- a/assets/graph.stories-B0iV-0at.js +++ b/assets/graph.stories-oiGBefIM.js @@ -1,4 +1,4 @@ -import{G as c}from"./graph-6kifrlu5.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-vbtSDKh6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./asset-context-I7yIqWki.js";const o=200,C={title:"Perseus/Components/Graph",component:c,args:{box:[o,o]}},r={},e={args:{labels:["First label","Second label"]}};var t,a,s;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:"{}",...(s=(a=r.parameters)==null?void 0:a.docs)==null?void 0:s.source}}};var p,m,i;e.parameters={...e.parameters,docs:{...(p=e.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{G as c}from"./graph-2fIs0C28.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-4Vh9uTQ6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./asset-context-I7yIqWki.js";const o=200,C={title:"Perseus/Components/Graph",component:c,args:{box:[o,o]}},r={},e={args:{labels:["First label","Second label"]}};var t,a,s;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:"{}",...(s=(a=r.parameters)==null?void 0:a.docs)==null?void 0:s.source}}};var p,m,i;e.parameters={...e.parameters,docs:{...(p=e.parameters)==null?void 0:p.docs,source:{originalSource:`{ args: { labels: ["First label", "Second label"] } diff --git a/assets/grapher.stories-H0DcXurb.js b/assets/grapher.stories-4ohDpS6H.js similarity index 87% rename from assets/grapher.stories-H0DcXurb.js rename to assets/grapher.stories-4ohDpS6H.js index e029d598e9..5169afe5f4 100644 --- a/assets/grapher.stories-H0DcXurb.js +++ b/assets/grapher.stories-4ohDpS6H.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as r}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const A={content:`The graph of the function $h(x)=2|x|$ is shown on the grid below. +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as r}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const A={content:`The graph of the function $h(x)=2|x|$ is shown on the grid below. **Graph the function $f(x)=2|x-8|+1$ in the interactive graph. ** diff --git a/assets/graphie.stories-C3OVYd8B.js b/assets/graphie.stories-TOnlOGdm.js similarity index 71% rename from assets/graphie.stories-C3OVYd8B.js rename to assets/graphie.stories-TOnlOGdm.js index d1392c4aca..5a187e6cbd 100644 --- a/assets/graphie.stories-C3OVYd8B.js +++ b/assets/graphie.stories-TOnlOGdm.js @@ -1,3 +1,3 @@ -import{j as l}from"./jsx-runtime-FVsy8kgq.js";import{S as u}from"./server-item-renderer-with-debug-ui-Idt1fZew.js";import{I as h}from"./article-renderer-GCz9idJ2.js";import{a as g}from"./svg-image-vbtSDKh6.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Dj-_XIAo.js";import"./renderer-VfFjn7ah.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./hints-renderer-PJ9GMfp4.js";import"./shared-4TdECMLk.js";import"./base-radio-13woGQGc.js";import"./choice-none-above-0_QL8uoF.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-VwVxZMGJ.js";import"./side-by-side-kGWaKY6T.js";import"./test-dependencies-zutb-QBJ.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./enums-x5qaTru7.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-6SWUlni2.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-Ts3i1VPI.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";const f={answerArea:Object.fromEntries(h.map(d=>[d,!1])),hints:[],itemDataVersion:{major:0,minor:1},question:{content:"[[☃ image 1]]",images:{},widgets:{"image 1":{alignment:"block",graded:!0,options:{alt:"This chart presents a pie graph divided into 2 sectors: 28 percent are unsuccessful and 72 percent are successful.",backgroundImage:{height:210,url:"web+graphie://cdn.kastatic.org/ka-perseus-graphie/7c0a5afb8670fad738df800ffe16c5e516b48777",width:210},box:[210,210],caption:"Source: NASA “Current and Past Missions”",labels:[],range:[[0,10],[0,10]],static:!1,title:"Percentage of Successful Cometary Missions (1978-2014)"},static:!1,type:"image",version:{major:0,minor:0}}}},answer:null},i=200,at={title:"Perseus/Components/Graphie",component:g,args:{box:[i,i],setup:()=>{},setDrawingAreaAvailable:()=>{}}},t={},r=()=>l(u,{item:f});r.__docgenInfo={description:"A demonstration of a Graphie rendered using the Perseus `Renderer` complete\nwith overlaid labels and an image caption below.",methods:[],displayName:"PieChartGraphieLabels"};var o,e,m;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:"{}",...(m=(e=t.parameters)==null?void 0:e.docs)==null?void 0:m.source}}};var p,a,s,n,c;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`() => { +import{j as l}from"./jsx-runtime-FVsy8kgq.js";import{S as u}from"./server-item-renderer-with-debug-ui-_MpsO46x.js";import{I as h}from"./article-renderer-ub6lGcPc.js";import{a as g}from"./svg-image-4Vh9uTQ6.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-d8cZibFS.js";import"./multi-renderer-la0A-h33.js";import"./renderer-JG1Z7r2S.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./hints-renderer-eYcfi__L.js";import"./shared-4TdECMLk.js";import"./base-radio-SM-baXgO.js";import"./choice-none-above-lqQAegUH.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-VwVxZMGJ.js";import"./side-by-side-kGWaKY6T.js";import"./test-dependencies-fGmEXWK4.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./enums-x5qaTru7.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-VNdK7gMK.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-MKIRfGVo.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";const f={answerArea:Object.fromEntries(h.map(d=>[d,!1])),hints:[],itemDataVersion:{major:0,minor:1},question:{content:"[[☃ image 1]]",images:{},widgets:{"image 1":{alignment:"block",graded:!0,options:{alt:"This chart presents a pie graph divided into 2 sectors: 28 percent are unsuccessful and 72 percent are successful.",backgroundImage:{height:210,url:"web+graphie://cdn.kastatic.org/ka-perseus-graphie/7c0a5afb8670fad738df800ffe16c5e516b48777",width:210},box:[210,210],caption:"Source: NASA “Current and Past Missions”",labels:[],range:[[0,10],[0,10]],static:!1,title:"Percentage of Successful Cometary Missions (1978-2014)"},static:!1,type:"image",version:{major:0,minor:0}}}},answer:null},i=200,at={title:"Perseus/Components/Graphie",component:g,args:{box:[i,i],setup:()=>{},setDrawingAreaAvailable:()=>{}}},t={},r=()=>l(u,{item:f});r.__docgenInfo={description:"A demonstration of a Graphie rendered using the Perseus `Renderer` complete\nwith overlaid labels and an image caption below.",methods:[],displayName:"PieChartGraphieLabels"};var o,e,m;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:"{}",...(m=(e=t.parameters)==null?void 0:e.docs)==null?void 0:m.source}}};var p,a,s,n,c;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`() => { return ; }`,...(s=(a=r.parameters)==null?void 0:a.docs)==null?void 0:s.source},description:{story:"A demonstration of a Graphie rendered using the Perseus `Renderer` complete\nwith overlaid labels and an image caption below.",...(c=(n=r.parameters)==null?void 0:n.docs)==null?void 0:c.description}}};const st=["SquareBoxSizeAndOtherwiseEmpty","PieChartGraphieLabels"];export{r as PieChartGraphieLabels,t as SquareBoxSizeAndOtherwiseEmpty,st as __namedExportsOrder,at as default}; diff --git a/assets/group.stories-lPnxbIc-.js b/assets/group.stories-kUXfA_0a.js similarity index 78% rename from assets/group.stories-lPnxbIc-.js rename to assets/group.stories-kUXfA_0a.js index 0ac0e4bf53..f2631ec221 100644 --- a/assets/group.stories-lPnxbIc-.js +++ b/assets/group.stories-kUXfA_0a.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as n}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const a={content:`![](https://ka-perseus-graphie.s3.amazonaws.com/3e6d0981127dea205c2becc0ead24702fbe862a1.png) +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as n}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const a={content:`![](https://ka-perseus-graphie.s3.amazonaws.com/3e6d0981127dea205c2becc0ead24702fbe862a1.png) ===== diff --git a/assets/hints-renderer-PJ9GMfp4.js b/assets/hints-renderer-eYcfi__L.js similarity index 99% rename from assets/hints-renderer-PJ9GMfp4.js rename to assets/hints-renderer-eYcfi__L.js index c43c66cab9..f44a4734b9 100644 --- a/assets/hints-renderer-PJ9GMfp4.js +++ b/assets/hints-renderer-eYcfi__L.js @@ -1,4 +1,4 @@ -import{a as c,j as g}from"./jsx-runtime-FVsy8kgq.js";import{l as R,R as N,p as A}from"./renderer-VfFjn7ah.js";import{l as i}from"./index-awljIyHI.js";import{c as O}from"./index-dnMhQZ-1.js";import{r as x}from"./index-TT1qJ6UJ.js";import{R as E}from"./index-7vsPyIck.js";import{_ as p}from"./jquery-yG1GhClm.js";import{P as W}from"./i18n-context-P5sgPFep.js";import{l as d,m as L,o as j,k as I,q as _,h as P}from"./constants-iPV6vHZm.js";import{m as u}from"./media-queries-gbofTbz-.js";import{A as $}from"./perseus-api-Nq3s7IMx.js";import{s as F}from"./shared-4TdECMLk.js";import{U as S}from"./util-F8-MDmsT.js";const v=class v extends x.Component{constructor(){super(...arguments),this.getSerializedState=()=>this.refs.renderer.getSerializedState(),this.restoreSerializedState=(e,t)=>{this.refs.renderer.restoreSerializedState(e,t)}}render(){const{apiOptions:e,className:t,hint:r,lastHint:n,lastRendered:a,pos:y,totalHints:m}=this.props,{isMobile:h}=e,s=O("hint",!h&&"perseus-hint-renderer",h&&i.css(T.newHint),h&&a&&i.css(T.lastRenderedNewHint),n&&"last-hint",a&&"last-rendered",t),o={...e,customKeypad:!1};return c("div",{className:s,tabIndex:"-1",children:[!e.isMobile&&g("span",{className:"perseus-sr-only",children:this.context.strings.hintPos({pos:y+1})}),!e.isMobile&&m!=null&&y!=null&&g("span",{className:"perseus-hint-label",style:{display:"block",color:e.hintProgressColor},children:`${y+1} / ${m}`}),g(N,{ref:"renderer",widgets:r.widgets,content:r.content||"",images:r.images,apiOptions:o,findExternalWidgets:this.props.findExternalWidgets,linterContext:A(this.props.linterContext,"hint"),strings:this.context.strings})]})}};v.contextType=W,v.defaultProps={linterContext:R};let b=v;const T=i.StyleSheet.create({newHint:{marginBottom:1.5*d,borderLeftColor:L,borderLeftStyle:"solid",borderLeftWidth:j,[u.lgOrSmaller]:{paddingLeft:d},[u.smOrSmaller]:{paddingLeft:0},":focus":{outline:"none"}},lastRenderedNewHint:{marginBottom:0,borderLeftColor:I}});b.__docgenInfo={description:"",methods:[{name:"getSerializedState",docblock:null,modifiers:[],params:[],returns:null},{name:"restoreSerializedState",docblock:null,modifiers:[],params:[{name:"state",optional:!1,type:null},{name:"callback",optional:!1,type:null}],returns:null}],displayName:"HintRenderer",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ +import{a as c,j as g}from"./jsx-runtime-FVsy8kgq.js";import{l as R,R as N,p as A}from"./renderer-JG1Z7r2S.js";import{l as i}from"./index-awljIyHI.js";import{c as O}from"./index-dnMhQZ-1.js";import{r as x}from"./index-TT1qJ6UJ.js";import{R as E}from"./index-7vsPyIck.js";import{_ as p}from"./jquery-yG1GhClm.js";import{P as W}from"./i18n-context-P5sgPFep.js";import{l as d,m as L,o as j,k as I,q as _,h as P}from"./constants-iPV6vHZm.js";import{m as u}from"./media-queries-gbofTbz-.js";import{A as $}from"./perseus-api-Nq3s7IMx.js";import{s as F}from"./shared-4TdECMLk.js";import{U as S}from"./util-F8-MDmsT.js";const v=class v extends x.Component{constructor(){super(...arguments),this.getSerializedState=()=>this.refs.renderer.getSerializedState(),this.restoreSerializedState=(e,t)=>{this.refs.renderer.restoreSerializedState(e,t)}}render(){const{apiOptions:e,className:t,hint:r,lastHint:n,lastRendered:a,pos:y,totalHints:m}=this.props,{isMobile:h}=e,s=O("hint",!h&&"perseus-hint-renderer",h&&i.css(T.newHint),h&&a&&i.css(T.lastRenderedNewHint),n&&"last-hint",a&&"last-rendered",t),o={...e,customKeypad:!1};return c("div",{className:s,tabIndex:"-1",children:[!e.isMobile&&g("span",{className:"perseus-sr-only",children:this.context.strings.hintPos({pos:y+1})}),!e.isMobile&&m!=null&&y!=null&&g("span",{className:"perseus-hint-label",style:{display:"block",color:e.hintProgressColor},children:`${y+1} / ${m}`}),g(N,{ref:"renderer",widgets:r.widgets,content:r.content||"",images:r.images,apiOptions:o,findExternalWidgets:this.props.findExternalWidgets,linterContext:A(this.props.linterContext,"hint"),strings:this.context.strings})]})}};v.contextType=W,v.defaultProps={linterContext:R};let b=v;const T=i.StyleSheet.create({newHint:{marginBottom:1.5*d,borderLeftColor:L,borderLeftStyle:"solid",borderLeftWidth:j,[u.lgOrSmaller]:{paddingLeft:d},[u.smOrSmaller]:{paddingLeft:0},":focus":{outline:"none"}},lastRenderedNewHint:{marginBottom:0,borderLeftColor:I}});b.__docgenInfo={description:"",methods:[{name:"getSerializedState",docblock:null,modifiers:[],params:[],returns:null},{name:"restoreSerializedState",docblock:null,modifiers:[],params:[{name:"state",optional:!1,type:null},{name:"callback",optional:!1,type:null}],returns:null}],displayName:"HintRenderer",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ isArticle?: boolean; onFocusChange?: ( newFocusPath: FocusPath, diff --git a/assets/hints-renderer.stories-lP8wnSqO.js b/assets/hints-renderer.stories-TsVecLBr.js similarity index 94% rename from assets/hints-renderer.stories-lP8wnSqO.js rename to assets/hints-renderer.stories-TsVecLBr.js index e3b15ccf95..9e3384ceb6 100644 --- a/assets/hints-renderer.stories-lP8wnSqO.js +++ b/assets/hints-renderer.stories-TsVecLBr.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{V as Y}from"./index-6h5t6F0w.js";import{H as Z}from"./hints-renderer-PJ9GMfp4.js";import{i as e}from"./interactive-graph-question-builder-Mh2lh4tI.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";const _e={title:"Perseus/Renderers/Hints Renderer",component:Z,decorators:[X=>m(Y,{style:{left:80},children:m(X,{})})],argTypes:{hintsVisible:{control:{min:0},defaultValue:3}}},r={args:{hints:[{content:"this is hint 1",images:{},replace:!1,widgets:{}},{content:"this is hint 2",images:{},replace:!1,widgets:{}},{content:"this is hint 3",images:{},replace:!1,widgets:{}}]}},i={args:{apiOptions:{flags:{mafs:{angle:!0,circle:!0,linear:!0,"linear-system":!0,point:!0,polygon:!0,ray:!0,segment:!0,quadratic:!0,sinusoid:!0}}},hints:[{...e().withAngle().build(),replace:!1},{...e().withCircle().build(),replace:!1},{...e().withLinear().build(),replace:!1},{...e().withLinearSystem().build(),replace:!1},{...e().withPoints(3).build(),replace:!1},{...e().withPolygon().build(),replace:!1},{...e().withRay().build(),replace:!1},{...e().withSegments().build(),replace:!1},{...e().withQuadratic().build(),replace:!1},{...e().withSinusoid().build(),replace:!1}]}},a={args:{apiOptions:{flags:{mafs:{segment:!0}}},hints:[{...e().build(),replace:!1}]}},n={args:{apiOptions:{flags:{mafs:{linear:!0}}},hints:[{...e().withLinear().build(),replace:!1}]}},t={args:{apiOptions:{flags:{mafs:{"linear-system":!0}}},hints:[{...e().withLinearSystem().build(),replace:!1}]}},s={args:{apiOptions:{flags:{mafs:{ray:!0}}},hints:[{...e().withRay().build(),replace:!1}]}},l={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withCircle().build(),replace:!1}]}},o={args:{apiOptions:{flags:{mafs:{quadratic:!0}}},hints:[{...e().withQuadratic().build(),replace:!1}]}},p={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withSinusoid().build(),replace:!1}]}},c={args:{apiOptions:{flags:{mafs:{polygon:!0}}},hints:[{...e().withPolygon().build(),replace:!1},{...e().withPolygon("angles").build(),replace:!1},{...e().withPolygon("sides").build(),replace:!1}]}},u={args:{apiOptions:{flags:{mafs:{point:!0}}},hints:[{...e().withPoints(3).build(),replace:!1}]}},h={args:{apiOptions:{flags:{mafs:{angle:!0}}},hints:[{...e().withAngle().build(),replace:!1}]}};var d,g,f;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{ +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{V as Y}from"./index-6h5t6F0w.js";import{H as Z}from"./hints-renderer-eYcfi__L.js";import{i as e}from"./interactive-graph-question-builder-Mh2lh4tI.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-deFLJwr4.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";const _e={title:"Perseus/Renderers/Hints Renderer",component:Z,decorators:[X=>m(Y,{style:{left:80},children:m(X,{})})],argTypes:{hintsVisible:{control:{min:0},defaultValue:3}}},r={args:{hints:[{content:"this is hint 1",images:{},replace:!1,widgets:{}},{content:"this is hint 2",images:{},replace:!1,widgets:{}},{content:"this is hint 3",images:{},replace:!1,widgets:{}}]}},i={args:{apiOptions:{flags:{mafs:{angle:!0,circle:!0,linear:!0,"linear-system":!0,point:!0,polygon:!0,ray:!0,segment:!0,quadratic:!0,sinusoid:!0}}},hints:[{...e().withAngle().build(),replace:!1},{...e().withCircle().build(),replace:!1},{...e().withLinear().build(),replace:!1},{...e().withLinearSystem().build(),replace:!1},{...e().withPoints(3).build(),replace:!1},{...e().withPolygon().build(),replace:!1},{...e().withRay().build(),replace:!1},{...e().withSegments().build(),replace:!1},{...e().withQuadratic().build(),replace:!1},{...e().withSinusoid().build(),replace:!1}]}},a={args:{apiOptions:{flags:{mafs:{segment:!0}}},hints:[{...e().build(),replace:!1}]}},n={args:{apiOptions:{flags:{mafs:{linear:!0}}},hints:[{...e().withLinear().build(),replace:!1}]}},t={args:{apiOptions:{flags:{mafs:{"linear-system":!0}}},hints:[{...e().withLinearSystem().build(),replace:!1}]}},s={args:{apiOptions:{flags:{mafs:{ray:!0}}},hints:[{...e().withRay().build(),replace:!1}]}},l={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withCircle().build(),replace:!1}]}},o={args:{apiOptions:{flags:{mafs:{quadratic:!0}}},hints:[{...e().withQuadratic().build(),replace:!1}]}},p={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withSinusoid().build(),replace:!1}]}},c={args:{apiOptions:{flags:{mafs:{polygon:!0}}},hints:[{...e().withPolygon().build(),replace:!1},{...e().withPolygon("angles").build(),replace:!1},{...e().withPolygon("sides").build(),replace:!1}]}},u={args:{apiOptions:{flags:{mafs:{point:!0}}},hints:[{...e().withPoints(3).build(),replace:!1}]}},h={args:{apiOptions:{flags:{mafs:{angle:!0}}},hints:[{...e().withAngle().build(),replace:!1}]}};var d,g,f;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{ args: { hints: [{ content: "this is hint 1", diff --git a/assets/iframe-_HOM8AA9.js b/assets/iframe-7PiyMb9T.js similarity index 77% rename from assets/iframe-_HOM8AA9.js rename to assets/iframe-7PiyMb9T.js index 60d2d77783..6ed909a6c7 100644 --- a/assets/iframe-_HOM8AA9.js +++ b/assets/iframe-7PiyMb9T.js @@ -1,7 +1,7 @@ -import"../sb-preview/runtime.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))p(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const r of t.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&p(r)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function p(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();const l="modulepreload",g=function(_,i){return new URL(_,i).href},d={},s=function(i,a,p){let e=Promise.resolve();if(a&&a.length>0){const t=document.getElementsByTagName("link");e=Promise.all(a.map(r=>{if(r=g(r,p),r in d)return;d[r]=!0;const c=r.endsWith(".css"),E=c?'[rel="stylesheet"]':"";if(!!p)for(let m=t.length-1;m>=0;m--){const u=t[m];if(u.href===r&&(!c||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${E}`))return;const o=document.createElement("link");if(o.rel=c?"stylesheet":l,c||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),c)return new Promise((m,u)=>{o.addEventListener("load",m),o.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${r}`)))})}))}return e.then(()=>i()).catch(t=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=t,window.dispatchEvent(r),!r.defaultPrevented)throw t})},{createBrowserChannel:O}=__STORYBOOK_MODULE_CHANNELS__,{addons:v}=__STORYBOOK_MODULE_PREVIEW_API__,n=O({page:"preview"});v.setChannel(n);window.__STORYBOOK_ADDONS_CHANNEL__=n;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=n);const R={"./packages/math-input/src/components/keypad/keypad-button.stories.tsx":async()=>s(()=>import("./keypad-button.stories-tDGMB8WS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx":async()=>s(()=>import("./keypad-mathquill.stories-anFRYGcO.js"),__vite__mapDeps([15,1,2,3,16,10,11,17,18,19,12,13,20,14,21,22,23,7,24,25,26,27,9,8,28,29,30,31]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx":async()=>s(()=>import("./keypad-pages.stories-UYZo0hoJ.js"),__vite__mapDeps([32,1,2,3,4,5,6,33,28,7,8,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/components/keypad/navigation-pad.stories.tsx":async()=>s(()=>import("./navigation-pad.stories-qTnieBG4.js"),__vite__mapDeps([34,1,2,3,4,5,6,29,10,11,14,7,9,12,13]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbar.stories.tsx":async()=>s(()=>import("./tabbar.stories-XOe59aSK.js"),__vite__mapDeps([35,1,2,3,26,10,11,27,9,12,13,14]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx":async()=>s(()=>import("./tabbaritem.stories-mdibAqRo.js"),__vite__mapDeps([36,27,1,2,3,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/full-keypad.stories.tsx":async()=>s(()=>import("./full-keypad.stories-Rwy66K-l.js"),__vite__mapDeps([37,1,2,3,4,5,6,33,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29]),import.meta.url),"./packages/math-input/src/full-mobile-input.stories.tsx":async()=>s(()=>import("./full-mobile-input.stories-jwUl9wLW.js"),__vite__mapDeps([38,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,4,5,6,39,40,30,31,41,42,43]),import.meta.url),"./packages/perseus-editor/src/__stories__/article-editor.stories.tsx":async()=>s(()=>import("./article-editor.stories-h9tAUrgN.js"),__vite__mapDeps([44,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167]),import.meta.url),"./packages/perseus-editor/src/__stories__/content-preview.stories.tsx":async()=>s(()=>import("./content-preview.stories-gjwicJrS.js"),__vite__mapDeps([168,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,169,170,111,112,171,110,122,172]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor-page.stories.tsx":async()=>s(()=>import("./editor-page.stories-YFwl7FAq.js"),__vite__mapDeps([173,1,2,3,113,114,41,47,45,46,40,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,115,110,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,174,4,5,6,175,171,112,111,176,177]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor.stories.tsx":async()=>s(()=>import("./editor.stories-DpL0KZWi.js"),__vite__mapDeps([178,1,2,3,10,11,4,5,6,179,40,109,45,46,47,39,24,17,21,25,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,171,180,181,182,175,176,183,172,184,177]),import.meta.url),"./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-m6-LP9Ac.js"),__vite__mapDeps([185,1,2,3,10,11,84,14,23,4,5,6,179,40,109,45,46,47,39,24,17,21,25,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,171,180,181,182,175,176,183,172,186,187,174,177]),import.meta.url),"./packages/perseus-editor/src/__stories__/item-editor.stories.tsx":async()=>s(()=>import("./item-editor.stories-8ZYPigyF.js"),__vite__mapDeps([188,1,2,3,176,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,172]),import.meta.url),"./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx":async()=>s(()=>import("./tex-error-view.stories-vwGgGZvn.js"),__vite__mapDeps([189,125,1,2,3,10,11,126,70]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx":async()=>s(()=>import("./blur-input.stories-6PTTWtP8.js"),__vite__mapDeps([190,1,2,3,4,5,6,118]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx":async()=>s(()=>import("./color-select.stories-pjneE4Wx.js"),__vite__mapDeps([191,1,2,3,143,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,144]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx":async()=>s(()=>import("./color-swatch.stories-wLV4bEBM.js"),__vite__mapDeps([192,1,2,3,144,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx":async()=>s(()=>import("./device-framer.stories-biQrBk9x.js"),__vite__mapDeps([193,1,2,3,121,14,111,112]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx":async()=>s(()=>import("./graph-settings.stories-y6746yqW.js"),__vite__mapDeps([194,1,2,3,130,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,114,117]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx":async()=>s(()=>import("./interactive-graph-settings.stories-7LAUwdX6.js"),__vite__mapDeps([195,1,2,3,136,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,135,124,126,196]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx":async()=>s(()=>import("./locked-ellipse-settings.stories-G6WAoehw.js"),__vite__mapDeps([197,1,2,3,138,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,139,140,141,142,143,144,145]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx":async()=>s(()=>import("./locked-figures-section.stories-JqJwKMry.js"),__vite__mapDeps([198,1,2,3,10,11,14,137,82,12,13,20,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,135,124,126,92,76,48,40,46,25,50,52,53,54,56,59,60,61,62,67,68,138,45,39,24,26,27,9,7,8,28,29,30,31,42,43,69,71,73,74,75,77,78,79,81,89,90,91,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,139,140,141,142,143,144,145,146,147,148,149,150,151,152]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx":async()=>s(()=>import("./locked-function-settings.stories-eJ0lAJ0A.js"),__vite__mapDeps([199,1,2,3,146,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,92,76,48,40,46,25,50,52,53,54,56,59,60,61,62,67,68,75,142,45,39,24,26,27,9,7,8,28,29,30,31,42,43,69,71,73,74,77,78,79,81,89,90,91,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,140,143,144,139,110,145,147]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx":async()=>s(()=>import("./locked-label-settings.stories-ITvzBluh.js"),__vite__mapDeps([200,1,2,3,142,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,140,143,144]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx":async()=>s(()=>import("./locked-line-settings.stories-5ogMuGVW.js"),__vite__mapDeps([201,1,2,3,148,46,40,47,52,11,10,14,49,53,54,55,17,25,56,57,58,59,82,12,13,20,23,83,19,70,72,84,16,18,21,22,51,85,63,64,41,65,66,80,86,87,88,92,76,48,50,60,61,62,67,68,139,45,39,24,26,27,9,7,8,28,29,30,31,42,43,69,71,73,74,75,77,78,79,81,89,90,91,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,142,140,143,144,145,147,149,150]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx":async()=>s(()=>import("./locked-point-settings.stories-ZzY5aJw1.js"),__vite__mapDeps([202,1,2,3,149,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,139,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,142,140,143,144,150]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx":async()=>s(()=>import("./locked-polygon-settings.stories-TDj8L6st.js"),__vite__mapDeps([203,1,2,3,151,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,142,140,143,144,139,110,150,145]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx":async()=>s(()=>import("./locked-vector-settings.stories-8IYOGYyZ.js"),__vite__mapDeps([204,1,2,3,152,46,40,47,52,11,10,14,49,53,54,55,17,25,56,57,58,59,82,12,13,20,23,83,19,70,72,84,16,18,21,22,51,85,63,64,41,65,66,80,86,87,88,139,45,39,24,26,27,9,7,8,28,29,30,31,42,43,48,50,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,142,140,143,144,147]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/scrollless-number-text-field.stories.tsx":async()=>s(()=>import("./scrollless-number-text-field.stories-AQl7_jva.js"),__vite__mapDeps([205,1,2,3,10,11,23,140,75,14,70,76]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/section-control-button.stories.tsx":async()=>s(()=>import("./section-control-button.stories-Tfc2d6_3.js"),__vite__mapDeps([206,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,123,110,124]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/toggleable-caret.stories.tsx":async()=>s(()=>import("./toggleable-caret.stories-nhN-z0SF.js"),__vite__mapDeps([207,1,2,3,21,126,70,10,11]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx":async()=>s(()=>import("./viewport-resizer.stories-PcXXeY7Z.js"),__vite__mapDeps([208,1,2,3,4,5,6,171,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,122]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx":async()=>s(()=>import("./structured-item-diff.stories-TVyqhX33.js"),__vite__mapDeps([209,1,2,3,180,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,181,110,117,182,210]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx":async()=>s(()=>import("./tags-diff.stories-lx3zgqPw.js"),__vite__mapDeps([211,1,2,3,182,181,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117,210]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx":async()=>s(()=>import("./text-diff.stories-Fzc_qwRJ.js"),__vite__mapDeps([212,1,2,3,181,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117,210]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx":async()=>s(()=>import("./categorizer-editor.stories-3pYdcpt3.js"),__vite__mapDeps([213,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,4,5,6,115,110,116,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx":async()=>s(()=>import("./definition-editor.stories-h51NZcV6.js"),__vite__mapDeps([214,1,2,3,4,5,6,119,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,117,120,114,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx":async()=>s(()=>import("./dropdown-editor.stories-STi-BTv8.js"),__vite__mapDeps([215,1,2,3,4,5,6,127,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,117,122]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/explanation-editor.stories.tsx":async()=>s(()=>import("./explanation-editor.stories-QdYZ9u0O.js"),__vite__mapDeps([216,1,2,3,4,5,6,128,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,117,120,114,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx":async()=>s(()=>import("./expression-editor.stories-heyf0mwD.js"),__vite__mapDeps([217,1,2,3,11,218,82,10,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,129,110,114,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx":async()=>s(()=>import("./image-editor.stories-KUue3KBI.js"),__vite__mapDeps([220,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,4,5,6,131,110,116,118,120,114,117,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx":async()=>s(()=>import("./input-number-editor.stories-QFlQ-eVn.js"),__vite__mapDeps([221,1,2,3,4,5,6,132,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,118]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx":async()=>s(()=>import("./interaction-editor.stories--7H-Go-E.js"),__vite__mapDeps([222,1,2,3,133,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,116,130,110,114,117,122]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories--klP5TGb.js"),__vite__mapDeps([223,1,2,3,177,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,134,110,135,124,126,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,196]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx":async()=>s(()=>import("./label-image-editor.stories-k6syTeEh.js"),__vite__mapDeps([224,1,2,3,11,153,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,116,154,155,156,110,157,158,159,141,160]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx":async()=>s(()=>import("./matcher-editor.stories-JYzttWQo.js"),__vite__mapDeps([225,1,2,3,4,5,6,161,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx":async()=>s(()=>import("./number-line-editor.stories-fHVRRBeP.js"),__vite__mapDeps([226,1,2,3,4,5,6,162,46,40,47,45,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx":async()=>s(()=>import("./numeric-input-editor.stories-cv3657OV.js"),__vite__mapDeps([227,1,2,3,4,5,6,163,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,120,114,117,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx":async()=>s(()=>import("./phet-simulation-editor.stories-RdXy1Uhn.js"),__vite__mapDeps([228,4,5,6,164,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx":async()=>s(()=>import("./python-program-editor.stories-v1Wk4qek.js"),__vite__mapDeps([229,1,2,3,4,5,6,165,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx":async()=>s(()=>import("./radio-editor.stories-6Hjdjqzp.js"),__vite__mapDeps([230,1,2,3,11,166,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117,120,114,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx":async()=>s(()=>import("./sorter-editor.stories-jb1fDQ7f.js"),__vite__mapDeps([231,1,2,3,4,5,6,167,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-dAkI2OZl.js"),__vite__mapDeps([232,1,2,3,4,5,6,11,156,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,154,155]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/behavior.stories.tsx":async()=>s(()=>import("./behavior.stories-oSRdFebJ.js"),__vite__mapDeps([233,1,2,3,4,5,6,157,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,155]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-ZDj_o8fv.js"),__vite__mapDeps([234,1,2,3,4,5,6,11,159,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,155,141,154]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx":async()=>s(()=>import("./question-markers.stories-cWNva5ig.js"),__vite__mapDeps([235,1,2,3,11,158,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,155,159,110,141,154]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx":async()=>s(()=>import("./select-image.stories-CQal8_xI.js"),__vite__mapDeps([236,1,2,3,11,160,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,154,155]),import.meta.url),"./packages/perseus/src/__stories__/article-renderer.stories.tsx":async()=>s(()=>import("./article-renderer.stories-20NlBfrZ.js"),__vite__mapDeps([237,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,4,5,6,238,219,45,46,40,47,39,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,239,169,240]),import.meta.url),"./packages/perseus/src/__stories__/hints-renderer.stories.tsx":async()=>s(()=>import("./hints-renderer.stories-lP8wnSqO.js"),__vite__mapDeps([241,1,2,3,10,11,108,48,40,46,47,41,25,49,17,50,51,52,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,80,81,186,95,96,97]),import.meta.url),"./packages/perseus/src/__stories__/server-item-renderer.stories.tsx":async()=>s(()=>import("./server-item-renderer.stories-8t0Uujez.js"),__vite__mapDeps([242,1,2,3,243,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,244,184,238,219,239]),import.meta.url),"./packages/perseus/src/components/__stories__/button-group.stories.tsx":async()=>s(()=>import("./button-group.stories-Jd2GkQu3.js"),__vite__mapDeps([245,1,2,3,93,11]),import.meta.url),"./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx":async()=>s(()=>import("./fixed-to-responsive.stories-AjZdl-mI.js"),__vite__mapDeps([246,1,2,3,53,54,49,55]),import.meta.url),"./packages/perseus/src/components/__stories__/graph.stories.tsx":async()=>s(()=>import("./graph.stories-B0iV-0at.js"),__vite__mapDeps([247,94,1,2,3,46,40,47,52,11,10,14,49,53,54,55,17,25,56,57,58,59,50]),import.meta.url),"./packages/perseus/src/components/__stories__/graphie.stories.tsx":async()=>s(()=>import("./graphie.stories-C3OVYd8B.js"),__vite__mapDeps([248,1,2,3,243,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,244,184,238,219,239]),import.meta.url),"./packages/perseus/src/components/__stories__/hud.stories.tsx":async()=>s(()=>import("./hud.stories-T0i3oZ90.js"),__vite__mapDeps([249,4,5,6,98,1,2,3,11,55]),import.meta.url),"./packages/perseus/src/components/__stories__/icon.stories.tsx":async()=>s(()=>import("./icon.stories-RiaEljVU.js"),__vite__mapDeps([250,58,85,1,2,3]),import.meta.url),"./packages/perseus/src/components/__stories__/image-loader.stories.tsx":async()=>s(()=>import("./image-loader.stories-v1h5kRva.js"),__vite__mapDeps([251,1,2,3,59,53]),import.meta.url),"./packages/perseus/src/components/__stories__/info-tip.stories.tsx":async()=>s(()=>import("./info-tip.stories-B2rhY5TT.js"),__vite__mapDeps([252,1,2,3,69,70,10,11,14,17,18,19,12,13,20,21,23,22]),import.meta.url),"./packages/perseus/src/components/__stories__/inline-icon.stories.tsx":async()=>s(()=>import("./inline-icon.stories-_HhRJW2V.js"),__vite__mapDeps([253,57,1,2,3]),import.meta.url),"./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx":async()=>s(()=>import("./input-with-examples.stories-X5wmnwX6.js"),__vite__mapDeps([254,4,5,6,73,1,2,3,48,40,46,47,41,25,49,17,50,51,52,11,10,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,74,75,23,70,76,77]),import.meta.url),"./packages/perseus/src/components/__stories__/lint.stories.tsx":async()=>s(()=>import("./lint.stories-urElbILQ.js"),__vite__mapDeps([255,1,2,3,67,11,17,55,57]),import.meta.url),"./packages/perseus/src/components/__stories__/math-input.stories.tsx":async()=>s(()=>import("./math-input.stories-OWlCE0fl.js"),__vite__mapDeps([256,4,5,6,71,1,2,3,39,40,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,72,16,18,19,20,22,23,49,47,51]),import.meta.url),"./packages/perseus/src/components/__stories__/multi-button-group.stories.tsx":async()=>s(()=>import("./multi-button-group.stories-9s3YVelT.js"),__vite__mapDeps([257,1,2,3,99,11,17]),import.meta.url),"./packages/perseus/src/components/__stories__/number-input.stories.tsx":async()=>s(()=>import("./number-input.stories-N2epCWoI.js"),__vite__mapDeps([258,4,5,6,100,1,2,3,46,40,47,49,64,41,17,51]),import.meta.url),"./packages/perseus/src/components/__stories__/range-input.stories.tsx":async()=>s(()=>import("./range-input.stories-023ObPzr.js"),__vite__mapDeps([259,4,5,6,101,1,2,3,64,41,100,46,40,47,49,17,51]),import.meta.url),"./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx":async()=>s(()=>import("./simple-keypad-input.stories-7zCo_AQF.js"),__vite__mapDeps([260,4,5,6,78,1,2,3,39,40,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,64]),import.meta.url),"./packages/perseus/src/components/__stories__/sortable.stories.tsx":async()=>s(()=>import("./sortable.stories-wvLpEGub.js"),__vite__mapDeps([261,104,1,2,3,48,40,46,47,41,25,49,17,50,51,52,11,10,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68]),import.meta.url),"./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx":async()=>s(()=>import("./stub-tag-editor.stories-U5MGBv2T.js"),__vite__mapDeps([262,4,5,6,65,1,2,3,64,41,66,47,17]),import.meta.url),"./packages/perseus/src/components/__stories__/svg-image.stories.tsx":async()=>s(()=>import("./svg-image.stories-C-0BAb4J.js"),__vite__mapDeps([263,52,1,2,3,40,46,47,11,10,14,49,53,54,55,17,25,56,57,58,59]),import.meta.url),"./packages/perseus/src/components/__stories__/tex.stories.tsx":async()=>s(()=>import("./tex.stories-5oJiLdsC.js"),__vite__mapDeps([264,60,1,2,3,53]),import.meta.url),"./packages/perseus/src/components/__stories__/text-input.stories.tsx":async()=>s(()=>import("./text-input.stories-UYGFQ8Hb.js"),__vite__mapDeps([265,4,5,6,74,1,2,3,75,10,11,14,23,70,76,17]),import.meta.url),"./packages/perseus/src/components/__stories__/text-list-editor.stories.tsx":async()=>s(()=>import("./text-list-editor.stories-FO3Wg0lT.js"),__vite__mapDeps([266,1,2,3,4,5,6,66,47,64,41,17]),import.meta.url),"./packages/perseus/src/components/__stories__/tooltip.stories.tsx":async()=>s(()=>import("./tooltip.stories-rkAvVxsE.js"),__vite__mapDeps([267,1,2,3,10,11,77,17]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable-tex.stories.tsx":async()=>s(()=>import("./zoomable-tex.stories-YE5z48ur.js"),__vite__mapDeps([268,1,2,3,62,50,60,53,61,17]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable.stories.tsx":async()=>s(()=>import("./zoomable.stories-biidOpnJ.js"),__vite__mapDeps([269,1,2,3,61,17]),import.meta.url),"./packages/perseus/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx":async()=>s(()=>import("./visibility-observer.stories-pidMot5o.js"),__vite__mapDeps([270,1,2,3,17]),import.meta.url),"./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx":async()=>s(()=>import("./multi-renderer.stories-7-1fhIB9.js"),__vite__mapDeps([271,1,2,3,10,11,23,82,12,13,20,14,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,183,244,184,238,219,239]),import.meta.url),"./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx":async()=>s(()=>import("./categorizer.stories-CN_tLkCT.js"),__vite__mapDeps([272,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx":async()=>s(()=>import("./cs-program.stories-K9D9krLM.js"),__vite__mapDeps([273,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/definition/definition.stories.tsx":async()=>s(()=>import("./definition.stories-aVazkzpq.js"),__vite__mapDeps([274,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,238,239]),import.meta.url),"./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx":async()=>s(()=>import("./deprecated-standin.stories-RHHubafV.js"),__vite__mapDeps([275,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx":async()=>s(()=>import("./dropdown.stories-r1lGSq2V.js"),__vite__mapDeps([276,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/explanation/explanation.stories.tsx":async()=>s(()=>import("./explanation.stories-oAoeTIET.js"),__vite__mapDeps([277,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/expression/expression.stories.tsx":async()=>s(()=>import("./expression.stories-xvO0oD0k.js"),__vite__mapDeps([278,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,39,40,30,31,41,42,43,4,5,6,243,82,20,23,83,19,70,72,84,16,18,22,49,51,85,63,64,65,66,47,80,55,86,57,58,87,88,45,46,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,244,184,238,219,239,240]),import.meta.url),"./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx":async()=>s(()=>import("./graded-group-set.stories-0IRlHspa.js"),__vite__mapDeps([279,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx":async()=>s(()=>import("./graded-group.stories-OTYvBJb2.js"),__vite__mapDeps([280,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/grapher/grapher.stories.tsx":async()=>s(()=>import("./grapher.stories-H0DcXurb.js"),__vite__mapDeps([281,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/group/group.stories.tsx":async()=>s(()=>import("./group.stories-lPnxbIc-.js"),__vite__mapDeps([282,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/iframe/iframe.stories.tsx":async()=>s(()=>import("./iframe.stories-5gvTNqFD.js"),__vite__mapDeps([283,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/image/image.stories.tsx":async()=>s(()=>import("./image.stories-9jjiXyN9.js"),__vite__mapDeps([284,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/input-number/input-number.stories.tsx":async()=>s(()=>import("./input-number.stories-vvAd9WRJ.js"),__vite__mapDeps([285,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/interaction/interaction.stories.tsx":async()=>s(()=>import("./interaction.stories-olQ8riJn.js"),__vite__mapDeps([286,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph-regression.stories.tsx":async()=>s(()=>import("./interactive-graph-regression.stories-S9QWgeIQ.js"),__vite__mapDeps([287,1,2,3,48,40,46,47,41,25,49,17,50,51,52,11,10,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,186,95,96,97]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx":async()=>s(()=>import("./interactive-graph.stories-5ZDzoH6x.js"),__vite__mapDeps([288,1,2,3,90,11,19,10,12,13,20,14,83,70,91,23,51,53,55,82,72,84,16,17,18,21,22,49,85,63,64,41,65,66,47,80,86,57,58,87,88,105,69,25,45,46,40,39,24,26,27,9,7,8,28,29,30,31,42,43,48,50,52,54,56,59,60,61,62,67,68,71,73,74,75,76,77,78,79,81,89,92,93,94,95,96,97,98,99,100,101,102,103,104,106,107,108,218,184,219,187,186]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx":async()=>s(()=>import("./locked-functions.stories-GUShDteD.js"),__vite__mapDeps([289,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,187,186]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-0IwvODoA.js"),__vite__mapDeps([290,1,2,3,23,10,11,92,20,12,13,14,70,76,17,19,21,22,18,51,48,40,46,47,41,25,49,50,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-pill.stories.tsx":async()=>s(()=>import("./answer-pill.stories-j3TFj4M7.js"),__vite__mapDeps([291,1,2,3,103,10,11,20,12,13,14,23,22,17,51,48,40,46,47,41,25,49,50,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx":async()=>s(()=>import("./label-image.stories-GoAluhxg.js"),__vite__mapDeps([292,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-sNHZQ8MO.js"),__vite__mapDeps([293,1,2,3,11,102,10,14,51,85,58,103,20,12,13,23,22,17,48,40,46,47,41,25,49,50,52,53,54,55,56,57,59,60,61,62,63,64,65,66,67,68]),import.meta.url),"./packages/perseus/src/widgets/matcher/matcher.stories.tsx":async()=>s(()=>import("./matcher.stories-BM5iIsJW.js"),__vite__mapDeps([294,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/matrix/matrix.stories.tsx":async()=>s(()=>import("./matrix.stories-7qJn-u40.js"),__vite__mapDeps([295,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/number-line/number-line.stories.tsx":async()=>s(()=>import("./number-line.stories-_Z4boPoa.js"),__vite__mapDeps([296,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,218,82,20,23,83,19,70,72,84,16,18,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,243,244,238,239,240,4,5,6]),import.meta.url),"./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx":async()=>s(()=>import("./numeric-input.stories-BLQJid2-.js"),__vite__mapDeps([297,1,2,3,4,5,6,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/orderer/orderer.stories.tsx":async()=>s(()=>import("./orderer.stories-Ij4ywWUU.js"),__vite__mapDeps([298,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx":async()=>s(()=>import("./passage-ref.stories-bpd921va.js"),__vite__mapDeps([299,1,2,3,10,11,218,82,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/passage/passage.stories.tsx":async()=>s(()=>import("./passage.stories-2rs702ON.js"),__vite__mapDeps([300,1,2,3,10,11,218,82,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/phet-simulation/phet-simulation.stories.tsx":async()=>s(()=>import("./phet-simulation.stories-9vK1JFaQ.js"),__vite__mapDeps([301,90,1,2,3,11,19,10,12,13,20,14,83,70,91,23,51,53,55]),import.meta.url),"./packages/perseus/src/widgets/plotter/plotter.stories.tsx":async()=>s(()=>import("./plotter.stories-fYcrr8c3.js"),__vite__mapDeps([302,1,2,3,10,11,218,82,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/python-program/python-program.stories.tsx":async()=>s(()=>import("./python-program.stories-8rRWUnB7.js"),__vite__mapDeps([303,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx":async()=>s(()=>import("./base-radio.stories-8MJpt5sR.js"),__vite__mapDeps([304,1,2,3,4,5,6,79,11,49,17,47,51,63,64,41,65,66,55,80,81,46,40,82,10,12,13,20,14,23,83,19,70,72,84,16,18,21,22,85,86,57,58,87,88,89,48,25,50,52,53,54,56,59,60,61,62,67,68]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx":async()=>s(()=>import("./choice-icon.stories-8ni1pQVV.js"),__vite__mapDeps([305,1,2,3,86,14,11,51,57,58,55,87]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-none-above.stories.tsx":async()=>s(()=>import("./choice-none-above.stories-mgVLpm8Y.js"),__vite__mapDeps([306,1,2,3,4,5,6,89,51,48,40,46,47,41,25,49,17,50,52,11,10,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,82,12,13,20,23,83,19,70,72,84,16,18,21,22,85,80,86,87,88]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx":async()=>s(()=>import("./choice.stories-8Al8ddbo.js"),__vite__mapDeps([307,1,2,3,4,5,6,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/focus-ring.stories.tsx":async()=>s(()=>import("./focus-ring.stories-S-6rUCVt.js"),__vite__mapDeps([308,1,2,3,55,87,11]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx":async()=>s(()=>import("./option-status.stories-j32PjSOc.js"),__vite__mapDeps([309,1,2,3,88,14,11,51]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx":async()=>s(()=>import("./radio.stories-jqNZY-r4.js"),__vite__mapDeps([310,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,170]),import.meta.url),"./packages/perseus/src/widgets/sorter/sorter.stories.tsx":async()=>s(()=>import("./sorter.stories-pmGMfYhH.js"),__vite__mapDeps([311,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx":async()=>s(()=>import("./video-transcript-link.stories-RYTD175i.js"),__vite__mapDeps([312,1,2,3,105,10,11,84,14,91,12,13,20,70,51,53]),import.meta.url),"./packages/perseus/src/widgets/video/video.stories.tsx":async()=>s(()=>import("./video.stories-FH7Ic73j.js"),__vite__mapDeps([313,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url)};async function y(_){return R[_]()}const{composeConfigs:P,PreviewWeb:T,ClientApi:L}=__STORYBOOK_MODULE_PREVIEW_API__,I=async()=>{const _=await Promise.all([s(()=>import("./entry-preview-X1b_vaBy.js"),__vite__mapDeps([314,2,3,315,56,17]),import.meta.url),s(()=>import("./entry-preview-docs-9fNegKGE.js"),__vite__mapDeps([316,317,3,13,6,2]),import.meta.url),s(()=>import("./preview-VI2eoWmp.js"),__vite__mapDeps([318,319]),import.meta.url),s(()=>import("./preview-F-0q-Qqi.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-98732p1V.js"),__vite__mapDeps([320,5,6]),import.meta.url),s(()=>import("./preview-FekBEZxm.js"),__vite__mapDeps([321,6]),import.meta.url),s(()=>import("./preview-1MSgikpN.js"),__vite__mapDeps([322,96]),import.meta.url),s(()=>import("./preview-u8M_OEO2.js"),__vite__mapDeps([323,6]),import.meta.url),s(()=>import("./preview-bEa2SesL.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-7fQXWhX7.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-0kMR2tkV.js"),__vite__mapDeps([324,1,2,3,14,10,11,45,46,40,47,39,24,17,21,25,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,238,219,239]),import.meta.url)]);return P(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new T;window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;window.__STORYBOOK_CLIENT_API__=window.__STORYBOOK_CLIENT_API__||new L({storyStore:window.__STORYBOOK_PREVIEW__.storyStore});window.__STORYBOOK_PREVIEW__.initialize({importFn:y,getProjectAnnotations:I});export{s as _}; +import"../sb-preview/runtime.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))p(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const r of t.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&p(r)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function p(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();const l="modulepreload",g=function(_,i){return new URL(_,i).href},d={},s=function(i,a,p){let e=Promise.resolve();if(a&&a.length>0){const t=document.getElementsByTagName("link");e=Promise.all(a.map(r=>{if(r=g(r,p),r in d)return;d[r]=!0;const c=r.endsWith(".css"),E=c?'[rel="stylesheet"]':"";if(!!p)for(let m=t.length-1;m>=0;m--){const u=t[m];if(u.href===r&&(!c||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${E}`))return;const o=document.createElement("link");if(o.rel=c?"stylesheet":l,c||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),c)return new Promise((m,u)=>{o.addEventListener("load",m),o.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${r}`)))})}))}return e.then(()=>i()).catch(t=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=t,window.dispatchEvent(r),!r.defaultPrevented)throw t})},{createBrowserChannel:O}=__STORYBOOK_MODULE_CHANNELS__,{addons:v}=__STORYBOOK_MODULE_PREVIEW_API__,n=O({page:"preview"});v.setChannel(n);window.__STORYBOOK_ADDONS_CHANNEL__=n;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=n);const R={"./packages/math-input/src/components/keypad/keypad-button.stories.tsx":async()=>s(()=>import("./keypad-button.stories-tDGMB8WS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx":async()=>s(()=>import("./keypad-mathquill.stories-anFRYGcO.js"),__vite__mapDeps([15,1,2,3,16,10,11,17,18,19,12,13,20,14,21,22,23,7,24,25,26,27,9,8,28,29,30,31]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx":async()=>s(()=>import("./keypad-pages.stories-UYZo0hoJ.js"),__vite__mapDeps([32,1,2,3,4,5,6,33,28,7,8,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/components/keypad/navigation-pad.stories.tsx":async()=>s(()=>import("./navigation-pad.stories-qTnieBG4.js"),__vite__mapDeps([34,1,2,3,4,5,6,29,10,11,14,7,9,12,13]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbar.stories.tsx":async()=>s(()=>import("./tabbar.stories-XOe59aSK.js"),__vite__mapDeps([35,1,2,3,26,10,11,27,9,12,13,14]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx":async()=>s(()=>import("./tabbaritem.stories-mdibAqRo.js"),__vite__mapDeps([36,27,1,2,3,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/full-keypad.stories.tsx":async()=>s(()=>import("./full-keypad.stories-Rwy66K-l.js"),__vite__mapDeps([37,1,2,3,4,5,6,33,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29]),import.meta.url),"./packages/math-input/src/full-mobile-input.stories.tsx":async()=>s(()=>import("./full-mobile-input.stories-jwUl9wLW.js"),__vite__mapDeps([38,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,4,5,6,39,40,30,31,41,42,43]),import.meta.url),"./packages/perseus-editor/src/__stories__/article-editor.stories.tsx":async()=>s(()=>import("./article-editor.stories-Yb88TQ9m.js"),__vite__mapDeps([44,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167]),import.meta.url),"./packages/perseus-editor/src/__stories__/content-preview.stories.tsx":async()=>s(()=>import("./content-preview.stories-YyFS4sfW.js"),__vite__mapDeps([168,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,169,170,111,112,171,110,122,172]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor-page.stories.tsx":async()=>s(()=>import("./editor-page.stories-bJQLROcU.js"),__vite__mapDeps([173,1,2,3,113,114,41,47,45,46,40,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,115,110,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,174,4,5,6,175,171,112,111,176,177]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor.stories.tsx":async()=>s(()=>import("./editor.stories-KtEWbF29.js"),__vite__mapDeps([178,1,2,3,10,11,4,5,6,179,40,109,45,46,47,39,24,17,21,25,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,171,180,181,182,175,176,183,172,184,177]),import.meta.url),"./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-giJIGau5.js"),__vite__mapDeps([185,1,2,3,10,11,84,14,23,4,5,6,179,40,109,45,46,47,39,24,17,21,25,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,171,180,181,182,175,176,183,172,186,187,174,177]),import.meta.url),"./packages/perseus-editor/src/__stories__/item-editor.stories.tsx":async()=>s(()=>import("./item-editor.stories-Fm6TNyQq.js"),__vite__mapDeps([188,1,2,3,176,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,172]),import.meta.url),"./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx":async()=>s(()=>import("./tex-error-view.stories-vwGgGZvn.js"),__vite__mapDeps([189,125,1,2,3,10,11,126,70]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx":async()=>s(()=>import("./blur-input.stories-6PTTWtP8.js"),__vite__mapDeps([190,1,2,3,4,5,6,118]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx":async()=>s(()=>import("./color-select.stories-1iI004eu.js"),__vite__mapDeps([191,1,2,3,143,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,144]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx":async()=>s(()=>import("./color-swatch.stories-aMy-KwxK.js"),__vite__mapDeps([192,1,2,3,144,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx":async()=>s(()=>import("./device-framer.stories-biQrBk9x.js"),__vite__mapDeps([193,1,2,3,121,14,111,112]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx":async()=>s(()=>import("./graph-settings.stories-i5cvuxUm.js"),__vite__mapDeps([194,1,2,3,130,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,114,117]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx":async()=>s(()=>import("./interactive-graph-settings.stories-0CHhsMS0.js"),__vite__mapDeps([195,1,2,3,136,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,135,124,126,196]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx":async()=>s(()=>import("./locked-ellipse-settings.stories-0zqKvcVM.js"),__vite__mapDeps([197,1,2,3,138,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,139,140,141,142,143,144,145]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx":async()=>s(()=>import("./locked-figures-section.stories-NIiGztQf.js"),__vite__mapDeps([198,1,2,3,10,11,14,137,82,12,13,20,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,135,124,126,92,76,48,40,46,25,50,52,53,54,56,59,60,61,62,67,68,138,45,39,24,26,27,9,7,8,28,29,30,31,42,43,69,71,73,74,75,77,78,79,81,89,90,91,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,139,140,141,142,143,144,145,146,147,148,149,150,151,152]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx":async()=>s(()=>import("./locked-function-settings.stories-lLWbIv-f.js"),__vite__mapDeps([199,1,2,3,146,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,92,76,48,40,46,25,50,52,53,54,56,59,60,61,62,67,68,75,142,45,39,24,26,27,9,7,8,28,29,30,31,42,43,69,71,73,74,77,78,79,81,89,90,91,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,140,143,144,139,110,145,147]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx":async()=>s(()=>import("./locked-label-settings.stories-Po4wI6kE.js"),__vite__mapDeps([200,1,2,3,142,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,140,143,144]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx":async()=>s(()=>import("./locked-line-settings.stories--_NNjwRl.js"),__vite__mapDeps([201,1,2,3,148,46,40,47,52,11,10,14,49,53,54,55,17,25,56,57,58,59,82,12,13,20,23,83,19,70,72,84,16,18,21,22,51,85,63,64,41,65,66,80,86,87,88,92,76,48,50,60,61,62,67,68,139,45,39,24,26,27,9,7,8,28,29,30,31,42,43,69,71,73,74,75,77,78,79,81,89,90,91,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,142,140,143,144,145,147,149,150]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx":async()=>s(()=>import("./locked-point-settings.stories-t0-B8JbW.js"),__vite__mapDeps([202,1,2,3,149,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,139,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,142,140,143,144,150]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx":async()=>s(()=>import("./locked-polygon-settings.stories-oI6yVCN5.js"),__vite__mapDeps([203,1,2,3,151,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,142,140,143,144,139,110,150,145]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx":async()=>s(()=>import("./locked-vector-settings.stories-TJaJoPNL.js"),__vite__mapDeps([204,1,2,3,152,46,40,47,52,11,10,14,49,53,54,55,17,25,56,57,58,59,82,12,13,20,23,83,19,70,72,84,16,18,21,22,51,85,63,64,41,65,66,80,86,87,88,139,45,39,24,26,27,9,7,8,28,29,30,31,42,43,48,50,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,142,140,143,144,147]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/scrollless-number-text-field.stories.tsx":async()=>s(()=>import("./scrollless-number-text-field.stories-AQl7_jva.js"),__vite__mapDeps([205,1,2,3,10,11,23,140,75,14,70,76]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/section-control-button.stories.tsx":async()=>s(()=>import("./section-control-button.stories-t-0HHySj.js"),__vite__mapDeps([206,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,123,110,124]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/toggleable-caret.stories.tsx":async()=>s(()=>import("./toggleable-caret.stories-nhN-z0SF.js"),__vite__mapDeps([207,1,2,3,21,126,70,10,11]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx":async()=>s(()=>import("./viewport-resizer.stories-4HOb7afw.js"),__vite__mapDeps([208,1,2,3,4,5,6,171,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,122]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx":async()=>s(()=>import("./structured-item-diff.stories-0VB9CdqV.js"),__vite__mapDeps([209,1,2,3,180,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,181,110,117,182,210]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx":async()=>s(()=>import("./tags-diff.stories-Ph7yn91K.js"),__vite__mapDeps([211,1,2,3,182,181,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117,210]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx":async()=>s(()=>import("./text-diff.stories-z2VE7HfL.js"),__vite__mapDeps([212,1,2,3,181,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117,210]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx":async()=>s(()=>import("./categorizer-editor.stories-kpPdQNhv.js"),__vite__mapDeps([213,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,4,5,6,115,110,116,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx":async()=>s(()=>import("./definition-editor.stories-4xCkZX5f.js"),__vite__mapDeps([214,1,2,3,4,5,6,119,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,117,120,114,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx":async()=>s(()=>import("./dropdown-editor.stories-Br1uepP1.js"),__vite__mapDeps([215,1,2,3,4,5,6,127,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,117,122]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/explanation-editor.stories.tsx":async()=>s(()=>import("./explanation-editor.stories-V_cD4PEf.js"),__vite__mapDeps([216,1,2,3,4,5,6,128,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,117,120,114,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx":async()=>s(()=>import("./expression-editor.stories-eY-Wcqix.js"),__vite__mapDeps([217,1,2,3,11,218,82,10,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,129,110,114,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx":async()=>s(()=>import("./image-editor.stories-d_RmF4xh.js"),__vite__mapDeps([220,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,4,5,6,131,110,116,118,120,114,117,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx":async()=>s(()=>import("./input-number-editor.stories-3ALJyRsu.js"),__vite__mapDeps([221,1,2,3,4,5,6,132,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,118]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx":async()=>s(()=>import("./interaction-editor.stories-LFt0JAu7.js"),__vite__mapDeps([222,1,2,3,133,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,116,130,110,114,117,122]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-gBXW0dql.js"),__vite__mapDeps([223,1,2,3,177,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,134,110,135,124,126,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,196]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx":async()=>s(()=>import("./label-image-editor.stories-lOm1GQCg.js"),__vite__mapDeps([224,1,2,3,11,153,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,116,154,155,156,110,157,158,159,141,160]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx":async()=>s(()=>import("./matcher-editor.stories-jsQpHHwS.js"),__vite__mapDeps([225,1,2,3,4,5,6,161,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx":async()=>s(()=>import("./number-line-editor.stories-7t5kjrY9.js"),__vite__mapDeps([226,1,2,3,4,5,6,162,46,40,47,45,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx":async()=>s(()=>import("./numeric-input-editor.stories-NGmrs7zt.js"),__vite__mapDeps([227,1,2,3,4,5,6,163,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,116,120,114,117,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx":async()=>s(()=>import("./phet-simulation-editor.stories-0wEFNeL4.js"),__vite__mapDeps([228,4,5,6,164,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx":async()=>s(()=>import("./python-program-editor.stories-K-870imI.js"),__vite__mapDeps([229,1,2,3,4,5,6,165,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx":async()=>s(()=>import("./radio-editor.stories-Bvf3EGgu.js"),__vite__mapDeps([230,1,2,3,11,166,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117,120,114,121,122,123,124,125,126]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx":async()=>s(()=>import("./sorter-editor.stories-Lo2mcYjs.js"),__vite__mapDeps([231,1,2,3,4,5,6,167,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,117]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-TRpG87Yt.js"),__vite__mapDeps([232,1,2,3,4,5,6,11,156,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,154,155]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/behavior.stories.tsx":async()=>s(()=>import("./behavior.stories-vmcJgHdJ.js"),__vite__mapDeps([233,1,2,3,4,5,6,157,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,155]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-SeALEomW.js"),__vite__mapDeps([234,1,2,3,4,5,6,11,159,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,155,141,154]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx":async()=>s(()=>import("./question-markers.stories-YQ_DrHIl.js"),__vite__mapDeps([235,1,2,3,11,158,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,155,159,110,141,154]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx":async()=>s(()=>import("./select-image.stories-ARN5C_nE.js"),__vite__mapDeps([236,1,2,3,11,160,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,154,155]),import.meta.url),"./packages/perseus/src/__stories__/article-renderer.stories.tsx":async()=>s(()=>import("./article-renderer.stories-HmvvxvzH.js"),__vite__mapDeps([237,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,4,5,6,238,219,45,46,40,47,39,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,239,169,240]),import.meta.url),"./packages/perseus/src/__stories__/hints-renderer.stories.tsx":async()=>s(()=>import("./hints-renderer.stories-TsVecLBr.js"),__vite__mapDeps([241,1,2,3,10,11,108,48,40,46,47,41,25,49,17,50,51,52,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,80,81,186,95,96,97]),import.meta.url),"./packages/perseus/src/__stories__/server-item-renderer.stories.tsx":async()=>s(()=>import("./server-item-renderer.stories-cuHthi6R.js"),__vite__mapDeps([242,1,2,3,243,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,244,184,238,219,239]),import.meta.url),"./packages/perseus/src/components/__stories__/button-group.stories.tsx":async()=>s(()=>import("./button-group.stories-Jd2GkQu3.js"),__vite__mapDeps([245,1,2,3,93,11]),import.meta.url),"./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx":async()=>s(()=>import("./fixed-to-responsive.stories-8DiLgWgI.js"),__vite__mapDeps([246,1,2,3,53,54,49,55]),import.meta.url),"./packages/perseus/src/components/__stories__/graph.stories.tsx":async()=>s(()=>import("./graph.stories-oiGBefIM.js"),__vite__mapDeps([247,94,1,2,3,46,40,47,52,11,10,14,49,53,54,55,17,25,56,57,58,59,50]),import.meta.url),"./packages/perseus/src/components/__stories__/graphie.stories.tsx":async()=>s(()=>import("./graphie.stories-TOnlOGdm.js"),__vite__mapDeps([248,1,2,3,243,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,244,184,238,219,239]),import.meta.url),"./packages/perseus/src/components/__stories__/hud.stories.tsx":async()=>s(()=>import("./hud.stories-T0i3oZ90.js"),__vite__mapDeps([249,4,5,6,98,1,2,3,11,55]),import.meta.url),"./packages/perseus/src/components/__stories__/icon.stories.tsx":async()=>s(()=>import("./icon.stories-RiaEljVU.js"),__vite__mapDeps([250,58,85,1,2,3]),import.meta.url),"./packages/perseus/src/components/__stories__/image-loader.stories.tsx":async()=>s(()=>import("./image-loader.stories-9Gky6BXL.js"),__vite__mapDeps([251,1,2,3,59,53]),import.meta.url),"./packages/perseus/src/components/__stories__/info-tip.stories.tsx":async()=>s(()=>import("./info-tip.stories-B2rhY5TT.js"),__vite__mapDeps([252,1,2,3,69,70,10,11,14,17,18,19,12,13,20,21,23,22]),import.meta.url),"./packages/perseus/src/components/__stories__/inline-icon.stories.tsx":async()=>s(()=>import("./inline-icon.stories-_HhRJW2V.js"),__vite__mapDeps([253,57,1,2,3]),import.meta.url),"./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx":async()=>s(()=>import("./input-with-examples.stories-6sOKwhfG.js"),__vite__mapDeps([254,4,5,6,73,1,2,3,48,40,46,47,41,25,49,17,50,51,52,11,10,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,74,75,23,70,76,77]),import.meta.url),"./packages/perseus/src/components/__stories__/lint.stories.tsx":async()=>s(()=>import("./lint.stories-urElbILQ.js"),__vite__mapDeps([255,1,2,3,67,11,17,55,57]),import.meta.url),"./packages/perseus/src/components/__stories__/math-input.stories.tsx":async()=>s(()=>import("./math-input.stories-OWlCE0fl.js"),__vite__mapDeps([256,4,5,6,71,1,2,3,39,40,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,72,16,18,19,20,22,23,49,47,51]),import.meta.url),"./packages/perseus/src/components/__stories__/multi-button-group.stories.tsx":async()=>s(()=>import("./multi-button-group.stories-9s3YVelT.js"),__vite__mapDeps([257,1,2,3,99,11,17]),import.meta.url),"./packages/perseus/src/components/__stories__/number-input.stories.tsx":async()=>s(()=>import("./number-input.stories-N2epCWoI.js"),__vite__mapDeps([258,4,5,6,100,1,2,3,46,40,47,49,64,41,17,51]),import.meta.url),"./packages/perseus/src/components/__stories__/range-input.stories.tsx":async()=>s(()=>import("./range-input.stories-023ObPzr.js"),__vite__mapDeps([259,4,5,6,101,1,2,3,64,41,100,46,40,47,49,17,51]),import.meta.url),"./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx":async()=>s(()=>import("./simple-keypad-input.stories-7zCo_AQF.js"),__vite__mapDeps([260,4,5,6,78,1,2,3,39,40,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,64]),import.meta.url),"./packages/perseus/src/components/__stories__/sortable.stories.tsx":async()=>s(()=>import("./sortable.stories-oLGzYzKZ.js"),__vite__mapDeps([261,104,1,2,3,48,40,46,47,41,25,49,17,50,51,52,11,10,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68]),import.meta.url),"./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx":async()=>s(()=>import("./stub-tag-editor.stories-U5MGBv2T.js"),__vite__mapDeps([262,4,5,6,65,1,2,3,64,41,66,47,17]),import.meta.url),"./packages/perseus/src/components/__stories__/svg-image.stories.tsx":async()=>s(()=>import("./svg-image.stories-xeWK_IUJ.js"),__vite__mapDeps([263,52,1,2,3,40,46,47,11,10,14,49,53,54,55,17,25,56,57,58,59]),import.meta.url),"./packages/perseus/src/components/__stories__/tex.stories.tsx":async()=>s(()=>import("./tex.stories-RdMEbt3U.js"),__vite__mapDeps([264,60,1,2,3,53]),import.meta.url),"./packages/perseus/src/components/__stories__/text-input.stories.tsx":async()=>s(()=>import("./text-input.stories-UYGFQ8Hb.js"),__vite__mapDeps([265,4,5,6,74,1,2,3,75,10,11,14,23,70,76,17]),import.meta.url),"./packages/perseus/src/components/__stories__/text-list-editor.stories.tsx":async()=>s(()=>import("./text-list-editor.stories-FO3Wg0lT.js"),__vite__mapDeps([266,1,2,3,4,5,6,66,47,64,41,17]),import.meta.url),"./packages/perseus/src/components/__stories__/tooltip.stories.tsx":async()=>s(()=>import("./tooltip.stories-rkAvVxsE.js"),__vite__mapDeps([267,1,2,3,10,11,77,17]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable-tex.stories.tsx":async()=>s(()=>import("./zoomable-tex.stories-4XZZtFwQ.js"),__vite__mapDeps([268,1,2,3,62,50,60,53,61,17]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable.stories.tsx":async()=>s(()=>import("./zoomable.stories-biidOpnJ.js"),__vite__mapDeps([269,1,2,3,61,17]),import.meta.url),"./packages/perseus/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx":async()=>s(()=>import("./visibility-observer.stories-pidMot5o.js"),__vite__mapDeps([270,1,2,3,17]),import.meta.url),"./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx":async()=>s(()=>import("./multi-renderer.stories-zS8w66-d.js"),__vite__mapDeps([271,1,2,3,10,11,23,82,12,13,20,14,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,183,244,184,238,219,239]),import.meta.url),"./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx":async()=>s(()=>import("./categorizer.stories-thEPuyEF.js"),__vite__mapDeps([272,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx":async()=>s(()=>import("./cs-program.stories-nubd7Hub.js"),__vite__mapDeps([273,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/definition/definition.stories.tsx":async()=>s(()=>import("./definition.stories-p21nh182.js"),__vite__mapDeps([274,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,238,239]),import.meta.url),"./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx":async()=>s(()=>import("./deprecated-standin.stories-n7shHy9h.js"),__vite__mapDeps([275,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx":async()=>s(()=>import("./dropdown.stories-0zo_eCab.js"),__vite__mapDeps([276,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/explanation/explanation.stories.tsx":async()=>s(()=>import("./explanation.stories-Z14k2UD8.js"),__vite__mapDeps([277,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/expression/expression.stories.tsx":async()=>s(()=>import("./expression.stories-t4fnlBjg.js"),__vite__mapDeps([278,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,39,40,30,31,41,42,43,4,5,6,243,82,20,23,83,19,70,72,84,16,18,22,49,51,85,63,64,65,66,47,80,55,86,57,58,87,88,45,46,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,244,184,238,219,239,240]),import.meta.url),"./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx":async()=>s(()=>import("./graded-group-set.stories-JouYjcvg.js"),__vite__mapDeps([279,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx":async()=>s(()=>import("./graded-group.stories-m7TMGy4R.js"),__vite__mapDeps([280,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/grapher/grapher.stories.tsx":async()=>s(()=>import("./grapher.stories-4ohDpS6H.js"),__vite__mapDeps([281,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/group/group.stories.tsx":async()=>s(()=>import("./group.stories-kUXfA_0a.js"),__vite__mapDeps([282,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/iframe/iframe.stories.tsx":async()=>s(()=>import("./iframe.stories-F6Ura1cl.js"),__vite__mapDeps([283,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/image/image.stories.tsx":async()=>s(()=>import("./image.stories-__9V67DH.js"),__vite__mapDeps([284,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/input-number/input-number.stories.tsx":async()=>s(()=>import("./input-number.stories-So5c9TZO.js"),__vite__mapDeps([285,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/interaction/interaction.stories.tsx":async()=>s(()=>import("./interaction.stories-7cDfB_0_.js"),__vite__mapDeps([286,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph-regression.stories.tsx":async()=>s(()=>import("./interactive-graph-regression.stories-IFSphHLr.js"),__vite__mapDeps([287,1,2,3,48,40,46,47,41,25,49,17,50,51,52,11,10,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,186,95,96,97]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx":async()=>s(()=>import("./interactive-graph.stories-xsPRqNse.js"),__vite__mapDeps([288,1,2,3,90,11,19,10,12,13,20,14,83,70,91,23,51,53,55,82,72,84,16,17,18,21,22,49,85,63,64,41,65,66,47,80,86,57,58,87,88,105,69,25,45,46,40,39,24,26,27,9,7,8,28,29,30,31,42,43,48,50,52,54,56,59,60,61,62,67,68,71,73,74,75,76,77,78,79,81,89,92,93,94,95,96,97,98,99,100,101,102,103,104,106,107,108,218,184,219,187,186]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx":async()=>s(()=>import("./locked-functions.stories-4AJtwUSP.js"),__vite__mapDeps([289,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,187,186]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-6QsApMfj.js"),__vite__mapDeps([290,1,2,3,23,10,11,92,20,12,13,14,70,76,17,19,21,22,18,51,48,40,46,47,41,25,49,50,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-pill.stories.tsx":async()=>s(()=>import("./answer-pill.stories-8gXsreK8.js"),__vite__mapDeps([291,1,2,3,103,10,11,20,12,13,14,23,22,17,51,48,40,46,47,41,25,49,50,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx":async()=>s(()=>import("./label-image.stories-54Ay92n9.js"),__vite__mapDeps([292,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-LnaUikU_.js"),__vite__mapDeps([293,1,2,3,11,102,10,14,51,85,58,103,20,12,13,23,22,17,48,40,46,47,41,25,49,50,52,53,54,55,56,57,59,60,61,62,63,64,65,66,67,68]),import.meta.url),"./packages/perseus/src/widgets/matcher/matcher.stories.tsx":async()=>s(()=>import("./matcher.stories-aZvUbCC_.js"),__vite__mapDeps([294,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/matrix/matrix.stories.tsx":async()=>s(()=>import("./matrix.stories-gqmC17kf.js"),__vite__mapDeps([295,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/number-line/number-line.stories.tsx":async()=>s(()=>import("./number-line.stories-C2zRf4JC.js"),__vite__mapDeps([296,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,218,82,20,23,83,19,70,72,84,16,18,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,243,244,238,239,240,4,5,6]),import.meta.url),"./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx":async()=>s(()=>import("./numeric-input.stories-KB33gF-8.js"),__vite__mapDeps([297,1,2,3,4,5,6,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/orderer/orderer.stories.tsx":async()=>s(()=>import("./orderer.stories-JvtQ6RKS.js"),__vite__mapDeps([298,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx":async()=>s(()=>import("./passage-ref.stories-Op8xGoqf.js"),__vite__mapDeps([299,1,2,3,10,11,218,82,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/passage/passage.stories.tsx":async()=>s(()=>import("./passage.stories-F12poj6Z.js"),__vite__mapDeps([300,1,2,3,10,11,218,82,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/phet-simulation/phet-simulation.stories.tsx":async()=>s(()=>import("./phet-simulation.stories-xIiQrJ_8.js"),__vite__mapDeps([301,90,1,2,3,11,19,10,12,13,20,14,83,70,91,23,51,53,55]),import.meta.url),"./packages/perseus/src/widgets/plotter/plotter.stories.tsx":async()=>s(()=>import("./plotter.stories-ASK-5i0r.js"),__vite__mapDeps([302,1,2,3,10,11,218,82,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/python-program/python-program.stories.tsx":async()=>s(()=>import("./python-program.stories-1HkGLyek.js"),__vite__mapDeps([303,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx":async()=>s(()=>import("./base-radio.stories-lNQF0G1Q.js"),__vite__mapDeps([304,1,2,3,4,5,6,79,11,49,17,47,51,63,64,41,65,66,55,80,81,46,40,82,10,12,13,20,14,23,83,19,70,72,84,16,18,21,22,85,86,57,58,87,88,89,48,25,50,52,53,54,56,59,60,61,62,67,68]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx":async()=>s(()=>import("./choice-icon.stories-8ni1pQVV.js"),__vite__mapDeps([305,1,2,3,86,14,11,51,57,58,55,87]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-none-above.stories.tsx":async()=>s(()=>import("./choice-none-above.stories-PqS2oYRl.js"),__vite__mapDeps([306,1,2,3,4,5,6,89,51,48,40,46,47,41,25,49,17,50,52,11,10,14,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,82,12,13,20,23,83,19,70,72,84,16,18,21,22,85,80,86,87,88]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx":async()=>s(()=>import("./choice.stories-8Al8ddbo.js"),__vite__mapDeps([307,1,2,3,4,5,6,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/focus-ring.stories.tsx":async()=>s(()=>import("./focus-ring.stories-S-6rUCVt.js"),__vite__mapDeps([308,1,2,3,55,87,11]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx":async()=>s(()=>import("./option-status.stories-j32PjSOc.js"),__vite__mapDeps([309,1,2,3,88,14,11,51]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx":async()=>s(()=>import("./radio.stories-jBzvFa5_.js"),__vite__mapDeps([310,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219,170]),import.meta.url),"./packages/perseus/src/widgets/sorter/sorter.stories.tsx":async()=>s(()=>import("./sorter.stories--pe5jLyw.js"),__vite__mapDeps([311,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url),"./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx":async()=>s(()=>import("./video-transcript-link.stories-La4j2ZS0.js"),__vite__mapDeps([312,1,2,3,105,10,11,84,14,91,12,13,20,70,51,53]),import.meta.url),"./packages/perseus/src/widgets/video/video.stories.tsx":async()=>s(()=>import("./video.stories-cDBg-zPN.js"),__vite__mapDeps([313,1,2,3,218,82,10,11,12,13,20,14,23,83,19,70,72,84,16,17,18,21,22,49,51,85,63,64,41,65,66,47,80,55,86,57,58,87,88,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,52,53,54,56,59,60,61,62,67,68,69,71,73,74,75,76,77,78,79,81,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,184,107,108,219]),import.meta.url)};async function y(_){return R[_]()}const{composeConfigs:P,PreviewWeb:T,ClientApi:L}=__STORYBOOK_MODULE_PREVIEW_API__,I=async()=>{const _=await Promise.all([s(()=>import("./entry-preview-X1b_vaBy.js"),__vite__mapDeps([314,2,3,315,56,17]),import.meta.url),s(()=>import("./entry-preview-docs-9fNegKGE.js"),__vite__mapDeps([316,317,3,13,6,2]),import.meta.url),s(()=>import("./preview-VI2eoWmp.js"),__vite__mapDeps([318,319]),import.meta.url),s(()=>import("./preview-1S0PUX_6.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-98732p1V.js"),__vite__mapDeps([320,5,6]),import.meta.url),s(()=>import("./preview-FekBEZxm.js"),__vite__mapDeps([321,6]),import.meta.url),s(()=>import("./preview-1MSgikpN.js"),__vite__mapDeps([322,96]),import.meta.url),s(()=>import("./preview-u8M_OEO2.js"),__vite__mapDeps([323,6]),import.meta.url),s(()=>import("./preview-bEa2SesL.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-olFnNaRi.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-VNQ8rokx.js"),__vite__mapDeps([324,1,2,3,14,10,11,45,46,40,47,39,24,17,21,25,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,18,19,20,23,22,71,72,16,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,238,219,239]),import.meta.url)]);return P(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new T;window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;window.__STORYBOOK_CLIENT_API__=window.__STORYBOOK_CLIENT_API__||new L({storyStore:window.__STORYBOOK_PREVIEW__.storyStore});window.__STORYBOOK_PREVIEW__.initialize({importFn:y,getProjectAnnotations:I});export{s as _}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./keypad-button.stories-tDGMB8WS.js","./jsx-runtime-FVsy8kgq.js","./index-TT1qJ6UJ.js","./_commonjsHelpers-4gQjN7DL.js","./chunk-WFFRPTHA-zlNDxfrq.js","./preview-errors-7FWlPnjy.js","./index-PPLHz8o0.js","./button-assets-txIojR3b.js","./keypad-button-rKskH7oM.js","./index-2dmvOE3q.js","./index-6h5t6F0w.js","./index-awljIyHI.js","./react-router-dom-W_e8xVUu.js","./index-tvtfaFq4.js","./index-deFLJwr4.js","./keypad-mathquill.stories-anFRYGcO.js","./index-BPSWBbj5.js","./index-7vsPyIck.js","./index-YCTzZMik.js","./index-rfN0X25E.js","./index-o3wWn3Y5.js","./index-CkAxGj88.js","./Popper-kGnKOid7.js","./index-h_CiYGGb.js","./mobile-keypad-wPUeR8mM.js","./index-J2t_5nK1.js","./tabbar-WYCYDof0.js","./item-X9tjzx12.js","./operators-page-C_EsmjPW.js","./navigation-pad-ss7r0FKW.js","./key-translator-Bl2XtQm9.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./keypad-pages.stories-UYZo0hoJ.js","./index-VDi1Le_1.js","./navigation-pad.stories-qTnieBG4.js","./tabbar.stories-XOe59aSK.js","./tabbaritem.stories-mdibAqRo.js","./full-keypad.stories-Rwy66K-l.js","./full-mobile-input.stories-jwUl9wLW.js","./prop-types-SKtvHVtl.js","./version-akiLXZts.js","./invariant-bu5zBsRS.js","./prop-types-mRar-0kQ.css","./enums-x5qaTru7.js","./article-editor.stories-h9tAUrgN.js","./article-renderer-GCz9idJ2.js","./util-F8-MDmsT.js","./jquery-yG1GhClm.js","./renderer-VfFjn7ah.js","./index-dnMhQZ-1.js","./asset-context-I7yIqWki.js","./i18n-context-P5sgPFep.js","./svg-image-vbtSDKh6.js","./dependencies-8XILypbq.js","./fixed-to-responsive-AkRQxH3P.js","./constants-iPV6vHZm.js","./client-rbWgHzHN.js","./inline-icon-NjJlm7d0.js","./icon-paths-5JCXzGsq.js","./image-loader-44YtE05i.js","./tex-VP4hirbI.js","./zoomable-CA1NzpZD.js","./zoomable-tex-MZi7Hqbp.js","./perseus-api-Nq3s7IMx.js","./index-k-0mNqHS.js","./stub-tag-editor-74YQ4o9G.js","./text-list-editor-Jz35fIN1.js","./lint-kpBgzQ8K.js","./renderer-qr6V1vrR.css","./index-K9BSJPWl.js","./index-xuPsLuPk.js","./math-input-JZMGF6RZ.js","./index-WNT3sUKf.js","./input-with-examples-pL_l1Dse.js","./text-input-15gEhfDF.js","./index-QCAhLhLD.js","./minus-bold-ONmDo3Ve.js","./tooltip--mhQefx0.js","./simple-keypad-input-LEkrmlga.js","./base-radio-13woGQGc.js","./media-queries-gbofTbz-.js","./shared-4TdECMLk.js","./choice-I73s7vIV.js","./index-ngddCaVG.js","./index-qUyqkRvh.js","./icon-R5gZamfG.js","./choice-icon-StuadxRF.js","./focus-ring-2b4ybtc7.js","./option-status-Yr5mIJZ4.js","./choice-none-above-0_QL8uoF.js","./phet-simulation-wNzquKfW.js","./arrow-square-out-bold-090vdhrx.js","./answer-choices-6SWUlni2.js","./button-group-nsoLlHtM.js","./graph-6kifrlu5.js","./index-IIMKO4_x.js","./tiny-invariant-bHgPayXn.js","./bundle.esm-7jAAHVxW.js","./hud-4BOtaFc1.js","./multi-button-group-atHe8dYZ.js","./number-input-AfYHd3vF.js","./range-input-gZ_c3T2F.js","./marker-AnHLRo1F.js","./answer-pill-0VqGKN9U.js","./sortable-PVTgDRY4.js","./video-transcript-link-Ts3i1VPI.js","./article-renderer-Fup2g6Rr.css","./multi-renderer-Dj-_XIAo.js","./hints-renderer-PJ9GMfp4.js","./article-editor-Hyxtmbid.js","./components-V6aclUoQ.js","./device-framer-eGajQcXC.js","./constants-p_UgHLsb.js","./register-all-widgets-and-editors-for-testing-2mH-ZU77.js","./index-fuycm_QE.js","./categorizer-editor-3QAla4Wt.js","./editor-jsonify-yjAz4UcO.js","./index-0C4KXdeC.js","./blur-input-hjJsfoK9.js","./definition-editor-jFzP_8M9.js","./editor-Y01VX-A3.js","./index-SM3muJE2.js","./icon-paths-EoBkHOLI.js","./section-control-button-GM2LQRww.js","./index-tFzzSRL2.js","./tex-error-view-Y2BSLjwB.js","./toggleable-caret-lFiCktzo.js","./dropdown-editor-8wTJqqrY.js","./explanation-editor-_xuXa3EA.js","./expression-editor-TOSGrK7r.js","./graph-settings-6z3yJikg.js","./image-editor-oat1qOOh.js","./input-number-editor-Bkjav5mB.js","./index-6m5XMHRW.js","./interactive-graph-editor-sXGG56UO.js","./heading-8aCiuWUg.js","./interactive-graph-settings-BlpUEkpl.js","./locked-figures-section-MyNRaNP3.js","./locked-ellipse-settings-2CzQImqt.js","./locked-figure-aria-8qS88jMt.js","./scrollless-number-text-field-U5Bx_xXb.js","./util-qk2aeK8X.js","./locked-label-settings-My12ABKT.js","./color-select-ZBceqrDu.js","./util-w4oIPZJv.js","./line-stroke-select-OUNHgM-H.js","./locked-function-settings-mVk4KOOh.js","./line-swatch-tbLkNsXV.js","./locked-line-settings-GmLOdRhN.js","./locked-point-settings-75zYMwR0.js","./labeled-switch-Fn8JZIE3.js","./locked-polygon-settings-CLRPaxRY.js","./locked-vector-settings-nyZ3gue2.js","./label-image-editor-AWRkHIaL.js","./form-wrapped-text-field-A2kf-LD-.js","./global-colors-VIVU4Od4.js","./answer-choices-IbySI0ZR.js","./behavior-Or9dqpn7.js","./question-markers-rbcwtTwt.js","./marker-4IxQ8C94.js","./select-image-cPUSf5YP.js","./matcher-editor-w387bK5J.js","./number-line-editor-g8WyXFkD.js","./numeric-input-editor-wcLIK9qM.js","./phet-simulation-editor-KZoPAnLO.js","./python-program-editor-ReCi12oY.js","./editor-DsbDBOGq.js","./sorter-editor-RE_zqP0r.js","./content-preview.stories-gjwicJrS.js","./article-renderer.testdata-spwNviYy.js","./radio.testdata-sITJ8lxE.js","./viewport-resizer-pZjHp3_4.js","./perseus-editor-1P1vlgv9.css","./editor-page.stories-YFwl7FAq.js","./editor-page-with-storybook-preview--akIa83W.js","./editor-page-m--8Qm1D.js","./item-extras-editor-p-SH0jeI.js","./flags-for-api-options-FcV02OR3.js","./editor.stories-DpL0KZWi.js","./index-LBTd2Ozi.js","./structured-item-diff-EmSySxnw.js","./text-diff-yU5JXCsK.js","./tags-diff-Nd2k4lKQ.js","./multi-items-JojuRZeA.js","./side-by-side-kGWaKY6T.js","./interactive-graph-editor.stories-m6-LP9Ac.js","./interactive-graph-question-builder-Mh2lh4tI.js","./interactive-graph.testdata-gSWSkezr.js","./item-editor.stories-8ZYPigyF.js","./tex-error-view.stories-vwGgGZvn.js","./blur-input.stories-6PTTWtP8.js","./color-select.stories-pjneE4Wx.js","./color-swatch.stories-wLV4bEBM.js","./device-framer.stories-biQrBk9x.js","./graph-settings.stories-y6746yqW.js","./interactive-graph-settings.stories-7LAUwdX6.js","./interactive-graph-settings.argtypes-6T40gg9D.js","./locked-ellipse-settings.stories-G6WAoehw.js","./locked-figures-section.stories-JqJwKMry.js","./locked-function-settings.stories-eJ0lAJ0A.js","./locked-label-settings.stories-ITvzBluh.js","./locked-line-settings.stories-5ogMuGVW.js","./locked-point-settings.stories-ZzY5aJw1.js","./locked-polygon-settings.stories-TDj8L6st.js","./locked-vector-settings.stories-8IYOGYyZ.js","./scrollless-number-text-field.stories-AQl7_jva.js","./section-control-button.stories-Tfc2d6_3.js","./toggleable-caret.stories-nhN-z0SF.js","./viewport-resizer.stories-PcXXeY7Z.js","./structured-item-diff.stories-TVyqhX33.js","./perseus-diff-wrapper-dJxBlkDd.js","./tags-diff.stories-lx3zgqPw.js","./text-diff.stories-Fzc_qwRJ.js","./categorizer-editor.stories-3pYdcpt3.js","./definition-editor.stories-h51NZcV6.js","./dropdown-editor.stories-STi-BTv8.js","./explanation-editor.stories-QdYZ9u0O.js","./expression-editor.stories-heyf0mwD.js","./renderer-with-debug-ui-Ty_P7koE.js","./register-all-widgets-for-testing-I8cwOiut.js","./image-editor.stories-KUue3KBI.js","./input-number-editor.stories-QFlQ-eVn.js","./interaction-editor.stories--7H-Go-E.js","./interactive-graph-editor.stories--klP5TGb.js","./label-image-editor.stories-k6syTeEh.js","./matcher-editor.stories-JYzttWQo.js","./number-line-editor.stories-fHVRRBeP.js","./numeric-input-editor.stories-cv3657OV.js","./phet-simulation-editor.stories-RdXy1Uhn.js","./python-program-editor.stories-v1Wk4qek.js","./radio-editor.stories-6Hjdjqzp.js","./sorter-editor.stories-jb1fDQ7f.js","./answer-choices.stories-dAkI2OZl.js","./behavior.stories-oSRdFebJ.js","./marker.stories-ZDj_o8fv.js","./question-markers.stories-cWNva5ig.js","./select-image.stories-CQal8_xI.js","./article-renderer.stories-20NlBfrZ.js","./test-dependencies-zutb-QBJ.js","./test-dependencies-vi99l57r.css","./test-keypad-context-wrapper-3gH8DCC_.js","./hints-renderer.stories-lP8wnSqO.js","./server-item-renderer.stories-8t0Uujez.js","./server-item-renderer-with-debug-ui-Idt1fZew.js","./ke-score-ui-VwVxZMGJ.js","./button-group.stories-Jd2GkQu3.js","./fixed-to-responsive.stories-AjZdl-mI.js","./graph.stories-B0iV-0at.js","./graphie.stories-C3OVYd8B.js","./hud.stories-T0i3oZ90.js","./icon.stories-RiaEljVU.js","./image-loader.stories-v1h5kRva.js","./info-tip.stories-B2rhY5TT.js","./inline-icon.stories-_HhRJW2V.js","./input-with-examples.stories-X5wmnwX6.js","./lint.stories-urElbILQ.js","./math-input.stories-OWlCE0fl.js","./multi-button-group.stories-9s3YVelT.js","./number-input.stories-N2epCWoI.js","./range-input.stories-023ObPzr.js","./simple-keypad-input.stories-7zCo_AQF.js","./sortable.stories-wvLpEGub.js","./stub-tag-editor.stories-U5MGBv2T.js","./svg-image.stories-C-0BAb4J.js","./tex.stories-5oJiLdsC.js","./text-input.stories-UYGFQ8Hb.js","./text-list-editor.stories-FO3Wg0lT.js","./tooltip.stories-rkAvVxsE.js","./zoomable-tex.stories-YE5z48ur.js","./zoomable.stories-biidOpnJ.js","./visibility-observer.stories-pidMot5o.js","./multi-renderer.stories-7-1fhIB9.js","./categorizer.stories-CN_tLkCT.js","./cs-program.stories-K9D9krLM.js","./definition.stories-aVazkzpq.js","./deprecated-standin.stories-RHHubafV.js","./dropdown.stories-r1lGSq2V.js","./explanation.stories-oAoeTIET.js","./expression.stories-xvO0oD0k.js","./graded-group-set.stories-0IRlHspa.js","./graded-group.stories-OTYvBJb2.js","./grapher.stories-H0DcXurb.js","./group.stories-lPnxbIc-.js","./iframe.stories-5gvTNqFD.js","./image.stories-9jjiXyN9.js","./input-number.stories-vvAd9WRJ.js","./interaction.stories-olQ8riJn.js","./interactive-graph-regression.stories-S9QWgeIQ.js","./interactive-graph.stories-5ZDzoH6x.js","./locked-functions.stories-GUShDteD.js","./answer-choices.stories-0IwvODoA.js","./answer-pill.stories-j3TFj4M7.js","./label-image.stories-GoAluhxg.js","./marker.stories-sNHZQ8MO.js","./matcher.stories-BM5iIsJW.js","./matrix.stories-7qJn-u40.js","./number-line.stories-_Z4boPoa.js","./numeric-input.stories-BLQJid2-.js","./orderer.stories-Ij4ywWUU.js","./passage-ref.stories-bpd921va.js","./passage.stories-2rs702ON.js","./phet-simulation.stories-9vK1JFaQ.js","./plotter.stories-fYcrr8c3.js","./python-program.stories-8rRWUnB7.js","./base-radio.stories-8MJpt5sR.js","./choice-icon.stories-8ni1pQVV.js","./choice-none-above.stories-mgVLpm8Y.js","./choice.stories-8Al8ddbo.js","./focus-ring.stories-S-6rUCVt.js","./option-status.stories-j32PjSOc.js","./radio.stories-jqNZY-r4.js","./sorter.stories-pmGMfYhH.js","./video-transcript-link.stories-RYTD175i.js","./video.stories-FH7Ic73j.js","./entry-preview-X1b_vaBy.js","./react-18-N0svEjlN.js","./entry-preview-docs-9fNegKGE.js","./_getPrototype-bjD8Yebc.js","./preview-VI2eoWmp.js","./index-ogXoivrg.js","./preview-98732p1V.js","./preview-FekBEZxm.js","./preview-1MSgikpN.js","./preview-u8M_OEO2.js","./preview-0kMR2tkV.js"] + __vite__mapDeps.viteFileDeps = ["./keypad-button.stories-tDGMB8WS.js","./jsx-runtime-FVsy8kgq.js","./index-TT1qJ6UJ.js","./_commonjsHelpers-4gQjN7DL.js","./chunk-WFFRPTHA-zlNDxfrq.js","./preview-errors-7FWlPnjy.js","./index-PPLHz8o0.js","./button-assets-txIojR3b.js","./keypad-button-rKskH7oM.js","./index-WNT3sUKf.js","./index-6h5t6F0w.js","./index-awljIyHI.js","./react-router-dom-W_e8xVUu.js","./index-tvtfaFq4.js","./index-deFLJwr4.js","./keypad-mathquill.stories-anFRYGcO.js","./index-BPSWBbj5.js","./index-7vsPyIck.js","./index-YCTzZMik.js","./index-rfN0X25E.js","./index-o3wWn3Y5.js","./index-CkAxGj88.js","./Popper-kGnKOid7.js","./index-h_CiYGGb.js","./mobile-keypad-wPUeR8mM.js","./index-J2t_5nK1.js","./tabbar-WYCYDof0.js","./item-X9tjzx12.js","./operators-page-C_EsmjPW.js","./navigation-pad-ss7r0FKW.js","./key-translator-Bl2XtQm9.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./keypad-pages.stories-UYZo0hoJ.js","./index-VDi1Le_1.js","./navigation-pad.stories-qTnieBG4.js","./tabbar.stories-XOe59aSK.js","./tabbaritem.stories-mdibAqRo.js","./full-keypad.stories-Rwy66K-l.js","./full-mobile-input.stories-jwUl9wLW.js","./prop-types-SKtvHVtl.js","./version-akiLXZts.js","./invariant-bu5zBsRS.js","./prop-types-mRar-0kQ.css","./enums-x5qaTru7.js","./article-editor.stories-Yb88TQ9m.js","./article-renderer-ub6lGcPc.js","./util-F8-MDmsT.js","./jquery-yG1GhClm.js","./renderer-JG1Z7r2S.js","./index-dnMhQZ-1.js","./asset-context-I7yIqWki.js","./i18n-context-P5sgPFep.js","./svg-image-4Vh9uTQ6.js","./dependencies-d8cZibFS.js","./fixed-to-responsive-AkRQxH3P.js","./constants-iPV6vHZm.js","./client-rbWgHzHN.js","./inline-icon-NjJlm7d0.js","./icon-paths-5JCXzGsq.js","./image-loader-3HliPbpF.js","./tex-6yhnhbtf.js","./zoomable-CA1NzpZD.js","./zoomable-tex-hbM7rxrP.js","./perseus-api-Nq3s7IMx.js","./index-k-0mNqHS.js","./stub-tag-editor-74YQ4o9G.js","./text-list-editor-Jz35fIN1.js","./lint-kpBgzQ8K.js","./renderer-qr6V1vrR.css","./index-K9BSJPWl.js","./index-xuPsLuPk.js","./math-input-JZMGF6RZ.js","./index-2dmvOE3q.js","./input-with-examples-Jnnd0mF0.js","./text-input-15gEhfDF.js","./index-QCAhLhLD.js","./minus-bold-ONmDo3Ve.js","./tooltip--mhQefx0.js","./simple-keypad-input-LEkrmlga.js","./base-radio-SM-baXgO.js","./media-queries-gbofTbz-.js","./shared-4TdECMLk.js","./choice-I73s7vIV.js","./index-ngddCaVG.js","./index-qUyqkRvh.js","./icon-R5gZamfG.js","./choice-icon-StuadxRF.js","./focus-ring-2b4ybtc7.js","./option-status-Yr5mIJZ4.js","./choice-none-above-lqQAegUH.js","./phet-simulation-9PbE2pxN.js","./arrow-square-out-bold-090vdhrx.js","./answer-choices-VNdK7gMK.js","./button-group-nsoLlHtM.js","./graph-2fIs0C28.js","./index-IIMKO4_x.js","./tiny-invariant-bHgPayXn.js","./bundle.esm-7jAAHVxW.js","./hud-4BOtaFc1.js","./multi-button-group-atHe8dYZ.js","./number-input-AfYHd3vF.js","./range-input-gZ_c3T2F.js","./marker-Tbl1FJz5.js","./answer-pill-DPPg5zNJ.js","./sortable-1xjW6Ojf.js","./video-transcript-link-MKIRfGVo.js","./article-renderer-Fup2g6Rr.css","./multi-renderer-la0A-h33.js","./hints-renderer-eYcfi__L.js","./article-editor-dmW6w6Eg.js","./components-yT7oveOH.js","./device-framer-eGajQcXC.js","./constants-p_UgHLsb.js","./register-all-widgets-and-editors-for-testing-Tl0n0XMq.js","./index-fuycm_QE.js","./categorizer-editor-cvgo7rUS.js","./editor-jsonify-4Li1SRv8.js","./index-0C4KXdeC.js","./blur-input-hjJsfoK9.js","./definition-editor-yKychsEi.js","./editor-1XE8pcNh.js","./index-SM3muJE2.js","./icon-paths-EoBkHOLI.js","./section-control-button-SLh88dRF.js","./index-tFzzSRL2.js","./tex-error-view-Y2BSLjwB.js","./toggleable-caret-lFiCktzo.js","./dropdown-editor-owePQkYW.js","./explanation-editor-7sIPvPkn.js","./expression-editor-qSSWTw9p.js","./graph-settings-VTKCtXa5.js","./image-editor-xcASymG3.js","./input-number-editor-Z-c49jcj.js","./index-JX1pDXLf.js","./interactive-graph-editor-sYnTC31H.js","./heading-8aCiuWUg.js","./interactive-graph-settings-K1uO-oSP.js","./locked-figures-section-TPfsudBG.js","./locked-ellipse-settings-y-e2vVG9.js","./locked-figure-aria-cizi6QSj.js","./scrollless-number-text-field-U5Bx_xXb.js","./util-qk2aeK8X.js","./locked-label-settings-7eVXvZDY.js","./color-select-Ou1zrjGq.js","./util-a_JWUtR1.js","./line-stroke-select-1i4OFJVH.js","./locked-function-settings-leQQyqbk.js","./line-swatch-EI3Byz66.js","./locked-line-settings-8WmBPF8G.js","./locked-point-settings-dcN0AtwC.js","./labeled-switch-zT89YLZ0.js","./locked-polygon-settings-5YNPD6lU.js","./locked-vector-settings-f_p_9H7b.js","./label-image-editor-kPCp3zRh.js","./form-wrapped-text-field-A2kf-LD-.js","./global-colors-VIVU4Od4.js","./answer-choices-Zdsv-TtU.js","./behavior-xJJumj3W.js","./question-markers-0U-M3sRj.js","./marker-de7YvUxA.js","./select-image-e-hQhRt5.js","./matcher-editor-nUcHc7yM.js","./number-line-editor-hnXuQMSB.js","./numeric-input-editor-xQu1_JCK.js","./phet-simulation-editor-1KD7oC0a.js","./python-program-editor-kfW7ZX3D.js","./editor-EbDgkB5I.js","./sorter-editor-VTfqPYS3.js","./content-preview.stories-YyFS4sfW.js","./article-renderer.testdata-spwNviYy.js","./radio.testdata-sITJ8lxE.js","./viewport-resizer-rIRGcoAM.js","./perseus-editor-1P1vlgv9.css","./editor-page.stories-bJQLROcU.js","./editor-page-with-storybook-preview-XU3ula-b.js","./editor-page-gACWJwm7.js","./item-extras-editor-DOkMw5hS.js","./flags-for-api-options-eINmxSCP.js","./editor.stories-KtEWbF29.js","./index-n67YmpRR.js","./structured-item-diff-UZ_vLVui.js","./text-diff-ftiYrVyQ.js","./tags-diff-wQwsbtqj.js","./multi-items-MiSsRMrN.js","./side-by-side-kGWaKY6T.js","./interactive-graph-editor.stories-giJIGau5.js","./interactive-graph-question-builder-Mh2lh4tI.js","./interactive-graph.testdata-gSWSkezr.js","./item-editor.stories-Fm6TNyQq.js","./tex-error-view.stories-vwGgGZvn.js","./blur-input.stories-6PTTWtP8.js","./color-select.stories-1iI004eu.js","./color-swatch.stories-aMy-KwxK.js","./device-framer.stories-biQrBk9x.js","./graph-settings.stories-i5cvuxUm.js","./interactive-graph-settings.stories-0CHhsMS0.js","./interactive-graph-settings.argtypes-6T40gg9D.js","./locked-ellipse-settings.stories-0zqKvcVM.js","./locked-figures-section.stories-NIiGztQf.js","./locked-function-settings.stories-lLWbIv-f.js","./locked-label-settings.stories-Po4wI6kE.js","./locked-line-settings.stories--_NNjwRl.js","./locked-point-settings.stories-t0-B8JbW.js","./locked-polygon-settings.stories-oI6yVCN5.js","./locked-vector-settings.stories-TJaJoPNL.js","./scrollless-number-text-field.stories-AQl7_jva.js","./section-control-button.stories-t-0HHySj.js","./toggleable-caret.stories-nhN-z0SF.js","./viewport-resizer.stories-4HOb7afw.js","./structured-item-diff.stories-0VB9CdqV.js","./perseus-diff-wrapper-dJxBlkDd.js","./tags-diff.stories-Ph7yn91K.js","./text-diff.stories-z2VE7HfL.js","./categorizer-editor.stories-kpPdQNhv.js","./definition-editor.stories-4xCkZX5f.js","./dropdown-editor.stories-Br1uepP1.js","./explanation-editor.stories-V_cD4PEf.js","./expression-editor.stories-eY-Wcqix.js","./renderer-with-debug-ui-DcZbZSiB.js","./register-all-widgets-for-testing-xxgCysIB.js","./image-editor.stories-d_RmF4xh.js","./input-number-editor.stories-3ALJyRsu.js","./interaction-editor.stories-LFt0JAu7.js","./interactive-graph-editor.stories-gBXW0dql.js","./label-image-editor.stories-lOm1GQCg.js","./matcher-editor.stories-jsQpHHwS.js","./number-line-editor.stories-7t5kjrY9.js","./numeric-input-editor.stories-NGmrs7zt.js","./phet-simulation-editor.stories-0wEFNeL4.js","./python-program-editor.stories-K-870imI.js","./radio-editor.stories-Bvf3EGgu.js","./sorter-editor.stories-Lo2mcYjs.js","./answer-choices.stories-TRpG87Yt.js","./behavior.stories-vmcJgHdJ.js","./marker.stories-SeALEomW.js","./question-markers.stories-YQ_DrHIl.js","./select-image.stories-ARN5C_nE.js","./article-renderer.stories-HmvvxvzH.js","./test-dependencies-fGmEXWK4.js","./test-dependencies-vi99l57r.css","./test-keypad-context-wrapper-3gH8DCC_.js","./hints-renderer.stories-TsVecLBr.js","./server-item-renderer.stories-cuHthi6R.js","./server-item-renderer-with-debug-ui-_MpsO46x.js","./ke-score-ui-VwVxZMGJ.js","./button-group.stories-Jd2GkQu3.js","./fixed-to-responsive.stories-8DiLgWgI.js","./graph.stories-oiGBefIM.js","./graphie.stories-TOnlOGdm.js","./hud.stories-T0i3oZ90.js","./icon.stories-RiaEljVU.js","./image-loader.stories-9Gky6BXL.js","./info-tip.stories-B2rhY5TT.js","./inline-icon.stories-_HhRJW2V.js","./input-with-examples.stories-6sOKwhfG.js","./lint.stories-urElbILQ.js","./math-input.stories-OWlCE0fl.js","./multi-button-group.stories-9s3YVelT.js","./number-input.stories-N2epCWoI.js","./range-input.stories-023ObPzr.js","./simple-keypad-input.stories-7zCo_AQF.js","./sortable.stories-oLGzYzKZ.js","./stub-tag-editor.stories-U5MGBv2T.js","./svg-image.stories-xeWK_IUJ.js","./tex.stories-RdMEbt3U.js","./text-input.stories-UYGFQ8Hb.js","./text-list-editor.stories-FO3Wg0lT.js","./tooltip.stories-rkAvVxsE.js","./zoomable-tex.stories-4XZZtFwQ.js","./zoomable.stories-biidOpnJ.js","./visibility-observer.stories-pidMot5o.js","./multi-renderer.stories-zS8w66-d.js","./categorizer.stories-thEPuyEF.js","./cs-program.stories-nubd7Hub.js","./definition.stories-p21nh182.js","./deprecated-standin.stories-n7shHy9h.js","./dropdown.stories-0zo_eCab.js","./explanation.stories-Z14k2UD8.js","./expression.stories-t4fnlBjg.js","./graded-group-set.stories-JouYjcvg.js","./graded-group.stories-m7TMGy4R.js","./grapher.stories-4ohDpS6H.js","./group.stories-kUXfA_0a.js","./iframe.stories-F6Ura1cl.js","./image.stories-__9V67DH.js","./input-number.stories-So5c9TZO.js","./interaction.stories-7cDfB_0_.js","./interactive-graph-regression.stories-IFSphHLr.js","./interactive-graph.stories-xsPRqNse.js","./locked-functions.stories-4AJtwUSP.js","./answer-choices.stories-6QsApMfj.js","./answer-pill.stories-8gXsreK8.js","./label-image.stories-54Ay92n9.js","./marker.stories-LnaUikU_.js","./matcher.stories-aZvUbCC_.js","./matrix.stories-gqmC17kf.js","./number-line.stories-C2zRf4JC.js","./numeric-input.stories-KB33gF-8.js","./orderer.stories-JvtQ6RKS.js","./passage-ref.stories-Op8xGoqf.js","./passage.stories-F12poj6Z.js","./phet-simulation.stories-xIiQrJ_8.js","./plotter.stories-ASK-5i0r.js","./python-program.stories-1HkGLyek.js","./base-radio.stories-lNQF0G1Q.js","./choice-icon.stories-8ni1pQVV.js","./choice-none-above.stories-PqS2oYRl.js","./choice.stories-8Al8ddbo.js","./focus-ring.stories-S-6rUCVt.js","./option-status.stories-j32PjSOc.js","./radio.stories-jBzvFa5_.js","./sorter.stories--pe5jLyw.js","./video-transcript-link.stories-La4j2ZS0.js","./video.stories-cDBg-zPN.js","./entry-preview-X1b_vaBy.js","./react-18-N0svEjlN.js","./entry-preview-docs-9fNegKGE.js","./_getPrototype-bjD8Yebc.js","./preview-VI2eoWmp.js","./index-ogXoivrg.js","./preview-98732p1V.js","./preview-FekBEZxm.js","./preview-1MSgikpN.js","./preview-u8M_OEO2.js","./preview-VNQ8rokx.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/iframe.stories-5gvTNqFD.js b/assets/iframe.stories-F6Ura1cl.js similarity index 66% rename from assets/iframe.stories-5gvTNqFD.js rename to assets/iframe.stories-F6Ura1cl.js index 58a9fea921..af412005fb 100644 --- a/assets/iframe.stories-5gvTNqFD.js +++ b/assets/iframe.stories-F6Ura1cl.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const e={content:`Try matching the target image +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const e={content:`Try matching the target image [[☃ iframe 1]] `,images:{"https://ka-perseus-images.s3.amazonaws.com/8e518475587bc83767c72b49ff094e5870c3edc3.png":{width:760,height:688}},widgets:{"iframe 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"iframe",options:{settings:[{name:"hue",value:"210"},{name:"subdivisions",value:"0"},{name:"zoom",value:"2"},{name:"seed",value:"6"},{name:"",value:""}],url:"4960944252",height:"410",width:"410",allowFullScreen:!0,static:!1},alignment:"default"}}},Xt={title:"Perseus/Widgets/IFrame"},t=s=>m(p,{question:e});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var r,i,o;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/image-editor-oat1qOOh.js b/assets/image-editor-xcASymG3.js similarity index 92% rename from assets/image-editor-oat1qOOh.js rename to assets/image-editor-xcASymG3.js index 9d7b281599..d74265f1d9 100644 --- a/assets/image-editor-oat1qOOh.js +++ b/assets/image-editor-xcASymG3.js @@ -1,4 +1,4 @@ -import{a as o,j as a}from"./jsx-runtime-FVsy8kgq.js";import{c as f}from"./article-renderer-GCz9idJ2.js";import{_ as r}from"./jquery-yG1GhClm.js";import{U as p}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as b}from"./components-V6aclUoQ.js";import{i as y}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{E as w}from"./editor-jsonify-yjAz4UcO.js";import{r as C}from"./index-TT1qJ6UJ.js";import{B as v}from"./blur-input-hjJsfoK9.js";import{E as m}from"./editor-Y01VX-A3.js";const{InfoTip:c,InlineIcon:R,RangeInput:k}=b,u=400,h=[0,10],I={url:null,width:0,height:0},x="(ka-.*.s3.amazonaws.com|(fastly|cdn).kastatic.org|khanacademy.org|kasandbox.org)",E=new RegExp("^(https?|web\\+graphie)://[^/]*"+x),T=["center","above","above right","right","below right","below","below left","left","above left"],s=class s extends C.Component{constructor(){super(...arguments),this._isMounted=!1,this.state={backgroundImageError:""}}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}_renderRowForLabel(e,t){return o("tr",{children:[a("td",{children:a(k,{value:e.coordinates,onChange:this.onCoordinateChange.bind(this,t)})}),a("td",{style:{verticalAlign:"bottom",width:"5px"},children:a("input",{type:"text",className:"graph-settings-axis-label",value:e.content,onChange:this.onContentChange.bind(this,t)})}),a("td",{children:a("select",{className:"perseus-widget-dropdown",value:e.alignment,onChange:this.onAlignmentChange.bind(this,t),children:T.map(function(n,l){return a("option",{value:n,children:n},""+l)},this)})}),a("td",{children:a("a",{href:"#",className:"simple-button orange delete-label",title:"Remove this label",onClick:this.removeLabel.bind(this,t),children:a(R,{...y})})})]},t)}change(...e){return f.apply(this,e)}removeLabel(e,t){t.preventDefault();const n=[...this.props.labels];n.splice(e,1),this.props.onChange({labels:n})}onCoordinateChange(e,t){const n=this.props.labels.slice();n[e]=r.extend({},n[e],{coordinates:t}),this.props.onChange({labels:n})}onContentChange(e,t){const n=t.target.value,l=this.props.labels.slice();l[e]=r.extend({},l[e],{content:n}),this.props.onChange({labels:l})}onAlignmentChange(e,t){const n=t.target.value,l=this.props.labels.slice();l[e]=r.extend({},l[e],{alignment:n}),this.props.onChange({labels:l})}setUrl(e,t,n,l){if(!this._isMounted)return;const i=r.clone(this.props.backgroundImage);i.url=e,i.width=t,i.height=n;const g=[i.width,i.height];this.props.onChange({backgroundImage:i,box:g},null,l)}async onUrlChange(e,t){if(!e){this.setUrl(e,0,0,t);return}if(!E.test(e)){this.setState({backgroundImageError:"Images must be from sites hosted by Khan Academy. Please input a Khan Academy-owned address, or use the Add Image tool to rehost an existing image"});return}this.setState({backgroundImageError:""});try{const n=await p.getImageSizeModern(e);this.setUrl(e,n[0],n[1],!0)}catch(n){this.setState({backgroundImageError:`There was an error loading the image URL: ${JSON.stringify(n,null,2)}`})}}onRangeChange(e,t){const n=this.props.range.slice();n[e]=t,this.props.onChange({range:n})}serialize(){return w.serialize.call(this)}render(){const e=this.props.backgroundImage,t=o("div",{className:"image-settings",children:[!p.isLabeledSVG(e.url)&&a("div",{children:o("label",{children:[a("div",{children:"Preview:"}),a("img",{alt:"Editor preview of image",src:e.url,style:{width:"100%"}})]})}),a("div",{children:o("label",{children:[a("div",{children:"Dimensions:"}),o("p",{children:[e.width,"x",e.height]})]})}),a("div",{children:o("label",{children:[o("div",{children:["Alt text:",a(c,{children:"This is important for screenreaders. The content of this alt text will be formatted as markdown (tables, emphasis, etc. are supported)."})]}),a(m,{apiOptions:this.props.apiOptions,content:this.props.alt,onChange:l=>{l.content!=null&&this.change("alt",l.content)},widgetEnabled:!1})]})}),a("div",{children:o("label",{children:[a("div",{children:"Caption:"}),a(m,{apiOptions:this.props.apiOptions,content:this.props.caption,onChange:l=>{l.content!=null&&this.change("caption",l.content)},widgetEnabled:!1})]})})]}),n=a("div",{className:"renderer-widget-error",children:this.state.backgroundImageError});return o("div",{className:"perseus-image-editor",children:[o("label",{children:["Image url:",a(c,{children:"Paste an image or graphie image URL."}),this.state.backgroundImageError&&n,a(v,{value:e.url||"",style:{width:332},onChange:l=>this.onUrlChange(l,!1)})]}),e.url&&t]})}};s.displayName="ImageEditor",s.widgetName="image",s.defaultProps={title:"",range:[h,h],box:[u,u],backgroundImage:I,labels:[],alt:"",caption:""};let d=s;d.__docgenInfo={description:"",methods:[{name:"_renderRowForLabel",docblock:null,modifiers:[],params:[{name:"label",optional:!1,type:null},{name:"i",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"removeLabel",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onCoordinateChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"newCoordinates",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onAlignmentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setUrl",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null},{name:"width",optional:!1,type:null},{name:"height",optional:!1,type:null},{name:"silent",optional:!1,type:null}],returns:null},{name:"onUrlChange",docblock:null,modifiers:["async"],params:[{name:"url",optional:!1,type:{name:"union",raw:"string | undefined | null",elements:[{name:"string"},{name:"undefined"},{name:"null"}]}},{name:"silent",optional:!1,type:{name:"boolean"}}],returns:null},{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null},{name:"newRange",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ImageEditor",props:{apiOptions:{required:!0,tsType:{name:"APIOptions"},description:""},title:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},range:{required:!1,tsType:{name:"tuple",raw:"[Readonly, Readonly]",elements:[{name:"Readonly",elements:[{name:"Range"}],raw:"Readonly"},{name:"Readonly",elements:[{name:"Range"}],raw:"Readonly"}]},description:"",defaultValue:{value:"[defaultRange, defaultRange]",computed:!1}},box:{required:!1,tsType:{name:"Size"},description:"",defaultValue:{value:"[defaultBoxSize, defaultBoxSize]",computed:!1}},backgroundImage:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:`{ +import{a as o,j as a}from"./jsx-runtime-FVsy8kgq.js";import{c as f}from"./article-renderer-ub6lGcPc.js";import{_ as r}from"./jquery-yG1GhClm.js";import{U as p}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as b}from"./components-yT7oveOH.js";import{i as y}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{E as w}from"./editor-jsonify-4Li1SRv8.js";import{r as C}from"./index-TT1qJ6UJ.js";import{B as v}from"./blur-input-hjJsfoK9.js";import{E as m}from"./editor-1XE8pcNh.js";const{InfoTip:c,InlineIcon:R,RangeInput:k}=b,u=400,h=[0,10],I={url:null,width:0,height:0},x="(ka-.*.s3.amazonaws.com|(fastly|cdn).kastatic.org|khanacademy.org|kasandbox.org)",E=new RegExp("^(https?|web\\+graphie)://[^/]*"+x),T=["center","above","above right","right","below right","below","below left","left","above left"],s=class s extends C.Component{constructor(){super(...arguments),this._isMounted=!1,this.state={backgroundImageError:""}}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}_renderRowForLabel(e,t){return o("tr",{children:[a("td",{children:a(k,{value:e.coordinates,onChange:this.onCoordinateChange.bind(this,t)})}),a("td",{style:{verticalAlign:"bottom",width:"5px"},children:a("input",{type:"text",className:"graph-settings-axis-label",value:e.content,onChange:this.onContentChange.bind(this,t)})}),a("td",{children:a("select",{className:"perseus-widget-dropdown",value:e.alignment,onChange:this.onAlignmentChange.bind(this,t),children:T.map(function(n,l){return a("option",{value:n,children:n},""+l)},this)})}),a("td",{children:a("a",{href:"#",className:"simple-button orange delete-label",title:"Remove this label",onClick:this.removeLabel.bind(this,t),children:a(R,{...y})})})]},t)}change(...e){return f.apply(this,e)}removeLabel(e,t){t.preventDefault();const n=[...this.props.labels];n.splice(e,1),this.props.onChange({labels:n})}onCoordinateChange(e,t){const n=this.props.labels.slice();n[e]=r.extend({},n[e],{coordinates:t}),this.props.onChange({labels:n})}onContentChange(e,t){const n=t.target.value,l=this.props.labels.slice();l[e]=r.extend({},l[e],{content:n}),this.props.onChange({labels:l})}onAlignmentChange(e,t){const n=t.target.value,l=this.props.labels.slice();l[e]=r.extend({},l[e],{alignment:n}),this.props.onChange({labels:l})}setUrl(e,t,n,l){if(!this._isMounted)return;const i=r.clone(this.props.backgroundImage);i.url=e,i.width=t,i.height=n;const g=[i.width,i.height];this.props.onChange({backgroundImage:i,box:g},null,l)}async onUrlChange(e,t){if(!e){this.setUrl(e,0,0,t);return}if(!E.test(e)){this.setState({backgroundImageError:"Images must be from sites hosted by Khan Academy. Please input a Khan Academy-owned address, or use the Add Image tool to rehost an existing image"});return}this.setState({backgroundImageError:""});try{const n=await p.getImageSizeModern(e);this.setUrl(e,n[0],n[1],!0)}catch(n){this.setState({backgroundImageError:`There was an error loading the image URL: ${JSON.stringify(n,null,2)}`})}}onRangeChange(e,t){const n=this.props.range.slice();n[e]=t,this.props.onChange({range:n})}serialize(){return w.serialize.call(this)}render(){const e=this.props.backgroundImage,t=o("div",{className:"image-settings",children:[!p.isLabeledSVG(e.url)&&a("div",{children:o("label",{children:[a("div",{children:"Preview:"}),a("img",{alt:"Editor preview of image",src:e.url,style:{width:"100%"}})]})}),a("div",{children:o("label",{children:[a("div",{children:"Dimensions:"}),o("p",{children:[e.width,"x",e.height]})]})}),a("div",{children:o("label",{children:[o("div",{children:["Alt text:",a(c,{children:"This is important for screenreaders. The content of this alt text will be formatted as markdown (tables, emphasis, etc. are supported)."})]}),a(m,{apiOptions:this.props.apiOptions,content:this.props.alt,onChange:l=>{l.content!=null&&this.change("alt",l.content)},widgetEnabled:!1})]})}),a("div",{children:o("label",{children:[a("div",{children:"Caption:"}),a(m,{apiOptions:this.props.apiOptions,content:this.props.caption,onChange:l=>{l.content!=null&&this.change("caption",l.content)},widgetEnabled:!1})]})})]}),n=a("div",{className:"renderer-widget-error",children:this.state.backgroundImageError});return o("div",{className:"perseus-image-editor",children:[o("label",{children:["Image url:",a(c,{children:"Paste an image or graphie image URL."}),this.state.backgroundImageError&&n,a(v,{value:e.url||"",style:{width:332},onChange:l=>this.onUrlChange(l,!1)})]}),e.url&&t]})}};s.displayName="ImageEditor",s.widgetName="image",s.defaultProps={title:"",range:[h,h],box:[u,u],backgroundImage:I,labels:[],alt:"",caption:""};let d=s;d.__docgenInfo={description:"",methods:[{name:"_renderRowForLabel",docblock:null,modifiers:[],params:[{name:"label",optional:!1,type:null},{name:"i",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"removeLabel",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onCoordinateChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"newCoordinates",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onAlignmentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setUrl",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null},{name:"width",optional:!1,type:null},{name:"height",optional:!1,type:null},{name:"silent",optional:!1,type:null}],returns:null},{name:"onUrlChange",docblock:null,modifiers:["async"],params:[{name:"url",optional:!1,type:{name:"union",raw:"string | undefined | null",elements:[{name:"string"},{name:"undefined"},{name:"null"}]}},{name:"silent",optional:!1,type:{name:"boolean"}}],returns:null},{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null},{name:"newRange",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ImageEditor",props:{apiOptions:{required:!0,tsType:{name:"APIOptions"},description:""},title:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},range:{required:!1,tsType:{name:"tuple",raw:"[Readonly, Readonly]",elements:[{name:"Readonly",elements:[{name:"Range"}],raw:"Readonly"},{name:"Readonly",elements:[{name:"Range"}],raw:"Readonly"}]},description:"",defaultValue:{value:"[defaultRange, defaultRange]",computed:!1}},box:{required:!1,tsType:{name:"Size"},description:"",defaultValue:{value:"[defaultBoxSize, defaultBoxSize]",computed:!1}},backgroundImage:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:`{ url: null, width: 0, height: 0, diff --git a/assets/image-editor.stories-KUue3KBI.js b/assets/image-editor.stories-d_RmF4xh.js similarity index 69% rename from assets/image-editor.stories-KUue3KBI.js rename to assets/image-editor.stories-d_RmF4xh.js index 14b48cca2f..c07d87aaf8 100644 --- a/assets/image-editor.stories-KUue3KBI.js +++ b/assets/image-editor.stories-d_RmF4xh.js @@ -1,3 +1,3 @@ -import{j as o,a as p}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as d}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as u}from"./index-6h5t6F0w.js";import{s as f}from"./index-deFLJwr4.js";import{b as g}from"./index-h_CiYGGb.js";import{a as h}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as y}from"./index-awljIyHI.js";import{r as e}from"./index-TT1qJ6UJ.js";import{I as S}from"./image-editor-oat1qOOh.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-6SWUlni2.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-Ts3i1VPI.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-0_QL8uoF.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./components-V6aclUoQ.js";import"./editor-jsonify-yjAz4UcO.js";import"./blur-input-hjJsfoK9.js";import"./editor-Y01VX-A3.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const xr={title:"PerseusEditor/Widgets/Image Editor"},b=y.StyleSheet.create({wrapper:{width:338,margin:20}}),w=h("onChange"),E=()=>{const r=e.useRef(null),[l,c]=e.useState({backgroundImage:{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png"}});return p(u,{style:b.wrapper,children:[p(g,{style:{fontStyle:"italic",marginBottom:f.small_12},children:[o("b",{children:"Note"})," that this editor has a known-issue where it does not calculate the image dimensions initially if they aren't provided. It does update the dimensions when you blur the 'Image url:' field."]}),o(S,{...l,apiOptions:d.defaults,onChange:i=>{var m;w(i),c({...(m=r.current)==null?void 0:m.serialize(),...i})},ref:r})]})},t=r=>o(E,{});t.__docgenInfo={description:"",methods:[],displayName:"Default"};var a,s,n;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o,a as p}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import{A as d}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as u}from"./index-6h5t6F0w.js";import{s as f}from"./index-deFLJwr4.js";import{b as g}from"./index-h_CiYGGb.js";import{a as h}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as y}from"./index-awljIyHI.js";import{r as e}from"./index-TT1qJ6UJ.js";import{I as S}from"./image-editor-xcASymG3.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-VNdK7gMK.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-MKIRfGVo.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-lqQAegUH.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./components-yT7oveOH.js";import"./editor-jsonify-4Li1SRv8.js";import"./blur-input-hjJsfoK9.js";import"./editor-1XE8pcNh.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const xr={title:"PerseusEditor/Widgets/Image Editor"},b=y.StyleSheet.create({wrapper:{width:338,margin:20}}),w=h("onChange"),E=()=>{const r=e.useRef(null),[l,c]=e.useState({backgroundImage:{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png"}});return p(u,{style:b.wrapper,children:[p(g,{style:{fontStyle:"italic",marginBottom:f.small_12},children:[o("b",{children:"Note"})," that this editor has a known-issue where it does not calculate the image dimensions initially if they aren't provided. It does update the dimensions when you blur the 'Image url:' field."]}),o(S,{...l,apiOptions:d.defaults,onChange:i=>{var m;w(i),c({...(m=r.current)==null?void 0:m.serialize(),...i})},ref:r})]})},t=r=>o(E,{});t.__docgenInfo={description:"",methods:[],displayName:"Default"};var a,s,n;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(n=(s=t.parameters)==null?void 0:s.docs)==null?void 0:n.source}}};const _r=["Default"];export{t as Default,_r as __namedExportsOrder,xr as default}; diff --git a/assets/image-loader-44YtE05i.js b/assets/image-loader-3HliPbpF.js similarity index 98% rename from assets/image-loader-44YtE05i.js rename to assets/image-loader-3HliPbpF.js index f08ed74fd3..9fa0b160d7 100644 --- a/assets/image-loader-44YtE05i.js +++ b/assets/image-loader-3HliPbpF.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as u}from"./index-TT1qJ6UJ.js";import{g as l}from"./dependencies-8XILypbq.js";const e={PENDING:"pending",LOADING:"loading",LOADED:"loaded",FAILED:"failed"};class m extends u.Component{constructor(n){super(n),this.createLoader=()=>{this.destroyLoader(),this.img=new Image,this.img.onload=this.handleLoad,this.img.onerror=this.handleError,this.img.src=this.props.src},this.destroyLoader=()=>{this.img&&(this.img.onload=null,this.img.onerror=null,this.img=null)},this.handleLoad=t=>{this.destroyLoader(),this.setState({status:e.LOADED}),this.props.onLoad&&this.props.onLoad(t)},this.handleError=t=>{this.destroyLoader(),this.setState({status:e.FAILED}),this.props.onError&&this.props.onError(t)},this.renderImg=()=>{const{src:t,imgProps:s}=this.props;let a,i;s.onClick!=null&&(a=r=>{(r.keyCode===13||r.keyCode===32)&&s.onClick&&s.onClick(r)},i=r=>{r.keyCode===32&&r.preventDefault()});const o=l().staticUrl;return d("img",{src:o(t),onKeyUp:a,onKeyDown:i,...s})},this.state={status:n.src?e.LOADING:e.PENDING}}componentDidMount(){this.state.status===e.LOADING&&this.createLoader()}UNSAFE_componentWillReceiveProps(n){this.props.src!==n.src&&this.setState({status:n.src?e.LOADING:e.PENDING})}componentDidUpdate(n,t){this.state.status===e.LOADING&&!this.img&&this.createLoader(),t.status!==this.state.status&&this.props.onUpdate(this.state.status)}componentWillUnmount(){this.destroyLoader()}render(){switch(this.state.status){case e.LOADED:return this.renderImg();case e.FAILED:if(this.props.children)return this.props.children;break;default:if(this.props.preloader)return this.props.preloader()}return null}}m.__docgenInfo={description:`Component to display an image (or other React components) while the desired +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as u}from"./index-TT1qJ6UJ.js";import{g as l}from"./dependencies-d8cZibFS.js";const e={PENDING:"pending",LOADING:"loading",LOADED:"loaded",FAILED:"failed"};class m extends u.Component{constructor(n){super(n),this.createLoader=()=>{this.destroyLoader(),this.img=new Image,this.img.onload=this.handleLoad,this.img.onerror=this.handleError,this.img.src=this.props.src},this.destroyLoader=()=>{this.img&&(this.img.onload=null,this.img.onerror=null,this.img=null)},this.handleLoad=t=>{this.destroyLoader(),this.setState({status:e.LOADED}),this.props.onLoad&&this.props.onLoad(t)},this.handleError=t=>{this.destroyLoader(),this.setState({status:e.FAILED}),this.props.onError&&this.props.onError(t)},this.renderImg=()=>{const{src:t,imgProps:s}=this.props;let a,i;s.onClick!=null&&(a=r=>{(r.keyCode===13||r.keyCode===32)&&s.onClick&&s.onClick(r)},i=r=>{r.keyCode===32&&r.preventDefault()});const o=l().staticUrl;return d("img",{src:o(t),onKeyUp:a,onKeyDown:i,...s})},this.state={status:n.src?e.LOADING:e.PENDING}}componentDidMount(){this.state.status===e.LOADING&&this.createLoader()}UNSAFE_componentWillReceiveProps(n){this.props.src!==n.src&&this.setState({status:n.src?e.LOADING:e.PENDING})}componentDidUpdate(n,t){this.state.status===e.LOADING&&!this.img&&this.createLoader(),t.status!==this.state.status&&this.props.onUpdate(this.state.status)}componentWillUnmount(){this.destroyLoader()}render(){switch(this.state.status){case e.LOADED:return this.renderImg();case e.FAILED:if(this.props.children)return this.props.children;break;default:if(this.props.preloader)return this.props.preloader()}return null}}m.__docgenInfo={description:`Component to display an image (or other React components) while the desired image is loading. Derived from diff --git a/assets/image-loader.stories-v1h5kRva.js b/assets/image-loader.stories-9Gky6BXL.js similarity index 91% rename from assets/image-loader.stories-v1h5kRva.js rename to assets/image-loader.stories-9Gky6BXL.js index fd675c4493..2cc69b4965 100644 --- a/assets/image-loader.stories-v1h5kRva.js +++ b/assets/image-loader.stories-9Gky6BXL.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{I as l}from"./image-loader-44YtE05i.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./dependencies-8XILypbq.js";const h="http://www.khanacademy.org/images/ohnoes-concerned.svg",u="https://www.khanacademy.org/images/hand-tree.new.png",b={title:"Perseus/Components/Image Loader",component:l,args:{preloader:null,imgProps:{alt:"ALT"},onUpdate:()=>{}},parameters:{chromatic:{disableSnapshot:!0}}},a={args:{src:h}},e={args:{src:u}},r={args:{src:"http://abcdefiahofshiaof.noway.badimage.com",children:p("span",{children:"You can see me! The image failed to load."})}};var s,o,n;a.parameters={...a.parameters,docs:{...(s=a.parameters)==null?void 0:s.docs,source:{originalSource:`{ +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{I as l}from"./image-loader-3HliPbpF.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./dependencies-d8cZibFS.js";const h="http://www.khanacademy.org/images/ohnoes-concerned.svg",u="https://www.khanacademy.org/images/hand-tree.new.png",b={title:"Perseus/Components/Image Loader",component:l,args:{preloader:null,imgProps:{alt:"ALT"},onUpdate:()=>{}},parameters:{chromatic:{disableSnapshot:!0}}},a={args:{src:h}},e={args:{src:u}},r={args:{src:"http://abcdefiahofshiaof.noway.badimage.com",children:p("span",{children:"You can see me! The image failed to load."})}};var s,o,n;a.parameters={...a.parameters,docs:{...(s=a.parameters)==null?void 0:s.docs,source:{originalSource:`{ args: { src: svgUrl } diff --git a/assets/image.stories-9jjiXyN9.js b/assets/image.stories-__9V67DH.js similarity index 81% rename from assets/image.stories-9jjiXyN9.js rename to assets/image.stories-__9V67DH.js index eaf4a9e856..a5c782f4a4 100644 --- a/assets/image.stories-9jjiXyN9.js +++ b/assets/image.stories-__9V67DH.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{R as c}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const t={content:`[[☃ image 1]] +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{R as c}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const t={content:`[[☃ image 1]] ===== diff --git a/assets/index-6m5XMHRW.js b/assets/index-JX1pDXLf.js similarity index 98% rename from assets/index-6m5XMHRW.js rename to assets/index-JX1pDXLf.js index 4480bf5728..7057c998f0 100644 --- a/assets/index-6m5XMHRW.js +++ b/assets/index-JX1pDXLf.js @@ -1,4 +1,4 @@ -import{a as s,j as e,F as $}from"./jsx-runtime-FVsy8kgq.js";import{c as h}from"./article-renderer-GCz9idJ2.js";import{_ as r}from"./jquery-yG1GhClm.js";import{U as H}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import{a as g,g as j}from"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import{K as p}from"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{E as f}from"./editor-jsonify-yjAz4UcO.js";import{r as d}from"./index-TT1qJ6UJ.js";import{G as Q}from"./graph-settings-6z3yJikg.js";import{c}from"./components-V6aclUoQ.js";import{c as Z,i as ee}from"./icon-paths-5JCXzGsq.js";import{g as ne,b as te,a as ae}from"./icon-paths-EoBkHOLI.js";import"./prop-types-SKtvHVtl.js";import{c as se}from"./key-translator-Bl2XtQm9.js";import"./mobile-keypad-wPUeR8mM.js";import{u as re}from"./button-assets-txIojR3b.js";import{V as ie}from"./index-6h5t6F0w.js";import{c as K}from"./index-deFLJwr4.js";import{l as le}from"./index-awljIyHI.js";const{InlineIcon:b}=c,D=class D extends d.Component{constructor(n){super(n),this.toggle=t=>{t.preventDefault(),this.setState({show:!this.state.show})},this.state={show:n.initiallyVisible}}render(){return s("div",{className:"perseus-interaction-element",children:[s("a",{href:"#",className:"perseus-interaction-element-title "+(this.state.show?"open":"closed"),onClick:this.toggle,children:[this.state.show?e(b,{...Z}):e(b,{...ne}),this.props.title]}),s("div",{className:"perseus-interaction-element-content "+(this.state.show?"enter":"leave"),children:[this.props.children,(this.props.onUp!=null||this.props.onDown!=null||this.props.onDelete!=null)&&s("div",{className:"edit-controls",children:[this.props.onUp!=null&&e("button",{onClick:this.props.onUp,children:e(b,{...te})}),this.props.onDown!=null&&e("button",{onClick:this.props.onDown,children:e(b,{...ae})}),this.props.onDelete!=null&&e("button",{onClick:this.props.onDelete,children:e(b,{...ee})})]})]})]})}};D.defaultProps={initiallyVisible:!1,title:"More"};let u=D;u.__docgenInfo={description:"",methods:[{name:"toggle",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent",alias:"React.SyntheticEvent"}}],returns:null}],displayName:"ElementContainer",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactElement | ReadonlyArray>",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]},{name:"ReadonlyArray",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}],raw:"ReadonlyArray>"}]},description:""},initiallyVisible:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onDown:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onUp:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},title:{required:!1,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}]},description:"",defaultValue:{value:'"More"',computed:!1}}}};const{ButtonGroup:oe}=c,pe=[p.BLACK,p.BLUE,p.GREEN,p.PINK,p.PURPLE,p.RED,p.GRAY],de=[p.LIGHT_BLUE,p.LIGHT_ORANGE,p.LIGHT_PINK,p.LIGHT_GREEN,p.LIGHT_PURPLE,p.LIGHT_RED,"#fff"],X=class X extends d.Component{render(){const n=this.props.lightColors?de:pe;return e(oe,{value:this.props.value,allowEmpty:!1,buttons:r.map(n,t=>({value:t,content:s("span",{children:[e("span",{className:"colorpicker-circle",style:{background:t}})," "]})})),onChange:this.props.onChange})}};X.defaultProps={value:p.BLACK,lightColors:!1};let m=X;m.__docgenInfo={description:"",methods:[],displayName:"ColorPicker",props:{lightColors:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}}}};const{ButtonGroup:ue}=c,M=class M extends d.Component{render(){return e(ue,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e("span",{children:"—"})},{value:"-",content:e("span",{children:"–––"})},{value:"- ",content:e("span",{children:"–  –"})},{value:".",content:e("span",{children:"····"})},{value:". ",content:e("span",{children:"· · ·"})}],onChange:this.props.onChange})}};M.defaultProps={value:""};let y=M;y.__docgenInfo={description:"",methods:[],displayName:"DashPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};function i(W){const n=d.useRef(null),t=d.useRef(),{locale:a,strings:o}=re();return d.useEffect(()=>{n.current&&!t.current&&(t.current=se(n.current,a,o,l=>({...l,handlers:{edit:v=>{let _=v.latex();_=_.replace(/<>/g,"\\ne"),W.value!==_&&W.onChange(_)},upOutOf:v=>{v.typedText("^")}}})))}),e(ie,{style:ce.outerWrapper,children:e("span",{ref:n,className:"perseus-math-input mq-editable-field mq-math-mode"})})}const ce=le.StyleSheet.create({outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:K.offBlack50,borderRadius:3,background:K.white}});i.__docgenInfo={description:`A simple Mathquill MathField input for the InteractionEditor. +import{a as s,j as e,F as $}from"./jsx-runtime-FVsy8kgq.js";import{c as h}from"./article-renderer-ub6lGcPc.js";import{_ as r}from"./jquery-yG1GhClm.js";import{U as H}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import{a as g,g as j}from"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import{K as p}from"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{E as f}from"./editor-jsonify-4Li1SRv8.js";import{r as d}from"./index-TT1qJ6UJ.js";import{G as Q}from"./graph-settings-VTKCtXa5.js";import{c}from"./components-yT7oveOH.js";import{c as Z,i as ee}from"./icon-paths-5JCXzGsq.js";import{g as ne,b as te,a as ae}from"./icon-paths-EoBkHOLI.js";import"./prop-types-SKtvHVtl.js";import{c as se}from"./key-translator-Bl2XtQm9.js";import"./mobile-keypad-wPUeR8mM.js";import{u as re}from"./button-assets-txIojR3b.js";import{V as ie}from"./index-6h5t6F0w.js";import{c as K}from"./index-deFLJwr4.js";import{l as le}from"./index-awljIyHI.js";const{InlineIcon:b}=c,D=class D extends d.Component{constructor(n){super(n),this.toggle=t=>{t.preventDefault(),this.setState({show:!this.state.show})},this.state={show:n.initiallyVisible}}render(){return s("div",{className:"perseus-interaction-element",children:[s("a",{href:"#",className:"perseus-interaction-element-title "+(this.state.show?"open":"closed"),onClick:this.toggle,children:[this.state.show?e(b,{...Z}):e(b,{...ne}),this.props.title]}),s("div",{className:"perseus-interaction-element-content "+(this.state.show?"enter":"leave"),children:[this.props.children,(this.props.onUp!=null||this.props.onDown!=null||this.props.onDelete!=null)&&s("div",{className:"edit-controls",children:[this.props.onUp!=null&&e("button",{onClick:this.props.onUp,children:e(b,{...te})}),this.props.onDown!=null&&e("button",{onClick:this.props.onDown,children:e(b,{...ae})}),this.props.onDelete!=null&&e("button",{onClick:this.props.onDelete,children:e(b,{...ee})})]})]})]})}};D.defaultProps={initiallyVisible:!1,title:"More"};let u=D;u.__docgenInfo={description:"",methods:[{name:"toggle",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent",alias:"React.SyntheticEvent"}}],returns:null}],displayName:"ElementContainer",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactElement | ReadonlyArray>",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]},{name:"ReadonlyArray",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}],raw:"ReadonlyArray>"}]},description:""},initiallyVisible:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onDown:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onUp:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},title:{required:!1,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}]},description:"",defaultValue:{value:'"More"',computed:!1}}}};const{ButtonGroup:oe}=c,pe=[p.BLACK,p.BLUE,p.GREEN,p.PINK,p.PURPLE,p.RED,p.GRAY],de=[p.LIGHT_BLUE,p.LIGHT_ORANGE,p.LIGHT_PINK,p.LIGHT_GREEN,p.LIGHT_PURPLE,p.LIGHT_RED,"#fff"],X=class X extends d.Component{render(){const n=this.props.lightColors?de:pe;return e(oe,{value:this.props.value,allowEmpty:!1,buttons:r.map(n,t=>({value:t,content:s("span",{children:[e("span",{className:"colorpicker-circle",style:{background:t}})," "]})})),onChange:this.props.onChange})}};X.defaultProps={value:p.BLACK,lightColors:!1};let m=X;m.__docgenInfo={description:"",methods:[],displayName:"ColorPicker",props:{lightColors:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}}}};const{ButtonGroup:ue}=c,M=class M extends d.Component{render(){return e(ue,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e("span",{children:"—"})},{value:"-",content:e("span",{children:"–––"})},{value:"- ",content:e("span",{children:"–  –"})},{value:".",content:e("span",{children:"····"})},{value:". ",content:e("span",{children:"· · ·"})}],onChange:this.props.onChange})}};M.defaultProps={value:""};let y=M;y.__docgenInfo={description:"",methods:[],displayName:"DashPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};function i(W){const n=d.useRef(null),t=d.useRef(),{locale:a,strings:o}=re();return d.useEffect(()=>{n.current&&!t.current&&(t.current=se(n.current,a,o,l=>({...l,handlers:{edit:v=>{let _=v.latex();_=_.replace(/<>/g,"\\ne"),W.value!==_&&W.onChange(_)},upOutOf:v=>{v.typedText("^")}}})))}),e(ie,{style:ce.outerWrapper,children:e("span",{ref:n,className:"perseus-math-input mq-editable-field mq-math-mode"})})}const ce=le.StyleSheet.create({outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:K.offBlack50,borderRadius:3,background:K.white}});i.__docgenInfo={description:`A simple Mathquill MathField input for the InteractionEditor. Unlike our other uses of Mathquill, we're not using a keypad here; it's just the input itself for use writing TeX.`,methods:[],displayName:"MathquillInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};const{NumberInput:he}=c,{getDependencies:me}=g,L=class L extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=me();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:[e(n,{children:this.props.funcName+"(x)="})," ",e(i,{value:this.props.value,onChange:this.change("value")})]}),s("div",{className:"perseus-widget-row",children:["Range: ",e(n,{children:"\\Large("}),e(i,{value:this.props.rangeMin,onChange:this.change("rangeMin")}),e(n,{children:","})," ",e(i,{value:this.props.rangeMax,onChange:this.change("rangeMax")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})}),e("div",{className:"perseus-widget-row",children:e(y,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")})}),e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-left-col",children:["Width:"," ",e(he,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};L.defaultProps={value:"x",rangeMin:"-10",rangeMax:"10",color:p.BLUE,strokeDasharray:"",strokeWidth:2};let w=L;w.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"FunctionEditor",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"x"',computed:!1}},rangeMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},rangeMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLUE",computed:!0}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{TextInput:ge}=c,{getDependencies:fe}=g,Y=class Y extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=fe();return s("div",{className:"graph-settings",children:[e("div",{className:"perseus-widget-row",children:e(ge,{value:this.props.label,onChange:this.change("label"),style:{width:"100%"}})}),s("div",{className:"perseus-widget-row",children:["Location: ",e(n,{children:"\\Large("}),e(i,{value:this.props.coordX,onChange:this.change("coordX")}),e(n,{children:","})," ",e(i,{value:this.props.coordY,onChange:this.change("coordY")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})})]})}};Y.defaultProps={coordX:"0",coordY:"0",color:p.BLACK,label:"\\phi"};let N=Y;N.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"LabelEditor",props:{color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}},coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},label:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"\\\\phi"',computed:!1}}}};const{ButtonGroup:ye}=c,I=class I extends d.Component{render(){return e(ye,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e("span",{children:"—"})},{value:"->",content:e("span",{children:"→"})}],onChange:this.props.onChange})}};I.defaultProps={value:""};let S=I;S.__docgenInfo={description:"",methods:[],displayName:"ArrowPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};const{NumberInput:ve}=c,{getDependencies:be}=g,U=class U extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=be();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:["Start: ",e(n,{children:"\\Large("}),e(i,{value:this.props.startX,onChange:this.change("startX")}),e(n,{children:","})," ",e(i,{value:this.props.startY,onChange:this.change("startY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["End: ",e(n,{children:"\\Large("}),e(i,{value:this.props.endX,onChange:this.change("endX")}),e(n,{children:","})," ",e(i,{value:this.props.endY,onChange:this.change("endY")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})}),s("div",{className:"perseus-widget-row",children:[e(y,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")}),"   ",e(S,{value:this.props.arrows,onChange:this.change("arrows")})]}),e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-left-col",children:["Width:"," ",e(ve,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};U.defaultProps={startX:"-5",startY:"5",endX:"5",endY:"5",color:p.BLACK,strokeDasharray:"",arrows:"",strokeWidth:2};let C=U;C.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"LineEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},arrows:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{ButtonGroup:we,NumberInput:Ne}=c,P=class P extends d.Component{constructor(){super(...arguments),this.change=n=>h.call(this,n)}render(){const{TeX:n}=j();return s("div",{children:[s("div",{className:"perseus-widget-row",children:["Constraint:"," ",e(we,{value:this.props.constraint,allowEmpty:!1,buttons:[{value:"none",content:"None"},{value:"snap",content:"Snap"},{value:"x",content:"x="},{value:"y",content:"y="}],onChange:this.change("constraint")})]}),this.props.constraint==="snap"&&s("div",{className:"perseus-widget-row",children:["Snap:"," ",e(Ne,{value:this.props.snap,placeholder:0,onChange:this.change("snap")})]}),this.props.constraint==="x"&&e("div",{className:"graph-settings",children:s("div",{className:"perseus-widget-row",children:[e(n,{children:"x="})," ",e(i,{value:this.props.constraintFn,onChange:this.change("constraintFn")})]})}),this.props.constraint==="y"&&e("div",{className:"graph-settings",children:s("div",{className:"perseus-widget-row",children:[e(n,{children:"y="})," ",e(i,{value:this.props.constraintFn,onChange:this.change("constraintFn")})]})}),"Ensure these are set so nothing can be dragged off the canvas:",e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-row",children:[e(n,{children:"x \\in \\Large["})," ",e(i,{value:this.props.constraintXMin,onChange:this.change("constraintXMin")}),e(n,{children:", "})," ",e(i,{value:this.props.constraintXMax,onChange:this.change("constraintXMax")})," ",e(n,{children:"\\Large]"})]})}),e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-row",children:[e(n,{children:"y \\in \\Large["})," ",e(i,{value:this.props.constraintYMin,onChange:this.change("constraintYMin")}),e(n,{children:", "})," ",e(i,{value:this.props.constraintYMax,onChange:this.change("constraintYMax")})," ",e(n,{children:"\\Large]"})]})})]})}};P.defaultProps={constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let k=P;k.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"propName",optional:!1,type:{name:"string"}}],returns:{type:{name:"unknown"}}}],displayName:"ConstraintEditor",props:{constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},constraintXMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},constraintXMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},constraintYMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},constraintYMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}}}};const{NumberInput:J}=c,{getDependencies:Ce}=g,z=class z extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=Ce();return s("div",{className:"graph-settings",children:["Initial position:",s("div",{className:"perseus-widget-row",children:["Start: ",e(n,{children:"\\Large("}),e(i,{value:this.props.startX,onChange:this.change("startX")}),e(n,{children:","})," ",e(i,{value:this.props.startY,onChange:this.change("startY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["End: ",e(n,{children:"\\Large("}),e(i,{value:this.props.endX,onChange:this.change("endX")}),e(n,{children:","})," ",e(i,{value:this.props.endY,onChange:this.change("endY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["Start updates ",e(n,{children:"(x_n, y_n)"})," for ",e(n,{children:"n ="}),e(J,{value:this.props.startSubscript,placeholder:0,onChange:this.change("startSubscript")})]}),s("div",{className:"perseus-widget-row",children:["End updates ",e(n,{children:"(x_m, y_m)"})," for ",e(n,{children:"m ="}),e(J,{value:this.props.endSubscript,placeholder:0,onChange:this.change("endSubscript")})]}),e("div",{className:"perseus-widget-row",children:"All constraints are applied to the start point."}),e(k,{...this.props})]})}};z.defaultProps={startX:"-5",startY:"5",endX:"5",endY:"5",constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let R=z;R.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MovableLineEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},startSubscript:{required:!0,tsType:{name:"number"},description:""},endSubscript:{required:!0,tsType:{name:"number"},description:""},constraintXMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintXMax:{defaultValue:{value:'"10"',computed:!1},required:!1},constraintYMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintYMax:{defaultValue:{value:'"10"',computed:!1},required:!1}}};const{NumberInput:ke}=c,{getDependencies:Re}=g,G=class G extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=Re();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:["Start: ",e(n,{children:"\\Large("}),e(i,{value:this.props.startX,onChange:this.change("startX")}),e(n,{children:","})," ",e(i,{value:this.props.startY,onChange:this.change("startY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["Update ",e(n,{children:"(x_n, y_n)"})," for ",e(n,{children:"n ="})," ",e(ke,{value:this.props.varSubscript,placeholder:0,onChange:this.change("varSubscript")})]}),e(k,{...this.props})]})}};G.defaultProps={startX:"0",startY:"0",constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let q=G;q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MovablePointEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},varSubscript:{required:!0,tsType:{name:"number"},description:""},constraintXMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintXMax:{defaultValue:{value:'"10"',computed:!1},required:!1},constraintYMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintYMax:{defaultValue:{value:'"10"',computed:!1},required:!1}}};const{NumberInput:qe}=c,{getDependencies:xe}=g,B=class B extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=xe();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:[e(n,{children:"X(t) ="})," ",e(i,{value:this.props.x,onChange:this.change("x")})]}),s("div",{className:"perseus-widget-row",children:[e(n,{children:"Y(t) ="})," ",e(i,{value:this.props.y,onChange:this.change("y")})]}),s("div",{className:"perseus-widget-row",children:["Range: ",e(n,{children:"\\Large("}),e(i,{value:this.props.rangeMin,onChange:this.change("rangeMin")}),e(n,{children:","})," ",e(i,{value:this.props.rangeMax,onChange:this.change("rangeMax")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})}),e("div",{className:"perseus-widget-row",children:e(y,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")})}),e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-left-col",children:["Width:"," ",e(qe,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};B.defaultProps={x:"cos(t)",y:"sin(t)",rangeMin:"0",rangeMax:"2\\pi",color:p.BLUE,strokeDasharray:"",strokeWidth:2};let x=B;x.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ParametricEditor",props:{x:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"cos(t)"',computed:!1}},y:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"sin(t)"',computed:!1}},rangeMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},rangeMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"2\\\\pi"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLUE",computed:!0}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{getDependencies:Te}=g,F=class F extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=Te();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:["Coordinate: ",e(n,{children:"\\Large("}),e(i,{value:this.props.coordX,onChange:this.change("coordX")}),e(n,{children:","})," ",e(i,{value:this.props.coordY,onChange:this.change("coordY")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})})]})}};F.defaultProps={coordX:"0",coordY:"0",color:p.BLACK};let T=F;T.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PointEditor",props:{coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}}}};const{getDependencies:Ae}=g,O=class O extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=Ae();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:["Bottom left: ",e(n,{children:"\\Large("}),e(i,{value:this.props.coordX,onChange:this.change("coordX")}),e(n,{children:","})," ",e(i,{value:this.props.coordY,onChange:this.change("coordY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["Width:"," ",e(i,{value:this.props.width,onChange:this.change("width")})]}),s("div",{className:"perseus-widget-row",children:["Height:"," ",e(i,{value:this.props.height,onChange:this.change("height")})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,lightColors:!0,onChange:this.change("color")})}),e("div",{className:"perseus-widget-row",children:"You want a border? Sorry, draw your own."})]})}};O.defaultProps={coordX:"-5",coordY:"5",width:"2",height:"3",color:p.LIGHT_BLUE};let A=O;A.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RectangleEditor",props:{color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.LIGHT_BLUE",computed:!0}},coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},height:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"3"',computed:!1}},width:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"2"',computed:!1}}}};const{getDependencies:_e}=g,{unescapeMathMode:Se}=H,Ve={graph:{box:[400,400],labels:["x","y"],range:[[-10,10],[-10,10]],tickStep:[1,1],gridStep:[1,1],markings:"graph"},elements:[]},E=class E extends d.Component{constructor(){super(...arguments),this.state={usedVarSubscripts:this._getAllVarSubscripts(this.props.elements),usedFunctionNames:this._getAllFunctionNames(this.props.elements)},this._updateGraphProps=n=>{this.change({graph:r.extend(r.omit(n,"step"),{tickStep:n.step})})},this._addNewElement=n=>{const t=n.target.value;if(t==="")return;n.target.value="";const a={type:t,key:t+"-"+(Math.random()*16777215<<0).toString(16),options:t==="point"?r.clone(T.defaultProps):t==="line"?r.clone(C.defaultProps):t==="movable-point"?r.clone(q.defaultProps):t==="movable-line"?r.clone(R.defaultProps):t==="function"?r.clone(w.defaultProps):t==="parametric"?r.clone(x.defaultProps):t==="label"?r.clone(N.defaultProps):t==="rectangle"?r.clone(A.defaultProps):{}};let o;if(t==="movable-point")o=r.max([r.max(this.state.usedVarSubscripts),-1])+1,a.options.varSubscript=o;else if(t==="movable-line")o=r.max([r.max(this.state.usedVarSubscripts),-1])+1,a.options.startSubscript=o,a.options.endSubscript=o+1;else if(t==="function"){const l=String.fromCharCode(r.max([r.max(r.map(this.state.usedFunctionNames,function(v){return v.charCodeAt(0)})),101])+1);a.options.funcName=l}this.change({elements:this.props.elements.concat(a)})},this._deleteElement=n=>{const t=this.props.elements[n];this.change({elements:r.without(this.props.elements,t)})},this._moveElementUp=n=>{const t=this.props.elements[n],a=r.without(this.props.elements,t);a.splice(n-1,0,t),this.change({elements:a})},this._moveElementDown=n=>{const t=this.props.elements[n],a=r.without(this.props.elements,t);a.splice(n+1,0,t),this.change({elements:a})},this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}UNSAFE_componentWillReceiveProps(n){this.setState({usedVarSubscripts:this._getAllVarSubscripts(n.elements),usedFunctionNames:this._getAllFunctionNames(n.elements)})}_getAllVarSubscripts(n){return r.map(r.where(n,{type:"movable-point"}),t=>t.options.varSubscript).concat(r.map(r.where(n,{type:"movable-line"}),t=>t.options.startSubscript)).concat(r.map(r.where(n,{type:"movable-line"}),t=>t.options.endSubscript))}_getAllFunctionNames(n){return r.map(r.where(n,{type:"function"}),t=>t.options.funcName)}render(){const{TeX:n}=_e();return s("div",{className:"perseus-widget-interaction-editor",children:[s(u,{title:"Grid settings",children:[e(Q,{editableSettings:["canvas","graph"],box:this.props.graph.box,labels:this.props.graph.labels,range:this.props.graph.range,step:this.props.graph.tickStep,gridStep:this.props.graph.gridStep,markings:this.props.graph.markings,onChange:this._updateGraphProps}),e($,{children:this.props.graph.valid!==!0&&e("div",{children:this.props.graph.valid})})]}),r.map(this.props.elements,function(t,a){if(t.type==="movable-point")return e(u,{title:s("span",{children:["Movable point"," ",e(n,{children:"(x_{"+t.options.varSubscript+"}, y_{"+t.options.varSubscript+"})"})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement.bind(this,a),children:e(q,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="movable-line")return e(u,{title:s("span",{children:["Movable line"," ",e(n,{children:"(x_{"+t.options.startSubscript+"}, y_{"+t.options.startSubscript+"})"})," ","to"," ",e(n,{children:"(x_{"+t.options.endSubscript+"}, y_{"+t.options.endSubscript+"})"})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement.bind(this,a),children:e(R,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="point")return e(u,{title:s("span",{children:["Point"," ",e(n,{children:"("+t.options.coordX+", "+t.options.coordY+")"})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement.bind(this,a),children:e(T,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="line")return e(u,{title:s("span",{children:["Line"," ",e(n,{children:"("+t.options.startX+", "+t.options.startY+")"})," ","to"," ",e(n,{children:"("+t.options.endX+", "+t.options.endY+")"})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement.bind(this,a),children:e(C,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="function")return e(u,{title:s("span",{children:["Function"," ",e(n,{children:t.options.funcName+"(x) = "+t.options.value})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement,children:e(w,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="parametric")return e(u,{title:e("span",{children:"Parametric"}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement,children:e(x,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="label")return e(u,{title:s("span",{children:["Label"," ",e(n,{children:Se(t.options.label)})," "]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement,children:e(N,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="rectangle")return e(u,{title:s("span",{children:["Rectangle"," ",e(n,{children:"("+t.options.coordX+", "+t.options.coordY+")"})," — ",e(n,{children:t.options.width+" \\times "+t.options.height})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement,children:e(A,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key)},this),e("div",{className:"perseus-widget-interaction-editor-select-element",children:s("select",{onChange:this._addNewElement,children:[s("option",{value:"",children:["Add an element","…"]}),e("option",{disabled:!0,children:"--"}),e("option",{value:"point",children:"Point"}),e("option",{value:"line",children:"Line segment"}),e("option",{value:"function",children:"Function plot"}),e("option",{value:"parametric",children:"Parametric plot"}),e("option",{value:"label",children:"Label"}),e("option",{value:"rectangle",children:"Rectangle"}),e("option",{value:"movable-point",children:"★ Movable point"}),e("option",{value:"movable-line",children:"★ Movable line segment"})]})})]})}};E.widgetName="interaction",E.defaultProps=Ve;let V=E;V.__docgenInfo={description:"",methods:[{name:"_getAllVarSubscripts",docblock:null,modifiers:[],params:[{name:"elements",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:{type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray"}}},{name:"_getAllFunctionNames",docblock:null,modifiers:[],params:[{name:"elements",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:{type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"}}},{name:"_updateGraphProps",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"_addNewElement",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_deleteElement",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"_moveElementUp",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"_moveElementDown",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InteractionEditor",props:{elements:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},graph:{required:!1,tsType:{name:"signature",type:"object",raw:`{ box: ReadonlyArray; diff --git a/assets/index-LBTd2Ozi.js b/assets/index-n67YmpRR.js similarity index 68% rename from assets/index-LBTd2Ozi.js rename to assets/index-n67YmpRR.js index f49ef31f5a..0782959a4a 100644 --- a/assets/index-LBTd2Ozi.js +++ b/assets/index-n67YmpRR.js @@ -1,6 +1,6 @@ -import{a as F}from"./version-akiLXZts.js";import"./article-editor-Hyxtmbid.js";import"./device-framer-eGajQcXC.js";import"./viewport-resizer-pZjHp3_4.js";import{j as t,a as p}from"./jsx-runtime-FVsy8kgq.js";import{P as d}from"./index-0C4KXdeC.js";import{r as y}from"./index-TT1qJ6UJ.js";import{_ as N}from"./jquery-yG1GhClm.js";import{R as M,W as U}from"./structured-item-diff-EmSySxnw.js";import{H as W,E as J}from"./editor-page-m--8Qm1D.js";import{E as $}from"./editor-Y01VX-A3.js";import{w as G}from"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import{b as Q,r as Y,a as Z,c as K}from"./renderer-VfFjn7ah.js";import{A as X}from"./perseus-api-Nq3s7IMx.js";import{l as u,g as ee,e as te}from"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./dependencies-8XILypbq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{J as re,A as ne}from"./register-all-widgets-and-editors-for-testing-2mH-ZU77.js";import{c as oe}from"./components-V6aclUoQ.js";import{c as q,i as se}from"./icon-paths-5JCXzGsq.js";import{M as ae}from"./multi-items-JojuRZeA.js";import{l as i}from"./index-awljIyHI.js";import{R as ie}from"./index-7vsPyIck.js";import{c as le}from"./index-fuycm_QE.js";/* empty css */const ce="@khanacademy/perseus-editor",de="__lib_version__";F(ce,de);const A=d.shape({content:d.string,images:d.objectOf(d.any),widgets:d.objectOf(d.any)}),v=class v extends y.Component{constructor(){super(...arguments),this.state=v._stateFromProps(this.props)}UNSAFE_componentWillReceiveProps(e){this.setState(v._stateFromProps(e))}render(){const{before:e,after:r}=this.state,n=Math.max(e.length,r.length),a=N.times(n,l=>t(M,{before:l{const{before:r,after:n}=e;return{before:Array.isArray(r)?r:[r],after:Array.isArray(n)?n:[n]}};let T=v;T.__docgenInfo={description:"",methods:[{name:"_stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:null}],returns:null}],displayName:"ArticleDiff",props:{after:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0},before:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0}}};const I=d.shape({question:d.shape({}).isRequired,answerArea:d.shape({}).isRequired,hints:d.arrayOf(d.any).isRequired}),H=class H extends y.Component{render(){const{before:e,after:r}=this.props,n=Math.max(e.hints.length,r.hints.length),a=t(M,{before:e.question,after:r.question,title:"Question",showAlignmentOptions:!1,showSeparator:!0}),l=t(U,{before:e.answerArea,after:r.answerArea,title:"Question extras"}),c=N.times(n,function(m){return t(M,{before:m{}};let w=x;const S=i.StyleSheet.create({baseButton:{top:"0",fontSize:"11px",padding:"3px 10px",backgroundRepeat:"repeat-x",borderColor:` +import{a as F}from"./version-akiLXZts.js";import"./article-editor-dmW6w6Eg.js";import"./device-framer-eGajQcXC.js";import"./viewport-resizer-rIRGcoAM.js";import{j as t,a as p}from"./jsx-runtime-FVsy8kgq.js";import{P as d}from"./index-0C4KXdeC.js";import{r as y}from"./index-TT1qJ6UJ.js";import{_ as N}from"./jquery-yG1GhClm.js";import{R as M,W as U}from"./structured-item-diff-UZ_vLVui.js";import{H as W,E as J}from"./editor-page-gACWJwm7.js";import{E as $}from"./editor-1XE8pcNh.js";import{w as G}from"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import{b as Q,r as Y,a as Z,c as K}from"./renderer-JG1Z7r2S.js";import{A as X}from"./perseus-api-Nq3s7IMx.js";import{l as u,g as ee,e as te}from"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./dependencies-d8cZibFS.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{J as re,A as ne}from"./register-all-widgets-and-editors-for-testing-Tl0n0XMq.js";import{c as oe}from"./components-yT7oveOH.js";import{c as q,i as se}from"./icon-paths-5JCXzGsq.js";import{M as ae}from"./multi-items-MiSsRMrN.js";import{l as i}from"./index-awljIyHI.js";import{R as ie}from"./index-7vsPyIck.js";import{c as le}from"./index-fuycm_QE.js";/* empty css */const ce="@khanacademy/perseus-editor",de="__lib_version__";F(ce,de);const A=d.shape({content:d.string,images:d.objectOf(d.any),widgets:d.objectOf(d.any)}),v=class v extends y.Component{constructor(){super(...arguments),this.state=v._stateFromProps(this.props)}UNSAFE_componentWillReceiveProps(e){this.setState(v._stateFromProps(e))}render(){const{before:e,after:r}=this.state,n=Math.max(e.length,r.length),a=N.times(n,l=>t(M,{before:l{const{before:r,after:n}=e;return{before:Array.isArray(r)?r:[r],after:Array.isArray(n)?n:[n]}};let T=v;T.__docgenInfo={description:"",methods:[{name:"_stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:null}],returns:null}],displayName:"ArticleDiff",props:{after:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0},before:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0}}};const I=d.shape({question:d.shape({}).isRequired,answerArea:d.shape({}).isRequired,hints:d.arrayOf(d.any).isRequired}),H=class H extends y.Component{render(){const{before:e,after:r}=this.props,n=Math.max(e.hints.length,r.hints.length),a=t(M,{before:e.question,after:r.question,title:"Question",showAlignmentOptions:!1,showSeparator:!0}),l=t(U,{before:e.answerArea,after:r.answerArea,title:"Question extras"}),c=N.times(n,function(m){return t(M,{before:m{}};let w=x;const S=i.StyleSheet.create({baseButton:{top:"0",fontSize:"11px",padding:"3px 10px",backgroundRepeat:"repeat-x",borderColor:` rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25) `,color:"#ffffff",borderRadius:"3px",lineHeight:"15px",cursor:"pointer",transition:"box-shadow ease-in-out 0.15s",appearance:"none",textDecoration:"none",textAlign:"center",":hover":{boxShadow:`0 1px 1px rgba(0, 0, 0, 0.35), - inset 0 0 50px 5px rgba(255, 255, 255, 0.2)`}},green:{border:"1px solid #7fab07",backgroundColor:"#80ac07",backgroundImage:"linear-gradient(to bottom, #8aba08, #719807)",":hover":{borderBottomColor:"#547105",backgroundColor:"#719807"}},orange:{border:"1px solid #d45704",backgroundColor:"#d55704",backgroundImage:"linear-gradient(to bottom, #e35d04, #c04f03)",":hover":{borderBottomColor:"#983e03",backgroundColor:"#c04f03"}}});w.__docgenInfo={description:"",methods:[],displayName:"SimpleButton",props:{children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},color:{defaultValue:{value:'"green"',computed:!1},description:"",type:{name:"enum",value:[{value:'"orange"',computed:!1},{value:'"green"',computed:!1}]},required:!1},onClick:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1}}};const{InlineIcon:R}=oe,{MultiRenderer:pe}=ae;class E extends y.Component{constructor(){super(...arguments),this._handleSelectMode=e=>{if(this.props.onChange){const r=e.target.value;this.props.onChange(r)}}}render(){return p("label",{children:["Mode:"," ",p("select",{value:this.props.currentMode,onChange:this._handleSelectMode,children:[t("option",{value:"edit",children:"Edit"}),t("option",{value:"preview",children:"Preview"}),t("option",{value:"json",children:"Dev-only JSON"})]})]})}}function D(o){return o.replace(/[A-Z]/g,e=>" "+e.toLowerCase())}function P(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}function j(o){return o.charAt(o.length-1)==="s"?o.slice(0,-1):o}function f(o){return["_multi",...o]}const L=({depth:o,...e})=>{const n=`h${Math.min(o,5)+1}`;return t(n,{...e})},O=o=>{const{shape:e,data:r,path:n,actions:a,name:l,controls:c,...m}=o,h=l||D(n[n.length-1]||""),C=t(fe,{...m,shape:e,data:r,path:n,actions:a}),b=n.join(".");return e.type==="array"?t(he,{name:h,controls:c,path:n,shape:e,actions:a,children:C},b):e.type==="object"?t(ue,{name:h,controls:c,path:n,children:C},b):t(me,{name:h,controls:c,path:n,shape:e,children:C},b)},me=({name:o,controls:e,children:r,path:n,shape:a})=>{const c=(a.type==="content"||a.type==="hint")&&t("div",{className:i.css(s.containerHeader),children:t(L,{depth:n.length,className:i.css(s.containerTitle),children:P(o)})});return p("div",{className:i.css(s.container),children:[p("span",{className:i.css(s.row,s.rowHeading),children:[t("div",{className:i.css(s.columnLeft),children:p("div",{className:"pod-title "+i.css(s.containerHeader),children:[t("div",{className:i.css(s.containerTitle),children:P(o)}),e]})}),t("div",{className:i.css(s.columnRight),children:c})]}),r]})},he=o=>{const{name:e,controls:r,children:n,path:a,shape:l,actions:c}=o;return p("div",{className:i.css(s.container),children:[r&&t("div",{className:i.css(s.columnLeft,s.containerHeader),children:r}),t("div",{children:n}),t("div",{className:i.css(s.columnLeft),children:p("a",{href:"javascript:void 0",onClick:()=>c.addArrayElement(a,l.elementShape),children:["Add a ",j(e)]})})]})},ue=({name:o,controls:e,children:r,path:n})=>{const a=p("div",{className:i.css(s.containerHeader),children:[t(L,{depth:n.length,className:i.css(s.containerTitle),children:P(o)}),e]}),l=(o||e)&&t("div",{className:i.css(s.containerHeader,s.previewCollectionHeader),children:t(L,{depth:n.length,className:i.css(s.containerTitle),children:P(o)})}),c=a&&l;return p("div",{className:i.css(s.container),children:[c&&p("span",{className:i.css(s.row),children:[t("div",{className:i.css(s.columnLeft),children:a}),t("div",{className:i.css(s.columnRight),children:l})]}),t("div",{className:i.css(n.length>0&&s.contentIndent),children:r})]})},fe=o=>{const{shape:e,data:r,...n}=o;return e.type==="content"?t(ye,{shape:e,data:r,...n}):e.type==="hint"?t(ge,{shape:e,data:r,...n}):e.type==="tags"?t(ve,{shape:e,data:r,...n}):e.type==="array"?t(we,{shape:e,data:r,...n}):e.type==="object"?t(Ce,{shape:e,data:r,...n}):null},z=o=>class extends y.Component{constructor(){super(...arguments),this.state={sticky:!1},this.updateStickiness=()=>{const n=ie.findDOMNode(this).offsetHeight,a=window.innerHeight,l=n>a;l!==this.state.sticky&&this.setState({sticky:l})}}componentDidMount(){this.stickynessTimer=setInterval(this.updateStickiness,1e3),this.updateStickiness()}componentWillUnmount(){clearInterval(this.stickynessTimer)}render(){return t(o,{...this.props,sticky:this.state.sticky})}},ye=z(o=>{const{data:e,path:r,actions:n,apiOptions:a,renderers:l,sticky:c}=o,m=t("div",{className:"framework-perseus",children:u(l).get(r)});return t("span",{children:p("div",{className:i.css(s.row),children:[t("div",{className:i.css(s.columnLeft),children:t("div",{className:i.css(c&&s.sticky),children:t($,{...e,onChange:h=>n.mergeValueAtPath(r,h),apiOptions:a})})}),t("div",{className:i.css(s.columnRight),children:t("div",{className:i.css(c&&s.sticky),children:m})})]})})}),ge=z(o=>{const{data:e,path:r,actions:n,apiOptions:a,renderers:l,sticky:c}=o,m=t("div",{className:"framework-perseus",children:u(l).get(r)});return p("div",{className:i.css(s.row),children:[t("div",{className:i.css(s.columnLeft),children:t("div",{className:i.css(c&&s.sticky),children:t(W,{...e,className:i.css(s.hintEditor),onChange:h=>n.mergeValueAtPath(r,h),apiOptions:a,showTitle:!1,showRemoveButton:!1,showMoveButtons:!1,onRemove:()=>{},onMove:h=>{},isFirst:!0,isLast:!0})})}),t("div",{className:i.css(s.columnRight),children:t("div",{className:i.css(c&&s.sticky),children:m})})]})}),ve=o=>{const{data:e,path:r,actions:n,apiOptions:a}=o,{GroupMetadataEditor:l}=a;return l==null?null:t("div",{className:i.css(s.columnLeft),children:t("div",{className:i.css(s.tagsEditor),children:t(l,{value:e,onChange:c=>n.setValueAtPath(r,c),showTitle:!1})})})},we=o=>{const{shape:e,data:r,path:n,actions:a,...l}=o,c=D(n[n.length-1]),m=j(c),h=e.elementShape.type,C=h==="content"||h==="hint",b=r.map((V,g)=>{const k=n.concat(g),B=[g>0&&t("div",{className:i.css(s.control),children:t(w,{color:"orange",title:"Move up",onClick:()=>a.moveArrayElementUp(k),children:t("div",{className:i.css(s.verticalFlip),children:t(R,{...q})})})},"moveArrayElementUp"),ga.moveArrayElementDown(k),children:t(R,{...q})})},"moveArrayElementDown"),t("div",{className:i.css(s.control),children:t(w,{color:"orange",title:"Delete",onClick:()=>a.removeArrayElement(k),children:t(R,{...se})})},"removeArrayElement")];return t("div",{className:i.css(s.arrayElement,!C&&s.arrayElementAndNotLeaf),children:y.createElement(O,{...l,key:g,shape:e.elementShape,data:V,path:k,actions:a,name:`${m} ${g+1}`,controls:B})},g)});return t("div",{children:b})},Ce=o=>{const{shape:e,data:r,path:n,...a}=o,l=Object.keys(e.shape).map(c=>t("div",{className:i.css(s.objectElement),children:t(O,{...a,shape:e.shape[c],data:r[c],path:n.concat(c)})},c));return t("div",{children:l})};class be extends y.Component{constructor(){super(...arguments),this._renderLayout=()=>{const{Layout:e,apiOptions:r,item:n}=this.props;return t(e,{ref:a=>this.layout=a,item:n,apiOptions:r})},this._renderJson=()=>p("div",{children:[t(E,{currentMode:this.props.editorMode,onChange:e=>this.props.onChange({editorMode:e})}),t(re,{multiLine:!0,value:this.props.item,onChange:e=>this.props.onChange({item:e})})]}),this._renderPreview=()=>p("div",{children:[t(E,{currentMode:this.props.editorMode,onChange:e=>this.props.onChange({editorMode:e})}),this._renderLayout()]}),this.mergeValueAtPath=(e,r)=>{this.props.onChange({item:u(this.props.item).merge(f(e),r).freeze()})},this.setValueAtPath=(e,r)=>{this.props.onChange({item:u(this.props.item).set(f(e),r).freeze()})},this.addArrayElement=(e,r)=>{const n=u(this.props.item).get(f(e)).length,a=e.concat(n),l=ee(r);this.props.onChange({item:u(this.props.item).set(f(a),l).freeze()})},this.removeArrayElement=e=>{this.props.onChange({item:u(this.props.item).del(f(e)).freeze()})},this.moveArrayElementDown=e=>{const n=e[e.length-1]+1,a=e.slice(0,-1).concat(n),l=u(this.props.item).get(f(e)),c=u(this.props.item).get(f(a));this.props.onChange({item:u(this.props.item).set(f(e),c).set(f(a),l).freeze()})},this.moveArrayElementUp=e=>{const r=e[e.length-1],n=e.slice(0,-1).concat(r-1);this.moveArrayElementDown(n)},this._renderEdit=()=>{const e={...X.defaults,...this.props.apiOptions},{item:r}=this.props,n=this.props.Layout.shape;return p("div",{className:"perseus-multirenderer-editor",children:[t(E,{currentMode:this.props.editorMode,onChange:a=>this.props.onChange({editorMode:a})}),t(pe,{item:r,shape:n,apiOptions:e,dependencies:{analytics:{onAnalyticsEvent:async()=>{}}},children:({renderers:a})=>t(O,{shape:n,data:te(r),path:[],actions:this,apiOptions:e,renderers:a})})]})},this.score=()=>{if(this.layout)return this.layout.score()},this.getSerializedState=()=>{if(this.layout)return this.layout.getSerializedState()},this.restoreSerializedState=e=>{this.layout&&this.layout.restoreSerializedState(e)},this._renderContent=()=>{switch(this.props.editorMode){case"json":return this._renderJson();case"preview":return this._renderPreview();case"edit":return this._renderEdit();default:return t(E,{currentMode:this.props.editorMode,onChange:e=>this.props.onChange({editorMode:e})})}}}render(){return t("div",{id:"perseus",children:this._renderContent()})}}const s=i.StyleSheet.create({container:{},editor:{width:"100%"},treePreview:{position:"relative"},verticalFlip:{transform:"scaleY(-1)"},control:{marginLeft:12},containerHeader:{alignItems:"flex-end",display:"flex",flexDirection:"row"},previewCollectionHeader:{marginBottom:16},containerTitle:{flexGrow:1,margin:0},contentIndent:{marginLeft:8},hintEditor:{paddingBottom:0},arrayElement:{marginBottom:16},arrayElementAndNotLeaf:{borderBottom:"1px solid #ccc",":first-child":{borderTop:"1px solid #ccc",paddingTop:16}},objectElement:{marginBottom:16},tagsEditor:{border:"1px solid #ddd",padding:"5px 10px"},row:{display:"flex",position:"relative"},columnLeft:{width:360,marginRight:30,position:"relative"},columnRight:{flex:1,marginLeft:30,position:"relative"},sticky:{position:"sticky",top:33},rowHeading:{position:"sticky",backgroundColor:"white",width:"100%",zIndex:101,top:-1}});be.__docgenInfo={description:"",methods:[{name:"_renderLayout",docblock:null,modifiers:[],params:[],returns:null},{name:"_renderJson",docblock:null,modifiers:[],params:[],returns:null},{name:"_renderPreview",docblock:null,modifiers:[],params:[],returns:null},{name:"mergeValueAtPath",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}},{name:"newValue",optional:!1,type:{name:"unknown"}}],returns:null},{name:"setValueAtPath",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}},{name:"newValue",optional:!1,type:{name:"unknown"}}],returns:null},{name:"addArrayElement",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}},{name:"shape",optional:!1,type:{name:"Shape",alias:"Shape"}}],returns:null},{name:"removeArrayElement",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}}],returns:null},{name:"moveArrayElementDown",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}}],returns:null},{name:"moveArrayElementUp",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}}],returns:null},{name:"_renderEdit",docblock:null,modifiers:[],params:[],returns:null},{name:"score",docblock:null,modifiers:[],params:[],returns:null},{name:"getSerializedState",docblock:null,modifiers:[],params:[],returns:null},{name:"restoreSerializedState",docblock:null,modifiers:[],params:[{name:"state",optional:!1,type:{name:"any"}}],returns:null},{name:"_renderContent",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MultiRendererEditor",props:{Layout:{required:!0,tsType:{name:"intersection",raw:"React.ComponentType & LayoutStatics",elements:[{name:"ReactComponentType",raw:"React.ComponentType",elements:[{name:"any"}]},{name:"LayoutStatics"}]},description:""},apiOptions:{required:!0,tsType:{name:"APIOptions"},description:""},item:{required:!0,tsType:{name:"Item"},description:""},editorMode:{required:!0,tsType:{name:"EditorMode"},description:""},onChange:{required:!0,tsType:{name:"ChangeHandler"},description:""}}};le({displayName:"StatefulEditorPage",propTypes:{componentClass:d.func},getDefaultProps:function(){return{componentClass:J}},getInitialState:function(){return N({}).extend(N.omit(this.props,"componentClass"),{onChange:this.handleChange,ref:"editor"})},componentDidMount:function(){this._isMounted=!0},UNSAFE_componentWillReceiveProps:function(o){this.setState(N(o).pick("apiOptions","imageUploader","developerMode","problemNum","previewDevice","frameSource"))},componentWillUnmount:function(){this._isMounted=!1},getSaveWarnings:function(){return this.refs.editor.getSaveWarnings()},serialize:function(){return this.refs.editor.serialize()},handleChange:function(o,e){this._isMounted&&this.setState(o,e)},render:function(){const o=this.props.componentClass;return t(o,{...this.state})}});Q(ne);Y(G);Z();K(); + inset 0 0 50px 5px rgba(255, 255, 255, 0.2)`}},green:{border:"1px solid #7fab07",backgroundColor:"#80ac07",backgroundImage:"linear-gradient(to bottom, #8aba08, #719807)",":hover":{borderBottomColor:"#547105",backgroundColor:"#719807"}},orange:{border:"1px solid #d45704",backgroundColor:"#d55704",backgroundImage:"linear-gradient(to bottom, #e35d04, #c04f03)",":hover":{borderBottomColor:"#983e03",backgroundColor:"#c04f03"}}});w.__docgenInfo={description:"",methods:[],displayName:"SimpleButton",props:{children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},color:{defaultValue:{value:'"green"',computed:!1},description:"",type:{name:"enum",value:[{value:'"orange"',computed:!1},{value:'"green"',computed:!1}]},required:!1},onClick:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1}}};const{InlineIcon:R}=oe,{MultiRenderer:pe}=ae;class E extends y.Component{constructor(){super(...arguments),this._handleSelectMode=e=>{if(this.props.onChange){const r=e.target.value;this.props.onChange(r)}}}render(){return p("label",{children:["Mode:"," ",p("select",{value:this.props.currentMode,onChange:this._handleSelectMode,children:[t("option",{value:"edit",children:"Edit"}),t("option",{value:"preview",children:"Preview"}),t("option",{value:"json",children:"Dev-only JSON"})]})]})}}function D(o){return o.replace(/[A-Z]/g,e=>" "+e.toLowerCase())}function P(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}function j(o){return o.charAt(o.length-1)==="s"?o.slice(0,-1):o}function f(o){return["_multi",...o]}const L=({depth:o,...e})=>{const n=`h${Math.min(o,5)+1}`;return t(n,{...e})},O=o=>{const{shape:e,data:r,path:n,actions:a,name:l,controls:c,...m}=o,h=l||D(n[n.length-1]||""),C=t(fe,{...m,shape:e,data:r,path:n,actions:a}),b=n.join(".");return e.type==="array"?t(he,{name:h,controls:c,path:n,shape:e,actions:a,children:C},b):e.type==="object"?t(ue,{name:h,controls:c,path:n,children:C},b):t(me,{name:h,controls:c,path:n,shape:e,children:C},b)},me=({name:o,controls:e,children:r,path:n,shape:a})=>{const c=(a.type==="content"||a.type==="hint")&&t("div",{className:i.css(s.containerHeader),children:t(L,{depth:n.length,className:i.css(s.containerTitle),children:P(o)})});return p("div",{className:i.css(s.container),children:[p("span",{className:i.css(s.row,s.rowHeading),children:[t("div",{className:i.css(s.columnLeft),children:p("div",{className:"pod-title "+i.css(s.containerHeader),children:[t("div",{className:i.css(s.containerTitle),children:P(o)}),e]})}),t("div",{className:i.css(s.columnRight),children:c})]}),r]})},he=o=>{const{name:e,controls:r,children:n,path:a,shape:l,actions:c}=o;return p("div",{className:i.css(s.container),children:[r&&t("div",{className:i.css(s.columnLeft,s.containerHeader),children:r}),t("div",{children:n}),t("div",{className:i.css(s.columnLeft),children:p("a",{href:"javascript:void 0",onClick:()=>c.addArrayElement(a,l.elementShape),children:["Add a ",j(e)]})})]})},ue=({name:o,controls:e,children:r,path:n})=>{const a=p("div",{className:i.css(s.containerHeader),children:[t(L,{depth:n.length,className:i.css(s.containerTitle),children:P(o)}),e]}),l=(o||e)&&t("div",{className:i.css(s.containerHeader,s.previewCollectionHeader),children:t(L,{depth:n.length,className:i.css(s.containerTitle),children:P(o)})}),c=a&&l;return p("div",{className:i.css(s.container),children:[c&&p("span",{className:i.css(s.row),children:[t("div",{className:i.css(s.columnLeft),children:a}),t("div",{className:i.css(s.columnRight),children:l})]}),t("div",{className:i.css(n.length>0&&s.contentIndent),children:r})]})},fe=o=>{const{shape:e,data:r,...n}=o;return e.type==="content"?t(ye,{shape:e,data:r,...n}):e.type==="hint"?t(ge,{shape:e,data:r,...n}):e.type==="tags"?t(ve,{shape:e,data:r,...n}):e.type==="array"?t(we,{shape:e,data:r,...n}):e.type==="object"?t(Ce,{shape:e,data:r,...n}):null},z=o=>class extends y.Component{constructor(){super(...arguments),this.state={sticky:!1},this.updateStickiness=()=>{const n=ie.findDOMNode(this).offsetHeight,a=window.innerHeight,l=n>a;l!==this.state.sticky&&this.setState({sticky:l})}}componentDidMount(){this.stickynessTimer=setInterval(this.updateStickiness,1e3),this.updateStickiness()}componentWillUnmount(){clearInterval(this.stickynessTimer)}render(){return t(o,{...this.props,sticky:this.state.sticky})}},ye=z(o=>{const{data:e,path:r,actions:n,apiOptions:a,renderers:l,sticky:c}=o,m=t("div",{className:"framework-perseus",children:u(l).get(r)});return t("span",{children:p("div",{className:i.css(s.row),children:[t("div",{className:i.css(s.columnLeft),children:t("div",{className:i.css(c&&s.sticky),children:t($,{...e,onChange:h=>n.mergeValueAtPath(r,h),apiOptions:a})})}),t("div",{className:i.css(s.columnRight),children:t("div",{className:i.css(c&&s.sticky),children:m})})]})})}),ge=z(o=>{const{data:e,path:r,actions:n,apiOptions:a,renderers:l,sticky:c}=o,m=t("div",{className:"framework-perseus",children:u(l).get(r)});return p("div",{className:i.css(s.row),children:[t("div",{className:i.css(s.columnLeft),children:t("div",{className:i.css(c&&s.sticky),children:t(W,{...e,className:i.css(s.hintEditor),onChange:h=>n.mergeValueAtPath(r,h),apiOptions:a,showTitle:!1,showRemoveButton:!1,showMoveButtons:!1,onRemove:()=>{},onMove:h=>{},isFirst:!0,isLast:!0})})}),t("div",{className:i.css(s.columnRight),children:t("div",{className:i.css(c&&s.sticky),children:m})})]})}),ve=o=>{const{data:e,path:r,actions:n,apiOptions:a}=o,{GroupMetadataEditor:l}=a;return l==null?null:t("div",{className:i.css(s.columnLeft),children:t("div",{className:i.css(s.tagsEditor),children:t(l,{value:e,onChange:c=>n.setValueAtPath(r,c),showTitle:!1})})})},we=o=>{const{shape:e,data:r,path:n,actions:a,...l}=o,c=D(n[n.length-1]),m=j(c),h=e.elementShape.type,C=h==="content"||h==="hint",b=r.map((V,g)=>{const k=n.concat(g),B=[g>0&&t("div",{className:i.css(s.control),children:t(w,{color:"orange",title:"Move up",onClick:()=>a.moveArrayElementUp(k),children:t("div",{className:i.css(s.verticalFlip),children:t(R,{...q})})})},"moveArrayElementUp"),ga.moveArrayElementDown(k),children:t(R,{...q})})},"moveArrayElementDown"),t("div",{className:i.css(s.control),children:t(w,{color:"orange",title:"Delete",onClick:()=>a.removeArrayElement(k),children:t(R,{...se})})},"removeArrayElement")];return t("div",{className:i.css(s.arrayElement,!C&&s.arrayElementAndNotLeaf),children:y.createElement(O,{...l,key:g,shape:e.elementShape,data:V,path:k,actions:a,name:`${m} ${g+1}`,controls:B})},g)});return t("div",{children:b})},Ce=o=>{const{shape:e,data:r,path:n,...a}=o,l=Object.keys(e.shape).map(c=>t("div",{className:i.css(s.objectElement),children:t(O,{...a,shape:e.shape[c],data:r[c],path:n.concat(c)})},c));return t("div",{children:l})};class be extends y.Component{constructor(){super(...arguments),this._renderLayout=()=>{const{Layout:e,apiOptions:r,item:n}=this.props;return t(e,{ref:a=>this.layout=a,item:n,apiOptions:r})},this._renderJson=()=>p("div",{children:[t(E,{currentMode:this.props.editorMode,onChange:e=>this.props.onChange({editorMode:e})}),t(re,{multiLine:!0,value:this.props.item,onChange:e=>this.props.onChange({item:e})})]}),this._renderPreview=()=>p("div",{children:[t(E,{currentMode:this.props.editorMode,onChange:e=>this.props.onChange({editorMode:e})}),this._renderLayout()]}),this.mergeValueAtPath=(e,r)=>{this.props.onChange({item:u(this.props.item).merge(f(e),r).freeze()})},this.setValueAtPath=(e,r)=>{this.props.onChange({item:u(this.props.item).set(f(e),r).freeze()})},this.addArrayElement=(e,r)=>{const n=u(this.props.item).get(f(e)).length,a=e.concat(n),l=ee(r);this.props.onChange({item:u(this.props.item).set(f(a),l).freeze()})},this.removeArrayElement=e=>{this.props.onChange({item:u(this.props.item).del(f(e)).freeze()})},this.moveArrayElementDown=e=>{const n=e[e.length-1]+1,a=e.slice(0,-1).concat(n),l=u(this.props.item).get(f(e)),c=u(this.props.item).get(f(a));this.props.onChange({item:u(this.props.item).set(f(e),c).set(f(a),l).freeze()})},this.moveArrayElementUp=e=>{const r=e[e.length-1],n=e.slice(0,-1).concat(r-1);this.moveArrayElementDown(n)},this._renderEdit=()=>{const e={...X.defaults,...this.props.apiOptions},{item:r}=this.props,n=this.props.Layout.shape;return p("div",{className:"perseus-multirenderer-editor",children:[t(E,{currentMode:this.props.editorMode,onChange:a=>this.props.onChange({editorMode:a})}),t(pe,{item:r,shape:n,apiOptions:e,dependencies:{analytics:{onAnalyticsEvent:async()=>{}},useVideo:()=>{}},children:({renderers:a})=>t(O,{shape:n,data:te(r),path:[],actions:this,apiOptions:e,renderers:a})})]})},this.score=()=>{if(this.layout)return this.layout.score()},this.getSerializedState=()=>{if(this.layout)return this.layout.getSerializedState()},this.restoreSerializedState=e=>{this.layout&&this.layout.restoreSerializedState(e)},this._renderContent=()=>{switch(this.props.editorMode){case"json":return this._renderJson();case"preview":return this._renderPreview();case"edit":return this._renderEdit();default:return t(E,{currentMode:this.props.editorMode,onChange:e=>this.props.onChange({editorMode:e})})}}}render(){return t("div",{id:"perseus",children:this._renderContent()})}}const s=i.StyleSheet.create({container:{},editor:{width:"100%"},treePreview:{position:"relative"},verticalFlip:{transform:"scaleY(-1)"},control:{marginLeft:12},containerHeader:{alignItems:"flex-end",display:"flex",flexDirection:"row"},previewCollectionHeader:{marginBottom:16},containerTitle:{flexGrow:1,margin:0},contentIndent:{marginLeft:8},hintEditor:{paddingBottom:0},arrayElement:{marginBottom:16},arrayElementAndNotLeaf:{borderBottom:"1px solid #ccc",":first-child":{borderTop:"1px solid #ccc",paddingTop:16}},objectElement:{marginBottom:16},tagsEditor:{border:"1px solid #ddd",padding:"5px 10px"},row:{display:"flex",position:"relative"},columnLeft:{width:360,marginRight:30,position:"relative"},columnRight:{flex:1,marginLeft:30,position:"relative"},sticky:{position:"sticky",top:33},rowHeading:{position:"sticky",backgroundColor:"white",width:"100%",zIndex:101,top:-1}});be.__docgenInfo={description:"",methods:[{name:"_renderLayout",docblock:null,modifiers:[],params:[],returns:null},{name:"_renderJson",docblock:null,modifiers:[],params:[],returns:null},{name:"_renderPreview",docblock:null,modifiers:[],params:[],returns:null},{name:"mergeValueAtPath",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}},{name:"newValue",optional:!1,type:{name:"unknown"}}],returns:null},{name:"setValueAtPath",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}},{name:"newValue",optional:!1,type:{name:"unknown"}}],returns:null},{name:"addArrayElement",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}},{name:"shape",optional:!1,type:{name:"Shape",alias:"Shape"}}],returns:null},{name:"removeArrayElement",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}}],returns:null},{name:"moveArrayElementDown",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}}],returns:null},{name:"moveArrayElementUp",docblock:null,modifiers:[],params:[{name:"path",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"Path"}}],returns:null},{name:"_renderEdit",docblock:null,modifiers:[],params:[],returns:null},{name:"score",docblock:null,modifiers:[],params:[],returns:null},{name:"getSerializedState",docblock:null,modifiers:[],params:[],returns:null},{name:"restoreSerializedState",docblock:null,modifiers:[],params:[{name:"state",optional:!1,type:{name:"any"}}],returns:null},{name:"_renderContent",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MultiRendererEditor",props:{Layout:{required:!0,tsType:{name:"intersection",raw:"React.ComponentType & LayoutStatics",elements:[{name:"ReactComponentType",raw:"React.ComponentType",elements:[{name:"any"}]},{name:"LayoutStatics"}]},description:""},apiOptions:{required:!0,tsType:{name:"APIOptions"},description:""},item:{required:!0,tsType:{name:"Item"},description:""},editorMode:{required:!0,tsType:{name:"EditorMode"},description:""},onChange:{required:!0,tsType:{name:"ChangeHandler"},description:""}}};le({displayName:"StatefulEditorPage",propTypes:{componentClass:d.func},getDefaultProps:function(){return{componentClass:J}},getInitialState:function(){return N({}).extend(N.omit(this.props,"componentClass"),{onChange:this.handleChange,ref:"editor"})},componentDidMount:function(){this._isMounted=!0},UNSAFE_componentWillReceiveProps:function(o){this.setState(N(o).pick("apiOptions","imageUploader","developerMode","problemNum","previewDevice","frameSource"))},componentWillUnmount:function(){this._isMounted=!1},getSaveWarnings:function(){return this.refs.editor.getSaveWarnings()},serialize:function(){return this.refs.editor.serialize()},handleChange:function(o,e){this._isMounted&&this.setState(o,e)},render:function(){const o=this.props.componentClass;return t(o,{...this.state})}});Q(ne);Y(G);Z();K(); diff --git a/assets/input-number-editor-Bkjav5mB.js b/assets/input-number-editor-Z-c49jcj.js similarity index 94% rename from assets/input-number-editor-Bkjav5mB.js rename to assets/input-number-editor-Z-c49jcj.js index 250c4de337..2063ba1178 100644 --- a/assets/input-number-editor-Bkjav5mB.js +++ b/assets/input-number-editor-Z-c49jcj.js @@ -1,4 +1,4 @@ -import{j as e,a as i}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import{_ as u}from"./jquery-yG1GhClm.js";import{U as l}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as m}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import{P as d}from"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{r as o}from"./index-TT1qJ6UJ.js";import{B as c}from"./blur-input-hjJsfoK9.js";const{InfoTip:a}=m,h={number:{name:"Numbers",forms:"integer, decimal, proper, improper, mixed"},decimal:{name:"Decimals",forms:"decimal"},integer:{name:"Integers",forms:"integer"},rational:{name:"Fractions and mixed numbers",forms:"integer, proper, improper, mixed"},improper:{name:"Improper numbers (no mixed)",forms:"integer, proper, improper"},mixed:{name:"Mixed numbers (no improper)",forms:"integer, proper, mixed"},percent:{name:"Numbers or percents",forms:"integer, decimal, proper, improper, mixed, percent"},pi:{name:"Numbers with pi",forms:"pi"}},t=class t extends o.Component{constructor(){super(...arguments),this.input=o.createRef(),this.handleAnswerChange=s=>{const r=l.firstNumericalParse(s,this.context.strings)||0;this.props.onChange({value:r})},this.focus=()=>{var s;return(s=this.input.current)==null||s.focus(),!0},this.serialize=()=>({value:this.props.value,simplify:this.props.simplify,size:this.props.size,inexact:this.props.inexact,maxError:this.props.maxError,answerType:this.props.answerType,rightAlign:this.props.rightAlign})}render(){const s=u.map(h,function(r,n){return e("option",{value:n,children:r.name},n)},this);return i("div",{children:[e("div",{children:i("label",{children:["Correct answer:"," ",e(c,{value:""+this.props.value,onChange:this.handleAnswerChange,ref:this.input})]})}),i("div",{children:[i("label",{children:["Unsimplified answers"," ",i("select",{value:this.props.simplify,onChange:r=>{this.props.onChange({simplify:r.target.value})},children:[e("option",{value:"required",children:"will not be graded"}),e("option",{value:"optional",children:"will be accepted"}),e("option",{value:"enforced",children:"will be marked wrong"})]})]}),i(a,{children:[e("p",{children:'Normally select "will not be graded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and anything after)'}),e("p",{children:'Select "will be accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),e("p",{children:'Select "will be marked wrong" only if we are specifically assessing the ability to simplify.'})]})]}),i("div",{children:[i("label",{children:[e("input",{type:"checkbox",checked:this.props.inexact,onChange:r=>{this.props.onChange({inexact:r.target.checked})}})," ","Allow inexact answers"]}),i("label",{children:[e("input",{type:"checkbox",style:{visibility:"hidden"}}),"Max error:"," ",e("input",{type:"text",disabled:!this.props.inexact,defaultValue:this.props.maxError,"aria-label":"Max error",onBlur:r=>{const n=""+(l.firstNumericalParse(r.target.value,this.context.strings)||0);r.target.value=n,this.props.onChange({maxError:n})}})]})]}),i("div",{children:["Answer type:"," ",e("select",{value:this.props.answerType,onChange:r=>{this.props.onChange({answerType:r.target.value})},"aria-label":"Answer type",children:s}),e(a,{children:e("p",{children:'Use the default "Numbers" unless the answer must be in a specific form (e.g., question is about converting decimals to fractions).'})})]}),i("div",{children:[i("label",{children:["Width"," ",i("select",{value:this.props.size,onChange:r=>{this.props.onChange({size:r.target.value})},children:[e("option",{value:"normal",children:"Normal (80px)"}),e("option",{value:"small",children:"Small (40px)"})]})]}),e(a,{children:e("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),e("div",{children:i("label",{children:[e("input",{type:"checkbox",checked:this.props.rightAlign,onChange:r=>{this.props.onChange({rightAlign:r.target.checked})}})," ","Right alignment"]})})]})}};t.contextType=d,t.widgetName="input-number",t.defaultProps={value:0,simplify:"required",size:"normal",inexact:!1,maxError:.1,answerType:"number",rightAlign:!1};let p=t;p.__docgenInfo={description:"",methods:[{name:"handleAnswerChange",docblock:null,modifiers:[],params:[{name:"str",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InputNumberEditor",props:{value:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},simplify:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["simplify"]',raw:'PerseusInputNumberWidgetOptions["simplify"]'},description:"",defaultValue:{value:'"required"',computed:!1}},size:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["size"]',raw:'PerseusInputNumberWidgetOptions["size"]'},description:"",defaultValue:{value:'"normal"',computed:!1}},inexact:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["inexact"]',raw:'PerseusInputNumberWidgetOptions["inexact"]'},description:"",defaultValue:{value:"false",computed:!1}},maxError:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["maxError"]',raw:'PerseusInputNumberWidgetOptions["maxError"]'},description:"",defaultValue:{value:"0.1",computed:!1}},answerType:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["answerType"]',raw:'PerseusInputNumberWidgetOptions["answerType"]'},description:"",defaultValue:{value:'"number"',computed:!1}},rightAlign:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["rightAlign"]',raw:'PerseusInputNumberWidgetOptions["rightAlign"]'},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { +import{j as e,a as i}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import{_ as u}from"./jquery-yG1GhClm.js";import{U as l}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as m}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import{P as d}from"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{r as o}from"./index-TT1qJ6UJ.js";import{B as c}from"./blur-input-hjJsfoK9.js";const{InfoTip:a}=m,h={number:{name:"Numbers",forms:"integer, decimal, proper, improper, mixed"},decimal:{name:"Decimals",forms:"decimal"},integer:{name:"Integers",forms:"integer"},rational:{name:"Fractions and mixed numbers",forms:"integer, proper, improper, mixed"},improper:{name:"Improper numbers (no mixed)",forms:"integer, proper, improper"},mixed:{name:"Mixed numbers (no improper)",forms:"integer, proper, mixed"},percent:{name:"Numbers or percents",forms:"integer, decimal, proper, improper, mixed, percent"},pi:{name:"Numbers with pi",forms:"pi"}},t=class t extends o.Component{constructor(){super(...arguments),this.input=o.createRef(),this.handleAnswerChange=s=>{const r=l.firstNumericalParse(s,this.context.strings)||0;this.props.onChange({value:r})},this.focus=()=>{var s;return(s=this.input.current)==null||s.focus(),!0},this.serialize=()=>({value:this.props.value,simplify:this.props.simplify,size:this.props.size,inexact:this.props.inexact,maxError:this.props.maxError,answerType:this.props.answerType,rightAlign:this.props.rightAlign})}render(){const s=u.map(h,function(r,n){return e("option",{value:n,children:r.name},n)},this);return i("div",{children:[e("div",{children:i("label",{children:["Correct answer:"," ",e(c,{value:""+this.props.value,onChange:this.handleAnswerChange,ref:this.input})]})}),i("div",{children:[i("label",{children:["Unsimplified answers"," ",i("select",{value:this.props.simplify,onChange:r=>{this.props.onChange({simplify:r.target.value})},children:[e("option",{value:"required",children:"will not be graded"}),e("option",{value:"optional",children:"will be accepted"}),e("option",{value:"enforced",children:"will be marked wrong"})]})]}),i(a,{children:[e("p",{children:'Normally select "will not be graded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and anything after)'}),e("p",{children:'Select "will be accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),e("p",{children:'Select "will be marked wrong" only if we are specifically assessing the ability to simplify.'})]})]}),i("div",{children:[i("label",{children:[e("input",{type:"checkbox",checked:this.props.inexact,onChange:r=>{this.props.onChange({inexact:r.target.checked})}})," ","Allow inexact answers"]}),i("label",{children:[e("input",{type:"checkbox",style:{visibility:"hidden"}}),"Max error:"," ",e("input",{type:"text",disabled:!this.props.inexact,defaultValue:this.props.maxError,"aria-label":"Max error",onBlur:r=>{const n=""+(l.firstNumericalParse(r.target.value,this.context.strings)||0);r.target.value=n,this.props.onChange({maxError:n})}})]})]}),i("div",{children:["Answer type:"," ",e("select",{value:this.props.answerType,onChange:r=>{this.props.onChange({answerType:r.target.value})},"aria-label":"Answer type",children:s}),e(a,{children:e("p",{children:'Use the default "Numbers" unless the answer must be in a specific form (e.g., question is about converting decimals to fractions).'})})]}),i("div",{children:[i("label",{children:["Width"," ",i("select",{value:this.props.size,onChange:r=>{this.props.onChange({size:r.target.value})},children:[e("option",{value:"normal",children:"Normal (80px)"}),e("option",{value:"small",children:"Small (40px)"})]})]}),e(a,{children:e("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),e("div",{children:i("label",{children:[e("input",{type:"checkbox",checked:this.props.rightAlign,onChange:r=>{this.props.onChange({rightAlign:r.target.checked})}})," ","Right alignment"]})})]})}};t.contextType=d,t.widgetName="input-number",t.defaultProps={value:0,simplify:"required",size:"normal",inexact:!1,maxError:.1,answerType:"number",rightAlign:!1};let p=t;p.__docgenInfo={description:"",methods:[{name:"handleAnswerChange",docblock:null,modifiers:[],params:[{name:"str",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InputNumberEditor",props:{value:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},simplify:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["simplify"]',raw:'PerseusInputNumberWidgetOptions["simplify"]'},description:"",defaultValue:{value:'"required"',computed:!1}},size:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["size"]',raw:'PerseusInputNumberWidgetOptions["size"]'},description:"",defaultValue:{value:'"normal"',computed:!1}},inexact:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["inexact"]',raw:'PerseusInputNumberWidgetOptions["inexact"]'},description:"",defaultValue:{value:"false",computed:!1}},maxError:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["maxError"]',raw:'PerseusInputNumberWidgetOptions["maxError"]'},description:"",defaultValue:{value:"0.1",computed:!1}},answerType:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["answerType"]',raw:'PerseusInputNumberWidgetOptions["answerType"]'},description:"",defaultValue:{value:'"number"',computed:!1}},rightAlign:{required:!1,tsType:{name:'PerseusInputNumberWidgetOptions["rightAlign"]',raw:'PerseusInputNumberWidgetOptions["rightAlign"]'},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { value?: ParsedValue | 0; simplify?: Props["simplify"]; size?: Props["size"]; diff --git a/assets/input-number-editor.stories-QFlQ-eVn.js b/assets/input-number-editor.stories-3ALJyRsu.js similarity index 69% rename from assets/input-number-editor.stories-QFlQ-eVn.js rename to assets/input-number-editor.stories-3ALJyRsu.js index 251f37e031..1bbc43c545 100644 --- a/assets/input-number-editor.stories-QFlQ-eVn.js +++ b/assets/input-number-editor.stories-3ALJyRsu.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as e}from"./input-number-editor-Bkjav5mB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./blur-input-hjJsfoK9.js";const $r={title:"PerseusEditor/Widgets/InputNumber Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as e}from"./input-number-editor-Z-c49jcj.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./blur-input-hjJsfoK9.js";const $r={title:"PerseusEditor/Widgets/InputNumber Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const rt=["Default"];export{r as Default,rt as __namedExportsOrder,$r as default}; diff --git a/assets/input-number.stories-vvAd9WRJ.js b/assets/input-number.stories-So5c9TZO.js similarity index 88% rename from assets/input-number.stories-vvAd9WRJ.js rename to assets/input-number.stories-So5c9TZO.js index 5ae89f45e5..5ae2cc2c73 100644 --- a/assets/input-number.stories-vvAd9WRJ.js +++ b/assets/input-number.stories-So5c9TZO.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as o}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const f={content:`Denis baked a peach pie and cut it into $3$ equal-sized pieces. Denis's dad eats $1$ section of the pie. +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as o}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const f={content:`Denis baked a peach pie and cut it into $3$ equal-sized pieces. Denis's dad eats $1$ section of the pie. **What fraction of the pie did Denis's dad eat?** ![](https://ka-perseus-graphie.s3.amazonaws.com/74a2b7583a2c26ebfb3ad714e29867541253fc97.png) diff --git a/assets/input-with-examples-pL_l1Dse.js b/assets/input-with-examples-Jnnd0mF0.js similarity index 98% rename from assets/input-with-examples-pL_l1Dse.js rename to assets/input-with-examples-Jnnd0mF0.js index f1afba1f08..7e437b14c2 100644 --- a/assets/input-with-examples-pL_l1Dse.js +++ b/assets/input-with-examples-Jnnd0mF0.js @@ -1,2 +1,2 @@ -import{j as r,a as u}from"./jsx-runtime-FVsy8kgq.js";import{l as p,R as d,p as m}from"./renderer-VfFjn7ah.js";import{r as c}from"./index-TT1qJ6UJ.js";import{_ as h}from"./jquery-yG1GhClm.js";import{C as a}from"./perseus-api-Nq3s7IMx.js";import{U as f}from"./util-F8-MDmsT.js";import{P as g}from"./i18n-context-P5sgPFep.js";import{T as x}from"./text-input-15gEhfDF.js";import{T as y,H as o,V as T}from"./tooltip--mhQefx0.js";const{captureScratchpadTouchStart:b}=f,s=class s extends c.Component{constructor(){super(...arguments),this.state={focused:!1,showExamples:!1},this._getUniqueId=()=>`input-with-examples-${btoa(this.props.id).replace(/=/g,"")}`,this._getInputClassName=()=>{let e=a.INPUT+" "+a.INTERACTIVE;return this.state.focused&&(e+=" "+a.FOCUSED),this.props.className&&(e+=" "+this.props.className),e},this._renderInput=()=>{const e=this._getUniqueId(),t={id:e,"aria-describedby":e,ref:"input",className:this._getInputClassName(),labelText:this.props.labelText,value:this.props.value,onFocus:this._handleFocus,onBlur:this._handleBlur,disabled:this.props.disabled,style:this.props.style,onChange:this.props.onChange,onTouchStart:b,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:"false"};return r(x,{...t})},this._handleFocus=()=>{this.props.onFocus(),this.setState({focused:!0,showExamples:!0})},this.show=()=>{this.setState({showExamples:!0})},this.hide=()=>{this.setState({showExamples:!1})},this._handleBlur=()=>{this.props.onBlur(),this.setState({focused:!1,showExamples:!1})},this.focus=()=>{this.refs.input.focus()},this.blur=()=>{this.refs.input.blur()},this.handleChange=e=>{this.props.onChange(e.target.value)}}render(){const e=this._renderInput(),t=h.map(this.props.examples,l=>"- "+l).join(` +import{j as r,a as u}from"./jsx-runtime-FVsy8kgq.js";import{l as p,R as d,p as m}from"./renderer-JG1Z7r2S.js";import{r as c}from"./index-TT1qJ6UJ.js";import{_ as h}from"./jquery-yG1GhClm.js";import{C as a}from"./perseus-api-Nq3s7IMx.js";import{U as f}from"./util-F8-MDmsT.js";import{P as g}from"./i18n-context-P5sgPFep.js";import{T as x}from"./text-input-15gEhfDF.js";import{T as y,H as o,V as T}from"./tooltip--mhQefx0.js";const{captureScratchpadTouchStart:b}=f,s=class s extends c.Component{constructor(){super(...arguments),this.state={focused:!1,showExamples:!1},this._getUniqueId=()=>`input-with-examples-${btoa(this.props.id).replace(/=/g,"")}`,this._getInputClassName=()=>{let e=a.INPUT+" "+a.INTERACTIVE;return this.state.focused&&(e+=" "+a.FOCUSED),this.props.className&&(e+=" "+this.props.className),e},this._renderInput=()=>{const e=this._getUniqueId(),t={id:e,"aria-describedby":e,ref:"input",className:this._getInputClassName(),labelText:this.props.labelText,value:this.props.value,onFocus:this._handleFocus,onBlur:this._handleBlur,disabled:this.props.disabled,style:this.props.style,onChange:this.props.onChange,onTouchStart:b,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:"false"};return r(x,{...t})},this._handleFocus=()=>{this.props.onFocus(),this.setState({focused:!0,showExamples:!0})},this.show=()=>{this.setState({showExamples:!0})},this.hide=()=>{this.setState({showExamples:!1})},this._handleBlur=()=>{this.props.onBlur(),this.setState({focused:!1,showExamples:!1})},this.focus=()=>{this.refs.input.focus()},this.blur=()=>{this.refs.input.blur()},this.handleChange=e=>{this.props.onChange(e.target.value)}}render(){const e=this._renderInput(),t=h.map(this.props.examples,l=>"- "+l).join(` `),i=this.props.shouldShowExamples&&this.state.showExamples;return u(y,{className:"perseus-formats-tooltip preview-measure",horizontalPosition:o.Left,horizontalAlign:o.Left,verticalPosition:T.Bottom,arrowSize:10,borderColor:"#ccc",show:i,children:[e,r("div",{id:this._getUniqueId(),children:r(d,{content:t,linterContext:m(this.props.linterContext,"input-with-examples"),strings:this.context.strings})})]})}};s.contextType=g,s.defaultProps={shouldShowExamples:!0,onFocus:function(){},onBlur:function(){},disabled:!1,linterContext:p,className:""};let n=s;n.__docgenInfo={description:"",methods:[{name:"_getUniqueId",docblock:null,modifiers:[],params:[],returns:null},{name:"_getInputClassName",docblock:null,modifiers:[],params:[],returns:null},{name:"_renderInput",docblock:null,modifiers:[],params:[],returns:null},{name:"_handleFocus",docblock:null,modifiers:[],params:[],returns:null},{name:"show",docblock:null,modifiers:[],params:[],returns:null},{name:"hide",docblock:null,modifiers:[],params:[],returns:null},{name:"_handleBlur",docblock:null,modifiers:[],params:[],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null}],displayName:"InputWithExamples",props:{value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},examples:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},shouldShowExamples:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},convertDotToTimes:{required:!1,tsType:{name:"boolean"},description:""},buttonSet:{required:!1,tsType:{name:"string"},description:""},buttonsVisible:{required:!1,tsType:{name:"union",raw:'"always" | "never" | "focused"',elements:[{name:"literal",value:'"always"'},{name:"literal",value:'"never"'},{name:"literal",value:'"focused"'}]},description:""},labelText:{required:!1,tsType:{name:"string"},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"function () {}",computed:!1}},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"function () {}",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},style:{required:!1,tsType:{name:"StyleType"},description:""},id:{required:!0,tsType:{name:"string"},description:""},linterContext:{required:!1,tsType:{name:"LinterContextProps"},description:"",defaultValue:{value:"PerseusLinter.linterContextDefault",computed:!0}}}};export{n as I}; diff --git a/assets/input-with-examples.stories-X5wmnwX6.js b/assets/input-with-examples.stories-6sOKwhfG.js similarity index 86% rename from assets/input-with-examples.stories-X5wmnwX6.js rename to assets/input-with-examples.stories-6sOKwhfG.js index 7edf76986e..d3321c06b2 100644 --- a/assets/input-with-examples.stories-X5wmnwX6.js +++ b/assets/input-with-examples.stories-6sOKwhfG.js @@ -1,4 +1,4 @@ -import{a as b}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as f}from"./input-with-examples-pL_l1Dse.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./index-h_CiYGGb.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";const mr={title:"Perseus/Components/Input with Examples",component:f,args:{examples:[],id:"",onChange:b("onChange"),value:""},argTypes:{onChange:{control:{type:null}}}},s=["Sample 1","Sample 2","Sample 3"],r={},e={args:{examples:s}},t={args:{examples:s,labelText:"Test label"}},o={args:{disabled:!0,examples:s}};var p,a,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:"{}",...(m=(a=r.parameters)==null?void 0:a.docs)==null?void 0:m.source}}};var i,l,n;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`{ +import{a as b}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as f}from"./input-with-examples-Jnnd0mF0.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./index-h_CiYGGb.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";const mr={title:"Perseus/Components/Input with Examples",component:f,args:{examples:[],id:"",onChange:b("onChange"),value:""},argTypes:{onChange:{control:{type:null}}}},s=["Sample 1","Sample 2","Sample 3"],r={},e={args:{examples:s}},t={args:{examples:s,labelText:"Test label"}},o={args:{disabled:!0,examples:s}};var p,a,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:"{}",...(m=(a=r.parameters)==null?void 0:a.docs)==null?void 0:m.source}}};var i,l,n;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`{ args: { examples: testExamples } diff --git a/assets/interaction-editor.stories--7H-Go-E.js b/assets/interaction-editor.stories-LFt0JAu7.js similarity index 66% rename from assets/interaction-editor.stories--7H-Go-E.js rename to assets/interaction-editor.stories-LFt0JAu7.js index d203b428ae..bbe7884040 100644 --- a/assets/interaction-editor.stories--7H-Go-E.js +++ b/assets/interaction-editor.stories-LFt0JAu7.js @@ -1,4 +1,4 @@ -import{j as l}from"./jsx-runtime-FVsy8kgq.js";import{r as o}from"./index-TT1qJ6UJ.js";import{I as h}from"./index-6m5XMHRW.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./editor-jsonify-yjAz4UcO.js";import"./graph-settings-6z3yJikg.js";import"./components-V6aclUoQ.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./icon-paths-EoBkHOLI.js";const er={title:"PerseusEditor/Widgets/Interaction Editor"},t=d=>{const[e,n]=o.useState(),[s,a]=o.useState();function c(r){r.graph&&a(r.graph),r.elements&&n(r.elements)}return l(h,{onChange:c,elements:e,graph:s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as l}from"./jsx-runtime-FVsy8kgq.js";import{r as o}from"./index-TT1qJ6UJ.js";import{I as h}from"./index-JX1pDXLf.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./editor-jsonify-4Li1SRv8.js";import"./graph-settings-VTKCtXa5.js";import"./components-yT7oveOH.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./icon-paths-EoBkHOLI.js";const er={title:"PerseusEditor/Widgets/Interaction Editor"},t=d=>{const[e,n]=o.useState(),[s,a]=o.useState();function c(r){r.graph&&a(r.graph),r.elements&&n(r.elements)}return l(h,{onChange:c,elements:e,graph:s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const [elements, setElements] = useState(); const [graph, setGraph] = useState(); function handleChange(next) { diff --git a/assets/interaction.stories-olQ8riJn.js b/assets/interaction.stories-7cDfB_0_.js similarity index 79% rename from assets/interaction.stories-olQ8riJn.js rename to assets/interaction.stories-7cDfB_0_.js index 1cad181f5d..01fddccb60 100644 --- a/assets/interaction.stories-olQ8riJn.js +++ b/assets/interaction.stories-7cDfB_0_.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const p={content:`Drag the dot all the way to the right. +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const p={content:`Drag the dot all the way to the right. [[☃ interaction 1]] diff --git a/assets/interactive-graph-editor-sXGG56UO.js b/assets/interactive-graph-editor-sYnTC31H.js similarity index 98% rename from assets/interactive-graph-editor-sXGG56UO.js rename to assets/interactive-graph-editor-sYnTC31H.js index 5ff34ea0f4..88faac6718 100644 --- a/assets/interactive-graph-editor-sXGG56UO.js +++ b/assets/interactive-graph-editor-sYnTC31H.js @@ -1,4 +1,4 @@ -import{j as e,a as s,F as v}from"./jsx-runtime-FVsy8kgq.js";import{U as fe}from"./util-F8-MDmsT.js";import{l as Ce,s as Se,e as je}from"./svg-image-vbtSDKh6.js";import{g as xe,f as ve,h as ke,i as Te,j as qe,k as Pe,m as Ae,n as Ie,o as _e,q as Qe,r as Xe}from"./article-renderer-GCz9idJ2.js";import{_ as A}from"./jquery-yG1GhClm.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import{m as Ye,n as Ze}from"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as Je}from"./components-V6aclUoQ.js";import{i as Ke}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import{w as Le}from"./index-J2t_5nK1.js";import"./index-IIMKO4_x.js";import{V as h}from"./index-6h5t6F0w.js";import{S as I,O as c}from"./answer-choices-6SWUlni2.js";import{T as er,a as rr,C as F}from"./index-QCAhLhLD.js";import{s as o,c as f,a as Q}from"./index-deFLJwr4.js";import{c as Ge,f as M,L as g,a as X,b as B}from"./index-h_CiYGGb.js";import{l as S}from"./index-awljIyHI.js";import{r as R}from"./index-TT1qJ6UJ.js";import{i as u}from"./tiny-invariant-bHgPayXn.js";import{H as Y}from"./heading-8aCiuWUg.js";import{S as m}from"./index-qUyqkRvh.js";import{L as q,I as tr}from"./interactive-graph-settings-BlpUEkpl.js";import{L as nr}from"./locked-figures-section-MyNRaNP3.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{B as ar}from"./choice-I73s7vIV.js";import{C as w,P as or}from"./locked-label-settings-My12ABKT.js";import{S as sr}from"./scrollless-number-text-field-U5Bx_xXb.js";const j="unlimited",Re=t=>{const r=parseInt(t,10);return isNaN(r)||r===0?j:r},De=({numPoints:t=1,onChange:r})=>e(I,{selectedValue:`${t}`,onChange:n=>{r(Re(n))},placeholder:"",style:ir.singleSelectShort,children:[...[...Array(7).keys()].map(n=>e(c,{value:`${n}`,label:`${n} point${n>1?"s":""}`},n)),e(c,{value:j,label:"unlimited"},"unlimited")]}),ir=S.StyleSheet.create({singleSelectShort:{height:26}});De.__docgenInfo={description:"",methods:[],displayName:"GraphPointsCountSelector",props:{numPoints:{required:!1,tsType:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},description:"",defaultValue:{value:"1",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(points: PointValue) => void",signature:{arguments:[{type:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},name:"points"}],return:{name:"void"}}},description:""}}};const Ne=t=>s(I,{selectedValue:t.graphType,onChange:t.onChange,placeholder:"Select an answer type",style:lr.singleSelectShort,children:[t.showNoneOption&&e(c,{value:"none",label:"None"}),e(c,{value:"linear",label:"Linear function"}),e(c,{value:"quadratic",label:"Quadratic function"}),e(c,{value:"sinusoid",label:"Sinusoid function"}),e(c,{value:"circle",label:"Circle"}),e(c,{value:"point",label:"Point(s)"}),e(c,{value:"linear-system",label:"Linear System"}),e(c,{value:"polygon",label:"Polygon"}),e(c,{value:"segment",label:"Line Segment(s)"}),e(c,{value:"ray",label:"Ray"}),e(c,{value:"angle",label:"Angle"})]}),lr=S.StyleSheet.create({singleSelectShort:{height:26}});Ne.__docgenInfo={description:"",methods:[],displayName:"GraphTypeSelector",props:{graphType:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newGraphType: string) => void",signature:{arguments:[{type:{name:"string"},name:"newGraphType"}],return:{name:"void"}}},description:""},showNoneOption:{required:!0,tsType:{name:"boolean"},description:""}}};function ze(t){return s(v,{children:[e(Y,{title:"Correct Answer",isOpen:!0,isCollapsible:!1}),s(h,{children:[s(h,{children:[e(Ge,{style:{paddingTop:o.xxSmall_6,paddingBottom:o.xxSmall_6,color:f.offBlack64},children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."}),e(M,{style:{fontSize:12,backgroundColor:"#eee",paddingInline:o.xxSmall_6,borderColor:"#ccc",borderStyle:"solid",borderWidth:1},children:t.equationString})]}),t.children]})]})}ze.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCorrectAnswer",props:{equationString:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};function Oe(t){const{ariaLabelValue:r,ariaDescriptionValue:n,onChange:a}=t,[i,d]=R.useState(!0);return s(v,{children:[e(Y,{title:"Description",isCollapsible:!0,isOpen:i,onToggle:d}),i&&s(h,{children:[e(Ge,{style:V.caption,children:"Use these fields to describe the graph as a whole. These are used by screen readers to describe content to users who may be visually impaired."}),s(g,{tag:"label",children:["Title",e(er,{value:r,onChange:p=>a({fullGraphAriaLabel:p||void 0}),style:V.spaceAbove})]}),e(m,{size:o.small_12}),s(g,{tag:"label",children:["Description",e(rr,{rows:8,resizeType:"vertical",value:n,onChange:p=>a({fullGraphAriaDescription:p||void 0}),style:V.spaceAbove})]})]})]})}const V=S.StyleSheet.create({caption:{color:f.offBlack64,paddingTop:o.xxSmall_6,paddingBottom:o.xxSmall_6},spaceAbove:{marginTop:o.xxxSmall_4}});Oe.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphDescription",props:{ariaLabelValue:{required:!0,tsType:{name:"string"},description:""},ariaDescriptionValue:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(graphProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"signature",type:"object",raw:`{ +import{j as e,a as s,F as v}from"./jsx-runtime-FVsy8kgq.js";import{U as fe}from"./util-F8-MDmsT.js";import{l as Ce,s as Se,e as je}from"./svg-image-4Vh9uTQ6.js";import{g as xe,f as ve,h as ke,i as Te,j as qe,k as Pe,m as Ae,n as Ie,o as _e,q as Qe,r as Xe}from"./article-renderer-ub6lGcPc.js";import{_ as A}from"./jquery-yG1GhClm.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import{m as Ye,n as Ze}from"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as Je}from"./components-yT7oveOH.js";import{i as Ke}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import{w as Le}from"./index-J2t_5nK1.js";import"./index-IIMKO4_x.js";import{V as h}from"./index-6h5t6F0w.js";import{S as I,O as c}from"./answer-choices-VNdK7gMK.js";import{T as er,a as rr,C as F}from"./index-QCAhLhLD.js";import{s as o,c as f,a as Q}from"./index-deFLJwr4.js";import{c as Ge,f as M,L as g,a as X,b as B}from"./index-h_CiYGGb.js";import{l as S}from"./index-awljIyHI.js";import{r as R}from"./index-TT1qJ6UJ.js";import{i as u}from"./tiny-invariant-bHgPayXn.js";import{H as Y}from"./heading-8aCiuWUg.js";import{S as m}from"./index-qUyqkRvh.js";import{L as q,I as tr}from"./interactive-graph-settings-K1uO-oSP.js";import{L as nr}from"./locked-figures-section-TPfsudBG.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{B as ar}from"./choice-I73s7vIV.js";import{C as w,P as or}from"./locked-label-settings-7eVXvZDY.js";import{S as sr}from"./scrollless-number-text-field-U5Bx_xXb.js";const j="unlimited",Re=t=>{const r=parseInt(t,10);return isNaN(r)||r===0?j:r},De=({numPoints:t=1,onChange:r})=>e(I,{selectedValue:`${t}`,onChange:n=>{r(Re(n))},placeholder:"",style:ir.singleSelectShort,children:[...[...Array(7).keys()].map(n=>e(c,{value:`${n}`,label:`${n} point${n>1?"s":""}`},n)),e(c,{value:j,label:"unlimited"},"unlimited")]}),ir=S.StyleSheet.create({singleSelectShort:{height:26}});De.__docgenInfo={description:"",methods:[],displayName:"GraphPointsCountSelector",props:{numPoints:{required:!1,tsType:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},description:"",defaultValue:{value:"1",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(points: PointValue) => void",signature:{arguments:[{type:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},name:"points"}],return:{name:"void"}}},description:""}}};const Ne=t=>s(I,{selectedValue:t.graphType,onChange:t.onChange,placeholder:"Select an answer type",style:lr.singleSelectShort,children:[t.showNoneOption&&e(c,{value:"none",label:"None"}),e(c,{value:"linear",label:"Linear function"}),e(c,{value:"quadratic",label:"Quadratic function"}),e(c,{value:"sinusoid",label:"Sinusoid function"}),e(c,{value:"circle",label:"Circle"}),e(c,{value:"point",label:"Point(s)"}),e(c,{value:"linear-system",label:"Linear System"}),e(c,{value:"polygon",label:"Polygon"}),e(c,{value:"segment",label:"Line Segment(s)"}),e(c,{value:"ray",label:"Ray"}),e(c,{value:"angle",label:"Angle"})]}),lr=S.StyleSheet.create({singleSelectShort:{height:26}});Ne.__docgenInfo={description:"",methods:[],displayName:"GraphTypeSelector",props:{graphType:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newGraphType: string) => void",signature:{arguments:[{type:{name:"string"},name:"newGraphType"}],return:{name:"void"}}},description:""},showNoneOption:{required:!0,tsType:{name:"boolean"},description:""}}};function ze(t){return s(v,{children:[e(Y,{title:"Correct Answer",isOpen:!0,isCollapsible:!1}),s(h,{children:[s(h,{children:[e(Ge,{style:{paddingTop:o.xxSmall_6,paddingBottom:o.xxSmall_6,color:f.offBlack64},children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."}),e(M,{style:{fontSize:12,backgroundColor:"#eee",paddingInline:o.xxSmall_6,borderColor:"#ccc",borderStyle:"solid",borderWidth:1},children:t.equationString})]}),t.children]})]})}ze.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCorrectAnswer",props:{equationString:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};function Oe(t){const{ariaLabelValue:r,ariaDescriptionValue:n,onChange:a}=t,[i,d]=R.useState(!0);return s(v,{children:[e(Y,{title:"Description",isCollapsible:!0,isOpen:i,onToggle:d}),i&&s(h,{children:[e(Ge,{style:V.caption,children:"Use these fields to describe the graph as a whole. These are used by screen readers to describe content to users who may be visually impaired."}),s(g,{tag:"label",children:["Title",e(er,{value:r,onChange:p=>a({fullGraphAriaLabel:p||void 0}),style:V.spaceAbove})]}),e(m,{size:o.small_12}),s(g,{tag:"label",children:["Description",e(rr,{rows:8,resizeType:"vertical",value:n,onChange:p=>a({fullGraphAriaDescription:p||void 0}),style:V.spaceAbove})]})]})]})}const V=S.StyleSheet.create({caption:{color:f.offBlack64,paddingTop:o.xxSmall_6,paddingBottom:o.xxSmall_6},spaceAbove:{marginTop:o.xxxSmall_4}});Oe.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphDescription",props:{ariaLabelValue:{required:!0,tsType:{name:"string"},description:""},ariaDescriptionValue:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(graphProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"signature",type:"object",raw:`{ apiOptions: APIOptionsWithDefaults; /** diff --git a/assets/interactive-graph-editor.stories--klP5TGb.js b/assets/interactive-graph-editor.stories-gBXW0dql.js similarity index 85% rename from assets/interactive-graph-editor.stories--klP5TGb.js rename to assets/interactive-graph-editor.stories-gBXW0dql.js index 8b5422b98b..d130ad8dfd 100644 --- a/assets/interactive-graph-editor.stories--klP5TGb.js +++ b/assets/interactive-graph-editor.stories-gBXW0dql.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{f as $}from"./flags-for-api-options-FcV02OR3.js";import{I as s}from"./interactive-graph-editor-sXGG56UO.js";import{g as ee}from"./util-w4oIPZJv.js";import{I as te}from"./interactive-graph-settings.argtypes-6T40gg9D.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";import"./interactive-graph-settings-BlpUEkpl.js";import"./locked-figures-section-MyNRaNP3.js";import"./locked-ellipse-settings-2CzQImqt.js";import"./locked-figure-aria-8qS88jMt.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-My12ABKT.js";import"./color-select-ZBceqrDu.js";import"./line-stroke-select-OUNHgM-H.js";import"./locked-function-settings-mVk4KOOh.js";import"./line-swatch-tbLkNsXV.js";import"./locked-line-settings-GmLOdRhN.js";import"./locked-point-settings-75zYMwR0.js";import"./labeled-switch-Fn8JZIE3.js";import"./locked-polygon-settings-CLRPaxRY.js";import"./locked-vector-settings-nyZ3gue2.js";const re={apiOptions:{control:{type:"object"},type:{name:"object",required:!0}},correct:{control:{type:null},type:{name:"object",required:!1}},graph:{control:{type:"object"},type:{name:"object",required:!0}},lockedFigures:{control:{type:"object"},type:{name:"Array",required:!1}},onChange:{control:{type:"function"},type:{name:"(props: Partial) => void",required:!0}},...te},m={apiOptions:{flags:$},graph:{type:"segment"},correct:{type:"segment"}},a=ee("point"),lr={title:"PerseusEditor/Widgets/Interactive Graph Editor",component:s,argTypes:re},d=i=>p(s,{...i});d.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const l={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{});return p(s,{...t,onChange:r})}},u={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,m);return p(s,{...t,onChange:r})}},h={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,graph:{type:"polygon"},correct:{type:"polygon",numSides:4,showAngles:!0,showSides:!0,snapTo:"angles"}});return p(s,{...t,onChange:r})}},g={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{...a,coord:[1,1]},{...a,coord:[-1,-1]}]});return p(s,{...t,onChange:r})}},f={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"line",kind:"line",points:[{...a,coord:[0,2]},{...a,coord:[2,3]}],color:"green",lineStyle:"solid",showPoint1:!1,showPoint2:!1},{type:"line",kind:"ray",points:[{...a,color:"pink",coord:[0,0]},{...a,color:"pink",coord:[4,2]}],color:"pink",lineStyle:"solid",showPoint1:!0,showPoint2:!1},{type:"line",kind:"segment",points:[{...a,color:"grayH",coord:[0,-2]},{...a,color:"grayH",coord:[4,0]}],color:"grayH",lineStyle:"solid",showPoint1:!0,showPoint2:!0}]});return p(s,{...t,onChange:r})}},y={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"ellipse",center:[0,0],radius:[5,2],angle:0,color:"green",fillStyle:"translucent",strokeStyle:"solid"}]});return p(s,{...t,onChange:r})}},k={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"polygon",points:[[-9,4],[-6,4],[-6,1],[-9,1]],color:"green",fillStyle:"translucent",strokeStyle:"solid"}]});return p(s,{...t,onChange:r})}};d.__docgenInfo={description:"",methods:[],displayName:"Default"};var w,S,P;d.parameters={...d.parameters,docs:{...(w=d.parameters)==null?void 0:w.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{f as $}from"./flags-for-api-options-eINmxSCP.js";import{I as s}from"./interactive-graph-editor-sYnTC31H.js";import{g as ee}from"./util-a_JWUtR1.js";import{I as te}from"./interactive-graph-settings.argtypes-6T40gg9D.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";import"./interactive-graph-settings-K1uO-oSP.js";import"./locked-figures-section-TPfsudBG.js";import"./locked-ellipse-settings-y-e2vVG9.js";import"./locked-figure-aria-cizi6QSj.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-7eVXvZDY.js";import"./color-select-Ou1zrjGq.js";import"./line-stroke-select-1i4OFJVH.js";import"./locked-function-settings-leQQyqbk.js";import"./line-swatch-EI3Byz66.js";import"./locked-line-settings-8WmBPF8G.js";import"./locked-point-settings-dcN0AtwC.js";import"./labeled-switch-zT89YLZ0.js";import"./locked-polygon-settings-5YNPD6lU.js";import"./locked-vector-settings-f_p_9H7b.js";const re={apiOptions:{control:{type:"object"},type:{name:"object",required:!0}},correct:{control:{type:null},type:{name:"object",required:!1}},graph:{control:{type:"object"},type:{name:"object",required:!0}},lockedFigures:{control:{type:"object"},type:{name:"Array",required:!1}},onChange:{control:{type:"function"},type:{name:"(props: Partial) => void",required:!0}},...te},m={apiOptions:{flags:$},graph:{type:"segment"},correct:{type:"segment"}},a=ee("point"),lr={title:"PerseusEditor/Widgets/Interactive Graph Editor",component:s,argTypes:re},d=i=>p(s,{...i});d.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const l={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{});return p(s,{...t,onChange:r})}},u={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,m);return p(s,{...t,onChange:r})}},h={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,graph:{type:"polygon"},correct:{type:"polygon",numSides:4,showAngles:!0,showSides:!0,snapTo:"angles"}});return p(s,{...t,onChange:r})}},g={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{...a,coord:[1,1]},{...a,coord:[-1,-1]}]});return p(s,{...t,onChange:r})}},f={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"line",kind:"line",points:[{...a,coord:[0,2]},{...a,coord:[2,3]}],color:"green",lineStyle:"solid",showPoint1:!1,showPoint2:!1},{type:"line",kind:"ray",points:[{...a,color:"pink",coord:[0,0]},{...a,color:"pink",coord:[4,2]}],color:"pink",lineStyle:"solid",showPoint1:!0,showPoint2:!1},{type:"line",kind:"segment",points:[{...a,color:"grayH",coord:[0,-2]},{...a,color:"grayH",coord:[4,0]}],color:"grayH",lineStyle:"solid",showPoint1:!0,showPoint2:!0}]});return p(s,{...t,onChange:r})}},y={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"ellipse",center:[0,0],radius:[5,2],angle:0,color:"green",fillStyle:"translucent",strokeStyle:"solid"}]});return p(s,{...t,onChange:r})}},k={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"polygon",points:[[-9,4],[-6,4],[-6,1],[-9,1]],color:"green",fillStyle:"translucent",strokeStyle:"solid"}]});return p(s,{...t,onChange:r})}};d.__docgenInfo={description:"",methods:[],displayName:"Default"};var w,S,P;d.parameters={...d.parameters,docs:{...(w=d.parameters)==null?void 0:w.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(P=(S=d.parameters)==null?void 0:S.docs)==null?void 0:P.source}}};var R,E,v,I,G;l.parameters={...l.parameters,docs:{...(R=l.parameters)==null?void 0:R.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/interactive-graph-editor.stories-m6-LP9Ac.js b/assets/interactive-graph-editor.stories-giJIGau5.js similarity index 85% rename from assets/interactive-graph-editor.stories-m6-LP9Ac.js rename to assets/interactive-graph-editor.stories-giJIGau5.js index e12a7b985f..e15b6e18f3 100644 --- a/assets/interactive-graph-editor.stories-m6-LP9Ac.js +++ b/assets/interactive-graph-editor.stories-giJIGau5.js @@ -1,4 +1,4 @@ -import{j as e,a as C}from"./jsx-runtime-FVsy8kgq.js";import{V as A}from"./index-6h5t6F0w.js";import{S as ct}from"./index-qUyqkRvh.js";import{s as l,c as Q}from"./index-deFLJwr4.js";import{L as pt,B as dt}from"./index-h_CiYGGb.js";import{a as mt}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as ut}from"./index-awljIyHI.js";import{r as s}from"./index-TT1qJ6UJ.js";import"./index-LBTd2Ozi.js";import{i as ft}from"./interactive-graph-question-builder-Mh2lh4tI.js";import{i as gt,s as ht,a as bt,l as kt,b as vt,r as St,c as Wt,q as yt,d as Lt,p as Pt,e as Rt,f as It,g as r}from"./interactive-graph.testdata-gSWSkezr.js";import{r as wt}from"./register-all-widgets-and-editors-for-testing-2mH-ZU77.js";import{E as t}from"./editor-page-with-storybook-preview--akIa83W.js";import{f as a}from"./flags-for-api-options-FcV02OR3.js";import{E as Et}from"./editor-page-m--8Qm1D.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./article-editor-Hyxtmbid.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./device-framer-eGajQcXC.js";import"./constants-p_UgHLsb.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./editor-Y01VX-A3.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./viewport-resizer-pZjHp3_4.js";import"./structured-item-diff-EmSySxnw.js";import"./text-diff-yU5JXCsK.js";import"./tags-diff-Nd2k4lKQ.js";import"./multi-items-JojuRZeA.js";/* empty css */import"./categorizer-editor-3QAla4Wt.js";import"./editor-jsonify-yjAz4UcO.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-jFzP_8M9.js";import"./dropdown-editor-8wTJqqrY.js";import"./explanation-editor-_xuXa3EA.js";import"./expression-editor-TOSGrK7r.js";import"./graph-settings-6z3yJikg.js";import"./image-editor-oat1qOOh.js";import"./input-number-editor-Bkjav5mB.js";import"./index-6m5XMHRW.js";import"./interactive-graph-editor-sXGG56UO.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-BlpUEkpl.js";import"./locked-figures-section-MyNRaNP3.js";import"./locked-ellipse-settings-2CzQImqt.js";import"./locked-figure-aria-8qS88jMt.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-My12ABKT.js";import"./color-select-ZBceqrDu.js";import"./util-w4oIPZJv.js";import"./line-stroke-select-OUNHgM-H.js";import"./locked-function-settings-mVk4KOOh.js";import"./line-swatch-tbLkNsXV.js";import"./locked-line-settings-GmLOdRhN.js";import"./locked-point-settings-75zYMwR0.js";import"./labeled-switch-Fn8JZIE3.js";import"./locked-polygon-settings-CLRPaxRY.js";import"./locked-vector-settings-nyZ3gue2.js";import"./label-image-editor-AWRkHIaL.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-IbySI0ZR.js";import"./behavior-Or9dqpn7.js";import"./question-markers-rbcwtTwt.js";import"./marker-4IxQ8C94.js";import"./select-image-cPUSf5YP.js";import"./matcher-editor-w387bK5J.js";import"./number-line-editor-g8WyXFkD.js";import"./numeric-input-editor-wcLIK9qM.js";import"./phet-simulation-editor-KZoPAnLO.js";import"./python-program-editor-ReCi12oY.js";import"./editor-DsbDBOGq.js";import"./sorter-editor-RE_zqP0r.js";import"./item-extras-editor-p-SH0jeI.js";wt();const Na={title:"PerseusEditor/Widgets/Interactive Graph"},qt=mt("onChange"),c=()=>e(t,{question:gt}),p=()=>e(t,{question:ht}),d=()=>e(t,{question:bt}),m=()=>e(t,{question:kt}),u=()=>e(t,{question:vt}),f=()=>e(t,{question:St}),g=()=>e(t,{question:Wt}),h=()=>e(t,{question:yt}),b=()=>e(t,{question:Lt}),k=()=>e(t,{question:Pt}),v=()=>e(t,{question:Rt}),S=()=>e(t,{question:It}),W=()=>e(t,{question:ft().withNoInteractiveFigure().addLockedFunction("5*sin(x)",{color:"red"}).build()}),i=()=>e(t,{apiOptions:{isMobile:!1,flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!1,"locked-figures-aria":!1,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r});i.parameters={chromatic:{disableSnapshot:!0}};const y=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),L=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!0,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),P=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!0,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),R=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!0,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),I=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!0,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),w=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!0,"locked-function-labels":!1}}},question:r}),E=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!0}}},question:r}),q=()=>e(t,{question:r}),n=()=>{const[Xe,Ze]=s.useState("phone"),[et,tt]=s.useState(!1),[ot,rt]=s.useState(),[M,at]=s.useState(r),[G,st]=s.useState(),[it,nt]=s.useState([]),_=s.useRef(null);return s.useEffect(()=>{if(_.current){const o=_.current.getSaveWarnings();nt(o)}},[_,M,G]),C(A,{style:F.container,children:[e(Et,{ref:_,apiOptions:{isMobile:!1,flags:a},previewDevice:Xe,onPreviewDeviceChange:o=>Ze(o),developerMode:!0,jsonMode:et,answerArea:ot,question:M,hints:G,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:o=>{qt(o),"jsonMode"in o&&tt(o.jsonMode),"answerArea"in o&&rt(o.answerArea),"question"in o&&at(o.question),"hints"in o&&st(o.hints)}}),C(A,{style:F.errorContainer,children:[e(pt,{children:"Save Warnings:"}),e(ct,{size:l.small_12}),it.map((o,lt)=>e(dt,{style:F.errorMessage,children:o},lt))]})]})};n.parameters={chromatic:{disableSnapshot:!0}};const F=ut.StyleSheet.create({container:{flexDirection:"row"},errorContainer:{border:`1px solid ${Q.offBlack}`,padding:l.medium_16,flexGrow:1,marginRight:l.xLarge_32,height:"80vh",position:"sticky",top:l.xLarge_32,overflowY:"auto"},errorMessage:{color:Q.red,marginBottom:l.small_12}});c.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphWithAriaLabel"};p.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegment"};d.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegments"};m.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinear"};u.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinearSystem"};f.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphRay"};g.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCircle"};h.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphQuadratic"};b.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSinusoid"};k.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPoint"};v.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPolygon"};S.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphAngle"};W.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphNone"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFiguresCurrent"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLabelsFlag"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPointLabelsFlag"};P.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLineLabelsFlag"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedVectorLabelsFlag"};I.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedEllipseLabelsFlag"};w.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPolygonLabelsFlag"};E.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFunctionLabelsFlag"};q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFigureLabelsAllFlags"};n.__docgenInfo={description:"",methods:[],displayName:"WithSaveWarnings"};var N,O,x;c.parameters={...c.parameters,docs:{...(N=c.parameters)==null?void 0:N.docs,source:{originalSource:"(): React.ReactElement => ",...(x=(O=c.parameters)==null?void 0:O.docs)==null?void 0:x.source}}};var D,j,V;p.parameters={...p.parameters,docs:{...(D=p.parameters)==null?void 0:D.docs,source:{originalSource:`(): React.ReactElement => { +import{j as e,a as C}from"./jsx-runtime-FVsy8kgq.js";import{V as A}from"./index-6h5t6F0w.js";import{S as ct}from"./index-qUyqkRvh.js";import{s as l,c as Q}from"./index-deFLJwr4.js";import{L as pt,B as dt}from"./index-h_CiYGGb.js";import{a as mt}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as ut}from"./index-awljIyHI.js";import{r as s}from"./index-TT1qJ6UJ.js";import"./index-n67YmpRR.js";import{i as ft}from"./interactive-graph-question-builder-Mh2lh4tI.js";import{i as gt,s as ht,a as bt,l as kt,b as vt,r as St,c as Wt,q as yt,d as Lt,p as Pt,e as Rt,f as It,g as r}from"./interactive-graph.testdata-gSWSkezr.js";import{r as wt}from"./register-all-widgets-and-editors-for-testing-Tl0n0XMq.js";import{E as t}from"./editor-page-with-storybook-preview-XU3ula-b.js";import{f as a}from"./flags-for-api-options-eINmxSCP.js";import{E as Et}from"./editor-page-gACWJwm7.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./article-editor-dmW6w6Eg.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./device-framer-eGajQcXC.js";import"./constants-p_UgHLsb.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./editor-1XE8pcNh.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./viewport-resizer-rIRGcoAM.js";import"./structured-item-diff-UZ_vLVui.js";import"./text-diff-ftiYrVyQ.js";import"./tags-diff-wQwsbtqj.js";import"./multi-items-MiSsRMrN.js";/* empty css */import"./categorizer-editor-cvgo7rUS.js";import"./editor-jsonify-4Li1SRv8.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-yKychsEi.js";import"./dropdown-editor-owePQkYW.js";import"./explanation-editor-7sIPvPkn.js";import"./expression-editor-qSSWTw9p.js";import"./graph-settings-VTKCtXa5.js";import"./image-editor-xcASymG3.js";import"./input-number-editor-Z-c49jcj.js";import"./index-JX1pDXLf.js";import"./interactive-graph-editor-sYnTC31H.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-K1uO-oSP.js";import"./locked-figures-section-TPfsudBG.js";import"./locked-ellipse-settings-y-e2vVG9.js";import"./locked-figure-aria-cizi6QSj.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-7eVXvZDY.js";import"./color-select-Ou1zrjGq.js";import"./util-a_JWUtR1.js";import"./line-stroke-select-1i4OFJVH.js";import"./locked-function-settings-leQQyqbk.js";import"./line-swatch-EI3Byz66.js";import"./locked-line-settings-8WmBPF8G.js";import"./locked-point-settings-dcN0AtwC.js";import"./labeled-switch-zT89YLZ0.js";import"./locked-polygon-settings-5YNPD6lU.js";import"./locked-vector-settings-f_p_9H7b.js";import"./label-image-editor-kPCp3zRh.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-Zdsv-TtU.js";import"./behavior-xJJumj3W.js";import"./question-markers-0U-M3sRj.js";import"./marker-de7YvUxA.js";import"./select-image-e-hQhRt5.js";import"./matcher-editor-nUcHc7yM.js";import"./number-line-editor-hnXuQMSB.js";import"./numeric-input-editor-xQu1_JCK.js";import"./phet-simulation-editor-1KD7oC0a.js";import"./python-program-editor-kfW7ZX3D.js";import"./editor-EbDgkB5I.js";import"./sorter-editor-VTfqPYS3.js";import"./item-extras-editor-DOkMw5hS.js";wt();const Na={title:"PerseusEditor/Widgets/Interactive Graph"},qt=mt("onChange"),c=()=>e(t,{question:gt}),p=()=>e(t,{question:ht}),d=()=>e(t,{question:bt}),m=()=>e(t,{question:kt}),u=()=>e(t,{question:vt}),f=()=>e(t,{question:St}),g=()=>e(t,{question:Wt}),h=()=>e(t,{question:yt}),b=()=>e(t,{question:Lt}),k=()=>e(t,{question:Pt}),v=()=>e(t,{question:Rt}),S=()=>e(t,{question:It}),W=()=>e(t,{question:ft().withNoInteractiveFigure().addLockedFunction("5*sin(x)",{color:"red"}).build()}),i=()=>e(t,{apiOptions:{isMobile:!1,flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!1,"locked-figures-aria":!1,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r});i.parameters={chromatic:{disableSnapshot:!0}};const y=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),L=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!0,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),P=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!0,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),R=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!0,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),I=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!0,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),w=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!0,"locked-function-labels":!1}}},question:r}),E=()=>e(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!0}}},question:r}),q=()=>e(t,{question:r}),n=()=>{const[Xe,Ze]=s.useState("phone"),[et,tt]=s.useState(!1),[ot,rt]=s.useState(),[M,at]=s.useState(r),[G,st]=s.useState(),[it,nt]=s.useState([]),_=s.useRef(null);return s.useEffect(()=>{if(_.current){const o=_.current.getSaveWarnings();nt(o)}},[_,M,G]),C(A,{style:F.container,children:[e(Et,{ref:_,apiOptions:{isMobile:!1,flags:a},previewDevice:Xe,onPreviewDeviceChange:o=>Ze(o),developerMode:!0,jsonMode:et,answerArea:ot,question:M,hints:G,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:o=>{qt(o),"jsonMode"in o&&tt(o.jsonMode),"answerArea"in o&&rt(o.answerArea),"question"in o&&at(o.question),"hints"in o&&st(o.hints)}}),C(A,{style:F.errorContainer,children:[e(pt,{children:"Save Warnings:"}),e(ct,{size:l.small_12}),it.map((o,lt)=>e(dt,{style:F.errorMessage,children:o},lt))]})]})};n.parameters={chromatic:{disableSnapshot:!0}};const F=ut.StyleSheet.create({container:{flexDirection:"row"},errorContainer:{border:`1px solid ${Q.offBlack}`,padding:l.medium_16,flexGrow:1,marginRight:l.xLarge_32,height:"80vh",position:"sticky",top:l.xLarge_32,overflowY:"auto"},errorMessage:{color:Q.red,marginBottom:l.small_12}});c.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphWithAriaLabel"};p.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegment"};d.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegments"};m.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinear"};u.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinearSystem"};f.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphRay"};g.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCircle"};h.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphQuadratic"};b.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSinusoid"};k.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPoint"};v.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPolygon"};S.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphAngle"};W.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphNone"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFiguresCurrent"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLabelsFlag"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPointLabelsFlag"};P.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLineLabelsFlag"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedVectorLabelsFlag"};I.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedEllipseLabelsFlag"};w.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPolygonLabelsFlag"};E.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFunctionLabelsFlag"};q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFigureLabelsAllFlags"};n.__docgenInfo={description:"",methods:[],displayName:"WithSaveWarnings"};var N,O,x;c.parameters={...c.parameters,docs:{...(N=c.parameters)==null?void 0:N.docs,source:{originalSource:"(): React.ReactElement => ",...(x=(O=c.parameters)==null?void 0:O.docs)==null?void 0:x.source}}};var D,j,V;p.parameters={...p.parameters,docs:{...(D=p.parameters)==null?void 0:D.docs,source:{originalSource:`(): React.ReactElement => { return ; }`,...(V=(j=p.parameters)==null?void 0:j.docs)==null?void 0:V.source}}};var B,H,J;d.parameters={...d.parameters,docs:{...(B=d.parameters)==null?void 0:B.docs,source:{originalSource:`(): React.ReactElement => { return ; diff --git a/assets/interactive-graph-regression.stories-S9QWgeIQ.js b/assets/interactive-graph-regression.stories-IFSphHLr.js similarity index 97% rename from assets/interactive-graph-regression.stories-S9QWgeIQ.js rename to assets/interactive-graph-regression.stories-IFSphHLr.js index 5217cedf4f..e982d831f6 100644 --- a/assets/interactive-graph-regression.stories-S9QWgeIQ.js +++ b/assets/interactive-graph-regression.stories-IFSphHLr.js @@ -1,4 +1,4 @@ -import{j as e,F as k}from"./jsx-runtime-FVsy8kgq.js";import{R as os}from"./renderer-VfFjn7ah.js";import{m as ns}from"./i18n-context-P5sgPFep.js";import{i as t}from"./interactive-graph-question-builder-Mh2lh4tI.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";const $s={title:"Perseus/Widgets/Interactive Graph Visual Regression Tests"},a=s=>e(r,{question:t().withAxisLabels("\\text{Custom $x$ label}","\\text{Custom $y$ label}").build()}),i=s=>e(r,{question:t().withGridStep(2.571,3.123).build()}),o=s=>e(r,{question:t().withTickStep(1.5,1.5).build()}),n=s=>e(r,{question:t().withMarkings("grid").build()}),c=s=>e(r,{question:t().withMarkings("none").build()}),d=s=>e(r,{question:t().withXRange(-2,2).withYRange(-2,2).build()}),u=s=>e(r,{question:t().withXRange(-50,50).withYRange(-50,50).build()}),m=s=>e(k,{children:e(r,{question:t().withXRange(0,20).addLockedLine([1,1],[5,2]).build()})}),p=s=>e(k,{children:e(r,{question:t().withXRange(-1,20).addLockedLine([1,1],[5,2]).build()})}),g=s=>e(k,{children:e(r,{question:t().withXRange(-3,20).addLockedLine([1,1],[5,2]).build()})}),l=s=>e(r,{question:t().withXRange(1,20).build()}),h=s=>e(r,{question:t().withXRange(6,20).build()}),f=s=>e(r,{question:t().withXRange(-20,0).build()}),R=s=>e(r,{question:t().withXRange(-20,-1).build()}),M=s=>e(r,{question:t().withYRange(0,20).build()}),A=s=>e(r,{question:t().withYRange(-1,20).build()}),W=s=>e(r,{question:t().withYRange(1,20).build()}),S=s=>e(k,{children:e(r,{question:t().withYRange(-3,20).addLockedLine([-3,2],[5,16]).build()})}),b=s=>e(r,{question:t().withYRange(-20,0).build()}),L=s=>e(r,{question:t().withYRange(-20,-1).build()}),w=s=>e("div",{className:"framework-perseus perseus-mobile",children:e(r,{question:t().build()})}),q=s=>e(r,{question:t().withSegments({numSegments:3}).build()}),_=s=>e("div",{className:"framework-perseus perseus-mobile",children:e(r,{question:t().withCircle().withXRange(-10,10).withYRange(-5,5).build()})}),x=s=>e(r,{question:t().addLockedLine([-3,-3],[3,3]).withXRange(-5,5).withYRange(-10,10).build()}),y=s=>e(r,{question:t().addLockedPointAt(3,2).addLockedPointAt(-1,1).addLockedPointAt(0,-4).build()}),Q=s=>e(r,{question:t().addLockedLine([-1,1],[2,3]).build()}),N=s=>e(r,{question:t().withProtractor().build()});function r(s){const{question:G}=s;return e(os,{strings:ns,content:G.content,widgets:G.widgets,images:G.images,apiOptions:{flags:{mafs:{segment:!0,circle:!0,linear:!0}}}})}a.__docgenInfo={description:"",methods:[],displayName:"MafsWithCustomAxisLabels"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalGridStep"};o.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalAxisTicks"};n.__docgenInfo={description:"",methods:[],displayName:"MafsWithGridMarkings"};c.__docgenInfo={description:"",methods:[],displayName:"MafsWithNoMarkings"};d.__docgenInfo={description:"",methods:[],displayName:"MafsWithSmallRange"};u.__docgenInfo={description:"",methods:[],displayName:"MafsWithLargeRange"};m.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtLeft"};p.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisNearLeft"};g.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisJustOverLeft"};l.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffLeft"};h.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffFarLeft"};f.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtRight"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffRight"};M.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtBottom"};A.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisNearBottom"};W.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffBottom"};S.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisJustOverBottom"};b.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtTop"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffTop"};w.__docgenInfo={description:"",methods:[],displayName:"MafsInMobileContainer"};q.__docgenInfo={description:"",methods:[],displayName:"MafsWithMultipleSegments"};_.__docgenInfo={description:"",methods:[],displayName:"MafsCircleGraphWithNonsquareRange"};x.__docgenInfo={description:"",methods:[],displayName:"MafsLineGraphWithNonsquareRange"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPoints"};Q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLine"};N.__docgenInfo={description:"",methods:[],displayName:"MafsWithProtractor"};var v,Y,B;a.parameters={...a.parameters,docs:{...(v=a.parameters)==null?void 0:v.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(B=(Y=a.parameters)==null?void 0:Y.docs)==null?void 0:B.source}}};var X,I,E;i.parameters={...i.parameters,docs:{...(X=i.parameters)==null?void 0:X.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(E=(I=i.parameters)==null?void 0:I.docs)==null?void 0:E.source}}};var O,C,P;o.parameters={...o.parameters,docs:{...(O=o.parameters)==null?void 0:O.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(P=(C=o.parameters)==null?void 0:C.docs)==null?void 0:P.source}}};var T,F,$;n.parameters={...n.parameters,docs:{...(T=n.parameters)==null?void 0:T.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...($=(F=n.parameters)==null?void 0:F.docs)==null?void 0:$.source}}};var J,j,V;c.parameters={...c.parameters,docs:{...(J=c.parameters)==null?void 0:J.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(V=(j=c.parameters)==null?void 0:j.docs)==null?void 0:V.source}}};var z,D,H;d.parameters={...d.parameters,docs:{...(z=d.parameters)==null?void 0:z.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(H=(D=d.parameters)==null?void 0:D.docs)==null?void 0:H.source}}};var K,U,Z;u.parameters={...u.parameters,docs:{...(K=u.parameters)==null?void 0:K.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(Z=(U=u.parameters)==null?void 0:U.docs)==null?void 0:Z.source}}};var ee,se,te;m.parameters={...m.parameters,docs:{...(ee=m.parameters)==null?void 0:ee.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> +import{j as e,F as k}from"./jsx-runtime-FVsy8kgq.js";import{R as os}from"./renderer-JG1Z7r2S.js";import{m as ns}from"./i18n-context-P5sgPFep.js";import{i as t}from"./interactive-graph-question-builder-Mh2lh4tI.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";const $s={title:"Perseus/Widgets/Interactive Graph Visual Regression Tests"},a=s=>e(r,{question:t().withAxisLabels("\\text{Custom $x$ label}","\\text{Custom $y$ label}").build()}),i=s=>e(r,{question:t().withGridStep(2.571,3.123).build()}),o=s=>e(r,{question:t().withTickStep(1.5,1.5).build()}),n=s=>e(r,{question:t().withMarkings("grid").build()}),c=s=>e(r,{question:t().withMarkings("none").build()}),d=s=>e(r,{question:t().withXRange(-2,2).withYRange(-2,2).build()}),u=s=>e(r,{question:t().withXRange(-50,50).withYRange(-50,50).build()}),m=s=>e(k,{children:e(r,{question:t().withXRange(0,20).addLockedLine([1,1],[5,2]).build()})}),p=s=>e(k,{children:e(r,{question:t().withXRange(-1,20).addLockedLine([1,1],[5,2]).build()})}),g=s=>e(k,{children:e(r,{question:t().withXRange(-3,20).addLockedLine([1,1],[5,2]).build()})}),l=s=>e(r,{question:t().withXRange(1,20).build()}),h=s=>e(r,{question:t().withXRange(6,20).build()}),f=s=>e(r,{question:t().withXRange(-20,0).build()}),R=s=>e(r,{question:t().withXRange(-20,-1).build()}),M=s=>e(r,{question:t().withYRange(0,20).build()}),A=s=>e(r,{question:t().withYRange(-1,20).build()}),W=s=>e(r,{question:t().withYRange(1,20).build()}),S=s=>e(k,{children:e(r,{question:t().withYRange(-3,20).addLockedLine([-3,2],[5,16]).build()})}),b=s=>e(r,{question:t().withYRange(-20,0).build()}),L=s=>e(r,{question:t().withYRange(-20,-1).build()}),w=s=>e("div",{className:"framework-perseus perseus-mobile",children:e(r,{question:t().build()})}),q=s=>e(r,{question:t().withSegments({numSegments:3}).build()}),_=s=>e("div",{className:"framework-perseus perseus-mobile",children:e(r,{question:t().withCircle().withXRange(-10,10).withYRange(-5,5).build()})}),x=s=>e(r,{question:t().addLockedLine([-3,-3],[3,3]).withXRange(-5,5).withYRange(-10,10).build()}),y=s=>e(r,{question:t().addLockedPointAt(3,2).addLockedPointAt(-1,1).addLockedPointAt(0,-4).build()}),Q=s=>e(r,{question:t().addLockedLine([-1,1],[2,3]).build()}),N=s=>e(r,{question:t().withProtractor().build()});function r(s){const{question:G}=s;return e(os,{strings:ns,content:G.content,widgets:G.widgets,images:G.images,apiOptions:{flags:{mafs:{segment:!0,circle:!0,linear:!0}}}})}a.__docgenInfo={description:"",methods:[],displayName:"MafsWithCustomAxisLabels"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalGridStep"};o.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalAxisTicks"};n.__docgenInfo={description:"",methods:[],displayName:"MafsWithGridMarkings"};c.__docgenInfo={description:"",methods:[],displayName:"MafsWithNoMarkings"};d.__docgenInfo={description:"",methods:[],displayName:"MafsWithSmallRange"};u.__docgenInfo={description:"",methods:[],displayName:"MafsWithLargeRange"};m.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtLeft"};p.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisNearLeft"};g.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisJustOverLeft"};l.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffLeft"};h.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffFarLeft"};f.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtRight"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffRight"};M.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtBottom"};A.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisNearBottom"};W.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffBottom"};S.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisJustOverBottom"};b.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtTop"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffTop"};w.__docgenInfo={description:"",methods:[],displayName:"MafsInMobileContainer"};q.__docgenInfo={description:"",methods:[],displayName:"MafsWithMultipleSegments"};_.__docgenInfo={description:"",methods:[],displayName:"MafsCircleGraphWithNonsquareRange"};x.__docgenInfo={description:"",methods:[],displayName:"MafsLineGraphWithNonsquareRange"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPoints"};Q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLine"};N.__docgenInfo={description:"",methods:[],displayName:"MafsWithProtractor"};var v,Y,B;a.parameters={...a.parameters,docs:{...(v=a.parameters)==null?void 0:v.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(B=(Y=a.parameters)==null?void 0:Y.docs)==null?void 0:B.source}}};var X,I,E;i.parameters={...i.parameters,docs:{...(X=i.parameters)==null?void 0:X.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(E=(I=i.parameters)==null?void 0:I.docs)==null?void 0:E.source}}};var O,C,P;o.parameters={...o.parameters,docs:{...(O=o.parameters)==null?void 0:O.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(P=(C=o.parameters)==null?void 0:C.docs)==null?void 0:P.source}}};var T,F,$;n.parameters={...n.parameters,docs:{...(T=n.parameters)==null?void 0:T.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...($=(F=n.parameters)==null?void 0:F.docs)==null?void 0:$.source}}};var J,j,V;c.parameters={...c.parameters,docs:{...(J=c.parameters)==null?void 0:J.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(V=(j=c.parameters)==null?void 0:j.docs)==null?void 0:V.source}}};var z,D,H;d.parameters={...d.parameters,docs:{...(z=d.parameters)==null?void 0:z.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(H=(D=d.parameters)==null?void 0:D.docs)==null?void 0:H.source}}};var K,U,Z;u.parameters={...u.parameters,docs:{...(K=u.parameters)==null?void 0:K.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(Z=(U=u.parameters)==null?void 0:U.docs)==null?void 0:Z.source}}};var ee,se,te;m.parameters={...m.parameters,docs:{...(ee=m.parameters)==null?void 0:ee.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> `,...(te=(se=m.parameters)==null?void 0:se.docs)==null?void 0:te.source}}};var re,ae,ie;p.parameters={...p.parameters,docs:{...(re=p.parameters)==null?void 0:re.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> diff --git a/assets/interactive-graph-settings-BlpUEkpl.js b/assets/interactive-graph-settings-K1uO-oSP.js similarity index 97% rename from assets/interactive-graph-settings-BlpUEkpl.js rename to assets/interactive-graph-settings-K1uO-oSP.js index 865697f7ea..320a1168dc 100644 --- a/assets/interactive-graph-settings-BlpUEkpl.js +++ b/assets/interactive-graph-settings-K1uO-oSP.js @@ -1,4 +1,4 @@ -import{j as a,a as d,F as N}from"./jsx-runtime-FVsy8kgq.js";import{c as C}from"./article-renderer-GCz9idJ2.js";import{_ as l}from"./jquery-yG1GhClm.js";import{U as k}from"./util-F8-MDmsT.js";import{B as E}from"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as z}from"./components-V6aclUoQ.js";import{i as P}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{V as v}from"./index-6h5t6F0w.js";import{C as B}from"./index-QCAhLhLD.js";import{s as m,c as q}from"./index-deFLJwr4.js";import{l as R}from"./index-awljIyHI.js";import{r as w}from"./index-TT1qJ6UJ.js";import{H}from"./heading-8aCiuWUg.js";import{b as G}from"./index-h_CiYGGb.js";const h=x=>{const{children:n,label:e,labelSide:t="left",style:s}=x;return a("label",{className:R.css(S.label),children:d(v,{style:[S.row,s],children:[t==="start"||a(G,{style:S.spaceEnd,children:e}),n,t==="end"&&a(G,{style:S.spaceStart,children:e})]})})},S=R.StyleSheet.create({label:{width:"fit-content"},row:{flexDirection:"row",marginTop:m.xSmall_8,alignItems:"center",width:"fit-content"},spaceStart:{marginInlineStart:m.xSmall_8},spaceEnd:{marginInlineEnd:m.xSmall_8}});h.__docgenInfo={description:"",methods:[],displayName:"LabeledRow",props:{id:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},labelSide:{required:!1,tsType:{name:"union",raw:'"start" | "end"',elements:[{name:"literal",value:'"start"'},{name:"literal",value:'"end"'}]},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};const{ButtonGroup:V,InfoTip:_,RangeInput:b}=z,U={url:null,width:0,height:0};function A(x,n){return Math.floor((x[1]-x[0])/n)}const y=class y extends w.Component{constructor(n){super(n),this._isMounted=!1,this.bgUrlRef=w.createRef(),this.labelXRef=w.createRef(),this.labelYRef=w.createRef(),this.change=(...e)=>C.apply(this,e),this.changeBackgroundUrl=e=>{var i;if(e.type==="keypress"&&e.key!=="Enter")return;const t=(p,o,r)=>{const u={...this.props.backgroundImage};u.url=p,u.width=o,u.height=r,this.setState({backgroundImage:u},this.changeGraph)},s=(i=this.bgUrlRef.current)==null?void 0:i.value;s?k.getImageSize(s,(p,o)=>{this._isMounted&&t(s,p,o)}):t(null,0,0)},this.renderLabelChoices=e=>e.map(t=>a("option",{value:t[1],children:t[0]},t[1])),this.validRange=e=>l.every(e,function(s){return l.isFinite(s)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number",this.validateStepValue=e=>{const{step:t,range:s,name:i,minTicks:p,maxTicks:o}=e,r=A(s,t);return ro?i+" is too small, there can be at most "+o+" ticks.":!0},this.validSnapStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Snap step",minTicks:5,maxTicks:60}),this.validGridStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Grid step",minTicks:3,maxTicks:60}),this.validStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Step",minTicks:3,maxTicks:20}),this.validBackgroundImageSize=e=>e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0,this.validateGraphSettings=(e,t,s,i,p)=>{const o=this;let r;if(!l.every(e,function(g){return r=o.validRange(g),r===!0})||!l.every(t,function(g,c){return r=o.validStep(g,e[c]),r===!0})||!l.every(s,function(g,c){return r=o.validGridStep(g,e[c]),r===!0})||!l.every(i,function(g,c){return r=o.validSnapStep(g,e[c]),r===!0}))return r;const I=this.validBackgroundImageSize(p);return I!==!0?(r=I,r):!0},this.changeLabel=(e,t)=>{const s=t.target.value,i=this.state.labelsTextbox.slice();i[e]=s,this.setState({labelsTextbox:i},this.changeGraph)},this.changeRange=(e,t)=>{const s=this.state.rangeTextbox.slice();s[e]=t;const i=this.state.stepTextbox.slice(),p=this.state.gridStepTextbox.slice(),o=this.state.snapStepTextbox.slice(),r=k.scaleFromExtent(s[e],this.props.box[e]);if(this.validRange(s[e])===!0){i[e]=k.tickStepFromExtent(s[e],this.props.box[e]);const u=k.gridStepFromTickStep(i[e],r);u&&(p[e]=u),o[e]=p[e]/2}this.setState({stepTextbox:i,gridStepTextbox:p,snapStepTextbox:o,rangeTextbox:s},this.changeGraph)},this.changeStep=e=>{this.setState({stepTextbox:e},this.changeGraph)},this.changeSnapStep=e=>{this.setState({snapStepTextbox:e},this.changeGraph)},this.changeGridStep=e=>{this.setState({gridStepTextbox:e,snapStepTextbox:l.map(e,function(t){return t/2})},this.changeGraph)},this.changeGraph=()=>{const e=this.state.labelsTextbox,t=l.map(this.state.rangeTextbox,function(u){return l.map(u,Number)}),s=l.map(this.state.stepTextbox,Number),i=this.state.gridStepTextbox,p=this.state.snapStepTextbox,o=this.state.backgroundImage,r=this.validateGraphSettings(t,s,i,p,o);r===!0?this.change({valid:!0,labels:e,range:t,step:s,gridStep:i,snapStep:p,backgroundImage:o}):this.change({valid:r})},this.state={isExpanded:!0,...y.stateFromProps(n)}}static stateFromProps(n){return{labelsTextbox:n.labels,gridStepTextbox:n.gridStep,snapStepTextbox:n.snapStep,stepTextbox:n.step,rangeTextbox:n.range,backgroundImage:{...n.backgroundImage}}}componentDidMount(){this._isMounted=!0,this.changeGraph=l.debounce(this.changeGraph,300)}UNSAFE_componentWillReceiveProps(n){(!l.isEqual(this.props.labels,n.labels)||!l.isEqual(this.props.gridStep,n.gridStep)||!l.isEqual(this.props.snapStep,n.snapStep)||!l.isEqual(this.props.step,n.step)||!l.isEqual(this.props.range,n.range)||!l.isEqual(this.props.backgroundImage,n.backgroundImage))&&this.setState(y.stateFromProps(n))}componentWillUnmount(){this._isMounted=!1}render(){return d(N,{children:[a(H,{title:"Common Graph Settings",isOpen:this.state.isExpanded,isCollapsible:!0,onToggle:()=>this.setState({isExpanded:!this.state.isExpanded})}),this.state.isExpanded&&d(v,{children:[d("div",{className:"graph-settings",children:[d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"x Label",children:a("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelXRef,onChange:n=>this.changeLabel(0,n),value:this.state.labelsTextbox[0]||""})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"y Label",children:a("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelYRef,onChange:n=>this.changeLabel(1,n),value:this.state.labelsTextbox[1]||""})})})]}),d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"x Range",children:a(b,{value:this.state.rangeTextbox[0],onChange:n=>this.changeRange(0,n)})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"y Range",children:a(b,{value:this.state.rangeTextbox[1],onChange:n=>this.changeRange(1,n)})})})]}),d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"Tick Step",children:a(b,{value:this.state.stepTextbox,onChange:this.changeStep})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"Grid Step",children:a(b,{value:this.state.gridStepTextbox,onChange:this.changeGridStep})})})]}),a("div",{className:"perseus-widget-row",children:a("div",{className:"perseus-widget-left-col",children:a(h,{label:"Snap Step",children:a(b,{value:this.state.snapStepTextbox,onChange:this.changeSnapStep})})})}),a("div",{className:"perseus-widget-row",children:a(h,{label:"Markings:",children:a(V,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})})}),a("div",{className:"perseus-widget-left-col",children:a(B,{label:"Show tooltips",checked:this.props.showTooltips,onChange:n=>{this.change({showTooltips:n})}})})]}),d(h,{label:"Background image URL:",style:f.resetSpaceTop,children:[a("input",{type:"text",className:R.css(f.backgroundUrlInput),ref:this.bgUrlRef,value:this.state.backgroundImage.url||"",onChange:n=>{const e={...this.props.backgroundImage};e.url=n.target.value,this.setState({backgroundImage:e})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a(_,{children:a("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),d(v,{style:f.protractorSection,children:[a(v,{style:f.checkboxRow,children:a(B,{label:"Show protractor",checked:this.props.showProtractor,onChange:n=>{this.change({showProtractor:n})},style:f.resetSpaceTop})}),this.props.showProtractor&&a(E,{layout:"floating",text:"The protractor is not accessible. Please consider an alternate approach.",kind:"warning"})]})]})]})}};y.defaultProps={box:[P.defaultBoxSizeSmall,P.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:U,markings:"graph",showProtractor:!1,showTooltips:!1};let T=y;const f=R.StyleSheet.create({resetSpaceTop:{marginTop:0},backgroundUrlInput:{border:`1px solid ${q.offBlack32}`,borderRadius:m.xxxSmall_4,padding:m.xxxSmall_4},checkboxRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:m.xSmall_8},protractorSection:{marginTop:m.xSmall_8,borderTop:`1px solid ${q.offBlack16}`,paddingTop:m.xSmall_8,paddingBottom:m.xSmall_8,borderBottom:`1px solid ${q.offBlack16}`}}),ge=T;T.__docgenInfo={description:"",methods:[{name:"stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{j as a,a as d,F as N}from"./jsx-runtime-FVsy8kgq.js";import{c as C}from"./article-renderer-ub6lGcPc.js";import{_ as l}from"./jquery-yG1GhClm.js";import{U as k}from"./util-F8-MDmsT.js";import{B as E}from"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as z}from"./components-yT7oveOH.js";import{i as P}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{V as v}from"./index-6h5t6F0w.js";import{C as B}from"./index-QCAhLhLD.js";import{s as m,c as q}from"./index-deFLJwr4.js";import{l as R}from"./index-awljIyHI.js";import{r as w}from"./index-TT1qJ6UJ.js";import{H}from"./heading-8aCiuWUg.js";import{b as G}from"./index-h_CiYGGb.js";const h=x=>{const{children:n,label:e,labelSide:t="left",style:s}=x;return a("label",{className:R.css(S.label),children:d(v,{style:[S.row,s],children:[t==="start"||a(G,{style:S.spaceEnd,children:e}),n,t==="end"&&a(G,{style:S.spaceStart,children:e})]})})},S=R.StyleSheet.create({label:{width:"fit-content"},row:{flexDirection:"row",marginTop:m.xSmall_8,alignItems:"center",width:"fit-content"},spaceStart:{marginInlineStart:m.xSmall_8},spaceEnd:{marginInlineEnd:m.xSmall_8}});h.__docgenInfo={description:"",methods:[],displayName:"LabeledRow",props:{id:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},labelSide:{required:!1,tsType:{name:"union",raw:'"start" | "end"',elements:[{name:"literal",value:'"start"'},{name:"literal",value:'"end"'}]},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};const{ButtonGroup:V,InfoTip:_,RangeInput:b}=z,U={url:null,width:0,height:0};function A(x,n){return Math.floor((x[1]-x[0])/n)}const y=class y extends w.Component{constructor(n){super(n),this._isMounted=!1,this.bgUrlRef=w.createRef(),this.labelXRef=w.createRef(),this.labelYRef=w.createRef(),this.change=(...e)=>C.apply(this,e),this.changeBackgroundUrl=e=>{var i;if(e.type==="keypress"&&e.key!=="Enter")return;const t=(p,o,r)=>{const u={...this.props.backgroundImage};u.url=p,u.width=o,u.height=r,this.setState({backgroundImage:u},this.changeGraph)},s=(i=this.bgUrlRef.current)==null?void 0:i.value;s?k.getImageSize(s,(p,o)=>{this._isMounted&&t(s,p,o)}):t(null,0,0)},this.renderLabelChoices=e=>e.map(t=>a("option",{value:t[1],children:t[0]},t[1])),this.validRange=e=>l.every(e,function(s){return l.isFinite(s)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number",this.validateStepValue=e=>{const{step:t,range:s,name:i,minTicks:p,maxTicks:o}=e,r=A(s,t);return ro?i+" is too small, there can be at most "+o+" ticks.":!0},this.validSnapStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Snap step",minTicks:5,maxTicks:60}),this.validGridStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Grid step",minTicks:3,maxTicks:60}),this.validStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Step",minTicks:3,maxTicks:20}),this.validBackgroundImageSize=e=>e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0,this.validateGraphSettings=(e,t,s,i,p)=>{const o=this;let r;if(!l.every(e,function(g){return r=o.validRange(g),r===!0})||!l.every(t,function(g,c){return r=o.validStep(g,e[c]),r===!0})||!l.every(s,function(g,c){return r=o.validGridStep(g,e[c]),r===!0})||!l.every(i,function(g,c){return r=o.validSnapStep(g,e[c]),r===!0}))return r;const I=this.validBackgroundImageSize(p);return I!==!0?(r=I,r):!0},this.changeLabel=(e,t)=>{const s=t.target.value,i=this.state.labelsTextbox.slice();i[e]=s,this.setState({labelsTextbox:i},this.changeGraph)},this.changeRange=(e,t)=>{const s=this.state.rangeTextbox.slice();s[e]=t;const i=this.state.stepTextbox.slice(),p=this.state.gridStepTextbox.slice(),o=this.state.snapStepTextbox.slice(),r=k.scaleFromExtent(s[e],this.props.box[e]);if(this.validRange(s[e])===!0){i[e]=k.tickStepFromExtent(s[e],this.props.box[e]);const u=k.gridStepFromTickStep(i[e],r);u&&(p[e]=u),o[e]=p[e]/2}this.setState({stepTextbox:i,gridStepTextbox:p,snapStepTextbox:o,rangeTextbox:s},this.changeGraph)},this.changeStep=e=>{this.setState({stepTextbox:e},this.changeGraph)},this.changeSnapStep=e=>{this.setState({snapStepTextbox:e},this.changeGraph)},this.changeGridStep=e=>{this.setState({gridStepTextbox:e,snapStepTextbox:l.map(e,function(t){return t/2})},this.changeGraph)},this.changeGraph=()=>{const e=this.state.labelsTextbox,t=l.map(this.state.rangeTextbox,function(u){return l.map(u,Number)}),s=l.map(this.state.stepTextbox,Number),i=this.state.gridStepTextbox,p=this.state.snapStepTextbox,o=this.state.backgroundImage,r=this.validateGraphSettings(t,s,i,p,o);r===!0?this.change({valid:!0,labels:e,range:t,step:s,gridStep:i,snapStep:p,backgroundImage:o}):this.change({valid:r})},this.state={isExpanded:!0,...y.stateFromProps(n)}}static stateFromProps(n){return{labelsTextbox:n.labels,gridStepTextbox:n.gridStep,snapStepTextbox:n.snapStep,stepTextbox:n.step,rangeTextbox:n.range,backgroundImage:{...n.backgroundImage}}}componentDidMount(){this._isMounted=!0,this.changeGraph=l.debounce(this.changeGraph,300)}UNSAFE_componentWillReceiveProps(n){(!l.isEqual(this.props.labels,n.labels)||!l.isEqual(this.props.gridStep,n.gridStep)||!l.isEqual(this.props.snapStep,n.snapStep)||!l.isEqual(this.props.step,n.step)||!l.isEqual(this.props.range,n.range)||!l.isEqual(this.props.backgroundImage,n.backgroundImage))&&this.setState(y.stateFromProps(n))}componentWillUnmount(){this._isMounted=!1}render(){return d(N,{children:[a(H,{title:"Common Graph Settings",isOpen:this.state.isExpanded,isCollapsible:!0,onToggle:()=>this.setState({isExpanded:!this.state.isExpanded})}),this.state.isExpanded&&d(v,{children:[d("div",{className:"graph-settings",children:[d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"x Label",children:a("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelXRef,onChange:n=>this.changeLabel(0,n),value:this.state.labelsTextbox[0]||""})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"y Label",children:a("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelYRef,onChange:n=>this.changeLabel(1,n),value:this.state.labelsTextbox[1]||""})})})]}),d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"x Range",children:a(b,{value:this.state.rangeTextbox[0],onChange:n=>this.changeRange(0,n)})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"y Range",children:a(b,{value:this.state.rangeTextbox[1],onChange:n=>this.changeRange(1,n)})})})]}),d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"Tick Step",children:a(b,{value:this.state.stepTextbox,onChange:this.changeStep})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"Grid Step",children:a(b,{value:this.state.gridStepTextbox,onChange:this.changeGridStep})})})]}),a("div",{className:"perseus-widget-row",children:a("div",{className:"perseus-widget-left-col",children:a(h,{label:"Snap Step",children:a(b,{value:this.state.snapStepTextbox,onChange:this.changeSnapStep})})})}),a("div",{className:"perseus-widget-row",children:a(h,{label:"Markings:",children:a(V,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})})}),a("div",{className:"perseus-widget-left-col",children:a(B,{label:"Show tooltips",checked:this.props.showTooltips,onChange:n=>{this.change({showTooltips:n})}})})]}),d(h,{label:"Background image URL:",style:f.resetSpaceTop,children:[a("input",{type:"text",className:R.css(f.backgroundUrlInput),ref:this.bgUrlRef,value:this.state.backgroundImage.url||"",onChange:n=>{const e={...this.props.backgroundImage};e.url=n.target.value,this.setState({backgroundImage:e})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a(_,{children:a("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),d(v,{style:f.protractorSection,children:[a(v,{style:f.checkboxRow,children:a(B,{label:"Show protractor",checked:this.props.showProtractor,onChange:n=>{this.change({showProtractor:n})},style:f.resetSpaceTop})}),this.props.showProtractor&&a(E,{layout:"floating",text:"The protractor is not accessible. Please consider an alternate approach.",kind:"warning"})]})]})]})}};y.defaultProps={box:[P.defaultBoxSizeSmall,P.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:U,markings:"graph",showProtractor:!1,showTooltips:!1};let T=y;const f=R.StyleSheet.create({resetSpaceTop:{marginTop:0},backgroundUrlInput:{border:`1px solid ${q.offBlack32}`,borderRadius:m.xxxSmall_4,padding:m.xxxSmall_4},checkboxRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:m.xSmall_8},protractorSection:{marginTop:m.xSmall_8,borderTop:`1px solid ${q.offBlack16}`,paddingTop:m.xSmall_8,paddingBottom:m.xSmall_8,borderBottom:`1px solid ${q.offBlack16}`}}),ge=T;T.__docgenInfo={description:"",methods:[{name:"stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ /** * The size of the graph area in pixels. */ diff --git a/assets/interactive-graph-settings.stories-7LAUwdX6.js b/assets/interactive-graph-settings.stories-0CHhsMS0.js similarity index 72% rename from assets/interactive-graph-settings.stories-7LAUwdX6.js rename to assets/interactive-graph-settings.stories-0CHhsMS0.js index a8bb31313e..067506198f 100644 --- a/assets/interactive-graph-settings.stories-7LAUwdX6.js +++ b/assets/interactive-graph-settings.stories-0CHhsMS0.js @@ -1,4 +1,4 @@ -import{j as u}from"./jsx-runtime-FVsy8kgq.js";import{r as x}from"./index-TT1qJ6UJ.js";import{I as o}from"./interactive-graph-settings-BlpUEkpl.js";import{I}from"./interactive-graph-settings.argtypes-6T40gg9D.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";const dt={title:"PerseusEditor/Components/Interactive Graph Settings",component:o,argTypes:I},r=p=>u(o,{...p});r.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const t={render:function(){const l=(f,S)=>({...f,...S}),[h,g]=x.useReducer(l,{});return u(o,{...h,onChange:g})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,m;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as u}from"./jsx-runtime-FVsy8kgq.js";import{r as x}from"./index-TT1qJ6UJ.js";import{I as o}from"./interactive-graph-settings-K1uO-oSP.js";import{I}from"./interactive-graph-settings.argtypes-6T40gg9D.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";const dt={title:"PerseusEditor/Components/Interactive Graph Settings",component:o,argTypes:I},r=p=>u(o,{...p});r.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const t={render:function(){const l=(f,S)=>({...f,...S}),[h,g]=x.useReducer(l,{});return u(o,{...h,onChange:g})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,m;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(m=(e=r.parameters)==null?void 0:e.docs)==null?void 0:m.source}}};var s,a,n,c,d;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/interactive-graph.stories-5ZDzoH6x.js b/assets/interactive-graph.stories-xsPRqNse.js similarity index 95% rename from assets/interactive-graph.stories-5ZDzoH6x.js rename to assets/interactive-graph.stories-xsPRqNse.js index cdbe8f8b84..a271c87b23 100644 --- a/assets/interactive-graph.stories-5ZDzoH6x.js +++ b/assets/interactive-graph.stories-xsPRqNse.js @@ -1,4 +1,4 @@ -import{j as o,a as y,F as X}from"./jsx-runtime-FVsy8kgq.js";import{B as Kt}from"./phet-simulation-wNzquKfW.js";import{B as ne}from"./choice-I73s7vIV.js";import{b as pe,a as Dt,_ as k,V as b}from"./index-6h5t6F0w.js";import{r as c}from"./index-TT1qJ6UJ.js";import{l as Z}from"./index-awljIyHI.js";import{L as Ht,c as Jt}from"./react-router-dom-W_e8xVUu.js";import{i as Yt}from"./index-o3wWn3Y5.js";import{P as he}from"./index-xuPsLuPk.js";import{m as Xt,c as Zt,u as eo,T as to}from"./index-rfN0X25E.js";import{c as n,b as L,s as g}from"./index-deFLJwr4.js";import{S as oe}from"./index-qUyqkRvh.js";import{L as oo}from"./video-transcript-link-Ts3i1VPI.js";import{a as ro,S as no}from"./index-CkAxGj88.js";import{b as so,L as io,H as ao}from"./index-h_CiYGGb.js";import{T as fe}from"./index-K9BSJPWl.js";import{w as co}from"./index-J2t_5nK1.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import{a as lo}from"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import{R as uo}from"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import{S as po}from"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import{m as mo}from"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{R as d}from"./renderer-with-debug-ui-Ty_P7koE.js";import{j as Mt,k as go,m as ho,n as fo,o as yo,t as me,u as bo,v as So,w as vo,x as ko,y as Ro,z as Io,A as wo,B as xo,C as Lo,D as qo,E as _o,F as Co,G as Wo,H as Ao}from"./interactive-graph.testdata-gSWSkezr.js";import"./index-ngddCaVG.js";import"./arrow-square-out-bold-090vdhrx.js";import"./constants-iPV6vHZm.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-StuadxRF.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./index-tvtfaFq4.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./shared-4TdECMLk.js";import"./answer-choices-6SWUlni2.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-0_QL8uoF.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./side-by-side-kGWaKY6T.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./interactive-graph-question-builder-Mh2lh4tI.js";const Eo=e=>{switch(e){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Oo=e=>({xsmall:24,small:32,medium:40,large:48})[e],se={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:n.offBlack32,inverse:n.white50},inverse:n.white,action:{default:n.blue,active:n.activeBlue,inverse:n.fadedBlue},critical:{default:n.red,active:n.activeRed,inverse:n.fadedRed},primary:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed},inverse:{default:n.white,hovered:n.white}},secondary:{default:n.offBlack},tertiary:{default:n.offBlack64},filled:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed}}}},border:{width:{default:L.width.thin,active:L.width.none,hovered:L.width.thin,hoveredInverse:L.width.thin},radius:{default:L.radius.medium_4}}},No=Xt(se,{color:{bg:{hovered:n.white,active:n.white64,filled:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed}}},stroke:{action:{inverse:n.eggplant},critical:{inverse:n.eggplant},primary:{action:{hovered:n.eggplant,active:n.eggplant},critical:{hovered:n.eggplant,active:n.eggplant},inverse:{hovered:n.eggplant}},filled:{action:{hovered:n.white,active:n.white},critical:{hovered:n.white,active:n.white}}}},border:{width:{hovered:L.width.none,hoveredInverse:L.width.none}}}),Qo={default:se,khanmigo:No},Tt=Zt(se);function Po(e){var t;const s=c.useContext(to),a=(t=Qo[s])!=null?t:se;return c.createElement(Tt.Provider,{value:a},e.children)}const Bo=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function Do({icon:e,size:t}){switch(Eo(t)){case"small":return c.createElement(he,{size:"small",color:"currentColor",icon:e});case"medium":default:return c.createElement(he,{size:"medium",color:"currentColor",icon:e})}}const Mo=pe("a"),To=pe("button"),Uo=pe(Ht),zo=c.forwardRef(function(t,s){const{color:a,disabled:r,href:l,icon:u,kind:m="primary",light:p=!1,size:i="medium",skipClientNav:v,style:q,testId:I}=t,w=Dt(t,Bo),{theme:x,themeName:S}=eo(Tt),R=ce=>{const ge=Fo(a,m,p,i,x,S),jt=[Go.shared,ge.default,r&&ge.disabled],le=c.createElement(Do,{size:i,icon:u}),de=k({"data-testid":I,style:[jt,q]},w);return l&&!r?ce&&!v&&Yt(l)?c.createElement(Uo,k({},de,{to:l,ref:s}),le):c.createElement(Mo,k({},de,{href:l,ref:s}),le):c.createElement(To,k({type:"button"},de,{onClick:r?void 0:w.onClick,"aria-disabled":r,ref:s}),le)};return c.createElement(Jt.Consumer,null,ce=>R(ce))}),Go=Z.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),re={};function $o(e,t,s,a,r){switch(e){case"primary":const l=r==="destructive"?t.color.stroke.primary.critical.hovered:t.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:t.color.bg.hovered,color:a?t.color.stroke.primary.inverse.hovered:l,outlineColor:a?t.color.stroke.inverse:s,outlineOffset:1,outlineStyle:"solid",outlineWidth:a?t.border.width.hoveredInverse:t.border.width.hovered},":active":{backgroundColor:t.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:r==="destructive"?t.color.bg.filled.critical.hovered:t.color.bg.filled.action.hovered,color:r==="destructive"?t.color.stroke.filled.critical.hovered:t.color.stroke.filled.action.hovered,outlineWidth:t.border.width.active},":active":{backgroundColor:r==="destructive"?t.color.bg.filled.critical.active:t.color.bg.filled.action.active,color:r==="destructive"?t.color.stroke.filled.critical.active:t.color.stroke.filled.action.active,outlineWidth:t.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Fo=(e="default",t,s,a,r,l)=>{const u=e==="destructive"?r.color.stroke.critical.default:r.color.stroke.action.default,m=`${u}-${t}-${s}-${a}-${l}`;if(re[m])return re[m];if(s&&t!=="primary")throw new Error("Light is only supported for primary IconButtons");const p=(()=>{switch(t){case"primary":return s?r.color.stroke.primary.inverse.default:u;case"secondary":return r.color.stroke.secondary.default;case"tertiary":return r.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),i=Oo(a),v=$o(t,r,u,s,e),q=e==="destructive"?r.color.stroke.critical.inverse:r.color.stroke.action.inverse,I=e==="destructive"?r.color.stroke.critical.active:r.color.stroke.action.active,w=s?r.color.stroke.inverse:u,x=s?r.color.stroke.disabled.inverse:r.color.stroke.disabled.default,S={backgroundColor:r.color.bg.disabled,color:x,outlineColor:x},R={default:{height:i,width:i,color:p,borderRadius:r.border.radius.default,":hover":k({boxShadow:"none",color:w,borderRadius:r.border.radius.default,outlineWidth:r.border.width.default},v[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:p,borderRadius:r.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${w}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":k({boxShadow:"none",outlineWidth:r.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},v[":focus-visible"]),":active":k({color:s?q:I,outlineWidth:r.border.width.default,outlineColor:s?q:I,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},v[":active"])},disabled:{color:x,cursor:"not-allowed",":hover":k({},S,{outline:"none"}),":active":k({},S,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${x}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":S}};return re[m]=Z.StyleSheet.create(R),re[m]},Vo=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],ye=c.forwardRef(function(t,s){const{color:a="default",disabled:r=!1,href:l,kind:u="primary",light:m=!1,size:p="medium",skipClientNav:i,tabIndex:v,target:q}=t,I=Dt(t,Vo);function w(S){const R=S.key;!l&&(R==="Enter"||R==="Space")&&S.preventDefault()}function x(S){const R=S.key;!l&&(R==="Enter"||R==="Space")&&I.onClick&&I.onClick(S)}return c.createElement(Po,null,c.createElement(zo,k({},I,{color:a,disabled:r,href:l,kind:u,light:m,ref:s,skipClientNav:i,size:p,target:q,tabIndex:v,onKeyDown:w,onKeyUp:x})))});class ie extends c.Component{render(){const{color:t,leftContent:s,rightContent:a,size:r,subtitle:l,title:u}=this.props,m=l?io:ao;return c.createElement(b,{style:[h.container,t==="dark"&&h.dark,r==="small"&&h.small]},c.createElement(b,{style:[h.column,h.leftColumn,u?h.withTitle:null]},s),u&&c.createElement(b,{style:[h.column,h.wideColumn]},c.createElement(b,{style:[h.titles,h.center]},c.createElement(m,{id:"wb-toolbar-title"},u),l&&c.createElement(so,{style:t==="light"&&h.subtitle},l))),c.createElement(b,{style:[h.column,h.rightColumn,u?h.withTitle:null]},a))}}ie.defaultProps={color:"light",leftContent:null,rightContent:null,size:"medium"};const h=Z.StyleSheet.create({container:{border:`1px solid ${n.offBlack16}`,flex:1,flexDirection:"row",justifyContent:"space-between",minHeight:66,paddingLeft:g.medium_16,paddingRight:g.medium_16,width:"100%"},small:{minHeight:50},dark:{backgroundColor:n.darkBlue,boxShadow:`0 1px 0 0 ${n.white64}`,color:"white"},column:{justifyContent:"center"},withTitle:{flex:1},wideColumn:{flex:1,flexBasis:"50%"},leftColumn:{alignItems:"center",flexDirection:"row",flexShrink:0,justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end"},center:{textAlign:"center"},subtitle:{color:n.offBlack64},titles:{padding:g.small_12}}),jo=""+new URL("camera-slash-Oge78uaV.svg",import.meta.url).href,Ko=""+new URL("graph-RU2fqeKx.svg",import.meta.url).href,Ho=""+new URL("image-PFUjt3DK.svg",import.meta.url).href,Jo=["angle","segment","linear","linear-system","ray","polygon","point","circle","quadratic","sinusoid","unlimited-point","unlimited-polygon"],Yo=Jo.reduce((e,t)=>(e[t]=!0,e),{});function Ut(e){const{value:t,onInput:s,...a}=e,[r,l]=c.useState(!1),[u,m]=c.useState("");return o("input",{...a,value:r?u:t,onChange:p=>{m(p.target.value),s(p.target.value)},onFocus:()=>{m(t),l(!0)},onBlur:()=>{l(!1)}})}Ut.__docgenInfo={description:"",methods:[],displayName:"EditableControlledInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onInput:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => unknown",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"unknown"}}},description:""}}};function ee(e){let t;return s=>((t==null||s!==t.arg)&&(t={arg:s,result:e(s)}),t.result)}const Xo={type:"next"},Zo={type:"previous"},er=e=>lr(e)?{type:"jump-to-index",index:parseInt(e,10)-1}:{type:"noop"};function tr(e){return{type:"set-questions",questions:e}}function or(e){return{type:"load-questions-from-storage",questions:e}}const rr={type:"remove-current-question"};function nr(e,t){switch(t.type){case"next":return ue(e,s=>s+1);case"previous":return ue(e,s=>s-1);case"jump-to-index":return ue(e,()=>t.index);case"set-questions":return{...e,questions:t.questions};case"load-questions-from-storage":return e.questions||!t.questions?e:{...e,questions:t.questions};case"remove-current-question":{const s=te(e);return{...e,questions:e.questions.split(` +import{j as o,a as y,F as X}from"./jsx-runtime-FVsy8kgq.js";import{B as Kt}from"./phet-simulation-9PbE2pxN.js";import{B as ne}from"./choice-I73s7vIV.js";import{b as pe,a as Dt,_ as k,V as b}from"./index-6h5t6F0w.js";import{r as c}from"./index-TT1qJ6UJ.js";import{l as Z}from"./index-awljIyHI.js";import{L as Ht,c as Jt}from"./react-router-dom-W_e8xVUu.js";import{i as Yt}from"./index-o3wWn3Y5.js";import{P as he}from"./index-xuPsLuPk.js";import{m as Xt,c as Zt,u as eo,T as to}from"./index-rfN0X25E.js";import{c as n,b as L,s as g}from"./index-deFLJwr4.js";import{S as oe}from"./index-qUyqkRvh.js";import{L as oo}from"./video-transcript-link-MKIRfGVo.js";import{a as ro,S as no}from"./index-CkAxGj88.js";import{b as so,L as io,H as ao}from"./index-h_CiYGGb.js";import{T as fe}from"./index-K9BSJPWl.js";import{w as co}from"./index-J2t_5nK1.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import{a as lo}from"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import{R as uo}from"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import{S as po}from"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import{m as mo}from"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{R as d}from"./renderer-with-debug-ui-DcZbZSiB.js";import{j as Mt,k as go,m as ho,n as fo,o as yo,t as me,u as bo,v as So,w as vo,x as ko,y as Ro,z as Io,A as wo,B as xo,C as Lo,D as qo,E as _o,F as Co,G as Wo,H as Ao}from"./interactive-graph.testdata-gSWSkezr.js";import"./index-ngddCaVG.js";import"./arrow-square-out-bold-090vdhrx.js";import"./constants-iPV6vHZm.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-StuadxRF.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./index-tvtfaFq4.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./shared-4TdECMLk.js";import"./answer-choices-VNdK7gMK.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-lqQAegUH.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./side-by-side-kGWaKY6T.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./interactive-graph-question-builder-Mh2lh4tI.js";const Eo=e=>{switch(e){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Oo=e=>({xsmall:24,small:32,medium:40,large:48})[e],se={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:n.offBlack32,inverse:n.white50},inverse:n.white,action:{default:n.blue,active:n.activeBlue,inverse:n.fadedBlue},critical:{default:n.red,active:n.activeRed,inverse:n.fadedRed},primary:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed},inverse:{default:n.white,hovered:n.white}},secondary:{default:n.offBlack},tertiary:{default:n.offBlack64},filled:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed}}}},border:{width:{default:L.width.thin,active:L.width.none,hovered:L.width.thin,hoveredInverse:L.width.thin},radius:{default:L.radius.medium_4}}},No=Xt(se,{color:{bg:{hovered:n.white,active:n.white64,filled:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed}}},stroke:{action:{inverse:n.eggplant},critical:{inverse:n.eggplant},primary:{action:{hovered:n.eggplant,active:n.eggplant},critical:{hovered:n.eggplant,active:n.eggplant},inverse:{hovered:n.eggplant}},filled:{action:{hovered:n.white,active:n.white},critical:{hovered:n.white,active:n.white}}}},border:{width:{hovered:L.width.none,hoveredInverse:L.width.none}}}),Qo={default:se,khanmigo:No},Tt=Zt(se);function Po(e){var t;const s=c.useContext(to),a=(t=Qo[s])!=null?t:se;return c.createElement(Tt.Provider,{value:a},e.children)}const Bo=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function Do({icon:e,size:t}){switch(Eo(t)){case"small":return c.createElement(he,{size:"small",color:"currentColor",icon:e});case"medium":default:return c.createElement(he,{size:"medium",color:"currentColor",icon:e})}}const Mo=pe("a"),To=pe("button"),Uo=pe(Ht),zo=c.forwardRef(function(t,s){const{color:a,disabled:r,href:l,icon:u,kind:m="primary",light:p=!1,size:i="medium",skipClientNav:v,style:q,testId:I}=t,w=Dt(t,Bo),{theme:x,themeName:S}=eo(Tt),R=ce=>{const ge=Fo(a,m,p,i,x,S),jt=[Go.shared,ge.default,r&&ge.disabled],le=c.createElement(Do,{size:i,icon:u}),de=k({"data-testid":I,style:[jt,q]},w);return l&&!r?ce&&!v&&Yt(l)?c.createElement(Uo,k({},de,{to:l,ref:s}),le):c.createElement(Mo,k({},de,{href:l,ref:s}),le):c.createElement(To,k({type:"button"},de,{onClick:r?void 0:w.onClick,"aria-disabled":r,ref:s}),le)};return c.createElement(Jt.Consumer,null,ce=>R(ce))}),Go=Z.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),re={};function $o(e,t,s,a,r){switch(e){case"primary":const l=r==="destructive"?t.color.stroke.primary.critical.hovered:t.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:t.color.bg.hovered,color:a?t.color.stroke.primary.inverse.hovered:l,outlineColor:a?t.color.stroke.inverse:s,outlineOffset:1,outlineStyle:"solid",outlineWidth:a?t.border.width.hoveredInverse:t.border.width.hovered},":active":{backgroundColor:t.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:r==="destructive"?t.color.bg.filled.critical.hovered:t.color.bg.filled.action.hovered,color:r==="destructive"?t.color.stroke.filled.critical.hovered:t.color.stroke.filled.action.hovered,outlineWidth:t.border.width.active},":active":{backgroundColor:r==="destructive"?t.color.bg.filled.critical.active:t.color.bg.filled.action.active,color:r==="destructive"?t.color.stroke.filled.critical.active:t.color.stroke.filled.action.active,outlineWidth:t.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Fo=(e="default",t,s,a,r,l)=>{const u=e==="destructive"?r.color.stroke.critical.default:r.color.stroke.action.default,m=`${u}-${t}-${s}-${a}-${l}`;if(re[m])return re[m];if(s&&t!=="primary")throw new Error("Light is only supported for primary IconButtons");const p=(()=>{switch(t){case"primary":return s?r.color.stroke.primary.inverse.default:u;case"secondary":return r.color.stroke.secondary.default;case"tertiary":return r.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),i=Oo(a),v=$o(t,r,u,s,e),q=e==="destructive"?r.color.stroke.critical.inverse:r.color.stroke.action.inverse,I=e==="destructive"?r.color.stroke.critical.active:r.color.stroke.action.active,w=s?r.color.stroke.inverse:u,x=s?r.color.stroke.disabled.inverse:r.color.stroke.disabled.default,S={backgroundColor:r.color.bg.disabled,color:x,outlineColor:x},R={default:{height:i,width:i,color:p,borderRadius:r.border.radius.default,":hover":k({boxShadow:"none",color:w,borderRadius:r.border.radius.default,outlineWidth:r.border.width.default},v[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:p,borderRadius:r.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${w}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":k({boxShadow:"none",outlineWidth:r.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},v[":focus-visible"]),":active":k({color:s?q:I,outlineWidth:r.border.width.default,outlineColor:s?q:I,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},v[":active"])},disabled:{color:x,cursor:"not-allowed",":hover":k({},S,{outline:"none"}),":active":k({},S,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${x}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":S}};return re[m]=Z.StyleSheet.create(R),re[m]},Vo=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],ye=c.forwardRef(function(t,s){const{color:a="default",disabled:r=!1,href:l,kind:u="primary",light:m=!1,size:p="medium",skipClientNav:i,tabIndex:v,target:q}=t,I=Dt(t,Vo);function w(S){const R=S.key;!l&&(R==="Enter"||R==="Space")&&S.preventDefault()}function x(S){const R=S.key;!l&&(R==="Enter"||R==="Space")&&I.onClick&&I.onClick(S)}return c.createElement(Po,null,c.createElement(zo,k({},I,{color:a,disabled:r,href:l,kind:u,light:m,ref:s,skipClientNav:i,size:p,target:q,tabIndex:v,onKeyDown:w,onKeyUp:x})))});class ie extends c.Component{render(){const{color:t,leftContent:s,rightContent:a,size:r,subtitle:l,title:u}=this.props,m=l?io:ao;return c.createElement(b,{style:[h.container,t==="dark"&&h.dark,r==="small"&&h.small]},c.createElement(b,{style:[h.column,h.leftColumn,u?h.withTitle:null]},s),u&&c.createElement(b,{style:[h.column,h.wideColumn]},c.createElement(b,{style:[h.titles,h.center]},c.createElement(m,{id:"wb-toolbar-title"},u),l&&c.createElement(so,{style:t==="light"&&h.subtitle},l))),c.createElement(b,{style:[h.column,h.rightColumn,u?h.withTitle:null]},a))}}ie.defaultProps={color:"light",leftContent:null,rightContent:null,size:"medium"};const h=Z.StyleSheet.create({container:{border:`1px solid ${n.offBlack16}`,flex:1,flexDirection:"row",justifyContent:"space-between",minHeight:66,paddingLeft:g.medium_16,paddingRight:g.medium_16,width:"100%"},small:{minHeight:50},dark:{backgroundColor:n.darkBlue,boxShadow:`0 1px 0 0 ${n.white64}`,color:"white"},column:{justifyContent:"center"},withTitle:{flex:1},wideColumn:{flex:1,flexBasis:"50%"},leftColumn:{alignItems:"center",flexDirection:"row",flexShrink:0,justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end"},center:{textAlign:"center"},subtitle:{color:n.offBlack64},titles:{padding:g.small_12}}),jo=""+new URL("camera-slash-Oge78uaV.svg",import.meta.url).href,Ko=""+new URL("graph-RU2fqeKx.svg",import.meta.url).href,Ho=""+new URL("image-PFUjt3DK.svg",import.meta.url).href,Jo=["angle","segment","linear","linear-system","ray","polygon","point","circle","quadratic","sinusoid","unlimited-point","unlimited-polygon"],Yo=Jo.reduce((e,t)=>(e[t]=!0,e),{});function Ut(e){const{value:t,onInput:s,...a}=e,[r,l]=c.useState(!1),[u,m]=c.useState("");return o("input",{...a,value:r?u:t,onChange:p=>{m(p.target.value),s(p.target.value)},onFocus:()=>{m(t),l(!0)},onBlur:()=>{l(!1)}})}Ut.__docgenInfo={description:"",methods:[],displayName:"EditableControlledInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onInput:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => unknown",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"unknown"}}},description:""}}};function ee(e){let t;return s=>((t==null||s!==t.arg)&&(t={arg:s,result:e(s)}),t.result)}const Xo={type:"next"},Zo={type:"previous"},er=e=>lr(e)?{type:"jump-to-index",index:parseInt(e,10)-1}:{type:"noop"};function tr(e){return{type:"set-questions",questions:e}}function or(e){return{type:"load-questions-from-storage",questions:e}}const rr={type:"remove-current-question"};function nr(e,t){switch(t.type){case"next":return ue(e,s=>s+1);case"previous":return ue(e,s=>s-1);case"jump-to-index":return ue(e,()=>t.index);case"set-questions":return{...e,questions:t.questions};case"load-questions-from-storage":return e.questions||!t.questions?e:{...e,questions:t.questions};case"remove-current-question":{const s=te(e);return{...e,questions:e.questions.split(` `).filter((a,r)=>r!==s).join(` `)}}}return e}function ue(e,t){const s=te(e),a=ae(e);return{...e,requestedIndex:zt(t(s),a)}}function zt(e,t){return t.length===0||e<0?0:e>=t.length?t.length-1:e}const Gt=ee(e=>e.questions.split(` `).map(t=>t.trim()).filter(Boolean)),ae=ee(e=>Gt(e).map(cr)),sr=ee(e=>ae(e)[te(e)]??null),ir=ee(e=>Gt(e)[te(e)]??null),ar=ee(e=>ae(e).length),te=e=>zt(e.requestedIndex,ae(e));function cr(e){try{return JSON.parse(e)}catch{return{content:"**Could not parse the JSON for this question.**\n\n```\n"+e+"\n```",widgets:{},images:{}}}}function lr(e){return/^\d+$/.test(e)&&+e>0}const dr=Z.StyleSheet.create({header:{display:"flex",alignItems:"center",boxShadow:"0 0 10px #0002",borderBlockEnd:`1px solid ${n.offBlack32}`,background:n.offBlack8,padding:g.small_12,justifyContent:"space-between",flexDirection:"row-reverse",flexWrap:"wrap"}}),$t=({children:e})=>o("header",{className:Z.css(dr.header),children:e});$t.__docgenInfo={description:"",methods:[],displayName:"Header"};const ur=` diff --git a/assets/item-X9tjzx12.js b/assets/item-X9tjzx12.js index e87bf561de..86eb13fcb9 100644 --- a/assets/item-X9tjzx12.js +++ b/assets/item-X9tjzx12.js @@ -1,4 +1,4 @@ -import{j as e,a as h}from"./jsx-runtime-FVsy8kgq.js";import{C as w}from"./index-2dmvOE3q.js";import{V as m}from"./index-6h5t6F0w.js";import{c as a}from"./index-deFLJwr4.js";import{l as g}from"./index-awljIyHI.js";import{r as f}from"./index-TT1qJ6UJ.js";const b=function({tintColor:l,type:n}){switch(n){case"Geometry":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.57584 7.09442c.35139-.16458.76626-.11103 1.06434.13737L26.6402 22.2318c.3234.2695.4434.7128.3001 1.1086C26.7969 23.7363 26.421 24 26 24H8c-.55228 0-1-.4477-1-1V8.00001c0-.38802.22446-.74101.57584-.90559zM9 10.1351V17h4c.5523 0 1 .4477 1 1v4h9.238L9 10.1351zM12 22v-3H9v3h3z",fill:l})});case"Operators":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29 6h1v1h-1V6zm-2 0c0-1.10457.8954-2 2-2h1c1.1046 0 2 .89543 2 2v1c0 1.10457-.8954 2-2 2h-1c-1.1046 0-2-.89543-2-2V6zm-15.8682.50386C11.3098 6.19229 11.6411 6 12 6h2c.5523 0 1 .44772 1 1s-.4477 1-1 1h-1.4197l-3.71206 6.4961c-.18297.3202-.52733.5137-.89599.5035-.36865-.0102-.70175-.2225-.86668-.5524l-2-4c-.24699-.49396-.04676-1.09464.44722-1.34163.49397-.24699 1.09465-.04676 1.34164.44722L8.0588 11.8815l3.073-5.37764zM7.70676 16.2925c.39072.3904.39103 1.0235.00069 1.4143-.42202.4224-.86362 1.0235-1.19588 1.659C6.17039 20.0184 6 20.601 6 21c0 .3789.17235.9897.51638 1.6649.33677.661.7685 1.2472 1.15148 1.5908.41106.3689.44528 1.0011.07643 1.4122-.36885.411-1.00109.4452-1.41215.0764-.61604-.5528-1.18431-1.3599-1.5978-2.1715C4.32813 22.7755 3.99999 21.8345 4 21c.00001-.8609.3301-1.7783.73917-2.5608.41798-.7995.97637-1.5684 1.55338-2.146.39033-.3907 1.0235-.391 1.41421-.0007zm3.58644 0c.3908-.3903 1.0239-.39 1.4143.0007.577.5776 1.1353 1.3465 1.5533 2.146C14.6699 19.2217 15 20.1391 15 21c0 .8345-.3281 1.7755-.7343 2.5728-.4135.8116-.9818 1.6187-1.5978 2.1715-.4111.3688-1.0433.3346-1.4122-.0764-.3688-.4111-.3346-1.0433.0764-1.4122.383-.3436.8148-.9298 1.1515-1.5908.344-.6752.5164-1.286.5164-1.6649 0-.399-.1704-.9816-.5116-1.6342-.3322-.6355-.7738-1.2366-1.1959-1.659-.3903-.3908-.39-1.0239.0007-1.4143zm16.6431 1.3564c.1939.5171-.0681 1.0935-.5852 1.2874L21.848 21l5.5031 2.0637c.5171.1939.7791.7703.5852 1.2874-.1939.5171-.7703.7791-1.2874.5852l-8-3C18.2586 21.79 18 21.4168 18 21c0-.4168.2586-.79.6489-.9363l8-3c.5171-.1939 1.0935.0681 1.2874.5852zM21 8v5h3V8h-3zm-1-2c-.5523 0-1 .44772-1 1v7c0 .5523.4477 1 1 1h5c.5523 0 1-.4477 1-1V7c0-.55228-.4477-1-1-1h-5z",fill:l})});case"Numbers":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.4123 19.5794v1.421H4.71434v-1.421h2.016v-5.558c0-.1213.00233-.245.007-.371.00466-.126.01166-.2543.021-.385l-1.33 1.106c-.09334.07-.18434.1144-.273.133-.08867.0187-.17267.021-.252.007-.07934-.0186-.14934-.0466-.21-.084-.06067-.042-.10734-.084-.14-.126l-.609-.819 3.122-2.646h1.589v8.743h1.75696zm8.3801-.35c.21 0 .3734.0584.49.175.1214.1167.182.2707.182.462v1.134h-7.042v-.63c0-.1213.0257-.252.077-.392.0514-.1446.1377-.2753.259-.392l3.01-3.017c.2567-.2566.483-.5016.679-.735.196-.238.3594-.469.49-.693.1307-.2286.2287-.4596.294-.693.0654-.2333.098-.4783.098-.735 0-.4526-.1166-.7956-.35-1.029-.2333-.238-.5623-.357-.987-.357-.1866 0-.3593.028-.518.084-.154.0514-.294.1237-.42.217-.1213.0934-.2263.203-.315.329-.0886.126-.154.2637-.196.413-.084.2334-.1983.3897-.343.469-.14.0747-.3406.091-.602.049l-1.022-.182c.0747-.4946.2147-.9286.42-1.302.2054-.3733.462-.6836.77-.931.308-.2473.6604-.4316 1.057-.553.3967-.126.8237-.189 1.281-.189.4807 0 .917.0724 1.309.217.3967.14.735.3384 1.015.595.28.252.497.5577.651.917.154.3594.231.756.231 1.19 0 .3734-.0536.7187-.161 1.036-.1073.3174-.2543.6207-.441.91-.182.2847-.3943.5624-.637.833-.2426.2707-.4993.5437-.77.819l-2.156 2.205c.238-.07.4737-.1236.707-.161.2334-.042.4527-.063.658-.063h2.282zm2.6611-5.523c.0747-.4946.2147-.9286.42-1.302.2054-.3733.462-.6836.77-.931.308-.2473.658-.4316 1.05-.553.3967-.126.8237-.189 1.281-.189.4854 0 .9194.07 1.302.21.3874.1354.714.322.98.56.266.238.469.5157.609.833.1447.3174.217.658.217 1.022 0 .322-.035.6067-.105.854-.0653.2427-.1656.455-.301.637-.1306.182-.294.336-.49.462-.1913.126-.413.231-.665.315 1.1667.3827 1.75 1.1597 1.75 2.331 0 .518-.0956.9754-.287 1.372-.1913.392-.448.721-.77.987s-.6976.4667-1.127.602c-.4246.1307-.8703.196-1.337.196-.4946 0-.931-.056-1.309-.168-.378-.112-.7116-.28-1.001-.504-.2846-.224-.5296-.504-.735-.84-.2053-.3406-.385-.7373-.539-1.19l.854-.35c.224-.0933.4317-.119.623-.077.196.042.336.1447.42.308.0934.1774.1914.3407.294.49.1074.1494.2264.28.357.392.1307.1074.2777.1914.441.252.168.0607.3594.091.574.091.2707 0 .5064-.0443.707-.133.2007-.0886.3687-.203.504-.343.1354-.1446.2357-.3056.301-.483.07-.182.105-.3616.105-.539 0-.2333-.021-.4433-.063-.63-.042-.1913-.14-.3523-.294-.483-.1493-.1353-.3733-.238-.672-.308-.294-.0746-.6953-.112-1.204-.112v-1.358c.4247 0 .7724-.035 1.043-.105.2707-.07.483-.168.637-.294.154-.126.259-.2776.315-.455.0607-.1773.091-.371.091-.581 0-.4433-.1166-.7816-.35-1.015-.2286-.2333-.5553-.35-.98-.35-.1866 0-.3593.028-.518.084-.154.0514-.294.1237-.42.217-.1213.0934-.2263.203-.315.329-.0886.126-.154.2637-.196.413-.0886.2334-.203.3897-.343.469-.14.0747-.343.091-.609.049l-1.015-.182z",fill:l})});case"Extras":return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32",children:[h("g",{clipPath:"url(#a)",children:[e("path",{fill:l,fillRule:"evenodd",d:"M6.127 10.454c.224-.032.403-.05.53-.05.591 0 1.137.153 1.63.459.398.239.713.529.94.872l.188-.248.005-.007.006-.006c.619-.703 1.347-1.07 2.178-1.07.691 0 1.269.204 1.71.626.454.403.686.91.686 1.51 0 .533-.156.994-.476 1.37-.312.383-.738.574-1.254.574-.345 0-.643-.101-.878-.317a1.1 1.1 0 0 1-.353-.843c0-.405.11-.76.342-1.051.153-.193.354-.352.596-.479a1.416 1.416 0 0 0-.492-.07c-.195 0-.316.016-.38.035-.53.226-.938.694-1.208 1.445l-.001.003c-.02.05-.085.289-.202.74-.115.443-.275 1.077-.481 1.901-.414 1.641-.633 2.547-.662 2.74l-.002.01a3.423 3.423 0 0 0-.067.673c0 .337.097.581.272.756.176.177.413.272.733.272.6 0 1.15-.247 1.657-.768.518-.549.864-1.146 1.044-1.791l.001-.004a1.2 1.2 0 0 1 .088-.224.368.368 0 0 1 .161-.164.564.564 0 0 1 .198-.056 2.19 2.19 0 0 1 .276-.014c.159 0 .305.016.42.064.059.025.12.063.167.122.05.063.073.137.073.213 0 .023-.004.048-.005.057a12.52 12.52 0 0 1-.046.245l-.004.015c-.281 1.026-.86 1.917-1.73 2.67l-.007.007c-.776.611-1.605.925-2.484.925-1.08 0-1.93-.45-2.53-1.33-.453.605-1.015 1.024-1.685 1.248l-.01.003-.011.002a3.23 3.23 0 0 1-.664.053c-.974 0-1.703-.35-2.13-1.078A2.05 2.05 0 0 1 2 19.437c0-.52.158-.975.478-1.349.326-.38.749-.572 1.252-.572.372 0 .69.091.913.31.224.218.318.531.318.898 0 .327-.078.621-.241.874a1.706 1.706 0 0 1-.707.597l-.018.009c.158.063.331.095.52.095.467 0 .902-.285 1.295-.966l.002-.005c.071-.115.185-.417.341-.938.154-.51.341-1.209.563-2.096v-.002c.095-.364.198-.767.31-1.21.11-.444.188-.78.235-1.014l.002-.013c.058-.216.098-.36.119-.425.077-.42.113-.709.113-.877 0-.342-.092-.588-.254-.762-.159-.171-.384-.267-.704-.267-.652 0-1.217.251-1.704.768l-.002.002A4.215 4.215 0 0 0 3.79 14.28a1.084 1.084 0 0 1-.065.207.41.41 0 0 1-.14.176l-.01.007-.012.006a.35.35 0 0 1-.104.03 1.16 1.16 0 0 1-.095.01 5.04 5.04 0 0 1-.275.006H2.67l-.061-.061c-.109-.11-.204-.247-.204-.41v-.015l.003-.015c.07-.472.335-1.05.768-1.723l.001-.002c.771-1.165 1.754-1.857 2.949-2.042h.002Z",clipRule:"evenodd"}),e("path",{fill:l,d:"M21.084 10.284c.932-.008 2.301-.013 4.107-.013 1.325 0 2.327.003 3.007.007a75.812 75.812 0 0 1 .99.013c.025 0 .047.002.065.003h.002c.01 0 .04.003.067.01l.01.002.011.004c.201.07.37.183.488.347a.966.966 0 0 1 .169.574c0 .3-.078.568-.248.79-.168.221-.411.377-.708.479h-.002a1.01 1.01 0 0 1-.221.034 8.213 8.213 0 0 1-.35.016c-.29.008-.696.012-1.219.012h-1.39l-.038.223v.001c-.198 1.185-.295 2.156-.295 2.916 0 1.446.251 2.746.75 3.905l.004.007c.059.153.105.284.137.393.03.103.053.205.053.29 0 .359-.16.68-.44.961-.278.296-.63.445-1.041.445-.255 0-.492-.03-.654-.139l-.009-.006-.008-.006c-.126-.101-.236-.274-.338-.477l-.006-.012c-.331-.768-.49-1.722-.49-2.852 0-.595.007-1.002.025-1.212v-.005c.118-1.157.377-2.551.776-4.18v-.002c.024-.096.045-.18.061-.25h-1.948c-.008.038-.02.086-.034.143l-.002.007a35.14 35.14 0 0 0-.146.537c-.05.232-.1.448-.15.648v.001a230.673 230.673 0 0 1-1.312 4.936 41.285 41.285 0 0 1-.411 1.384c-.104.322-.19.557-.256.681-.115.262-.28.473-.5.617-.225.146-.49.212-.783.212-.449 0-.807-.173-1.006-.549l-.006-.011-.005-.012a1.37 1.37 0 0 1-.067-.486v-.326l.346-.745c1.24-2.61 2.136-4.858 2.695-6.747l.002-.008.094-.281h-.463c-.662 0-1.105.025-1.346.07-.198.04-.47.173-.824.43l-.007.005-.007.005c-.366.228-.69.542-.97.947-.044.069-.085.13-.125.18a.651.651 0 0 1-.141.136l-.027.017-.03.01a.8.8 0 0 1-.19.03c-.07.005-.156.008-.258.008-.17 0-.335-.021-.465-.09a.437.437 0 0 1-.216-.546c.014-.042.034-.086.057-.132.047-.093.113-.208.198-.343l.003-.005c1.147-1.745 2.311-2.774 3.508-2.96a2.345 2.345 0 0 1 .158-.015 60.295 60.295 0 0 1 1.369-.026Z"})]}),e("defs",{children:e("clipPath",{id:"a",children:e("path",{fill:"#fff",d:"M0 0h28v11.457H0z",transform:"translate(2 10.271)"})})})]});case"Dismiss":return e("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.7071 15.2929C28.3166 14.9024 27.6834 14.9024 27.2929 15.2929L22 20.5858L16.7071 15.2929C16.3166 14.9024 15.6834 14.9024 15.2929 15.2929C14.9024 15.6834 14.9024 16.3166 15.2929 16.7071L20.5858 22L15.2929 27.2929C14.9024 27.6834 14.9024 28.3166 15.2929 28.7071C15.6834 29.0976 16.3166 29.0976 16.7071 28.7071L22 23.4142L27.2929 28.7071C27.6834 29.0976 28.3166 29.0976 28.7071 28.7071C29.0976 28.3166 29.0976 27.6834 28.7071 27.2929L23.4142 22L28.7071 16.7071C29.0976 16.3166 29.0976 15.6834 28.7071 15.2929Z",fill:l})});case"Fractions":return e("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"});default:throw new Error(`Invalid icon type: ${n}`)}};b.__docgenInfo={description:"",methods:[],displayName:"IconAsset",props:{tintColor:{required:!0,tsType:{name:"string"},description:""},type:{required:!0,tsType:{name:"union",raw:`| "Geometry" +import{j as e,a as h}from"./jsx-runtime-FVsy8kgq.js";import{C as w}from"./index-WNT3sUKf.js";import{V as m}from"./index-6h5t6F0w.js";import{c as a}from"./index-deFLJwr4.js";import{l as g}from"./index-awljIyHI.js";import{r as f}from"./index-TT1qJ6UJ.js";const b=function({tintColor:l,type:n}){switch(n){case"Geometry":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.57584 7.09442c.35139-.16458.76626-.11103 1.06434.13737L26.6402 22.2318c.3234.2695.4434.7128.3001 1.1086C26.7969 23.7363 26.421 24 26 24H8c-.55228 0-1-.4477-1-1V8.00001c0-.38802.22446-.74101.57584-.90559zM9 10.1351V17h4c.5523 0 1 .4477 1 1v4h9.238L9 10.1351zM12 22v-3H9v3h3z",fill:l})});case"Operators":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29 6h1v1h-1V6zm-2 0c0-1.10457.8954-2 2-2h1c1.1046 0 2 .89543 2 2v1c0 1.10457-.8954 2-2 2h-1c-1.1046 0-2-.89543-2-2V6zm-15.8682.50386C11.3098 6.19229 11.6411 6 12 6h2c.5523 0 1 .44772 1 1s-.4477 1-1 1h-1.4197l-3.71206 6.4961c-.18297.3202-.52733.5137-.89599.5035-.36865-.0102-.70175-.2225-.86668-.5524l-2-4c-.24699-.49396-.04676-1.09464.44722-1.34163.49397-.24699 1.09465-.04676 1.34164.44722L8.0588 11.8815l3.073-5.37764zM7.70676 16.2925c.39072.3904.39103 1.0235.00069 1.4143-.42202.4224-.86362 1.0235-1.19588 1.659C6.17039 20.0184 6 20.601 6 21c0 .3789.17235.9897.51638 1.6649.33677.661.7685 1.2472 1.15148 1.5908.41106.3689.44528 1.0011.07643 1.4122-.36885.411-1.00109.4452-1.41215.0764-.61604-.5528-1.18431-1.3599-1.5978-2.1715C4.32813 22.7755 3.99999 21.8345 4 21c.00001-.8609.3301-1.7783.73917-2.5608.41798-.7995.97637-1.5684 1.55338-2.146.39033-.3907 1.0235-.391 1.41421-.0007zm3.58644 0c.3908-.3903 1.0239-.39 1.4143.0007.577.5776 1.1353 1.3465 1.5533 2.146C14.6699 19.2217 15 20.1391 15 21c0 .8345-.3281 1.7755-.7343 2.5728-.4135.8116-.9818 1.6187-1.5978 2.1715-.4111.3688-1.0433.3346-1.4122-.0764-.3688-.4111-.3346-1.0433.0764-1.4122.383-.3436.8148-.9298 1.1515-1.5908.344-.6752.5164-1.286.5164-1.6649 0-.399-.1704-.9816-.5116-1.6342-.3322-.6355-.7738-1.2366-1.1959-1.659-.3903-.3908-.39-1.0239.0007-1.4143zm16.6431 1.3564c.1939.5171-.0681 1.0935-.5852 1.2874L21.848 21l5.5031 2.0637c.5171.1939.7791.7703.5852 1.2874-.1939.5171-.7703.7791-1.2874.5852l-8-3C18.2586 21.79 18 21.4168 18 21c0-.4168.2586-.79.6489-.9363l8-3c.5171-.1939 1.0935.0681 1.2874.5852zM21 8v5h3V8h-3zm-1-2c-.5523 0-1 .44772-1 1v7c0 .5523.4477 1 1 1h5c.5523 0 1-.4477 1-1V7c0-.55228-.4477-1-1-1h-5z",fill:l})});case"Numbers":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.4123 19.5794v1.421H4.71434v-1.421h2.016v-5.558c0-.1213.00233-.245.007-.371.00466-.126.01166-.2543.021-.385l-1.33 1.106c-.09334.07-.18434.1144-.273.133-.08867.0187-.17267.021-.252.007-.07934-.0186-.14934-.0466-.21-.084-.06067-.042-.10734-.084-.14-.126l-.609-.819 3.122-2.646h1.589v8.743h1.75696zm8.3801-.35c.21 0 .3734.0584.49.175.1214.1167.182.2707.182.462v1.134h-7.042v-.63c0-.1213.0257-.252.077-.392.0514-.1446.1377-.2753.259-.392l3.01-3.017c.2567-.2566.483-.5016.679-.735.196-.238.3594-.469.49-.693.1307-.2286.2287-.4596.294-.693.0654-.2333.098-.4783.098-.735 0-.4526-.1166-.7956-.35-1.029-.2333-.238-.5623-.357-.987-.357-.1866 0-.3593.028-.518.084-.154.0514-.294.1237-.42.217-.1213.0934-.2263.203-.315.329-.0886.126-.154.2637-.196.413-.084.2334-.1983.3897-.343.469-.14.0747-.3406.091-.602.049l-1.022-.182c.0747-.4946.2147-.9286.42-1.302.2054-.3733.462-.6836.77-.931.308-.2473.6604-.4316 1.057-.553.3967-.126.8237-.189 1.281-.189.4807 0 .917.0724 1.309.217.3967.14.735.3384 1.015.595.28.252.497.5577.651.917.154.3594.231.756.231 1.19 0 .3734-.0536.7187-.161 1.036-.1073.3174-.2543.6207-.441.91-.182.2847-.3943.5624-.637.833-.2426.2707-.4993.5437-.77.819l-2.156 2.205c.238-.07.4737-.1236.707-.161.2334-.042.4527-.063.658-.063h2.282zm2.6611-5.523c.0747-.4946.2147-.9286.42-1.302.2054-.3733.462-.6836.77-.931.308-.2473.658-.4316 1.05-.553.3967-.126.8237-.189 1.281-.189.4854 0 .9194.07 1.302.21.3874.1354.714.322.98.56.266.238.469.5157.609.833.1447.3174.217.658.217 1.022 0 .322-.035.6067-.105.854-.0653.2427-.1656.455-.301.637-.1306.182-.294.336-.49.462-.1913.126-.413.231-.665.315 1.1667.3827 1.75 1.1597 1.75 2.331 0 .518-.0956.9754-.287 1.372-.1913.392-.448.721-.77.987s-.6976.4667-1.127.602c-.4246.1307-.8703.196-1.337.196-.4946 0-.931-.056-1.309-.168-.378-.112-.7116-.28-1.001-.504-.2846-.224-.5296-.504-.735-.84-.2053-.3406-.385-.7373-.539-1.19l.854-.35c.224-.0933.4317-.119.623-.077.196.042.336.1447.42.308.0934.1774.1914.3407.294.49.1074.1494.2264.28.357.392.1307.1074.2777.1914.441.252.168.0607.3594.091.574.091.2707 0 .5064-.0443.707-.133.2007-.0886.3687-.203.504-.343.1354-.1446.2357-.3056.301-.483.07-.182.105-.3616.105-.539 0-.2333-.021-.4433-.063-.63-.042-.1913-.14-.3523-.294-.483-.1493-.1353-.3733-.238-.672-.308-.294-.0746-.6953-.112-1.204-.112v-1.358c.4247 0 .7724-.035 1.043-.105.2707-.07.483-.168.637-.294.154-.126.259-.2776.315-.455.0607-.1773.091-.371.091-.581 0-.4433-.1166-.7816-.35-1.015-.2286-.2333-.5553-.35-.98-.35-.1866 0-.3593.028-.518.084-.154.0514-.294.1237-.42.217-.1213.0934-.2263.203-.315.329-.0886.126-.154.2637-.196.413-.0886.2334-.203.3897-.343.469-.14.0747-.343.091-.609.049l-1.015-.182z",fill:l})});case"Extras":return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32",children:[h("g",{clipPath:"url(#a)",children:[e("path",{fill:l,fillRule:"evenodd",d:"M6.127 10.454c.224-.032.403-.05.53-.05.591 0 1.137.153 1.63.459.398.239.713.529.94.872l.188-.248.005-.007.006-.006c.619-.703 1.347-1.07 2.178-1.07.691 0 1.269.204 1.71.626.454.403.686.91.686 1.51 0 .533-.156.994-.476 1.37-.312.383-.738.574-1.254.574-.345 0-.643-.101-.878-.317a1.1 1.1 0 0 1-.353-.843c0-.405.11-.76.342-1.051.153-.193.354-.352.596-.479a1.416 1.416 0 0 0-.492-.07c-.195 0-.316.016-.38.035-.53.226-.938.694-1.208 1.445l-.001.003c-.02.05-.085.289-.202.74-.115.443-.275 1.077-.481 1.901-.414 1.641-.633 2.547-.662 2.74l-.002.01a3.423 3.423 0 0 0-.067.673c0 .337.097.581.272.756.176.177.413.272.733.272.6 0 1.15-.247 1.657-.768.518-.549.864-1.146 1.044-1.791l.001-.004a1.2 1.2 0 0 1 .088-.224.368.368 0 0 1 .161-.164.564.564 0 0 1 .198-.056 2.19 2.19 0 0 1 .276-.014c.159 0 .305.016.42.064.059.025.12.063.167.122.05.063.073.137.073.213 0 .023-.004.048-.005.057a12.52 12.52 0 0 1-.046.245l-.004.015c-.281 1.026-.86 1.917-1.73 2.67l-.007.007c-.776.611-1.605.925-2.484.925-1.08 0-1.93-.45-2.53-1.33-.453.605-1.015 1.024-1.685 1.248l-.01.003-.011.002a3.23 3.23 0 0 1-.664.053c-.974 0-1.703-.35-2.13-1.078A2.05 2.05 0 0 1 2 19.437c0-.52.158-.975.478-1.349.326-.38.749-.572 1.252-.572.372 0 .69.091.913.31.224.218.318.531.318.898 0 .327-.078.621-.241.874a1.706 1.706 0 0 1-.707.597l-.018.009c.158.063.331.095.52.095.467 0 .902-.285 1.295-.966l.002-.005c.071-.115.185-.417.341-.938.154-.51.341-1.209.563-2.096v-.002c.095-.364.198-.767.31-1.21.11-.444.188-.78.235-1.014l.002-.013c.058-.216.098-.36.119-.425.077-.42.113-.709.113-.877 0-.342-.092-.588-.254-.762-.159-.171-.384-.267-.704-.267-.652 0-1.217.251-1.704.768l-.002.002A4.215 4.215 0 0 0 3.79 14.28a1.084 1.084 0 0 1-.065.207.41.41 0 0 1-.14.176l-.01.007-.012.006a.35.35 0 0 1-.104.03 1.16 1.16 0 0 1-.095.01 5.04 5.04 0 0 1-.275.006H2.67l-.061-.061c-.109-.11-.204-.247-.204-.41v-.015l.003-.015c.07-.472.335-1.05.768-1.723l.001-.002c.771-1.165 1.754-1.857 2.949-2.042h.002Z",clipRule:"evenodd"}),e("path",{fill:l,d:"M21.084 10.284c.932-.008 2.301-.013 4.107-.013 1.325 0 2.327.003 3.007.007a75.812 75.812 0 0 1 .99.013c.025 0 .047.002.065.003h.002c.01 0 .04.003.067.01l.01.002.011.004c.201.07.37.183.488.347a.966.966 0 0 1 .169.574c0 .3-.078.568-.248.79-.168.221-.411.377-.708.479h-.002a1.01 1.01 0 0 1-.221.034 8.213 8.213 0 0 1-.35.016c-.29.008-.696.012-1.219.012h-1.39l-.038.223v.001c-.198 1.185-.295 2.156-.295 2.916 0 1.446.251 2.746.75 3.905l.004.007c.059.153.105.284.137.393.03.103.053.205.053.29 0 .359-.16.68-.44.961-.278.296-.63.445-1.041.445-.255 0-.492-.03-.654-.139l-.009-.006-.008-.006c-.126-.101-.236-.274-.338-.477l-.006-.012c-.331-.768-.49-1.722-.49-2.852 0-.595.007-1.002.025-1.212v-.005c.118-1.157.377-2.551.776-4.18v-.002c.024-.096.045-.18.061-.25h-1.948c-.008.038-.02.086-.034.143l-.002.007a35.14 35.14 0 0 0-.146.537c-.05.232-.1.448-.15.648v.001a230.673 230.673 0 0 1-1.312 4.936 41.285 41.285 0 0 1-.411 1.384c-.104.322-.19.557-.256.681-.115.262-.28.473-.5.617-.225.146-.49.212-.783.212-.449 0-.807-.173-1.006-.549l-.006-.011-.005-.012a1.37 1.37 0 0 1-.067-.486v-.326l.346-.745c1.24-2.61 2.136-4.858 2.695-6.747l.002-.008.094-.281h-.463c-.662 0-1.105.025-1.346.07-.198.04-.47.173-.824.43l-.007.005-.007.005c-.366.228-.69.542-.97.947-.044.069-.085.13-.125.18a.651.651 0 0 1-.141.136l-.027.017-.03.01a.8.8 0 0 1-.19.03c-.07.005-.156.008-.258.008-.17 0-.335-.021-.465-.09a.437.437 0 0 1-.216-.546c.014-.042.034-.086.057-.132.047-.093.113-.208.198-.343l.003-.005c1.147-1.745 2.311-2.774 3.508-2.96a2.345 2.345 0 0 1 .158-.015 60.295 60.295 0 0 1 1.369-.026Z"})]}),e("defs",{children:e("clipPath",{id:"a",children:e("path",{fill:"#fff",d:"M0 0h28v11.457H0z",transform:"translate(2 10.271)"})})})]});case"Dismiss":return e("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.7071 15.2929C28.3166 14.9024 27.6834 14.9024 27.2929 15.2929L22 20.5858L16.7071 15.2929C16.3166 14.9024 15.6834 14.9024 15.2929 15.2929C14.9024 15.6834 14.9024 16.3166 15.2929 16.7071L20.5858 22L15.2929 27.2929C14.9024 27.6834 14.9024 28.3166 15.2929 28.7071C15.6834 29.0976 16.3166 29.0976 16.7071 28.7071L22 23.4142L27.2929 28.7071C27.6834 29.0976 28.3166 29.0976 28.7071 28.7071C29.0976 28.3166 29.0976 27.6834 28.7071 27.2929L23.4142 22L28.7071 16.7071C29.0976 16.3166 29.0976 15.6834 28.7071 15.2929Z",fill:l})});case"Fractions":return e("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"});default:throw new Error(`Invalid icon type: ${n}`)}};b.__docgenInfo={description:"",methods:[],displayName:"IconAsset",props:{tintColor:{required:!0,tsType:{name:"string"},description:""},type:{required:!0,tsType:{name:"union",raw:`| "Geometry" | "Operators" | "Numbers" | "Fractions" diff --git a/assets/item-editor.stories-8ZYPigyF.js b/assets/item-editor.stories-Fm6TNyQq.js similarity index 69% rename from assets/item-editor.stories-8ZYPigyF.js rename to assets/item-editor.stories-Fm6TNyQq.js index cf5f27d7a1..4acbd2bd0d 100644 --- a/assets/item-editor.stories-8ZYPigyF.js +++ b/assets/item-editor.stories-Fm6TNyQq.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as E}from"./index-TT1qJ6UJ.js";import{I as o}from"./item-extras-editor-p-SH0jeI.js";/* empty css */import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";const g=t=>{const{onChange:x,...n}=t,[c,d]=E.useState(n);return s(o,{...c,onChange:m=>{var i;(i=t.onChange)==null||i.call(t,m),d(u=>({...u,...m}))}})},ir={title:"PerseusEditor/Item Extras Editor",component:o,render:t=>s(g,{...t}),argTypes:{onChange:{action:"changed"}}},r={args:{...o.defaultProps}};var p,e,a;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as E}from"./index-TT1qJ6UJ.js";import{I as o}from"./item-extras-editor-DOkMw5hS.js";/* empty css */import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";const g=t=>{const{onChange:x,...n}=t,[c,d]=E.useState(n);return s(o,{...c,onChange:m=>{var i;(i=t.onChange)==null||i.call(t,m),d(u=>({...u,...m}))}})},ir={title:"PerseusEditor/Item Extras Editor",component:o,render:t=>s(g,{...t}),argTypes:{onChange:{action:"changed"}}},r={args:{...o.defaultProps}};var p,e,a;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{ args: { ...ItemExtrasEditor.defaultProps } diff --git a/assets/item-extras-editor-p-SH0jeI.js b/assets/item-extras-editor-DOkMw5hS.js similarity index 92% rename from assets/item-extras-editor-p-SH0jeI.js rename to assets/item-extras-editor-DOkMw5hS.js index e0d7dc6063..50272d24d8 100644 --- a/assets/item-extras-editor-p-SH0jeI.js +++ b/assets/item-extras-editor-DOkMw5hS.js @@ -1 +1 @@ -import{j as a,a as o,F as h}from"./jsx-runtime-FVsy8kgq.js";import{I as u}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as p}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{V as r}from"./index-6h5t6F0w.js";import{C as f}from"./index-QCAhLhLD.js";import{s as d}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as b}from"./index-TT1qJ6UJ.js";const{InfoTip:T}=p,l=class l extends b.Component{constructor(){super(...arguments),this.serialize=()=>{const e={...l.defaultProps};for(const s of u)e[s]=!!this.props[s];return e}}shouldShowFinancialCalculatorOptions(){return this.props.financialCalculatorMonthlyPayment||this.props.financialCalculatorTotalAmount||this.props.financialCalculatorTimeToPayOff}render(){return a("div",{className:"perseus-answer-editor",children:o("div",{className:"perseus-answer-options",children:[a(t,{label:"Show calculator",infoTip:"Use the calculator when completing difficult calculations is NOT the intent of the question. DON’T use the calculator when testing the student’s ability to complete different types of computations.",checked:this.props.calculator,onChange:e=>{this.props.onChange({calculator:e})}}),a(t,{label:"Show financial calculator",infoTip:"This provides the student with the ability to view a financial calculator, e.g., for answering financial questions. Once checked, requires at least one of the three options below to be checked.",checked:this.shouldShowFinancialCalculatorOptions(),onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e,financialCalculatorTotalAmount:e,financialCalculatorTimeToPayOff:e})}}),this.shouldShowFinancialCalculatorOptions()&&o(h,{children:[a(t,{label:"Include monthly payment",infoTip:"This provides the student with the ability to view a monthly payment calculator; e.g., given a loan amount, interest rate, and term, what is the monthly payment?",checked:this.props.financialCalculatorMonthlyPayment,onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e})},indent:!0}),a(t,{label:"Include total amount",infoTip:"This provides the student with the ability to view a total amount calculator; e.g., given a monthly payment, interest rate, and term, what is the total amount to be paid?",checked:this.props.financialCalculatorTotalAmount,onChange:e=>{this.props.onChange({financialCalculatorTotalAmount:e})},indent:!0}),a(t,{label:"Include time-to-pay-off",infoTip:"This provides the student with the ability to view a time to pay off calculator; e.g., given a loan amount, interest rate, and monthly payment, how long will it take to pay off the loan?",checked:this.props.financialCalculatorTimeToPayOff,onChange:e=>{this.props.onChange({financialCalculatorTimeToPayOff:e})},indent:!0})]}),a(t,{label:"Show periodic table",infoTip:"This provides the student with the ability to view a periodic table of the elements, e.g., for answering chemistry questions.",checked:this.props.periodicTable,onChange:e=>{this.props.onChange({periodicTable:e,periodicTableWithKey:!1})}}),this.props.periodicTable&&a(t,{label:"Include key/legend with periodic table",infoTip:"Include a key for HS courses; omit for AP chemistry.",checked:this.props.periodicTableWithKey,onChange:e=>{this.props.onChange({periodicTableWithKey:e})},indent:!0}),a(t,{label:"Show z table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the z distribution, e.g. for answering statistics questions.",checked:this.props.zTable,onChange:e=>{this.props.onChange({zTable:e})}}),a(t,{label:"Show t table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the Student's t distribution, e.g. for answering statistics questions.",checked:this.props.tTable,onChange:e=>{this.props.onChange({tTable:e})}}),a(t,{label:"Show chi-squared table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the chi-squared distribution, e.g. for answering statistics questions.",checked:this.props.chi2Table,onChange:e=>{this.props.onChange({chi2Table:e})}})]})})}};l.defaultProps={calculator:!1,chi2Table:!1,financialCalculatorMonthlyPayment:!1,financialCalculatorTotalAmount:!1,financialCalculatorTimeToPayOff:!1,periodicTable:!1,periodicTableWithKey:!1,tTable:!1,zTable:!1};let n=l;const t=i=>a(r,{style:[c.checkbox,i.indent?c.indented:void 0],children:a(f,{label:o(r,{style:{flexDirection:"row"},children:[i.label," ",a(T,{children:i.infoTip})]}),checked:i.checked,onChange:e=>i.onChange(e)})}),c=m.StyleSheet.create({indented:{marginInlineStart:d.large_24}});n.__docgenInfo={description:"",methods:[{name:"shouldShowFinancialCalculatorOptions",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ItemExtrasEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"PerseusAnswerArea"}],raw:"Partial"},name:"props"}],return:{name:"void"}}},description:""},calculator:{defaultValue:{value:"false",computed:!1},required:!1},chi2Table:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorMonthlyPayment:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTotalAmount:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTimeToPayOff:{defaultValue:{value:"false",computed:!1},required:!1},periodicTable:{defaultValue:{value:"false",computed:!1},required:!1},periodicTableWithKey:{defaultValue:{value:"false",computed:!1},required:!1},tTable:{defaultValue:{value:"false",computed:!1},required:!1},zTable:{defaultValue:{value:"false",computed:!1},required:!1}}};export{n as I}; +import{j as a,a as o,F as h}from"./jsx-runtime-FVsy8kgq.js";import{I as u}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as p}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{V as r}from"./index-6h5t6F0w.js";import{C as f}from"./index-QCAhLhLD.js";import{s as d}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as b}from"./index-TT1qJ6UJ.js";const{InfoTip:T}=p,l=class l extends b.Component{constructor(){super(...arguments),this.serialize=()=>{const e={...l.defaultProps};for(const s of u)e[s]=!!this.props[s];return e}}shouldShowFinancialCalculatorOptions(){return this.props.financialCalculatorMonthlyPayment||this.props.financialCalculatorTotalAmount||this.props.financialCalculatorTimeToPayOff}render(){return a("div",{className:"perseus-answer-editor",children:o("div",{className:"perseus-answer-options",children:[a(t,{label:"Show calculator",infoTip:"Use the calculator when completing difficult calculations is NOT the intent of the question. DON’T use the calculator when testing the student’s ability to complete different types of computations.",checked:this.props.calculator,onChange:e=>{this.props.onChange({calculator:e})}}),a(t,{label:"Show financial calculator",infoTip:"This provides the student with the ability to view a financial calculator, e.g., for answering financial questions. Once checked, requires at least one of the three options below to be checked.",checked:this.shouldShowFinancialCalculatorOptions(),onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e,financialCalculatorTotalAmount:e,financialCalculatorTimeToPayOff:e})}}),this.shouldShowFinancialCalculatorOptions()&&o(h,{children:[a(t,{label:"Include monthly payment",infoTip:"This provides the student with the ability to view a monthly payment calculator; e.g., given a loan amount, interest rate, and term, what is the monthly payment?",checked:this.props.financialCalculatorMonthlyPayment,onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e})},indent:!0}),a(t,{label:"Include total amount",infoTip:"This provides the student with the ability to view a total amount calculator; e.g., given a monthly payment, interest rate, and term, what is the total amount to be paid?",checked:this.props.financialCalculatorTotalAmount,onChange:e=>{this.props.onChange({financialCalculatorTotalAmount:e})},indent:!0}),a(t,{label:"Include time-to-pay-off",infoTip:"This provides the student with the ability to view a time to pay off calculator; e.g., given a loan amount, interest rate, and monthly payment, how long will it take to pay off the loan?",checked:this.props.financialCalculatorTimeToPayOff,onChange:e=>{this.props.onChange({financialCalculatorTimeToPayOff:e})},indent:!0})]}),a(t,{label:"Show periodic table",infoTip:"This provides the student with the ability to view a periodic table of the elements, e.g., for answering chemistry questions.",checked:this.props.periodicTable,onChange:e=>{this.props.onChange({periodicTable:e,periodicTableWithKey:!1})}}),this.props.periodicTable&&a(t,{label:"Include key/legend with periodic table",infoTip:"Include a key for HS courses; omit for AP chemistry.",checked:this.props.periodicTableWithKey,onChange:e=>{this.props.onChange({periodicTableWithKey:e})},indent:!0}),a(t,{label:"Show z table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the z distribution, e.g. for answering statistics questions.",checked:this.props.zTable,onChange:e=>{this.props.onChange({zTable:e})}}),a(t,{label:"Show t table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the Student's t distribution, e.g. for answering statistics questions.",checked:this.props.tTable,onChange:e=>{this.props.onChange({tTable:e})}}),a(t,{label:"Show chi-squared table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the chi-squared distribution, e.g. for answering statistics questions.",checked:this.props.chi2Table,onChange:e=>{this.props.onChange({chi2Table:e})}})]})})}};l.defaultProps={calculator:!1,chi2Table:!1,financialCalculatorMonthlyPayment:!1,financialCalculatorTotalAmount:!1,financialCalculatorTimeToPayOff:!1,periodicTable:!1,periodicTableWithKey:!1,tTable:!1,zTable:!1};let n=l;const t=i=>a(r,{style:[c.checkbox,i.indent?c.indented:void 0],children:a(f,{label:o(r,{style:{flexDirection:"row"},children:[i.label," ",a(T,{children:i.infoTip})]}),checked:i.checked,onChange:e=>i.onChange(e)})}),c=m.StyleSheet.create({indented:{marginInlineStart:d.large_24}});n.__docgenInfo={description:"",methods:[{name:"shouldShowFinancialCalculatorOptions",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ItemExtrasEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"PerseusAnswerArea"}],raw:"Partial"},name:"props"}],return:{name:"void"}}},description:""},calculator:{defaultValue:{value:"false",computed:!1},required:!1},chi2Table:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorMonthlyPayment:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTotalAmount:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTimeToPayOff:{defaultValue:{value:"false",computed:!1},required:!1},periodicTable:{defaultValue:{value:"false",computed:!1},required:!1},periodicTableWithKey:{defaultValue:{value:"false",computed:!1},required:!1},tTable:{defaultValue:{value:"false",computed:!1},required:!1},zTable:{defaultValue:{value:"false",computed:!1},required:!1}}};export{n as I}; diff --git a/assets/keypad-button-rKskH7oM.js b/assets/keypad-button-rKskH7oM.js index f2c7457bae..ad0f0cf8bc 100644 --- a/assets/keypad-button-rKskH7oM.js +++ b/assets/keypad-button-rKskH7oM.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{C as c}from"./index-2dmvOE3q.js";import{V as i}from"./index-6h5t6F0w.js";import{c as t}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{B as g}from"./button-assets-txIojR3b.js";const h=({coord:a,keyConfig:o,onClickKey:s,style:u,secondary:l,action:p})=>{const d=l?"#F6F6F7":p?"#DBDCDD":void 0;return n(i,{style:{gridColumn:a[0]+1,gridRow:a[1]+1,...u},testId:o.id,children:n(c,{onClick:r=>s(o.id,r),onMouseDown:r=>r.preventDefault(),style:e.clickable,"aria-label":o.ariaLabel,children:({hovered:r,focused:y,pressed:b})=>n(i,{style:[e.outerBoxBase],children:n(i,{style:[e.base,d!=null?{background:d}:void 0,r&&e.hovered,y&&e.focused,b&&e.pressed],children:n(g,{id:o.id})})})})})},e=m.StyleSheet.create({base:{display:"flex",justifyContent:"center",alignItems:"center",boxShadow:`0px 1px 0px ${t.offBlack32}`,boxSizing:"border-box",background:t.white,borderRadius:4,borderWidth:2,borderStyle:"solid",borderColor:"transparent",flex:1,minHeight:42,minWidth:42,padding:1,fontFamily:'Lato, "Noto Sans", sans-serif'},hovered:{borderColor:t.blue,padding:1,boxShadow:"none"},focused:{borderColor:t.blue,padding:0,boxShadow:"none"},pressed:{border:"2px solid #1B50B3",padding:0,background:`linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${t.white}`,boxShadow:"none"},outerBoxBase:{padding:1,height:"100%",width:"100%",boxSizing:"border-box",borderRadius:7,border:"2px solid transparent"},clickable:{width:"100%",height:"100%",boxSizing:"border-box",":focus":{outline:"none"}}});h.__docgenInfo={description:"",methods:[],displayName:"KeypadButton",props:{coord:{required:!0,tsType:{name:"unknown"},description:""},keyConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{C as c}from"./index-WNT3sUKf.js";import{V as i}from"./index-6h5t6F0w.js";import{c as t}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{B as g}from"./button-assets-txIojR3b.js";const h=({coord:a,keyConfig:o,onClickKey:s,style:u,secondary:l,action:p})=>{const d=l?"#F6F6F7":p?"#DBDCDD":void 0;return n(i,{style:{gridColumn:a[0]+1,gridRow:a[1]+1,...u},testId:o.id,children:n(c,{onClick:r=>s(o.id,r),onMouseDown:r=>r.preventDefault(),style:e.clickable,"aria-label":o.ariaLabel,children:({hovered:r,focused:y,pressed:b})=>n(i,{style:[e.outerBoxBase],children:n(i,{style:[e.base,d!=null?{background:d}:void 0,r&&e.hovered,y&&e.focused,b&&e.pressed],children:n(g,{id:o.id})})})})})},e=m.StyleSheet.create({base:{display:"flex",justifyContent:"center",alignItems:"center",boxShadow:`0px 1px 0px ${t.offBlack32}`,boxSizing:"border-box",background:t.white,borderRadius:4,borderWidth:2,borderStyle:"solid",borderColor:"transparent",flex:1,minHeight:42,minWidth:42,padding:1,fontFamily:'Lato, "Noto Sans", sans-serif'},hovered:{borderColor:t.blue,padding:1,boxShadow:"none"},focused:{borderColor:t.blue,padding:0,boxShadow:"none"},pressed:{border:"2px solid #1B50B3",padding:0,background:`linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${t.white}`,boxShadow:"none"},outerBoxBase:{padding:1,height:"100%",width:"100%",boxSizing:"border-box",borderRadius:7,border:"2px solid transparent"},clickable:{width:"100%",height:"100%",boxSizing:"border-box",":focus":{outline:"none"}}});h.__docgenInfo={description:"",methods:[],displayName:"KeypadButton",props:{coord:{required:!0,tsType:{name:"unknown"},description:""},keyConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{ id: Key; type: KeyType; icon: IconConfig; diff --git a/assets/keypad-button.stories-tDGMB8WS.js b/assets/keypad-button.stories-tDGMB8WS.js index 2d3485d3b0..cb0f418cbb 100644 --- a/assets/keypad-button.stories-tDGMB8WS.js +++ b/assets/keypad-button.stories-tDGMB8WS.js @@ -1,4 +1,4 @@ -import{j as t,a as g}from"./jsx-runtime-FVsy8kgq.js";import{a as c}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{K as m,m as k}from"./button-assets-txIojR3b.js";import{K as l}from"./keypad-button-rKskH7oM.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-2dmvOE3q.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const a=m(k),E={title:"math-input/components/Keypad Button",args:{keyConfig:a.PLUS,coord:[0,0]},argTypes:{keyConfig:{control:"select",options:{...a}}}},n=({keyConfig:o=m.PLUS,coord:e=[0,0]})=>t("div",{style:{width:200,height:200,backgroundColor:"#DBDCDD",display:"flex"},children:t("div",{style:{width:58,margin:"auto"},children:t(l,{keyConfig:o,coord:e,onClickKey:c("pressed")})})}),r=({...o})=>t("div",{style:{backgroundColor:"#DBDCDD",display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"25px"},children:Object.keys(a).map(e=>g("div",{style:{width:58,margin:"auto",overflowWrap:"break-word"},children:[e,t(l,{keyConfig:a[e],onClickKey:c("pressed"),coord:[0,0]})]},e))});n.__docgenInfo={description:"",methods:[],displayName:"Default",props:{coord:{required:!1,tsType:{name:"unknown"},description:"",defaultValue:{value:"[0, 0]",computed:!1}},keyConfig:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{j as t,a as g}from"./jsx-runtime-FVsy8kgq.js";import{a as c}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{K as m,m as k}from"./button-assets-txIojR3b.js";import{K as l}from"./keypad-button-rKskH7oM.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-WNT3sUKf.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const a=m(k),E={title:"math-input/components/Keypad Button",args:{keyConfig:a.PLUS,coord:[0,0]},argTypes:{keyConfig:{control:"select",options:{...a}}}},n=({keyConfig:o=m.PLUS,coord:e=[0,0]})=>t("div",{style:{width:200,height:200,backgroundColor:"#DBDCDD",display:"flex"},children:t("div",{style:{width:58,margin:"auto"},children:t(l,{keyConfig:o,coord:e,onClickKey:c("pressed")})})}),r=({...o})=>t("div",{style:{backgroundColor:"#DBDCDD",display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"25px"},children:Object.keys(a).map(e=>g("div",{style:{width:58,margin:"auto",overflowWrap:"break-word"},children:[e,t(l,{keyConfig:a[e],onClickKey:c("pressed"),coord:[0,0]})]},e))});n.__docgenInfo={description:"",methods:[],displayName:"Default",props:{coord:{required:!1,tsType:{name:"unknown"},description:"",defaultValue:{value:"[0, 0]",computed:!1}},keyConfig:{required:!1,tsType:{name:"signature",type:"object",raw:`{ id: Key; type: KeyType; icon: IconConfig; diff --git a/assets/keypad-mathquill.stories-anFRYGcO.js b/assets/keypad-mathquill.stories-anFRYGcO.js index 4a87aae3af..e72bcf171d 100644 --- a/assets/keypad-mathquill.stories-anFRYGcO.js +++ b/assets/keypad-mathquill.stories-anFRYGcO.js @@ -1,4 +1,4 @@ -import{a as k,j as n}from"./jsx-runtime-FVsy8kgq.js";import{P as F,a as g}from"./index-BPSWBbj5.js";import{c as K}from"./index-deFLJwr4.js";import{r as o}from"./index-TT1qJ6UJ.js";import{m as v}from"./button-assets-txIojR3b.js";import{C as b,K as M}from"./mobile-keypad-wPUeR8mM.js";import{c as R,g as p,a as S}from"./key-translator-Bl2XtQm9.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-h_CiYGGb.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";const te={title:"math-input/components/v2 Keypad With Mathquill"};function a(){const i=o.useRef(null),[t,h]=o.useState(),[s,l]=o.useState(!0),[y,d]=o.useState(b.NONE);o.useEffect(()=>{if(!t&&i.current){const e=R(i.current,"en",v,r=>({...r,handlers:{edit:x=>{d(p(x))}}}));h(e)}},[t]);const f=S("en",{sin:"sin",cos:"cos",tan:"tan"});function C(e){if(!t)return;e==="DISMISS"&&l(!1);const r=f[e];r?(r(t,e),d(p(t))):console.warn(`No translation to Mathquill for: ${e}`)}return k("div",{style:{maxWidth:"400px",margin:"2em"},children:[n(F,{content:n(g,{style:{padding:10,maxWidth:"initial"},children:n(M,{extraKeys:["x","y","PI","THETA"],onClickKey:C,cursorContext:y,advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!0,preAlgebra:!0,trigonometry:!0,onAnalyticsEvent:async()=>{},showDismiss:!0})}),dismissEnabled:!0,opened:s,children:n("div",{style:{width:"100%",marginBottom:"1em",border:`1px solid ${K.offBlack16}`},ref:i})}),n("button",{onClick:()=>l(!s),children:s?"close keypad":"open keypad"})]})}a.__docgenInfo={description:"",methods:[],displayName:"V2KeypadWithMathquill"};var c,m,u;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`function V2KeypadWithMathquill() { +import{a as k,j as n}from"./jsx-runtime-FVsy8kgq.js";import{P as F,a as g}from"./index-BPSWBbj5.js";import{c as K}from"./index-deFLJwr4.js";import{r as o}from"./index-TT1qJ6UJ.js";import{m as v}from"./button-assets-txIojR3b.js";import{C as b,K as M}from"./mobile-keypad-wPUeR8mM.js";import{c as R,g as p,a as S}from"./key-translator-Bl2XtQm9.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-h_CiYGGb.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";const te={title:"math-input/components/v2 Keypad With Mathquill"};function a(){const i=o.useRef(null),[t,h]=o.useState(),[s,l]=o.useState(!0),[y,d]=o.useState(b.NONE);o.useEffect(()=>{if(!t&&i.current){const e=R(i.current,"en",v,r=>({...r,handlers:{edit:x=>{d(p(x))}}}));h(e)}},[t]);const f=S("en",{sin:"sin",cos:"cos",tan:"tan"});function C(e){if(!t)return;e==="DISMISS"&&l(!1);const r=f[e];r?(r(t,e),d(p(t))):console.warn(`No translation to Mathquill for: ${e}`)}return k("div",{style:{maxWidth:"400px",margin:"2em"},children:[n(F,{content:n(g,{style:{padding:10,maxWidth:"initial"},children:n(M,{extraKeys:["x","y","PI","THETA"],onClickKey:C,cursorContext:y,advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!0,preAlgebra:!0,trigonometry:!0,onAnalyticsEvent:async()=>{},showDismiss:!0})}),dismissEnabled:!0,opened:s,children:n("div",{style:{width:"100%",marginBottom:"1em",border:`1px solid ${K.offBlack16}`},ref:i})}),n("button",{onClick:()=>l(!s),children:s?"close keypad":"open keypad"})]})}a.__docgenInfo={description:"",methods:[],displayName:"V2KeypadWithMathquill"};var c,m,u;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`function V2KeypadWithMathquill() { const mathFieldWrapperRef = React.useRef(null); const [mathField, setMathField] = React.useState(); const [keypadOpen, setKeypadOpen] = React.useState(true); diff --git a/assets/keypad-pages.stories-UYZo0hoJ.js b/assets/keypad-pages.stories-UYZo0hoJ.js index 2a86655245..309cf4a229 100644 --- a/assets/keypad-pages.stories-UYZo0hoJ.js +++ b/assets/keypad-pages.stories-UYZo0hoJ.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as g}from"./index-VDi1Le_1.js";import{N as y,O as I,G as k}from"./operators-page-C_EsmjPW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./index-2dmvOE3q.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const x={title:"math-input/components/Keypad pages",parameters:{backgrounds:{values:[{name:"light background",value:"white",default:!0}]},viewport:{defaultViewport:"iphone6",viewports:g}}},e=()=>o(y,{onClickKey:a("onClickKey")}),r=()=>o(I,{onClickKey:a("onClickKey"),preAlgebra:!0,logarithms:!0,basicRelations:!0,advancedRelations:!0}),t=()=>o(k,{onClickKey:a("onClickKey")});e.__docgenInfo={description:"",methods:[],displayName:"NumericInput"};r.__docgenInfo={description:"",methods:[],displayName:"PreAlgebraInput"};t.__docgenInfo={description:"",methods:[],displayName:"TrigonometryInput"};var i,s,n;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:'(): React.ReactElement => ',...(n=(s=e.parameters)==null?void 0:s.docs)==null?void 0:n.source}}};var c,p,m;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:'(): React.ReactElement => ',...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var u,l,d;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:'(): React.ReactElement => ',...(d=(l=t.parameters)==null?void 0:l.docs)==null?void 0:d.source}}};const G=["NumericInput","PreAlgebraInput","TrigonometryInput"];export{e as NumericInput,r as PreAlgebraInput,t as TrigonometryInput,G as __namedExportsOrder,x as default}; +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as g}from"./index-VDi1Le_1.js";import{N as y,O as I,G as k}from"./operators-page-C_EsmjPW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./index-WNT3sUKf.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const x={title:"math-input/components/Keypad pages",parameters:{backgrounds:{values:[{name:"light background",value:"white",default:!0}]},viewport:{defaultViewport:"iphone6",viewports:g}}},e=()=>o(y,{onClickKey:a("onClickKey")}),r=()=>o(I,{onClickKey:a("onClickKey"),preAlgebra:!0,logarithms:!0,basicRelations:!0,advancedRelations:!0}),t=()=>o(k,{onClickKey:a("onClickKey")});e.__docgenInfo={description:"",methods:[],displayName:"NumericInput"};r.__docgenInfo={description:"",methods:[],displayName:"PreAlgebraInput"};t.__docgenInfo={description:"",methods:[],displayName:"TrigonometryInput"};var i,s,n;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:'(): React.ReactElement => ',...(n=(s=e.parameters)==null?void 0:s.docs)==null?void 0:n.source}}};var c,p,m;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:'(): React.ReactElement => ',...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var u,l,d;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:'(): React.ReactElement => ',...(d=(l=t.parameters)==null?void 0:l.docs)==null?void 0:d.source}}};const G=["NumericInput","PreAlgebraInput","TrigonometryInput"];export{e as NumericInput,r as PreAlgebraInput,t as TrigonometryInput,G as __namedExportsOrder,x as default}; diff --git a/assets/label-image-editor-AWRkHIaL.js b/assets/label-image-editor-kPCp3zRh.js similarity index 87% rename from assets/label-image-editor-AWRkHIaL.js rename to assets/label-image-editor-kPCp3zRh.js index acdc077163..fc58dc3c5f 100644 --- a/assets/label-image-editor-AWRkHIaL.js +++ b/assets/label-image-editor-kPCp3zRh.js @@ -1 +1 @@ -import{a as g,j as i}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import{U as f}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{E as y}from"./editor-jsonify-yjAz4UcO.js";import{l}from"./index-awljIyHI.js";import{r as C}from"./index-TT1qJ6UJ.js";import{F as k}from"./form-wrapped-text-field-A2kf-LD-.js";import{A}from"./answer-choices-IbySI0ZR.js";import{B as v}from"./behavior-Or9dqpn7.js";import{Q as w}from"./question-markers-rbcwtTwt.js";import{S as b}from"./select-image-cPUSf5YP.js";const h=class h extends C.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>{const{choices:e,imageAlt:t,imageUrl:s,markers:a}=this.props,r=[];if(e.length<2&&r.push("Question requires at least two answer choices"),s?t||r.push("Question image has no alt text"):r.push("Image is not specified for question"),!a.length)r.push("Question has no markers, to label answers on image");else{let n=0,o=0;for(const m of a)m.answers.length||n++,m.label||o++;n&&r.push(`Question has ${n} markers with no answers selected`),o&&r.push(`Question has ${o} markers with no ARIA label`)}return r},this.handleImageChange=e=>{this.props.onChange({imageUrl:e,imageWidth:0,imageHeight:0}),e&&f.getImageSize(e,(t,s)=>{this.props.onChange({imageWidth:t,imageHeight:s})})},this.handleAltChange=e=>{this.props.onChange({imageAlt:e})},this.handleChoicesChange=e=>{this.props.onChange({choices:e})},this.handleMarkersChange=e=>{this.props.onChange({markers:e})},this.handleBehaviorChange=e=>{this.props.onChange(e)}}componentDidUpdate(e){const t={};e.markers.forEach(a=>t[`${a.x}.${a.y}`]=a);const s=this.props.markers.map((a,r)=>t.hasOwnProperty(`${a.x}.${a.y}`)?-1:r).filter(a=>a!==-1);s.length&&this._questionMarkers&&this._questionMarkers.openDropdownForMarkerIndices(s)}serialize(){return y.serialize.call(this)}render(){const{choices:e,imageAlt:t,imageUrl:s,imageWidth:a,imageHeight:r,markers:n,multipleAnswers:o,hideChoicesFromInstructions:m}=this.props,c=s&&a>0&&r>0;return g("div",{children:[i(b,{onChange:this.handleImageChange,url:s}),i("div",{className:l.css(p.smallSpacer)}),c&&i(k,{placeholder:"Alt text (for screen readers)",onChange:d=>this.handleAltChange(d.target.value),value:t,width:"100%"}),i("div",{className:l.css(p.largeSpacer)}),i(w,{choices:e,imageUrl:c?s:"",imageWidth:a,imageHeight:r,markers:n,onChange:this.handleMarkersChange,ref:d=>this._questionMarkers=d}),i("div",{className:l.css(p.largeSpacer)}),i(A,{choices:e,onChange:this.handleChoicesChange}),i("div",{className:l.css(p.largeSpacer)}),i(v,{preferredPopoverDirection:"NONE",multipleAnswers:o,hideChoicesFromInstructions:m,onChange:this.handleBehaviorChange})]})}};h.defaultProps={choices:[],imageAlt:"",imageUrl:"",imageWidth:0,imageHeight:0,markers:[],multipleAnswers:!1,hideChoicesFromInstructions:!1},h.widgetName="label-image";let u=h;const p=l.StyleSheet.create({largeSpacer:{height:32},smallSpacer:{height:16}});u.__docgenInfo={description:"",methods:[{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}},{name:"handleImageChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:{name:"string"}}],returns:null},{name:"handleAltChange",docblock:null,modifiers:[],params:[{name:"alt",optional:!1,type:{name:"string"}}],returns:null},{name:"handleChoicesChange",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleMarkersChange",docblock:null,modifiers:[],params:[{name:"markers",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleBehaviorChange",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"LabelImageEditor",props:{choices:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},imageAlt:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageUrl:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},imageHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},markers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},multipleAnswers:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},hideChoicesFromInstructions:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};export{u as L}; +import{a as g,j as i}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import{U as f}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{E as y}from"./editor-jsonify-4Li1SRv8.js";import{l}from"./index-awljIyHI.js";import{r as C}from"./index-TT1qJ6UJ.js";import{F as k}from"./form-wrapped-text-field-A2kf-LD-.js";import{A}from"./answer-choices-Zdsv-TtU.js";import{B as v}from"./behavior-xJJumj3W.js";import{Q as w}from"./question-markers-0U-M3sRj.js";import{S as b}from"./select-image-e-hQhRt5.js";const h=class h extends C.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>{const{choices:e,imageAlt:t,imageUrl:s,markers:a}=this.props,r=[];if(e.length<2&&r.push("Question requires at least two answer choices"),s?t||r.push("Question image has no alt text"):r.push("Image is not specified for question"),!a.length)r.push("Question has no markers, to label answers on image");else{let n=0,o=0;for(const m of a)m.answers.length||n++,m.label||o++;n&&r.push(`Question has ${n} markers with no answers selected`),o&&r.push(`Question has ${o} markers with no ARIA label`)}return r},this.handleImageChange=e=>{this.props.onChange({imageUrl:e,imageWidth:0,imageHeight:0}),e&&f.getImageSize(e,(t,s)=>{this.props.onChange({imageWidth:t,imageHeight:s})})},this.handleAltChange=e=>{this.props.onChange({imageAlt:e})},this.handleChoicesChange=e=>{this.props.onChange({choices:e})},this.handleMarkersChange=e=>{this.props.onChange({markers:e})},this.handleBehaviorChange=e=>{this.props.onChange(e)}}componentDidUpdate(e){const t={};e.markers.forEach(a=>t[`${a.x}.${a.y}`]=a);const s=this.props.markers.map((a,r)=>t.hasOwnProperty(`${a.x}.${a.y}`)?-1:r).filter(a=>a!==-1);s.length&&this._questionMarkers&&this._questionMarkers.openDropdownForMarkerIndices(s)}serialize(){return y.serialize.call(this)}render(){const{choices:e,imageAlt:t,imageUrl:s,imageWidth:a,imageHeight:r,markers:n,multipleAnswers:o,hideChoicesFromInstructions:m}=this.props,c=s&&a>0&&r>0;return g("div",{children:[i(b,{onChange:this.handleImageChange,url:s}),i("div",{className:l.css(p.smallSpacer)}),c&&i(k,{placeholder:"Alt text (for screen readers)",onChange:d=>this.handleAltChange(d.target.value),value:t,width:"100%"}),i("div",{className:l.css(p.largeSpacer)}),i(w,{choices:e,imageUrl:c?s:"",imageWidth:a,imageHeight:r,markers:n,onChange:this.handleMarkersChange,ref:d=>this._questionMarkers=d}),i("div",{className:l.css(p.largeSpacer)}),i(A,{choices:e,onChange:this.handleChoicesChange}),i("div",{className:l.css(p.largeSpacer)}),i(v,{preferredPopoverDirection:"NONE",multipleAnswers:o,hideChoicesFromInstructions:m,onChange:this.handleBehaviorChange})]})}};h.defaultProps={choices:[],imageAlt:"",imageUrl:"",imageWidth:0,imageHeight:0,markers:[],multipleAnswers:!1,hideChoicesFromInstructions:!1},h.widgetName="label-image";let u=h;const p=l.StyleSheet.create({largeSpacer:{height:32},smallSpacer:{height:16}});u.__docgenInfo={description:"",methods:[{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}},{name:"handleImageChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:{name:"string"}}],returns:null},{name:"handleAltChange",docblock:null,modifiers:[],params:[{name:"alt",optional:!1,type:{name:"string"}}],returns:null},{name:"handleChoicesChange",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleMarkersChange",docblock:null,modifiers:[],params:[{name:"markers",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleBehaviorChange",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"LabelImageEditor",props:{choices:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},imageAlt:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageUrl:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},imageHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},markers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},multipleAnswers:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},hideChoicesFromInstructions:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};export{u as L}; diff --git a/assets/label-image-editor.stories-k6syTeEh.js b/assets/label-image-editor.stories-lOm1GQCg.js similarity index 65% rename from assets/label-image-editor.stories-k6syTeEh.js rename to assets/label-image-editor.stories-lOm1GQCg.js index 77f9038fa8..0a14226a3d 100644 --- a/assets/label-image-editor.stories-k6syTeEh.js +++ b/assets/label-image-editor.stories-lOm1GQCg.js @@ -1,3 +1,3 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{l as e}from"./index-awljIyHI.js";import{r as s}from"./index-TT1qJ6UJ.js";import{L as n}from"./label-image-editor-AWRkHIaL.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./editor-jsonify-yjAz4UcO.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-IbySI0ZR.js";import"./components-V6aclUoQ.js";import"./behavior-Or9dqpn7.js";import"./question-markers-rbcwtTwt.js";import"./marker-4IxQ8C94.js";import"./util-qk2aeK8X.js";import"./select-image-cPUSf5YP.js";const st={title:"PerseusEditor/Widgets/Label Image Editor"},l=e.StyleSheet.create({wrapper:{width:338}});class c extends s.Component{constructor(){super(...arguments),this.state={imageAlt:"Map of Europe",choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:["BMW","Volkswagen","Porsche"],label:"Germany",x:37.3,y:53.6},{answers:[],label:"",x:21,y:46},{answers:["Lamborghini","Fiat","Ferrari"],label:"Italy",x:41.4,y:78.8}]}}render(){return o("div",{className:e.css(l.wrapper),children:o(n,{...this.state,onChange:t=>this.setState({...this._widget.serialize(),...t}),ref:t=>this._widget=t})})}}const r=a=>o(c,{});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{l as e}from"./index-awljIyHI.js";import{r as s}from"./index-TT1qJ6UJ.js";import{L as n}from"./label-image-editor-kPCp3zRh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./editor-jsonify-4Li1SRv8.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-Zdsv-TtU.js";import"./components-yT7oveOH.js";import"./behavior-xJJumj3W.js";import"./question-markers-0U-M3sRj.js";import"./marker-de7YvUxA.js";import"./util-qk2aeK8X.js";import"./select-image-e-hQhRt5.js";const st={title:"PerseusEditor/Widgets/Label Image Editor"},l=e.StyleSheet.create({wrapper:{width:338}});class c extends s.Component{constructor(){super(...arguments),this.state={imageAlt:"Map of Europe",choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:["BMW","Volkswagen","Porsche"],label:"Germany",x:37.3,y:53.6},{answers:[],label:"",x:21,y:46},{answers:["Lamborghini","Fiat","Ferrari"],label:"Italy",x:41.4,y:78.8}]}}render(){return o("div",{className:e.css(l.wrapper),children:o(n,{...this.state,onChange:t=>this.setState({...this._widget.serialize(),...t}),ref:t=>this._widget=t})})}}const r=a=>o(c,{});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const nt=["Default"];export{r as Default,nt as __namedExportsOrder,st as default}; diff --git a/assets/label-image.stories-GoAluhxg.js b/assets/label-image.stories-54Ay92n9.js similarity index 89% rename from assets/label-image.stories-GoAluhxg.js rename to assets/label-image.stories-54Ay92n9.js index 6f8e39d5c3..16e057afe8 100644 --- a/assets/label-image.stories-GoAluhxg.js +++ b/assets/label-image.stories-54Ay92n9.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{R as l}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const W={content:`Carol created a chart and a bar graph to show how many of each type of vehicle were in her supermarket parking lot. +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{R as l}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const W={content:`Carol created a chart and a bar graph to show how many of each type of vehicle were in her supermarket parking lot. Vehicle Type | Number in the parking lot :- | :-: diff --git a/assets/labeled-switch-Fn8JZIE3.js b/assets/labeled-switch-zT89YLZ0.js similarity index 94% rename from assets/labeled-switch-Fn8JZIE3.js rename to assets/labeled-switch-zT89YLZ0.js index e700f3d2fe..2d8d11e97e 100644 --- a/assets/labeled-switch-Fn8JZIE3.js +++ b/assets/labeled-switch-zT89YLZ0.js @@ -1 +1 @@ -import{a as n,j as e}from"./jsx-runtime-FVsy8kgq.js";import{u as l,V as c}from"./index-6h5t6F0w.js";import{S as m}from"./index-qUyqkRvh.js";import{S as d}from"./article-renderer-GCz9idJ2.js";import{s as p}from"./index-deFLJwr4.js";import{a as u}from"./index-h_CiYGGb.js";import{l as h}from"./index-awljIyHI.js";const y=r=>{const{checked:s,label:i,style:o,onChange:a}=r,t=l().get("switch");return n(c,{style:[w.row,o],children:[e(d,{id:t,checked:s,onChange:a}),e(m,{size:p.xSmall_8}),e(u,{tag:"label",htmlFor:t,children:i})]})},w=h.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"}});y.__docgenInfo={description:"",methods:[],displayName:"LabeledSwitch",props:{label:{required:!0,tsType:{name:"string"},description:""},checked:{required:!0,tsType:{name:"boolean"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{y as L}; +import{a as n,j as e}from"./jsx-runtime-FVsy8kgq.js";import{u as l,V as c}from"./index-6h5t6F0w.js";import{S as m}from"./index-qUyqkRvh.js";import{S as d}from"./article-renderer-ub6lGcPc.js";import{s as p}from"./index-deFLJwr4.js";import{a as u}from"./index-h_CiYGGb.js";import{l as h}from"./index-awljIyHI.js";const y=r=>{const{checked:s,label:i,style:o,onChange:a}=r,t=l().get("switch");return n(c,{style:[w.row,o],children:[e(d,{id:t,checked:s,onChange:a}),e(m,{size:p.xSmall_8}),e(u,{tag:"label",htmlFor:t,children:i})]})},w=h.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"}});y.__docgenInfo={description:"",methods:[],displayName:"LabeledSwitch",props:{label:{required:!0,tsType:{name:"string"},description:""},checked:{required:!0,tsType:{name:"boolean"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{y as L}; diff --git a/assets/line-stroke-select-OUNHgM-H.js b/assets/line-stroke-select-1i4OFJVH.js similarity index 94% rename from assets/line-stroke-select-OUNHgM-H.js rename to assets/line-stroke-select-1i4OFJVH.js index 7c212e6a60..0c7e908eff 100644 --- a/assets/line-stroke-select-OUNHgM-H.js +++ b/assets/line-stroke-select-1i4OFJVH.js @@ -1 +1 @@ -import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import{S as i,O as a}from"./answer-choices-6SWUlni2.js";import{S as n}from"./index-qUyqkRvh.js";import{s as o}from"./index-deFLJwr4.js";import{a as d}from"./index-h_CiYGGb.js";import{l as m}from"./index-awljIyHI.js";const c=l=>{const{selectedValue:r,onChange:s}=l;return t(d,{tag:"label",style:p.lineStrokeSelect,children:["stroke",e(n,{size:o.xxxSmall_4}),t(i,{selectedValue:r,onChange:s,placeholder:"",children:[e(a,{value:"solid",label:"solid"}),e(a,{value:"dashed",label:"dashed"})]})]})},p=m.StyleSheet.create({lineStrokeSelect:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0}});c.__docgenInfo={description:"",methods:[],displayName:"LineStrokeSelect",props:{selectedValue:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{c as L}; +import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import{S as i,O as a}from"./answer-choices-VNdK7gMK.js";import{S as n}from"./index-qUyqkRvh.js";import{s as o}from"./index-deFLJwr4.js";import{a as d}from"./index-h_CiYGGb.js";import{l as m}from"./index-awljIyHI.js";const c=l=>{const{selectedValue:r,onChange:s}=l;return t(d,{tag:"label",style:p.lineStrokeSelect,children:["stroke",e(n,{size:o.xxxSmall_4}),t(i,{selectedValue:r,onChange:s,placeholder:"",children:[e(a,{value:"solid",label:"solid"}),e(a,{value:"dashed",label:"dashed"})]})]})},p=m.StyleSheet.create({lineStrokeSelect:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0}});c.__docgenInfo={description:"",methods:[],displayName:"LineStrokeSelect",props:{selectedValue:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{c as L}; diff --git a/assets/line-swatch-tbLkNsXV.js b/assets/line-swatch-EI3Byz66.js similarity index 73% rename from assets/line-swatch-tbLkNsXV.js rename to assets/line-swatch-EI3Byz66.js index 623ced43d8..d81990c0d9 100644 --- a/assets/line-swatch-tbLkNsXV.js +++ b/assets/line-swatch-EI3Byz66.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{l}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as i}from"./index-6h5t6F0w.js";import{c as a,s as e}from"./index-deFLJwr4.js";import{l as s}from"./index-awljIyHI.js";const n=p=>{const{color:r,lineStyle:o}=p;return t(i,{style:m.container,children:t(i,{"aria-label":`${r}, ${o}`,style:[m.lineSwatch,{border:`5px ${o} ${l[r]}`}]})})},m=s.StyleSheet.create({container:{backgroundColor:a.white,justifyContent:"center",padding:e.xSmall_8,borderRadius:e.xxxSmall_4},lineSwatch:{width:40}});n.__docgenInfo={description:"",methods:[],displayName:"LineSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},lineStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};export{n as L}; +import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{l}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as i}from"./index-6h5t6F0w.js";import{c as a,s as e}from"./index-deFLJwr4.js";import{l as s}from"./index-awljIyHI.js";const n=p=>{const{color:r,lineStyle:o}=p;return t(i,{style:m.container,children:t(i,{"aria-label":`${r}, ${o}`,style:[m.lineSwatch,{border:`5px ${o} ${l[r]}`}]})})},m=s.StyleSheet.create({container:{backgroundColor:a.white,justifyContent:"center",padding:e.xSmall_8,borderRadius:e.xxxSmall_4},lineSwatch:{width:40}});n.__docgenInfo={description:"",methods:[],displayName:"LineSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},lineStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};export{n as L}; diff --git a/assets/locked-ellipse-settings-2CzQImqt.js b/assets/locked-ellipse-settings-y-e2vVG9.js similarity index 88% rename from assets/locked-ellipse-settings-2CzQImqt.js rename to assets/locked-ellipse-settings-y-e2vVG9.js index 5abe74763b..12b405a2dc 100644 --- a/assets/locked-ellipse-settings-2CzQImqt.js +++ b/assets/locked-ellipse-settings-y-e2vVG9.js @@ -1,4 +1,4 @@ -import{a as m,j as t,F as T}from"./jsx-runtime-FVsy8kgq.js";import{l as $,a as A}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as G}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{B as H}from"./choice-I73s7vIV.js";import{V as u}from"./index-6h5t6F0w.js";import{S as J,O as K}from"./answer-choices-6SWUlni2.js";import{S as c}from"./index-qUyqkRvh.js";import{s,c as S}from"./index-deFLJwr4.js";import{a as w,L as Q}from"./index-h_CiYGGb.js";import{L as X,p as Y}from"./locked-figure-aria-8qS88jMt.js";import{l as k}from"./index-awljIyHI.js";import{r as Z}from"./index-TT1qJ6UJ.js";import{S as ee}from"./scrollless-number-text-field-U5Bx_xXb.js";import{r as I,d as te}from"./util-qk2aeK8X.js";import{P as re,C as _,L as oe,a as ne}from"./locked-label-settings-My12ABKT.js";import{C as ae}from"./color-select-ZBceqrDu.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{L as ie}from"./line-stroke-select-OUNHgM-H.js";import{g as le,a as se}from"./util-w4oIPZJv.js";const E=g=>{const{angle:d,onChange:n}=g,[i,f]=Z.useState(I(d).toString());function y(r){f(r),!(isNaN(+r)||r==="")&&n(te(r))}return m(w,{tag:"label",style:F.row,children:["angle (degrees)",t(c,{size:s.xxSmall_6}),t(ee,{value:i,onChange:y,style:F.textField}),t(c,{size:s.xxSmall_6})]})},F=k.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:s.xxxLarge_64}});E.__docgenInfo={description:"",methods:[],displayName:"AngleInput",props:{angle:{required:!0,tsType:{name:"number"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(angle: number) => void",signature:{arguments:[{type:{name:"number"},name:"angle"}],return:{name:"void"}}},description:""}}};const q=g=>{const{color:d,fillStyle:n,strokeStyle:i}=g;return t(u,{"aria-label":`${d}, stroke ${i}, fill ${n}`,style:[P.container,{border:`4px ${i} ${$[d]}`}],children:t(u,{style:[P.innerCircle,{backgroundColor:$[d],opacity:n==="white"?0:A[n]}]})})},P=k.StyleSheet.create({container:{outline:`2px solid ${S.offWhite}`,borderRadius:"50%",width:s.xLarge_32,height:s.large_24,backgroundColor:S.white,alignItems:"center",justifyContent:"center"},innerCircle:{width:28,height:20,borderRadius:"50%"}});q.__docgenInfo={description:"",methods:[],displayName:"EllipseSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},fillStyle:{required:!0,tsType:{name:"LockedFigureFillType"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const{InfoTip:de}=G,z=g=>{var L,v;const{flags:d,center:n,radius:i,angle:f,color:y,labels:r,ariaLabel:R,fillStyle:C,strokeStyle:x,expanded:O,onToggle:j,onChangeProps:p,onMove:B,onRemove:N}=g;function D(){let e="";r&&r.length>0&&(e+=` ${r.map(b=>b.text).join(", ")}`);const a=i[0]===i[1];let o="";a?o+=`Circle${e} with radius ${i[0]}`:o+=`Ellipse${e} with x radius ${i[0]} and y radius ${i[1]}`,o+=`, centered at (${n[0]}, ${n[1]})`,!a&&f!==0&&(o+=`, rotated by ${I(f)} degrees`);const h=se(y,x,C);return o+=h,o}function U(e){const a=e[0]-n[0],o=e[1]-n[1],h={center:e};h.labels=r==null?void 0:r.map(b=>({...b,coord:[b.coord[0]+a,b.coord[1]+o]})),p(h)}function W(e){const a={color:e};a.labels=r==null?void 0:r.map(o=>({...o,color:e})),p(a)}function M(e,a){if(!r)return;const o=[...r];o[a]={...r[a],...e},p({labels:o})}function V(e){if(!r)return;const a=r.filter((o,h)=>h!==e);p({labels:a})}return m(re,{expanded:O,onToggle:j,header:m(u,{style:l.row,children:[t(Q,{children:`Ellipse (${n[0]}, ${n[1]}), radius ${i[0]}, ${i[1]}`}),t(c,{size:s.xSmall_8}),t(q,{color:g.color,fillStyle:C,strokeStyle:x})]}),children:[m(u,{style:l.row,children:[t(_,{coord:n,style:l.spaceUnder,onChange:U}),t(u,{style:l.spaceUnder,children:t(de,{children:"The coordinates for the center of the ellipse."})})]}),t(_,{coord:i,labels:["x radius","y radius"],style:l.spaceUnder,onChange:e=>p({radius:e})}),t(E,{angle:f,onChange:e=>p({angle:e})}),t(c,{size:s.xSmall_8}),m(u,{style:[l.row,l.spaceUnder],children:[t(ae,{selectedValue:y,onChange:W}),t(c,{size:s.medium_16}),m(w,{tag:"label",style:[l.row,l.truncatedWidth],children:["fill",t(c,{size:s.xxSmall_6}),t(J,{selectedValue:C,onChange:e=>p({fillStyle:e}),placeholder:"",children:Object.keys(A).map(e=>t(K,{value:e,label:e},e))})]})]}),t(ie,{selectedValue:x,onChange:e=>p({strokeStyle:e})}),((L=d==null?void 0:d.mafs)==null?void 0:L["locked-figures-aria"])&&m(T,{children:[t(c,{size:s.small_12}),t(u,{style:l.horizontalRule}),t(X,{ariaLabel:R,prePopulatedAriaLabel:D(),onChangeProps:e=>{p(e)}})]}),((v=d==null?void 0:d.mafs)==null?void 0:v["locked-ellipse-labels"])&&m(T,{children:[t(c,{size:s.xxxSmall_4}),t(u,{style:l.horizontalRule}),t(c,{size:s.small_12}),t(w,{children:"Visible labels"}),r==null?void 0:r.map((e,a)=>t(oe,{...e,expanded:!0,onChangeProps:o=>{M(o,a)},onRemove:()=>{V(a)},containerStyle:l.labelContainer})),t(H,{kind:"tertiary",startIcon:Y,onClick:()=>{const e={...le("label"),coord:[n[0],n[1]-((r==null?void 0:r.length)??0)],color:y};p({labels:[...r??[],e]})},style:l.addButton,children:"Add visible label"})]}),t(ne,{figureType:g.type,onMove:B,onRemove:N})]})},l=k.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:s.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:S.white},horizontalRule:{height:1,backgroundColor:S.offBlack16}}),et=z;z.__docgenInfo={description:"",methods:[],displayName:"LockedEllipseSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{a as m,j as t,F as T}from"./jsx-runtime-FVsy8kgq.js";import{l as $,a as A}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as G}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{B as H}from"./choice-I73s7vIV.js";import{V as u}from"./index-6h5t6F0w.js";import{S as J,O as K}from"./answer-choices-VNdK7gMK.js";import{S as c}from"./index-qUyqkRvh.js";import{s,c as S}from"./index-deFLJwr4.js";import{a as w,L as Q}from"./index-h_CiYGGb.js";import{L as X,p as Y}from"./locked-figure-aria-cizi6QSj.js";import{l as k}from"./index-awljIyHI.js";import{r as Z}from"./index-TT1qJ6UJ.js";import{S as ee}from"./scrollless-number-text-field-U5Bx_xXb.js";import{r as I,d as te}from"./util-qk2aeK8X.js";import{P as re,C as _,L as oe,a as ne}from"./locked-label-settings-7eVXvZDY.js";import{C as ae}from"./color-select-Ou1zrjGq.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{L as ie}from"./line-stroke-select-1i4OFJVH.js";import{g as le,a as se}from"./util-a_JWUtR1.js";const E=g=>{const{angle:d,onChange:n}=g,[i,f]=Z.useState(I(d).toString());function y(r){f(r),!(isNaN(+r)||r==="")&&n(te(r))}return m(w,{tag:"label",style:F.row,children:["angle (degrees)",t(c,{size:s.xxSmall_6}),t(ee,{value:i,onChange:y,style:F.textField}),t(c,{size:s.xxSmall_6})]})},F=k.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:s.xxxLarge_64}});E.__docgenInfo={description:"",methods:[],displayName:"AngleInput",props:{angle:{required:!0,tsType:{name:"number"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(angle: number) => void",signature:{arguments:[{type:{name:"number"},name:"angle"}],return:{name:"void"}}},description:""}}};const q=g=>{const{color:d,fillStyle:n,strokeStyle:i}=g;return t(u,{"aria-label":`${d}, stroke ${i}, fill ${n}`,style:[P.container,{border:`4px ${i} ${$[d]}`}],children:t(u,{style:[P.innerCircle,{backgroundColor:$[d],opacity:n==="white"?0:A[n]}]})})},P=k.StyleSheet.create({container:{outline:`2px solid ${S.offWhite}`,borderRadius:"50%",width:s.xLarge_32,height:s.large_24,backgroundColor:S.white,alignItems:"center",justifyContent:"center"},innerCircle:{width:28,height:20,borderRadius:"50%"}});q.__docgenInfo={description:"",methods:[],displayName:"EllipseSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},fillStyle:{required:!0,tsType:{name:"LockedFigureFillType"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const{InfoTip:de}=G,z=g=>{var L,v;const{flags:d,center:n,radius:i,angle:f,color:y,labels:r,ariaLabel:R,fillStyle:C,strokeStyle:x,expanded:O,onToggle:j,onChangeProps:p,onMove:B,onRemove:N}=g;function D(){let e="";r&&r.length>0&&(e+=` ${r.map(b=>b.text).join(", ")}`);const a=i[0]===i[1];let o="";a?o+=`Circle${e} with radius ${i[0]}`:o+=`Ellipse${e} with x radius ${i[0]} and y radius ${i[1]}`,o+=`, centered at (${n[0]}, ${n[1]})`,!a&&f!==0&&(o+=`, rotated by ${I(f)} degrees`);const h=se(y,x,C);return o+=h,o}function U(e){const a=e[0]-n[0],o=e[1]-n[1],h={center:e};h.labels=r==null?void 0:r.map(b=>({...b,coord:[b.coord[0]+a,b.coord[1]+o]})),p(h)}function W(e){const a={color:e};a.labels=r==null?void 0:r.map(o=>({...o,color:e})),p(a)}function M(e,a){if(!r)return;const o=[...r];o[a]={...r[a],...e},p({labels:o})}function V(e){if(!r)return;const a=r.filter((o,h)=>h!==e);p({labels:a})}return m(re,{expanded:O,onToggle:j,header:m(u,{style:l.row,children:[t(Q,{children:`Ellipse (${n[0]}, ${n[1]}), radius ${i[0]}, ${i[1]}`}),t(c,{size:s.xSmall_8}),t(q,{color:g.color,fillStyle:C,strokeStyle:x})]}),children:[m(u,{style:l.row,children:[t(_,{coord:n,style:l.spaceUnder,onChange:U}),t(u,{style:l.spaceUnder,children:t(de,{children:"The coordinates for the center of the ellipse."})})]}),t(_,{coord:i,labels:["x radius","y radius"],style:l.spaceUnder,onChange:e=>p({radius:e})}),t(E,{angle:f,onChange:e=>p({angle:e})}),t(c,{size:s.xSmall_8}),m(u,{style:[l.row,l.spaceUnder],children:[t(ae,{selectedValue:y,onChange:W}),t(c,{size:s.medium_16}),m(w,{tag:"label",style:[l.row,l.truncatedWidth],children:["fill",t(c,{size:s.xxSmall_6}),t(J,{selectedValue:C,onChange:e=>p({fillStyle:e}),placeholder:"",children:Object.keys(A).map(e=>t(K,{value:e,label:e},e))})]})]}),t(ie,{selectedValue:x,onChange:e=>p({strokeStyle:e})}),((L=d==null?void 0:d.mafs)==null?void 0:L["locked-figures-aria"])&&m(T,{children:[t(c,{size:s.small_12}),t(u,{style:l.horizontalRule}),t(X,{ariaLabel:R,prePopulatedAriaLabel:D(),onChangeProps:e=>{p(e)}})]}),((v=d==null?void 0:d.mafs)==null?void 0:v["locked-ellipse-labels"])&&m(T,{children:[t(c,{size:s.xxxSmall_4}),t(u,{style:l.horizontalRule}),t(c,{size:s.small_12}),t(w,{children:"Visible labels"}),r==null?void 0:r.map((e,a)=>t(oe,{...e,expanded:!0,onChangeProps:o=>{M(o,a)},onRemove:()=>{V(a)},containerStyle:l.labelContainer})),t(H,{kind:"tertiary",startIcon:Y,onClick:()=>{const e={...le("label"),coord:[n[0],n[1]-((r==null?void 0:r.length)??0)],color:y};p({labels:[...r??[],e]})},style:l.addButton,children:"Add visible label"})]}),t(ne,{figureType:g.type,onMove:B,onRemove:N})]})},l=k.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:s.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:S.white},horizontalRule:{height:1,backgroundColor:S.offBlack16}}),et=z;z.__docgenInfo={description:"",methods:[],displayName:"LockedEllipseSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedEllipseType"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (coords, color, etc.) are updated."}}};export{et as L}; diff --git a/assets/locked-ellipse-settings.stories-G6WAoehw.js b/assets/locked-ellipse-settings.stories-0zqKvcVM.js similarity index 74% rename from assets/locked-ellipse-settings.stories-G6WAoehw.js rename to assets/locked-ellipse-settings.stories-0zqKvcVM.js index 342b1bb129..686ee2a148 100644 --- a/assets/locked-ellipse-settings.stories-G6WAoehw.js +++ b/assets/locked-ellipse-settings.stories-0zqKvcVM.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as a}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-ellipse-settings-2CzQImqt.js";import{g as C}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./locked-figure-aria-8qS88jMt.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-My12ABKT.js";import"./color-select-ZBceqrDu.js";import"./line-stroke-select-OUNHgM-H.js";const Eo={title:"PerseusEditor/Components/Locked Ellipse Settings",component:e},r=i=>d(e,{...i}),c={...C("ellipse"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=c;const o={render:function(){const[t,m]=a.useState(c);return d(e,{...t,onChangeProps:n=>{m({...t,...n})}})}};o.parameters={chromatic:{disableSnapshot:!0}};const p={render:function(){const[t,m]=a.useState(!0),[s,n]=a.useState(c);return d(e,{...s,expanded:t,onToggle:m,onChangeProps:R=>{n({...s,...R})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,u,P;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as a}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-ellipse-settings-y-e2vVG9.js";import{g as C}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./locked-figure-aria-cizi6QSj.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-7eVXvZDY.js";import"./color-select-Ou1zrjGq.js";import"./line-stroke-select-1i4OFJVH.js";const Eo={title:"PerseusEditor/Components/Locked Ellipse Settings",component:e},r=i=>d(e,{...i}),c={...C("ellipse"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=c;const o={render:function(){const[t,m]=a.useState(c);return d(e,{...t,onChangeProps:n=>{m({...t,...n})}})}};o.parameters={chromatic:{disableSnapshot:!0}};const p={render:function(){const[t,m]=a.useState(!0),[s,n]=a.useState(c);return d(e,{...s,expanded:t,onToggle:m,onChangeProps:R=>{n({...s,...R})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,u,P;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(P=(u=r.parameters)==null?void 0:u.docs)==null?void 0:P.source}}};var g,f,h;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-figure-aria-8qS88jMt.js b/assets/locked-figure-aria-cizi6QSj.js similarity index 82% rename from assets/locked-figure-aria-8qS88jMt.js rename to assets/locked-figure-aria-cizi6QSj.js index 21b3b56dd5..ccd5481c89 100644 --- a/assets/locked-figure-aria-8qS88jMt.js +++ b/assets/locked-figure-aria-cizi6QSj.js @@ -1 +1 @@ -import{a as r,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{B as u}from"./choice-I73s7vIV.js";import{V as s}from"./index-6h5t6F0w.js";import{a as f}from"./index-QCAhLhLD.js";import{S as i,a as b}from"./index-qUyqkRvh.js";import{c as g,s as t}from"./index-deFLJwr4.js";import{a as h,c as y}from"./index-h_CiYGGb.js";import{l as L}from"./index-awljIyHI.js";import{r as w}from"./index-TT1qJ6UJ.js";const K=""+new URL("plus-circle-MfbD-3cx.svg",import.meta.url).href,x=""+new URL("pencil-circle-IMSnQlOm.svg",import.meta.url).href,{InfoTip:v}=c;function S(l){const{ariaLabel:p,prePopulatedAriaLabel:m,onChangeProps:n}=l,o=`aria-label-${w.useId()}`;return r(s,{children:[e(i,{size:t.xSmall_8}),r(s,{style:a.row,children:[e(h,{tag:"label",htmlFor:o,children:"Aria label"}),e(b,{}),r(v,{children:["Aria label is used by screen readers to describe content to users who may be visually impaired. ",e("br",{}),e("br",{}),"Populating this field will make it so that users can use a screen reader to navigate to this point and hear the description.",e("br",{}),e("br",{}),"If you leave this field blank, the point will be hidden from screen readers. Users will not be able to navigate to this point using a screen reader."]})]}),e(i,{size:t.xxSmall_6}),e(y,{style:a.caption,children:"The figure is hidden from screen readers if this field is left blank."}),e(i,{size:t.xxSmall_6}),e(f,{id:o,value:p??"",onChange:d=>{n({ariaLabel:d||void 0})},placeholder:"Ex. Point at (x, y)",rows:1,resizeType:"vertical"}),e(u,{kind:"tertiary",startIcon:x,style:a.button,onClick:()=>{n({ariaLabel:m})},children:"Auto-generate"})]})}const a=L.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},button:{alignSelf:"start"},caption:{color:g.offBlack64}});S.__docgenInfo={description:"",methods:[],displayName:"LockedFigureAria",props:{ariaLabel:{required:!0,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},prePopulatedAriaLabel:{required:!0,tsType:{name:"string"},description:""},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: {ariaLabel?: string | undefined}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{ariaLabel?: string | undefined}",signature:{properties:[{key:"ariaLabel",value:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}],required:!1}}]}},name:"props"}],return:{name:"void"}}},description:""}}};export{S as L,K as p}; +import{a as r,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{B as u}from"./choice-I73s7vIV.js";import{V as s}from"./index-6h5t6F0w.js";import{a as f}from"./index-QCAhLhLD.js";import{S as i,a as b}from"./index-qUyqkRvh.js";import{c as g,s as t}from"./index-deFLJwr4.js";import{a as h,c as y}from"./index-h_CiYGGb.js";import{l as L}from"./index-awljIyHI.js";import{r as w}from"./index-TT1qJ6UJ.js";const K=""+new URL("plus-circle-MfbD-3cx.svg",import.meta.url).href,x=""+new URL("pencil-circle-IMSnQlOm.svg",import.meta.url).href,{InfoTip:v}=c;function S(l){const{ariaLabel:p,prePopulatedAriaLabel:m,onChangeProps:n}=l,o=`aria-label-${w.useId()}`;return r(s,{children:[e(i,{size:t.xSmall_8}),r(s,{style:a.row,children:[e(h,{tag:"label",htmlFor:o,children:"Aria label"}),e(b,{}),r(v,{children:["Aria label is used by screen readers to describe content to users who may be visually impaired. ",e("br",{}),e("br",{}),"Populating this field will make it so that users can use a screen reader to navigate to this point and hear the description.",e("br",{}),e("br",{}),"If you leave this field blank, the point will be hidden from screen readers. Users will not be able to navigate to this point using a screen reader."]})]}),e(i,{size:t.xxSmall_6}),e(y,{style:a.caption,children:"The figure is hidden from screen readers if this field is left blank."}),e(i,{size:t.xxSmall_6}),e(f,{id:o,value:p??"",onChange:d=>{n({ariaLabel:d||void 0})},placeholder:"Ex. Point at (x, y)",rows:1,resizeType:"vertical"}),e(u,{kind:"tertiary",startIcon:x,style:a.button,onClick:()=>{n({ariaLabel:m})},children:"Auto-generate"})]})}const a=L.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},button:{alignSelf:"start"},caption:{color:g.offBlack64}});S.__docgenInfo={description:"",methods:[],displayName:"LockedFigureAria",props:{ariaLabel:{required:!0,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},prePopulatedAriaLabel:{required:!0,tsType:{name:"string"},description:""},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: {ariaLabel?: string | undefined}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{ariaLabel?: string | undefined}",signature:{properties:[{key:"ariaLabel",value:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}],required:!1}}]}},name:"props"}],return:{name:"void"}}},description:""}}};export{S as L,K as p}; diff --git a/assets/locked-figures-section-MyNRaNP3.js b/assets/locked-figures-section-TPfsudBG.js similarity index 95% rename from assets/locked-figures-section-MyNRaNP3.js rename to assets/locked-figures-section-TPfsudBG.js index 839562b091..2d20b05d35 100644 --- a/assets/locked-figures-section-MyNRaNP3.js +++ b/assets/locked-figures-section-TPfsudBG.js @@ -1,4 +1,4 @@ -import{j as o,a as m,F as O}from"./jsx-runtime-FVsy8kgq.js";import{B as R}from"./choice-I73s7vIV.js";import{V as y,u as _}from"./index-6h5t6F0w.js";import{S as D}from"./index-qUyqkRvh.js";import{s as h,c as W}from"./index-deFLJwr4.js";import{l as L}from"./index-awljIyHI.js";import{r as w}from"./index-TT1qJ6UJ.js";import{H}from"./heading-8aCiuWUg.js";import{a as $,b as M}from"./answer-choices-6SWUlni2.js";import{L as B}from"./locked-ellipse-settings-2CzQImqt.js";import{L as N}from"./locked-function-settings-mVk4KOOh.js";import{L as j}from"./locked-label-settings-My12ABKT.js";import{L as z}from"./locked-line-settings-GmLOdRhN.js";import{L as U}from"./locked-point-settings-75zYMwR0.js";import{L as V}from"./locked-polygon-settings-CLRPaxRY.js";import{L as J}from"./locked-vector-settings-nyZ3gue2.js";import{g as K}from"./util-w4oIPZJv.js";const x=n=>{const{id:g,onChange:s}=n,l=["point","line","vector","ellipse","polygon","function"];return n.showLabelsFlag&&l.push("label"),o(y,{style:b.container,children:o($,{menuText:"Add locked figure",style:b.addElementSelect,children:l.map(d=>o(M,{label:d,onClick:()=>s(d)},`${g}-${d}`))})})},b=L.StyleSheet.create({container:{marginTop:h.xSmall_8},addElementSelect:{backgroundColor:W.fadedBlue8,borderRadius:h.xxxSmall_4}});x.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSelect",props:{showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},id:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};const F=n=>{switch(n.type){case"point":return o(U,{...n});case"line":return o(z,{...n});case"vector":return o(J,{...n});case"ellipse":return o(B,{...n});case"polygon":return o(V,{...n});case"function":return o(N,{...n});case"label":if(n.showLabelsFlag)return o(j,{...n});break}return null};F.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{j as o,a as m,F as O}from"./jsx-runtime-FVsy8kgq.js";import{B as R}from"./choice-I73s7vIV.js";import{V as y,u as _}from"./index-6h5t6F0w.js";import{S as D}from"./index-qUyqkRvh.js";import{s as h,c as W}from"./index-deFLJwr4.js";import{l as L}from"./index-awljIyHI.js";import{r as w}from"./index-TT1qJ6UJ.js";import{H}from"./heading-8aCiuWUg.js";import{a as $,b as M}from"./answer-choices-VNdK7gMK.js";import{L as B}from"./locked-ellipse-settings-y-e2vVG9.js";import{L as N}from"./locked-function-settings-leQQyqbk.js";import{L as j}from"./locked-label-settings-7eVXvZDY.js";import{L as z}from"./locked-line-settings-8WmBPF8G.js";import{L as U}from"./locked-point-settings-dcN0AtwC.js";import{L as V}from"./locked-polygon-settings-5YNPD6lU.js";import{L as J}from"./locked-vector-settings-f_p_9H7b.js";import{g as K}from"./util-a_JWUtR1.js";const x=n=>{const{id:g,onChange:s}=n,l=["point","line","vector","ellipse","polygon","function"];return n.showLabelsFlag&&l.push("label"),o(y,{style:b.container,children:o($,{menuText:"Add locked figure",style:b.addElementSelect,children:l.map(d=>o(M,{label:d,onClick:()=>s(d)},`${g}-${d}`))})})},b=L.StyleSheet.create({container:{marginTop:h.xSmall_8},addElementSelect:{backgroundColor:W.fadedBlue8,borderRadius:h.xxxSmall_4}});x.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSelect",props:{showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},id:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};const F=n=>{switch(n.type){case"point":return o(U,{...n});case"line":return o(z,{...n});case"vector":return o(J,{...n});case"ellipse":return o(B,{...n});case"polygon":return o(V,{...n});case"function":return o(N,{...n});case"label":if(n.showLabelsFlag)return o(j,{...n});break}return null};F.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."}}};const T=n=>{const g=Array((n.figures??[]).length).fill(!1),[s,l]=w.useState(g),[d,S]=w.useState(!0),f=_().get("locked-figures-section"),{figures:t,onChange:u}=n;function q(e){const a={lockedFigures:[...t||[],K(e)]};u(a),l([...s,!0])}function P(e,r){if(e===0&&(r==="back"||r==="backward")||t&&e===t.length-1&&(r==="front"||r==="forward"))return;const i=[...t||[]],p=[...s],[c]=i.splice(e,1);switch(p.splice(e,1),r){case"back":i.unshift(c),p.unshift(!0);break;case"backward":i.splice(e-1,0,c),p.splice(e-1,0,!0);break;case"forward":i.splice(e+1,0,c),p.splice(e+1,0,!0);break;case"front":i.push(c),p.push(!0);break}u({lockedFigures:i}),l(p)}function A(e){if(window.confirm("Are you sure you want to delete this figure?")){const r=t||[];u({lockedFigures:[...r.slice(0,e),...r.slice(e+1)]});const a=[...s];a.splice(e,1),l(a)}}function I(e,r){const a=t||[],i={lockedFigures:[...a.slice(0,e),{...a[e],...r},...a.slice(e+1)]};u(i)}function C(e){l(Array(t==null?void 0:t.length).fill(e))}const k=s.every(e=>!e),E=k?"Expand all":"Collapse all",G=!!(t!=null&&t.length);return m(O,{children:[o(H,{title:"Locked Figures",isOpen:d,onToggle:()=>S(!d),isCollapsible:!0}),d&&m(y,{children:[t==null?void 0:t.map((e,r)=>o(F,{flags:n.flags,showLabelsFlag:n.showLabelsFlag,expanded:s[r],onToggle:a=>{const i=[...s];i[r]=a,l(i)},...e,onChangeProps:a=>I(r,a),onMove:a=>P(r,a),onRemove:()=>A(r)},`${f}-locked-${e}-${r}`)),m(y,{style:v.buttonContainer,children:[o(x,{showLabelsFlag:n.showLabelsFlag,id:`${f}-select`,onChange:q}),o(D,{size:h.small_12}),G&&o(R,{kind:"secondary",onClick:()=>C(k),style:v.button,children:E})]})]})]})},v=L.StyleSheet.create({buttonContainer:{flexDirection:"row",alignItems:"center"},button:{marginTop:h.xSmall_8,flexGrow:1}}),he=T;T.__docgenInfo={description:"",methods:[],displayName:"LockedFiguresSection",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},figures:{required:!1,tsType:{name:"Array",elements:[{name:"LockedFigure"}],raw:"Array"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"signature",type:"object",raw:`{ diff --git a/assets/locked-figures-section.stories-JqJwKMry.js b/assets/locked-figures-section.stories-NIiGztQf.js similarity index 68% rename from assets/locked-figures-section.stories-JqJwKMry.js rename to assets/locked-figures-section.stories-NIiGztQf.js index 4550eddb95..1b777ba472 100644 --- a/assets/locked-figures-section.stories-JqJwKMry.js +++ b/assets/locked-figures-section.stories-NIiGztQf.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{V as y}from"./index-6h5t6F0w.js";import{s as c,c as R}from"./index-deFLJwr4.js";import{l as w}from"./index-awljIyHI.js";import{r as C}from"./index-TT1qJ6UJ.js";import{L as i}from"./locked-figures-section-MyNRaNP3.js";import{g as d}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";import"./answer-choices-6SWUlni2.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./locked-ellipse-settings-2CzQImqt.js";import"./article-renderer-GCz9idJ2.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./locked-figure-aria-8qS88jMt.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-My12ABKT.js";import"./color-select-ZBceqrDu.js";import"./line-stroke-select-OUNHgM-H.js";import"./locked-function-settings-mVk4KOOh.js";import"./line-swatch-tbLkNsXV.js";import"./locked-line-settings-GmLOdRhN.js";import"./locked-point-settings-75zYMwR0.js";import"./labeled-switch-Fn8JZIE3.js";import"./locked-polygon-settings-CLRPaxRY.js";import"./locked-vector-settings-nyZ3gue2.js";const To={title:"PerseusEditor/Components/Locked Figures Section",component:i},r=p=>e(i,{...p});r.args={};const o={render:function(){const[m,s]=C.useState([]);return e(i,{figures:m,onChange:n=>{s(n.lockedFigures)}})}},t={render:function(){const[m,s]=C.useState([d("point"),d("line")]),a=n=>{s(n.lockedFigures)};return e(y,{style:D.prodSizeContainer,children:e(i,{figures:m,onChange:a})})}},U=310,x=10,_=U+2*x,D=w.StyleSheet.create({prodSizeContainer:{width:_,padding:x,marginInlineStart:c.medium_16,border:`1px solid ${R.offBlack32}`,borderRadius:c.xxxSmall_4}});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,g,l;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{V as y}from"./index-6h5t6F0w.js";import{s as c,c as R}from"./index-deFLJwr4.js";import{l as w}from"./index-awljIyHI.js";import{r as C}from"./index-TT1qJ6UJ.js";import{L as i}from"./locked-figures-section-TPfsudBG.js";import{g as d}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";import"./answer-choices-VNdK7gMK.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./locked-ellipse-settings-y-e2vVG9.js";import"./article-renderer-ub6lGcPc.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./locked-figure-aria-cizi6QSj.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-7eVXvZDY.js";import"./color-select-Ou1zrjGq.js";import"./line-stroke-select-1i4OFJVH.js";import"./locked-function-settings-leQQyqbk.js";import"./line-swatch-EI3Byz66.js";import"./locked-line-settings-8WmBPF8G.js";import"./locked-point-settings-dcN0AtwC.js";import"./labeled-switch-zT89YLZ0.js";import"./locked-polygon-settings-5YNPD6lU.js";import"./locked-vector-settings-f_p_9H7b.js";const To={title:"PerseusEditor/Components/Locked Figures Section",component:i},r=p=>e(i,{...p});r.args={};const o={render:function(){const[m,s]=C.useState([]);return e(i,{figures:m,onChange:n=>{s(n.lockedFigures)}})}},t={render:function(){const[m,s]=C.useState([d("point"),d("line")]),a=n=>{s(n.lockedFigures)};return e(y,{style:D.prodSizeContainer,children:e(i,{figures:m,onChange:a})})}},U=310,x=10,_=U+2*x,D=w.StyleSheet.create({prodSizeContainer:{width:_,padding:x,marginInlineStart:c.medium_16,border:`1px solid ${R.offBlack32}`,borderRadius:c.xxxSmall_4}});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,g,l;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(l=(g=r.parameters)==null?void 0:g.docs)==null?void 0:l.source}}};var f,F,S;o.parameters={...o.parameters,docs:{...(f=o.parameters)==null?void 0:f.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-function-settings-mVk4KOOh.js b/assets/locked-function-settings-leQQyqbk.js similarity index 94% rename from assets/locked-function-settings-mVk4KOOh.js rename to assets/locked-function-settings-leQQyqbk.js index 0b352314c5..946ae6c787 100644 --- a/assets/locked-function-settings-mVk4KOOh.js +++ b/assets/locked-function-settings-leQQyqbk.js @@ -1,4 +1,4 @@ -import{a as l,j as a,F as $}from"./jsx-runtime-FVsy8kgq.js";import{B as Z}from"./choice-I73s7vIV.js";import{V as u}from"./index-6h5t6F0w.js";import{S as B,O as F}from"./answer-choices-6SWUlni2.js";import{T as P}from"./index-QCAhLhLD.js";import{P as E,L as ee,a as ae,I as R}from"./locked-label-settings-My12ABKT.js";import{S as c}from"./index-qUyqkRvh.js";import{s,c as b}from"./index-deFLJwr4.js";import{L as D,a as C}from"./index-h_CiYGGb.js";import{L as ne,p as oe}from"./locked-figure-aria-8qS88jMt.js";import{l as I}from"./index-awljIyHI.js";import{r as L}from"./index-TT1qJ6UJ.js";import{C as te}from"./color-select-ZBceqrDu.js";import{L as ie}from"./line-stroke-select-OUNHgM-H.js";import{L as re}from"./line-swatch-tbLkNsXV.js";import{g as le,a as se}from"./util-w4oIPZJv.js";const ce=""+new URL("copy-oXFFmXIn.svg",import.meta.url).href,de=""+new URL("note-pencil-qql72tMF.svg",import.meta.url).href,O={linear:["x + 5","1/2x - 2"],polynomial:["1/2x^2 + 3x - 4","(1/3)x^3 - 2x^2 + 3x - 4"],trigonometric:["sin(x) * 3","arctan(2x) + 4"]},W=x=>{var _,A;const{flags:d,color:p,strokeStyle:y,equation:h,directionalAxis:f,domain:t,labels:i,ariaLabel:j,onChangeProps:m,onMove:H,onRemove:V}=x,T=f==="x"?"y=":"x=",G=`Function (${T}${h})`,[v,q]=L.useState([t&&t[0]!==-1/0?t[0].toString():"",t&&t[1]!==1/0?t[1].toString():""]),[w,N]=L.useState("");L.useEffect(()=>{q([t&&t[0]!==-1/0?t[0].toString():"",t&&t[1]!==1/0?t[1].toString():""])},[t]);function U(){let e="";i&&i.length>0&&(e+=` ${i.map(g=>g.text).join(", ")}`);let o=`Function${e} with equation ${T}${h}`;t&&!(t[0]===-1/0&&t[1]===1/0)&&(o+=`, domain from ${t[0]} to ${t[1]}`);const r=se(p,y);return o+=r,o}function S(e,o){const r={};r[e]=o,m(r)}function z(e,o){const r=[...v];r[e]=o,q(r);const g=t?[...t]:[-1/0,1/0];let k=parseFloat(o);o===""&&e===0?k=-1/0:o===""&&e===1&&(k=1/0),g[e]=k,m({domain:g})}const X=Object.keys(O),M=w!=="",Y=M?O[w]:["Select category to see example equations"];function J(e){const o={color:e};o.labels=i==null?void 0:i.map(r=>({...r,color:e})),m(o)}function K(e,o){if(!i)return;const r=[...i];r[o]={...i[o],...e},m({labels:r})}function Q(e){if(!i)return;const o=i.filter((r,g)=>g!==e);m({labels:o})}return l(E,{expanded:x.expanded,onToggle:x.onToggle,header:l(u,{style:n.row,children:[a(D,{style:n.accordionHeader,children:G}),a(c,{size:s.xSmall_8}),a(re,{color:p,lineStyle:y})]}),children:[l(u,{style:[n.row,n.spaceUnder],children:[a(te,{selectedValue:p,onChange:J}),a(c,{size:s.small_12}),a(ie,{selectedValue:y,onChange:e=>{S("strokeStyle",e)}})]}),l(u,{style:[n.row,n.rowSpace],children:[l(B,{selectedValue:f,onChange:e=>{S("directionalAxis",e)},"aria-label":"equation prefix",style:[n.dropdownLabel,n.axisMenu],placeholder:"",children:[a(F,{value:"x",label:"y ="}),a(F,{value:"y",label:"x ="})]}),a(c,{size:s.xSmall_8}),a(P,{type:"text","aria-label":"equation",value:h,onChange:e=>{S("equation",e)},style:[n.textField]})]}),l(u,{style:[n.row,n.rowSpace],children:[l(C,{tag:"label",style:[n.dropdownLabel,n.domainMin],children:["domain min",a(c,{size:s.xxSmall_6}),a(P,{type:"number",style:n.domainMinField,value:v[0],onChange:e=>{z(0,e)}})]}),a(c,{size:s.medium_16}),l(C,{tag:"label","aria-label":"domain max",style:[n.dropdownLabel,n.domainMax],children:["max",a(c,{size:s.xxSmall_6}),a(P,{type:"number",style:n.domainMaxField,value:v[1],onChange:e=>{z(1,e)}})]})]}),l(E,{header:a(D,{children:"Example Functions"}),expanded:!1,containerStyle:n.exampleWorkspace,panelStyle:n.exampleAccordionPanel,children:[l(C,{tag:"label",style:n.dropdownLabel,children:["Choose a category",a(c,{size:s.xxSmall_6}),a(B,{selectedValue:w,onChange:N,placeholder:"examples",children:X.map(e=>a(F,{value:e,label:e},e))})]}),M&&a("ul",{className:I.css(n.exampleContainer),children:Y.map((e,o)=>a(pe,{category:w,example:e,index:o,pasteEquationFn:S},o))})]}),((_=d==null?void 0:d.mafs)==null?void 0:_["locked-figures-aria"])&&l($,{children:[a(c,{size:s.small_12}),a(u,{style:n.horizontalRule}),a(ne,{ariaLabel:j,prePopulatedAriaLabel:U(),onChangeProps:e=>{m(e)}})]}),((A=d==null?void 0:d.mafs)==null?void 0:A["locked-function-labels"])&&l($,{children:[a(c,{size:s.xxxSmall_4}),a(u,{style:n.horizontalRule}),a(c,{size:s.small_12}),a(C,{children:"Visible labels"}),i==null?void 0:i.map((e,o)=>a(ee,{...e,expanded:!0,onChangeProps:r=>{K(r,o)},onRemove:()=>{Q(o)},containerStyle:n.labelContainer},o)),a(Z,{kind:"tertiary",startIcon:oe,onClick:()=>{const e={...le("label"),coord:[0,-((i==null?void 0:i.length)??0)],color:p};m({labels:[...i??[],e]})},style:n.addButton,children:"Add visible label"})]}),a(ae,{figureType:x.type,onMove:H,onRemove:V})]})},pe=x=>{const{category:d,example:p,index:y,pasteEquationFn:h}=x,f=L.useId();return l("li",{className:I.css(n.exampleRow),children:[a(R,{icon:de,"aria-label":"paste example","aria-describedby":f,onClick:()=>h("equation",p),size:"medium",style:n.copyPasteButton}),a(R,{icon:ce,"aria-label":"copy example","aria-describedby":f,onClick:()=>navigator.clipboard.writeText(p),size:"medium",style:n.copyPasteButton}),a(c,{size:s.xxxSmall_4}),a(u,{style:n.exampleContent,id:f,children:p})]},`${d}-${y}`)},n=I.StyleSheet.create({accordionHeader:{textOverflow:"ellipsis",maxWidth:"calc(100% - 64px)",overflow:"hidden",whiteSpace:"nowrap"},axisMenu:{minWidth:"auto"},copyPasteButton:{flexShrink:"0",margin:"0 2px"},domainMin:{justifyContent:"space-between",width:"calc(((100% - 141px) / 2) + 88.7px)",textWrap:"nowrap"},domainMinField:{width:"calc(100% - 88.7px)"},domainMax:{width:"calc(((100% - 141px) / 2) + 36.2px)"},domainMaxField:{width:"calc(100% - 36.2px)"},dropdownLabel:{alignItems:"center",display:"flex"},exampleAccordionPanel:{alignItems:"start",paddingBottom:"12px",flexDirection:"row",flexWrap:"wrap"},exampleContainer:{background:"white",border:`1px solid ${b.fadedOffBlack16}`,borderRadius:"4px",flexGrow:"1",listStyleType:"none",maxHeight:"88px",margin:"8px 0 0 0",overflowY:"scroll",padding:"4px 12px 4px 4px"},exampleContent:{fontFamily:'"Lato", sans-serif',flexGrow:"1",color:b.offBlack},exampleRow:{alignItems:"center",display:"flex",flexDirection:"row",minHeight:"44px"},exampleWorkspace:{background:b.white50},rowSpace:{marginTop:s.xSmall_8},row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{flexGrow:"1"},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:b.offBlack16},labelContainer:{backgroundColor:b.white}}),Ie=W;W.__docgenInfo={description:"",methods:[],displayName:"LockedFunctionSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{a as l,j as a,F as $}from"./jsx-runtime-FVsy8kgq.js";import{B as Z}from"./choice-I73s7vIV.js";import{V as u}from"./index-6h5t6F0w.js";import{S as B,O as F}from"./answer-choices-VNdK7gMK.js";import{T as P}from"./index-QCAhLhLD.js";import{P as E,L as ee,a as ae,I as R}from"./locked-label-settings-7eVXvZDY.js";import{S as c}from"./index-qUyqkRvh.js";import{s,c as b}from"./index-deFLJwr4.js";import{L as D,a as C}from"./index-h_CiYGGb.js";import{L as ne,p as oe}from"./locked-figure-aria-cizi6QSj.js";import{l as I}from"./index-awljIyHI.js";import{r as L}from"./index-TT1qJ6UJ.js";import{C as te}from"./color-select-Ou1zrjGq.js";import{L as ie}from"./line-stroke-select-1i4OFJVH.js";import{L as re}from"./line-swatch-EI3Byz66.js";import{g as le,a as se}from"./util-a_JWUtR1.js";const ce=""+new URL("copy-oXFFmXIn.svg",import.meta.url).href,de=""+new URL("note-pencil-qql72tMF.svg",import.meta.url).href,O={linear:["x + 5","1/2x - 2"],polynomial:["1/2x^2 + 3x - 4","(1/3)x^3 - 2x^2 + 3x - 4"],trigonometric:["sin(x) * 3","arctan(2x) + 4"]},W=x=>{var _,A;const{flags:d,color:p,strokeStyle:y,equation:h,directionalAxis:f,domain:t,labels:i,ariaLabel:j,onChangeProps:m,onMove:H,onRemove:V}=x,T=f==="x"?"y=":"x=",G=`Function (${T}${h})`,[v,q]=L.useState([t&&t[0]!==-1/0?t[0].toString():"",t&&t[1]!==1/0?t[1].toString():""]),[w,N]=L.useState("");L.useEffect(()=>{q([t&&t[0]!==-1/0?t[0].toString():"",t&&t[1]!==1/0?t[1].toString():""])},[t]);function U(){let e="";i&&i.length>0&&(e+=` ${i.map(g=>g.text).join(", ")}`);let o=`Function${e} with equation ${T}${h}`;t&&!(t[0]===-1/0&&t[1]===1/0)&&(o+=`, domain from ${t[0]} to ${t[1]}`);const r=se(p,y);return o+=r,o}function S(e,o){const r={};r[e]=o,m(r)}function z(e,o){const r=[...v];r[e]=o,q(r);const g=t?[...t]:[-1/0,1/0];let k=parseFloat(o);o===""&&e===0?k=-1/0:o===""&&e===1&&(k=1/0),g[e]=k,m({domain:g})}const X=Object.keys(O),M=w!=="",Y=M?O[w]:["Select category to see example equations"];function J(e){const o={color:e};o.labels=i==null?void 0:i.map(r=>({...r,color:e})),m(o)}function K(e,o){if(!i)return;const r=[...i];r[o]={...i[o],...e},m({labels:r})}function Q(e){if(!i)return;const o=i.filter((r,g)=>g!==e);m({labels:o})}return l(E,{expanded:x.expanded,onToggle:x.onToggle,header:l(u,{style:n.row,children:[a(D,{style:n.accordionHeader,children:G}),a(c,{size:s.xSmall_8}),a(re,{color:p,lineStyle:y})]}),children:[l(u,{style:[n.row,n.spaceUnder],children:[a(te,{selectedValue:p,onChange:J}),a(c,{size:s.small_12}),a(ie,{selectedValue:y,onChange:e=>{S("strokeStyle",e)}})]}),l(u,{style:[n.row,n.rowSpace],children:[l(B,{selectedValue:f,onChange:e=>{S("directionalAxis",e)},"aria-label":"equation prefix",style:[n.dropdownLabel,n.axisMenu],placeholder:"",children:[a(F,{value:"x",label:"y ="}),a(F,{value:"y",label:"x ="})]}),a(c,{size:s.xSmall_8}),a(P,{type:"text","aria-label":"equation",value:h,onChange:e=>{S("equation",e)},style:[n.textField]})]}),l(u,{style:[n.row,n.rowSpace],children:[l(C,{tag:"label",style:[n.dropdownLabel,n.domainMin],children:["domain min",a(c,{size:s.xxSmall_6}),a(P,{type:"number",style:n.domainMinField,value:v[0],onChange:e=>{z(0,e)}})]}),a(c,{size:s.medium_16}),l(C,{tag:"label","aria-label":"domain max",style:[n.dropdownLabel,n.domainMax],children:["max",a(c,{size:s.xxSmall_6}),a(P,{type:"number",style:n.domainMaxField,value:v[1],onChange:e=>{z(1,e)}})]})]}),l(E,{header:a(D,{children:"Example Functions"}),expanded:!1,containerStyle:n.exampleWorkspace,panelStyle:n.exampleAccordionPanel,children:[l(C,{tag:"label",style:n.dropdownLabel,children:["Choose a category",a(c,{size:s.xxSmall_6}),a(B,{selectedValue:w,onChange:N,placeholder:"examples",children:X.map(e=>a(F,{value:e,label:e},e))})]}),M&&a("ul",{className:I.css(n.exampleContainer),children:Y.map((e,o)=>a(pe,{category:w,example:e,index:o,pasteEquationFn:S},o))})]}),((_=d==null?void 0:d.mafs)==null?void 0:_["locked-figures-aria"])&&l($,{children:[a(c,{size:s.small_12}),a(u,{style:n.horizontalRule}),a(ne,{ariaLabel:j,prePopulatedAriaLabel:U(),onChangeProps:e=>{m(e)}})]}),((A=d==null?void 0:d.mafs)==null?void 0:A["locked-function-labels"])&&l($,{children:[a(c,{size:s.xxxSmall_4}),a(u,{style:n.horizontalRule}),a(c,{size:s.small_12}),a(C,{children:"Visible labels"}),i==null?void 0:i.map((e,o)=>a(ee,{...e,expanded:!0,onChangeProps:r=>{K(r,o)},onRemove:()=>{Q(o)},containerStyle:n.labelContainer},o)),a(Z,{kind:"tertiary",startIcon:oe,onClick:()=>{const e={...le("label"),coord:[0,-((i==null?void 0:i.length)??0)],color:p};m({labels:[...i??[],e]})},style:n.addButton,children:"Add visible label"})]}),a(ae,{figureType:x.type,onMove:H,onRemove:V})]})},pe=x=>{const{category:d,example:p,index:y,pasteEquationFn:h}=x,f=L.useId();return l("li",{className:I.css(n.exampleRow),children:[a(R,{icon:de,"aria-label":"paste example","aria-describedby":f,onClick:()=>h("equation",p),size:"medium",style:n.copyPasteButton}),a(R,{icon:ce,"aria-label":"copy example","aria-describedby":f,onClick:()=>navigator.clipboard.writeText(p),size:"medium",style:n.copyPasteButton}),a(c,{size:s.xxxSmall_4}),a(u,{style:n.exampleContent,id:f,children:p})]},`${d}-${y}`)},n=I.StyleSheet.create({accordionHeader:{textOverflow:"ellipsis",maxWidth:"calc(100% - 64px)",overflow:"hidden",whiteSpace:"nowrap"},axisMenu:{minWidth:"auto"},copyPasteButton:{flexShrink:"0",margin:"0 2px"},domainMin:{justifyContent:"space-between",width:"calc(((100% - 141px) / 2) + 88.7px)",textWrap:"nowrap"},domainMinField:{width:"calc(100% - 88.7px)"},domainMax:{width:"calc(((100% - 141px) / 2) + 36.2px)"},domainMaxField:{width:"calc(100% - 36.2px)"},dropdownLabel:{alignItems:"center",display:"flex"},exampleAccordionPanel:{alignItems:"start",paddingBottom:"12px",flexDirection:"row",flexWrap:"wrap"},exampleContainer:{background:"white",border:`1px solid ${b.fadedOffBlack16}`,borderRadius:"4px",flexGrow:"1",listStyleType:"none",maxHeight:"88px",margin:"8px 0 0 0",overflowY:"scroll",padding:"4px 12px 4px 4px"},exampleContent:{fontFamily:'"Lato", sans-serif',flexGrow:"1",color:b.offBlack},exampleRow:{alignItems:"center",display:"flex",flexDirection:"row",minHeight:"44px"},exampleWorkspace:{background:b.white50},rowSpace:{marginTop:s.xSmall_8},row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{flexGrow:"1"},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:b.offBlack16},labelContainer:{backgroundColor:b.white}}),Ie=W;W.__docgenInfo={description:"",methods:[],displayName:"LockedFunctionSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedFunctionType"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (points, color, etc.) are updated."}}};export{Ie as L}; diff --git a/assets/locked-function-settings.stories-eJ0lAJ0A.js b/assets/locked-function-settings.stories-lLWbIv-f.js similarity index 65% rename from assets/locked-function-settings.stories-eJ0lAJ0A.js rename to assets/locked-function-settings.stories-lLWbIv-f.js index 985d7d4a04..95c1898dbc 100644 --- a/assets/locked-function-settings.stories-eJ0lAJ0A.js +++ b/assets/locked-function-settings.stories-lLWbIv-f.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as f}from"./index-TT1qJ6UJ.js";import{L as t}from"./locked-function-settings-mVk4KOOh.js";import{g as P}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./answer-choices-6SWUlni2.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-QCAhLhLD.js";import"./locked-label-settings-My12ABKT.js";import"./article-renderer-GCz9idJ2.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-ZBceqrDu.js";import"./locked-figure-aria-8qS88jMt.js";import"./components-V6aclUoQ.js";import"./line-stroke-select-OUNHgM-H.js";import"./line-swatch-tbLkNsXV.js";const gr={title:"PerseusEditor/Components/Locked Function Settings",component:t},o=p=>d(t,{...p}),u={...P("function"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=u;const r={render:function(){const[i,g]=f.useState(u);return d(t,{...i,expanded:!0,onChangeProps:l=>{g({...i,...l})}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,e,n;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as f}from"./index-TT1qJ6UJ.js";import{L as t}from"./locked-function-settings-leQQyqbk.js";import{g as P}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./answer-choices-VNdK7gMK.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-QCAhLhLD.js";import"./locked-label-settings-7eVXvZDY.js";import"./article-renderer-ub6lGcPc.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-Ou1zrjGq.js";import"./locked-figure-aria-cizi6QSj.js";import"./components-yT7oveOH.js";import"./line-stroke-select-1i4OFJVH.js";import"./line-swatch-EI3Byz66.js";const gr={title:"PerseusEditor/Components/Locked Function Settings",component:t},o=p=>d(t,{...p}),u={...P("function"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=u;const r={render:function(){const[i,g]=f.useState(u);return d(t,{...i,expanded:!0,onChangeProps:l=>{g({...i,...l})}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,e,n;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(n=(e=o.parameters)==null?void 0:e.docs)==null?void 0:n.source}}};var s,a,c;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-functions.stories-GUShDteD.js b/assets/locked-functions.stories-4AJtwUSP.js similarity index 86% rename from assets/locked-functions.stories-GUShDteD.js rename to assets/locked-functions.stories-4AJtwUSP.js index bfebb2f0db..2278ab0b86 100644 --- a/assets/locked-functions.stories-GUShDteD.js +++ b/assets/locked-functions.stories-4AJtwUSP.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as t}from"./renderer-with-debug-ui-Ty_P7koE.js";import{h as o}from"./interactive-graph.testdata-gSWSkezr.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./interactive-graph-question-builder-Mh2lh4tI.js";const Ct={title:"Perseus/Widgets/Interactive Graph/Locked Functions"},r={apiOptions:{flags:{mafs:{segment:!0}}}},i=s=>e(t,{...r,question:o()}),a=s=>e(t,{...r,question:o("x^2",{color:"green",strokeStyle:"dashed"})}),n=s=>e(t,{...r,question:o("y^2",{directionalAxis:"y"})}),m=s=>e(t,{...r,question:o("sin(x)",{domain:[-5,1/0]})}),c=s=>e(t,{...r,question:o("sin(x)",{domain:[-1/0,5]})}),p=s=>e(t,{...r,question:o("sin(x)",{domain:[-5,5]})}),d=s=>e(t,{...r,question:o("x^2 + 2x + 3")}),u=s=>e(t,{...r,question:o("(1/3)x^3 - 2x^2 + 3x - 4")}),g=s=>e(t,{...r,question:o("tan(x)")}),l=s=>e(t,{...r,question:o("arctan(x)")}),h=s=>e(t,{...r,question:o("log(x)")}),R=s=>e(t,{...r,question:o("e^x")}),f=s=>e(t,{...r,question:o("abs(x)")});i.__docgenInfo={description:"",methods:[],displayName:"DefaultSettings"};a.__docgenInfo={description:"",methods:[],displayName:"StyledSettings"};n.__docgenInfo={description:"",methods:[],displayName:"FunctionOfY"};m.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMin"};c.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMax"};p.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedBoth"};d.__docgenInfo={description:"",methods:[],displayName:"Quadratic"};u.__docgenInfo={description:"",methods:[],displayName:"QubicPolynomial"};g.__docgenInfo={description:"",methods:[],displayName:"Tangent"};l.__docgenInfo={description:"",methods:[],displayName:"ArcTangent"};h.__docgenInfo={description:"",methods:[],displayName:"Logarithmic"};R.__docgenInfo={description:"",methods:[],displayName:"Exponent"};f.__docgenInfo={description:"",methods:[],displayName:"AbsoluteValue"};var y,x,S;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(S=(x=i.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var I,W,_;a.parameters={...a.parameters,docs:{...(I=a.parameters)==null?void 0:I.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => e(t,{...r,question:o()}),a=s=>e(t,{...r,question:o("x^2",{color:"green",strokeStyle:"dashed"})}),n=s=>e(t,{...r,question:o("y^2",{directionalAxis:"y"})}),m=s=>e(t,{...r,question:o("sin(x)",{domain:[-5,1/0]})}),c=s=>e(t,{...r,question:o("sin(x)",{domain:[-1/0,5]})}),p=s=>e(t,{...r,question:o("sin(x)",{domain:[-5,5]})}),d=s=>e(t,{...r,question:o("x^2 + 2x + 3")}),u=s=>e(t,{...r,question:o("(1/3)x^3 - 2x^2 + 3x - 4")}),g=s=>e(t,{...r,question:o("tan(x)")}),l=s=>e(t,{...r,question:o("arctan(x)")}),h=s=>e(t,{...r,question:o("log(x)")}),R=s=>e(t,{...r,question:o("e^x")}),f=s=>e(t,{...r,question:o("abs(x)")});i.__docgenInfo={description:"",methods:[],displayName:"DefaultSettings"};a.__docgenInfo={description:"",methods:[],displayName:"StyledSettings"};n.__docgenInfo={description:"",methods:[],displayName:"FunctionOfY"};m.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMin"};c.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMax"};p.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedBoth"};d.__docgenInfo={description:"",methods:[],displayName:"Quadratic"};u.__docgenInfo={description:"",methods:[],displayName:"QubicPolynomial"};g.__docgenInfo={description:"",methods:[],displayName:"Tangent"};l.__docgenInfo={description:"",methods:[],displayName:"ArcTangent"};h.__docgenInfo={description:"",methods:[],displayName:"Logarithmic"};R.__docgenInfo={description:"",methods:[],displayName:"Exponent"};f.__docgenInfo={description:"",methods:[],displayName:"AbsoluteValue"};var y,x,S;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(S=(x=i.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var I,W,_;a.parameters={...a.parameters,docs:{...(I=a.parameters)==null?void 0:I.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => `,...(_=(W=a.parameters)==null?void 0:W.docs)==null?void 0:_.source}}};var q,D,b;n.parameters={...n.parameters,docs:{...(q=n.parameters)==null?void 0:q.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => {const{coord:e,labels:t,error:r,style:n,onChange:o}=i,[d,l]=a.useState([e[0].toString(),e[1].toString()]);a.useEffect(()=>{l([e[0].toString(),e[1].toString()])},[e]);function h(c,m){const v=[...d];if(v[m]=c,l(v),isNaN(+c)||c==="")return;const f=[...e];f[m]=+c,o(f)}return B(M,{style:[W.row,n],children:[B(re,{tag:"label",style:W.row,children:[t?t[0]:"x coord",g(K,{size:u.xxSmall_6}),g(me,{value:d[0],onChange:c=>h(c,0),style:[W.textField,r?W.errorField:void 0]})]}),g(K,{size:u.medium_16}),B(re,{tag:"label",style:W.row,children:[t?t[1]:"y coord",g(K,{size:u.xxSmall_6}),g(me,{value:d[1],onChange:c=>h(c,1),style:[W.textField,r?W.errorField:void 0]})]})]})},W=R.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:u.xxxLarge_64},errorField:{borderColor:s.red,backgroundColor:s.fadedRed8}}),je=xe;xe.__docgenInfo={description:"",methods:[],displayName:"CoordinatePairInput",props:{coord:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},labels:{required:!1,tsType:{name:"tuple",raw:"[string, string]",elements:[{name:"string"},{name:"string"}]},description:""},error:{required:!1,tsType:{name:"boolean"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newCoord: Coord) => void",signature:{arguments:[{type:{name:"Coord"},name:"newCoord"}],return:{name:"void"}}},description:""}}};function G(){return G=Object.assign?Object.assign.bind():function(i){for(var e=1;e=0)&&(t[n]=i[n]);return t}const Ve=["children","id","initialExpandedIndex","allowMultipleExpanded","caretPosition","cornerKind","animated","style"],Qe=ne("ul"),Ge=6;a.forwardRef(function(e,t){const{children:r,id:n,initialExpandedIndex:o,allowMultipleExpanded:d=!0,caretPosition:l,cornerKind:h="rounded",animated:c,style:m}=e,v=ke(e,Ve),f=Array(r.length).fill(!1);o!==void 0&&(f[o]=!0);const[w,S]=a.useState(f),p=Array(r.length).fill(null),C=r.length<=Ge,I=(x,b)=>{const k=d?[...w]:Array(r.length).fill(!1),_=!w[x];k[x]=_,S(k),b&&b(_)},F=x=>{var b,k,_,N;const D=p.findIndex($=>$.current===document.activeElement);if(D!==-1)switch(x.key){case"ArrowUp":x.preventDefault();const $=(D+r.length-1)%r.length;(b=p[$].current)==null||b.focus();break;case"ArrowDown":x.preventDefault();const L=(D+1)%r.length;(k=p[L].current)==null||k.focus();break;case"Home":x.preventDefault(),(_=p[0].current)==null||_.focus();break;case"End":x.preventDefault(),(N=p[r.length-1].current)==null||N.focus();break}};return a.createElement(Qe,G({style:[Xe.wrapper,m],onKeyDown:F},v,{ref:t}),r.map((x,b)=>{const{caretPosition:k,cornerKind:_,onToggle:N,animated:D}=x.props,$=a.createRef();p[b]=$;const T=b===0,L=b===r.length-1;return a.createElement("li",{key:b,id:n},a.cloneElement(x,{animated:D??c,caretPosition:k??l,cornerKind:_??h,expanded:w[b],onToggle:()=>I(b,N),isFirstSection:T,isLastSection:L,isRegion:C,ref:$}))}))});const Xe=R.StyleSheet.create({wrapper:{boxSizing:"border-box",listStyle:"none",padding:0,width:"100%"}});function Je(i,e,t,r){switch(i){case"rounded-per-section":return{roundedTop:!0,roundedBottom:!r};case"rounded":return{roundedTop:e,roundedBottom:t&&!r};default:return{roundedTop:!1,roundedBottom:!1}}}const Ye=a.forwardRef(function(e,t){const{id:r,header:n,caretPosition:o,cornerKind:d,collapsible:l=!0,expanded:h,animated:c,onClick:m,sectionContentUniqueId:v,headerStyle:f,tag:w="h2",testId:S,isFirstSection:p,isLastSection:C}=e,I=typeof n=="string",{roundedTop:F,roundedBottom:x}=Je(d,p,C,h);return a.createElement(Me,{tag:w,style:E.heading},a.createElement(Ae,{id:r,"aria-expanded":h,"aria-controls":v,onClick:m,disabled:!l,testId:S?`${S}-header`:void 0,style:[E.headerWrapper,c&&E.headerWrapperWithAnimation,o==="start"&&E.headerWrapperCaretStart,F&&E.roundedTop,x&&E.roundedBottom,f,!l&&E.disabled],ref:t},()=>a.createElement(a.Fragment,null,a.createElement(M,{style:[E.headerContent,I&&E.headerString]},I?a.createElement(M,{style:[o==="end"?E.headerStringCaretEnd:E.headerStringCaretStart]},n):n),l&&a.createElement(le,{icon:Se,color:s.offBlack64,size:"small",style:[c&&E.iconWithAnimation,o==="start"?E.iconStart:E.iconEnd,h&&E.iconExpanded],testId:S?`${S}-caret-icon`:void 0}))))}),J=u.small_12-1,ge="300ms",E=R.StyleSheet.create({heading:{minWidth:0,marginTop:0},headerWrapper:{display:"flex",flexDirection:"row",alignItems:"center",overflow:"hidden",minWidth:"auto",width:"100%",position:"relative",zIndex:1,":active":{outline:`2px solid ${s.activeBlue}`},":hover":{outline:`2px solid ${s.blue}`},":focus":{boxShadow:`0 0 0 2px ${s.blue}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${s.blue}`}},headerWrapperWithAnimation:{transition:`border-radius ${ge}`},headerWrapperCaretStart:{flexDirection:"row-reverse"},roundedTop:{borderStartStartRadius:J,borderStartEndRadius:J},roundedBottom:{borderEndStartRadius:J,borderEndEndRadius:J},headerContent:{flexGrow:1,textAlign:"start"},headerString:{paddingTop:u.medium_16,paddingBottom:u.medium_16},headerStringCaretEnd:{paddingInlineEnd:u.small_12,paddingInlineStart:u.medium_16},headerStringCaretStart:{paddingInlineEnd:u.medium_16,paddingInlineStart:u.small_12},iconWithAnimation:{transition:`transform ${ge}`},iconExpanded:{transform:"rotate(180deg)"},iconStart:{marginInlineStart:u.medium_16},iconEnd:{marginInlineEnd:u.medium_16},disabled:{pointerEvents:"none",color:"inherit",":focus":{boxShadow:`0 0 0 2px ${s.offBlack32}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${s.offBlack32}`}}}),Ze=["children","id","header","collapsible","expanded","animated","onToggle","caretPosition","cornerKind","style","headerStyle","tag","testId","isFirstSection","isLastSection","isRegion"],et=a.forwardRef(function(e,t){const{children:r,id:n,header:o,collapsible:d,expanded:l,animated:h=!1,onToggle:c,caretPosition:m="end",cornerKind:v="rounded",style:f,headerStyle:w,tag:S,testId:p,isFirstSection:C=!0,isLastSection:I=!0,isRegion:F=!0}=e,x=ke(e,Ze),[b,k]=a.useState(l??!1),_=l!==void 0&&c,N=Fe(),D=n??N.get("accordion-section"),$=n?`${n}-header`:N.get("accordion-section-header"),T=N.get("accordion-section-content"),L=tt(v,C,I),fe=()=>{_?c(!l):(k(!b),c&&c(!b))};let q;return d===!1?q=!0:q=_?l:b,a.createElement(M,G({id:D,style:[A.wrapper,h&&A.wrapperWithAnimation,L.wrapper,q?A.wrapperExpanded:A.wrapperCollapsed,f],testId:p},x),a.createElement(Ye,{id:$,header:o,caretPosition:m,cornerKind:v,collapsible:d,expanded:q,animated:h,onClick:fe,sectionContentUniqueId:T,headerStyle:w,tag:S,testId:p,isFirstSection:C,isLastSection:I,ref:t}),a.createElement(M,{id:T,role:F?"region":void 0,"aria-labelledby":$,style:[A.contentWrapper,q?A.contentWrapperExpanded:A.conentWrapperCollapsed,L.contentWrapper],testId:p?`${p}-content-panel`:void 0},typeof r=="string"?a.createElement(Pe,{style:A.stringContent},r):r))}),A=R.StyleSheet.create({wrapper:{display:"grid",position:"static",boxSizing:"border-box",backgroundColor:s.white},wrapperWithAnimation:{transition:"grid-template-rows 300ms"},wrapperCollapsed:{gridTemplateRows:"min-content 0fr"},wrapperExpanded:{gridTemplateRows:"min-content 1fr"},contentWrapper:{overflow:"hidden"},conentWrapperCollapsed:{visibility:"hidden"},contentWrapperExpanded:{visibility:"visible"},stringContent:{padding:u.medium_16}}),Y={},tt=(i,e,t)=>{const r=`${i}-${e.toString()}-${t.toString()}`;if(Y[r])return Y[r];let n=Object.freeze({}),o=Object.freeze({}),d=Object.freeze({}),l=Object.freeze({});i==="square"&&(n={border:`1px solid ${s.offBlack16}`,borderBottom:"none",borderRadius:0},t&&(l={borderBottom:`1px solid ${s.offBlack16}`})),i==="rounded"&&(n={border:`1px solid ${s.offBlack16}`,borderBottom:"none"},e&&(d={borderStartStartRadius:u.small_12,borderStartEndRadius:u.small_12}),t&&(l={borderBottom:`1px solid ${s.offBlack16}`,borderEndStartRadius:u.small_12,borderEndEndRadius:u.small_12},o={borderEndEndRadius:u.small_12,borderEndStartRadius:u.small_12})),i==="rounded-per-section"&&(n={border:`1px solid ${s.offBlack16}`,borderRadius:u.small_12,marginBottom:u.medium_16},o={borderEndEndRadius:u.small_12,borderEndStartRadius:u.small_12});const h={wrapper:G({},n,d,l),contentWrapper:o};return Y[r]=R.StyleSheet.create(h),Y[r]},Re=i=>{const{children:e,header:t,expanded:r,containerStyle:n,panelStyle:o,onToggle:d}=i;return g(M,{className:"perseus-editor-accordion",children:g(et,{expanded:r,onToggle:d,style:[se.container,n],headerStyle:se.accordionHeader,header:t,children:g(M,{style:[se.accordionPanel,o],children:e})})})},se=R.StyleSheet.create({container:{backgroundColor:s.fadedBlue8,marginTop:u.xSmall_8},accordionHeader:{padding:u.small_12,paddingInlineEnd:0,height:u.xxLarge_48},accordionPanel:{paddingTop:u.xxSmall_6,paddingBottom:u.xxxSmall_4,paddingLeft:u.small_12,paddingRight:u.small_12}}),rt=Re;Re.__docgenInfo={description:"",methods:[],displayName:"PerseusEditorAccordion",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactNode | React.ReactNode[]",elements:[{name:"ReactReactNode",raw:"React.ReactNode"},{name:"Array",elements:[{name:"ReactReactNode",raw:"React.ReactNode"}],raw:"React.ReactNode[]"}]},description:""},header:{required:!0,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement"}]},description:""},expanded:{required:!1,tsType:{name:"boolean"},description:""},containerStyle:{required:!1,tsType:{name:"StyleType"},description:""},panelStyle:{required:!1,tsType:{name:"StyleType"},description:""},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:""}}};function Ee(i){const e=[];if(i)if(Array.isArray(i))for(const t of i)e.push(...Ee(t));else e.push(i);else return e;return e}function Ie(i){const e=[],t=[];if(!i)return{style:{},className:""};const r=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Ee(i).forEach(o=>{const d=o._definition;if(d!=null)if(r){const l={};for(const[h,c]of Object.entries(d))l[h.replace(/-[a-z]/g,m=>m[1].toUpperCase())]=c;t.push(l)}else e.push(o);else t.push(o)});const n=Object.assign({},...t);if(t.length>0&&!r){const o=R.StyleSheet.create({inlineStyles:n});e.push(o.inlineStyles)}return{style:r?n:{},className:R.css(...e)}}const nt=["children","style","tag","testId"],ot=/^h[1-6]$/,ye=R.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});a.forwardRef(function(e,t){let{children:r,style:n,tag:o="span",testId:d}=e,l=V(e,nt);const h=ot.test(o),c=Ie([ye.text,h&&ye.header,n]),m=l.className?[l.className,c.className].join(" "):c.className;return a.createElement(o,y({},l,{style:c.style,className:m,"data-testid":d,ref:t}),r)});const it=["className","style"];function O(i,e){return a.forwardRef((t,r)=>{const{className:n,style:o}=t,d=V(t,it),l=typeof i=="string"?at[i]:null,{className:h,style:c}=Ie([l,e,o]);return a.createElement(i,y({},d,{ref:r,className:[h,n].filter(Boolean).join(" "),style:c}))})}const at=R.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),st=["testId","tag"],X=R.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),lt=O("div",X.default),dt=O("article",X.default),ct=O("aside",X.default),ut=O("nav",X.default),ht=O("section",X.default);a.forwardRef(function(e,t){const{testId:r,tag:n="div"}=e,o=V(e,st),d=y({},o,{"data-testid":r});switch(n){case"article":return a.createElement(dt,y({},d,{ref:t}));case"aside":return a.createElement(ct,y({},d,{ref:t}));case"nav":return a.createElement(ut,y({},d,{ref:t}));case"section":return a.createElement(ht,y({},d,{ref:t}));case"div":return a.createElement(lt,y({},d,{ref:t}));default:throw Error(`${n} is not an allowed value for the 'tag' prop`)}});let z=function(i){return i.Root="root",i.Initial="initial",i.Standard="standard",i}({});const te=a.createContext(z.Root);te.displayName="RenderStateContext";class ft extends a.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:r}=this.props;return this._isTheRootComponent=!0,e?a.createElement(te.Provider,{value:z.Standard},t()):r?a.createElement(te.Provider,{value:z.Initial},r()):null}_maybeRender(e){const{children:t,fallback:r}=this.props;switch(e){case z.Root:return this._renderAsRootComponent();case z.Initial:return r?r():null;case z.Standard:return t()}{var n;return console.log(`We got a render state we don't understand: "${(n=JSON.stringify(e))!=null?n:""}"`),this._maybeRender(z.Root)}}render(){return a.createElement(te.Consumer,null,e=>this._maybeRender(e))}}class oe{constructor(e){this._uniqueFactoryName=void 0,this.get=r=>{const n=r.toLowerCase();if(!this._hasValidIdChars(r))throw new Error(`Invalid identifier key: ${r}`);return`${this._uniqueFactoryName}-${n}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${oe._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}oe._factoryUniquenessCounter=0;class de{get(e){return e}}de.Default=new de;var pt=de.Default;class mt extends a.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:r,scope:n}=this.props;return e?r?t(pt):null:(this._idFactory||(this._idFactory=new oe(n)),t(this._idFactory))}render(){return a.createElement(ft,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class ce extends a.Component{renderChildren(e){const{id:t,children:r}=this.props,n=e?e.get(ce.defaultId):t;if(!n)throw new Error("Did not get an identifier factory nor a id prop");return r(n)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():a.createElement(mt,{scope:t,mockOnFirstRender:!0},r=>this.renderChildren(r))}}ce.defaultId="wb-id";const be=i=>{switch(i){case"link":return{triggerOnEnter:!0,triggerOnSpace:!1};case"checkbox":case"radio":case"listbox":return{triggerOnEnter:!1,triggerOnSpace:!0};case"button":case"menuitem":case"menu":case"option":default:return{triggerOnEnter:!0,triggerOnSpace:!0}}},gt={onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onTouchStart:()=>{},onTouchEnd:()=>{},onTouchCancel:()=>{},onKeyDown:()=>{},onKeyUp:()=>{}},H={enter:13,space:32},ve={hovered:!1,focused:!1,pressed:!1,waiting:!1};class ue extends a.Component{static getDerivedStateFromProps(e,t){return e.disabled?y({},ve,{focused:t.focused}):null}constructor(e){super(e),this.waitingForClick=void 0,this.enterClick=void 0,this.handleClick=t=>{const{onClick:r=void 0,beforeNav:n=void 0,safeWithNav:o=void 0}=this.props;this.enterClick||((r||n||o)&&(this.waitingForClick=!1),this.runCallbackAndMaybeNavigate(t))},this.handleMouseEnter=t=>{this.waitingForClick||this.setState({hovered:!0})},this.handleMouseLeave=()=>{this.waitingForClick||this.setState({hovered:!1,pressed:!1,focused:!1})},this.handleMouseDown=t=>{this.props.onMouseDown&&this.props.onMouseDown(t),this.setState({pressed:!0})},this.handleMouseUp=t=>{this.props.onMouseUp&&this.props.onMouseUp(t),this.setState({pressed:!1,focused:!1})},this.handleTouchStart=()=>{this.setState({pressed:!0})},this.handleTouchEnd=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleTouchCancel=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleKeyDown=t=>{const{onKeyDown:r,role:n}=this.props;r&&r(t);const o=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:l}=be(n);d&&o===H.enter||l&&o===H.space?(t.preventDefault(),this.setState({pressed:!0})):!d&&o===H.enter&&(this.enterClick=!0)},this.handleKeyUp=t=>{const{onKeyUp:r,role:n}=this.props;r&&r(t);const o=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:l}=be(n);d&&o===H.enter||l&&o===H.space?(this.setState({pressed:!1,focused:!0}),this.runCallbackAndMaybeNavigate(t)):!d&&o===H.enter&&(this.enterClick=!1)},this.handleFocus=t=>{const{onFocus:r}=this.props;this.setState({focused:!0},()=>{r&&r(t)})},this.handleBlur=t=>{this.setState({focused:!1,pressed:!1})},this.state=ve,this.waitingForClick=!1,this.enterClick=!1}navigateOrReset(e){if(e){const{history:t,href:r,skipClientNav:n,target:o=void 0}=this.props;r&&(o==="_blank"?(window.open(r,"_blank"),this.setState({waiting:!1})):t&&!n?(t.push(r),this.setState({waiting:!1})):window.location.assign(r))}else this.setState({waiting:!1})}handleSafeWithNav(e,t){const{skipClientNav:r,history:n}=this.props;return n&&!r||this.props.target==="_blank"?(e(),this.navigateOrReset(t),Promise.resolve()):(this.state.waiting||this.setState({waiting:!0}),e().then(()=>{this.state.waiting||this.setState({waiting:!0})}).catch(o=>{}).finally(()=>{this.navigateOrReset(t)}))}runCallbackAndMaybeNavigate(e){const{onClick:t=void 0,beforeNav:r=void 0,safeWithNav:n=void 0,href:o,type:d}=this.props;let l=!0,h=!0;if(t&&t(e),e.defaultPrevented&&(l=!1,h=!1),e.preventDefault(),!o&&d==="submit"&&h){let c=e.currentTarget;for(;c;){if(c instanceof window.HTMLFormElement){const m=new window.Event("submit",{bubbles:!0,cancelable:!0});c.dispatchEvent(m);break}c=c.parentElement}}if(r)this.setState({waiting:!0}),r().then(()=>n?this.handleSafeWithNav(n,l):this.navigateOrReset(l)).catch(()=>{});else{if(n)return this.handleSafeWithNav(n,l);this.navigateOrReset(l)}}render(){const e=this.props.rel||(this.props.target==="_blank"?"noopener noreferrer":void 0),t=this.props.disabled?y({},gt,{onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e}):{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchCancel,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e},{children:r}=this.props;return r&&r(this.state,t)}}ue.defaultProps={disabled:!1};const he=i=>typeof i!="string"?!1:!/^(https?:)?\/\//i.test(i)&&!/^([^#]*#[\w-]*|[\w\-.]+:)/.test(i),yt=ze(ue);function bt(i,e,t){return t&&e!==!0&&i&&he(i)?yt:ue}const vt=["href","onClick","skipClientNav","beforeNav","safeWithNav","style","target","testId","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","hideDefaultFocusRing","light","disabled","tabIndex"],St=O("a"),wt=O("button"),Ct=O(Ce),xt=a.forwardRef(function(e,t){const r=(o,d,l)=>{const h=e.href&&!e.disabled,c=d&&!e.skipClientNav&&he(e.href||"");return h&&c&&e.href?a.createElement(Ct,y({},l,{to:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(o)):h&&!c?a.createElement(St,y({},l,{href:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(o)):a.createElement(wt,y({},l,{type:"button","aria-disabled":e.disabled,ref:t}),e.children(o))},n=o=>{const{href:d,onClick:l,skipClientNav:h,beforeNav:c=void 0,safeWithNav:m=void 0,style:v,target:f=void 0,testId:w,onFocus:S,onKeyDown:p,onKeyUp:C,onMouseDown:I,onMouseUp:F,hideDefaultFocusRing:x,light:b,disabled:k,tabIndex:_}=e,N=V(e,vt),D=bt(d,h,o),$=T=>[Q.reset,Q.link,!x&&T.focused&&(b?Q.focusedLight:Q.focused),k&&Q.disabled,v];return c?a.createElement(D,{href:d,onClick:l,beforeNav:c,safeWithNav:m,onFocus:S,onKeyDown:p,onKeyUp:C,onMouseDown:I,onMouseUp:F,disabled:k,tabIndex:_},(T,L)=>r(T,o,y({},N,{"data-testid":w,style:$(T)},L))):a.createElement(D,{href:d,onClick:l,safeWithNav:m,onFocus:S,onKeyDown:p,onKeyUp:C,onMouseDown:I,onMouseUp:F,target:f,disabled:k,tabIndex:_},(T,L)=>r(T,o,y({},N,{"data-testid":w,style:$(T)},L)))};return a.createElement(we.Consumer,null,o=>n(o))});xt.defaultProps={light:!1,disabled:!1};const Q=R.StyleSheet.create({reset:{border:"none",margin:0,padding:0,width:"auto",overflow:"visible",background:"transparent",textDecoration:"none",color:"inherit",font:"inherit",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",outline:"none",lineHeight:"normal",WebkitFontSmoothing:"inherit",MozOsxFontSmoothing:"inherit"},link:{cursor:"pointer"},focused:{":focus":{outline:`solid 2px ${s.blue}`}},focusedLight:{outline:`solid 2px ${s.white}`},disabled:{color:s.offBlack32,cursor:"not-allowed",":focus":{outline:"none"},":focus-visible":{outline:`solid 2px ${s.blue}`}}}),kt=i=>{switch(i){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Rt=i=>({xsmall:24,small:32,medium:40,large:48})[i],ie={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:s.offBlack32,inverse:s.white50},inverse:s.white,action:{default:s.blue,active:s.activeBlue,inverse:s.fadedBlue},critical:{default:s.red,active:s.activeRed,inverse:s.fadedRed},primary:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed},inverse:{default:s.white,hovered:s.white}},secondary:{default:s.offBlack},tertiary:{default:s.offBlack64},filled:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed}}}},border:{width:{default:U.width.thin,active:U.width.none,hovered:U.width.thin,hoveredInverse:U.width.thin},radius:{default:U.radius.medium_4}}},Et=Ue(ie,{color:{bg:{hovered:s.white,active:s.white64,filled:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed}}},stroke:{action:{inverse:s.eggplant},critical:{inverse:s.eggplant},primary:{action:{hovered:s.eggplant,active:s.eggplant},critical:{hovered:s.eggplant,active:s.eggplant},inverse:{hovered:s.eggplant}},filled:{action:{hovered:s.white,active:s.white},critical:{hovered:s.white,active:s.white}}}},border:{width:{hovered:U.width.none,hoveredInverse:U.width.none}}}),It={default:ie,khanmigo:Et},_e=Ke(ie);function _t(i){var e;const t=a.useContext(He),r=(e=It[t])!=null?e:ie;return a.createElement(_e.Provider,{value:r},i.children)}const Tt=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function $t({icon:i,size:e}){switch(kt(e)){case"small":return a.createElement(le,{size:"small",color:"currentColor",icon:i});case"medium":default:return a.createElement(le,{size:"medium",color:"currentColor",icon:i})}}const Bt=ne("a"),Ft=ne("button"),Nt=ne(Ce),Dt=a.forwardRef(function(e,t){const{color:r,disabled:n,href:o,icon:d,kind:l="primary",light:h=!1,size:c="medium",skipClientNav:m,style:v,testId:f}=e,w=V(e,Tt),{theme:S,themeName:p}=qe(_e),C=I=>{const F=Pt(r,l,h,c,S,p),x=[Lt.shared,F.default,n&&F.disabled],b=a.createElement($t,{size:c,icon:d}),k=y({"data-testid":f,style:[x,v]},w);return o&&!n?I&&!m&&he(o)?a.createElement(Nt,y({},k,{to:o,ref:t}),b):a.createElement(Bt,y({},k,{href:o,ref:t}),b):a.createElement(Ft,y({type:"button"},k,{onClick:n?void 0:w.onClick,"aria-disabled":n,ref:t}),b)};return a.createElement(we.Consumer,null,I=>C(I))}),Lt=R.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),Z={};function Mt(i,e,t,r,n){switch(i){case"primary":const o=n==="destructive"?e.color.stroke.primary.critical.hovered:e.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:e.color.bg.hovered,color:r?e.color.stroke.primary.inverse.hovered:o,outlineColor:r?e.color.stroke.inverse:t,outlineOffset:1,outlineStyle:"solid",outlineWidth:r?e.border.width.hoveredInverse:e.border.width.hovered},":active":{backgroundColor:e.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:n==="destructive"?e.color.bg.filled.critical.hovered:e.color.bg.filled.action.hovered,color:n==="destructive"?e.color.stroke.filled.critical.hovered:e.color.stroke.filled.action.hovered,outlineWidth:e.border.width.active},":active":{backgroundColor:n==="destructive"?e.color.bg.filled.critical.active:e.color.bg.filled.action.active,color:n==="destructive"?e.color.stroke.filled.critical.active:e.color.stroke.filled.action.active,outlineWidth:e.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Pt=(i="default",e,t,r,n,o)=>{const d=i==="destructive"?n.color.stroke.critical.default:n.color.stroke.action.default,l=`${d}-${e}-${t}-${r}-${o}`;if(Z[l])return Z[l];if(t&&e!=="primary")throw new Error("Light is only supported for primary IconButtons");const h=(()=>{switch(e){case"primary":return t?n.color.stroke.primary.inverse.default:d;case"secondary":return n.color.stroke.secondary.default;case"tertiary":return n.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),c=Rt(r),m=Mt(e,n,d,t,i),v=i==="destructive"?n.color.stroke.critical.inverse:n.color.stroke.action.inverse,f=i==="destructive"?n.color.stroke.critical.active:n.color.stroke.action.active,w=t?n.color.stroke.inverse:d,S=t?n.color.stroke.disabled.inverse:n.color.stroke.disabled.default,p={backgroundColor:n.color.bg.disabled,color:S,outlineColor:S},C={default:{height:c,width:c,color:h,borderRadius:n.border.radius.default,":hover":y({boxShadow:"none",color:w,borderRadius:n.border.radius.default,outlineWidth:n.border.width.default},m[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:h,borderRadius:n.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${w}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":y({boxShadow:"none",outlineWidth:n.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},m[":focus-visible"]),":active":y({color:t?v:f,outlineWidth:n.border.width.default,outlineColor:t?v:f,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},m[":active"])},disabled:{color:S,cursor:"not-allowed",":hover":y({},p,{outline:"none"}),":active":y({},p,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${S}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":p}};return Z[l]=R.StyleSheet.create(C),Z[l]},At=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],ee=a.forwardRef(function(e,t){const{color:r="default",disabled:n=!1,href:o,kind:d="primary",light:l=!1,size:h="medium",skipClientNav:c,tabIndex:m,target:v}=e,f=V(e,At);function w(p){const C=p.key;!o&&(C==="Enter"||C==="Space")&&p.preventDefault()}function S(p){const C=p.key;!o&&(C==="Enter"||C==="Space")&&f.onClick&&f.onClick(p)}return a.createElement(_t,null,a.createElement(Dt,y({},f,{color:r,disabled:n,href:o,kind:d,light:l,ref:t,skipClientNav:c,size:h,target:v,tabIndex:m,onKeyDown:w,onKeyUp:S})))}),Ot=""+new URL("caret-double-down-bold-XepWuyCn.svg",import.meta.url).href,Wt=""+new URL("caret-double-up-bold-10VQDgxI.svg",import.meta.url).href,zt=""+new URL("caret-up-bold-0QYBH_hJ.svg",import.meta.url).href,Ut=""+new URL("trash-bold-rak1tQ6r.svg",import.meta.url).href,Te=i=>{const{figureType:e,onMove:t,onRemove:r}=i;return B(M,{style:j.container,children:[g(We,{startIcon:Ut,"aria-label":`Delete locked ${e}`,onClick:r,kind:"tertiary",style:j.deleteButton,children:"Delete"}),t&&B($e,{children:[g(Le,{}),g(ee,{icon:Wt,size:"small","aria-label":`Move locked ${e} to the back`,onClick:()=>t("back"),style:j.iconButton}),g(ee,{icon:zt,size:"small","aria-label":`Move locked ${e} backward`,onClick:()=>t("backward"),style:j.iconButton}),g(ee,{icon:Se,size:"small","aria-label":`Move locked ${e} forward`,onClick:()=>t("forward"),style:j.iconButton}),g(ee,{icon:Ot,size:"small","aria-label":`Move locked ${e} to the front`,onClick:()=>t("front"),style:j.iconButton})]})]})},j=R.StyleSheet.create({container:{width:"100%",flexDirection:"row",alignItems:"center",marginTop:u.xxxSmall_4},deleteButton:{marginInlineStart:-u.xxxSmall_4},iconButton:{margin:0}}),Kt=Te;Te.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSettingsActions",props:{figureType:{required:!0,tsType:{name:"LockedFigureType"},description:""},onMove:{required:!1,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{a as B,j as g,F as $e}from"./jsx-runtime-FVsy8kgq.js";import{l as Be}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as M,b as ne,u as Fe,a as V,_ as y}from"./index-6h5t6F0w.js";import{c as Se,S as Ne,O as ae}from"./answer-choices-VNdK7gMK.js";import{T as De}from"./index-QCAhLhLD.js";import{S as K,a as Le}from"./index-qUyqkRvh.js";import{s as u,c as s,b as U}from"./index-deFLJwr4.js";import{a as re,H as Me,B as Pe,L as pe}from"./index-h_CiYGGb.js";import{l as R}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";import{S as me}from"./scrollless-number-text-field-U5Bx_xXb.js";import{C as Ae}from"./index-o3wWn3Y5.js";import{P as le}from"./index-xuPsLuPk.js";import{C as Oe}from"./color-select-Ou1zrjGq.js";import{B as We}from"./choice-I73s7vIV.js";import{w as ze,c as we,L as Ce}from"./react-router-dom-W_e8xVUu.js";import{m as Ue,c as Ke,u as qe,T as He}from"./index-rfN0X25E.js";const xe=i=>{const{coord:e,labels:t,error:r,style:n,onChange:o}=i,[d,l]=a.useState([e[0].toString(),e[1].toString()]);a.useEffect(()=>{l([e[0].toString(),e[1].toString()])},[e]);function h(c,m){const v=[...d];if(v[m]=c,l(v),isNaN(+c)||c==="")return;const f=[...e];f[m]=+c,o(f)}return B(M,{style:[W.row,n],children:[B(re,{tag:"label",style:W.row,children:[t?t[0]:"x coord",g(K,{size:u.xxSmall_6}),g(me,{value:d[0],onChange:c=>h(c,0),style:[W.textField,r?W.errorField:void 0]})]}),g(K,{size:u.medium_16}),B(re,{tag:"label",style:W.row,children:[t?t[1]:"y coord",g(K,{size:u.xxSmall_6}),g(me,{value:d[1],onChange:c=>h(c,1),style:[W.textField,r?W.errorField:void 0]})]})]})},W=R.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:u.xxxLarge_64},errorField:{borderColor:s.red,backgroundColor:s.fadedRed8}}),je=xe;xe.__docgenInfo={description:"",methods:[],displayName:"CoordinatePairInput",props:{coord:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},labels:{required:!1,tsType:{name:"tuple",raw:"[string, string]",elements:[{name:"string"},{name:"string"}]},description:""},error:{required:!1,tsType:{name:"boolean"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newCoord: Coord) => void",signature:{arguments:[{type:{name:"Coord"},name:"newCoord"}],return:{name:"void"}}},description:""}}};function G(){return G=Object.assign?Object.assign.bind():function(i){for(var e=1;e=0)&&(t[n]=i[n]);return t}const Ve=["children","id","initialExpandedIndex","allowMultipleExpanded","caretPosition","cornerKind","animated","style"],Qe=ne("ul"),Ge=6;a.forwardRef(function(e,t){const{children:r,id:n,initialExpandedIndex:o,allowMultipleExpanded:d=!0,caretPosition:l,cornerKind:h="rounded",animated:c,style:m}=e,v=ke(e,Ve),f=Array(r.length).fill(!1);o!==void 0&&(f[o]=!0);const[w,S]=a.useState(f),p=Array(r.length).fill(null),C=r.length<=Ge,I=(x,b)=>{const k=d?[...w]:Array(r.length).fill(!1),_=!w[x];k[x]=_,S(k),b&&b(_)},F=x=>{var b,k,_,N;const D=p.findIndex($=>$.current===document.activeElement);if(D!==-1)switch(x.key){case"ArrowUp":x.preventDefault();const $=(D+r.length-1)%r.length;(b=p[$].current)==null||b.focus();break;case"ArrowDown":x.preventDefault();const L=(D+1)%r.length;(k=p[L].current)==null||k.focus();break;case"Home":x.preventDefault(),(_=p[0].current)==null||_.focus();break;case"End":x.preventDefault(),(N=p[r.length-1].current)==null||N.focus();break}};return a.createElement(Qe,G({style:[Xe.wrapper,m],onKeyDown:F},v,{ref:t}),r.map((x,b)=>{const{caretPosition:k,cornerKind:_,onToggle:N,animated:D}=x.props,$=a.createRef();p[b]=$;const T=b===0,L=b===r.length-1;return a.createElement("li",{key:b,id:n},a.cloneElement(x,{animated:D??c,caretPosition:k??l,cornerKind:_??h,expanded:w[b],onToggle:()=>I(b,N),isFirstSection:T,isLastSection:L,isRegion:C,ref:$}))}))});const Xe=R.StyleSheet.create({wrapper:{boxSizing:"border-box",listStyle:"none",padding:0,width:"100%"}});function Je(i,e,t,r){switch(i){case"rounded-per-section":return{roundedTop:!0,roundedBottom:!r};case"rounded":return{roundedTop:e,roundedBottom:t&&!r};default:return{roundedTop:!1,roundedBottom:!1}}}const Ye=a.forwardRef(function(e,t){const{id:r,header:n,caretPosition:o,cornerKind:d,collapsible:l=!0,expanded:h,animated:c,onClick:m,sectionContentUniqueId:v,headerStyle:f,tag:w="h2",testId:S,isFirstSection:p,isLastSection:C}=e,I=typeof n=="string",{roundedTop:F,roundedBottom:x}=Je(d,p,C,h);return a.createElement(Me,{tag:w,style:E.heading},a.createElement(Ae,{id:r,"aria-expanded":h,"aria-controls":v,onClick:m,disabled:!l,testId:S?`${S}-header`:void 0,style:[E.headerWrapper,c&&E.headerWrapperWithAnimation,o==="start"&&E.headerWrapperCaretStart,F&&E.roundedTop,x&&E.roundedBottom,f,!l&&E.disabled],ref:t},()=>a.createElement(a.Fragment,null,a.createElement(M,{style:[E.headerContent,I&&E.headerString]},I?a.createElement(M,{style:[o==="end"?E.headerStringCaretEnd:E.headerStringCaretStart]},n):n),l&&a.createElement(le,{icon:Se,color:s.offBlack64,size:"small",style:[c&&E.iconWithAnimation,o==="start"?E.iconStart:E.iconEnd,h&&E.iconExpanded],testId:S?`${S}-caret-icon`:void 0}))))}),J=u.small_12-1,ge="300ms",E=R.StyleSheet.create({heading:{minWidth:0,marginTop:0},headerWrapper:{display:"flex",flexDirection:"row",alignItems:"center",overflow:"hidden",minWidth:"auto",width:"100%",position:"relative",zIndex:1,":active":{outline:`2px solid ${s.activeBlue}`},":hover":{outline:`2px solid ${s.blue}`},":focus":{boxShadow:`0 0 0 2px ${s.blue}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${s.blue}`}},headerWrapperWithAnimation:{transition:`border-radius ${ge}`},headerWrapperCaretStart:{flexDirection:"row-reverse"},roundedTop:{borderStartStartRadius:J,borderStartEndRadius:J},roundedBottom:{borderEndStartRadius:J,borderEndEndRadius:J},headerContent:{flexGrow:1,textAlign:"start"},headerString:{paddingTop:u.medium_16,paddingBottom:u.medium_16},headerStringCaretEnd:{paddingInlineEnd:u.small_12,paddingInlineStart:u.medium_16},headerStringCaretStart:{paddingInlineEnd:u.medium_16,paddingInlineStart:u.small_12},iconWithAnimation:{transition:`transform ${ge}`},iconExpanded:{transform:"rotate(180deg)"},iconStart:{marginInlineStart:u.medium_16},iconEnd:{marginInlineEnd:u.medium_16},disabled:{pointerEvents:"none",color:"inherit",":focus":{boxShadow:`0 0 0 2px ${s.offBlack32}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${s.offBlack32}`}}}),Ze=["children","id","header","collapsible","expanded","animated","onToggle","caretPosition","cornerKind","style","headerStyle","tag","testId","isFirstSection","isLastSection","isRegion"],et=a.forwardRef(function(e,t){const{children:r,id:n,header:o,collapsible:d,expanded:l,animated:h=!1,onToggle:c,caretPosition:m="end",cornerKind:v="rounded",style:f,headerStyle:w,tag:S,testId:p,isFirstSection:C=!0,isLastSection:I=!0,isRegion:F=!0}=e,x=ke(e,Ze),[b,k]=a.useState(l??!1),_=l!==void 0&&c,N=Fe(),D=n??N.get("accordion-section"),$=n?`${n}-header`:N.get("accordion-section-header"),T=N.get("accordion-section-content"),L=tt(v,C,I),fe=()=>{_?c(!l):(k(!b),c&&c(!b))};let q;return d===!1?q=!0:q=_?l:b,a.createElement(M,G({id:D,style:[A.wrapper,h&&A.wrapperWithAnimation,L.wrapper,q?A.wrapperExpanded:A.wrapperCollapsed,f],testId:p},x),a.createElement(Ye,{id:$,header:o,caretPosition:m,cornerKind:v,collapsible:d,expanded:q,animated:h,onClick:fe,sectionContentUniqueId:T,headerStyle:w,tag:S,testId:p,isFirstSection:C,isLastSection:I,ref:t}),a.createElement(M,{id:T,role:F?"region":void 0,"aria-labelledby":$,style:[A.contentWrapper,q?A.contentWrapperExpanded:A.conentWrapperCollapsed,L.contentWrapper],testId:p?`${p}-content-panel`:void 0},typeof r=="string"?a.createElement(Pe,{style:A.stringContent},r):r))}),A=R.StyleSheet.create({wrapper:{display:"grid",position:"static",boxSizing:"border-box",backgroundColor:s.white},wrapperWithAnimation:{transition:"grid-template-rows 300ms"},wrapperCollapsed:{gridTemplateRows:"min-content 0fr"},wrapperExpanded:{gridTemplateRows:"min-content 1fr"},contentWrapper:{overflow:"hidden"},conentWrapperCollapsed:{visibility:"hidden"},contentWrapperExpanded:{visibility:"visible"},stringContent:{padding:u.medium_16}}),Y={},tt=(i,e,t)=>{const r=`${i}-${e.toString()}-${t.toString()}`;if(Y[r])return Y[r];let n=Object.freeze({}),o=Object.freeze({}),d=Object.freeze({}),l=Object.freeze({});i==="square"&&(n={border:`1px solid ${s.offBlack16}`,borderBottom:"none",borderRadius:0},t&&(l={borderBottom:`1px solid ${s.offBlack16}`})),i==="rounded"&&(n={border:`1px solid ${s.offBlack16}`,borderBottom:"none"},e&&(d={borderStartStartRadius:u.small_12,borderStartEndRadius:u.small_12}),t&&(l={borderBottom:`1px solid ${s.offBlack16}`,borderEndStartRadius:u.small_12,borderEndEndRadius:u.small_12},o={borderEndEndRadius:u.small_12,borderEndStartRadius:u.small_12})),i==="rounded-per-section"&&(n={border:`1px solid ${s.offBlack16}`,borderRadius:u.small_12,marginBottom:u.medium_16},o={borderEndEndRadius:u.small_12,borderEndStartRadius:u.small_12});const h={wrapper:G({},n,d,l),contentWrapper:o};return Y[r]=R.StyleSheet.create(h),Y[r]},Re=i=>{const{children:e,header:t,expanded:r,containerStyle:n,panelStyle:o,onToggle:d}=i;return g(M,{className:"perseus-editor-accordion",children:g(et,{expanded:r,onToggle:d,style:[se.container,n],headerStyle:se.accordionHeader,header:t,children:g(M,{style:[se.accordionPanel,o],children:e})})})},se=R.StyleSheet.create({container:{backgroundColor:s.fadedBlue8,marginTop:u.xSmall_8},accordionHeader:{padding:u.small_12,paddingInlineEnd:0,height:u.xxLarge_48},accordionPanel:{paddingTop:u.xxSmall_6,paddingBottom:u.xxxSmall_4,paddingLeft:u.small_12,paddingRight:u.small_12}}),rt=Re;Re.__docgenInfo={description:"",methods:[],displayName:"PerseusEditorAccordion",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactNode | React.ReactNode[]",elements:[{name:"ReactReactNode",raw:"React.ReactNode"},{name:"Array",elements:[{name:"ReactReactNode",raw:"React.ReactNode"}],raw:"React.ReactNode[]"}]},description:""},header:{required:!0,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement"}]},description:""},expanded:{required:!1,tsType:{name:"boolean"},description:""},containerStyle:{required:!1,tsType:{name:"StyleType"},description:""},panelStyle:{required:!1,tsType:{name:"StyleType"},description:""},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:""}}};function Ee(i){const e=[];if(i)if(Array.isArray(i))for(const t of i)e.push(...Ee(t));else e.push(i);else return e;return e}function Ie(i){const e=[],t=[];if(!i)return{style:{},className:""};const r=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Ee(i).forEach(o=>{const d=o._definition;if(d!=null)if(r){const l={};for(const[h,c]of Object.entries(d))l[h.replace(/-[a-z]/g,m=>m[1].toUpperCase())]=c;t.push(l)}else e.push(o);else t.push(o)});const n=Object.assign({},...t);if(t.length>0&&!r){const o=R.StyleSheet.create({inlineStyles:n});e.push(o.inlineStyles)}return{style:r?n:{},className:R.css(...e)}}const nt=["children","style","tag","testId"],ot=/^h[1-6]$/,ye=R.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});a.forwardRef(function(e,t){let{children:r,style:n,tag:o="span",testId:d}=e,l=V(e,nt);const h=ot.test(o),c=Ie([ye.text,h&&ye.header,n]),m=l.className?[l.className,c.className].join(" "):c.className;return a.createElement(o,y({},l,{style:c.style,className:m,"data-testid":d,ref:t}),r)});const it=["className","style"];function O(i,e){return a.forwardRef((t,r)=>{const{className:n,style:o}=t,d=V(t,it),l=typeof i=="string"?at[i]:null,{className:h,style:c}=Ie([l,e,o]);return a.createElement(i,y({},d,{ref:r,className:[h,n].filter(Boolean).join(" "),style:c}))})}const at=R.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),st=["testId","tag"],X=R.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),lt=O("div",X.default),dt=O("article",X.default),ct=O("aside",X.default),ut=O("nav",X.default),ht=O("section",X.default);a.forwardRef(function(e,t){const{testId:r,tag:n="div"}=e,o=V(e,st),d=y({},o,{"data-testid":r});switch(n){case"article":return a.createElement(dt,y({},d,{ref:t}));case"aside":return a.createElement(ct,y({},d,{ref:t}));case"nav":return a.createElement(ut,y({},d,{ref:t}));case"section":return a.createElement(ht,y({},d,{ref:t}));case"div":return a.createElement(lt,y({},d,{ref:t}));default:throw Error(`${n} is not an allowed value for the 'tag' prop`)}});let z=function(i){return i.Root="root",i.Initial="initial",i.Standard="standard",i}({});const te=a.createContext(z.Root);te.displayName="RenderStateContext";class ft extends a.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:r}=this.props;return this._isTheRootComponent=!0,e?a.createElement(te.Provider,{value:z.Standard},t()):r?a.createElement(te.Provider,{value:z.Initial},r()):null}_maybeRender(e){const{children:t,fallback:r}=this.props;switch(e){case z.Root:return this._renderAsRootComponent();case z.Initial:return r?r():null;case z.Standard:return t()}{var n;return console.log(`We got a render state we don't understand: "${(n=JSON.stringify(e))!=null?n:""}"`),this._maybeRender(z.Root)}}render(){return a.createElement(te.Consumer,null,e=>this._maybeRender(e))}}class oe{constructor(e){this._uniqueFactoryName=void 0,this.get=r=>{const n=r.toLowerCase();if(!this._hasValidIdChars(r))throw new Error(`Invalid identifier key: ${r}`);return`${this._uniqueFactoryName}-${n}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${oe._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}oe._factoryUniquenessCounter=0;class de{get(e){return e}}de.Default=new de;var pt=de.Default;class mt extends a.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:r,scope:n}=this.props;return e?r?t(pt):null:(this._idFactory||(this._idFactory=new oe(n)),t(this._idFactory))}render(){return a.createElement(ft,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class ce extends a.Component{renderChildren(e){const{id:t,children:r}=this.props,n=e?e.get(ce.defaultId):t;if(!n)throw new Error("Did not get an identifier factory nor a id prop");return r(n)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():a.createElement(mt,{scope:t,mockOnFirstRender:!0},r=>this.renderChildren(r))}}ce.defaultId="wb-id";const be=i=>{switch(i){case"link":return{triggerOnEnter:!0,triggerOnSpace:!1};case"checkbox":case"radio":case"listbox":return{triggerOnEnter:!1,triggerOnSpace:!0};case"button":case"menuitem":case"menu":case"option":default:return{triggerOnEnter:!0,triggerOnSpace:!0}}},gt={onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onTouchStart:()=>{},onTouchEnd:()=>{},onTouchCancel:()=>{},onKeyDown:()=>{},onKeyUp:()=>{}},H={enter:13,space:32},ve={hovered:!1,focused:!1,pressed:!1,waiting:!1};class ue extends a.Component{static getDerivedStateFromProps(e,t){return e.disabled?y({},ve,{focused:t.focused}):null}constructor(e){super(e),this.waitingForClick=void 0,this.enterClick=void 0,this.handleClick=t=>{const{onClick:r=void 0,beforeNav:n=void 0,safeWithNav:o=void 0}=this.props;this.enterClick||((r||n||o)&&(this.waitingForClick=!1),this.runCallbackAndMaybeNavigate(t))},this.handleMouseEnter=t=>{this.waitingForClick||this.setState({hovered:!0})},this.handleMouseLeave=()=>{this.waitingForClick||this.setState({hovered:!1,pressed:!1,focused:!1})},this.handleMouseDown=t=>{this.props.onMouseDown&&this.props.onMouseDown(t),this.setState({pressed:!0})},this.handleMouseUp=t=>{this.props.onMouseUp&&this.props.onMouseUp(t),this.setState({pressed:!1,focused:!1})},this.handleTouchStart=()=>{this.setState({pressed:!0})},this.handleTouchEnd=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleTouchCancel=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleKeyDown=t=>{const{onKeyDown:r,role:n}=this.props;r&&r(t);const o=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:l}=be(n);d&&o===H.enter||l&&o===H.space?(t.preventDefault(),this.setState({pressed:!0})):!d&&o===H.enter&&(this.enterClick=!0)},this.handleKeyUp=t=>{const{onKeyUp:r,role:n}=this.props;r&&r(t);const o=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:l}=be(n);d&&o===H.enter||l&&o===H.space?(this.setState({pressed:!1,focused:!0}),this.runCallbackAndMaybeNavigate(t)):!d&&o===H.enter&&(this.enterClick=!1)},this.handleFocus=t=>{const{onFocus:r}=this.props;this.setState({focused:!0},()=>{r&&r(t)})},this.handleBlur=t=>{this.setState({focused:!1,pressed:!1})},this.state=ve,this.waitingForClick=!1,this.enterClick=!1}navigateOrReset(e){if(e){const{history:t,href:r,skipClientNav:n,target:o=void 0}=this.props;r&&(o==="_blank"?(window.open(r,"_blank"),this.setState({waiting:!1})):t&&!n?(t.push(r),this.setState({waiting:!1})):window.location.assign(r))}else this.setState({waiting:!1})}handleSafeWithNav(e,t){const{skipClientNav:r,history:n}=this.props;return n&&!r||this.props.target==="_blank"?(e(),this.navigateOrReset(t),Promise.resolve()):(this.state.waiting||this.setState({waiting:!0}),e().then(()=>{this.state.waiting||this.setState({waiting:!0})}).catch(o=>{}).finally(()=>{this.navigateOrReset(t)}))}runCallbackAndMaybeNavigate(e){const{onClick:t=void 0,beforeNav:r=void 0,safeWithNav:n=void 0,href:o,type:d}=this.props;let l=!0,h=!0;if(t&&t(e),e.defaultPrevented&&(l=!1,h=!1),e.preventDefault(),!o&&d==="submit"&&h){let c=e.currentTarget;for(;c;){if(c instanceof window.HTMLFormElement){const m=new window.Event("submit",{bubbles:!0,cancelable:!0});c.dispatchEvent(m);break}c=c.parentElement}}if(r)this.setState({waiting:!0}),r().then(()=>n?this.handleSafeWithNav(n,l):this.navigateOrReset(l)).catch(()=>{});else{if(n)return this.handleSafeWithNav(n,l);this.navigateOrReset(l)}}render(){const e=this.props.rel||(this.props.target==="_blank"?"noopener noreferrer":void 0),t=this.props.disabled?y({},gt,{onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e}):{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchCancel,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e},{children:r}=this.props;return r&&r(this.state,t)}}ue.defaultProps={disabled:!1};const he=i=>typeof i!="string"?!1:!/^(https?:)?\/\//i.test(i)&&!/^([^#]*#[\w-]*|[\w\-.]+:)/.test(i),yt=ze(ue);function bt(i,e,t){return t&&e!==!0&&i&&he(i)?yt:ue}const vt=["href","onClick","skipClientNav","beforeNav","safeWithNav","style","target","testId","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","hideDefaultFocusRing","light","disabled","tabIndex"],St=O("a"),wt=O("button"),Ct=O(Ce),xt=a.forwardRef(function(e,t){const r=(o,d,l)=>{const h=e.href&&!e.disabled,c=d&&!e.skipClientNav&&he(e.href||"");return h&&c&&e.href?a.createElement(Ct,y({},l,{to:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(o)):h&&!c?a.createElement(St,y({},l,{href:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(o)):a.createElement(wt,y({},l,{type:"button","aria-disabled":e.disabled,ref:t}),e.children(o))},n=o=>{const{href:d,onClick:l,skipClientNav:h,beforeNav:c=void 0,safeWithNav:m=void 0,style:v,target:f=void 0,testId:w,onFocus:S,onKeyDown:p,onKeyUp:C,onMouseDown:I,onMouseUp:F,hideDefaultFocusRing:x,light:b,disabled:k,tabIndex:_}=e,N=V(e,vt),D=bt(d,h,o),$=T=>[Q.reset,Q.link,!x&&T.focused&&(b?Q.focusedLight:Q.focused),k&&Q.disabled,v];return c?a.createElement(D,{href:d,onClick:l,beforeNav:c,safeWithNav:m,onFocus:S,onKeyDown:p,onKeyUp:C,onMouseDown:I,onMouseUp:F,disabled:k,tabIndex:_},(T,L)=>r(T,o,y({},N,{"data-testid":w,style:$(T)},L))):a.createElement(D,{href:d,onClick:l,safeWithNav:m,onFocus:S,onKeyDown:p,onKeyUp:C,onMouseDown:I,onMouseUp:F,target:f,disabled:k,tabIndex:_},(T,L)=>r(T,o,y({},N,{"data-testid":w,style:$(T)},L)))};return a.createElement(we.Consumer,null,o=>n(o))});xt.defaultProps={light:!1,disabled:!1};const Q=R.StyleSheet.create({reset:{border:"none",margin:0,padding:0,width:"auto",overflow:"visible",background:"transparent",textDecoration:"none",color:"inherit",font:"inherit",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",outline:"none",lineHeight:"normal",WebkitFontSmoothing:"inherit",MozOsxFontSmoothing:"inherit"},link:{cursor:"pointer"},focused:{":focus":{outline:`solid 2px ${s.blue}`}},focusedLight:{outline:`solid 2px ${s.white}`},disabled:{color:s.offBlack32,cursor:"not-allowed",":focus":{outline:"none"},":focus-visible":{outline:`solid 2px ${s.blue}`}}}),kt=i=>{switch(i){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Rt=i=>({xsmall:24,small:32,medium:40,large:48})[i],ie={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:s.offBlack32,inverse:s.white50},inverse:s.white,action:{default:s.blue,active:s.activeBlue,inverse:s.fadedBlue},critical:{default:s.red,active:s.activeRed,inverse:s.fadedRed},primary:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed},inverse:{default:s.white,hovered:s.white}},secondary:{default:s.offBlack},tertiary:{default:s.offBlack64},filled:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed}}}},border:{width:{default:U.width.thin,active:U.width.none,hovered:U.width.thin,hoveredInverse:U.width.thin},radius:{default:U.radius.medium_4}}},Et=Ue(ie,{color:{bg:{hovered:s.white,active:s.white64,filled:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed}}},stroke:{action:{inverse:s.eggplant},critical:{inverse:s.eggplant},primary:{action:{hovered:s.eggplant,active:s.eggplant},critical:{hovered:s.eggplant,active:s.eggplant},inverse:{hovered:s.eggplant}},filled:{action:{hovered:s.white,active:s.white},critical:{hovered:s.white,active:s.white}}}},border:{width:{hovered:U.width.none,hoveredInverse:U.width.none}}}),It={default:ie,khanmigo:Et},_e=Ke(ie);function _t(i){var e;const t=a.useContext(He),r=(e=It[t])!=null?e:ie;return a.createElement(_e.Provider,{value:r},i.children)}const Tt=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function $t({icon:i,size:e}){switch(kt(e)){case"small":return a.createElement(le,{size:"small",color:"currentColor",icon:i});case"medium":default:return a.createElement(le,{size:"medium",color:"currentColor",icon:i})}}const Bt=ne("a"),Ft=ne("button"),Nt=ne(Ce),Dt=a.forwardRef(function(e,t){const{color:r,disabled:n,href:o,icon:d,kind:l="primary",light:h=!1,size:c="medium",skipClientNav:m,style:v,testId:f}=e,w=V(e,Tt),{theme:S,themeName:p}=qe(_e),C=I=>{const F=Pt(r,l,h,c,S,p),x=[Lt.shared,F.default,n&&F.disabled],b=a.createElement($t,{size:c,icon:d}),k=y({"data-testid":f,style:[x,v]},w);return o&&!n?I&&!m&&he(o)?a.createElement(Nt,y({},k,{to:o,ref:t}),b):a.createElement(Bt,y({},k,{href:o,ref:t}),b):a.createElement(Ft,y({type:"button"},k,{onClick:n?void 0:w.onClick,"aria-disabled":n,ref:t}),b)};return a.createElement(we.Consumer,null,I=>C(I))}),Lt=R.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),Z={};function Mt(i,e,t,r,n){switch(i){case"primary":const o=n==="destructive"?e.color.stroke.primary.critical.hovered:e.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:e.color.bg.hovered,color:r?e.color.stroke.primary.inverse.hovered:o,outlineColor:r?e.color.stroke.inverse:t,outlineOffset:1,outlineStyle:"solid",outlineWidth:r?e.border.width.hoveredInverse:e.border.width.hovered},":active":{backgroundColor:e.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:n==="destructive"?e.color.bg.filled.critical.hovered:e.color.bg.filled.action.hovered,color:n==="destructive"?e.color.stroke.filled.critical.hovered:e.color.stroke.filled.action.hovered,outlineWidth:e.border.width.active},":active":{backgroundColor:n==="destructive"?e.color.bg.filled.critical.active:e.color.bg.filled.action.active,color:n==="destructive"?e.color.stroke.filled.critical.active:e.color.stroke.filled.action.active,outlineWidth:e.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Pt=(i="default",e,t,r,n,o)=>{const d=i==="destructive"?n.color.stroke.critical.default:n.color.stroke.action.default,l=`${d}-${e}-${t}-${r}-${o}`;if(Z[l])return Z[l];if(t&&e!=="primary")throw new Error("Light is only supported for primary IconButtons");const h=(()=>{switch(e){case"primary":return t?n.color.stroke.primary.inverse.default:d;case"secondary":return n.color.stroke.secondary.default;case"tertiary":return n.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),c=Rt(r),m=Mt(e,n,d,t,i),v=i==="destructive"?n.color.stroke.critical.inverse:n.color.stroke.action.inverse,f=i==="destructive"?n.color.stroke.critical.active:n.color.stroke.action.active,w=t?n.color.stroke.inverse:d,S=t?n.color.stroke.disabled.inverse:n.color.stroke.disabled.default,p={backgroundColor:n.color.bg.disabled,color:S,outlineColor:S},C={default:{height:c,width:c,color:h,borderRadius:n.border.radius.default,":hover":y({boxShadow:"none",color:w,borderRadius:n.border.radius.default,outlineWidth:n.border.width.default},m[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:h,borderRadius:n.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${w}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":y({boxShadow:"none",outlineWidth:n.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},m[":focus-visible"]),":active":y({color:t?v:f,outlineWidth:n.border.width.default,outlineColor:t?v:f,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},m[":active"])},disabled:{color:S,cursor:"not-allowed",":hover":y({},p,{outline:"none"}),":active":y({},p,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${S}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":p}};return Z[l]=R.StyleSheet.create(C),Z[l]},At=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],ee=a.forwardRef(function(e,t){const{color:r="default",disabled:n=!1,href:o,kind:d="primary",light:l=!1,size:h="medium",skipClientNav:c,tabIndex:m,target:v}=e,f=V(e,At);function w(p){const C=p.key;!o&&(C==="Enter"||C==="Space")&&p.preventDefault()}function S(p){const C=p.key;!o&&(C==="Enter"||C==="Space")&&f.onClick&&f.onClick(p)}return a.createElement(_t,null,a.createElement(Dt,y({},f,{color:r,disabled:n,href:o,kind:d,light:l,ref:t,skipClientNav:c,size:h,target:v,tabIndex:m,onKeyDown:w,onKeyUp:S})))}),Ot=""+new URL("caret-double-down-bold-XepWuyCn.svg",import.meta.url).href,Wt=""+new URL("caret-double-up-bold-10VQDgxI.svg",import.meta.url).href,zt=""+new URL("caret-up-bold-0QYBH_hJ.svg",import.meta.url).href,Ut=""+new URL("trash-bold-rak1tQ6r.svg",import.meta.url).href,Te=i=>{const{figureType:e,onMove:t,onRemove:r}=i;return B(M,{style:j.container,children:[g(We,{startIcon:Ut,"aria-label":`Delete locked ${e}`,onClick:r,kind:"tertiary",style:j.deleteButton,children:"Delete"}),t&&B($e,{children:[g(Le,{}),g(ee,{icon:Wt,size:"small","aria-label":`Move locked ${e} to the back`,onClick:()=>t("back"),style:j.iconButton}),g(ee,{icon:zt,size:"small","aria-label":`Move locked ${e} backward`,onClick:()=>t("backward"),style:j.iconButton}),g(ee,{icon:Se,size:"small","aria-label":`Move locked ${e} forward`,onClick:()=>t("forward"),style:j.iconButton}),g(ee,{icon:Ot,size:"small","aria-label":`Move locked ${e} to the front`,onClick:()=>t("front"),style:j.iconButton})]})]})},j=R.StyleSheet.create({container:{width:"100%",flexDirection:"row",alignItems:"center",marginTop:u.xxxSmall_4},deleteButton:{marginInlineStart:-u.xxxSmall_4},iconButton:{margin:0}}),Kt=Te;Te.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSettingsActions",props:{figureType:{required:!0,tsType:{name:"LockedFigureType"},description:""},onMove:{required:!1,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:""},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};function qt(i){const{type:e,coord:t,color:r,size:n,text:o,expanded:d,onChangeProps:l,onMove:h,onRemove:c,onToggle:m,containerStyle:v}=i;return B(rt,{expanded:d,onToggle:m,header:B(M,{style:[P.row,P.accordionHeaderContainer],children:[B(pe,{children:["Label (",t[0],", ",t[1],")"]}),g(K,{size:u.xSmall_8}),o!==""&&g(pe,{style:[{backgroundColor:s.white,color:Be[r]},P.accordionHeader],children:o})]}),containerStyle:v,children:[g(je,{coord:t,onChange:f=>{l({coord:f})},style:P.spaceUnder}),B(re,{tag:"label",style:[P.row,P.spaceUnder],children:["TeX",g(K,{size:u.xSmall_8}),g(De,{value:o,placeholder:"ex. x^2 or \\frac{1}{2}",onChange:f=>l({text:f})})]}),B(M,{style:P.row,children:[g(Oe,{selectedValue:r,onChange:f=>{l({color:f})},style:P.spaceUnder}),g(K,{size:u.medium_16}),B(re,{tag:"label",style:P.row,children:["size",g(K,{size:u.xSmall_8}),B(Ne,{selectedValue:n,onChange:f=>l({size:f}),placeholder:"",children:[g(ae,{value:"small",label:"small"}),g(ae,{value:"medium",label:"medium"}),g(ae,{value:"large",label:"large"})]})]})]}),g(Kt,{figureType:e,onMove:h,onRemove:c})]})}const P=R.StyleSheet.create({accordionHeaderContainer:{whiteSpace:"nowrap"},accordionHeader:{padding:u.xxxSmall_4,marginInlineEnd:u.xSmall_8,borderRadius:u.xxxSmall_4,textOverflow:"ellipsis",overflow:"hidden"},row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0},spaceUnder:{marginBottom:u.xSmall_8}});qt.__docgenInfo={description:"",methods:[],displayName:"LockedLabelSettings",props:{onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedFigure"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (coord, color, etc.) are updated."},onMove:{required:!1,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" diff --git a/assets/locked-label-settings.stories-ITvzBluh.js b/assets/locked-label-settings.stories-Po4wI6kE.js similarity index 72% rename from assets/locked-label-settings.stories-ITvzBluh.js rename to assets/locked-label-settings.stories-Po4wI6kE.js index 6935be88ae..2c342c6cc9 100644 --- a/assets/locked-label-settings.stories-ITvzBluh.js +++ b/assets/locked-label-settings.stories-Po4wI6kE.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{r as P}from"./index-TT1qJ6UJ.js";import{L as t}from"./locked-label-settings-My12ABKT.js";import{g as f}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-ZBceqrDu.js";const so={title:"PerseusEditor/Components/Locked Label Settings",component:t},r=p=>c(t,{...p}),u={...f("label"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=u;const o={render:function(){const[m,l]=P.useState(u);return c(t,{...m,expanded:!0,onChangeProps:g=>{l({...m,...g})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,s;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{r as P}from"./index-TT1qJ6UJ.js";import{L as t}from"./locked-label-settings-7eVXvZDY.js";import{g as f}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-Ou1zrjGq.js";const so={title:"PerseusEditor/Components/Locked Label Settings",component:t},r=p=>c(t,{...p}),u={...f("label"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=u;const o={render:function(){const[m,l]=P.useState(u);return c(t,{...m,expanded:!0,onChangeProps:g=>{l({...m,...g})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,s;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(s=(e=r.parameters)==null?void 0:e.docs)==null?void 0:s.source}}};var n,a,d;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-line-settings-GmLOdRhN.js b/assets/locked-line-settings-8WmBPF8G.js similarity index 89% rename from assets/locked-line-settings-GmLOdRhN.js rename to assets/locked-line-settings-8WmBPF8G.js index fa92a9d8e6..5dee0ab6cd 100644 --- a/assets/locked-line-settings-GmLOdRhN.js +++ b/assets/locked-line-settings-8WmBPF8G.js @@ -1,4 +1,4 @@ -import{a as u,j as o,F as q}from"./jsx-runtime-FVsy8kgq.js";import"./util-F8-MDmsT.js";import{e as Z}from"./svg-image-vbtSDKh6.js";import{B as G}from"./choice-I73s7vIV.js";import{V as y}from"./index-6h5t6F0w.js";import{S as H,O as S}from"./answer-choices-6SWUlni2.js";import{S as h}from"./index-qUyqkRvh.js";import{s as g,c as x}from"./index-deFLJwr4.js";import{L as J,a as C}from"./index-h_CiYGGb.js";import{L as Q,p as X}from"./locked-figure-aria-8qS88jMt.js";import{l as Y}from"./index-awljIyHI.js";import{v as f}from"./index-IIMKO4_x.js";import{P as ee,L as oe,a as ne}from"./locked-label-settings-My12ABKT.js";import{C as te}from"./color-select-ZBceqrDu.js";import{L as re}from"./line-stroke-select-OUNHgM-H.js";import{L as ae}from"./line-swatch-tbLkNsXV.js";import{L as R}from"./locked-point-settings-75zYMwR0.js";import{g as ie,a as le}from"./util-w4oIPZJv.js";const T="The line cannot have length 0.",B=b=>{var A,z;const{flags:s,kind:w,points:m,color:L,lineStyle:v="solid",showPoint1:I,showPoint2:M,labels:n,ariaLabel:V,onChangeProps:a,onMove:j,onRemove:O}=b,[d,c]=m,$=w.charAt(0).toUpperCase()+w.slice(1),D=`${$} (${d.coord[0]}, +import{a as u,j as o,F as q}from"./jsx-runtime-FVsy8kgq.js";import"./util-F8-MDmsT.js";import{e as Z}from"./svg-image-4Vh9uTQ6.js";import{B as G}from"./choice-I73s7vIV.js";import{V as y}from"./index-6h5t6F0w.js";import{S as H,O as S}from"./answer-choices-VNdK7gMK.js";import{S as h}from"./index-qUyqkRvh.js";import{s as g,c as x}from"./index-deFLJwr4.js";import{L as J,a as C}from"./index-h_CiYGGb.js";import{L as Q,p as X}from"./locked-figure-aria-cizi6QSj.js";import{l as Y}from"./index-awljIyHI.js";import{v as f}from"./index-IIMKO4_x.js";import{P as ee,L as oe,a as ne}from"./locked-label-settings-7eVXvZDY.js";import{C as te}from"./color-select-Ou1zrjGq.js";import{L as re}from"./line-stroke-select-1i4OFJVH.js";import{L as ae}from"./line-swatch-EI3Byz66.js";import{L as R}from"./locked-point-settings-dcN0AtwC.js";import{g as ie,a as le}from"./util-a_JWUtR1.js";const T="The line cannot have length 0.",B=b=>{var A,z;const{flags:s,kind:w,points:m,color:L,lineStyle:v="solid",showPoint1:I,showPoint2:M,labels:n,ariaLabel:V,onChangeProps:a,onMove:j,onRemove:O}=b,[d,c]=m,$=w.charAt(0).toUpperCase()+w.slice(1),D=`${$} (${d.coord[0]}, ${d.coord[1]}), (${c.coord[0]}, ${c.coord[1]})`,P=Z(d.coord,c.coord);function U(){let e="";n&&n.length>0&&(e+=` ${n.map(i=>i.text).join(", ")}`);let t=`${$}${e} from (${d.coord[0]}, ${d.coord[1]}) to (${c.coord[0]}, ${c.coord[1]})`;const r=le(L,v);return t+=r,t}function F(e,t){const r=[...m];r[t]={...m[t],...e};const i=f.midpoint(m[0].coord,m[1].coord),p=f.midpoint(r[0].coord,r[1].coord),_=[p[0]-i[0],p[1]-i[1]],W=n==null?void 0:n.map((k,se)=>({...k,coord:[k.coord[0]+_[0],k.coord[1]+_[1]]}));a({points:r,labels:W})}function E(e){var r,i;const t=n==null?void 0:n.map(p=>({...p,color:e}));a({color:e,points:[{...d,color:e,labels:(r=d.labels)==null?void 0:r.map(p=>({...p,color:e}))},{...c,color:e,labels:(i=c.labels)==null?void 0:i.map(p=>({...p,color:e}))}],labels:t})}function K(e,t){if(!n)return;const r=[...n];r[t]={...n[t],...e},a({labels:r})}function N(e){if(!n)return;const t=n.filter((r,i)=>i!==e);a({labels:t})}return u(ee,{expanded:b.expanded,onToggle:b.onToggle,header:u(y,{style:l.row,children:[o(J,{children:D}),o(h,{size:g.xSmall_8}),o(ae,{color:L,lineStyle:v})]}),children:[u(C,{tag:"label",style:[l.row,l.spaceUnder],children:["kind",o(h,{size:g.xxxSmall_4}),u(H,{selectedValue:w,onChange:e=>a({kind:e}),placeholder:"",children:[o(S,{value:"line",label:"line"}),o(S,{value:"ray",label:"ray"}),o(S,{value:"segment",label:"segment"})]})]}),u(y,{style:l.row,children:[o(te,{selectedValue:L,onChange:E}),o(h,{size:g.small_12}),o(re,{selectedValue:v,onChange:e=>a({lineStyle:e})})]}),P&&o(C,{style:l.errorText,children:T}),o(R,{flags:s,headerLabel:"Point 1",expanded:!0,showPoint:I,error:P?T:null,...d,onTogglePoint:e=>a({showPoint1:e}),onChangeProps:e=>F(e,0)}),o(R,{flags:s,headerLabel:"Point 2",expanded:!0,showPoint:M,error:P?T:null,...c,onTogglePoint:e=>a({showPoint2:e}),onChangeProps:e=>F(e,1)}),((A=s==null?void 0:s.mafs)==null?void 0:A["locked-figures-aria"])&&u(q,{children:[o(h,{size:g.small_12}),o(y,{style:l.horizontalRule}),o(Q,{ariaLabel:V,prePopulatedAriaLabel:U(),onChangeProps:e=>{a(e)}})]}),((z=s==null?void 0:s.mafs)==null?void 0:z["locked-line-labels"])&&u(q,{children:[o(h,{size:g.xxxSmall_4}),o(y,{style:l.horizontalRule}),o(h,{size:g.small_12}),o(C,{children:"Visible labels"}),n==null?void 0:n.map((e,t)=>o(oe,{...e,expanded:!0,onChangeProps:r=>{K(r,t)},onRemove:()=>{N(t)},containerStyle:l.labelContainer})),o(G,{kind:"tertiary",startIcon:X,onClick:()=>{const e=[0,-1],t=f.add(f.scale(e,(n==null?void 0:n.length)??0),f.midpoint(m[0].coord,m[1].coord)),r={...ie("label"),coord:t,color:L};a({labels:[...n??[],r]})},style:l.addButton,children:"Add visible label"})]}),o(ne,{figureType:b.type,onMove:j,onRemove:O})]})},l=Y.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:g.xSmall_8},errorText:{color:x.red},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:x.offBlack16},labelContainer:{backgroundColor:x.white}}),Te=B;B.__docgenInfo={description:"",methods:[],displayName:"LockedLineSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" diff --git a/assets/locked-line-settings.stories-5ogMuGVW.js b/assets/locked-line-settings.stories--_NNjwRl.js similarity index 77% rename from assets/locked-line-settings.stories-5ogMuGVW.js rename to assets/locked-line-settings.stories--_NNjwRl.js index 4db2386384..d7d2804e3c 100644 --- a/assets/locked-line-settings.stories-5ogMuGVW.js +++ b/assets/locked-line-settings.stories--_NNjwRl.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{r as n}from"./index-TT1qJ6UJ.js";import{L as s}from"./locked-line-settings-GmLOdRhN.js";import{g}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-vbtSDKh6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./answer-choices-6SWUlni2.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./locked-figure-aria-8qS88jMt.js";import"./article-renderer-GCz9idJ2.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./locked-label-settings-My12ABKT.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-ZBceqrDu.js";import"./line-stroke-select-OUNHgM-H.js";import"./line-swatch-tbLkNsXV.js";import"./locked-point-settings-75zYMwR0.js";import"./labeled-switch-Fn8JZIE3.js";const Dt={title:"PerseusEditor/Components/Locked Line Settings",component:s},p=i=>m(s,{...i}),c={...g("line"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};p.args=c;const d={render:function(){const[e,r]=n.useState(c);return m(s,{...e,onChangeProps:o=>{r({...e,...o})}})}};d.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[e,r]=n.useState(c),t=o=>{r({...e,...o})};return m(s,{...e,points:[g("point"),g("point")],expanded:!0,onChangeProps:t})}},u={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState(c);return m(s,{...t,expanded:e,onToggle:r,onChangeProps:P=>{o({...t,...P})}})}},l={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState({...c,kind:"segment",color:"green",lineStyle:"dashed"});return m(s,{...t,expanded:e,onToggle:r,onChangeProps:P=>{o({...t,...P})}})}};p.__docgenInfo={description:"",methods:[],displayName:"Default"};var h,f,S;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{r as n}from"./index-TT1qJ6UJ.js";import{L as s}from"./locked-line-settings-8WmBPF8G.js";import{g}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-4Vh9uTQ6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./answer-choices-VNdK7gMK.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./locked-figure-aria-cizi6QSj.js";import"./article-renderer-ub6lGcPc.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./locked-label-settings-7eVXvZDY.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-Ou1zrjGq.js";import"./line-stroke-select-1i4OFJVH.js";import"./line-swatch-EI3Byz66.js";import"./locked-point-settings-dcN0AtwC.js";import"./labeled-switch-zT89YLZ0.js";const Dt={title:"PerseusEditor/Components/Locked Line Settings",component:s},p=i=>m(s,{...i}),c={...g("line"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};p.args=c;const d={render:function(){const[e,r]=n.useState(c);return m(s,{...e,onChangeProps:o=>{r({...e,...o})}})}};d.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[e,r]=n.useState(c),t=o=>{r({...e,...o})};return m(s,{...e,points:[g("point"),g("point")],expanded:!0,onChangeProps:t})}},u={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState(c);return m(s,{...t,expanded:e,onToggle:r,onChangeProps:P=>{o({...t,...P})}})}},l={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState({...c,kind:"segment",color:"green",lineStyle:"dashed"});return m(s,{...t,expanded:e,onToggle:r,onChangeProps:P=>{o({...t,...P})}})}};p.__docgenInfo={description:"",methods:[],displayName:"Default"};var h,f,S;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(S=(f=p.parameters)==null?void 0:f.docs)==null?void 0:S.source}}};var x,R,L;d.parameters={...d.parameters,docs:{...(x=d.parameters)==null?void 0:x.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-point-settings-75zYMwR0.js b/assets/locked-point-settings-dcN0AtwC.js similarity index 92% rename from assets/locked-point-settings-75zYMwR0.js rename to assets/locked-point-settings-dcN0AtwC.js index 94f561a17b..7fe5cfcc98 100644 --- a/assets/locked-point-settings-75zYMwR0.js +++ b/assets/locked-point-settings-dcN0AtwC.js @@ -1,4 +1,4 @@ -import{a as m,j as o,F as b}from"./jsx-runtime-FVsy8kgq.js";import{B as j}from"./choice-I73s7vIV.js";import{V as P}from"./index-6h5t6F0w.js";import{S as g}from"./index-qUyqkRvh.js";import{s,c as w}from"./index-deFLJwr4.js";import{L as I,a as M}from"./index-h_CiYGGb.js";import{L as U,p as E}from"./locked-figure-aria-8qS88jMt.js";import{l as W}from"./index-awljIyHI.js";import{P as N,C as G,L as H,a as J}from"./locked-label-settings-My12ABKT.js";import{C as K}from"./color-select-ZBceqrDu.js";import{C as Q,g as X,a as Y}from"./util-w4oIPZJv.js";import{L as _}from"./labeled-switch-Fn8JZIE3.js";const q=L=>{var x,S,T;const{flags:i,headerLabel:A,coord:l,color:u,filled:C=!0,labels:n,ariaLabel:B,onChangeProps:d,onMove:v,onRemove:h,showPoint:f,expanded:F,onTogglePoint:k,onToggle:R}=L,c=!v&&!h;function $(){let e="";n&&n.length>0&&(e+=` ${n.map(p=>p.text).join(", ")}`);let a=`Point${e} at (${l[0]}, ${l[1]})`;const t=Y(u);return a+=t,a}function z(e){const a={color:e};n&&(a.labels=n.map(t=>({...t,color:e}))),d(a)}function O(e){const a=e[0]-l[0],t=e[1]-l[1],p={coord:e};n&&(p.labels=n.map(y=>({...y,coord:[y.coord[0]+a,y.coord[1]+t]}))),d(p)}function D(e,a){if(!n)return;const t=[...n];t[a]={...n[a],...e},d({labels:t})}function V(e){if(!n)return;const a=n.filter((t,p)=>p!==e);d({labels:a})}return m(N,{expanded:F,onToggle:R,containerStyle:c?r.definingContainer:void 0,panelStyle:c?r.definingPanel:void 0,header:m(P,{style:r.row,children:[o(I,{children:`${A||"Point"} (${l[0]}, ${l[1]})`}),o(g,{size:s.xSmall_8}),o(Q,{color:u,filled:C})]}),children:[o(G,{coord:l,style:r.spaceUnder,onChange:O}),k&&o(_,{label:"show point on graph",checked:!!f,style:f&&r.spaceUnder,onChange:k}),(!c||f)&&m(b,{children:[o(K,{selectedValue:u,onChange:z,style:r.spaceUnder}),o(_,{label:"open point",checked:!C,onChange:e=>{d({filled:!e})}})]}),!c&&((x=i==null?void 0:i.mafs)==null?void 0:x["locked-figures-aria"])&&m(b,{children:[o(g,{size:s.small_12}),o(P,{style:r.horizontalRule}),o(U,{ariaLabel:B,prePopulatedAriaLabel:$(),onChangeProps:e=>{d(e)}})]}),(!c&&((S=i==null?void 0:i.mafs)==null?void 0:S["locked-point-labels"])||c&&((T=i==null?void 0:i.mafs)==null?void 0:T["locked-line-labels"]))&&m(b,{children:[o(g,{size:s.xxxSmall_4}),o(P,{style:r.horizontalRule}),o(g,{size:s.small_12}),o(M,{children:"Visible labels"}),n==null?void 0:n.map((e,a)=>o(H,{...e,containerStyle:!c&&r.lockedPointLabelContainer,expanded:!0,onChangeProps:t=>{D(t,a)},onRemove:()=>{V(a)}})),o(j,{kind:"tertiary",startIcon:E,onClick:()=>{const e={...X("label"),coord:[l[0]+.5,l[1]-1*((n==null?void 0:n.length)??0)],color:u};d({labels:[...n??[],e]})},style:r.addButton,children:"Add visible label"})]}),h&&o(J,{figureType:L.type,onMove:v,onRemove:h})]})},r=W.StyleSheet.create({definingContainer:{marginTop:s.xSmall_8,marginBottom:0,marginLeft:-s.xxxSmall_4,marginRight:-s.xxxSmall_4,backgroundColor:w.white},definingPanel:{paddingBottom:s.xxSmall_6},lockedPointLabelContainer:{backgroundColor:w.white},row:{flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:s.xSmall_8},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:w.offBlack16}}),pe=q;q.__docgenInfo={description:"",methods:[],displayName:"LockedPointSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:"Optional flags to determine which features are enabled."},headerLabel:{required:!1,tsType:{name:"string"},description:`Optional label for the point to display in the header summary. +import{a as m,j as o,F as b}from"./jsx-runtime-FVsy8kgq.js";import{B as j}from"./choice-I73s7vIV.js";import{V as P}from"./index-6h5t6F0w.js";import{S as g}from"./index-qUyqkRvh.js";import{s,c as w}from"./index-deFLJwr4.js";import{L as I,a as M}from"./index-h_CiYGGb.js";import{L as U,p as E}from"./locked-figure-aria-cizi6QSj.js";import{l as W}from"./index-awljIyHI.js";import{P as N,C as G,L as H,a as J}from"./locked-label-settings-7eVXvZDY.js";import{C as K}from"./color-select-Ou1zrjGq.js";import{C as Q,g as X,a as Y}from"./util-a_JWUtR1.js";import{L as _}from"./labeled-switch-zT89YLZ0.js";const q=L=>{var x,S,T;const{flags:i,headerLabel:A,coord:l,color:u,filled:C=!0,labels:n,ariaLabel:B,onChangeProps:d,onMove:v,onRemove:h,showPoint:f,expanded:F,onTogglePoint:k,onToggle:R}=L,c=!v&&!h;function $(){let e="";n&&n.length>0&&(e+=` ${n.map(p=>p.text).join(", ")}`);let a=`Point${e} at (${l[0]}, ${l[1]})`;const t=Y(u);return a+=t,a}function z(e){const a={color:e};n&&(a.labels=n.map(t=>({...t,color:e}))),d(a)}function O(e){const a=e[0]-l[0],t=e[1]-l[1],p={coord:e};n&&(p.labels=n.map(y=>({...y,coord:[y.coord[0]+a,y.coord[1]+t]}))),d(p)}function D(e,a){if(!n)return;const t=[...n];t[a]={...n[a],...e},d({labels:t})}function V(e){if(!n)return;const a=n.filter((t,p)=>p!==e);d({labels:a})}return m(N,{expanded:F,onToggle:R,containerStyle:c?r.definingContainer:void 0,panelStyle:c?r.definingPanel:void 0,header:m(P,{style:r.row,children:[o(I,{children:`${A||"Point"} (${l[0]}, ${l[1]})`}),o(g,{size:s.xSmall_8}),o(Q,{color:u,filled:C})]}),children:[o(G,{coord:l,style:r.spaceUnder,onChange:O}),k&&o(_,{label:"show point on graph",checked:!!f,style:f&&r.spaceUnder,onChange:k}),(!c||f)&&m(b,{children:[o(K,{selectedValue:u,onChange:z,style:r.spaceUnder}),o(_,{label:"open point",checked:!C,onChange:e=>{d({filled:!e})}})]}),!c&&((x=i==null?void 0:i.mafs)==null?void 0:x["locked-figures-aria"])&&m(b,{children:[o(g,{size:s.small_12}),o(P,{style:r.horizontalRule}),o(U,{ariaLabel:B,prePopulatedAriaLabel:$(),onChangeProps:e=>{d(e)}})]}),(!c&&((S=i==null?void 0:i.mafs)==null?void 0:S["locked-point-labels"])||c&&((T=i==null?void 0:i.mafs)==null?void 0:T["locked-line-labels"]))&&m(b,{children:[o(g,{size:s.xxxSmall_4}),o(P,{style:r.horizontalRule}),o(g,{size:s.small_12}),o(M,{children:"Visible labels"}),n==null?void 0:n.map((e,a)=>o(H,{...e,containerStyle:!c&&r.lockedPointLabelContainer,expanded:!0,onChangeProps:t=>{D(t,a)},onRemove:()=>{V(a)}})),o(j,{kind:"tertiary",startIcon:E,onClick:()=>{const e={...X("label"),coord:[l[0]+.5,l[1]-1*((n==null?void 0:n.length)??0)],color:u};d({labels:[...n??[],e]})},style:r.addButton,children:"Add visible label"})]}),h&&o(J,{figureType:L.type,onMove:v,onRemove:h})]})},r=W.StyleSheet.create({definingContainer:{marginTop:s.xSmall_8,marginBottom:0,marginLeft:-s.xxxSmall_4,marginRight:-s.xxxSmall_4,backgroundColor:w.white},definingPanel:{paddingBottom:s.xxSmall_6},lockedPointLabelContainer:{backgroundColor:w.white},row:{flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:s.xSmall_8},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:w.offBlack16}}),pe=q;q.__docgenInfo={description:"",methods:[],displayName:"LockedPointSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:"Optional flags to determine which features are enabled."},headerLabel:{required:!1,tsType:{name:"string"},description:`Optional label for the point to display in the header summary. Defaults to "Point".`},showPoint:{required:!1,tsType:{name:"boolean"},description:"Whether the extra point settings are toggled open."},error:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"Optional error message to display."},onTogglePoint:{required:!1,tsType:{name:"signature",type:"function",raw:"(newValue) => void",signature:{arguments:[{name:"newValue"}],return:{name:"void"}}},description:"Called when the extra settings toggle switch is changed."},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedPointType"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (coords, color, etc.) are updated."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},onMove:{required:!1,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" diff --git a/assets/locked-point-settings.stories-ZzY5aJw1.js b/assets/locked-point-settings.stories-t0-B8JbW.js similarity index 77% rename from assets/locked-point-settings.stories-ZzY5aJw1.js rename to assets/locked-point-settings.stories-t0-B8JbW.js index 9fb8c8ed9a..8641e8544e 100644 --- a/assets/locked-point-settings.stories-ZzY5aJw1.js +++ b/assets/locked-point-settings.stories-t0-B8JbW.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{r as s}from"./index-TT1qJ6UJ.js";import{L as i}from"./locked-point-settings-75zYMwR0.js";import{g as T}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./locked-figure-aria-8qS88jMt.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./locked-label-settings-My12ABKT.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-ZBceqrDu.js";import"./labeled-switch-Fn8JZIE3.js";const Ur={title:"PerseusEditor/Components/Locked Point Settings",component:i},t=a=>c(i,{...a}),u={...T("point"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};t.args=u;const n={render:function(){const[o,e]=s.useState(u);return c(i,{...o,onChangeProps:p=>{e({...o,...p})}})}};n.parameters={chromatic:{disableSnapshot:!0}};const m={render:function(){const[o,e]=s.useState(!0),[r,p]=s.useState(u);return c(i,{...r,expanded:o,onToggle:e,onChangeProps:P=>{p({...r,...P})}})}},d={render:function(){const[o,e]=s.useState(!0),[r,p]=s.useState(u);return c(i,{...r,expanded:o,onToggle:e,onChangeProps:P=>{p({...r,...P})}})}};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,g,f;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{r as s}from"./index-TT1qJ6UJ.js";import{L as i}from"./locked-point-settings-dcN0AtwC.js";import{g as T}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./locked-figure-aria-cizi6QSj.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./locked-label-settings-7eVXvZDY.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-Ou1zrjGq.js";import"./labeled-switch-zT89YLZ0.js";const Ur={title:"PerseusEditor/Components/Locked Point Settings",component:i},t=a=>c(i,{...a}),u={...T("point"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};t.args=u;const n={render:function(){const[o,e]=s.useState(u);return c(i,{...o,onChangeProps:p=>{e({...o,...p})}})}};n.parameters={chromatic:{disableSnapshot:!0}};const m={render:function(){const[o,e]=s.useState(!0),[r,p]=s.useState(u);return c(i,{...r,expanded:o,onToggle:e,onChangeProps:P=>{p({...r,...P})}})}},d={render:function(){const[o,e]=s.useState(!0),[r,p]=s.useState(u);return c(i,{...r,expanded:o,onToggle:e,onChangeProps:P=>{p({...r,...P})}})}};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,g,f;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(f=(g=t.parameters)==null?void 0:g.docs)==null?void 0:f.source}}};var h,x,S;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-polygon-settings-CLRPaxRY.js b/assets/locked-polygon-settings-5YNPD6lU.js similarity index 89% rename from assets/locked-polygon-settings-CLRPaxRY.js rename to assets/locked-polygon-settings-5YNPD6lU.js index f0cb1fb768..e68afb19f0 100644 --- a/assets/locked-polygon-settings-CLRPaxRY.js +++ b/assets/locked-polygon-settings-5YNPD6lU.js @@ -1,4 +1,4 @@ -import{j as o,a as s,F as P}from"./jsx-runtime-FVsy8kgq.js";import{l as x,a as I}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{B as F}from"./choice-I73s7vIV.js";import{V as m}from"./index-6h5t6F0w.js";import{S as X,O as G}from"./answer-choices-6SWUlni2.js";import{P as T,C as H,I as y,L as J,a as K}from"./locked-label-settings-My12ABKT.js";import{S as h,a as Q}from"./index-qUyqkRvh.js";import{c as f,s as c}from"./index-deFLJwr4.js";import{L as S,a as A}from"./index-h_CiYGGb.js";import{p as $,L as Y}from"./locked-figure-aria-8qS88jMt.js";import{l as z}from"./index-awljIyHI.js";import{C as Z}from"./color-select-ZBceqrDu.js";import{L as ee}from"./labeled-switch-Fn8JZIE3.js";import{L as oe}from"./line-stroke-select-OUNHgM-H.js";import{g as te,a as ne}from"./util-w4oIPZJv.js";const re=""+new URL("arrow-fat-down-X5ut-FGw.svg",import.meta.url).href,ie=""+new URL("arrow-fat-left-LxuHjYfJ.svg",import.meta.url).href,ae=""+new URL("arrow-fat-right-CxkbbISx.svg",import.meta.url).href,le=""+new URL("arrow-fat-up-ah2eaaIR.svg",import.meta.url).href,se=""+new URL("minus-circle-9EKbQa8X.svg",import.meta.url).href,B=u=>{const{color:d,fillStyle:a,strokeStyle:g}=u;return o(m,{"aria-label":`${d}, stroke ${g}, fill ${a}`,style:[_.container,{border:`4px ${g} ${x[d]}`}],children:o(m,{style:[_.innerSquare,{backgroundColor:x[d],opacity:a==="white"?0:I[a]}]})})},_=z.StyleSheet.create({container:{outline:`2px solid ${f.offWhite}`,width:c.large_24,height:c.large_24,backgroundColor:f.white,alignItems:"center",justifyContent:"center"},innerSquare:{width:20,height:20}});B.__docgenInfo={description:"",methods:[],displayName:"PolygonSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},fillStyle:{required:!0,tsType:{name:"LockedFigureFillType"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const R=u=>{var v,L;const{flags:d,points:a,color:g,showVertices:q,fillStyle:k,strokeStyle:b,labels:t,ariaLabel:U,expanded:M,onToggle:j,onChangeProps:l,onMove:V,onRemove:D}=u;function W(){let n="";t&&t.length>0&&(n+=` ${t.map(p=>p.text).join(", ")}`);let e=`Polygon${n} with ${a.length} sides, vertices at `;e+=a.map(([p,C])=>`(${p}, ${C})`).join(", ");const i=ne(g,b,k);return e+=i,e}function O(n){const e={color:n};e.labels=t==null?void 0:t.map(i=>({...i,color:n})),l(e)}function w(n){switch(n){case"up":l({points:a.map(([e,i])=>[e,i+1]),labels:t==null?void 0:t.map(e=>({...e,coord:[e.coord[0],e.coord[1]+1]}))});break;case"down":l({points:a.map(([e,i])=>[e,i-1]),labels:t==null?void 0:t.map(e=>({...e,coord:[e.coord[0],e.coord[1]-1]}))});break;case"left":l({points:a.map(([e,i])=>[e-1,i]),labels:t==null?void 0:t.map(e=>({...e,coord:[e.coord[0]-1,e.coord[1]]}))});break;case"right":l({points:a.map(([e,i])=>[e+1,i]),labels:t==null?void 0:t.map(e=>({...e,coord:[e.coord[0]+1,e.coord[1]]}))});break}}function E(n,e){if(!t)return;const i=[...t];i[e]={...t[e],...n},l({labels:i})}function N(n){if(!t)return;const e=t.filter((i,p)=>p!==n);l({labels:e})}return s(T,{expanded:M,onToggle:j,header:s(m,{style:r.row,children:[o(S,{children:`Polygon, ${a.length} sides`}),o(h,{size:c.xSmall_8}),o(B,{color:g,fillStyle:k,strokeStyle:b})]}),children:[s(m,{style:[r.row,r.spaceUnder],children:[o(Z,{selectedValue:g,onChange:O}),o(h,{size:c.medium_16}),s(A,{tag:"label",style:[r.row,r.truncatedWidth],children:["fill",o(h,{size:c.xxSmall_6}),o(X,{selectedValue:k,onChange:n=>l({fillStyle:n}),placeholder:"",children:Object.keys(I).map(n=>o(G,{value:n,label:n},n))})]})]}),o(oe,{selectedValue:b,onChange:n=>l({strokeStyle:n})}),o(ee,{label:"show vertices",checked:q,onChange:n=>l({showVertices:n}),style:r.spaceUnder}),s(T,{header:o(S,{children:"Points"}),expanded:!0,containerStyle:r.pointAccordionContainer,panelStyle:r.pointAccordionPanel,children:[a.map((n,e)=>{const i=String.fromCharCode(65+e);return s(m,{style:[r.row,r.spaceUnder],children:[o(S,{children:`${i}:`}),o(h,{size:c.medium_16}),o(H,{coord:n,labels:["x","y"],onChange:p=>{const C=[...a];C[e]=p,u.onChangeProps({points:C})}}),a.length>3&&o(y,{"aria-label":`Delete polygon point ${i}`,icon:se,color:"destructive",onClick:()=>{const p=[...a];p.splice(e,1),u.onChangeProps({points:p})},style:r.icon})]},`locked-polygon-point-index-${e}`)}),s(m,{style:[r.row,r.polygonActionsContainer],children:[o(F,{kind:"tertiary",startIcon:$,onClick:()=>{u.onChangeProps({points:[...a,[0,0]]})},children:"Add point"}),o(Q,{}),s(m,{style:r.movementButtonsContainer,children:[o(y,{"aria-label":"Move polygon up",style:r.iconButton,size:"small",icon:le,onClick:()=>w("up")}),s(m,{style:r.row,children:[o(y,{"aria-label":"Move polygon left",style:r.iconButton,size:"small",icon:ie,onClick:()=>w("left")}),o(y,{"aria-label":"Move polygon down",style:r.iconButton,size:"small",icon:re,onClick:()=>w("down")}),o(y,{"aria-label":"Move polygon right",style:r.iconButton,size:"small",icon:ae,onClick:()=>w("right")})]})]})]})]}),((v=d==null?void 0:d.mafs)==null?void 0:v["locked-figures-aria"])&&s(P,{children:[o(h,{size:c.small_12}),o(m,{style:r.horizontalRule}),o(Y,{ariaLabel:U,prePopulatedAriaLabel:W(),onChangeProps:n=>{l(n)}})]}),((L=d==null?void 0:d.mafs)==null?void 0:L["locked-polygon-labels"])&&s(P,{children:[o(h,{size:c.xxxSmall_4}),o(m,{style:r.horizontalRule}),o(h,{size:c.small_12}),o(A,{children:"Visible labels"}),t==null?void 0:t.map((n,e)=>o(J,{...n,expanded:!0,onChangeProps:i=>{E(i,e)},onRemove:()=>{N(e)},containerStyle:r.labelContainer})),o(F,{kind:"tertiary",startIcon:$,onClick:()=>{const n={...te("label"),coord:[a[0][0],a[0][1]-((t==null?void 0:t.length)??0)],color:g};l({labels:[...t??[],n]})},style:r.addButton,children:"Add visible label"})]}),o(K,{figureType:u.type,onMove:V,onRemove:D})]})},r=z.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},pointAccordionContainer:{backgroundColor:f.white},pointAccordionPanel:{alignItems:"start"},icon:{marginInlineStart:c.xxxSmall_4},polygonActionsContainer:{width:"100%"},iconButton:{margin:0},movementButtonsContainer:{display:"flex",flexDirection:"column",alignItems:"center",minWidth:"fit-content"},spaceUnder:{marginBottom:c.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:f.white},horizontalRule:{height:1,backgroundColor:f.offBlack16}}),Ke=R;R.__docgenInfo={description:"",methods:[],displayName:"LockedPolygonSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{j as o,a as s,F as P}from"./jsx-runtime-FVsy8kgq.js";import{l as x,a as I}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{B as F}from"./choice-I73s7vIV.js";import{V as m}from"./index-6h5t6F0w.js";import{S as X,O as G}from"./answer-choices-VNdK7gMK.js";import{P as T,C as H,I as y,L as J,a as K}from"./locked-label-settings-7eVXvZDY.js";import{S as h,a as Q}from"./index-qUyqkRvh.js";import{c as f,s as c}from"./index-deFLJwr4.js";import{L as S,a as A}from"./index-h_CiYGGb.js";import{p as $,L as Y}from"./locked-figure-aria-cizi6QSj.js";import{l as z}from"./index-awljIyHI.js";import{C as Z}from"./color-select-Ou1zrjGq.js";import{L as ee}from"./labeled-switch-zT89YLZ0.js";import{L as oe}from"./line-stroke-select-1i4OFJVH.js";import{g as te,a as ne}from"./util-a_JWUtR1.js";const re=""+new URL("arrow-fat-down-X5ut-FGw.svg",import.meta.url).href,ie=""+new URL("arrow-fat-left-LxuHjYfJ.svg",import.meta.url).href,ae=""+new URL("arrow-fat-right-CxkbbISx.svg",import.meta.url).href,le=""+new URL("arrow-fat-up-ah2eaaIR.svg",import.meta.url).href,se=""+new URL("minus-circle-9EKbQa8X.svg",import.meta.url).href,B=u=>{const{color:d,fillStyle:a,strokeStyle:g}=u;return o(m,{"aria-label":`${d}, stroke ${g}, fill ${a}`,style:[_.container,{border:`4px ${g} ${x[d]}`}],children:o(m,{style:[_.innerSquare,{backgroundColor:x[d],opacity:a==="white"?0:I[a]}]})})},_=z.StyleSheet.create({container:{outline:`2px solid ${f.offWhite}`,width:c.large_24,height:c.large_24,backgroundColor:f.white,alignItems:"center",justifyContent:"center"},innerSquare:{width:20,height:20}});B.__docgenInfo={description:"",methods:[],displayName:"PolygonSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},fillStyle:{required:!0,tsType:{name:"LockedFigureFillType"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const R=u=>{var v,L;const{flags:d,points:a,color:g,showVertices:q,fillStyle:k,strokeStyle:b,labels:t,ariaLabel:U,expanded:M,onToggle:j,onChangeProps:l,onMove:V,onRemove:D}=u;function W(){let n="";t&&t.length>0&&(n+=` ${t.map(p=>p.text).join(", ")}`);let e=`Polygon${n} with ${a.length} sides, vertices at `;e+=a.map(([p,C])=>`(${p}, ${C})`).join(", ");const i=ne(g,b,k);return e+=i,e}function O(n){const e={color:n};e.labels=t==null?void 0:t.map(i=>({...i,color:n})),l(e)}function w(n){switch(n){case"up":l({points:a.map(([e,i])=>[e,i+1]),labels:t==null?void 0:t.map(e=>({...e,coord:[e.coord[0],e.coord[1]+1]}))});break;case"down":l({points:a.map(([e,i])=>[e,i-1]),labels:t==null?void 0:t.map(e=>({...e,coord:[e.coord[0],e.coord[1]-1]}))});break;case"left":l({points:a.map(([e,i])=>[e-1,i]),labels:t==null?void 0:t.map(e=>({...e,coord:[e.coord[0]-1,e.coord[1]]}))});break;case"right":l({points:a.map(([e,i])=>[e+1,i]),labels:t==null?void 0:t.map(e=>({...e,coord:[e.coord[0]+1,e.coord[1]]}))});break}}function E(n,e){if(!t)return;const i=[...t];i[e]={...t[e],...n},l({labels:i})}function N(n){if(!t)return;const e=t.filter((i,p)=>p!==n);l({labels:e})}return s(T,{expanded:M,onToggle:j,header:s(m,{style:r.row,children:[o(S,{children:`Polygon, ${a.length} sides`}),o(h,{size:c.xSmall_8}),o(B,{color:g,fillStyle:k,strokeStyle:b})]}),children:[s(m,{style:[r.row,r.spaceUnder],children:[o(Z,{selectedValue:g,onChange:O}),o(h,{size:c.medium_16}),s(A,{tag:"label",style:[r.row,r.truncatedWidth],children:["fill",o(h,{size:c.xxSmall_6}),o(X,{selectedValue:k,onChange:n=>l({fillStyle:n}),placeholder:"",children:Object.keys(I).map(n=>o(G,{value:n,label:n},n))})]})]}),o(oe,{selectedValue:b,onChange:n=>l({strokeStyle:n})}),o(ee,{label:"show vertices",checked:q,onChange:n=>l({showVertices:n}),style:r.spaceUnder}),s(T,{header:o(S,{children:"Points"}),expanded:!0,containerStyle:r.pointAccordionContainer,panelStyle:r.pointAccordionPanel,children:[a.map((n,e)=>{const i=String.fromCharCode(65+e);return s(m,{style:[r.row,r.spaceUnder],children:[o(S,{children:`${i}:`}),o(h,{size:c.medium_16}),o(H,{coord:n,labels:["x","y"],onChange:p=>{const C=[...a];C[e]=p,u.onChangeProps({points:C})}}),a.length>3&&o(y,{"aria-label":`Delete polygon point ${i}`,icon:se,color:"destructive",onClick:()=>{const p=[...a];p.splice(e,1),u.onChangeProps({points:p})},style:r.icon})]},`locked-polygon-point-index-${e}`)}),s(m,{style:[r.row,r.polygonActionsContainer],children:[o(F,{kind:"tertiary",startIcon:$,onClick:()=>{u.onChangeProps({points:[...a,[0,0]]})},children:"Add point"}),o(Q,{}),s(m,{style:r.movementButtonsContainer,children:[o(y,{"aria-label":"Move polygon up",style:r.iconButton,size:"small",icon:le,onClick:()=>w("up")}),s(m,{style:r.row,children:[o(y,{"aria-label":"Move polygon left",style:r.iconButton,size:"small",icon:ie,onClick:()=>w("left")}),o(y,{"aria-label":"Move polygon down",style:r.iconButton,size:"small",icon:re,onClick:()=>w("down")}),o(y,{"aria-label":"Move polygon right",style:r.iconButton,size:"small",icon:ae,onClick:()=>w("right")})]})]})]})]}),((v=d==null?void 0:d.mafs)==null?void 0:v["locked-figures-aria"])&&s(P,{children:[o(h,{size:c.small_12}),o(m,{style:r.horizontalRule}),o(Y,{ariaLabel:U,prePopulatedAriaLabel:W(),onChangeProps:n=>{l(n)}})]}),((L=d==null?void 0:d.mafs)==null?void 0:L["locked-polygon-labels"])&&s(P,{children:[o(h,{size:c.xxxSmall_4}),o(m,{style:r.horizontalRule}),o(h,{size:c.small_12}),o(A,{children:"Visible labels"}),t==null?void 0:t.map((n,e)=>o(J,{...n,expanded:!0,onChangeProps:i=>{E(i,e)},onRemove:()=>{N(e)},containerStyle:r.labelContainer})),o(F,{kind:"tertiary",startIcon:$,onClick:()=>{const n={...te("label"),coord:[a[0][0],a[0][1]-((t==null?void 0:t.length)??0)],color:g};l({labels:[...t??[],n]})},style:r.addButton,children:"Add visible label"})]}),o(K,{figureType:u.type,onMove:V,onRemove:D})]})},r=z.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},pointAccordionContainer:{backgroundColor:f.white},pointAccordionPanel:{alignItems:"start"},icon:{marginInlineStart:c.xxxSmall_4},polygonActionsContainer:{width:"100%"},iconButton:{margin:0},movementButtonsContainer:{display:"flex",flexDirection:"column",alignItems:"center",minWidth:"fit-content"},spaceUnder:{marginBottom:c.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:f.white},horizontalRule:{height:1,backgroundColor:f.offBlack16}}),Ke=R;R.__docgenInfo={description:"",methods:[],displayName:"LockedPolygonSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedPolygonType"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (coords, color, etc.) are updated."}}};export{Ke as L}; diff --git a/assets/locked-polygon-settings.stories-TDj8L6st.js b/assets/locked-polygon-settings.stories-oI6yVCN5.js similarity index 74% rename from assets/locked-polygon-settings.stories-TDj8L6st.js rename to assets/locked-polygon-settings.stories-oI6yVCN5.js index d4928fce98..b5aeecdcab 100644 --- a/assets/locked-polygon-settings.stories-TDj8L6st.js +++ b/assets/locked-polygon-settings.stories-oI6yVCN5.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as a}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-polygon-settings-CLRPaxRY.js";import{g as E}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./locked-label-settings-My12ABKT.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-ZBceqrDu.js";import"./locked-figure-aria-8qS88jMt.js";import"./components-V6aclUoQ.js";import"./labeled-switch-Fn8JZIE3.js";import"./line-stroke-select-OUNHgM-H.js";const xr={title:"PerseusEditor/Components/Locked Polygon Settings",component:e},o=i=>d(e,{...i}),c={...E("polygon"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=c;const r={render:function(){const[t,m]=a.useState(c);return d(e,{...t,onChangeProps:s=>{m({...t,...s})}})}};r.parameters={chromatic:{disableSnapshot:!0}};const p={render:function(){const[t,m]=a.useState(!0),[n,s]=a.useState(c);return d(e,{...n,expanded:t,onToggle:m,onChangeProps:y=>{s({...n,...y})}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,l,P;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as a}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-polygon-settings-5YNPD6lU.js";import{g as E}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./locked-label-settings-7eVXvZDY.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-Ou1zrjGq.js";import"./locked-figure-aria-cizi6QSj.js";import"./components-yT7oveOH.js";import"./labeled-switch-zT89YLZ0.js";import"./line-stroke-select-1i4OFJVH.js";const xr={title:"PerseusEditor/Components/Locked Polygon Settings",component:e},o=i=>d(e,{...i}),c={...E("polygon"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=c;const r={render:function(){const[t,m]=a.useState(c);return d(e,{...t,onChangeProps:s=>{m({...t,...s})}})}};r.parameters={chromatic:{disableSnapshot:!0}};const p={render:function(){const[t,m]=a.useState(!0),[n,s]=a.useState(c);return d(e,{...n,expanded:t,onToggle:m,onChangeProps:y=>{s({...n,...y})}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,l,P;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(P=(l=o.parameters)==null?void 0:l.docs)==null?void 0:P.source}}};var g,f,h;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-vector-settings-nyZ3gue2.js b/assets/locked-vector-settings-f_p_9H7b.js similarity index 93% rename from assets/locked-vector-settings-nyZ3gue2.js rename to assets/locked-vector-settings-f_p_9H7b.js index e4d16e4459..3e061bc3b9 100644 --- a/assets/locked-vector-settings-nyZ3gue2.js +++ b/assets/locked-vector-settings-f_p_9H7b.js @@ -1,4 +1,4 @@ -import{a as f,j as e,F as T}from"./jsx-runtime-FVsy8kgq.js";import"./util-F8-MDmsT.js";import{e as O}from"./svg-image-vbtSDKh6.js";import{B as N}from"./choice-I73s7vIV.js";import{V as m}from"./index-6h5t6F0w.js";import{S as b}from"./index-qUyqkRvh.js";import{s,c as y}from"./index-deFLJwr4.js";import{L as w,a as $}from"./index-h_CiYGGb.js";import{L as U,p as W}from"./locked-figure-aria-8qS88jMt.js";import{l as G}from"./index-awljIyHI.js";import{v as d}from"./index-IIMKO4_x.js";import{P as v,C as F,L as H,a as J}from"./locked-label-settings-My12ABKT.js";import{C as K}from"./color-select-ZBceqrDu.js";import{L as Q}from"./line-swatch-tbLkNsXV.js";import{g as X,a as Y}from"./util-w4oIPZJv.js";const Z="The vector cannot have length 0.",_=g=>{var S,k;const{flags:c,points:x,color:h,labels:n,ariaLabel:A,onChangeProps:p,onMove:V,onRemove:q}=g,[i,l]=x,R=`Vector (${i[0]}, ${i[1]}), (${l[0]}, ${l[1]})`,L=O(i,l);function z(){let o="";n&&n.length>0&&(o+=` ${n.map(u=>u.text).join(", ")}`);let r=`Vector${o} from (${i[0]}, ${i[1]}) to (${l[0]}, ${l[1]})`;const t=Y(h);return r+=t,r}function C(o,r){if(typeof o<"u"){const t=[...x];t[r]=[...o];const u=d.midpoint(i,l),j=d.midpoint(t[0],t[1]),D=d.sub(j,u),E=n==null?void 0:n.map(P=>({...P,coord:d.add(P.coord,D)}));p({points:t,labels:E})}}function B(o){const r={color:o};r.labels=n==null?void 0:n.map(t=>({...t,color:o})),p(r)}function M(o,r){if(!n)return;const t=[...n];t[r]={...n[r],...o},p({labels:t})}function I(o){if(!n)return;const r=n.filter((t,u)=>u!==o);p({labels:r})}return f(v,{expanded:g.expanded,onToggle:g.onToggle,header:f(m,{style:a.row,children:[e(w,{children:R}),e(b,{size:s.xSmall_8}),e(Q,{color:h,lineStyle:"solid"})]}),children:[e(m,{style:[a.row,a.spaceUnder],children:e(K,{selectedValue:h,onChange:B})}),L&&e($,{style:a.errorText,children:Z}),e(v,{expanded:!0,containerStyle:a.container,panelStyle:a.accordionPanel,header:e(m,{style:a.row,children:e(w,{children:`Tail (${i[0]}, ${i[1]})`})}),children:e(F,{coord:i,error:L,onChange:o=>{C(o,0)}})}),e(v,{expanded:!0,containerStyle:a.container,panelStyle:a.accordionPanel,header:e(m,{style:a.row,children:e(w,{children:`Tip (${l[0]}, ${l[1]})`})}),children:e(F,{coord:l,error:L,onChange:o=>{C(o,1)}})}),((S=c==null?void 0:c.mafs)==null?void 0:S["locked-figures-aria"])&&f(T,{children:[e(b,{size:s.small_12}),e(m,{style:a.horizontalRule}),e(U,{ariaLabel:A,prePopulatedAriaLabel:z(),onChangeProps:o=>{p(o)}})]}),((k=c==null?void 0:c.mafs)==null?void 0:k["locked-vector-labels"])&&f(T,{children:[e(b,{size:s.xxxSmall_4}),e(m,{style:a.horizontalRule}),e(b,{size:s.small_12}),e($,{children:"Visible labels"}),n==null?void 0:n.map((o,r)=>e(H,{...o,expanded:!0,onChangeProps:t=>{M(t,r)},onRemove:()=>{I(r)},containerStyle:a.labelContainer})),e(N,{kind:"tertiary",startIcon:W,onClick:()=>{const o=[0,-1],r=d.add(d.scale(o,(n==null?void 0:n.length)??0),d.midpoint(i,l)),t={...X("label"),coord:r,color:h};p({labels:[...n??[],t]})},style:a.addButton,children:"Add visible label"})]}),e(J,{figureType:g.type,onMove:V,onRemove:q})]})},a=G.StyleSheet.create({accordionPanel:{paddingBottom:s.medium_16},container:{marginTop:s.xSmall_8,marginBottom:0,marginLeft:-s.xxxSmall_4,marginRight:-s.xxxSmall_4,backgroundColor:y.white},errorText:{color:y.red,marginTop:s.xSmall_8},row:{flexDirection:"row",alignItems:"center"},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:y.offBlack16},labelContainer:{backgroundColor:y.white}}),he=_;_.__docgenInfo={description:"",methods:[],displayName:"LockedVectorSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{a as f,j as e,F as T}from"./jsx-runtime-FVsy8kgq.js";import"./util-F8-MDmsT.js";import{e as O}from"./svg-image-4Vh9uTQ6.js";import{B as N}from"./choice-I73s7vIV.js";import{V as m}from"./index-6h5t6F0w.js";import{S as b}from"./index-qUyqkRvh.js";import{s,c as y}from"./index-deFLJwr4.js";import{L as w,a as $}from"./index-h_CiYGGb.js";import{L as U,p as W}from"./locked-figure-aria-cizi6QSj.js";import{l as G}from"./index-awljIyHI.js";import{v as d}from"./index-IIMKO4_x.js";import{P as v,C as F,L as H,a as J}from"./locked-label-settings-7eVXvZDY.js";import{C as K}from"./color-select-Ou1zrjGq.js";import{L as Q}from"./line-swatch-EI3Byz66.js";import{g as X,a as Y}from"./util-a_JWUtR1.js";const Z="The vector cannot have length 0.",_=g=>{var S,k;const{flags:c,points:x,color:h,labels:n,ariaLabel:A,onChangeProps:p,onMove:V,onRemove:q}=g,[i,l]=x,R=`Vector (${i[0]}, ${i[1]}), (${l[0]}, ${l[1]})`,L=O(i,l);function z(){let o="";n&&n.length>0&&(o+=` ${n.map(u=>u.text).join(", ")}`);let r=`Vector${o} from (${i[0]}, ${i[1]}) to (${l[0]}, ${l[1]})`;const t=Y(h);return r+=t,r}function C(o,r){if(typeof o<"u"){const t=[...x];t[r]=[...o];const u=d.midpoint(i,l),j=d.midpoint(t[0],t[1]),D=d.sub(j,u),E=n==null?void 0:n.map(P=>({...P,coord:d.add(P.coord,D)}));p({points:t,labels:E})}}function B(o){const r={color:o};r.labels=n==null?void 0:n.map(t=>({...t,color:o})),p(r)}function M(o,r){if(!n)return;const t=[...n];t[r]={...n[r],...o},p({labels:t})}function I(o){if(!n)return;const r=n.filter((t,u)=>u!==o);p({labels:r})}return f(v,{expanded:g.expanded,onToggle:g.onToggle,header:f(m,{style:a.row,children:[e(w,{children:R}),e(b,{size:s.xSmall_8}),e(Q,{color:h,lineStyle:"solid"})]}),children:[e(m,{style:[a.row,a.spaceUnder],children:e(K,{selectedValue:h,onChange:B})}),L&&e($,{style:a.errorText,children:Z}),e(v,{expanded:!0,containerStyle:a.container,panelStyle:a.accordionPanel,header:e(m,{style:a.row,children:e(w,{children:`Tail (${i[0]}, ${i[1]})`})}),children:e(F,{coord:i,error:L,onChange:o=>{C(o,0)}})}),e(v,{expanded:!0,containerStyle:a.container,panelStyle:a.accordionPanel,header:e(m,{style:a.row,children:e(w,{children:`Tip (${l[0]}, ${l[1]})`})}),children:e(F,{coord:l,error:L,onChange:o=>{C(o,1)}})}),((S=c==null?void 0:c.mafs)==null?void 0:S["locked-figures-aria"])&&f(T,{children:[e(b,{size:s.small_12}),e(m,{style:a.horizontalRule}),e(U,{ariaLabel:A,prePopulatedAriaLabel:z(),onChangeProps:o=>{p(o)}})]}),((k=c==null?void 0:c.mafs)==null?void 0:k["locked-vector-labels"])&&f(T,{children:[e(b,{size:s.xxxSmall_4}),e(m,{style:a.horizontalRule}),e(b,{size:s.small_12}),e($,{children:"Visible labels"}),n==null?void 0:n.map((o,r)=>e(H,{...o,expanded:!0,onChangeProps:t=>{M(t,r)},onRemove:()=>{I(r)},containerStyle:a.labelContainer})),e(N,{kind:"tertiary",startIcon:W,onClick:()=>{const o=[0,-1],r=d.add(d.scale(o,(n==null?void 0:n.length)??0),d.midpoint(i,l)),t={...X("label"),coord:r,color:h};p({labels:[...n??[],t]})},style:a.addButton,children:"Add visible label"})]}),e(J,{figureType:g.type,onMove:V,onRemove:q})]})},a=G.StyleSheet.create({accordionPanel:{paddingBottom:s.medium_16},container:{marginTop:s.xSmall_8,marginBottom:0,marginLeft:-s.xxxSmall_4,marginRight:-s.xxxSmall_4,backgroundColor:y.white},errorText:{color:y.red,marginTop:s.xSmall_8},row:{flexDirection:"row",alignItems:"center"},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:y.offBlack16},labelContainer:{backgroundColor:y.white}}),he=_;_.__docgenInfo={description:"",methods:[],displayName:"LockedVectorSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedFigure"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (points, color, etc.) are updated."}}};export{he as L}; diff --git a/assets/locked-vector-settings.stories-8IYOGYyZ.js b/assets/locked-vector-settings.stories-TJaJoPNL.js similarity index 72% rename from assets/locked-vector-settings.stories-8IYOGYyZ.js rename to assets/locked-vector-settings.stories-TJaJoPNL.js index 968ea0da72..ad0d0d1f3a 100644 --- a/assets/locked-vector-settings.stories-8IYOGYyZ.js +++ b/assets/locked-vector-settings.stories-TJaJoPNL.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{r as R}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-vector-settings-nyZ3gue2.js";import{g as k}from"./util-w4oIPZJv.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-vbtSDKh6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./locked-figure-aria-8qS88jMt.js";import"./article-renderer-GCz9idJ2.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./locked-label-settings-My12ABKT.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-ZBceqrDu.js";import"./line-swatch-tbLkNsXV.js";const ft={title:"PerseusEditor/Components/Locked Vector Settings",component:e},r=i=>n(e,{...i}),a={...k("vector"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=a;const p={render:function(){const[t,s]=R.useState(a);return n(e,{...t,expanded:!0,onChangeProps:m=>{s({...t,...m})}})}},o={render:function(){const[t,s]=R.useState(a);return n(e,{...t,points:[[0,0],[0,0]],expanded:!0,onChangeProps:m=>{s({...t,...m})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var d,c,u;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{r as R}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-vector-settings-f_p_9H7b.js";import{g as k}from"./util-a_JWUtR1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-4Vh9uTQ6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./locked-figure-aria-cizi6QSj.js";import"./article-renderer-ub6lGcPc.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./locked-label-settings-7eVXvZDY.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-Ou1zrjGq.js";import"./line-swatch-EI3Byz66.js";const ft={title:"PerseusEditor/Components/Locked Vector Settings",component:e},r=i=>n(e,{...i}),a={...k("vector"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=a;const p={render:function(){const[t,s]=R.useState(a);return n(e,{...t,expanded:!0,onChangeProps:m=>{s({...t,...m})}})}},o={render:function(){const[t,s]=R.useState(a);return n(e,{...t,points:[[0,0],[0,0]],expanded:!0,onChangeProps:m=>{s({...t,...m})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var d,c,u;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(u=(c=r.parameters)==null?void 0:c.docs)==null?void 0:u.source}}};var l,P,g;p.parameters={...p.parameters,docs:{...(l=p.parameters)==null?void 0:l.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/marker-AnHLRo1F.js b/assets/marker-Tbl1FJz5.js similarity index 98% rename from assets/marker-AnHLRo1F.js rename to assets/marker-Tbl1FJz5.js index c6ce2c3814..c6c979dba7 100644 --- a/assets/marker-AnHLRo1F.js +++ b/assets/marker-Tbl1FJz5.js @@ -1,3 +1,3 @@ -import{j as d,a as w,F as k}from"./jsx-runtime-FVsy8kgq.js";import{V as b}from"./index-6h5t6F0w.js";import{c as r}from"./index-deFLJwr4.js";import{l as g}from"./index-awljIyHI.js";import{r as x}from"./index-TT1qJ6UJ.js";import{P as C}from"./i18n-context-P5sgPFep.js";import{I as v}from"./icon-R5gZamfG.js";import{a as I,b as S,c as A}from"./icon-paths-5JCXzGsq.js";import{A as T}from"./answer-pill-0VqGKN9U.js";function q(){if(typeof window.matchMedia!="function")return!0;const y=window.matchMedia("(prefers-reduced-motion: reduce)");return!y||y.matches}const t=24,m=class m extends x.Component{constructor(){super(...arguments),this._mounted=!1}componentDidMount(){this._mounted=!0}componentWillUnmount(){this._mounted=!1}renderIcon(){const{selected:c,showCorrectness:i,showSelected:u,showPulsate:a}=this.props,s=u,l=c;let n;const p={path:"",height:1,width:1};let o={size:t,color:r.white,icon:p};return i?(n=[e.markerGraded,i==="correct"?e.markerCorrect:e.markerIncorrect,s&&e.markerSelected],o={...o,icon:i==="correct"?I:S}):l&&l.length>0?n=[e.markerFilled,s&&e.markerSelected]:s?(n=[e.markerSelected],o={...o,icon:A,size:8}):a&&(n=[e.markerPulsateBase,this._mounted&&q()?a&&e.markerUnfilledPulsateOnce:a&&e.markerUnfilledPulsateInfinite]),d(b,{style:[e.markerIcon,n],ref:f=>this._icon=f,children:d(v,{...o})})}render(){const{showCorrectness:c,selected:i,showAnswer:u,answerSide:a,answerStyles:s,hovered:l,focused:n,label:p}=this.props,o=c==="correct",f=l||n;return w(k,{children:[d(b,{style:[e.marker,f&&!o&&e.markerActive],"aria-label":o?this.context.strings.correctExcited:p,children:this.renderIcon()}),!!i&&u&&d(T,{selectedAnswers:i,showCorrectness:c,side:a,style:s,markerRef:this._icon??void 0,hovered:l,focused:n})]})}};m.contextType=C,m.defaultProps={selected:[]};let h=m;const e=g.StyleSheet.create({marker:{position:"absolute",backgroundColor:r.white,borderRadius:t,width:t,height:t,marginLeft:t/-2,marginTop:t/-2,boxShadow:`0 8px 8px ${r.offBlack8}`},markerIcon:{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:t,height:t,border:`2px solid ${r.offBlack64}`,borderRadius:t},markerPulsateBase:{animationName:{"0%":{transform:"scale(1)",backgroundColor:r.blue},"100%":{transform:"scale(1.3)",backgroundColor:r.blue}},animationDirection:"alternate",animationDuration:"0.8s",animationTimingFunction:"ease-in",transformOrigin:"50% 50%",animationIterationCount:"0"},markerUnfilledPulsateInfinite:{animationIterationCount:"infinite"},markerUnfilledPulsateOnce:{animationIterationCount:"2"},markerActive:{outline:`2px solid ${r.blue}`,outlineOffset:2},markerSelected:{boxShadow:`0 8px 8px ${r.offBlack8}`,border:`solid 4px ${r.white}`,backgroundColor:r.blue,borderRadius:t,transform:"rotate(180deg)"},markerFilled:{backgroundColor:"#ECF3FE",border:`4px solid ${r.blue}`},markerGraded:{width:t,height:t,justifyContent:"center",alignItems:"center",border:`2px solid ${r.white}`},markerCorrect:{background:"#00880b"},markerIncorrect:{background:r.offBlack64}});h.__docgenInfo={description:"",methods:[{name:"renderIcon",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Marker",props:{answers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},label:{required:!0,tsType:{name:"string"},description:""},x:{required:!0,tsType:{name:"number"},description:""},y:{required:!0,tsType:{name:"number"},description:""},selected:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},showCorrectness:{required:!1,tsType:{name:"union",raw:'"correct" | "incorrect"',elements:[{name:"literal",value:'"correct"'},{name:"literal",value:'"incorrect"'}]},description:""},focused:{required:!0,tsType:{name:"boolean"},description:""},showSelected:{required:!0,tsType:{name:"boolean"},description:""},showPulsate:{required:!0,tsType:{name:"boolean"},description:""},answerSide:{required:!0,tsType:{name:"union",raw:'"top" | "bottom" | "left" | "right"',elements:[{name:"literal",value:'"top"'},{name:"literal",value:'"bottom"'},{name:"literal",value:'"left"'},{name:"literal",value:'"right"'}]},description:""},answerStyles:{required:!1,tsType:{name:"CSSProperties"},description:""},showAnswer:{required:!1,tsType:{name:"boolean"},description:""},analytics:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{j as d,a as w,F as k}from"./jsx-runtime-FVsy8kgq.js";import{V as b}from"./index-6h5t6F0w.js";import{c as r}from"./index-deFLJwr4.js";import{l as g}from"./index-awljIyHI.js";import{r as x}from"./index-TT1qJ6UJ.js";import{P as C}from"./i18n-context-P5sgPFep.js";import{I as v}from"./icon-R5gZamfG.js";import{a as I,b as S,c as A}from"./icon-paths-5JCXzGsq.js";import{A as T}from"./answer-pill-DPPg5zNJ.js";function q(){if(typeof window.matchMedia!="function")return!0;const y=window.matchMedia("(prefers-reduced-motion: reduce)");return!y||y.matches}const t=24,m=class m extends x.Component{constructor(){super(...arguments),this._mounted=!1}componentDidMount(){this._mounted=!0}componentWillUnmount(){this._mounted=!1}renderIcon(){const{selected:c,showCorrectness:i,showSelected:u,showPulsate:a}=this.props,s=u,l=c;let n;const p={path:"",height:1,width:1};let o={size:t,color:r.white,icon:p};return i?(n=[e.markerGraded,i==="correct"?e.markerCorrect:e.markerIncorrect,s&&e.markerSelected],o={...o,icon:i==="correct"?I:S}):l&&l.length>0?n=[e.markerFilled,s&&e.markerSelected]:s?(n=[e.markerSelected],o={...o,icon:A,size:8}):a&&(n=[e.markerPulsateBase,this._mounted&&q()?a&&e.markerUnfilledPulsateOnce:a&&e.markerUnfilledPulsateInfinite]),d(b,{style:[e.markerIcon,n],ref:f=>this._icon=f,children:d(v,{...o})})}render(){const{showCorrectness:c,selected:i,showAnswer:u,answerSide:a,answerStyles:s,hovered:l,focused:n,label:p}=this.props,o=c==="correct",f=l||n;return w(k,{children:[d(b,{style:[e.marker,f&&!o&&e.markerActive],"aria-label":o?this.context.strings.correctExcited:p,children:this.renderIcon()}),!!i&&u&&d(T,{selectedAnswers:i,showCorrectness:c,side:a,style:s,markerRef:this._icon??void 0,hovered:l,focused:n})]})}};m.contextType=C,m.defaultProps={selected:[]};let h=m;const e=g.StyleSheet.create({marker:{position:"absolute",backgroundColor:r.white,borderRadius:t,width:t,height:t,marginLeft:t/-2,marginTop:t/-2,boxShadow:`0 8px 8px ${r.offBlack8}`},markerIcon:{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:t,height:t,border:`2px solid ${r.offBlack64}`,borderRadius:t},markerPulsateBase:{animationName:{"0%":{transform:"scale(1)",backgroundColor:r.blue},"100%":{transform:"scale(1.3)",backgroundColor:r.blue}},animationDirection:"alternate",animationDuration:"0.8s",animationTimingFunction:"ease-in",transformOrigin:"50% 50%",animationIterationCount:"0"},markerUnfilledPulsateInfinite:{animationIterationCount:"infinite"},markerUnfilledPulsateOnce:{animationIterationCount:"2"},markerActive:{outline:`2px solid ${r.blue}`,outlineOffset:2},markerSelected:{boxShadow:`0 8px 8px ${r.offBlack8}`,border:`solid 4px ${r.white}`,backgroundColor:r.blue,borderRadius:t,transform:"rotate(180deg)"},markerFilled:{backgroundColor:"#ECF3FE",border:`4px solid ${r.blue}`},markerGraded:{width:t,height:t,justifyContent:"center",alignItems:"center",border:`2px solid ${r.white}`},markerCorrect:{background:"#00880b"},markerIncorrect:{background:r.offBlack64}});h.__docgenInfo={description:"",methods:[{name:"renderIcon",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Marker",props:{answers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},label:{required:!0,tsType:{name:"string"},description:""},x:{required:!0,tsType:{name:"number"},description:""},y:{required:!0,tsType:{name:"number"},description:""},selected:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},showCorrectness:{required:!1,tsType:{name:"union",raw:'"correct" | "incorrect"',elements:[{name:"literal",value:'"correct"'},{name:"literal",value:'"incorrect"'}]},description:""},focused:{required:!0,tsType:{name:"boolean"},description:""},showSelected:{required:!0,tsType:{name:"boolean"},description:""},showPulsate:{required:!0,tsType:{name:"boolean"},description:""},answerSide:{required:!0,tsType:{name:"union",raw:'"top" | "bottom" | "left" | "right"',elements:[{name:"literal",value:'"top"'},{name:"literal",value:'"bottom"'},{name:"literal",value:'"left"'},{name:"literal",value:'"right"'}]},description:""},answerStyles:{required:!1,tsType:{name:"CSSProperties"},description:""},showAnswer:{required:!1,tsType:{name:"boolean"},description:""},analytics:{required:!1,tsType:{name:"signature",type:"object",raw:`{ onAnalyticsEvent: AnalyticsEventHandlerFn; }`,signature:{properties:[{key:"onAnalyticsEvent",value:{name:"AnalyticsEventHandlerFn",required:!0}}]}},description:""},hovered:{required:!0,tsType:{name:"boolean"},description:""}}};export{h as M}; diff --git a/assets/marker-4IxQ8C94.js b/assets/marker-de7YvUxA.js similarity index 94% rename from assets/marker-4IxQ8C94.js rename to assets/marker-de7YvUxA.js index c51bb320bd..1981f4527c 100644 --- a/assets/marker-4IxQ8C94.js +++ b/assets/marker-de7YvUxA.js @@ -1,4 +1,4 @@ -import{j as n,a as b}from"./jsx-runtime-FVsy8kgq.js";import{l as a}from"./index-awljIyHI.js";import{r as u}from"./index-TT1qJ6UJ.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as S}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{R as D}from"./index-7vsPyIck.js";import{a as w,c as g,d as x,e as y,f as R}from"./global-colors-VIVU4Od4.js";import{f as T}from"./util-qk2aeK8X.js";import{F as A}from"./form-wrapped-text-field-A2kf-LD-.js";const{Icon:M}=S,N=h=>{const e=D.findDOMNode(h);e.focus&&T(e)},q=`M10,3.8C10,4,9.9,4.2,9.8,4.3L5.1,8.9L4.3,9.8C4.2,9.9,4,10,3.8,10 +import{j as n,a as b}from"./jsx-runtime-FVsy8kgq.js";import{l as a}from"./index-awljIyHI.js";import{r as u}from"./index-TT1qJ6UJ.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as S}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{R as D}from"./index-7vsPyIck.js";import{a as w,c as g,d as x,e as y,f as R}from"./global-colors-VIVU4Od4.js";import{f as T}from"./util-qk2aeK8X.js";import{F as A}from"./form-wrapped-text-field-A2kf-LD-.js";const{Icon:M}=S,N=h=>{const e=D.findDOMNode(h);e.focus&&T(e)},q=`M10,3.8C10,4,9.9,4.2,9.8,4.3L5.1,8.9L4.3,9.8C4.2,9.9,4,10,3.8,10 S3.5,9.9,3.4,9.8L2.5,8.9L0.2,6.6C0.1,6.5,0,6.3,0,6.2s0.1-0.3,0.2-0.4 l0.9-0.9c0.1-0.1,0.3-0.2,0.4-0.2s0.3,0.1,0.4,0.2l1.9,1.9l4.2-4.2c0.1 -0.1,0.3-0.2,0.4-0.2c0.2,0,0.3,0.1,0.4,0.2l0.9,0.9C9.9,3.5,10,3.7, diff --git a/assets/marker.stories-sNHZQ8MO.js b/assets/marker.stories-LnaUikU_.js similarity index 94% rename from assets/marker.stories-sNHZQ8MO.js rename to assets/marker.stories-LnaUikU_.js index 0a514b1df2..fad6b2f395 100644 --- a/assets/marker.stories-sNHZQ8MO.js +++ b/assets/marker.stories-LnaUikU_.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{l as L}from"./index-awljIyHI.js";import{M as O}from"./marker-AnHLRo1F.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./icon-paths-5JCXzGsq.js";import"./answer-pill-0VqGKN9U.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./index-7vsPyIck.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";const _e={title:"Perseus/Widgets/Label Image/Marker"},q=L.StyleSheet.create({wrapper:{position:"relative",width:32,height:32}}),s=r=>e("div",{className:L.css(q.wrapper),children:e(O,{...r})}),t=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),n=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!0,onClick:()=>{},onKeyDown:()=>{}}}),a=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),c=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),l=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),p=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),i=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),d=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),m=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}});t.__docgenInfo={description:"",methods:[],displayName:"Unfilled"};n.__docgenInfo={description:"",methods:[],displayName:"UnfilledPulsate"};a.__docgenInfo={description:"",methods:[],displayName:"UnfilledSelected"};c.__docgenInfo={description:"",methods:[],displayName:"Filled"};l.__docgenInfo={description:"",methods:[],displayName:"FilledSelected"};p.__docgenInfo={description:"",methods:[],displayName:"Incorrect"};i.__docgenInfo={description:"",methods:[],displayName:"IncorrectSelected"};d.__docgenInfo={description:"",methods:[],displayName:"Correct"};m.__docgenInfo={description:"",methods:[],displayName:"CorrectSelected"};var u,w,h;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{l as L}from"./index-awljIyHI.js";import{M as O}from"./marker-Tbl1FJz5.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./icon-paths-5JCXzGsq.js";import"./answer-pill-DPPg5zNJ.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./index-7vsPyIck.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";const _e={title:"Perseus/Widgets/Label Image/Marker"},q=L.StyleSheet.create({wrapper:{position:"relative",width:32,height:32}}),s=r=>e("div",{className:L.css(q.wrapper),children:e(O,{...r})}),t=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),n=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!0,onClick:()=>{},onKeyDown:()=>{}}}),a=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),c=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),l=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),p=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),i=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),d=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),m=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}});t.__docgenInfo={description:"",methods:[],displayName:"Unfilled"};n.__docgenInfo={description:"",methods:[],displayName:"UnfilledPulsate"};a.__docgenInfo={description:"",methods:[],displayName:"UnfilledSelected"};c.__docgenInfo={description:"",methods:[],displayName:"Filled"};l.__docgenInfo={description:"",methods:[],displayName:"FilledSelected"};p.__docgenInfo={description:"",methods:[],displayName:"Incorrect"};i.__docgenInfo={description:"",methods:[],displayName:"IncorrectSelected"};d.__docgenInfo={description:"",methods:[],displayName:"Correct"};m.__docgenInfo={description:"",methods:[],displayName:"CorrectSelected"};var u,w,h;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ answers: ["BMW", "Ferrari"], selected: [], diff --git a/assets/marker.stories-ZDj_o8fv.js b/assets/marker.stories-SeALEomW.js similarity index 79% rename from assets/marker.stories-ZDj_o8fv.js rename to assets/marker.stories-SeALEomW.js index ad367dc12e..26afaabaf1 100644 --- a/assets/marker.stories-ZDj_o8fv.js +++ b/assets/marker.stories-SeALEomW.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as h}from"./index-awljIyHI.js";import{M as u}from"./marker-4IxQ8C94.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./global-colors-VIVU4Od4.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-A2kf-LD-.js";const co={title:"PerseusEditor/Widgets/Label Image/Marker"},y=h.StyleSheet.create({wrapper:{marginTop:150,position:"relative",width:32,height:32}}),l=m=>i("div",{className:h.css(y.wrapper),children:i(u,{...m})}),o=m=>i(l,{...{answers:[],choices:[],label:"",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50}}),t=m=>i(l,{...{answers:["BMW","Ferrari"],choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],label:"Automotive",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50}});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};t.__docgenInfo={description:"",methods:[],displayName:"WithAnswers"};var e,s,n;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as h}from"./index-awljIyHI.js";import{M as u}from"./marker-de7YvUxA.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./global-colors-VIVU4Od4.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-A2kf-LD-.js";const co={title:"PerseusEditor/Widgets/Label Image/Marker"},y=h.StyleSheet.create({wrapper:{marginTop:150,position:"relative",width:32,height:32}}),l=m=>i("div",{className:h.css(y.wrapper),children:i(u,{...m})}),o=m=>i(l,{...{answers:[],choices:[],label:"",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50}}),t=m=>i(l,{...{answers:["BMW","Ferrari"],choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],label:"Automotive",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50}});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};t.__docgenInfo={description:"",methods:[],displayName:"WithAnswers"};var e,s,n;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ answers: [], choices: [], diff --git a/assets/matcher-editor-w387bK5J.js b/assets/matcher-editor-nUcHc7yM.js similarity index 87% rename from assets/matcher-editor-w387bK5J.js rename to assets/matcher-editor-nUcHc7yM.js index 05463f574b..879ec88b87 100644 --- a/assets/matcher-editor-w387bK5J.js +++ b/assets/matcher-editor-nUcHc7yM.js @@ -1 +1 @@ -import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import{_ as p}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{C as d}from"./index-QCAhLhLD.js";import{P as i}from"./index-0C4KXdeC.js";import{r as m}from"./index-TT1qJ6UJ.js";const{InfoTip:o,TextListEditor:h}=c,s=class s extends m.Component{constructor(){super(...arguments),this.onLabelChange=(r,a)=>{const l=p.clone(this.props.labels);l[r]=a.target.value,this.props.onChange({labels:l})},this.getSaveWarnings=()=>this.props.left.length!==this.props.right.length?["The two halves of the matcher have different numbers of cards."]:[],this.serialize=()=>p.pick(this.props,"left","right","labels","orderMatters","padding")}render(){return t("div",{className:"perseus-matcher-editor",children:[t("div",{children:[" ","Correct answer:"," ",e(o,{children:e("p",{children:"Enter the correct answers here. The preview on the right will show the cards in a randomized order, which is how the student will see them."})})]}),t("div",{className:"perseus-clearfix",children:[e(h,{options:this.props.left,onChange:(r,a)=>{this.props.onChange({left:r},a)},layout:"vertical"}),e(h,{options:this.props.right,onChange:(r,a)=>{this.props.onChange({right:r},a)},layout:"vertical"})]}),t("span",{children:[" ","Labels:"," ",e(o,{children:e("p",{children:"These are entirely optional."})})]}),t("div",{children:[e("input",{type:"text",defaultValue:this.props.labels[0],onChange:this.onLabelChange.bind(this,0)}),e("input",{type:"text",defaultValue:this.props.labels[1],onChange:this.onLabelChange.bind(this,1)})]}),t("div",{children:[e(d,{label:"Order of the matched pairs matters:",checked:this.props.orderMatters,onChange:r=>{this.props.onChange({orderMatters:r})}}),t(o,{children:[e("p",{children:"With this option enabled, only the order provided above will be treated as correct. This is useful when ordering is significant, such as in the context of a proof."}),e("p",{children:"If disabled, pairwise matching is sufficient. To make this clear, the left column becomes fixed in the provided order and only the cards in the right column can be moved."})]})]}),t("div",{children:[e(d,{label:"Padding:",checked:this.props.padding,onChange:r=>{this.props.onChange({padding:r})}}),e(o,{children:e("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};s.propTypes={left:i.array,right:i.array,labels:i.array,orderMatters:i.bool,padding:i.bool},s.widgetName="matcher",s.defaultProps={left:["$x$","$y$","$z$"],right:["$1$","$2$","$3$"],labels:["test","label"],orderMatters:!1,padding:!0};let n=s;n.__docgenInfo={description:"",methods:[{name:"onLabelChange",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatcherEditor",props:{left:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},right:{defaultValue:{value:'["$1$", "$2$", "$3$"]',computed:!1},description:"",type:{name:"array"},required:!1},labels:{defaultValue:{value:'["test", "label"]',computed:!1},description:"",type:{name:"array"},required:!1},orderMatters:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{n as M}; +import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import{_ as p}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{C as d}from"./index-QCAhLhLD.js";import{P as i}from"./index-0C4KXdeC.js";import{r as m}from"./index-TT1qJ6UJ.js";const{InfoTip:o,TextListEditor:h}=c,s=class s extends m.Component{constructor(){super(...arguments),this.onLabelChange=(r,a)=>{const l=p.clone(this.props.labels);l[r]=a.target.value,this.props.onChange({labels:l})},this.getSaveWarnings=()=>this.props.left.length!==this.props.right.length?["The two halves of the matcher have different numbers of cards."]:[],this.serialize=()=>p.pick(this.props,"left","right","labels","orderMatters","padding")}render(){return t("div",{className:"perseus-matcher-editor",children:[t("div",{children:[" ","Correct answer:"," ",e(o,{children:e("p",{children:"Enter the correct answers here. The preview on the right will show the cards in a randomized order, which is how the student will see them."})})]}),t("div",{className:"perseus-clearfix",children:[e(h,{options:this.props.left,onChange:(r,a)=>{this.props.onChange({left:r},a)},layout:"vertical"}),e(h,{options:this.props.right,onChange:(r,a)=>{this.props.onChange({right:r},a)},layout:"vertical"})]}),t("span",{children:[" ","Labels:"," ",e(o,{children:e("p",{children:"These are entirely optional."})})]}),t("div",{children:[e("input",{type:"text",defaultValue:this.props.labels[0],onChange:this.onLabelChange.bind(this,0)}),e("input",{type:"text",defaultValue:this.props.labels[1],onChange:this.onLabelChange.bind(this,1)})]}),t("div",{children:[e(d,{label:"Order of the matched pairs matters:",checked:this.props.orderMatters,onChange:r=>{this.props.onChange({orderMatters:r})}}),t(o,{children:[e("p",{children:"With this option enabled, only the order provided above will be treated as correct. This is useful when ordering is significant, such as in the context of a proof."}),e("p",{children:"If disabled, pairwise matching is sufficient. To make this clear, the left column becomes fixed in the provided order and only the cards in the right column can be moved."})]})]}),t("div",{children:[e(d,{label:"Padding:",checked:this.props.padding,onChange:r=>{this.props.onChange({padding:r})}}),e(o,{children:e("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};s.propTypes={left:i.array,right:i.array,labels:i.array,orderMatters:i.bool,padding:i.bool},s.widgetName="matcher",s.defaultProps={left:["$x$","$y$","$z$"],right:["$1$","$2$","$3$"],labels:["test","label"],orderMatters:!1,padding:!0};let n=s;n.__docgenInfo={description:"",methods:[{name:"onLabelChange",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatcherEditor",props:{left:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},right:{defaultValue:{value:'["$1$", "$2$", "$3$"]',computed:!1},description:"",type:{name:"array"},required:!1},labels:{defaultValue:{value:'["test", "label"]',computed:!1},description:"",type:{name:"array"},required:!1},orderMatters:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{n as M}; diff --git a/assets/matcher-editor.stories-JYzttWQo.js b/assets/matcher-editor.stories-jsQpHHwS.js similarity index 69% rename from assets/matcher-editor.stories-JYzttWQo.js rename to assets/matcher-editor.stories-jsQpHHwS.js index 07c4253ece..e95f7be141 100644 --- a/assets/matcher-editor.stories-JYzttWQo.js +++ b/assets/matcher-editor.stories-jsQpHHwS.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{M as e}from"./matcher-editor-w387bK5J.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./index-0C4KXdeC.js";const $r={title:"PerseusEditor/Widgets/Matcher Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{M as e}from"./matcher-editor-nUcHc7yM.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./index-0C4KXdeC.js";const $r={title:"PerseusEditor/Widgets/Matcher Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const rt=["Default"];export{r as Default,rt as __namedExportsOrder,$r as default}; diff --git a/assets/matcher.stories-BM5iIsJW.js b/assets/matcher.stories-aZvUbCC_.js similarity index 70% rename from assets/matcher.stories-BM5iIsJW.js rename to assets/matcher.stories-aZvUbCC_.js index 4f753bdc75..9f2824a544 100644 --- a/assets/matcher.stories-BM5iIsJW.js +++ b/assets/matcher.stories-aZvUbCC_.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const p={content:`**Match each claim with its supporting evidence.** +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const p={content:`**Match each claim with its supporting evidence.** [[☃ matcher 1]]`,images:{},widgets:{"matcher 1":{version:{major:0,minor:0},type:"matcher",graded:!0,options:{labels:["**Claims**","**Evidence**"],padding:!0,orderMatters:!1,right:["Medium-sized stars typically exist for roughly 10 billion years","The current trajectory of the Earth’s tectonic plate movement","The life cycle of medium-sized stars includes a red giant stage and ends in a whimper as a white dwarf","Rapid escalation of greenhouse gas emissions","The current trajectory of the Milky Way galaxy and those in its immediate proximity"],left:["Our Sun will run out of fuel and die in around 5 billion years ","Plate tectonics will rearrange the continents: the Pacific will narrow, bringing Australia closer to the Americas, and the Atlantic will expand to form the largest of the oceans ","Our Sun will run out of hydrogen, swell into a red giant, gobble up the inner rocky planets, and then collapse and die ","Average global temperatures will rise ","In 3 to 4 billion years, our galaxy will begin a slow collision with its closest large neighbor, Andromeda "]}}}},Xt={title:"Perseus/Widgets/Matcher"},t=a=>e(m,{question:p});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var r,i,o;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/math-input-JZMGF6RZ.js b/assets/math-input-JZMGF6RZ.js index 1d592cbbfc..840c71683a 100644 --- a/assets/math-input-JZMGF6RZ.js +++ b/assets/math-input-JZMGF6RZ.js @@ -1,4 +1,4 @@ -import{j as i,a as v,F as q}from"./jsx-runtime-FVsy8kgq.js";import"./prop-types-SKtvHVtl.js";import{a as x,c as K,g as h,m as _}from"./key-translator-Bl2XtQm9.js";import{C as A,K as B}from"./mobile-keypad-wPUeR8mM.js";import{M as E,c as V}from"./button-assets-txIojR3b.js";import{C as D}from"./index-WNT3sUKf.js";import{V as R}from"./index-6h5t6F0w.js";import{P as O,a as U}from"./index-BPSWBbj5.js";import{c as l,s as k}from"./index-deFLJwr4.js";import{e as W}from"./index-h_CiYGGb.js";import{l as S}from"./index-awljIyHI.js";import{c as I}from"./index-dnMhQZ-1.js";import{_ as L,$ as P}from"./jquery-yG1GhClm.js";import{r as b}from"./index-TT1qJ6UJ.js";import{P as H}from"./i18n-context-P5sgPFep.js";var n=[];for(var y=0;y<256;++y)n.push((y+256).toString(16).slice(1));function N(a,e=0){return(n[a[e+0]]+n[a[e+1]]+n[a[e+2]]+n[a[e+3]]+"-"+n[a[e+4]]+n[a[e+5]]+"-"+n[a[e+6]]+n[a[e+7]]+"-"+n[a[e+8]]+n[a[e+9]]+"-"+n[a[e+10]]+n[a[e+11]]+n[a[e+12]]+n[a[e+13]]+n[a[e+14]]+n[a[e+15]]).toLowerCase()}var p,M=new Uint8Array(16);function j(){if(!p&&(p=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!p))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return p(M)}var Z=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const w={randomUUID:Z};function $(a,e,t){if(w.randomUUID&&!e&&!a)return w.randomUUID();a=a||{};var r=a.random||(a.rng||j)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(var s=0;s<16;++s)e[t+s]=r[s];return e}return N(r)}const z=S.StyleSheet.create({srOnly:{border:0,clip:"rect(0,0,0,0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}}),G=(a,e)=>{let t=null;return(...r)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{a(...r)},e)}},u=class u extends b.Component{constructor(){super(...arguments),this.__mathFieldWrapperRef=null,this.__mathField=null,this.state={focused:!1,keypadOpen:this.props.buttonsVisible==="always",cursorContext:A.NONE},this.insert=e=>{const t=this.mathField(),{locale:r}=this.context,o={...x(r,this.context.strings),FRAC:d=>{const F=d.latex();d.typedText("/"),d.latex()===F&&d.cmd("\\frac")}}[e];if(o){o(t,e),t==null||t.focus();return}L(e).isFunction()?e(t):e[0]==="\\"?t==null||t.cmd(e).focus():t==null||t.write(e).focus(),t==null||t.focus()},this.mathField=()=>{var e;if(!this.__mathField&&this.__mathFieldWrapperRef){const{locale:t}=this.context;this.__mathField=K(this.__mathFieldWrapperRef,t,this.props.mathInputStrings,r=>({...r,handlers:{edit:G(s=>{let o=s.latex();if(o=o.replace(/<>/g,"\\ne"),V(t,this.props.convertDotToTimes)){o=o.replace(/\\cdot/g,"\\times");const d=s.cursor()[_.L];d&&d.ctrlSeq==="\\cdot "&&(s.controller().backspace(),s.cmd("\\times"))}else o=o.replace(/\\times/g,"\\cdot");this.props.value!==o&&this.props.onChange(o),this.setState({cursorContext:h(s)})},100),enter:()=>{this.__mathFieldWrapperRef&&P(this.__mathFieldWrapperRef).submit()},upOutOf:s=>{s.typedText("^")}}}))}return(e=this.__mathField)==null||e.setAriaLabel(this.props.ariaLabel),this.__mathField},this.focus=()=>{var e;(e=this.mathField())==null||e.focus(),this.setState({focused:!0})},this.blur=()=>this.setState({focused:!1}),this.handleKeypadPress=(e,t)=>{const{locale:r}=this.context,s=x(r,this.context.strings)[e],o=this.mathField();o&&(s&&s(o,e),this.setState({cursorContext:h(o)})),t.type==="click"&&this.focus()}}componentDidMount(){var e;(e=this.mathField())==null||e.latex(this.props.value)}openKeypad(){this.props.buttonsVisible!=="never"&&this.setState({keypadOpen:!0})}closeKeypad(){this.setState({keypadOpen:!1})}render(){let e=I({"perseus-math-input":!0,"mq-editable-field":!0,"mq-math-mode":!0});const t=$().slice(0,8);return this.props.className&&(e=e+" "+this.props.className),i(R,{style:[c.outerWrapper,this.state.focused&&c.wrapperFocused,this.props.hasError&&c.wrapperError],children:v("div",{style:{display:"flex",padding:1},onClick:r=>{r.stopPropagation();const s=this.mathField();s&&this.setState({cursorContext:h(s)})},children:[i("span",{className:e,ref:r=>this.__mathFieldWrapperRef=r,onFocus:()=>this.focus(),onBlur:()=>this.blur()}),i(O,{rootBoundary:"document",opened:this.state.keypadOpen,onClose:()=>this.closeKeypad(),dismissEnabled:!0,"aria-label":this.context.strings.mathInputTitle,"aria-describedby":`popover-content-${t}`,content:()=>{var r;return v(q,{children:[i(W,{id:`popover-content-${t}`,style:z.srOnly,children:this.context.strings.mathInputDescription}),i(U,{closeButtonVisible:!0,style:c.popoverContent,children:i(B,{onAnalyticsEvent:this.props.onAnalyticsEvent,extraKeys:this.props.extraKeys,onClickKey:this.handleKeypadPress,cursorContext:this.state.cursorContext,convertDotToTimes:this.props.convertDotToTimes,...this.props.keypadButtonSets??J((r=this.props)==null?void 0:r.buttonSets)})})]})},children:this.props.buttonsVisible==="never"?i(C,{hovered:!1,focused:!1,active:!1}):i(D,{"aria-label":this.state.keypadOpen?this.context.strings.closeKeypad:this.context.strings.openKeypad,role:"button",onClick:()=>this.state.keypadOpen?this.closeKeypad():this.openKeypad(),children:r=>i(C,{active:this.state.keypadOpen,...r})})})]})})}};u.contextType=H,u.defaultProps={value:"",convertDotToTimes:!1};let f=u;const m=class m extends b.Component{constructor(){super(...arguments),this.inputRef=b.createRef()}blur(){var e;(e=this.inputRef.current)==null||e.blur()}focus(){var e;(e=this.inputRef.current)==null||e.focus()}insert(e){var t;(t=this.inputRef.current)==null||t.insert(e)}render(){return i(f,{...this.props,ref:this.inputRef,mathInputStrings:this.context.strings})}};m.contextType=E,m.defaultProps={ariaLabel:"Math input"};let g=m;const C=({hovered:a,focused:e,active:t})=>{let r;switch(!0){case(e||t):r=l.white;break;case a:r=l.blue;break;default:r=l.offBlack;break}const s=t||e?c.iconActive:c.iconInactive;return i(R,{style:[c.iconContainer,s],children:i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:r,viewBox:"0 0 256 256",children:i("path",{d:"M112,72a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16h64A8,8,0,0,1,112,72Zm-8,104H80V152a8,8,0,0,0-16,0v24H40a8,8,0,0,0,0,16H64v24a8,8,0,0,0,16,0V192h24a8,8,0,0,0,0-16Zm48,0h64a8,8,0,0,0,0-16H152a8,8,0,0,0,0,16Zm64,16H152a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm-61.66-90.34a8,8,0,0,0,11.32,0L184,83.31l18.34,18.35a8,8,0,0,0,11.32-11.32L195.31,72l18.35-18.34a8,8,0,0,0-11.32-11.32L184,60.69,165.66,42.34a8,8,0,0,0-11.32,11.32L172.69,72,154.34,90.34A8,8,0,0,0,154.34,101.66Z"})})})},J=a=>{const e={};return a&&a.forEach(t=>{switch(t){case"advanced relations":e.advancedRelations=!0;break;case"basic relations":e.basicRelations=!0;break;case"basic+div":e.divisionKey=!0;break;case"logarithms":e.logarithms=!0;break;case"prealgebra":e.preAlgebra=!0;break;case"trig":e.trigonometry=!0;break}}),e},T={borderWidth:2,borderColor:l.blue,margin:-1},c=S.StyleSheet.create({iconContainer:{display:"flex",justifyContent:"center",height:"100%",padding:k.xxxSmall_4,borderRadius:1},iconInactive:{border:"2px solid transparent",backgroundColor:l.offBlack8},iconActive:{border:`2px solid ${l.white}`,backgroundColor:l.offBlack64},outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:l.offBlack50,borderRadius:3,background:l.white,":hover":T},wrapperFocused:T,wrapperError:{borderColor:l.red,background:l.fadedRed8,":hover":{borderColor:l.red}},popoverContent:{padding:0,paddingBottom:k.xxSmall_6,maxWidth:"initial"}});g.__docgenInfo={description:"",methods:[{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"insert",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:{name:"any"}}],returns:null}],displayName:"MathInput",props:{className:{required:!1,tsType:{name:"string"},description:""},value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""},convertDotToTimes:{required:!0,tsType:{name:"boolean"},description:""},buttonSets:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:`| "basic" +import{j as i,a as v,F as q}from"./jsx-runtime-FVsy8kgq.js";import"./prop-types-SKtvHVtl.js";import{a as x,c as K,g as h,m as _}from"./key-translator-Bl2XtQm9.js";import{C as A,K as B}from"./mobile-keypad-wPUeR8mM.js";import{M as E,c as V}from"./button-assets-txIojR3b.js";import{C as D}from"./index-2dmvOE3q.js";import{V as R}from"./index-6h5t6F0w.js";import{P as O,a as U}from"./index-BPSWBbj5.js";import{c as l,s as k}from"./index-deFLJwr4.js";import{e as W}from"./index-h_CiYGGb.js";import{l as S}from"./index-awljIyHI.js";import{c as I}from"./index-dnMhQZ-1.js";import{_ as L,$ as P}from"./jquery-yG1GhClm.js";import{r as b}from"./index-TT1qJ6UJ.js";import{P as H}from"./i18n-context-P5sgPFep.js";var n=[];for(var y=0;y<256;++y)n.push((y+256).toString(16).slice(1));function N(a,e=0){return(n[a[e+0]]+n[a[e+1]]+n[a[e+2]]+n[a[e+3]]+"-"+n[a[e+4]]+n[a[e+5]]+"-"+n[a[e+6]]+n[a[e+7]]+"-"+n[a[e+8]]+n[a[e+9]]+"-"+n[a[e+10]]+n[a[e+11]]+n[a[e+12]]+n[a[e+13]]+n[a[e+14]]+n[a[e+15]]).toLowerCase()}var p,M=new Uint8Array(16);function j(){if(!p&&(p=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!p))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return p(M)}var Z=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const w={randomUUID:Z};function $(a,e,t){if(w.randomUUID&&!e&&!a)return w.randomUUID();a=a||{};var r=a.random||(a.rng||j)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(var s=0;s<16;++s)e[t+s]=r[s];return e}return N(r)}const z=S.StyleSheet.create({srOnly:{border:0,clip:"rect(0,0,0,0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}}),G=(a,e)=>{let t=null;return(...r)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{a(...r)},e)}},u=class u extends b.Component{constructor(){super(...arguments),this.__mathFieldWrapperRef=null,this.__mathField=null,this.state={focused:!1,keypadOpen:this.props.buttonsVisible==="always",cursorContext:A.NONE},this.insert=e=>{const t=this.mathField(),{locale:r}=this.context,o={...x(r,this.context.strings),FRAC:d=>{const F=d.latex();d.typedText("/"),d.latex()===F&&d.cmd("\\frac")}}[e];if(o){o(t,e),t==null||t.focus();return}L(e).isFunction()?e(t):e[0]==="\\"?t==null||t.cmd(e).focus():t==null||t.write(e).focus(),t==null||t.focus()},this.mathField=()=>{var e;if(!this.__mathField&&this.__mathFieldWrapperRef){const{locale:t}=this.context;this.__mathField=K(this.__mathFieldWrapperRef,t,this.props.mathInputStrings,r=>({...r,handlers:{edit:G(s=>{let o=s.latex();if(o=o.replace(/<>/g,"\\ne"),V(t,this.props.convertDotToTimes)){o=o.replace(/\\cdot/g,"\\times");const d=s.cursor()[_.L];d&&d.ctrlSeq==="\\cdot "&&(s.controller().backspace(),s.cmd("\\times"))}else o=o.replace(/\\times/g,"\\cdot");this.props.value!==o&&this.props.onChange(o),this.setState({cursorContext:h(s)})},100),enter:()=>{this.__mathFieldWrapperRef&&P(this.__mathFieldWrapperRef).submit()},upOutOf:s=>{s.typedText("^")}}}))}return(e=this.__mathField)==null||e.setAriaLabel(this.props.ariaLabel),this.__mathField},this.focus=()=>{var e;(e=this.mathField())==null||e.focus(),this.setState({focused:!0})},this.blur=()=>this.setState({focused:!1}),this.handleKeypadPress=(e,t)=>{const{locale:r}=this.context,s=x(r,this.context.strings)[e],o=this.mathField();o&&(s&&s(o,e),this.setState({cursorContext:h(o)})),t.type==="click"&&this.focus()}}componentDidMount(){var e;(e=this.mathField())==null||e.latex(this.props.value)}openKeypad(){this.props.buttonsVisible!=="never"&&this.setState({keypadOpen:!0})}closeKeypad(){this.setState({keypadOpen:!1})}render(){let e=I({"perseus-math-input":!0,"mq-editable-field":!0,"mq-math-mode":!0});const t=$().slice(0,8);return this.props.className&&(e=e+" "+this.props.className),i(R,{style:[c.outerWrapper,this.state.focused&&c.wrapperFocused,this.props.hasError&&c.wrapperError],children:v("div",{style:{display:"flex",padding:1},onClick:r=>{r.stopPropagation();const s=this.mathField();s&&this.setState({cursorContext:h(s)})},children:[i("span",{className:e,ref:r=>this.__mathFieldWrapperRef=r,onFocus:()=>this.focus(),onBlur:()=>this.blur()}),i(O,{rootBoundary:"document",opened:this.state.keypadOpen,onClose:()=>this.closeKeypad(),dismissEnabled:!0,"aria-label":this.context.strings.mathInputTitle,"aria-describedby":`popover-content-${t}`,content:()=>{var r;return v(q,{children:[i(W,{id:`popover-content-${t}`,style:z.srOnly,children:this.context.strings.mathInputDescription}),i(U,{closeButtonVisible:!0,style:c.popoverContent,children:i(B,{onAnalyticsEvent:this.props.onAnalyticsEvent,extraKeys:this.props.extraKeys,onClickKey:this.handleKeypadPress,cursorContext:this.state.cursorContext,convertDotToTimes:this.props.convertDotToTimes,...this.props.keypadButtonSets??J((r=this.props)==null?void 0:r.buttonSets)})})]})},children:this.props.buttonsVisible==="never"?i(C,{hovered:!1,focused:!1,active:!1}):i(D,{"aria-label":this.state.keypadOpen?this.context.strings.closeKeypad:this.context.strings.openKeypad,role:"button",onClick:()=>this.state.keypadOpen?this.closeKeypad():this.openKeypad(),children:r=>i(C,{active:this.state.keypadOpen,...r})})})]})})}};u.contextType=H,u.defaultProps={value:"",convertDotToTimes:!1};let f=u;const m=class m extends b.Component{constructor(){super(...arguments),this.inputRef=b.createRef()}blur(){var e;(e=this.inputRef.current)==null||e.blur()}focus(){var e;(e=this.inputRef.current)==null||e.focus()}insert(e){var t;(t=this.inputRef.current)==null||t.insert(e)}render(){return i(f,{...this.props,ref:this.inputRef,mathInputStrings:this.context.strings})}};m.contextType=E,m.defaultProps={ariaLabel:"Math input"};let g=m;const C=({hovered:a,focused:e,active:t})=>{let r;switch(!0){case(e||t):r=l.white;break;case a:r=l.blue;break;default:r=l.offBlack;break}const s=t||e?c.iconActive:c.iconInactive;return i(R,{style:[c.iconContainer,s],children:i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:r,viewBox:"0 0 256 256",children:i("path",{d:"M112,72a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16h64A8,8,0,0,1,112,72Zm-8,104H80V152a8,8,0,0,0-16,0v24H40a8,8,0,0,0,0,16H64v24a8,8,0,0,0,16,0V192h24a8,8,0,0,0,0-16Zm48,0h64a8,8,0,0,0,0-16H152a8,8,0,0,0,0,16Zm64,16H152a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm-61.66-90.34a8,8,0,0,0,11.32,0L184,83.31l18.34,18.35a8,8,0,0,0,11.32-11.32L195.31,72l18.35-18.34a8,8,0,0,0-11.32-11.32L184,60.69,165.66,42.34a8,8,0,0,0-11.32,11.32L172.69,72,154.34,90.34A8,8,0,0,0,154.34,101.66Z"})})})},J=a=>{const e={};return a&&a.forEach(t=>{switch(t){case"advanced relations":e.advancedRelations=!0;break;case"basic relations":e.basicRelations=!0;break;case"basic+div":e.divisionKey=!0;break;case"logarithms":e.logarithms=!0;break;case"prealgebra":e.preAlgebra=!0;break;case"trig":e.trigonometry=!0;break}}),e},T={borderWidth:2,borderColor:l.blue,margin:-1},c=S.StyleSheet.create({iconContainer:{display:"flex",justifyContent:"center",height:"100%",padding:k.xxxSmall_4,borderRadius:1},iconInactive:{border:"2px solid transparent",backgroundColor:l.offBlack8},iconActive:{border:`2px solid ${l.white}`,backgroundColor:l.offBlack64},outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:l.offBlack50,borderRadius:3,background:l.white,":hover":T},wrapperFocused:T,wrapperError:{borderColor:l.red,background:l.fadedRed8,":hover":{borderColor:l.red}},popoverContent:{padding:0,paddingBottom:k.xxSmall_6,maxWidth:"initial"}});g.__docgenInfo={description:"",methods:[{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"insert",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:{name:"any"}}],returns:null}],displayName:"MathInput",props:{className:{required:!1,tsType:{name:"string"},description:""},value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""},convertDotToTimes:{required:!0,tsType:{name:"boolean"},description:""},buttonSets:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:`| "basic" | "basic+div" | "trig" | "prealgebra" diff --git a/assets/math-input.stories-OWlCE0fl.js b/assets/math-input.stories-OWlCE0fl.js index fa950cf68a..3bb1ef9e12 100644 --- a/assets/math-input.stories-OWlCE0fl.js +++ b/assets/math-input.stories-OWlCE0fl.js @@ -1,4 +1,4 @@ -import{a as y}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{M as h}from"./math-input-JZMGF6RZ.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-SKtvHVtl.js";import"./version-akiLXZts.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./i18n-context-P5sgPFep.js";const er={title:"Perseus/Components/Math Input",component:h,args:{keypadButtonSets:{advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,preAlgebra:!0,trigonometry:!0},convertDotToTimes:!1,value:"",onChange:y("onChange"),analytics:{onAnalyticsEvent:()=>Promise.resolve()},labelText:"Math input"},argTypes:{onChange:{control:{type:null}},analytics:{control:{type:null}}},parameters:{controls:{exclude:["onChange","analytics"]}}},r={},t={args:{ariaLabel:"Sample label"}},e={args:{buttonsVisible:"always"}},o={args:{buttonsVisible:"never"}};var a,s,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(i=(s=r.parameters)==null?void 0:s.docs)==null?void 0:i.source}}};var p,m,n;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{a as y}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{M as h}from"./math-input-JZMGF6RZ.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-SKtvHVtl.js";import"./version-akiLXZts.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./i18n-context-P5sgPFep.js";const er={title:"Perseus/Components/Math Input",component:h,args:{keypadButtonSets:{advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,preAlgebra:!0,trigonometry:!0},convertDotToTimes:!1,value:"",onChange:y("onChange"),analytics:{onAnalyticsEvent:()=>Promise.resolve()},labelText:"Math input"},argTypes:{onChange:{control:{type:null}},analytics:{control:{type:null}}},parameters:{controls:{exclude:["onChange","analytics"]}}},r={},t={args:{ariaLabel:"Sample label"}},e={args:{buttonsVisible:"always"}},o={args:{buttonsVisible:"never"}};var a,s,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(i=(s=r.parameters)==null?void 0:s.docs)==null?void 0:i.source}}};var p,m,n;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`{ args: { ariaLabel: "Sample label" } diff --git a/assets/matrix.stories-7qJn-u40.js b/assets/matrix.stories-gqmC17kf.js similarity index 66% rename from assets/matrix.stories-7qJn-u40.js rename to assets/matrix.stories-gqmC17kf.js index b0439f7836..2078129109 100644 --- a/assets/matrix.stories-7qJn-u40.js +++ b/assets/matrix.stories-gqmC17kf.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const e={content:`**Perform the row operation, $R_3 \\leftrightarrow R_2$, on the following matrix.** +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const e={content:`**Perform the row operation, $R_3 \\leftrightarrow R_2$, on the following matrix.** $\\left[\\begin{array} {ccc} 5 & -2 & 1 & 1 \\\\ diff --git a/assets/multi-items-JojuRZeA.js b/assets/multi-items-MiSsRMrN.js similarity index 94% rename from assets/multi-items-JojuRZeA.js rename to assets/multi-items-MiSsRMrN.js index 9b9a8fa695..0133ed8581 100644 --- a/assets/multi-items-JojuRZeA.js +++ b/assets/multi-items-MiSsRMrN.js @@ -1 +1 @@ -import{M as s,s as p,b as a,f,a as u,i as y}from"./multi-renderer-Dj-_XIAo.js";import"./version-akiLXZts.js";import{P as c,E as m}from"./util-F8-MDmsT.js";import{P as e}from"./index-k-0mNqHS.js";function d(t){return e.oneOfType([e.shape({_multi:n(t)}),e.oneOf([null,void 0])])}function n(t){if(t.type==="content")return e.shape({__type:e.oneOf(["content","item"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any)});if(t.type==="hint")return e.shape({__type:e.oneOf(["hint"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any),replace:e.bool});if(t.type==="tags")return e.arrayOf(e.string.isRequired);if(t.type==="array"){const r=n(t.elementShape);return e.arrayOf(r.isRequired)}if(t.type==="object"){const r=t.shape,o={};return Object.keys(r).forEach(i=>{o[i]=n(r[i]).isRequired}),e.shape(o)}throw new c(`unexpected shape type ${t.type}`,m.InvalidInput)}const I={MultiRenderer:s,shapes:p,buildPropTypeForShape:d,buildEmptyItemForShape:a,findContentNodesInItem:f,findHintNodesInItem:u,inferItemShape:y};export{I as M}; +import{M as s,s as p,b as a,f,a as u,i as y}from"./multi-renderer-la0A-h33.js";import"./version-akiLXZts.js";import{P as c,E as m}from"./util-F8-MDmsT.js";import{P as e}from"./index-k-0mNqHS.js";function d(t){return e.oneOfType([e.shape({_multi:n(t)}),e.oneOf([null,void 0])])}function n(t){if(t.type==="content")return e.shape({__type:e.oneOf(["content","item"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any)});if(t.type==="hint")return e.shape({__type:e.oneOf(["hint"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any),replace:e.bool});if(t.type==="tags")return e.arrayOf(e.string.isRequired);if(t.type==="array"){const r=n(t.elementShape);return e.arrayOf(r.isRequired)}if(t.type==="object"){const r=t.shape,o={};return Object.keys(r).forEach(i=>{o[i]=n(r[i]).isRequired}),e.shape(o)}throw new c(`unexpected shape type ${t.type}`,m.InvalidInput)}const I={MultiRenderer:s,shapes:p,buildPropTypeForShape:d,buildEmptyItemForShape:a,findContentNodesInItem:f,findHintNodesInItem:u,inferItemShape:y};export{I as M}; diff --git a/assets/multi-renderer-Dj-_XIAo.js b/assets/multi-renderer-la0A-h33.js similarity index 99% rename from assets/multi-renderer-Dj-_XIAo.js rename to assets/multi-renderer-la0A-h33.js index 843fd4880f..5cc1203801 100644 --- a/assets/multi-renderer-Dj-_XIAo.js +++ b/assets/multi-renderer-la0A-h33.js @@ -1,4 +1,4 @@ -import{a as M}from"./version-akiLXZts.js";import{w as D}from"./article-renderer-GCz9idJ2.js";import{r as H,k as V,l as G,R as N,p as E}from"./renderer-VfFjn7ah.js";import{j as u,a as K}from"./jsx-runtime-FVsy8kgq.js";import{l as R}from"./index-awljIyHI.js";import{r as A}from"./index-TT1qJ6UJ.js";import{_ as j}from"./jquery-yG1GhClm.js";import{c as B}from"./asset-context-I7yIqWki.js";import{P as _}from"./i18n-context-P5sgPFep.js";import{D as L}from"./dependencies-8XILypbq.js";import{H as W}from"./hints-renderer-PJ9GMfp4.js";import{A as Q}from"./perseus-api-Nq3s7IMx.js";import{U as h,P as g,E as y}from"./util-F8-MDmsT.js";import{L as Z}from"./svg-image-vbtSDKh6.js";const J="@khanacademy/perseus",X="__lib_version__";M(J,X);const Y={major:0,minor:1};H(D);const ee=V();ee["::renderer::"]=Y;const re={onRendered:t=>{}},te=A.createContext(re),T=class T extends A.Component{constructor(e){super(e),this._handleFocusChange=(r,n)=>{r!=null?this._setCurrentFocus(r):this._onRendererBlur(n)},this.handleInteractWithWidget=r=>{var a,i;const n=j.difference(this.state.questionHighlightedWidgets,[r]);this.setState({questionCompleted:!1,questionHighlightedWidgets:n}),(i=(a=this.props.apiOptions)==null?void 0:a.interactionCallback)==null||i.call(a,this.questionRenderer.getUserInputMap())},this.setAssetStatus=(r,n)=>{const a={...this.state.assetStatuses,[r]:n};this.setState({assetStatuses:a})},this.state={questionCompleted:!1,questionHighlightedWidgets:[],assetStatuses:{}},this._fullyRendered=!1}componentDidMount(){this._currentFocus=null,this._fullyRendered=!1}UNSAFE_componentWillReceiveProps(e){this.setState({questionHighlightedWidgets:[]})}componentDidUpdate(e,r){if(this.props.apiOptions.answerableCallback){const n=this.questionRenderer.emptyWidgets().length===0,{answerableCallback:a}=this.props.apiOptions;a&&a(n)}this._fullyRendered||Object.values(this.state.assetStatuses).every(Boolean)&&(this._fullyRendered=!0,this.props.onRendered(!0))}componentWillUnmount(){this.blurTimeoutID!=null&&(clearTimeout(this.blurTimeoutID),this.blurTimeoutID=null)}_setCurrentFocus(e){const{apiOptions:{isMobile:r,onFocusChange:n},keypadElement:a}=this.props,i=this._currentFocus;this._currentFocus=e;const s=this.getInputPaths(),o=this._currentFocus&&s.some(d=>h.inputPathsEqual(d,this._currentFocus));n!=null&&setTimeout(()=>{const d=a==null?void 0:a.getDOMNode(),w=d&&o?d.getBoundingClientRect().height:0;n(this._currentFocus,i,w,o&&this.questionRenderer.getDOMNodeForPath(e))},0),a&&r&&(o?a.activate():a.dismiss())}_onRendererBlur(e){const r=this._currentFocus;j.isEqual(e,r)&&(this.blurTimeoutID=setTimeout(()=>{j.isEqual(this._currentFocus,r)&&this._setCurrentFocus(null)},0))}_setWidgetProps(e,r,n){this.questionRenderer._setWidgetProps(e,r,n)}setInputValue(e,r,n){return this.questionRenderer.setInputValue(e,r,n)}focusPath(e){return this.questionRenderer.focusPath(e)}blurPath(e){return this.questionRenderer.blurPath(e)}getDOMNodeForPath(e){return this.questionRenderer.getDOMNodeForPath(e)}getInputPaths(){return this.questionRenderer.getInputPaths()}focus(){return this.questionRenderer.focus()}blur(){this._currentFocus&&this.blurPath(this._currentFocus)}getNumHints(){return this.props.item.hints.length}scoreInput(){const e=this.questionRenderer.guessAndScore(),r=e[0],n=e[1],a=[r,[]],i=h.keScoreFromPerseusScore(n,a,this.questionRenderer.getSerializedState()),s=this.questionRenderer.emptyWidgets();return this.setState({questionCompleted:i.correct,questionHighlightedWidgets:s}),i}getWidgetIds(){return this.questionRenderer.getWidgetIds()}getSerializedState(){return{question:this.questionRenderer.getSerializedState(),hints:this.hintsRenderer.getSerializedState()}}restoreSerializedState(e,r){let n=2;const a=()=>{--n,r&&n===0&&r()};this.questionRenderer.restoreSerializedState(e.question,a),this.hintsRenderer.restoreSerializedState(e.hints,a)}showRationalesForCurrentlySelectedChoices(){this.questionRenderer.showRationalesForCurrentlySelectedChoices()}deselectIncorrectSelectedChoices(){this.questionRenderer.deselectIncorrectSelectedChoices()}render(){const e={...Q.defaults,...this.props.apiOptions,onFocusChange:this._handleFocusChange},r={assetStatuses:this.state.assetStatuses,setAssetStatus:this.setAssetStatus},n=u(B.Provider,{value:r,children:u(N,{keypadElement:this.props.keypadElement,problemNum:this.props.problemNum,onInteractWithWidget:this.handleInteractWithWidget,highlightedWidgets:this.state.questionHighlightedWidgets,apiOptions:e,questionCompleted:this.state.questionCompleted,reviewMode:this.props.reviewMode,showSolutions:this.props.showSolutions,ref:i=>{i!=null&&(this.questionRenderer=i)},content:this.props.item.question.content,widgets:this.props.item.question.widgets,images:this.props.item.question.images,linterContext:E(this.props.linterContext,"question"),strings:this.context.strings,...this.props.dependencies})}),a=u(W,{hints:this.props.item.hints,hintsVisible:this.props.hintsVisible,apiOptions:e,ref:i=>this.hintsRenderer=i,linterContext:E(this.props.linterContext,"hints"),strings:this.context.strings});return u(L.Provider,{value:this.props.dependencies,children:K("div",{children:[u("div",{children:n}),u("div",{className:e.isMobile?void 0:R.css(ne.hintsContainer),children:a})]})})}};T.contextType=_,T.defaultProps={apiOptions:{},linterContext:G,onRendered:e=>{}};let k=T;const ne=R.StyleSheet.create({hintsContainer:{marginLeft:50}}),ae=A.forwardRef((t,e)=>u(te.Consumer,{children:({onRendered:r})=>u(k,{...t,onRendered:r,ref:e})}));k.__docgenInfo={description:"",methods:[{name:"_handleFocusChange",docblock:null,modifiers:[],params:[{name:"newFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}},{name:"oldFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_setCurrentFocus",docblock:null,modifiers:[],params:[{name:"newFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_onRendererBlur",docblock:null,modifiers:[],params:[{name:"blurPath",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_setWidgetProps",docblock:`Accepts a question area widgetId, or an answer area widgetId of +import{a as M}from"./version-akiLXZts.js";import{w as D}from"./article-renderer-ub6lGcPc.js";import{r as H,k as V,l as G,R as N,p as E}from"./renderer-JG1Z7r2S.js";import{j as u,a as K}from"./jsx-runtime-FVsy8kgq.js";import{l as R}from"./index-awljIyHI.js";import{r as A}from"./index-TT1qJ6UJ.js";import{_ as j}from"./jquery-yG1GhClm.js";import{c as B}from"./asset-context-I7yIqWki.js";import{P as _}from"./i18n-context-P5sgPFep.js";import{D as L}from"./dependencies-d8cZibFS.js";import{H as W}from"./hints-renderer-eYcfi__L.js";import{A as Q}from"./perseus-api-Nq3s7IMx.js";import{U as h,P as g,E as y}from"./util-F8-MDmsT.js";import{L as Z}from"./svg-image-4Vh9uTQ6.js";const J="@khanacademy/perseus",X="__lib_version__";M(J,X);const Y={major:0,minor:1};H(D);const ee=V();ee["::renderer::"]=Y;const re={onRendered:t=>{}},te=A.createContext(re),T=class T extends A.Component{constructor(e){super(e),this._handleFocusChange=(r,n)=>{r!=null?this._setCurrentFocus(r):this._onRendererBlur(n)},this.handleInteractWithWidget=r=>{var a,i;const n=j.difference(this.state.questionHighlightedWidgets,[r]);this.setState({questionCompleted:!1,questionHighlightedWidgets:n}),(i=(a=this.props.apiOptions)==null?void 0:a.interactionCallback)==null||i.call(a,this.questionRenderer.getUserInputMap())},this.setAssetStatus=(r,n)=>{const a={...this.state.assetStatuses,[r]:n};this.setState({assetStatuses:a})},this.state={questionCompleted:!1,questionHighlightedWidgets:[],assetStatuses:{}},this._fullyRendered=!1}componentDidMount(){this._currentFocus=null,this._fullyRendered=!1}UNSAFE_componentWillReceiveProps(e){this.setState({questionHighlightedWidgets:[]})}componentDidUpdate(e,r){if(this.props.apiOptions.answerableCallback){const n=this.questionRenderer.emptyWidgets().length===0,{answerableCallback:a}=this.props.apiOptions;a&&a(n)}this._fullyRendered||Object.values(this.state.assetStatuses).every(Boolean)&&(this._fullyRendered=!0,this.props.onRendered(!0))}componentWillUnmount(){this.blurTimeoutID!=null&&(clearTimeout(this.blurTimeoutID),this.blurTimeoutID=null)}_setCurrentFocus(e){const{apiOptions:{isMobile:r,onFocusChange:n},keypadElement:a}=this.props,i=this._currentFocus;this._currentFocus=e;const s=this.getInputPaths(),o=this._currentFocus&&s.some(d=>h.inputPathsEqual(d,this._currentFocus));n!=null&&setTimeout(()=>{const d=a==null?void 0:a.getDOMNode(),w=d&&o?d.getBoundingClientRect().height:0;n(this._currentFocus,i,w,o&&this.questionRenderer.getDOMNodeForPath(e))},0),a&&r&&(o?a.activate():a.dismiss())}_onRendererBlur(e){const r=this._currentFocus;j.isEqual(e,r)&&(this.blurTimeoutID=setTimeout(()=>{j.isEqual(this._currentFocus,r)&&this._setCurrentFocus(null)},0))}_setWidgetProps(e,r,n){this.questionRenderer._setWidgetProps(e,r,n)}setInputValue(e,r,n){return this.questionRenderer.setInputValue(e,r,n)}focusPath(e){return this.questionRenderer.focusPath(e)}blurPath(e){return this.questionRenderer.blurPath(e)}getDOMNodeForPath(e){return this.questionRenderer.getDOMNodeForPath(e)}getInputPaths(){return this.questionRenderer.getInputPaths()}focus(){return this.questionRenderer.focus()}blur(){this._currentFocus&&this.blurPath(this._currentFocus)}getNumHints(){return this.props.item.hints.length}scoreInput(){const e=this.questionRenderer.guessAndScore(),r=e[0],n=e[1],a=[r,[]],i=h.keScoreFromPerseusScore(n,a,this.questionRenderer.getSerializedState()),s=this.questionRenderer.emptyWidgets();return this.setState({questionCompleted:i.correct,questionHighlightedWidgets:s}),i}getWidgetIds(){return this.questionRenderer.getWidgetIds()}getSerializedState(){return{question:this.questionRenderer.getSerializedState(),hints:this.hintsRenderer.getSerializedState()}}restoreSerializedState(e,r){let n=2;const a=()=>{--n,r&&n===0&&r()};this.questionRenderer.restoreSerializedState(e.question,a),this.hintsRenderer.restoreSerializedState(e.hints,a)}showRationalesForCurrentlySelectedChoices(){this.questionRenderer.showRationalesForCurrentlySelectedChoices()}deselectIncorrectSelectedChoices(){this.questionRenderer.deselectIncorrectSelectedChoices()}render(){const e={...Q.defaults,...this.props.apiOptions,onFocusChange:this._handleFocusChange},r={assetStatuses:this.state.assetStatuses,setAssetStatus:this.setAssetStatus},n=u(B.Provider,{value:r,children:u(N,{keypadElement:this.props.keypadElement,problemNum:this.props.problemNum,onInteractWithWidget:this.handleInteractWithWidget,highlightedWidgets:this.state.questionHighlightedWidgets,apiOptions:e,questionCompleted:this.state.questionCompleted,reviewMode:this.props.reviewMode,showSolutions:this.props.showSolutions,ref:i=>{i!=null&&(this.questionRenderer=i)},content:this.props.item.question.content,widgets:this.props.item.question.widgets,images:this.props.item.question.images,linterContext:E(this.props.linterContext,"question"),strings:this.context.strings,...this.props.dependencies})}),a=u(W,{hints:this.props.item.hints,hintsVisible:this.props.hintsVisible,apiOptions:e,ref:i=>this.hintsRenderer=i,linterContext:E(this.props.linterContext,"hints"),strings:this.context.strings});return u(L.Provider,{value:this.props.dependencies,children:K("div",{children:[u("div",{children:n}),u("div",{className:e.isMobile?void 0:R.css(ne.hintsContainer),children:a})]})})}};T.contextType=_,T.defaultProps={apiOptions:{},linterContext:G,onRendered:e=>{}};let k=T;const ne=R.StyleSheet.create({hintsContainer:{marginLeft:50}}),ae=A.forwardRef((t,e)=>u(te.Consumer,{children:({onRendered:r})=>u(k,{...t,onRendered:r,ref:e})}));k.__docgenInfo={description:"",methods:[{name:"_handleFocusChange",docblock:null,modifiers:[],params:[{name:"newFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}},{name:"oldFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_setCurrentFocus",docblock:null,modifiers:[],params:[{name:"newFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_onRendererBlur",docblock:null,modifiers:[],params:[{name:"blurPath",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_setWidgetProps",docblock:`Accepts a question area widgetId, or an answer area widgetId of the form "answer-input-number 1", or the string "answer-area" for the whole answer area (if the answer area is a single widget).`,modifiers:[],params:[{name:"widgetId",optional:!1,type:{name:"string"}},{name:"newProps",optional:!1,type:{name:"intersection",raw:"SharedRendererProps & OwnProps & HOCProps",elements:[{name:"signature",type:"object",raw:`{ apiOptions: APIOptions; diff --git a/assets/multi-renderer.stories-7-1fhIB9.js b/assets/multi-renderer.stories-zS8w66-d.js similarity index 99% rename from assets/multi-renderer.stories-7-1fhIB9.js rename to assets/multi-renderer.stories-zS8w66-d.js index 89c4342b2c..4f0139a3c9 100644 --- a/assets/multi-renderer.stories-7-1fhIB9.js +++ b/assets/multi-renderer.stories-zS8w66-d.js @@ -1,4 +1,4 @@ -import{j as e,a as i,F as f}from"./jsx-runtime-FVsy8kgq.js";import{V as t}from"./index-6h5t6F0w.js";import{H as d}from"./index-h_CiYGGb.js";import{l as k}from"./index-awljIyHI.js";import{B as q}from"./choice-I73s7vIV.js";import{r as g}from"./index-TT1qJ6UJ.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import{s as l}from"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{M as T}from"./multi-items-JojuRZeA.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{K as R}from"./ke-score-ui-VwVxZMGJ.js";import{S as A}from"./side-by-side-kGWaKY6T.js";import{s as O}from"./test-dependencies-zutb-QBJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-k-0mNqHS.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./shared-4TdECMLk.js";import"./answer-choices-6SWUlni2.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-Ts3i1VPI.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-0_QL8uoF.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const j=l.shape({blurb:l.content,question:l.content,hints:l.hints}),h={_multi:{blurb:{__type:"content",content:"",images:{},widgets:{}},hints:[{__type:"hint",content:"If two triangles are congruent, then they have the same side lengths and angle measures.",images:{},replace:!1,widgets:{}},{__type:"hint",content:"A triangle congruent to triangle $ABC$ must also have side lengths of $12$, $14$ and $20$.",images:{},replace:!1,widgets:{}},{__type:"hint",content:`The following triangle is congruent to triangle $ABC$: +import{j as e,a as i,F as f}from"./jsx-runtime-FVsy8kgq.js";import{V as t}from"./index-6h5t6F0w.js";import{H as d}from"./index-h_CiYGGb.js";import{l as k}from"./index-awljIyHI.js";import{B as q}from"./choice-I73s7vIV.js";import{r as g}from"./index-TT1qJ6UJ.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import{s as l}from"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{M as T}from"./multi-items-MiSsRMrN.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{K as R}from"./ke-score-ui-VwVxZMGJ.js";import{S as A}from"./side-by-side-kGWaKY6T.js";import{s as O}from"./test-dependencies-fGmEXWK4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-k-0mNqHS.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./shared-4TdECMLk.js";import"./answer-choices-VNdK7gMK.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-MKIRfGVo.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-lqQAegUH.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const j=l.shape({blurb:l.content,question:l.content,hints:l.hints}),h={_multi:{blurb:{__type:"content",content:"",images:{},widgets:{}},hints:[{__type:"hint",content:"If two triangles are congruent, then they have the same side lengths and angle measures.",images:{},replace:!1,widgets:{}},{__type:"hint",content:"A triangle congruent to triangle $ABC$ must also have side lengths of $12$, $14$ and $20$.",images:{},replace:!1,widgets:{}},{__type:"hint",content:`The following triangle is congruent to triangle $ABC$: * A triangle with side lengths of $12$, $14$, and $20$`,images:{},replace:!1,widgets:{}}],question:{__type:"content",content:`Triangle $ABC$ has side lengths of $12$, $14$, and $20$. Which of the following triangles is congruent to triangle $ABC$ ? diff --git a/assets/navigation-pad-ss7r0FKW.js b/assets/navigation-pad-ss7r0FKW.js index ccbe24eae6..d4d475983f 100644 --- a/assets/navigation-pad-ss7r0FKW.js +++ b/assets/navigation-pad-ss7r0FKW.js @@ -1,4 +1,4 @@ -import{j as e,a as b}from"./jsx-runtime-FVsy8kgq.js";import{V as s}from"./index-6h5t6F0w.js";import{c as i}from"./index-deFLJwr4.js";import{l}from"./index-awljIyHI.js";import{B as h,u as f,K as w}from"./button-assets-txIojR3b.js";import{C as k}from"./index-2dmvOE3q.js";function v(o){switch(o){case"UP":return t.up;case"RIGHT":return t.right;case"DOWN":return t.down;case"LEFT":return t.left;default:throw new Error(`Invalid key: ${o}`)}}function d({coord:o,keyConfig:r,onClickKey:u}){const a=r.id,p=v(a);return e(s,{style:{gridColumn:o[0]+1,gridRow:o[1]+1},children:e(k,{onClick:c=>u(r.id,c),style:t.clickable,"aria-label":r.ariaLabel,children:({hovered:c,focused:m,pressed:g})=>e(s,{style:t.outerBoxBase,children:e(s,{style:[t.base,p,c&&t.hovered,m&&t.focused,g&&t.pressed],children:e(h,{id:r.id})})})})})}const n=4,t=l.StyleSheet.create({clickable:{width:"100%",height:"100%",":focus":{outline:"none"}},outerBoxBase:{height:"100%",width:"100%"},base:{boxShadow:`0px 1px 0px ${i.offBlack32}`,display:"flex",justifyContent:"center",alignItems:"center",background:i.white,borderWidth:2,borderColor:i.white},up:{borderTopLeftRadius:n,borderTopRightRadius:n},right:{borderTopRightRadius:n,borderBottomRightRadius:n},down:{borderBottomLeftRadius:n,borderBottomRightRadius:n},left:{borderTopLeftRadius:n,borderBottomLeftRadius:n},hovered:{borderColor:i.blue,boxShadow:"none"},focused:{borderColor:i.blue,boxShadow:"none"},pressed:{border:"2px solid #1B50B3",background:`linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${i.white}`,boxShadow:"none"}});d.__docgenInfo={description:"",methods:[],displayName:"NavigationButton",props:{coord:{required:!0,tsType:{name:"unknown"},description:""},keyConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as e,a as b}from"./jsx-runtime-FVsy8kgq.js";import{V as s}from"./index-6h5t6F0w.js";import{c as i}from"./index-deFLJwr4.js";import{l}from"./index-awljIyHI.js";import{B as h,u as f,K as w}from"./button-assets-txIojR3b.js";import{C as k}from"./index-WNT3sUKf.js";function v(o){switch(o){case"UP":return t.up;case"RIGHT":return t.right;case"DOWN":return t.down;case"LEFT":return t.left;default:throw new Error(`Invalid key: ${o}`)}}function d({coord:o,keyConfig:r,onClickKey:u}){const a=r.id,p=v(a);return e(s,{style:{gridColumn:o[0]+1,gridRow:o[1]+1},children:e(k,{onClick:c=>u(r.id,c),style:t.clickable,"aria-label":r.ariaLabel,children:({hovered:c,focused:m,pressed:g})=>e(s,{style:t.outerBoxBase,children:e(s,{style:[t.base,p,c&&t.hovered,m&&t.focused,g&&t.pressed],children:e(h,{id:r.id})})})})})}const n=4,t=l.StyleSheet.create({clickable:{width:"100%",height:"100%",":focus":{outline:"none"}},outerBoxBase:{height:"100%",width:"100%"},base:{boxShadow:`0px 1px 0px ${i.offBlack32}`,display:"flex",justifyContent:"center",alignItems:"center",background:i.white,borderWidth:2,borderColor:i.white},up:{borderTopLeftRadius:n,borderTopRightRadius:n},right:{borderTopRightRadius:n,borderBottomRightRadius:n},down:{borderBottomLeftRadius:n,borderBottomRightRadius:n},left:{borderTopLeftRadius:n,borderBottomLeftRadius:n},hovered:{borderColor:i.blue,boxShadow:"none"},focused:{borderColor:i.blue,boxShadow:"none"},pressed:{border:"2px solid #1B50B3",background:`linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${i.white}`,boxShadow:"none"}});d.__docgenInfo={description:"",methods:[],displayName:"NavigationButton",props:{coord:{required:!0,tsType:{name:"unknown"},description:""},keyConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{ id: Key; type: KeyType; icon: IconConfig; diff --git a/assets/navigation-pad.stories-qTnieBG4.js b/assets/navigation-pad.stories-qTnieBG4.js index ce908f3c6d..8e83457c7c 100644 --- a/assets/navigation-pad.stories-qTnieBG4.js +++ b/assets/navigation-pad.stories-qTnieBG4.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{a as n}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./navigation-pad-ss7r0FKW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-deFLJwr4.js";import"./button-assets-txIojR3b.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";const N={title:"math-input/components/MathInput v2 Navigation Pad",parameters:{backgrounds:{default:"light background",values:[{name:"light background",value:"lightgrey",default:!0}]}}};function t(){return i("div",{style:{padding:50},children:i(e,{onClickKey:n("onClickKey")})})}t.__docgenInfo={description:"",methods:[],displayName:"basic"};var a,o,r;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`function basic() { +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{a as n}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./navigation-pad-ss7r0FKW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-deFLJwr4.js";import"./button-assets-txIojR3b.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";const N={title:"math-input/components/MathInput v2 Navigation Pad",parameters:{backgrounds:{default:"light background",values:[{name:"light background",value:"lightgrey",default:!0}]}}};function t(){return i("div",{style:{padding:50},children:i(e,{onClickKey:n("onClickKey")})})}t.__docgenInfo={description:"",methods:[],displayName:"basic"};var a,o,r;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`function basic() { return
diff --git a/assets/number-line-editor-g8WyXFkD.js b/assets/number-line-editor-hnXuQMSB.js similarity index 94% rename from assets/number-line-editor-g8WyXFkD.js rename to assets/number-line-editor-hnXuQMSB.js index ab7e758d3d..c6040c2c7e 100644 --- a/assets/number-line-editor-g8WyXFkD.js +++ b/assets/number-line-editor-hnXuQMSB.js @@ -1 +1 @@ -import{a as l,j as i}from"./jsx-runtime-FVsy8kgq.js";import{i as k}from"./util-F8-MDmsT.js";import"./article-renderer-GCz9idJ2.js";import{_ as C}from"./jquery-yG1GhClm.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as w}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{E as R}from"./editor-jsonify-yjAz4UcO.js";import{C as m}from"./index-QCAhLhLD.js";import{P as a}from"./index-0C4KXdeC.js";import{r as S}from"./index-TT1qJ6UJ.js";const{ButtonGroup:q,InfoTip:p,NumberInput:r,RangeInput:T}=w,N=(b,e,n)=>Math.min(Math.max(b,e),n),V="–",c=class c extends S.Component{constructor(){super(...arguments),this.onRangeChange=e=>{this.props.onChange({range:e})},this.onLabelRangeChange=(e,n)=>{let s=this.props.labelRange.slice();const o=s[1-e];n==null||o==null?s[e]=n:s=[Math.min(n,o),Math.max(n,o)],this.props.onChange({labelRange:s})},this.onDivisionRangeChange=e=>{let n=this.props.numDivisions;n=N(n,e[0],e[1]),this.props.onChange({divisionRange:e,numDivisions:n})},this.onNumChange=(e,n)=>{const s={};s[e]=n,this.props.onChange(s)},this.onNumDivisionsChange=e=>{const n=this.props.divisionRange.slice();e=C.isFinite(e)?Math.round(e):0,e=e<0?e*-1:e,e&&(e=Math.min(n[1],Math.max(n[0],e)),this.props.onChange({tickStep:null,divisionRange:n,numDivisions:e}))},this.onTickStepChange=e=>{this.props.onChange({numDivisions:null,tickStep:e})},this.onChangeRelation=e=>{const n=e.target.value;this.props.onChange({correctRel:n,isInequality:n!=="eq"})},this.onLabelStyleChange=e=>{this.props.onChange({labelStyle:e})},this.serialize=()=>R.serialize.call(this)}render(){const e=this.props.range,n=this.props.labelRange,s=this.props.divisionRange;e[0]=+e[0],e[1]=+e[1];const o=e[1]-e[0],y=this.props.numDivisions,u=this.props.snapDivisions,g=this.props.tickStep,d=this.props.isTickCtrl;let h;d?h=null:h=g?g/u:o/y/u;const v=[{value:"decimal",content:"0.75",title:"Decimals"},{value:"improper",content:"⁷⁄₄",title:"Improper fractions"},{value:"mixed",content:"1¾",title:"Mixed numbers"},{value:"non-reduced",content:"⁸⁄₄",title:"Non-reduced"}];return l("div",{className:"perseus-widget-number-line-editor",children:[l("div",{className:"perseus-widget-row",children:["Correct x"," ",l("select",{value:this.props.correctRel,onChange:this.onChangeRelation,"aria-label":"Select relationship",children:[i("option",{value:"eq","aria-label":"Equal",children:"="}),i("option",{value:"lt","aria-label":"Less than",children:"<"}),i("option",{value:"gt","aria-label":"Greater than",children:">"}),i("option",{value:"le","aria-label":"Less than or equal",children:"≤"}),i("option",{value:"ge","aria-label":"Greater than or equal",children:"≥"})]})," ",i(r,{value:this.props.correctX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"correctX"),checkValidity:t=>t>=e[0]&&t<=e[1]&&(!h||k((t-e[0])/h)),placeholder:"answer",size:"normal",useArrowKeys:!0}),i(p,{children:i("p",{children:"This is the correct answer. The answer is validated (as right or wrong) by using only the end position of the point and the relation (=, <, >, ≤, ≥)."})})]}),l("div",{className:"perseus-widget-row",children:[this.props.static?i("label",{children:"Range:"}):l("label",{children:["Position:"," ",i(r,{value:this.props.initialX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"initialX"),placeholder:e[0],checkValidity:t=>t>=e[0]&&t<=e[1],useArrowKeys:!0})," ∈ "]}),i(T,{value:e,onChange:this.onRangeChange,format:this.props.labelStyle,useArrowKeys:!0}),l(p,{children:[l("p",{children:["This controls the initial position of the point along the number line and the",i("strong",{children:"range"}),", the position of the endpoints of the number line. Setting the range constrains the position of the answer and the labels."]}),i("p",{children:"In static mode, the initial position of the point is determined by Correct x instead of position."})]})]}),i("div",{className:"perseus-widget-row",children:l("div",{className:"perseus-widget-left-col",children:["Labels:"," ",i(r,{value:n[0],placeholder:e[0],format:this.props.labelStyle,checkValidity:t=>t>=e[0]&&t<=e[1],onChange:this.onLabelRangeChange.bind(this,0),useArrowKeys:!0}),i("span",{children:" & "}),i(r,{value:n[1],placeholder:e[1],format:this.props.labelStyle,checkValidity:t=>t>=e[0]&&t<=e[1],onChange:this.onLabelRangeChange.bind(this,1),useArrowKeys:!0}),i(p,{children:l("p",{children:["This controls the position of the left / right labels. By default, the labels are set by the range ",i("br",{}),i("strong",{children:"Note:"})," Ensure that the labels line up with the tick marks, or it may be confusing for users."]})})]})}),l("div",{className:"perseus-widget-row",children:["Style:"," ",i(q,{allowEmpty:!1,value:this.props.labelStyle,buttons:v,onChange:this.onLabelStyleChange}),i(p,{children:i("p",{children:"This controls the styling of the labels for the two main labels as well as all the tick mark labels, if applicable. Your choices are decimal, improper fractions, mixed fractions, and non-reduced fractions."})})]}),l("div",{className:"perseus-widget-row",children:[!this.props.static&&i("div",{className:"perseus-widget-left-col",children:i(m,{label:"Show tick controller",checked:this.props.isTickCtrl,onChange:t=>{this.props.onChange({isTickCtrl:t})}})}),i("div",{className:"perseus-widget-right-col",children:i(m,{label:"Show label ticks",checked:this.props.labelTicks,onChange:t=>{this.props.onChange({labelTicks:t})}})})]}),i("div",{className:"perseus-widget-row",children:!this.props.static&&i(m,{label:"Show tooltips",checked:this.props.showTooltips,onChange:t=>{this.props.onChange({showTooltips:t})}})}),l("div",{className:"perseus-widget-row",children:[d&&l("span",{children:[l("label",{children:["Start num divisions at"," ",i(r,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:t=>t>=s[0]&&t<=s[1],placeholder:o/this.props.tickStep,useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This controls the number (and position) of the tick marks. The number of divisions is constrained to"," "+s[0]+V+s[1],".",i("br",{}),i("strong",{children:"Note:"})," The user will be able to specify the number of divisions in a number input."]})})]}),!d&&l("span",{children:[l("label",{children:["Num divisions:"," ",i(r,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:t=>t>=s[0]&&t<=s[1],placeholder:o/this.props.tickStep,useArrowKeys:!0})]})," ",l("label",{children:["or tick step:"," ",i(r,{value:this.props.tickStep||null,format:this.props.labelStyle,onChange:this.onTickStepChange,checkValidity:t=>t>0&&t<=o,placeholder:o/this.props.numDivisions,useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This controls the number (and position) of the tick marks; you can either set the number of divisions (2 divisions would split the entire range in two halves), or the tick step (the distance between ticks) and the other value will be updated accordingly."," ",i("br",{}),i("strong",{children:"Note:"})," There is no check to see if labels coordinate with the tick marks, which may be confusing for users if the blue labels and black ticks are off-step."]})})]})]}),l("div",{className:"perseus-widget-row",children:[l("label",{children:["Snap increments per tick:"," ",i(r,{value:u,checkValidity:t=>t>0,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"snapDivisions"),useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This determines the number of different places the point will snap between two adjacent tick marks."," ",i("br",{}),i("strong",{children:"Note:"}),"Ensure the required number of snap increments is provided to answer the question."]})})]})]})}};c.propTypes={range:a.arrayOf(a.number).isRequired,labelRange:a.arrayOf(a.number).isRequired,labelStyle:a.string.isRequired,labelTicks:a.bool,divisionRange:a.arrayOf(a.number).isRequired,numDivisions:a.number.isRequired,snapDivisions:a.number,tickStep:a.number,correctRel:a.oneOf(["lt","gt","le","ge","eq"]),correctX:a.number,initialX:a.number,isTickCtrl:a.bool,onChange:a.func.isRequired,static:a.bool,showTooltips:a.bool},c.widgetName="number-line",c.defaultProps={range:[0,10],labelRange:[null,null],labelStyle:"decimal",labelTicks:!0,divisionRange:[1,12],numDivisions:5,snapDivisions:2,tickStep:null,correctRel:"eq",correctX:null,initialX:null,showTooltips:!1};let f=c;f.__docgenInfo={description:"",methods:[{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"onLabelRangeChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"num",optional:!1,type:null}],returns:null},{name:"onDivisionRangeChange",docblock:null,modifiers:[],params:[{name:"divisionRange",optional:!1,type:null}],returns:null},{name:"onNumChange",docblock:null,modifiers:[],params:[{name:"key",optional:!1,type:null},{name:"value",optional:!1,type:null}],returns:null},{name:"onNumDivisionsChange",docblock:null,modifiers:[],params:[{name:"numDivisions",optional:!1,type:null}],returns:null},{name:"onTickStepChange",docblock:null,modifiers:[],params:[{name:"tickStep",optional:!1,type:null}],returns:null},{name:"onChangeRelation",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onLabelStyleChange",docblock:null,modifiers:[],params:[{name:"labelStyle",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumberLineEditor",props:{range:{defaultValue:{value:"[0, 10]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelRange:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelStyle:{defaultValue:{value:'"decimal"',computed:!1},description:"",type:{name:"string"},required:!1},labelTicks:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},divisionRange:{defaultValue:{value:"[1, 12]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},numDivisions:{defaultValue:{value:"5",computed:!1},description:"",type:{name:"number"},required:!1},snapDivisions:{defaultValue:{value:"2",computed:!1},description:"",type:{name:"number"},required:!1},tickStep:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},correctRel:{defaultValue:{value:'"eq"',computed:!1},description:"",type:{name:"enum",value:[{value:'"lt"',computed:!1},{value:'"gt"',computed:!1},{value:'"le"',computed:!1},{value:'"ge"',computed:!1},{value:'"eq"',computed:!1}]},required:!1},correctX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},initialX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},showTooltips:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isTickCtrl:{description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!0},static:{description:"",type:{name:"bool"},required:!1}}};export{f as N}; +import{a as l,j as i}from"./jsx-runtime-FVsy8kgq.js";import{i as k}from"./util-F8-MDmsT.js";import"./article-renderer-ub6lGcPc.js";import{_ as C}from"./jquery-yG1GhClm.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as w}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{E as R}from"./editor-jsonify-4Li1SRv8.js";import{C as m}from"./index-QCAhLhLD.js";import{P as a}from"./index-0C4KXdeC.js";import{r as S}from"./index-TT1qJ6UJ.js";const{ButtonGroup:q,InfoTip:p,NumberInput:r,RangeInput:T}=w,N=(b,e,n)=>Math.min(Math.max(b,e),n),V="–",c=class c extends S.Component{constructor(){super(...arguments),this.onRangeChange=e=>{this.props.onChange({range:e})},this.onLabelRangeChange=(e,n)=>{let s=this.props.labelRange.slice();const o=s[1-e];n==null||o==null?s[e]=n:s=[Math.min(n,o),Math.max(n,o)],this.props.onChange({labelRange:s})},this.onDivisionRangeChange=e=>{let n=this.props.numDivisions;n=N(n,e[0],e[1]),this.props.onChange({divisionRange:e,numDivisions:n})},this.onNumChange=(e,n)=>{const s={};s[e]=n,this.props.onChange(s)},this.onNumDivisionsChange=e=>{const n=this.props.divisionRange.slice();e=C.isFinite(e)?Math.round(e):0,e=e<0?e*-1:e,e&&(e=Math.min(n[1],Math.max(n[0],e)),this.props.onChange({tickStep:null,divisionRange:n,numDivisions:e}))},this.onTickStepChange=e=>{this.props.onChange({numDivisions:null,tickStep:e})},this.onChangeRelation=e=>{const n=e.target.value;this.props.onChange({correctRel:n,isInequality:n!=="eq"})},this.onLabelStyleChange=e=>{this.props.onChange({labelStyle:e})},this.serialize=()=>R.serialize.call(this)}render(){const e=this.props.range,n=this.props.labelRange,s=this.props.divisionRange;e[0]=+e[0],e[1]=+e[1];const o=e[1]-e[0],y=this.props.numDivisions,u=this.props.snapDivisions,g=this.props.tickStep,d=this.props.isTickCtrl;let h;d?h=null:h=g?g/u:o/y/u;const v=[{value:"decimal",content:"0.75",title:"Decimals"},{value:"improper",content:"⁷⁄₄",title:"Improper fractions"},{value:"mixed",content:"1¾",title:"Mixed numbers"},{value:"non-reduced",content:"⁸⁄₄",title:"Non-reduced"}];return l("div",{className:"perseus-widget-number-line-editor",children:[l("div",{className:"perseus-widget-row",children:["Correct x"," ",l("select",{value:this.props.correctRel,onChange:this.onChangeRelation,"aria-label":"Select relationship",children:[i("option",{value:"eq","aria-label":"Equal",children:"="}),i("option",{value:"lt","aria-label":"Less than",children:"<"}),i("option",{value:"gt","aria-label":"Greater than",children:">"}),i("option",{value:"le","aria-label":"Less than or equal",children:"≤"}),i("option",{value:"ge","aria-label":"Greater than or equal",children:"≥"})]})," ",i(r,{value:this.props.correctX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"correctX"),checkValidity:t=>t>=e[0]&&t<=e[1]&&(!h||k((t-e[0])/h)),placeholder:"answer",size:"normal",useArrowKeys:!0}),i(p,{children:i("p",{children:"This is the correct answer. The answer is validated (as right or wrong) by using only the end position of the point and the relation (=, <, >, ≤, ≥)."})})]}),l("div",{className:"perseus-widget-row",children:[this.props.static?i("label",{children:"Range:"}):l("label",{children:["Position:"," ",i(r,{value:this.props.initialX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"initialX"),placeholder:e[0],checkValidity:t=>t>=e[0]&&t<=e[1],useArrowKeys:!0})," ∈ "]}),i(T,{value:e,onChange:this.onRangeChange,format:this.props.labelStyle,useArrowKeys:!0}),l(p,{children:[l("p",{children:["This controls the initial position of the point along the number line and the",i("strong",{children:"range"}),", the position of the endpoints of the number line. Setting the range constrains the position of the answer and the labels."]}),i("p",{children:"In static mode, the initial position of the point is determined by Correct x instead of position."})]})]}),i("div",{className:"perseus-widget-row",children:l("div",{className:"perseus-widget-left-col",children:["Labels:"," ",i(r,{value:n[0],placeholder:e[0],format:this.props.labelStyle,checkValidity:t=>t>=e[0]&&t<=e[1],onChange:this.onLabelRangeChange.bind(this,0),useArrowKeys:!0}),i("span",{children:" & "}),i(r,{value:n[1],placeholder:e[1],format:this.props.labelStyle,checkValidity:t=>t>=e[0]&&t<=e[1],onChange:this.onLabelRangeChange.bind(this,1),useArrowKeys:!0}),i(p,{children:l("p",{children:["This controls the position of the left / right labels. By default, the labels are set by the range ",i("br",{}),i("strong",{children:"Note:"})," Ensure that the labels line up with the tick marks, or it may be confusing for users."]})})]})}),l("div",{className:"perseus-widget-row",children:["Style:"," ",i(q,{allowEmpty:!1,value:this.props.labelStyle,buttons:v,onChange:this.onLabelStyleChange}),i(p,{children:i("p",{children:"This controls the styling of the labels for the two main labels as well as all the tick mark labels, if applicable. Your choices are decimal, improper fractions, mixed fractions, and non-reduced fractions."})})]}),l("div",{className:"perseus-widget-row",children:[!this.props.static&&i("div",{className:"perseus-widget-left-col",children:i(m,{label:"Show tick controller",checked:this.props.isTickCtrl,onChange:t=>{this.props.onChange({isTickCtrl:t})}})}),i("div",{className:"perseus-widget-right-col",children:i(m,{label:"Show label ticks",checked:this.props.labelTicks,onChange:t=>{this.props.onChange({labelTicks:t})}})})]}),i("div",{className:"perseus-widget-row",children:!this.props.static&&i(m,{label:"Show tooltips",checked:this.props.showTooltips,onChange:t=>{this.props.onChange({showTooltips:t})}})}),l("div",{className:"perseus-widget-row",children:[d&&l("span",{children:[l("label",{children:["Start num divisions at"," ",i(r,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:t=>t>=s[0]&&t<=s[1],placeholder:o/this.props.tickStep,useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This controls the number (and position) of the tick marks. The number of divisions is constrained to"," "+s[0]+V+s[1],".",i("br",{}),i("strong",{children:"Note:"})," The user will be able to specify the number of divisions in a number input."]})})]}),!d&&l("span",{children:[l("label",{children:["Num divisions:"," ",i(r,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:t=>t>=s[0]&&t<=s[1],placeholder:o/this.props.tickStep,useArrowKeys:!0})]})," ",l("label",{children:["or tick step:"," ",i(r,{value:this.props.tickStep||null,format:this.props.labelStyle,onChange:this.onTickStepChange,checkValidity:t=>t>0&&t<=o,placeholder:o/this.props.numDivisions,useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This controls the number (and position) of the tick marks; you can either set the number of divisions (2 divisions would split the entire range in two halves), or the tick step (the distance between ticks) and the other value will be updated accordingly."," ",i("br",{}),i("strong",{children:"Note:"})," There is no check to see if labels coordinate with the tick marks, which may be confusing for users if the blue labels and black ticks are off-step."]})})]})]}),l("div",{className:"perseus-widget-row",children:[l("label",{children:["Snap increments per tick:"," ",i(r,{value:u,checkValidity:t=>t>0,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"snapDivisions"),useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This determines the number of different places the point will snap between two adjacent tick marks."," ",i("br",{}),i("strong",{children:"Note:"}),"Ensure the required number of snap increments is provided to answer the question."]})})]})]})}};c.propTypes={range:a.arrayOf(a.number).isRequired,labelRange:a.arrayOf(a.number).isRequired,labelStyle:a.string.isRequired,labelTicks:a.bool,divisionRange:a.arrayOf(a.number).isRequired,numDivisions:a.number.isRequired,snapDivisions:a.number,tickStep:a.number,correctRel:a.oneOf(["lt","gt","le","ge","eq"]),correctX:a.number,initialX:a.number,isTickCtrl:a.bool,onChange:a.func.isRequired,static:a.bool,showTooltips:a.bool},c.widgetName="number-line",c.defaultProps={range:[0,10],labelRange:[null,null],labelStyle:"decimal",labelTicks:!0,divisionRange:[1,12],numDivisions:5,snapDivisions:2,tickStep:null,correctRel:"eq",correctX:null,initialX:null,showTooltips:!1};let f=c;f.__docgenInfo={description:"",methods:[{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"onLabelRangeChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"num",optional:!1,type:null}],returns:null},{name:"onDivisionRangeChange",docblock:null,modifiers:[],params:[{name:"divisionRange",optional:!1,type:null}],returns:null},{name:"onNumChange",docblock:null,modifiers:[],params:[{name:"key",optional:!1,type:null},{name:"value",optional:!1,type:null}],returns:null},{name:"onNumDivisionsChange",docblock:null,modifiers:[],params:[{name:"numDivisions",optional:!1,type:null}],returns:null},{name:"onTickStepChange",docblock:null,modifiers:[],params:[{name:"tickStep",optional:!1,type:null}],returns:null},{name:"onChangeRelation",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onLabelStyleChange",docblock:null,modifiers:[],params:[{name:"labelStyle",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumberLineEditor",props:{range:{defaultValue:{value:"[0, 10]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelRange:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelStyle:{defaultValue:{value:'"decimal"',computed:!1},description:"",type:{name:"string"},required:!1},labelTicks:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},divisionRange:{defaultValue:{value:"[1, 12]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},numDivisions:{defaultValue:{value:"5",computed:!1},description:"",type:{name:"number"},required:!1},snapDivisions:{defaultValue:{value:"2",computed:!1},description:"",type:{name:"number"},required:!1},tickStep:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},correctRel:{defaultValue:{value:'"eq"',computed:!1},description:"",type:{name:"enum",value:[{value:'"lt"',computed:!1},{value:'"gt"',computed:!1},{value:'"le"',computed:!1},{value:'"ge"',computed:!1},{value:'"eq"',computed:!1}]},required:!1},correctX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},initialX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},showTooltips:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isTickCtrl:{description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!0},static:{description:"",type:{name:"bool"},required:!1}}};export{f as N}; diff --git a/assets/number-line-editor.stories-fHVRRBeP.js b/assets/number-line-editor.stories-7t5kjrY9.js similarity index 70% rename from assets/number-line-editor.stories-fHVRRBeP.js rename to assets/number-line-editor.stories-7t5kjrY9.js index 5f7d41a235..3d738149bc 100644 --- a/assets/number-line-editor.stories-fHVRRBeP.js +++ b/assets/number-line-editor.stories-7t5kjrY9.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./number-line-editor-g8WyXFkD.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./article-renderer-GCz9idJ2.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./editor-jsonify-yjAz4UcO.js";import"./index-0C4KXdeC.js";const ro={title:"PerseusEditor/Widgets/Number Line Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./number-line-editor-hnXuQMSB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./article-renderer-ub6lGcPc.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./editor-jsonify-4Li1SRv8.js";import"./index-0C4KXdeC.js";const ro={title:"PerseusEditor/Widgets/Number Line Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const oo=["Default"];export{r as Default,oo as __namedExportsOrder,ro as default}; diff --git a/assets/number-line.stories-_Z4boPoa.js b/assets/number-line.stories-C2zRf4JC.js similarity index 78% rename from assets/number-line.stories-_Z4boPoa.js rename to assets/number-line.stories-C2zRf4JC.js index 94a4862fd6..270e9b77eb 100644 --- a/assets/number-line.stories-_Z4boPoa.js +++ b/assets/number-line.stories-C2zRf4JC.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{a as q}from"./mobile-keypad-wPUeR8mM.js";import{R as m}from"./renderer-with-debug-ui-Ty_P7koE.js";import{S as C}from"./server-item-renderer-with-debug-ui-Idt1fZew.js";import{T as k}from"./test-keypad-context-wrapper-3gH8DCC_.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./choice-I73s7vIV.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./ke-score-ui-VwVxZMGJ.js";import"./test-dependencies-zutb-QBJ.js";import"./chunk-WFFRPTHA-zlNDxfrq.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";const T={content:`$E=2.5$ +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{a as q}from"./mobile-keypad-wPUeR8mM.js";import{R as m}from"./renderer-with-debug-ui-DcZbZSiB.js";import{S as C}from"./server-item-renderer-with-debug-ui-_MpsO46x.js";import{T as k}from"./test-keypad-context-wrapper-3gH8DCC_.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./choice-I73s7vIV.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./ke-score-ui-VwVxZMGJ.js";import"./test-dependencies-fGmEXWK4.js";import"./chunk-WFFRPTHA-zlNDxfrq.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";const T={content:`$E=2.5$ **Move the dot to $-E$ on the number line.** diff --git a/assets/numeric-input-editor-wcLIK9qM.js b/assets/numeric-input-editor-xQu1_JCK.js similarity index 95% rename from assets/numeric-input-editor-wcLIK9qM.js rename to assets/numeric-input-editor-xQu1_JCK.js index 2c94a4f32c..6706214add 100644 --- a/assets/numeric-input-editor-wcLIK9qM.js +++ b/assets/numeric-input-editor-xQu1_JCK.js @@ -1,4 +1,4 @@ -import{a,j as e}from"./jsx-runtime-FVsy8kgq.js";import{c as E}from"./article-renderer-GCz9idJ2.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as F}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as O}from"./components-V6aclUoQ.js";import{i as D}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import{P as z}from"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{E as I}from"./editor-jsonify-yjAz4UcO.js";import{C as y}from"./index-QCAhLhLD.js";import{r as R}from"./index-TT1qJ6UJ.js";import{E as M}from"./editor-Y01VX-A3.js";import{c as P}from"./icon-paths-EoBkHOLI.js";const{ButtonGroup:A,InfoTip:d,InlineIcon:N,MultiButtonGroup:j,NumberInput:v,TextInput:U}=O,{firstNumericalParse:k}=F,V=[{title:"Integers",value:"integer",content:"6"},{title:"Decimals",value:"decimal",content:"0.75"},{title:"Proper fractions",value:"proper",content:"⅗"},{title:"Improper fractions",value:"improper",content:"⁷⁄₄"},{title:"Mixed numbers",value:"mixed",content:"1¾"},{title:"Numbers with π",value:"pi",content:"π"}],b=T=>({value:null,status:T,message:"",simplify:"required",answerForms:[],strict:!1,maxError:null}),m=class m extends R.Component{constructor(p){super(p),this.change=(...t)=>E.apply(this,t),this.onToggleOptions=t=>{const r=this.state.showOptions.slice();r[t]=!r[t],this.setState({showOptions:r})},this.onTrashAnswer=t=>{if(t>=0&&t{t.key===" "&&(t.preventDefault(),r.apply(this,l))},this.onStatusChange=t=>{const r=["wrong","ungraded","correct"],l=this.props.answers,c=o.indexOf(r,l[t].status),u=r[(c+1)%r.length];this.updateAnswer(t,{status:u,simplify:u==="correct"?"required":"accepted"})},this.updateAnswer=(t,r)=>{if(!o.isObject(r))return o.partial((c,u,w)=>{const h={};h[u]=w,this.updateAnswer(c,h)},t,r);let l=[...this.props.answers];if(t===l.length){const c=b(this.state.lastStatus);l=l.concat(c)}l[t]=o.extend({},l[t],r),this.props.onChange({answers:l})},this.addAnswer=()=>{const t=b(this.state.lastStatus),r=this.props.answers.concat(t);this.props.onChange({answers:r})},this.getSaveWarnings=()=>{const t=[];return o.contains(o.pluck(this.props.answers,"value"),"")&&t.push("One or more answers is empty"),this.props.answers.forEach((r,l)=>{r.strict&&(!r.answerForms||r.answerForms.length===0)&&t.push(`Answer ${l+1} is set to string format matching, but no format was selected`)}),t},this.serialize=()=>I.serialize.call(this),this.state={lastStatus:"wrong",showOptions:o.map(this.props.answers,()=>!1)}}render(){const p=this.props.answers,t=n=>a("div",{className:"perseus-widget-row",children:[e("label",{children:"Unsimplified answers are"}),e(A,{value:p[n].simplify,allowEmpty:!1,buttons:[{value:"required",content:"ungraded"},{value:"optional",content:"accepted"},{value:"enforced",content:"wrong"}],onChange:this.updateAnswer(n,"simplify")||(()=>{})}),a(d,{children:[e("p",{children:'Normally select "ungraded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and after)'}),e("p",{children:'Select "accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),a("p",{children:['Select "wrong" ',e("em",{children:"only"})," if we are specifically assessing the ability to simplify."]})]})]}),r=n=>a("div",{children:[a("div",{className:"perseus-widget-row",children:[e("label",{children:"Choose the suggested answer formats"}),e(j,{buttons:V,values:p[n].answerForms,onChange:this.updateAnswer(n,"answerForms")||(()=>{})}),a(d,{children:[e("p",{children:'Formats will be autoselected for you based on the given answer; to show no suggested formats and accept all types, simply have a decimal/integer be the answer. Values with π will have format "pi", and values that are fractions will have some subset (mixed will be "mixed" and "proper"; improper/proper will both be "improper" and "proper"). If you would like to specify that it is only a proper fraction (or only a mixed/improper fraction), deselect the other format. Except for specific cases, you should not need to change the autoselected formats.'}),a("p",{children:["To restrict the answer to ",e("em",{children:"only"}),' an improper fraction (i.e. 7/4), select the improper fraction and toggle "strict" to true. This ',e("b",{children:"will not"})," ","accept 1.75 as an answer."," "]}),e("p",{children:"Unless you are testing that specific skill, please do not restrict the answer format."})]})]}),e("div",{className:"perseus-widget-row",children:e(y,{label:"Strictly match only these formats",checked:p[n].strict,onChange:i=>{this.updateAnswer.bind(this,n)({strict:i})}})})]}),l=n=>e("div",{className:"perseus-widget-row",children:a("label",{children:["Max error"," ",e(v,{className:"max-error",value:p[n].maxError,onChange:this.updateAnswer(n,"maxError"),placeholder:"0"})]})}),c=a("div",{className:"perseus-widget-row",children:[e("label",{children:"Width: "}),e(A,{value:this.props.size,allowEmpty:!1,buttons:[{value:"normal",content:"Normal (80px)"},{value:"small",content:"Small (40px)"}],onChange:this.change("size")}),e(d,{children:e("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),u=e("div",{className:"perseus-widget-row",children:e(y,{label:"Right alignment",checked:this.props.rightAlign,onChange:n=>{this.props.onChange({rightAlign:n})}})}),w=a("div",{className:"perseus-widget-row",children:[a("label",{children:["Aria label",e(U,{value:this.props.labelText,onChange:this.change("labelText")})]}),e(d,{children:e("p",{children:"Text to describe this input. This will be shown to users using screenreaders."})})]}),h=e("div",{children:a("div",{className:"perseus-widget-row",children:[e(y,{label:"Coefficient",checked:this.props.coefficient,onChange:n=>{this.props.onChange({coefficient:n})}}),e(d,{children:e("p",{children:"A coefficient style number allows the student to use - for -1 and an empty string to mean 1."})})]})}),C=e("div",{children:e("a",{href:"#",className:"simple-button orange",onClick:n=>{n.preventDefault(),this.addAnswer()},onKeyDown:n=>this.onSpace(n,this.addAnswer),children:e("span",{children:"Add new answer"})})}),q={wrong:"(address the mistake/misconception)",ungraded:"(explain in detail to avoid confusion)",correct:"(reinforce the user's understanding)"};return a("div",{className:"perseus-input-number-editor",children:[e("div",{className:"ui-title",children:"User input"}),e("div",{className:"msg-title",children:"Message shown to user on attempt"}),p.map((n,i)=>{const S=e(M,{apiOptions:this.props.apiOptions,content:n.message||"",placeholder:"Why is this answer "+n.status+"? "+q[n.status],widgetEnabled:!1,onChange:s=>{"content"in s&&this.updateAnswer(i,{message:s.content})}});return a("div",{className:"perseus-widget-row",children:[a("div",{className:"input-answer-editor-value-container"+(n.maxError?" with-max-error":""),children:[e(v,{value:n.value,className:"numeric-input-value",placeholder:"answer",format:o.last(n.answerForms||[]),onFormatChange:(s,f)=>{let g;f==="pi"?g=["pi"]:f==="mixed"?g=["proper","mixed"]:(f==="proper"||f==="improper")&&(g=["proper","improper"]),this.updateAnswer(i,{value:k(s,this.context.strings),answerForms:g})},onChange:s=>{this.updateAnswer(i,{value:k(s,this.context.strings)})}}),n.strict&&e("div",{className:"is-strict-indicator",title:"strictly equivalent to",children:"≡"}),n.simplify!=="required"&&n.status==="correct"&&e("div",{className:"simplify-indicator "+n.simplify,title:"accepts unsimplified answers",children:"‰"}),n.maxError?a("div",{className:"max-error-container",children:[e("div",{className:"max-error-plusmn",children:"±"}),e(v,{placeholder:0,value:p[i].maxError,format:o.last(n.answerForms||[]),onChange:this.updateAnswer(i,"maxError")})]}):null,e("div",{className:"value-divider"}),e("a",{href:"#",className:"answer-status "+n.status,onClick:s=>{s.preventDefault(),this.onStatusChange(i)},onKeyDown:s=>this.onSpace(s,this.onStatusChange),children:n.status}),e("a",{href:"#",className:"answer-trash","aria-label":"Delete answer",onClick:s=>{s.preventDefault(),this.onTrashAnswer(i)},onKeyDown:s=>this.onSpace(s,this.onTrashAnswer),children:e(N,{...D})}),e("a",{href:"#",className:"options-toggle","aria-label":"Toggle options",onClick:s=>{s.preventDefault(),this.onToggleOptions(i)},onKeyDown:s=>this.onSpace(s,this.onToggleOptions),children:e(N,{...P})})]}),e("div",{className:"input-answer-editor-message",children:S}),this.state.showOptions[i]&&a("div",{className:"options-container",children:[l(i),n.status==="correct"&&t(i),r(i)]})]},i)}),C,c,u,h,w]})}};m.contextType=z,m.widgetName="numeric-input",m.displayName="NumericInputEditor",m.defaultProps={answers:[b("correct")],size:"normal",coefficient:!1,labelText:"",rightAlign:!1};let x=m;x.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onToggleOptions",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onTrashAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onSpace",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null},{name:"callback",optional:!1,type:null},{name:"...args",optional:!1,type:null}],returns:null},{name:"onStatusChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"updateAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"update",optional:!1,type:null}],returns:null},{name:"addAnswer",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumericInputEditor",props:{answers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ +import{a,j as e}from"./jsx-runtime-FVsy8kgq.js";import{c as E}from"./article-renderer-ub6lGcPc.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as F}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as O}from"./components-yT7oveOH.js";import{i as D}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import{P as z}from"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{E as I}from"./editor-jsonify-4Li1SRv8.js";import{C as y}from"./index-QCAhLhLD.js";import{r as R}from"./index-TT1qJ6UJ.js";import{E as M}from"./editor-1XE8pcNh.js";import{c as P}from"./icon-paths-EoBkHOLI.js";const{ButtonGroup:A,InfoTip:d,InlineIcon:N,MultiButtonGroup:j,NumberInput:v,TextInput:U}=O,{firstNumericalParse:k}=F,V=[{title:"Integers",value:"integer",content:"6"},{title:"Decimals",value:"decimal",content:"0.75"},{title:"Proper fractions",value:"proper",content:"⅗"},{title:"Improper fractions",value:"improper",content:"⁷⁄₄"},{title:"Mixed numbers",value:"mixed",content:"1¾"},{title:"Numbers with π",value:"pi",content:"π"}],b=T=>({value:null,status:T,message:"",simplify:"required",answerForms:[],strict:!1,maxError:null}),m=class m extends R.Component{constructor(p){super(p),this.change=(...t)=>E.apply(this,t),this.onToggleOptions=t=>{const r=this.state.showOptions.slice();r[t]=!r[t],this.setState({showOptions:r})},this.onTrashAnswer=t=>{if(t>=0&&t{t.key===" "&&(t.preventDefault(),r.apply(this,l))},this.onStatusChange=t=>{const r=["wrong","ungraded","correct"],l=this.props.answers,c=o.indexOf(r,l[t].status),u=r[(c+1)%r.length];this.updateAnswer(t,{status:u,simplify:u==="correct"?"required":"accepted"})},this.updateAnswer=(t,r)=>{if(!o.isObject(r))return o.partial((c,u,w)=>{const h={};h[u]=w,this.updateAnswer(c,h)},t,r);let l=[...this.props.answers];if(t===l.length){const c=b(this.state.lastStatus);l=l.concat(c)}l[t]=o.extend({},l[t],r),this.props.onChange({answers:l})},this.addAnswer=()=>{const t=b(this.state.lastStatus),r=this.props.answers.concat(t);this.props.onChange({answers:r})},this.getSaveWarnings=()=>{const t=[];return o.contains(o.pluck(this.props.answers,"value"),"")&&t.push("One or more answers is empty"),this.props.answers.forEach((r,l)=>{r.strict&&(!r.answerForms||r.answerForms.length===0)&&t.push(`Answer ${l+1} is set to string format matching, but no format was selected`)}),t},this.serialize=()=>I.serialize.call(this),this.state={lastStatus:"wrong",showOptions:o.map(this.props.answers,()=>!1)}}render(){const p=this.props.answers,t=n=>a("div",{className:"perseus-widget-row",children:[e("label",{children:"Unsimplified answers are"}),e(A,{value:p[n].simplify,allowEmpty:!1,buttons:[{value:"required",content:"ungraded"},{value:"optional",content:"accepted"},{value:"enforced",content:"wrong"}],onChange:this.updateAnswer(n,"simplify")||(()=>{})}),a(d,{children:[e("p",{children:'Normally select "ungraded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and after)'}),e("p",{children:'Select "accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),a("p",{children:['Select "wrong" ',e("em",{children:"only"})," if we are specifically assessing the ability to simplify."]})]})]}),r=n=>a("div",{children:[a("div",{className:"perseus-widget-row",children:[e("label",{children:"Choose the suggested answer formats"}),e(j,{buttons:V,values:p[n].answerForms,onChange:this.updateAnswer(n,"answerForms")||(()=>{})}),a(d,{children:[e("p",{children:'Formats will be autoselected for you based on the given answer; to show no suggested formats and accept all types, simply have a decimal/integer be the answer. Values with π will have format "pi", and values that are fractions will have some subset (mixed will be "mixed" and "proper"; improper/proper will both be "improper" and "proper"). If you would like to specify that it is only a proper fraction (or only a mixed/improper fraction), deselect the other format. Except for specific cases, you should not need to change the autoselected formats.'}),a("p",{children:["To restrict the answer to ",e("em",{children:"only"}),' an improper fraction (i.e. 7/4), select the improper fraction and toggle "strict" to true. This ',e("b",{children:"will not"})," ","accept 1.75 as an answer."," "]}),e("p",{children:"Unless you are testing that specific skill, please do not restrict the answer format."})]})]}),e("div",{className:"perseus-widget-row",children:e(y,{label:"Strictly match only these formats",checked:p[n].strict,onChange:i=>{this.updateAnswer.bind(this,n)({strict:i})}})})]}),l=n=>e("div",{className:"perseus-widget-row",children:a("label",{children:["Max error"," ",e(v,{className:"max-error",value:p[n].maxError,onChange:this.updateAnswer(n,"maxError"),placeholder:"0"})]})}),c=a("div",{className:"perseus-widget-row",children:[e("label",{children:"Width: "}),e(A,{value:this.props.size,allowEmpty:!1,buttons:[{value:"normal",content:"Normal (80px)"},{value:"small",content:"Small (40px)"}],onChange:this.change("size")}),e(d,{children:e("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),u=e("div",{className:"perseus-widget-row",children:e(y,{label:"Right alignment",checked:this.props.rightAlign,onChange:n=>{this.props.onChange({rightAlign:n})}})}),w=a("div",{className:"perseus-widget-row",children:[a("label",{children:["Aria label",e(U,{value:this.props.labelText,onChange:this.change("labelText")})]}),e(d,{children:e("p",{children:"Text to describe this input. This will be shown to users using screenreaders."})})]}),h=e("div",{children:a("div",{className:"perseus-widget-row",children:[e(y,{label:"Coefficient",checked:this.props.coefficient,onChange:n=>{this.props.onChange({coefficient:n})}}),e(d,{children:e("p",{children:"A coefficient style number allows the student to use - for -1 and an empty string to mean 1."})})]})}),C=e("div",{children:e("a",{href:"#",className:"simple-button orange",onClick:n=>{n.preventDefault(),this.addAnswer()},onKeyDown:n=>this.onSpace(n,this.addAnswer),children:e("span",{children:"Add new answer"})})}),q={wrong:"(address the mistake/misconception)",ungraded:"(explain in detail to avoid confusion)",correct:"(reinforce the user's understanding)"};return a("div",{className:"perseus-input-number-editor",children:[e("div",{className:"ui-title",children:"User input"}),e("div",{className:"msg-title",children:"Message shown to user on attempt"}),p.map((n,i)=>{const S=e(M,{apiOptions:this.props.apiOptions,content:n.message||"",placeholder:"Why is this answer "+n.status+"? "+q[n.status],widgetEnabled:!1,onChange:s=>{"content"in s&&this.updateAnswer(i,{message:s.content})}});return a("div",{className:"perseus-widget-row",children:[a("div",{className:"input-answer-editor-value-container"+(n.maxError?" with-max-error":""),children:[e(v,{value:n.value,className:"numeric-input-value",placeholder:"answer",format:o.last(n.answerForms||[]),onFormatChange:(s,f)=>{let g;f==="pi"?g=["pi"]:f==="mixed"?g=["proper","mixed"]:(f==="proper"||f==="improper")&&(g=["proper","improper"]),this.updateAnswer(i,{value:k(s,this.context.strings),answerForms:g})},onChange:s=>{this.updateAnswer(i,{value:k(s,this.context.strings)})}}),n.strict&&e("div",{className:"is-strict-indicator",title:"strictly equivalent to",children:"≡"}),n.simplify!=="required"&&n.status==="correct"&&e("div",{className:"simplify-indicator "+n.simplify,title:"accepts unsimplified answers",children:"‰"}),n.maxError?a("div",{className:"max-error-container",children:[e("div",{className:"max-error-plusmn",children:"±"}),e(v,{placeholder:0,value:p[i].maxError,format:o.last(n.answerForms||[]),onChange:this.updateAnswer(i,"maxError")})]}):null,e("div",{className:"value-divider"}),e("a",{href:"#",className:"answer-status "+n.status,onClick:s=>{s.preventDefault(),this.onStatusChange(i)},onKeyDown:s=>this.onSpace(s,this.onStatusChange),children:n.status}),e("a",{href:"#",className:"answer-trash","aria-label":"Delete answer",onClick:s=>{s.preventDefault(),this.onTrashAnswer(i)},onKeyDown:s=>this.onSpace(s,this.onTrashAnswer),children:e(N,{...D})}),e("a",{href:"#",className:"options-toggle","aria-label":"Toggle options",onClick:s=>{s.preventDefault(),this.onToggleOptions(i)},onKeyDown:s=>this.onSpace(s,this.onToggleOptions),children:e(N,{...P})})]}),e("div",{className:"input-answer-editor-message",children:S}),this.state.showOptions[i]&&a("div",{className:"options-container",children:[l(i),n.status==="correct"&&t(i),r(i)]})]},i)}),C,c,u,h,w]})}};m.contextType=z,m.widgetName="numeric-input",m.displayName="NumericInputEditor",m.defaultProps={answers:[b("correct")],size:"normal",coefficient:!1,labelText:"",rightAlign:!1};let x=m;x.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onToggleOptions",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onTrashAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onSpace",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null},{name:"callback",optional:!1,type:null},{name:"...args",optional:!1,type:null}],returns:null},{name:"onStatusChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"updateAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"update",optional:!1,type:null}],returns:null},{name:"addAnswer",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumericInputEditor",props:{answers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ message: string; value: number; status: string; diff --git a/assets/numeric-input-editor.stories-cv3657OV.js b/assets/numeric-input-editor.stories-NGmrs7zt.js similarity index 68% rename from assets/numeric-input-editor.stories-cv3657OV.js rename to assets/numeric-input-editor.stories-NGmrs7zt.js index f777e086a6..37a08802a9 100644 --- a/assets/numeric-input-editor.stories-cv3657OV.js +++ b/assets/numeric-input-editor.stories-NGmrs7zt.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./numeric-input-editor-wcLIK9qM.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./editor-jsonify-yjAz4UcO.js";import"./editor-Y01VX-A3.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const st={title:"PerseusEditor/Widgets/NumericInput Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./numeric-input-editor-xQu1_JCK.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./editor-jsonify-4Li1SRv8.js";import"./editor-1XE8pcNh.js";import"./index-fuycm_QE.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const st={title:"PerseusEditor/Widgets/NumericInput Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const nt=["Default"];export{r as Default,nt as __namedExportsOrder,st as default}; diff --git a/assets/numeric-input.stories-BLQJid2-.js b/assets/numeric-input.stories-KB33gF-8.js similarity index 84% rename from assets/numeric-input.stories-BLQJid2-.js rename to assets/numeric-input.stories-KB33gF-8.js index 0f315b9479..f452fc2596 100644 --- a/assets/numeric-input.stories-BLQJid2-.js +++ b/assets/numeric-input.stories-KB33gF-8.js @@ -1,4 +1,4 @@ -import{j as i,a as t}from"./jsx-runtime-FVsy8kgq.js";import{a as o}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{R as A}from"./renderer-with-debug-ui-Ty_P7koE.js";import{N as p}from"./article-renderer-GCz9idJ2.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./side-by-side-kGWaKY6T.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Dj-_XIAo.js";import"./renderer-VfFjn7ah.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./hints-renderer-PJ9GMfp4.js";import"./shared-4TdECMLk.js";import"./base-radio-13woGQGc.js";import"./choice-none-above-0_QL8uoF.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./enums-x5qaTru7.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-6SWUlni2.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";const N={content:"$5008 \\div 4 =$ [[☃ numeric-input 1]] ",images:{},widgets:{"numeric-input 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"numeric-input",options:{coefficient:!1,static:!1,answers:[{status:"correct",maxError:null,strict:!1,value:1252,simplify:"required",message:""}],labelText:"",size:"normal"},alignment:"default"}}};function l(r){return{...{alignment:"",answers:[],containerSizeClass:"medium",isLastUsedWidget:!0,coefficient:!1,currentValue:"",problemNum:0,rightAlign:!1,size:"normal",static:!1,widgetId:"widgetId",findWidgets:o("findWidgets"),onBlur:o("onBlur"),onChange:o("onChange"),onFocus:o("onFocus"),trackInteraction:o("trackInteraction")},...r}}const be={title:"Perseus/Widgets/NumericInput",args:{coefficient:!1,currentValue:"8675309",rightAlign:!1},argTypes:{size:{options:["normal","small"],control:{type:"radio"},defaultValue:"normal"}}},n=()=>i(A,{question:N}),s=r=>{const e=l(r);return i(p,{...e})},m=r=>{const e=l({...r,size:"small"}),c=l({...r,size:"normal"});return t("div",{children:[t("label",{children:["Small:",i(p,{...e})]}),t("label",{children:["Normal:",i(p,{...c})]})]})},a=r=>{const e=l({...r,rightAlign:!1}),c=l({...r,rightAlign:!0});return t("div",{children:[t("label",{children:["Left:",i(p,{...e})]}),t("label",{children:["Right:",i(p,{...c})]})]})};n.__docgenInfo={description:"",methods:[],displayName:"Question1"};s.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"Sizes",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"TextAlignment",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};var u,d,g;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`(): React.ReactElement => { +import{j as i,a as t}from"./jsx-runtime-FVsy8kgq.js";import{a as o}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{R as A}from"./renderer-with-debug-ui-DcZbZSiB.js";import{N as p}from"./article-renderer-ub6lGcPc.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./side-by-side-kGWaKY6T.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-d8cZibFS.js";import"./multi-renderer-la0A-h33.js";import"./renderer-JG1Z7r2S.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./hints-renderer-eYcfi__L.js";import"./shared-4TdECMLk.js";import"./base-radio-SM-baXgO.js";import"./choice-none-above-lqQAegUH.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./enums-x5qaTru7.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-VNdK7gMK.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";const N={content:"$5008 \\div 4 =$ [[☃ numeric-input 1]] ",images:{},widgets:{"numeric-input 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"numeric-input",options:{coefficient:!1,static:!1,answers:[{status:"correct",maxError:null,strict:!1,value:1252,simplify:"required",message:""}],labelText:"",size:"normal"},alignment:"default"}}};function l(r){return{...{alignment:"",answers:[],containerSizeClass:"medium",isLastUsedWidget:!0,coefficient:!1,currentValue:"",problemNum:0,rightAlign:!1,size:"normal",static:!1,widgetId:"widgetId",findWidgets:o("findWidgets"),onBlur:o("onBlur"),onChange:o("onChange"),onFocus:o("onFocus"),trackInteraction:o("trackInteraction")},...r}}const be={title:"Perseus/Widgets/NumericInput",args:{coefficient:!1,currentValue:"8675309",rightAlign:!1},argTypes:{size:{options:["normal","small"],control:{type:"radio"},defaultValue:"normal"}}},n=()=>i(A,{question:N}),s=r=>{const e=l(r);return i(p,{...e})},m=r=>{const e=l({...r,size:"small"}),c=l({...r,size:"normal"});return t("div",{children:[t("label",{children:["Small:",i(p,{...e})]}),t("label",{children:["Normal:",i(p,{...c})]})]})},a=r=>{const e=l({...r,rightAlign:!1}),c=l({...r,rightAlign:!0});return t("div",{children:[t("label",{children:["Left:",i(p,{...e})]}),t("label",{children:["Right:",i(p,{...c})]})]})};n.__docgenInfo={description:"",methods:[],displayName:"Question1"};s.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"Sizes",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"TextAlignment",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};var u,d,g;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`(): React.ReactElement => { return ; }`,...(g=(d=n.parameters)==null?void 0:d.docs)==null?void 0:g.source}}};var f,h,b;s.parameters={...s.parameters,docs:{...(f=s.parameters)==null?void 0:f.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = generateProps(args); diff --git a/assets/orderer.stories-Ij4ywWUU.js b/assets/orderer.stories-JvtQ6RKS.js similarity index 75% rename from assets/orderer.stories-Ij4ywWUU.js rename to assets/orderer.stories-JvtQ6RKS.js index 256117aa75..2e35c216a7 100644 --- a/assets/orderer.stories-Ij4ywWUU.js +++ b/assets/orderer.stories-JvtQ6RKS.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as n}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const g={content:`**Without using a calculator, put the numbers in order from least to greatest.** +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as n}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const g={content:`**Without using a calculator, put the numbers in order from least to greatest.** [[☃ orderer 1]]`,images:{},widgets:{"orderer 1":{version:{major:0,minor:0},type:"orderer",graded:!0,options:{otherOptions:[],layout:"horizontal",options:[{content:"$10.9$",images:{},widgets:{}},{content:"$11$",images:{},widgets:{}},{content:"$\\sqrt{120}$",images:{},widgets:{}}],correctOptions:[{content:"$10.9$",images:{},widgets:{}},{content:"$\\sqrt{120}$",images:{},widgets:{}},{content:"$11$",images:{},widgets:{}}],height:"normal"}}}},c={content:`**Put $6$ flowers in the box.** diff --git a/assets/passage-ref.stories-bpd921va.js b/assets/passage-ref.stories-Op8xGoqf.js similarity index 86% rename from assets/passage-ref.stories-bpd921va.js rename to assets/passage-ref.stories-Op8xGoqf.js index c3fd0b7534..d4093a27e3 100644 --- a/assets/passage-ref.stories-bpd921va.js +++ b/assets/passage-ref.stories-Op8xGoqf.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{V as d}from"./index-6h5t6F0w.js";import{R as l}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const u={content:`[[☃ passage 1]] +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{V as d}from"./index-6h5t6F0w.js";import{R as l}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const u={content:`[[☃ passage 1]] We can see the word “promotes” is used in [[☃ passage-ref 1]] diff --git a/assets/passage.stories-2rs702ON.js b/assets/passage.stories-F12poj6Z.js similarity index 89% rename from assets/passage.stories-2rs702ON.js rename to assets/passage.stories-F12poj6Z.js index 0bb9ea1f73..5531557ce0 100644 --- a/assets/passage.stories-2rs702ON.js +++ b/assets/passage.stories-F12poj6Z.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{V as g}from"./index-6h5t6F0w.js";import{R as f}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const y={content:`[[☃ passage 1]] +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{V as g}from"./index-6h5t6F0w.js";import{R as f}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const y={content:`[[☃ passage 1]] `,images:{},widgets:{"passage 1":{alignment:"default",graded:!0,options:{footnotes:"",passageText:`Sociologists study folktales because they provide a means of understanding the distinctive values of a culture. However, the folktales in almost all cultures are adaptations of the same ancient narratives to the local milieu. `,passageTitle:"",showLineNumbers:!1,static:!1},static:!1,type:"passage",version:{major:0,minor:0}}}},v={content:`>Select text to highlight it. *(Laptop/desktop only)* diff --git a/assets/phet-simulation-wNzquKfW.js b/assets/phet-simulation-9PbE2pxN.js similarity index 99% rename from assets/phet-simulation-wNzquKfW.js rename to assets/phet-simulation-9PbE2pxN.js index 5418a98f89..09d28647db 100644 --- a/assets/phet-simulation-wNzquKfW.js +++ b/assets/phet-simulation-9PbE2pxN.js @@ -1 +1 @@ -import{a as St,j as Q}from"./jsx-runtime-FVsy8kgq.js";import{r as i}from"./index-TT1qJ6UJ.js";import{l as S}from"./index-awljIyHI.js";import{m as Je,c as Ye,u as Ze,a as wt,T as Qe,I as xt,x as kt}from"./index-rfN0X25E.js";import{a as b,_ as l,V as W,b as Fe}from"./index-6h5t6F0w.js";import{c as Z,L as he,w as Ct}from"./react-router-dom-W_e8xVUu.js";import{i as et,g as tt}from"./index-o3wWn3Y5.js";import{C as It}from"./index-ngddCaVG.js";import{c as d,b as R,s as C,a as ke,m as ve,f as We}from"./index-deFLJwr4.js";import{P as Ce}from"./index-xuPsLuPk.js";import{e as $t,_ as Te}from"./arrow-square-out-bold-090vdhrx.js";import{b as Et}from"./index-h_CiYGGb.js";import{P as Rt}from"./i18n-context-P5sgPFep.js";import{g as _t}from"./dependencies-8XILypbq.js";import{s as Nt}from"./constants-iPV6vHZm.js";function rt(o){const e=[];if(o)if(Array.isArray(o))for(const t of o)e.push(...rt(t));else e.push(o);else return e;return e}function nt(o){const e=[],t=[];if(!o)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;rt(o).forEach(a=>{const s=a._definition;if(s!=null)if(n){const c={};for(const[f,u]of Object.entries(s))c[f.replace(/-[a-z]/g,m=>m[1].toUpperCase())]=u;t.push(c)}else e.push(a);else t.push(a)});const r=Object.assign({},...t);if(t.length>0&&!n){const a=S.StyleSheet.create({inlineStyles:r});e.push(a.inlineStyles)}return{style:n?r:{},className:S.css(...e)}}const Ft=["children","style","tag","testId"],Lt=/^h[1-6]$/,He=S.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),F=i.forwardRef(function(e,t){let{children:n,style:r,tag:a="span",testId:s}=e,c=b(e,Ft);const f=Lt.test(a),u=nt([He.text,f&&He.header,r]),m=c.className?[c.className,u.className].join(" "):u.className;return i.createElement(a,l({},c,{style:u.style,className:m,"data-testid":s,ref:t}),n)}),Bt=["className","style"];function M(o,e){return i.forwardRef((t,n)=>{const{className:r,style:a}=t,s=b(t,Bt),c=typeof o=="string"?Pt[o]:null,{className:f,style:u}=nt([c,e,a]);return i.createElement(o,l({},s,{ref:n,className:[f,r].filter(Boolean).join(" "),style:u}))})}const Pt=S.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),zt=["testId","tag"],ne=S.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Dt=M("div",ne.default),Wt=M("article",ne.default),Tt=M("aside",ne.default),Ht=M("nav",ne.default),Ut=M("section",ne.default),Ue=i.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,a=b(e,zt),s=l({},a,{"data-testid":n});switch(r){case"article":return i.createElement(Wt,l({},s,{ref:t}));case"aside":return i.createElement(Tt,l({},s,{ref:t}));case"nav":return i.createElement(Ht,l({},s,{ref:t}));case"section":return i.createElement(Ut,l({},s,{ref:t}));case"div":return i.createElement(Dt,l({},s,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let V=function(o){return o.Root="root",o.Initial="initial",o.Standard="standard",o}({});const ce=i.createContext(V.Root);ce.displayName="RenderStateContext";let Ot=class extends i.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?i.createElement(ce.Provider,{value:V.Standard},t()):n?i.createElement(ce.Provider,{value:V.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case V.Root:return this._renderAsRootComponent();case V.Initial:return n?n():null;case V.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(V.Root)}}render(){return i.createElement(ce.Consumer,null,e=>this._maybeRender(e))}},ot=class it{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${it._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};ot._factoryUniquenessCounter=0;let Ie=class{get(e){return e}};Ie.Default=new Ie;var At=Ie.Default;let Mt=class extends i.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(At):null:(this._idFactory||(this._idFactory=new ot(r)),t(this._idFactory))}render(){return i.createElement(Ot,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Kt=class at extends i.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(at.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():i.createElement(Mt,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Kt.defaultId="wb-id";const O=400,ee=700,jt=900,Se="@media (max-width: 1023px)",we="@media (min-width: 1024px)",N={display:"block"},D='Lato, "Noto Sans", sans-serif',Oe='"Noto Serif", serif',qt="Inconsolata, monospace",L=S.StyleSheet.create({Title:l({},N,{fontFamily:D,fontWeight:jt,[we]:{fontSize:36,lineHeight:"40px"},[Se]:{fontSize:28,lineHeight:"32px"}}),Tagline:l({},N,{fontFamily:D,fontWeight:O,fontSize:20,lineHeight:"24px"}),HeadingLarge:l({},N,{fontFamily:D,fontWeight:ee,[we]:{fontSize:28,lineHeight:"32px"},[Se]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:l({},N,{fontFamily:D,fontWeight:ee,[we]:{fontSize:24,lineHeight:"28px"},[Se]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:l({},N,{fontFamily:D,fontWeight:ee,fontSize:20,lineHeight:"24px"}),HeadingXSmall:l({},N,{fontFamily:D,fontWeight:ee,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:l({},N,{fontFamily:Oe,fontWeight:O,fontSize:22,lineHeight:"28px"}),BodySerif:l({},N,{fontFamily:Oe,fontWeight:O,fontSize:18,lineHeight:"22px"}),BodyMonospace:l({},N,{fontFamily:qt,fontWeight:O,fontSize:17,lineHeight:"22px"}),Body:l({},N,{fontFamily:D,fontWeight:O,fontSize:16,lineHeight:"22px"}),LabelLarge:l({},N,{fontFamily:D,fontWeight:ee,fontSize:16,lineHeight:"20px"}),LabelMedium:l({},N,{fontFamily:D,fontWeight:O,fontSize:16,lineHeight:"20px"}),LabelSmall:l({},N,{fontFamily:D,fontWeight:O,fontSize:14,lineHeight:"18px"}),LabelXSmall:l({},N,{fontFamily:D,fontWeight:O,fontSize:12,lineHeight:"16px"}),Caption:l({},N,{fontFamily:D,fontWeight:O,fontSize:14,lineHeight:"20px"}),Footnote:l({},N,{fontFamily:D,fontWeight:O,fontSize:12,lineHeight:"18px"})}),Vt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h1"}=e,s=b(e,Vt);return i.createElement(F,l({},s,{tag:a,style:[L.Title,n],ref:t}),r)});const Xt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h2"}=e,s=b(e,Xt);return i.createElement(F,l({},s,{tag:a,style:[L.HeadingLarge,n],ref:t}),r)});const Gt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h3"}=e,s=b(e,Gt);return i.createElement(F,l({},s,{tag:a,style:[L.HeadingMedium,n],ref:t}),r)});const Jt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h4"}=e,s=b(e,Jt);return i.createElement(F,l({},s,{tag:a,style:[L.HeadingSmall,n],ref:t}),r)});const Yt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h4"}=e,s=b(e,Yt);return i.createElement(F,l({},s,{tag:a,style:[L.HeadingXSmall,n],ref:t}),r)});const Zt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,Zt);return i.createElement(F,l({},s,{tag:a,style:[L.BodySerifBlock,n],ref:t}),r)});const Qt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,Qt);return i.createElement(F,l({},s,{tag:a,style:[L.BodySerif,n],ref:t}),r)});const er=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,er);return i.createElement(F,l({},s,{tag:a,style:[L.BodyMonospace,n],ref:t}),r)});const tr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,tr);return i.createElement(F,l({},s,{tag:a,style:[L.Body,n],ref:t}),r)});const rr=["style","children","tag"],nr=i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,rr);return i.createElement(F,l({},s,{tag:a,style:[L.LabelLarge,n],ref:t}),r)}),or=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,or);return i.createElement(F,l({},s,{tag:a,style:[L.LabelMedium,n],ref:t}),r)});const ir=["style","children","tag"],ar=i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,ir);return i.createElement(F,l({},s,{tag:a,style:[L.LabelSmall,n],ref:t}),r)}),sr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,sr);return i.createElement(F,l({},s,{tag:a,style:[L.LabelXSmall,n],ref:t}),r)});const lr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,lr);return i.createElement(F,l({},s,{tag:a,style:[L.Tagline,n],ref:t}),r)});const cr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,cr);return i.createElement(F,l({},s,{tag:a,style:[L.Caption,n],ref:t}),r)});const dr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,dr);return i.createElement(F,l({},s,{tag:a,style:[L.Footnote,n],ref:t}),r)});const ur=o=>({small:16,medium:24,large:48,xlarge:96})[o],fr=["color","icon","size","style","testId","className"],hr=M("span"),$e=i.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:a="small",style:s,testId:c,className:f}=e,u=b(e,fr),m=ur(a),p=`${f??""}`,h=mr(n,m);return i.createElement(hr,l({},u,{className:p,style:[Ee.svg,h.icon,{maskImage:`url(${r})`},s],"data-testid":c,ref:t}))}),Ae={},mr=(o,e)=>{const t=`${o}-${e}`;if(Ee[t])return Ee[t];const n={icon:{backgroundColor:o,width:e,height:e}};return Ae[t]=S.StyleSheet.create(n),Ae[t]},Ee=S.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});$e.displayName="PhosphorIcon";const me={color:{bg:{action:{default:d.blue,active:d.activeBlue,inverse:d.fadedBlue},critical:{default:d.red,active:d.activeRed,inverse:d.fadedRed},primary:{default:d.white,disabled:d.offBlack32,inverse:d.darkBlue},secondary:{default:"none",inverse:"none",focus:d.white,active:{action:d.fadedBlue,critical:d.fadedRed}},tertiary:{hover:d.white},icon:{secondaryHover:"transparent"}},text:{disabled:d.offBlack32,inverse:d.white,primary:{disabled:d.white64},secondary:{inverse:d.white50},icon:{secondaryHover:"inherit"}},border:{disabled:d.offBlack32,primary:{inverse:d.white},secondary:{action:d.offBlack50,critical:d.offBlack50,inverse:d.white50},tertiary:{inverse:d.white}}},border:{width:{secondary:R.width.hairline,focused:R.width.thin,disabled:R.width.thin},radius:{default:R.radius.medium_4,tertiary:R.radius.xSmall_2,small:R.radius.medium_4,large:R.radius.large_6,icon:R.radius.full}},size:{height:{tertiaryHover:C.xxxxSmall_2,small:C.xLarge_32,medium:40,large:56}},margin:{icon:{offset:-C.xxxxSmall_2}},padding:{xsmall:C.xxxxSmall_2,small:C.xxSmall_6,medium:C.small_12,large:C.medium_16,xLarge:C.xLarge_32},font:{size:{large:18},lineHeight:{large:ke.lineHeight.medium},weight:{default:ke.weight.bold}}},yr=Je(me,{color:{bg:{secondary:{default:d.offWhite,active:{action:d.fadedBlue8,critical:d.fadedRed8},focus:d.offWhite},icon:{secondaryHover:d.fadedBlue16}},border:{secondary:{action:d.fadedBlue,critical:d.fadedRed}},text:{icon:{secondaryHover:d.blue}}},border:{radius:{default:R.radius.xLarge_12,small:R.radius.large_6,large:R.radius.xLarge_12},width:{focused:R.width.hairline}},margin:{icon:{offset:-C.xSmall_8}},font:{weight:{default:ke.weight.regular}}}),pr={default:me,khanmigo:yr},st=Ye(me);function gr(o){const e=i.useContext(Qe),t=pr[e]||me;return i.createElement(st.Provider,{value:t},o.children)}function Me({icon:o,size:e,style:t,testId:n}){const r={"aria-hidden":!0,color:"currentColor",style:t,testId:n};switch(e){case"small":return i.createElement($e,l({},r,{size:"small",icon:o}));case"medium":default:return i.createElement($e,l({},r,{size:"medium",icon:o}))}}const br=["children","skipClientNav","color","disabled","focused","hovered","href","kind","labelStyle","light","pressed","size","style","testId","type","spinner","startIcon","endIcon","id","waiting"],vr=M("a"),Sr=M("button"),wr=M(he),xr=i.forwardRef(function(e,t){const{theme:n,themeName:r}=Ze(st),a=wt(kr,n),s=c=>{const{children:f,skipClientNav:u,color:m,disabled:p,focused:h,hovered:w,href:v=void 0,kind:y="primary",labelStyle:x,light:E=!1,pressed:k,size:I="medium",style:B,testId:g,type:$=void 0,spinner:_,startIcon:P,endIcon:A,id:H}=e,q=b(e,br),T=Cr(m,y,E,I,n,r),U=_||p,ae=[a.shared,U&&a.disabled,P&&a.withStartIcon,A&&a.withEndIcon,T.default,U&&T.disabled,y!=="tertiary"&&!U&&(k?T.active:(w||h)&&T.focus),y==="tertiary"&&!k&&h&&[T.focus,U&&T.disabledFocus],I==="small"&&a.small,I==="large"&&a.large],ge=l({"data-testid":g,id:H,role:"button",style:[ae,B]},q),gt=I==="small"?ar:nr,bt=i.createElement(gt,{style:[a.text,I==="large"&&a.largeText,x,_&&a.hiddenText,y==="tertiary"&&a.textWithFocus,y==="tertiary"&&!U&&(k?[T.hover,T.active]:w&&T.hover)],testId:g?`${g}-inner-label`:void 0},f),vt={medium:"small",small:"xsmall",large:"medium"},De=I==="small"?"small":"medium",be=i.createElement(i.Fragment,null,P&&i.createElement(Ue,{style:a.iconWrapper},i.createElement(Me,{size:De,icon:P,style:[a.startIcon,y==="tertiary"&&a.tertiaryStartIcon],testId:g?`${g}-start-icon`:void 0})),bt,_&&i.createElement(It,{style:a.spinner,size:vt[I],light:y==="primary",testId:`${g||"button"}-spinner`}),A&&i.createElement(Ue,{testId:g?`${g}-end-icon-wrapper`:void 0,style:[re.endIcon,a.iconWrapper,a.endIconWrapper,y==="tertiary"&&a.endIconWrapperTertiary,(h||w)&&y!=="primary"&&a.iconWrapperSecondaryHovered]},i.createElement(Me,{size:De,icon:A,testId:g?`${g}-end-icon`:void 0})));return v&&!U?c&&!u&&et(v)?i.createElement(wr,l({},ge,{to:v,ref:t}),be):i.createElement(vr,l({},ge,{href:v,ref:t}),be):i.createElement(Sr,l({type:$||"button"},ge,{"aria-disabled":U,ref:t}),be)};return i.createElement(Z.Consumer,null,c=>s(c))}),kr=o=>({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:o.size.height.medium,paddingTop:0,paddingBottom:0,paddingLeft:o.padding.large,paddingRight:o.padding.large,border:"none",borderRadius:o.border.radius.default,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{borderRadius:o.border.radius.small,height:o.size.height.small},large:{borderRadius:o.border.radius.large,height:o.size.height.large},text:{alignItems:"center",fontWeight:o.font.weight.default,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",pointerEvents:"none"},largeText:{fontSize:o.font.size.large,lineHeight:`${o.font.lineHeight.large}px`},textWithFocus:{position:"relative"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"},startIcon:{marginRight:o.padding.small,marginLeft:o.margin.icon.offset},tertiaryStartIcon:{marginLeft:0},endIcon:{marginLeft:o.padding.small},iconWrapper:{borderRadius:o.border.radius.icon,padding:o.padding.xsmall,minWidth:"auto"},iconWrapperSecondaryHovered:{backgroundColor:o.color.bg.icon.secondaryHover,color:o.color.text.icon.secondaryHover},endIconWrapper:{marginLeft:o.padding.small,marginRight:o.margin.icon.offset},endIconWrapperTertiary:{marginRight:0}}),re={},Cr=(o="default",e,t,n,r,a)=>{const s=o==="destructive"?r.color.bg.critical.default:r.color.bg.action.default,c=`${s}-${e}-${t}-${n}-${a}`;if(re[c])return re[c];const f=o==="destructive"?r.color.bg.critical.inverse:r.color.bg.action.inverse,u=o==="destructive"?r.color.bg.critical.active:r.color.bg.action.active,m=n==="large"?r.padding.xLarge:r.padding.large;let p={};if(e==="primary"){const h=t?r.color.bg.primary.inverse:r.color.bg.primary.default;p={default:{background:t?r.color.bg.primary.default:s,color:t?s:r.color.text.inverse,paddingLeft:m,paddingRight:m},focus:{boxShadow:`0 0 0 1px ${h}, 0 0 0 3px ${t?r.color.bg.primary.default:s}`},active:{boxShadow:`0 0 0 1px ${h}, 0 0 0 3px ${t?f:u}`,background:t?f:u,color:t?u:f},disabled:{background:t?f:r.color.bg.primary.disabled,color:t?s:r.color.text.primary.disabled,cursor:"default",":focus":{boxShadow:`0 0 0 1px ${t?r.color.bg.primary.disabled:r.color.bg.primary.default}, 0 0 0 3px ${t?f:r.color.bg.primary.disabled}`}}}}else if(e==="secondary"){const h=o==="destructive"?r.color.border.secondary.critical:r.color.border.secondary.action,w=o==="destructive"?r.color.bg.secondary.active.critical:r.color.bg.secondary.active.action;p={default:{background:t?r.color.bg.secondary.inverse:r.color.bg.secondary.default,color:t?r.color.text.inverse:s,borderColor:t?r.color.border.secondary.inverse:h,borderStyle:"solid",borderWidth:r.border.width.secondary,paddingLeft:m,paddingRight:m},focus:{background:t?r.color.bg.secondary.inverse:r.color.bg.secondary.focus,borderColor:"transparent",outlineColor:t?r.color.border.primary.inverse:s,outlineStyle:"solid",outlineWidth:r.border.width.focused},active:{background:t?u:w,color:t?f:u,borderColor:"transparent",outlineColor:t?f:u,outlineStyle:"solid",outlineWidth:r.border.width.focused},disabled:{color:t?r.color.text.secondary.inverse:r.color.text.disabled,outlineColor:t?f:r.color.border.disabled,cursor:"default",":focus":{outlineColor:t?r.color.border.secondary.inverse:r.color.border.disabled,outlineStyle:"solid",outlineWidth:r.border.width.disabled}}}}else if(e==="tertiary")p={default:{background:"none",color:t?r.color.text.inverse:s,paddingLeft:0,paddingRight:0},hover:{":after":{content:"''",position:"absolute",height:r.size.height.tertiaryHover,width:"100%",right:0,bottom:0,background:t?r.color.bg.tertiary.hover:s,borderRadius:r.border.radius.tertiary}},focus:{outlineStyle:"solid",outlineColor:t?r.color.border.tertiary.inverse:s,outlineWidth:r.border.width.focused,borderRadius:r.border.radius.default},active:{color:t?f:u,":after":{height:r.size.height.tertiaryHover,background:t?f:u}},disabled:{color:t?f:r.color.text.disabled,cursor:"default"},disabledFocus:{outlineColor:t?r.color.border.tertiary.inverse:r.color.border.disabled}};else throw new Error("Button kind not recognized");return re[c]=S.StyleSheet.create(p),re[c]},Ir=["href","type","children","skipClientNav","onClick","beforeNav","safeWithNav","tabIndex","target","rel","color","kind","light","size","disabled","spinner"],$r=i.forwardRef(function(e,t){const{href:n=void 0,type:r=void 0,children:a,skipClientNav:s,onClick:c,beforeNav:f=void 0,safeWithNav:u=void 0,tabIndex:m,target:p,rel:h,color:w="default",kind:v="primary",light:y=!1,size:x="medium",disabled:E=!1,spinner:k=!1}=e,I=b(e,Ir),B=g=>{const $=tt(n,s,g),_=(P,A)=>i.createElement(xr,l({},I,P,A,{disabled:E,spinner:k||P.waiting,color:w,kind:v,light:y,size:x,skipClientNav:s,href:n,target:p,type:r,tabIndex:m,ref:t}),a);return f?i.createElement($,{disabled:k||E,href:n,role:"button",type:r,onClick:c,beforeNav:f,safeWithNav:u,rel:h},_):i.createElement($,{disabled:k||E,href:n,role:"button",type:r,onClick:c,safeWithNav:u,target:p,rel:h},_)};return i.createElement(gr,null,i.createElement(Z.Consumer,null,g=>B(g)))});function lt(o){const e=[];if(o)if(Array.isArray(o))for(const t of o)e.push(...lt(t));else e.push(o);else return e;return e}function ct(o){const e=[],t=[];if(!o)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;lt(o).forEach(a=>{const s=a._definition;if(s!=null)if(n){const c={};for(const[f,u]of Object.entries(s))c[f.replace(/-[a-z]/g,m=>m[1].toUpperCase())]=u;t.push(c)}else e.push(a);else t.push(a)});const r=Object.assign({},...t);if(t.length>0&&!n){const a=S.StyleSheet.create({inlineStyles:r});e.push(a.inlineStyles)}return{style:n?r:{},className:S.css(...e)}}const Er=["children","style","tag","testId"],Rr=/^h[1-6]$/,Ke=S.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});i.forwardRef(function(e,t){let{children:n,style:r,tag:a="span",testId:s}=e,c=b(e,Er);const f=Rr.test(a),u=ct([Ke.text,f&&Ke.header,r]),m=c.className?[c.className,u.className].join(" "):u.className;return i.createElement(a,l({},c,{style:u.style,className:m,"data-testid":s,ref:t}),n)});const _r=["className","style"];function K(o,e){return i.forwardRef((t,n)=>{const{className:r,style:a}=t,s=b(t,_r),c=typeof o=="string"?Nr[o]:null,{className:f,style:u}=ct([c,e,a]);return i.createElement(o,l({},s,{ref:n,className:[f,r].filter(Boolean).join(" "),style:u}))})}const Nr=S.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Fr=["testId","tag"],oe=S.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Lr=K("div",oe.default),Br=K("article",oe.default),Pr=K("aside",oe.default),zr=K("nav",oe.default),Dr=K("section",oe.default);i.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,a=b(e,Fr),s=l({},a,{"data-testid":n});switch(r){case"article":return i.createElement(Br,l({},s,{ref:t}));case"aside":return i.createElement(Pr,l({},s,{ref:t}));case"nav":return i.createElement(zr,l({},s,{ref:t}));case"section":return i.createElement(Dr,l({},s,{ref:t}));case"div":return i.createElement(Lr,l({},s,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let X=function(o){return o.Root="root",o.Initial="initial",o.Standard="standard",o}({});const de=i.createContext(X.Root);de.displayName="RenderStateContext";let Wr=class extends i.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?i.createElement(de.Provider,{value:X.Standard},t()):n?i.createElement(de.Provider,{value:X.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case X.Root:return this._renderAsRootComponent();case X.Initial:return n?n():null;case X.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(X.Root)}}render(){return i.createElement(de.Consumer,null,e=>this._maybeRender(e))}},dt=class ut{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${ut._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};dt._factoryUniquenessCounter=0;let Re=class{get(e){return e}};Re.Default=new Re;var Tr=Re.Default;let Hr=class extends i.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Tr):null:(this._idFactory||(this._idFactory=new dt(r)),t(this._idFactory))}render(){return i.createElement(Wr,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Ur=class ft extends i.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(ft.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():i.createElement(Hr,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Ur.defaultId="wb-id";const Or=o=>({small:16,medium:24,large:48,xlarge:96})[o],Ar=["color","icon","size","style","testId","className"],Mr=K("span"),ht=i.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:a="small",style:s,testId:c,className:f}=e,u=b(e,Ar),m=Or(a),p=`${f??""}`,h=Kr(n,m);return i.createElement(Mr,l({},u,{className:p,style:[_e.svg,h.icon,{maskImage:`url(${r})`},s],"data-testid":c,ref:t}))}),je={},Kr=(o,e)=>{const t=`${o}-${e}`;if(_e[t])return _e[t];const n={icon:{backgroundColor:o,width:e,height:e}};return je[t]=S.StyleSheet.create(n),je[t]},_e=S.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});ht.displayName="PhosphorIcon";const jr=["children","skipClientNav","focused","hovered","href","inline","kind","light","visitable","pressed","style","testId","waiting","target","startIcon","endIcon"],qr=K("a"),Vr=K(he),qe=i.forwardRef(function(e,t){const n=r=>{const{children:a,skipClientNav:s,focused:c,hovered:f,href:u,inline:m=!1,kind:p="primary",light:h=!1,visitable:w=!1,pressed:v,style:y,testId:x,target:E,startIcon:k,endIcon:I}=e,B=b(e,jr),g=Gr(m,p,h,w),$=m?g.restingInline:g.resting,_=[Xr.shared,$,v&&g.active,!v&&f&&g.hover,!v&&c&&g.focus],P=l({"data-testid":x,style:[_,y],target:E},B),H=new URL(u,window.location.origin).origin!==window.location.origin,q=i.createElement(ht,{icon:$t,size:"small",style:[J.endIcon,J.centered],testId:"external-icon"});let T,U;k&&(T=i.cloneElement(k,l({style:[J.startIcon,J.centered],testId:"start-icon","aria-hidden":"true"},k.props))),I&&(U=i.cloneElement(I,l({style:[J.endIcon,J.centered],testId:"end-icon","aria-hidden":"true"},I.props)));const ae=i.createElement(i.Fragment,null,k&&T,a,I?U:H&&E==="_blank"&&q);return r&&!s&&et(u)?i.createElement(Vr,l({},P,{to:u,ref:t}),ae):i.createElement(qr,l({},P,{href:u,ref:t}),ae)};return i.createElement(Z.Consumer,null,r=>n(r))}),se={},J=S.StyleSheet.create({startIcon:{marginInlineEnd:C.xxxSmall_4},endIcon:{marginInlineStart:C.xxxSmall_4},centered:{verticalAlign:"-10%"}}),Xr=S.StyleSheet.create({shared:{cursor:"pointer",textDecoration:"none",outline:"none",alignItems:"center"}}),Gr=(o,e,t,n)=>{const r=`${e}-${o.toString()}-${t.toString()}-${n.toString()}`;if(se[r])return se[r];if(e==="secondary"&&t)throw new Error("Secondary Light links are not supported");if(n&&e!=="primary")throw new Error("Only primary link is visitable");const{blue:a,purple:s,white:c,offBlack:f,offBlack32:u,offBlack64:m}=d,p="#fa50ae",h=ve(We(f,.08),s),w=d.fadedBlue,v=ve(We(c,.32),p),y=d.activeBlue,k=e==="primary"?t?c:a:o?f:m,g=e==="primary"?t?w:y:o?y:f,$=n?{":visited":{color:t?p:h}}:Object.freeze({}),_=n?{":visited":{color:t?v:ve(u,h)}}:Object.freeze({}),P={resting:l({color:k},$),restingInline:l({color:k,textDecoration:"underline currentcolor solid",textUnderlineOffset:2},$),hover:l({textDecoration:"underline currentcolor solid",color:k},$),focus:{":focus-visible":l({color:k,outline:`1px solid ${t?c:a}`,borderRadius:3},$)},active:l({color:g,textDecoration:"underline currentcolor solid"},_)};return se[r]=S.StyleSheet.create(P),se[r]},Jr=["onClick","beforeNav","safeWithNav","href","skipClientNav","children","tabIndex","onKeyDown","onKeyUp","target","inline","kind","light","visitable"],Yr=i.forwardRef(function(e,t){const{onClick:n,beforeNav:r=void 0,safeWithNav:a,href:s,skipClientNav:c,children:f,tabIndex:u,onKeyDown:m,onKeyUp:p,target:h=void 0,inline:w=!1,kind:v="primary",light:y=!1,visitable:x=!1}=e,E=b(e,Jr),k=I=>{const B=tt(s,c,I);return r?i.createElement(B,{disabled:!1,href:s,role:"link",onClick:n,beforeNav:r,safeWithNav:a,onKeyDown:m,onKeyUp:p},(g,$)=>{let _=l({},(Te($),$));return i.createElement(qe,l({},E,g,_,{skipClientNav:c,href:s,target:h,tabIndex:u,inline:w,kind:v,light:y,visitable:x,ref:t}),f)}):i.createElement(B,{disabled:!1,href:s,role:"link",onClick:n,safeWithNav:a,target:h,onKeyDown:m,onKeyUp:p},(g,$)=>{let _=l({},(Te($),$));return i.createElement(qe,l({},E,g,_,{skipClientNav:c,href:s,target:h,tabIndex:u,inline:w,kind:v,light:y,visitable:x,ref:t}),f)})};return i.createElement(Z.Consumer,null,I=>k(I))}),Zr=""+new URL("info-vUJD1n-8.svg",import.meta.url).href,Qr=""+new URL("smiley-xdY6f5H9.svg",import.meta.url).href,en=""+new URL("warning-ctw6EWuu.svg",import.meta.url).href,tn=""+new URL("warning-circle-OrBK1ju8.svg",import.meta.url).href,rn=o=>{switch(o){case"success":return{color:d.green,icon:Qr,role:"status"};case"warning":return{color:d.gold,icon:en,role:"alert",ariaLive:"polite"};case"critical":return{color:d.red,icon:tn,role:"alert"};default:return{color:d.blue,icon:Zr,role:"status"}}},nn=o=>{const{actions:e,"aria-label":t,dismissAriaLabel:n="Dismiss banner.",onDismiss:r,kind:a="info",layout:s,text:c,testId:f,icon:u}=o,m=()=>e==null?void 0:e.filter(Boolean).map((h,w)=>{if(h.type==="custom")return i.createElement(W,{style:z.action,key:`custom-action-${w}`},h.node);const v=h.onClick;if(h.type==="link"){var y;return i.createElement(W,{style:z.action,key:h.title},i.createElement(Yr,{kind:"primary",href:h.href,onClick:v,"aria-label":(y=h.ariaLabel)!=null?y:h.title,style:z.link},h.title))}else{var x;return i.createElement(W,{style:z.action,key:h.title},i.createElement($r,{kind:"tertiary",size:"small","aria-label":(x=h.ariaLabel)!=null?x:h.title,onClick:v},h.title))}}),p=rn(a);return i.createElement(W,{style:[z.containerOuter,s==="floating"&&z.floatingBorder,{borderInlineStartColor:p.color}],role:p.role,"aria-label":t,"aria-live":p.ariaLive,testId:f},i.createElement(W,{style:[z.backgroundColor,{backgroundColor:p.color}]}),i.createElement(W,{style:z.containerInner},i.createElement(Ce,{icon:u||p.icon,size:"medium",style:z.icon,"aria-label":a,testId:"banner-kind-icon",role:"img"}),i.createElement(W,{style:z.labelAndButtonsContainer},i.createElement(W,{style:z.labelContainer},i.createElement(Et,null,c)),e&&i.createElement(W,{style:z.actionsContainer},m())),r?i.createElement(W,{style:z.dismissContainer},i.createElement(xt,{icon:kt,kind:"tertiary",onClick:r,style:z.dismiss,"aria-label":n})):null))},z=S.StyleSheet.create({backgroundColor:{position:"absolute",top:0,bottom:0,left:0,right:0,opacity:.08},containerOuter:{borderInlineStartWidth:C.xxSmall_6,width:"100%",backgroundColor:d.white},containerInner:{flexDirection:"row",padding:C.xSmall_8},icon:{marginTop:C.xSmall_8,marginBottom:C.xSmall_8,marginInlineStart:C.xxxxSmall_2,marginInlineEnd:C.xSmall_8,alignSelf:"flex-start",color:d.offBlack64},labelAndButtonsContainer:{flex:1,flexDirection:"row",alignItems:"center",alignContent:"center",flexWrap:"wrap",justifyContent:"space-between"},labelContainer:{flexShrink:1,margin:C.xSmall_8,textAlign:"start",overflowWrap:"break-word"},actionsContainer:{flexDirection:"row",justifyContent:"flex-start",marginTop:C.xSmall_8,marginBottom:C.xSmall_8,height:18,alignItems:"center"},action:{marginLeft:C.xSmall_8,marginRight:C.xSmall_8,justifyContent:"center"},link:{fontSize:14},dismiss:{flexShrink:1},dismissContainer:{height:40,width:40,justifyContent:"center",alignItems:"center",marginLeft:C.xSmall_8,marginRight:C.xSmall_8},floatingBorder:{borderRadius:4,overflow:"hidden"}});function mt(o){const e=[];if(o)if(Array.isArray(o))for(const t of o)e.push(...mt(t));else e.push(o);else return e;return e}function yt(o){const e=[],t=[];if(!o)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;mt(o).forEach(a=>{const s=a._definition;if(s!=null)if(n){const c={};for(const[f,u]of Object.entries(s))c[f.replace(/-[a-z]/g,m=>m[1].toUpperCase())]=u;t.push(c)}else e.push(a);else t.push(a)});const r=Object.assign({},...t);if(t.length>0&&!n){const a=S.StyleSheet.create({inlineStyles:r});e.push(a.inlineStyles)}return{style:n?r:{},className:S.css(...e)}}const on=["children","style","tag","testId"],an=/^h[1-6]$/,Ve=S.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});i.forwardRef(function(e,t){let{children:n,style:r,tag:a="span",testId:s}=e,c=b(e,on);const f=an.test(a),u=yt([Ve.text,f&&Ve.header,r]),m=c.className?[c.className,u.className].join(" "):u.className;return i.createElement(a,l({},c,{style:u.style,className:m,"data-testid":s,ref:t}),n)});const sn=["className","style"];function j(o,e){return i.forwardRef((t,n)=>{const{className:r,style:a}=t,s=b(t,sn),c=typeof o=="string"?ln[o]:null,{className:f,style:u}=yt([c,e,a]);return i.createElement(o,l({},s,{ref:n,className:[f,r].filter(Boolean).join(" "),style:u}))})}const ln=S.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),cn=["testId","tag"],ie=S.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),dn=j("div",ie.default),un=j("article",ie.default),fn=j("aside",ie.default),hn=j("nav",ie.default),mn=j("section",ie.default);i.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,a=b(e,cn),s=l({},a,{"data-testid":n});switch(r){case"article":return i.createElement(un,l({},s,{ref:t}));case"aside":return i.createElement(fn,l({},s,{ref:t}));case"nav":return i.createElement(hn,l({},s,{ref:t}));case"section":return i.createElement(mn,l({},s,{ref:t}));case"div":return i.createElement(dn,l({},s,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let G=function(o){return o.Root="root",o.Initial="initial",o.Standard="standard",o}({});const ue=i.createContext(G.Root);ue.displayName="RenderStateContext";class yn extends i.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?i.createElement(ue.Provider,{value:G.Standard},t()):n?i.createElement(ue.Provider,{value:G.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case G.Root:return this._renderAsRootComponent();case G.Initial:return n?n():null;case G.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(G.Root)}}render(){return i.createElement(ue.Consumer,null,e=>this._maybeRender(e))}}class ye{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${ye._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}ye._factoryUniquenessCounter=0;class Ne{get(e){return e}}Ne.Default=new Ne;var pn=Ne.Default;class gn extends i.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(pn):null:(this._idFactory||(this._idFactory=new ye(r)),t(this._idFactory))}render(){return i.createElement(yn,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class Le extends i.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Le.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():i.createElement(gn,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}}Le.defaultId="wb-id";const Xe=o=>{switch(o){case"link":return{triggerOnEnter:!0,triggerOnSpace:!1};case"checkbox":case"radio":case"listbox":return{triggerOnEnter:!1,triggerOnSpace:!0};case"button":case"menuitem":case"menu":case"option":default:return{triggerOnEnter:!0,triggerOnSpace:!0}}},bn={onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onTouchStart:()=>{},onTouchEnd:()=>{},onTouchCancel:()=>{},onKeyDown:()=>{},onKeyUp:()=>{}},Y={enter:13,space:32},Ge={hovered:!1,focused:!1,pressed:!1,waiting:!1};class Be extends i.Component{static getDerivedStateFromProps(e,t){return e.disabled?l({},Ge,{focused:t.focused}):null}constructor(e){super(e),this.waitingForClick=void 0,this.enterClick=void 0,this.handleClick=t=>{const{onClick:n=void 0,beforeNav:r=void 0,safeWithNav:a=void 0}=this.props;this.enterClick||((n||r||a)&&(this.waitingForClick=!1),this.runCallbackAndMaybeNavigate(t))},this.handleMouseEnter=t=>{this.waitingForClick||this.setState({hovered:!0})},this.handleMouseLeave=()=>{this.waitingForClick||this.setState({hovered:!1,pressed:!1,focused:!1})},this.handleMouseDown=t=>{this.props.onMouseDown&&this.props.onMouseDown(t),this.setState({pressed:!0})},this.handleMouseUp=t=>{this.props.onMouseUp&&this.props.onMouseUp(t),this.setState({pressed:!1,focused:!1})},this.handleTouchStart=()=>{this.setState({pressed:!0})},this.handleTouchEnd=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleTouchCancel=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleKeyDown=t=>{const{onKeyDown:n,role:r}=this.props;n&&n(t);const a=t.which||t.keyCode,{triggerOnEnter:s,triggerOnSpace:c}=Xe(r);s&&a===Y.enter||c&&a===Y.space?(t.preventDefault(),this.setState({pressed:!0})):!s&&a===Y.enter&&(this.enterClick=!0)},this.handleKeyUp=t=>{const{onKeyUp:n,role:r}=this.props;n&&n(t);const a=t.which||t.keyCode,{triggerOnEnter:s,triggerOnSpace:c}=Xe(r);s&&a===Y.enter||c&&a===Y.space?(this.setState({pressed:!1,focused:!0}),this.runCallbackAndMaybeNavigate(t)):!s&&a===Y.enter&&(this.enterClick=!1)},this.handleFocus=t=>{const{onFocus:n}=this.props;this.setState({focused:!0},()=>{n&&n(t)})},this.handleBlur=t=>{this.setState({focused:!1,pressed:!1})},this.state=Ge,this.waitingForClick=!1,this.enterClick=!1}navigateOrReset(e){if(e){const{history:t,href:n,skipClientNav:r,target:a=void 0}=this.props;n&&(a==="_blank"?(window.open(n,"_blank"),this.setState({waiting:!1})):t&&!r?(t.push(n),this.setState({waiting:!1})):window.location.assign(n))}else this.setState({waiting:!1})}handleSafeWithNav(e,t){const{skipClientNav:n,history:r}=this.props;return r&&!n||this.props.target==="_blank"?(e(),this.navigateOrReset(t),Promise.resolve()):(this.state.waiting||this.setState({waiting:!0}),e().then(()=>{this.state.waiting||this.setState({waiting:!0})}).catch(a=>{}).finally(()=>{this.navigateOrReset(t)}))}runCallbackAndMaybeNavigate(e){const{onClick:t=void 0,beforeNav:n=void 0,safeWithNav:r=void 0,href:a,type:s}=this.props;let c=!0,f=!0;if(t&&t(e),e.defaultPrevented&&(c=!1,f=!1),e.preventDefault(),!a&&s==="submit"&&f){let u=e.currentTarget;for(;u;){if(u instanceof window.HTMLFormElement){const m=new window.Event("submit",{bubbles:!0,cancelable:!0});u.dispatchEvent(m);break}u=u.parentElement}}if(n)this.setState({waiting:!0}),n().then(()=>r?this.handleSafeWithNav(r,c):this.navigateOrReset(c)).catch(()=>{});else{if(r)return this.handleSafeWithNav(r,c);this.navigateOrReset(c)}}render(){const e=this.props.rel||(this.props.target==="_blank"?"noopener noreferrer":void 0),t=this.props.disabled?l({},bn,{onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e}):{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchCancel,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e},{children:n}=this.props;return n&&n(this.state,t)}}Be.defaultProps={disabled:!1};const Pe=o=>typeof o!="string"?!1:!/^(https?:)?\/\//i.test(o)&&!/^([^#]*#[\w-]*|[\w\-.]+:)/.test(o),vn=Ct(Be);function Sn(o,e,t){return t&&e!==!0&&o&&Pe(o)?vn:Be}const wn=["href","onClick","skipClientNav","beforeNav","safeWithNav","style","target","testId","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","hideDefaultFocusRing","light","disabled","tabIndex"],xn=j("a"),kn=j("button"),Cn=j(he),In=i.forwardRef(function(e,t){const n=(a,s,c)=>{const f=e.href&&!e.disabled,u=s&&!e.skipClientNav&&Pe(e.href||"");return f&&u&&e.href?i.createElement(Cn,l({},c,{to:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(a)):f&&!u?i.createElement(xn,l({},c,{href:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(a)):i.createElement(kn,l({},c,{type:"button","aria-disabled":e.disabled,ref:t}),e.children(a))},r=a=>{const{href:s,onClick:c,skipClientNav:f,beforeNav:u=void 0,safeWithNav:m=void 0,style:p,target:h=void 0,testId:w,onFocus:v,onKeyDown:y,onKeyUp:x,onMouseDown:E,onMouseUp:k,hideDefaultFocusRing:I,light:B,disabled:g,tabIndex:$}=e,_=b(e,wn),P=Sn(s,f,a),A=H=>[te.reset,te.link,!I&&H.focused&&(B?te.focusedLight:te.focused),g&&te.disabled,p];return u?i.createElement(P,{href:s,onClick:c,beforeNav:u,safeWithNav:m,onFocus:v,onKeyDown:y,onKeyUp:x,onMouseDown:E,onMouseUp:k,disabled:g,tabIndex:$},(H,q)=>n(H,a,l({},_,{"data-testid":w,style:A(H)},q))):i.createElement(P,{href:s,onClick:c,safeWithNav:m,onFocus:v,onKeyDown:y,onKeyUp:x,onMouseDown:E,onMouseUp:k,target:h,disabled:g,tabIndex:$},(H,q)=>n(H,a,l({},_,{"data-testid":w,style:A(H)},q)))};return i.createElement(Z.Consumer,null,a=>r(a))});In.defaultProps={light:!1,disabled:!1};const te=S.StyleSheet.create({reset:{border:"none",margin:0,padding:0,width:"auto",overflow:"visible",background:"transparent",textDecoration:"none",color:"inherit",font:"inherit",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",outline:"none",lineHeight:"normal",WebkitFontSmoothing:"inherit",MozOsxFontSmoothing:"inherit"},link:{cursor:"pointer"},focused:{":focus":{outline:`solid 2px ${d.blue}`}},focusedLight:{outline:`solid 2px ${d.white}`},disabled:{color:d.offBlack32,cursor:"not-allowed",":focus":{outline:"none"},":focus-visible":{outline:`solid 2px ${d.blue}`}}}),$n=o=>{switch(o){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},En=o=>({xsmall:24,small:32,medium:40,large:48})[o],pe={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:d.offBlack32,inverse:d.white50},inverse:d.white,action:{default:d.blue,active:d.activeBlue,inverse:d.fadedBlue},critical:{default:d.red,active:d.activeRed,inverse:d.fadedRed},primary:{action:{hovered:d.blue,active:d.activeBlue},critical:{hovered:d.red,active:d.activeRed},inverse:{default:d.white,hovered:d.white}},secondary:{default:d.offBlack},tertiary:{default:d.offBlack64},filled:{action:{hovered:d.blue,active:d.activeBlue},critical:{hovered:d.red,active:d.activeRed}}}},border:{width:{default:R.width.thin,active:R.width.none,hovered:R.width.thin,hoveredInverse:R.width.thin},radius:{default:R.radius.medium_4}}},Rn=Je(pe,{color:{bg:{hovered:d.white,active:d.white64,filled:{action:{hovered:d.blue,active:d.activeBlue},critical:{hovered:d.red,active:d.activeRed}}},stroke:{action:{inverse:d.eggplant},critical:{inverse:d.eggplant},primary:{action:{hovered:d.eggplant,active:d.eggplant},critical:{hovered:d.eggplant,active:d.eggplant},inverse:{hovered:d.eggplant}},filled:{action:{hovered:d.white,active:d.white},critical:{hovered:d.white,active:d.white}}}},border:{width:{hovered:R.width.none,hoveredInverse:R.width.none}}}),_n={default:pe,khanmigo:Rn},pt=Ye(pe);function Nn(o){var e;const t=i.useContext(Qe),n=(e=_n[t])!=null?e:pe;return i.createElement(pt.Provider,{value:n},o.children)}const Fn=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function Ln({icon:o,size:e}){switch($n(e)){case"small":return i.createElement(Ce,{size:"small",color:"currentColor",icon:o});case"medium":default:return i.createElement(Ce,{size:"medium",color:"currentColor",icon:o})}}const Bn=Fe("a"),Pn=Fe("button"),zn=Fe(he),Dn=i.forwardRef(function(e,t){const{color:n,disabled:r,href:a,icon:s,kind:c="primary",light:f=!1,size:u="medium",skipClientNav:m,style:p,testId:h}=e,w=b(e,Fn),{theme:v,themeName:y}=Ze(pt),x=E=>{const k=Hn(n,c,f,u,v,y),I=[Wn.shared,k.default,r&&k.disabled],B=i.createElement(Ln,{size:u,icon:s}),g=l({"data-testid":h,style:[I,p]},w);return a&&!r?E&&!m&&Pe(a)?i.createElement(zn,l({},g,{to:a,ref:t}),B):i.createElement(Bn,l({},g,{href:a,ref:t}),B):i.createElement(Pn,l({type:"button"},g,{onClick:r?void 0:w.onClick,"aria-disabled":r,ref:t}),B)};return i.createElement(Z.Consumer,null,E=>x(E))}),Wn=S.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),le={};function Tn(o,e,t,n,r){switch(o){case"primary":const a=r==="destructive"?e.color.stroke.primary.critical.hovered:e.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:e.color.bg.hovered,color:n?e.color.stroke.primary.inverse.hovered:a,outlineColor:n?e.color.stroke.inverse:t,outlineOffset:1,outlineStyle:"solid",outlineWidth:n?e.border.width.hoveredInverse:e.border.width.hovered},":active":{backgroundColor:e.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:r==="destructive"?e.color.bg.filled.critical.hovered:e.color.bg.filled.action.hovered,color:r==="destructive"?e.color.stroke.filled.critical.hovered:e.color.stroke.filled.action.hovered,outlineWidth:e.border.width.active},":active":{backgroundColor:r==="destructive"?e.color.bg.filled.critical.active:e.color.bg.filled.action.active,color:r==="destructive"?e.color.stroke.filled.critical.active:e.color.stroke.filled.action.active,outlineWidth:e.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Hn=(o="default",e,t,n,r,a)=>{const s=o==="destructive"?r.color.stroke.critical.default:r.color.stroke.action.default,c=`${s}-${e}-${t}-${n}-${a}`;if(le[c])return le[c];if(t&&e!=="primary")throw new Error("Light is only supported for primary IconButtons");const f=(()=>{switch(e){case"primary":return t?r.color.stroke.primary.inverse.default:s;case"secondary":return r.color.stroke.secondary.default;case"tertiary":return r.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),u=En(n),m=Tn(e,r,s,t,o),p=o==="destructive"?r.color.stroke.critical.inverse:r.color.stroke.action.inverse,h=o==="destructive"?r.color.stroke.critical.active:r.color.stroke.action.active,w=t?r.color.stroke.inverse:s,v=t?r.color.stroke.disabled.inverse:r.color.stroke.disabled.default,y={backgroundColor:r.color.bg.disabled,color:v,outlineColor:v},x={default:{height:u,width:u,color:f,borderRadius:r.border.radius.default,":hover":l({boxShadow:"none",color:w,borderRadius:r.border.radius.default,outlineWidth:r.border.width.default},m[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:f,borderRadius:r.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${w}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":l({boxShadow:"none",outlineWidth:r.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},m[":focus-visible"]),":active":l({color:t?p:h,outlineWidth:r.border.width.default,outlineColor:t?p:h,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},m[":active"])},disabled:{color:v,cursor:"not-allowed",":hover":l({},y,{outline:"none"}),":active":l({},y,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${v}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":y}};return le[c]=S.StyleSheet.create(x),le[c]},Un=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],On=i.forwardRef(function(e,t){const{color:n="default",disabled:r=!1,href:a,kind:s="primary",light:c=!1,size:f="medium",skipClientNav:u,tabIndex:m,target:p}=e,h=b(e,Un);function w(y){const x=y.key;!a&&(x==="Enter"||x==="Space")&&y.preventDefault()}function v(y){const x=y.key;!a&&(x==="Enter"||x==="Space")&&h.onClick&&h.onClick(y)}return i.createElement(Nn,null,i.createElement(Dn,l({},h,{color:n,disabled:r,href:a,kind:s,light:c,ref:t,skipClientNav:u,size:f,target:p,tabIndex:m,onKeyDown:w,onKeyUp:v})))}),An=""+new URL("corners-out-ZcPb1LY6.svg",import.meta.url).href,ze=class ze extends i.Component{constructor(e){super(e),this.iframeRef=i.createRef(),this.isWidget=!0,this.state={url:null,banner:null},this.getPhetCompatibleLocale=t=>{switch(t){case"pt-pt":return"pt";case"zh-hans":return"zh_CN";case"zh-hant":return"zh_TW";case"fa-af":return"fa_DA";default:return t}},this.displayLoadFailure=()=>{this.setState({url:null,banner:{message:this.context.strings.simulationLoadFail,kind:"critical"}})},this.locale=this.getPhetCompatibleLocale(_t().kaLocale)}async componentDidMount(){await this.updateSimState(this.props.url)}async componentDidUpdate(e){e.url!==this.props.url&&await this.updateSimState(this.props.url)}async updateSimState(e){const t=Mn(e,this.locale);if(t===null){this.displayLoadFailure();return}if(!(await fetch(t)).ok){this.displayLoadFailure();return}const r=await this.showLocaleWarning(t);this.setState({url:t,banner:r?{message:this.context.strings.simulationLocaleWarning,kind:"warning"}:null})}async showLocaleWarning(e){if(!e)return!1;const n=/https:\/\/phet\.colorado\.edu\/sims\/html\/([a-zA-Z0-9-]+)\/.*/g.exec(e.toString());if(n===null)return!1;const r=n[1],a=await fetch(`https://phet.colorado.edu/sims/html/${r}/latest/string-map.json`);if(!a.ok)return!1;let s;try{s=await a.json()}catch{return!1}const c=Object.keys(s),f=this.locale.split("_")[0];for(const u of c)if(f===u.split("_")[0])return!1;return!0}render(){var t;return St(W,{style:xe.widgetContainer,children:[this.state.banner!==null&&Q(W,{style:{marginBottom:Nt},children:Q(nn,{layout:"floating",kind:this.state.banner.kind,text:this.state.banner.message})}),Q(W,{style:xe.iframeContainer,children:Q("iframe",{ref:this.iframeRef,title:this.props.description,sandbox:"allow-same-origin allow-scripts",className:S.css(xe.iframeResponsive),src:(t=this.state.url)==null?void 0:t.toString(),allow:"fullscreen"})}),this.state.url!==null&&Q(On,{icon:An,onClick:()=>{var n;(n=this.iframeRef.current)==null||n.requestFullscreen()},kind:"secondary","aria-label":"Fullscreen",style:{marginTop:5,marginBottom:5,alignSelf:"flex-end"}})]})}};ze.contextType=Rt;let fe=ze;const Mn=(o,e)=>{if(!URL.canParse(o))return null;const t=new URL(o);return t.origin!=="https://phet.colorado.edu"?null:(t.searchParams.set("locale",e),t)},xe=S.StyleSheet.create({widgetContainer:{borderRadius:6,borderWidth:1,borderColor:"#CCC",padding:C.medium_16,paddingBottom:0},iframeContainer:{position:"relative",overflow:"hidden",width:"100%",paddingTop:"56.25%"},iframeResponsive:{borderWidth:0,position:"absolute",top:0,left:0,bottom:0,right:0,width:"100%",height:"100%"}}),fo={name:"phet-simulation",displayName:"PhET Simulation",widget:fe,isLintable:!0};fe.__docgenInfo={description:"",methods:[{name:"getPhetCompatibleLocale",docblock:null,modifiers:[],params:[{name:"kaLocale",optional:!1,type:null}],returns:null},{name:"displayLoadFailure",docblock:null,modifiers:[],params:[],returns:null},{name:"updateSimState",docblock:null,modifiers:["async"],params:[{name:"urlString",optional:!1,type:{name:"string"}}],returns:null},{name:"showLocaleWarning",docblock:null,modifiers:["async"],params:[{name:"url",optional:!1,type:{name:"URL",alias:"URL"}}],returns:{type:{name:"Promise",elements:[{name:"boolean"}],raw:"Promise"}}}],displayName:"PhetSimulation"};export{nn as B,fe as P,fo as a,Mn as m}; +import{a as St,j as Q}from"./jsx-runtime-FVsy8kgq.js";import{r as i}from"./index-TT1qJ6UJ.js";import{l as S}from"./index-awljIyHI.js";import{m as Je,c as Ye,u as Ze,a as wt,T as Qe,I as xt,x as kt}from"./index-rfN0X25E.js";import{a as b,_ as l,V as W,b as Fe}from"./index-6h5t6F0w.js";import{c as Z,L as he,w as Ct}from"./react-router-dom-W_e8xVUu.js";import{i as et,g as tt}from"./index-o3wWn3Y5.js";import{C as It}from"./index-ngddCaVG.js";import{c as d,b as R,s as C,a as ke,m as ve,f as We}from"./index-deFLJwr4.js";import{P as Ce}from"./index-xuPsLuPk.js";import{e as $t,_ as Te}from"./arrow-square-out-bold-090vdhrx.js";import{b as Et}from"./index-h_CiYGGb.js";import{P as Rt}from"./i18n-context-P5sgPFep.js";import{g as _t}from"./dependencies-d8cZibFS.js";import{s as Nt}from"./constants-iPV6vHZm.js";function rt(o){const e=[];if(o)if(Array.isArray(o))for(const t of o)e.push(...rt(t));else e.push(o);else return e;return e}function nt(o){const e=[],t=[];if(!o)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;rt(o).forEach(a=>{const s=a._definition;if(s!=null)if(n){const c={};for(const[f,u]of Object.entries(s))c[f.replace(/-[a-z]/g,m=>m[1].toUpperCase())]=u;t.push(c)}else e.push(a);else t.push(a)});const r=Object.assign({},...t);if(t.length>0&&!n){const a=S.StyleSheet.create({inlineStyles:r});e.push(a.inlineStyles)}return{style:n?r:{},className:S.css(...e)}}const Ft=["children","style","tag","testId"],Lt=/^h[1-6]$/,He=S.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),F=i.forwardRef(function(e,t){let{children:n,style:r,tag:a="span",testId:s}=e,c=b(e,Ft);const f=Lt.test(a),u=nt([He.text,f&&He.header,r]),m=c.className?[c.className,u.className].join(" "):u.className;return i.createElement(a,l({},c,{style:u.style,className:m,"data-testid":s,ref:t}),n)}),Bt=["className","style"];function M(o,e){return i.forwardRef((t,n)=>{const{className:r,style:a}=t,s=b(t,Bt),c=typeof o=="string"?Pt[o]:null,{className:f,style:u}=nt([c,e,a]);return i.createElement(o,l({},s,{ref:n,className:[f,r].filter(Boolean).join(" "),style:u}))})}const Pt=S.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),zt=["testId","tag"],ne=S.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Dt=M("div",ne.default),Wt=M("article",ne.default),Tt=M("aside",ne.default),Ht=M("nav",ne.default),Ut=M("section",ne.default),Ue=i.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,a=b(e,zt),s=l({},a,{"data-testid":n});switch(r){case"article":return i.createElement(Wt,l({},s,{ref:t}));case"aside":return i.createElement(Tt,l({},s,{ref:t}));case"nav":return i.createElement(Ht,l({},s,{ref:t}));case"section":return i.createElement(Ut,l({},s,{ref:t}));case"div":return i.createElement(Dt,l({},s,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let V=function(o){return o.Root="root",o.Initial="initial",o.Standard="standard",o}({});const ce=i.createContext(V.Root);ce.displayName="RenderStateContext";let Ot=class extends i.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?i.createElement(ce.Provider,{value:V.Standard},t()):n?i.createElement(ce.Provider,{value:V.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case V.Root:return this._renderAsRootComponent();case V.Initial:return n?n():null;case V.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(V.Root)}}render(){return i.createElement(ce.Consumer,null,e=>this._maybeRender(e))}},ot=class it{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${it._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};ot._factoryUniquenessCounter=0;let Ie=class{get(e){return e}};Ie.Default=new Ie;var At=Ie.Default;let Mt=class extends i.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(At):null:(this._idFactory||(this._idFactory=new ot(r)),t(this._idFactory))}render(){return i.createElement(Ot,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Kt=class at extends i.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(at.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():i.createElement(Mt,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Kt.defaultId="wb-id";const O=400,ee=700,jt=900,Se="@media (max-width: 1023px)",we="@media (min-width: 1024px)",N={display:"block"},D='Lato, "Noto Sans", sans-serif',Oe='"Noto Serif", serif',qt="Inconsolata, monospace",L=S.StyleSheet.create({Title:l({},N,{fontFamily:D,fontWeight:jt,[we]:{fontSize:36,lineHeight:"40px"},[Se]:{fontSize:28,lineHeight:"32px"}}),Tagline:l({},N,{fontFamily:D,fontWeight:O,fontSize:20,lineHeight:"24px"}),HeadingLarge:l({},N,{fontFamily:D,fontWeight:ee,[we]:{fontSize:28,lineHeight:"32px"},[Se]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:l({},N,{fontFamily:D,fontWeight:ee,[we]:{fontSize:24,lineHeight:"28px"},[Se]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:l({},N,{fontFamily:D,fontWeight:ee,fontSize:20,lineHeight:"24px"}),HeadingXSmall:l({},N,{fontFamily:D,fontWeight:ee,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:l({},N,{fontFamily:Oe,fontWeight:O,fontSize:22,lineHeight:"28px"}),BodySerif:l({},N,{fontFamily:Oe,fontWeight:O,fontSize:18,lineHeight:"22px"}),BodyMonospace:l({},N,{fontFamily:qt,fontWeight:O,fontSize:17,lineHeight:"22px"}),Body:l({},N,{fontFamily:D,fontWeight:O,fontSize:16,lineHeight:"22px"}),LabelLarge:l({},N,{fontFamily:D,fontWeight:ee,fontSize:16,lineHeight:"20px"}),LabelMedium:l({},N,{fontFamily:D,fontWeight:O,fontSize:16,lineHeight:"20px"}),LabelSmall:l({},N,{fontFamily:D,fontWeight:O,fontSize:14,lineHeight:"18px"}),LabelXSmall:l({},N,{fontFamily:D,fontWeight:O,fontSize:12,lineHeight:"16px"}),Caption:l({},N,{fontFamily:D,fontWeight:O,fontSize:14,lineHeight:"20px"}),Footnote:l({},N,{fontFamily:D,fontWeight:O,fontSize:12,lineHeight:"18px"})}),Vt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h1"}=e,s=b(e,Vt);return i.createElement(F,l({},s,{tag:a,style:[L.Title,n],ref:t}),r)});const Xt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h2"}=e,s=b(e,Xt);return i.createElement(F,l({},s,{tag:a,style:[L.HeadingLarge,n],ref:t}),r)});const Gt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h3"}=e,s=b(e,Gt);return i.createElement(F,l({},s,{tag:a,style:[L.HeadingMedium,n],ref:t}),r)});const Jt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h4"}=e,s=b(e,Jt);return i.createElement(F,l({},s,{tag:a,style:[L.HeadingSmall,n],ref:t}),r)});const Yt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="h4"}=e,s=b(e,Yt);return i.createElement(F,l({},s,{tag:a,style:[L.HeadingXSmall,n],ref:t}),r)});const Zt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,Zt);return i.createElement(F,l({},s,{tag:a,style:[L.BodySerifBlock,n],ref:t}),r)});const Qt=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,Qt);return i.createElement(F,l({},s,{tag:a,style:[L.BodySerif,n],ref:t}),r)});const er=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,er);return i.createElement(F,l({},s,{tag:a,style:[L.BodyMonospace,n],ref:t}),r)});const tr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,tr);return i.createElement(F,l({},s,{tag:a,style:[L.Body,n],ref:t}),r)});const rr=["style","children","tag"],nr=i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,rr);return i.createElement(F,l({},s,{tag:a,style:[L.LabelLarge,n],ref:t}),r)}),or=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,or);return i.createElement(F,l({},s,{tag:a,style:[L.LabelMedium,n],ref:t}),r)});const ir=["style","children","tag"],ar=i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,ir);return i.createElement(F,l({},s,{tag:a,style:[L.LabelSmall,n],ref:t}),r)}),sr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,sr);return i.createElement(F,l({},s,{tag:a,style:[L.LabelXSmall,n],ref:t}),r)});const lr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,lr);return i.createElement(F,l({},s,{tag:a,style:[L.Tagline,n],ref:t}),r)});const cr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,cr);return i.createElement(F,l({},s,{tag:a,style:[L.Caption,n],ref:t}),r)});const dr=["style","children","tag"];i.forwardRef(function(e,t){let{style:n,children:r,tag:a="span"}=e,s=b(e,dr);return i.createElement(F,l({},s,{tag:a,style:[L.Footnote,n],ref:t}),r)});const ur=o=>({small:16,medium:24,large:48,xlarge:96})[o],fr=["color","icon","size","style","testId","className"],hr=M("span"),$e=i.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:a="small",style:s,testId:c,className:f}=e,u=b(e,fr),m=ur(a),p=`${f??""}`,h=mr(n,m);return i.createElement(hr,l({},u,{className:p,style:[Ee.svg,h.icon,{maskImage:`url(${r})`},s],"data-testid":c,ref:t}))}),Ae={},mr=(o,e)=>{const t=`${o}-${e}`;if(Ee[t])return Ee[t];const n={icon:{backgroundColor:o,width:e,height:e}};return Ae[t]=S.StyleSheet.create(n),Ae[t]},Ee=S.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});$e.displayName="PhosphorIcon";const me={color:{bg:{action:{default:d.blue,active:d.activeBlue,inverse:d.fadedBlue},critical:{default:d.red,active:d.activeRed,inverse:d.fadedRed},primary:{default:d.white,disabled:d.offBlack32,inverse:d.darkBlue},secondary:{default:"none",inverse:"none",focus:d.white,active:{action:d.fadedBlue,critical:d.fadedRed}},tertiary:{hover:d.white},icon:{secondaryHover:"transparent"}},text:{disabled:d.offBlack32,inverse:d.white,primary:{disabled:d.white64},secondary:{inverse:d.white50},icon:{secondaryHover:"inherit"}},border:{disabled:d.offBlack32,primary:{inverse:d.white},secondary:{action:d.offBlack50,critical:d.offBlack50,inverse:d.white50},tertiary:{inverse:d.white}}},border:{width:{secondary:R.width.hairline,focused:R.width.thin,disabled:R.width.thin},radius:{default:R.radius.medium_4,tertiary:R.radius.xSmall_2,small:R.radius.medium_4,large:R.radius.large_6,icon:R.radius.full}},size:{height:{tertiaryHover:C.xxxxSmall_2,small:C.xLarge_32,medium:40,large:56}},margin:{icon:{offset:-C.xxxxSmall_2}},padding:{xsmall:C.xxxxSmall_2,small:C.xxSmall_6,medium:C.small_12,large:C.medium_16,xLarge:C.xLarge_32},font:{size:{large:18},lineHeight:{large:ke.lineHeight.medium},weight:{default:ke.weight.bold}}},yr=Je(me,{color:{bg:{secondary:{default:d.offWhite,active:{action:d.fadedBlue8,critical:d.fadedRed8},focus:d.offWhite},icon:{secondaryHover:d.fadedBlue16}},border:{secondary:{action:d.fadedBlue,critical:d.fadedRed}},text:{icon:{secondaryHover:d.blue}}},border:{radius:{default:R.radius.xLarge_12,small:R.radius.large_6,large:R.radius.xLarge_12},width:{focused:R.width.hairline}},margin:{icon:{offset:-C.xSmall_8}},font:{weight:{default:ke.weight.regular}}}),pr={default:me,khanmigo:yr},st=Ye(me);function gr(o){const e=i.useContext(Qe),t=pr[e]||me;return i.createElement(st.Provider,{value:t},o.children)}function Me({icon:o,size:e,style:t,testId:n}){const r={"aria-hidden":!0,color:"currentColor",style:t,testId:n};switch(e){case"small":return i.createElement($e,l({},r,{size:"small",icon:o}));case"medium":default:return i.createElement($e,l({},r,{size:"medium",icon:o}))}}const br=["children","skipClientNav","color","disabled","focused","hovered","href","kind","labelStyle","light","pressed","size","style","testId","type","spinner","startIcon","endIcon","id","waiting"],vr=M("a"),Sr=M("button"),wr=M(he),xr=i.forwardRef(function(e,t){const{theme:n,themeName:r}=Ze(st),a=wt(kr,n),s=c=>{const{children:f,skipClientNav:u,color:m,disabled:p,focused:h,hovered:w,href:v=void 0,kind:y="primary",labelStyle:x,light:E=!1,pressed:k,size:I="medium",style:B,testId:g,type:$=void 0,spinner:_,startIcon:P,endIcon:A,id:H}=e,q=b(e,br),T=Cr(m,y,E,I,n,r),U=_||p,ae=[a.shared,U&&a.disabled,P&&a.withStartIcon,A&&a.withEndIcon,T.default,U&&T.disabled,y!=="tertiary"&&!U&&(k?T.active:(w||h)&&T.focus),y==="tertiary"&&!k&&h&&[T.focus,U&&T.disabledFocus],I==="small"&&a.small,I==="large"&&a.large],ge=l({"data-testid":g,id:H,role:"button",style:[ae,B]},q),gt=I==="small"?ar:nr,bt=i.createElement(gt,{style:[a.text,I==="large"&&a.largeText,x,_&&a.hiddenText,y==="tertiary"&&a.textWithFocus,y==="tertiary"&&!U&&(k?[T.hover,T.active]:w&&T.hover)],testId:g?`${g}-inner-label`:void 0},f),vt={medium:"small",small:"xsmall",large:"medium"},De=I==="small"?"small":"medium",be=i.createElement(i.Fragment,null,P&&i.createElement(Ue,{style:a.iconWrapper},i.createElement(Me,{size:De,icon:P,style:[a.startIcon,y==="tertiary"&&a.tertiaryStartIcon],testId:g?`${g}-start-icon`:void 0})),bt,_&&i.createElement(It,{style:a.spinner,size:vt[I],light:y==="primary",testId:`${g||"button"}-spinner`}),A&&i.createElement(Ue,{testId:g?`${g}-end-icon-wrapper`:void 0,style:[re.endIcon,a.iconWrapper,a.endIconWrapper,y==="tertiary"&&a.endIconWrapperTertiary,(h||w)&&y!=="primary"&&a.iconWrapperSecondaryHovered]},i.createElement(Me,{size:De,icon:A,testId:g?`${g}-end-icon`:void 0})));return v&&!U?c&&!u&&et(v)?i.createElement(wr,l({},ge,{to:v,ref:t}),be):i.createElement(vr,l({},ge,{href:v,ref:t}),be):i.createElement(Sr,l({type:$||"button"},ge,{"aria-disabled":U,ref:t}),be)};return i.createElement(Z.Consumer,null,c=>s(c))}),kr=o=>({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:o.size.height.medium,paddingTop:0,paddingBottom:0,paddingLeft:o.padding.large,paddingRight:o.padding.large,border:"none",borderRadius:o.border.radius.default,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{borderRadius:o.border.radius.small,height:o.size.height.small},large:{borderRadius:o.border.radius.large,height:o.size.height.large},text:{alignItems:"center",fontWeight:o.font.weight.default,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",pointerEvents:"none"},largeText:{fontSize:o.font.size.large,lineHeight:`${o.font.lineHeight.large}px`},textWithFocus:{position:"relative"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"},startIcon:{marginRight:o.padding.small,marginLeft:o.margin.icon.offset},tertiaryStartIcon:{marginLeft:0},endIcon:{marginLeft:o.padding.small},iconWrapper:{borderRadius:o.border.radius.icon,padding:o.padding.xsmall,minWidth:"auto"},iconWrapperSecondaryHovered:{backgroundColor:o.color.bg.icon.secondaryHover,color:o.color.text.icon.secondaryHover},endIconWrapper:{marginLeft:o.padding.small,marginRight:o.margin.icon.offset},endIconWrapperTertiary:{marginRight:0}}),re={},Cr=(o="default",e,t,n,r,a)=>{const s=o==="destructive"?r.color.bg.critical.default:r.color.bg.action.default,c=`${s}-${e}-${t}-${n}-${a}`;if(re[c])return re[c];const f=o==="destructive"?r.color.bg.critical.inverse:r.color.bg.action.inverse,u=o==="destructive"?r.color.bg.critical.active:r.color.bg.action.active,m=n==="large"?r.padding.xLarge:r.padding.large;let p={};if(e==="primary"){const h=t?r.color.bg.primary.inverse:r.color.bg.primary.default;p={default:{background:t?r.color.bg.primary.default:s,color:t?s:r.color.text.inverse,paddingLeft:m,paddingRight:m},focus:{boxShadow:`0 0 0 1px ${h}, 0 0 0 3px ${t?r.color.bg.primary.default:s}`},active:{boxShadow:`0 0 0 1px ${h}, 0 0 0 3px ${t?f:u}`,background:t?f:u,color:t?u:f},disabled:{background:t?f:r.color.bg.primary.disabled,color:t?s:r.color.text.primary.disabled,cursor:"default",":focus":{boxShadow:`0 0 0 1px ${t?r.color.bg.primary.disabled:r.color.bg.primary.default}, 0 0 0 3px ${t?f:r.color.bg.primary.disabled}`}}}}else if(e==="secondary"){const h=o==="destructive"?r.color.border.secondary.critical:r.color.border.secondary.action,w=o==="destructive"?r.color.bg.secondary.active.critical:r.color.bg.secondary.active.action;p={default:{background:t?r.color.bg.secondary.inverse:r.color.bg.secondary.default,color:t?r.color.text.inverse:s,borderColor:t?r.color.border.secondary.inverse:h,borderStyle:"solid",borderWidth:r.border.width.secondary,paddingLeft:m,paddingRight:m},focus:{background:t?r.color.bg.secondary.inverse:r.color.bg.secondary.focus,borderColor:"transparent",outlineColor:t?r.color.border.primary.inverse:s,outlineStyle:"solid",outlineWidth:r.border.width.focused},active:{background:t?u:w,color:t?f:u,borderColor:"transparent",outlineColor:t?f:u,outlineStyle:"solid",outlineWidth:r.border.width.focused},disabled:{color:t?r.color.text.secondary.inverse:r.color.text.disabled,outlineColor:t?f:r.color.border.disabled,cursor:"default",":focus":{outlineColor:t?r.color.border.secondary.inverse:r.color.border.disabled,outlineStyle:"solid",outlineWidth:r.border.width.disabled}}}}else if(e==="tertiary")p={default:{background:"none",color:t?r.color.text.inverse:s,paddingLeft:0,paddingRight:0},hover:{":after":{content:"''",position:"absolute",height:r.size.height.tertiaryHover,width:"100%",right:0,bottom:0,background:t?r.color.bg.tertiary.hover:s,borderRadius:r.border.radius.tertiary}},focus:{outlineStyle:"solid",outlineColor:t?r.color.border.tertiary.inverse:s,outlineWidth:r.border.width.focused,borderRadius:r.border.radius.default},active:{color:t?f:u,":after":{height:r.size.height.tertiaryHover,background:t?f:u}},disabled:{color:t?f:r.color.text.disabled,cursor:"default"},disabledFocus:{outlineColor:t?r.color.border.tertiary.inverse:r.color.border.disabled}};else throw new Error("Button kind not recognized");return re[c]=S.StyleSheet.create(p),re[c]},Ir=["href","type","children","skipClientNav","onClick","beforeNav","safeWithNav","tabIndex","target","rel","color","kind","light","size","disabled","spinner"],$r=i.forwardRef(function(e,t){const{href:n=void 0,type:r=void 0,children:a,skipClientNav:s,onClick:c,beforeNav:f=void 0,safeWithNav:u=void 0,tabIndex:m,target:p,rel:h,color:w="default",kind:v="primary",light:y=!1,size:x="medium",disabled:E=!1,spinner:k=!1}=e,I=b(e,Ir),B=g=>{const $=tt(n,s,g),_=(P,A)=>i.createElement(xr,l({},I,P,A,{disabled:E,spinner:k||P.waiting,color:w,kind:v,light:y,size:x,skipClientNav:s,href:n,target:p,type:r,tabIndex:m,ref:t}),a);return f?i.createElement($,{disabled:k||E,href:n,role:"button",type:r,onClick:c,beforeNav:f,safeWithNav:u,rel:h},_):i.createElement($,{disabled:k||E,href:n,role:"button",type:r,onClick:c,safeWithNav:u,target:p,rel:h},_)};return i.createElement(gr,null,i.createElement(Z.Consumer,null,g=>B(g)))});function lt(o){const e=[];if(o)if(Array.isArray(o))for(const t of o)e.push(...lt(t));else e.push(o);else return e;return e}function ct(o){const e=[],t=[];if(!o)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;lt(o).forEach(a=>{const s=a._definition;if(s!=null)if(n){const c={};for(const[f,u]of Object.entries(s))c[f.replace(/-[a-z]/g,m=>m[1].toUpperCase())]=u;t.push(c)}else e.push(a);else t.push(a)});const r=Object.assign({},...t);if(t.length>0&&!n){const a=S.StyleSheet.create({inlineStyles:r});e.push(a.inlineStyles)}return{style:n?r:{},className:S.css(...e)}}const Er=["children","style","tag","testId"],Rr=/^h[1-6]$/,Ke=S.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});i.forwardRef(function(e,t){let{children:n,style:r,tag:a="span",testId:s}=e,c=b(e,Er);const f=Rr.test(a),u=ct([Ke.text,f&&Ke.header,r]),m=c.className?[c.className,u.className].join(" "):u.className;return i.createElement(a,l({},c,{style:u.style,className:m,"data-testid":s,ref:t}),n)});const _r=["className","style"];function K(o,e){return i.forwardRef((t,n)=>{const{className:r,style:a}=t,s=b(t,_r),c=typeof o=="string"?Nr[o]:null,{className:f,style:u}=ct([c,e,a]);return i.createElement(o,l({},s,{ref:n,className:[f,r].filter(Boolean).join(" "),style:u}))})}const Nr=S.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Fr=["testId","tag"],oe=S.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Lr=K("div",oe.default),Br=K("article",oe.default),Pr=K("aside",oe.default),zr=K("nav",oe.default),Dr=K("section",oe.default);i.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,a=b(e,Fr),s=l({},a,{"data-testid":n});switch(r){case"article":return i.createElement(Br,l({},s,{ref:t}));case"aside":return i.createElement(Pr,l({},s,{ref:t}));case"nav":return i.createElement(zr,l({},s,{ref:t}));case"section":return i.createElement(Dr,l({},s,{ref:t}));case"div":return i.createElement(Lr,l({},s,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let X=function(o){return o.Root="root",o.Initial="initial",o.Standard="standard",o}({});const de=i.createContext(X.Root);de.displayName="RenderStateContext";let Wr=class extends i.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?i.createElement(de.Provider,{value:X.Standard},t()):n?i.createElement(de.Provider,{value:X.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case X.Root:return this._renderAsRootComponent();case X.Initial:return n?n():null;case X.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(X.Root)}}render(){return i.createElement(de.Consumer,null,e=>this._maybeRender(e))}},dt=class ut{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${ut._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};dt._factoryUniquenessCounter=0;let Re=class{get(e){return e}};Re.Default=new Re;var Tr=Re.Default;let Hr=class extends i.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Tr):null:(this._idFactory||(this._idFactory=new dt(r)),t(this._idFactory))}render(){return i.createElement(Wr,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Ur=class ft extends i.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(ft.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():i.createElement(Hr,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Ur.defaultId="wb-id";const Or=o=>({small:16,medium:24,large:48,xlarge:96})[o],Ar=["color","icon","size","style","testId","className"],Mr=K("span"),ht=i.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:a="small",style:s,testId:c,className:f}=e,u=b(e,Ar),m=Or(a),p=`${f??""}`,h=Kr(n,m);return i.createElement(Mr,l({},u,{className:p,style:[_e.svg,h.icon,{maskImage:`url(${r})`},s],"data-testid":c,ref:t}))}),je={},Kr=(o,e)=>{const t=`${o}-${e}`;if(_e[t])return _e[t];const n={icon:{backgroundColor:o,width:e,height:e}};return je[t]=S.StyleSheet.create(n),je[t]},_e=S.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});ht.displayName="PhosphorIcon";const jr=["children","skipClientNav","focused","hovered","href","inline","kind","light","visitable","pressed","style","testId","waiting","target","startIcon","endIcon"],qr=K("a"),Vr=K(he),qe=i.forwardRef(function(e,t){const n=r=>{const{children:a,skipClientNav:s,focused:c,hovered:f,href:u,inline:m=!1,kind:p="primary",light:h=!1,visitable:w=!1,pressed:v,style:y,testId:x,target:E,startIcon:k,endIcon:I}=e,B=b(e,jr),g=Gr(m,p,h,w),$=m?g.restingInline:g.resting,_=[Xr.shared,$,v&&g.active,!v&&f&&g.hover,!v&&c&&g.focus],P=l({"data-testid":x,style:[_,y],target:E},B),H=new URL(u,window.location.origin).origin!==window.location.origin,q=i.createElement(ht,{icon:$t,size:"small",style:[J.endIcon,J.centered],testId:"external-icon"});let T,U;k&&(T=i.cloneElement(k,l({style:[J.startIcon,J.centered],testId:"start-icon","aria-hidden":"true"},k.props))),I&&(U=i.cloneElement(I,l({style:[J.endIcon,J.centered],testId:"end-icon","aria-hidden":"true"},I.props)));const ae=i.createElement(i.Fragment,null,k&&T,a,I?U:H&&E==="_blank"&&q);return r&&!s&&et(u)?i.createElement(Vr,l({},P,{to:u,ref:t}),ae):i.createElement(qr,l({},P,{href:u,ref:t}),ae)};return i.createElement(Z.Consumer,null,r=>n(r))}),se={},J=S.StyleSheet.create({startIcon:{marginInlineEnd:C.xxxSmall_4},endIcon:{marginInlineStart:C.xxxSmall_4},centered:{verticalAlign:"-10%"}}),Xr=S.StyleSheet.create({shared:{cursor:"pointer",textDecoration:"none",outline:"none",alignItems:"center"}}),Gr=(o,e,t,n)=>{const r=`${e}-${o.toString()}-${t.toString()}-${n.toString()}`;if(se[r])return se[r];if(e==="secondary"&&t)throw new Error("Secondary Light links are not supported");if(n&&e!=="primary")throw new Error("Only primary link is visitable");const{blue:a,purple:s,white:c,offBlack:f,offBlack32:u,offBlack64:m}=d,p="#fa50ae",h=ve(We(f,.08),s),w=d.fadedBlue,v=ve(We(c,.32),p),y=d.activeBlue,k=e==="primary"?t?c:a:o?f:m,g=e==="primary"?t?w:y:o?y:f,$=n?{":visited":{color:t?p:h}}:Object.freeze({}),_=n?{":visited":{color:t?v:ve(u,h)}}:Object.freeze({}),P={resting:l({color:k},$),restingInline:l({color:k,textDecoration:"underline currentcolor solid",textUnderlineOffset:2},$),hover:l({textDecoration:"underline currentcolor solid",color:k},$),focus:{":focus-visible":l({color:k,outline:`1px solid ${t?c:a}`,borderRadius:3},$)},active:l({color:g,textDecoration:"underline currentcolor solid"},_)};return se[r]=S.StyleSheet.create(P),se[r]},Jr=["onClick","beforeNav","safeWithNav","href","skipClientNav","children","tabIndex","onKeyDown","onKeyUp","target","inline","kind","light","visitable"],Yr=i.forwardRef(function(e,t){const{onClick:n,beforeNav:r=void 0,safeWithNav:a,href:s,skipClientNav:c,children:f,tabIndex:u,onKeyDown:m,onKeyUp:p,target:h=void 0,inline:w=!1,kind:v="primary",light:y=!1,visitable:x=!1}=e,E=b(e,Jr),k=I=>{const B=tt(s,c,I);return r?i.createElement(B,{disabled:!1,href:s,role:"link",onClick:n,beforeNav:r,safeWithNav:a,onKeyDown:m,onKeyUp:p},(g,$)=>{let _=l({},(Te($),$));return i.createElement(qe,l({},E,g,_,{skipClientNav:c,href:s,target:h,tabIndex:u,inline:w,kind:v,light:y,visitable:x,ref:t}),f)}):i.createElement(B,{disabled:!1,href:s,role:"link",onClick:n,safeWithNav:a,target:h,onKeyDown:m,onKeyUp:p},(g,$)=>{let _=l({},(Te($),$));return i.createElement(qe,l({},E,g,_,{skipClientNav:c,href:s,target:h,tabIndex:u,inline:w,kind:v,light:y,visitable:x,ref:t}),f)})};return i.createElement(Z.Consumer,null,I=>k(I))}),Zr=""+new URL("info-vUJD1n-8.svg",import.meta.url).href,Qr=""+new URL("smiley-xdY6f5H9.svg",import.meta.url).href,en=""+new URL("warning-ctw6EWuu.svg",import.meta.url).href,tn=""+new URL("warning-circle-OrBK1ju8.svg",import.meta.url).href,rn=o=>{switch(o){case"success":return{color:d.green,icon:Qr,role:"status"};case"warning":return{color:d.gold,icon:en,role:"alert",ariaLive:"polite"};case"critical":return{color:d.red,icon:tn,role:"alert"};default:return{color:d.blue,icon:Zr,role:"status"}}},nn=o=>{const{actions:e,"aria-label":t,dismissAriaLabel:n="Dismiss banner.",onDismiss:r,kind:a="info",layout:s,text:c,testId:f,icon:u}=o,m=()=>e==null?void 0:e.filter(Boolean).map((h,w)=>{if(h.type==="custom")return i.createElement(W,{style:z.action,key:`custom-action-${w}`},h.node);const v=h.onClick;if(h.type==="link"){var y;return i.createElement(W,{style:z.action,key:h.title},i.createElement(Yr,{kind:"primary",href:h.href,onClick:v,"aria-label":(y=h.ariaLabel)!=null?y:h.title,style:z.link},h.title))}else{var x;return i.createElement(W,{style:z.action,key:h.title},i.createElement($r,{kind:"tertiary",size:"small","aria-label":(x=h.ariaLabel)!=null?x:h.title,onClick:v},h.title))}}),p=rn(a);return i.createElement(W,{style:[z.containerOuter,s==="floating"&&z.floatingBorder,{borderInlineStartColor:p.color}],role:p.role,"aria-label":t,"aria-live":p.ariaLive,testId:f},i.createElement(W,{style:[z.backgroundColor,{backgroundColor:p.color}]}),i.createElement(W,{style:z.containerInner},i.createElement(Ce,{icon:u||p.icon,size:"medium",style:z.icon,"aria-label":a,testId:"banner-kind-icon",role:"img"}),i.createElement(W,{style:z.labelAndButtonsContainer},i.createElement(W,{style:z.labelContainer},i.createElement(Et,null,c)),e&&i.createElement(W,{style:z.actionsContainer},m())),r?i.createElement(W,{style:z.dismissContainer},i.createElement(xt,{icon:kt,kind:"tertiary",onClick:r,style:z.dismiss,"aria-label":n})):null))},z=S.StyleSheet.create({backgroundColor:{position:"absolute",top:0,bottom:0,left:0,right:0,opacity:.08},containerOuter:{borderInlineStartWidth:C.xxSmall_6,width:"100%",backgroundColor:d.white},containerInner:{flexDirection:"row",padding:C.xSmall_8},icon:{marginTop:C.xSmall_8,marginBottom:C.xSmall_8,marginInlineStart:C.xxxxSmall_2,marginInlineEnd:C.xSmall_8,alignSelf:"flex-start",color:d.offBlack64},labelAndButtonsContainer:{flex:1,flexDirection:"row",alignItems:"center",alignContent:"center",flexWrap:"wrap",justifyContent:"space-between"},labelContainer:{flexShrink:1,margin:C.xSmall_8,textAlign:"start",overflowWrap:"break-word"},actionsContainer:{flexDirection:"row",justifyContent:"flex-start",marginTop:C.xSmall_8,marginBottom:C.xSmall_8,height:18,alignItems:"center"},action:{marginLeft:C.xSmall_8,marginRight:C.xSmall_8,justifyContent:"center"},link:{fontSize:14},dismiss:{flexShrink:1},dismissContainer:{height:40,width:40,justifyContent:"center",alignItems:"center",marginLeft:C.xSmall_8,marginRight:C.xSmall_8},floatingBorder:{borderRadius:4,overflow:"hidden"}});function mt(o){const e=[];if(o)if(Array.isArray(o))for(const t of o)e.push(...mt(t));else e.push(o);else return e;return e}function yt(o){const e=[],t=[];if(!o)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;mt(o).forEach(a=>{const s=a._definition;if(s!=null)if(n){const c={};for(const[f,u]of Object.entries(s))c[f.replace(/-[a-z]/g,m=>m[1].toUpperCase())]=u;t.push(c)}else e.push(a);else t.push(a)});const r=Object.assign({},...t);if(t.length>0&&!n){const a=S.StyleSheet.create({inlineStyles:r});e.push(a.inlineStyles)}return{style:n?r:{},className:S.css(...e)}}const on=["children","style","tag","testId"],an=/^h[1-6]$/,Ve=S.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});i.forwardRef(function(e,t){let{children:n,style:r,tag:a="span",testId:s}=e,c=b(e,on);const f=an.test(a),u=yt([Ve.text,f&&Ve.header,r]),m=c.className?[c.className,u.className].join(" "):u.className;return i.createElement(a,l({},c,{style:u.style,className:m,"data-testid":s,ref:t}),n)});const sn=["className","style"];function j(o,e){return i.forwardRef((t,n)=>{const{className:r,style:a}=t,s=b(t,sn),c=typeof o=="string"?ln[o]:null,{className:f,style:u}=yt([c,e,a]);return i.createElement(o,l({},s,{ref:n,className:[f,r].filter(Boolean).join(" "),style:u}))})}const ln=S.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),cn=["testId","tag"],ie=S.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),dn=j("div",ie.default),un=j("article",ie.default),fn=j("aside",ie.default),hn=j("nav",ie.default),mn=j("section",ie.default);i.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,a=b(e,cn),s=l({},a,{"data-testid":n});switch(r){case"article":return i.createElement(un,l({},s,{ref:t}));case"aside":return i.createElement(fn,l({},s,{ref:t}));case"nav":return i.createElement(hn,l({},s,{ref:t}));case"section":return i.createElement(mn,l({},s,{ref:t}));case"div":return i.createElement(dn,l({},s,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let G=function(o){return o.Root="root",o.Initial="initial",o.Standard="standard",o}({});const ue=i.createContext(G.Root);ue.displayName="RenderStateContext";class yn extends i.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?i.createElement(ue.Provider,{value:G.Standard},t()):n?i.createElement(ue.Provider,{value:G.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case G.Root:return this._renderAsRootComponent();case G.Initial:return n?n():null;case G.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(G.Root)}}render(){return i.createElement(ue.Consumer,null,e=>this._maybeRender(e))}}class ye{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${ye._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}ye._factoryUniquenessCounter=0;class Ne{get(e){return e}}Ne.Default=new Ne;var pn=Ne.Default;class gn extends i.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(pn):null:(this._idFactory||(this._idFactory=new ye(r)),t(this._idFactory))}render(){return i.createElement(yn,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class Le extends i.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Le.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():i.createElement(gn,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}}Le.defaultId="wb-id";const Xe=o=>{switch(o){case"link":return{triggerOnEnter:!0,triggerOnSpace:!1};case"checkbox":case"radio":case"listbox":return{triggerOnEnter:!1,triggerOnSpace:!0};case"button":case"menuitem":case"menu":case"option":default:return{triggerOnEnter:!0,triggerOnSpace:!0}}},bn={onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onTouchStart:()=>{},onTouchEnd:()=>{},onTouchCancel:()=>{},onKeyDown:()=>{},onKeyUp:()=>{}},Y={enter:13,space:32},Ge={hovered:!1,focused:!1,pressed:!1,waiting:!1};class Be extends i.Component{static getDerivedStateFromProps(e,t){return e.disabled?l({},Ge,{focused:t.focused}):null}constructor(e){super(e),this.waitingForClick=void 0,this.enterClick=void 0,this.handleClick=t=>{const{onClick:n=void 0,beforeNav:r=void 0,safeWithNav:a=void 0}=this.props;this.enterClick||((n||r||a)&&(this.waitingForClick=!1),this.runCallbackAndMaybeNavigate(t))},this.handleMouseEnter=t=>{this.waitingForClick||this.setState({hovered:!0})},this.handleMouseLeave=()=>{this.waitingForClick||this.setState({hovered:!1,pressed:!1,focused:!1})},this.handleMouseDown=t=>{this.props.onMouseDown&&this.props.onMouseDown(t),this.setState({pressed:!0})},this.handleMouseUp=t=>{this.props.onMouseUp&&this.props.onMouseUp(t),this.setState({pressed:!1,focused:!1})},this.handleTouchStart=()=>{this.setState({pressed:!0})},this.handleTouchEnd=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleTouchCancel=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleKeyDown=t=>{const{onKeyDown:n,role:r}=this.props;n&&n(t);const a=t.which||t.keyCode,{triggerOnEnter:s,triggerOnSpace:c}=Xe(r);s&&a===Y.enter||c&&a===Y.space?(t.preventDefault(),this.setState({pressed:!0})):!s&&a===Y.enter&&(this.enterClick=!0)},this.handleKeyUp=t=>{const{onKeyUp:n,role:r}=this.props;n&&n(t);const a=t.which||t.keyCode,{triggerOnEnter:s,triggerOnSpace:c}=Xe(r);s&&a===Y.enter||c&&a===Y.space?(this.setState({pressed:!1,focused:!0}),this.runCallbackAndMaybeNavigate(t)):!s&&a===Y.enter&&(this.enterClick=!1)},this.handleFocus=t=>{const{onFocus:n}=this.props;this.setState({focused:!0},()=>{n&&n(t)})},this.handleBlur=t=>{this.setState({focused:!1,pressed:!1})},this.state=Ge,this.waitingForClick=!1,this.enterClick=!1}navigateOrReset(e){if(e){const{history:t,href:n,skipClientNav:r,target:a=void 0}=this.props;n&&(a==="_blank"?(window.open(n,"_blank"),this.setState({waiting:!1})):t&&!r?(t.push(n),this.setState({waiting:!1})):window.location.assign(n))}else this.setState({waiting:!1})}handleSafeWithNav(e,t){const{skipClientNav:n,history:r}=this.props;return r&&!n||this.props.target==="_blank"?(e(),this.navigateOrReset(t),Promise.resolve()):(this.state.waiting||this.setState({waiting:!0}),e().then(()=>{this.state.waiting||this.setState({waiting:!0})}).catch(a=>{}).finally(()=>{this.navigateOrReset(t)}))}runCallbackAndMaybeNavigate(e){const{onClick:t=void 0,beforeNav:n=void 0,safeWithNav:r=void 0,href:a,type:s}=this.props;let c=!0,f=!0;if(t&&t(e),e.defaultPrevented&&(c=!1,f=!1),e.preventDefault(),!a&&s==="submit"&&f){let u=e.currentTarget;for(;u;){if(u instanceof window.HTMLFormElement){const m=new window.Event("submit",{bubbles:!0,cancelable:!0});u.dispatchEvent(m);break}u=u.parentElement}}if(n)this.setState({waiting:!0}),n().then(()=>r?this.handleSafeWithNav(r,c):this.navigateOrReset(c)).catch(()=>{});else{if(r)return this.handleSafeWithNav(r,c);this.navigateOrReset(c)}}render(){const e=this.props.rel||(this.props.target==="_blank"?"noopener noreferrer":void 0),t=this.props.disabled?l({},bn,{onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e}):{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchCancel,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e},{children:n}=this.props;return n&&n(this.state,t)}}Be.defaultProps={disabled:!1};const Pe=o=>typeof o!="string"?!1:!/^(https?:)?\/\//i.test(o)&&!/^([^#]*#[\w-]*|[\w\-.]+:)/.test(o),vn=Ct(Be);function Sn(o,e,t){return t&&e!==!0&&o&&Pe(o)?vn:Be}const wn=["href","onClick","skipClientNav","beforeNav","safeWithNav","style","target","testId","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","hideDefaultFocusRing","light","disabled","tabIndex"],xn=j("a"),kn=j("button"),Cn=j(he),In=i.forwardRef(function(e,t){const n=(a,s,c)=>{const f=e.href&&!e.disabled,u=s&&!e.skipClientNav&&Pe(e.href||"");return f&&u&&e.href?i.createElement(Cn,l({},c,{to:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(a)):f&&!u?i.createElement(xn,l({},c,{href:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(a)):i.createElement(kn,l({},c,{type:"button","aria-disabled":e.disabled,ref:t}),e.children(a))},r=a=>{const{href:s,onClick:c,skipClientNav:f,beforeNav:u=void 0,safeWithNav:m=void 0,style:p,target:h=void 0,testId:w,onFocus:v,onKeyDown:y,onKeyUp:x,onMouseDown:E,onMouseUp:k,hideDefaultFocusRing:I,light:B,disabled:g,tabIndex:$}=e,_=b(e,wn),P=Sn(s,f,a),A=H=>[te.reset,te.link,!I&&H.focused&&(B?te.focusedLight:te.focused),g&&te.disabled,p];return u?i.createElement(P,{href:s,onClick:c,beforeNav:u,safeWithNav:m,onFocus:v,onKeyDown:y,onKeyUp:x,onMouseDown:E,onMouseUp:k,disabled:g,tabIndex:$},(H,q)=>n(H,a,l({},_,{"data-testid":w,style:A(H)},q))):i.createElement(P,{href:s,onClick:c,safeWithNav:m,onFocus:v,onKeyDown:y,onKeyUp:x,onMouseDown:E,onMouseUp:k,target:h,disabled:g,tabIndex:$},(H,q)=>n(H,a,l({},_,{"data-testid":w,style:A(H)},q)))};return i.createElement(Z.Consumer,null,a=>r(a))});In.defaultProps={light:!1,disabled:!1};const te=S.StyleSheet.create({reset:{border:"none",margin:0,padding:0,width:"auto",overflow:"visible",background:"transparent",textDecoration:"none",color:"inherit",font:"inherit",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",outline:"none",lineHeight:"normal",WebkitFontSmoothing:"inherit",MozOsxFontSmoothing:"inherit"},link:{cursor:"pointer"},focused:{":focus":{outline:`solid 2px ${d.blue}`}},focusedLight:{outline:`solid 2px ${d.white}`},disabled:{color:d.offBlack32,cursor:"not-allowed",":focus":{outline:"none"},":focus-visible":{outline:`solid 2px ${d.blue}`}}}),$n=o=>{switch(o){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},En=o=>({xsmall:24,small:32,medium:40,large:48})[o],pe={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:d.offBlack32,inverse:d.white50},inverse:d.white,action:{default:d.blue,active:d.activeBlue,inverse:d.fadedBlue},critical:{default:d.red,active:d.activeRed,inverse:d.fadedRed},primary:{action:{hovered:d.blue,active:d.activeBlue},critical:{hovered:d.red,active:d.activeRed},inverse:{default:d.white,hovered:d.white}},secondary:{default:d.offBlack},tertiary:{default:d.offBlack64},filled:{action:{hovered:d.blue,active:d.activeBlue},critical:{hovered:d.red,active:d.activeRed}}}},border:{width:{default:R.width.thin,active:R.width.none,hovered:R.width.thin,hoveredInverse:R.width.thin},radius:{default:R.radius.medium_4}}},Rn=Je(pe,{color:{bg:{hovered:d.white,active:d.white64,filled:{action:{hovered:d.blue,active:d.activeBlue},critical:{hovered:d.red,active:d.activeRed}}},stroke:{action:{inverse:d.eggplant},critical:{inverse:d.eggplant},primary:{action:{hovered:d.eggplant,active:d.eggplant},critical:{hovered:d.eggplant,active:d.eggplant},inverse:{hovered:d.eggplant}},filled:{action:{hovered:d.white,active:d.white},critical:{hovered:d.white,active:d.white}}}},border:{width:{hovered:R.width.none,hoveredInverse:R.width.none}}}),_n={default:pe,khanmigo:Rn},pt=Ye(pe);function Nn(o){var e;const t=i.useContext(Qe),n=(e=_n[t])!=null?e:pe;return i.createElement(pt.Provider,{value:n},o.children)}const Fn=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function Ln({icon:o,size:e}){switch($n(e)){case"small":return i.createElement(Ce,{size:"small",color:"currentColor",icon:o});case"medium":default:return i.createElement(Ce,{size:"medium",color:"currentColor",icon:o})}}const Bn=Fe("a"),Pn=Fe("button"),zn=Fe(he),Dn=i.forwardRef(function(e,t){const{color:n,disabled:r,href:a,icon:s,kind:c="primary",light:f=!1,size:u="medium",skipClientNav:m,style:p,testId:h}=e,w=b(e,Fn),{theme:v,themeName:y}=Ze(pt),x=E=>{const k=Hn(n,c,f,u,v,y),I=[Wn.shared,k.default,r&&k.disabled],B=i.createElement(Ln,{size:u,icon:s}),g=l({"data-testid":h,style:[I,p]},w);return a&&!r?E&&!m&&Pe(a)?i.createElement(zn,l({},g,{to:a,ref:t}),B):i.createElement(Bn,l({},g,{href:a,ref:t}),B):i.createElement(Pn,l({type:"button"},g,{onClick:r?void 0:w.onClick,"aria-disabled":r,ref:t}),B)};return i.createElement(Z.Consumer,null,E=>x(E))}),Wn=S.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),le={};function Tn(o,e,t,n,r){switch(o){case"primary":const a=r==="destructive"?e.color.stroke.primary.critical.hovered:e.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:e.color.bg.hovered,color:n?e.color.stroke.primary.inverse.hovered:a,outlineColor:n?e.color.stroke.inverse:t,outlineOffset:1,outlineStyle:"solid",outlineWidth:n?e.border.width.hoveredInverse:e.border.width.hovered},":active":{backgroundColor:e.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:r==="destructive"?e.color.bg.filled.critical.hovered:e.color.bg.filled.action.hovered,color:r==="destructive"?e.color.stroke.filled.critical.hovered:e.color.stroke.filled.action.hovered,outlineWidth:e.border.width.active},":active":{backgroundColor:r==="destructive"?e.color.bg.filled.critical.active:e.color.bg.filled.action.active,color:r==="destructive"?e.color.stroke.filled.critical.active:e.color.stroke.filled.action.active,outlineWidth:e.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Hn=(o="default",e,t,n,r,a)=>{const s=o==="destructive"?r.color.stroke.critical.default:r.color.stroke.action.default,c=`${s}-${e}-${t}-${n}-${a}`;if(le[c])return le[c];if(t&&e!=="primary")throw new Error("Light is only supported for primary IconButtons");const f=(()=>{switch(e){case"primary":return t?r.color.stroke.primary.inverse.default:s;case"secondary":return r.color.stroke.secondary.default;case"tertiary":return r.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),u=En(n),m=Tn(e,r,s,t,o),p=o==="destructive"?r.color.stroke.critical.inverse:r.color.stroke.action.inverse,h=o==="destructive"?r.color.stroke.critical.active:r.color.stroke.action.active,w=t?r.color.stroke.inverse:s,v=t?r.color.stroke.disabled.inverse:r.color.stroke.disabled.default,y={backgroundColor:r.color.bg.disabled,color:v,outlineColor:v},x={default:{height:u,width:u,color:f,borderRadius:r.border.radius.default,":hover":l({boxShadow:"none",color:w,borderRadius:r.border.radius.default,outlineWidth:r.border.width.default},m[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:f,borderRadius:r.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${w}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":l({boxShadow:"none",outlineWidth:r.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},m[":focus-visible"]),":active":l({color:t?p:h,outlineWidth:r.border.width.default,outlineColor:t?p:h,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},m[":active"])},disabled:{color:v,cursor:"not-allowed",":hover":l({},y,{outline:"none"}),":active":l({},y,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${v}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":y}};return le[c]=S.StyleSheet.create(x),le[c]},Un=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],On=i.forwardRef(function(e,t){const{color:n="default",disabled:r=!1,href:a,kind:s="primary",light:c=!1,size:f="medium",skipClientNav:u,tabIndex:m,target:p}=e,h=b(e,Un);function w(y){const x=y.key;!a&&(x==="Enter"||x==="Space")&&y.preventDefault()}function v(y){const x=y.key;!a&&(x==="Enter"||x==="Space")&&h.onClick&&h.onClick(y)}return i.createElement(Nn,null,i.createElement(Dn,l({},h,{color:n,disabled:r,href:a,kind:s,light:c,ref:t,skipClientNav:u,size:f,target:p,tabIndex:m,onKeyDown:w,onKeyUp:v})))}),An=""+new URL("corners-out-ZcPb1LY6.svg",import.meta.url).href,ze=class ze extends i.Component{constructor(e){super(e),this.iframeRef=i.createRef(),this.isWidget=!0,this.state={url:null,banner:null},this.getPhetCompatibleLocale=t=>{switch(t){case"pt-pt":return"pt";case"zh-hans":return"zh_CN";case"zh-hant":return"zh_TW";case"fa-af":return"fa_DA";default:return t}},this.displayLoadFailure=()=>{this.setState({url:null,banner:{message:this.context.strings.simulationLoadFail,kind:"critical"}})},this.locale=this.getPhetCompatibleLocale(_t().kaLocale)}async componentDidMount(){await this.updateSimState(this.props.url)}async componentDidUpdate(e){e.url!==this.props.url&&await this.updateSimState(this.props.url)}async updateSimState(e){const t=Mn(e,this.locale);if(t===null){this.displayLoadFailure();return}if(!(await fetch(t)).ok){this.displayLoadFailure();return}const r=await this.showLocaleWarning(t);this.setState({url:t,banner:r?{message:this.context.strings.simulationLocaleWarning,kind:"warning"}:null})}async showLocaleWarning(e){if(!e)return!1;const n=/https:\/\/phet\.colorado\.edu\/sims\/html\/([a-zA-Z0-9-]+)\/.*/g.exec(e.toString());if(n===null)return!1;const r=n[1],a=await fetch(`https://phet.colorado.edu/sims/html/${r}/latest/string-map.json`);if(!a.ok)return!1;let s;try{s=await a.json()}catch{return!1}const c=Object.keys(s),f=this.locale.split("_")[0];for(const u of c)if(f===u.split("_")[0])return!1;return!0}render(){var t;return St(W,{style:xe.widgetContainer,children:[this.state.banner!==null&&Q(W,{style:{marginBottom:Nt},children:Q(nn,{layout:"floating",kind:this.state.banner.kind,text:this.state.banner.message})}),Q(W,{style:xe.iframeContainer,children:Q("iframe",{ref:this.iframeRef,title:this.props.description,sandbox:"allow-same-origin allow-scripts",className:S.css(xe.iframeResponsive),src:(t=this.state.url)==null?void 0:t.toString(),allow:"fullscreen"})}),this.state.url!==null&&Q(On,{icon:An,onClick:()=>{var n;(n=this.iframeRef.current)==null||n.requestFullscreen()},kind:"secondary","aria-label":"Fullscreen",style:{marginTop:5,marginBottom:5,alignSelf:"flex-end"}})]})}};ze.contextType=Rt;let fe=ze;const Mn=(o,e)=>{if(!URL.canParse(o))return null;const t=new URL(o);return t.origin!=="https://phet.colorado.edu"?null:(t.searchParams.set("locale",e),t)},xe=S.StyleSheet.create({widgetContainer:{borderRadius:6,borderWidth:1,borderColor:"#CCC",padding:C.medium_16,paddingBottom:0},iframeContainer:{position:"relative",overflow:"hidden",width:"100%",paddingTop:"56.25%"},iframeResponsive:{borderWidth:0,position:"absolute",top:0,left:0,bottom:0,right:0,width:"100%",height:"100%"}}),fo={name:"phet-simulation",displayName:"PhET Simulation",widget:fe,isLintable:!0};fe.__docgenInfo={description:"",methods:[{name:"getPhetCompatibleLocale",docblock:null,modifiers:[],params:[{name:"kaLocale",optional:!1,type:null}],returns:null},{name:"displayLoadFailure",docblock:null,modifiers:[],params:[],returns:null},{name:"updateSimState",docblock:null,modifiers:["async"],params:[{name:"urlString",optional:!1,type:{name:"string"}}],returns:null},{name:"showLocaleWarning",docblock:null,modifiers:["async"],params:[{name:"url",optional:!1,type:{name:"URL",alias:"URL"}}],returns:{type:{name:"Promise",elements:[{name:"boolean"}],raw:"Promise"}}}],displayName:"PhetSimulation"};export{nn as B,fe as P,fo as a,Mn as m}; diff --git a/assets/phet-simulation-editor-KZoPAnLO.js b/assets/phet-simulation-editor-1KD7oC0a.js similarity index 82% rename from assets/phet-simulation-editor-KZoPAnLO.js rename to assets/phet-simulation-editor-1KD7oC0a.js index f3b04c5dd7..42c220078f 100644 --- a/assets/phet-simulation-editor-KZoPAnLO.js +++ b/assets/phet-simulation-editor-1KD7oC0a.js @@ -1,4 +1,4 @@ -import{a as o,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import{m as p}from"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{l as s}from"./index-QCAhLhLD.js";import{s as n}from"./index-deFLJwr4.js";import{r as a}from"./index-TT1qJ6UJ.js";const r=class r extends a.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>p(this.props.url,"en")===null?["Please enter a URL from the PhET domain."]:[]}serialize(){return{url:this.props.url,description:this.props.description}}render(){return o("div",{children:[t(s,{label:"URL",value:this.props.url,onChange:e=>this.props.onChange({url:e}),style:{marginBottom:n.large_24}}),t(s,{label:"Description",value:this.props.description,onChange:e=>this.props.onChange({description:e})})]})}};r.defaultProps={url:"",description:""},r.widgetName="phet-simulation";let i=r;i.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"PerseusPhetSimulationWidgetOptions"}}},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PhetSimulationEditor",props:{url:{required:!1,tsType:{name:'PerseusPhetSimulationWidgetOptions["url"]',raw:'PerseusPhetSimulationWidgetOptions["url"]'},description:"",defaultValue:{value:'""',computed:!1}},description:{required:!1,tsType:{name:'PerseusPhetSimulationWidgetOptions["description"]',raw:'PerseusPhetSimulationWidgetOptions["description"]'},description:"",defaultValue:{value:'""',computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { +import{a as o,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import{m as p}from"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{l as s}from"./index-QCAhLhLD.js";import{s as n}from"./index-deFLJwr4.js";import{r as a}from"./index-TT1qJ6UJ.js";const r=class r extends a.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>p(this.props.url,"en")===null?["Please enter a URL from the PhET domain."]:[]}serialize(){return{url:this.props.url,description:this.props.description}}render(){return o("div",{children:[t(s,{label:"URL",value:this.props.url,onChange:e=>this.props.onChange({url:e}),style:{marginBottom:n.large_24}}),t(s,{label:"Description",value:this.props.description,onChange:e=>this.props.onChange({description:e})})]})}};r.defaultProps={url:"",description:""},r.widgetName="phet-simulation";let i=r;i.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"PerseusPhetSimulationWidgetOptions"}}},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PhetSimulationEditor",props:{url:{required:!1,tsType:{name:'PerseusPhetSimulationWidgetOptions["url"]',raw:'PerseusPhetSimulationWidgetOptions["url"]'},description:"",defaultValue:{value:'""',computed:!1}},description:{required:!1,tsType:{name:'PerseusPhetSimulationWidgetOptions["description"]',raw:'PerseusPhetSimulationWidgetOptions["description"]'},description:"",defaultValue:{value:'""',computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { url?: Props["url"]; description?: Props["description"]; }) => void`,signature:{arguments:[{type:{name:"signature",type:"object",raw:`{ diff --git a/assets/phet-simulation-editor.stories-RdXy1Uhn.js b/assets/phet-simulation-editor.stories-0wEFNeL4.js similarity index 66% rename from assets/phet-simulation-editor.stories-RdXy1Uhn.js rename to assets/phet-simulation-editor.stories-0wEFNeL4.js index 37d742514b..21e92c6e6b 100644 --- a/assets/phet-simulation-editor.stories-RdXy1Uhn.js +++ b/assets/phet-simulation-editor.stories-0wEFNeL4.js @@ -1,4 +1,4 @@ -import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{P as p}from"./phet-simulation-editor-KZoPAnLO.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";const Vr={component:p,title:"PerseusEditor/Widgets/PhET Simulation Editor"},r={args:{onChange:m("onChange")}};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`{ +import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{P as p}from"./phet-simulation-editor-1KD7oC0a.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";const Vr={component:p,title:"PerseusEditor/Widgets/PhET Simulation Editor"},r={args:{onChange:m("onChange")}};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`{ args: { onChange: action("onChange") } diff --git a/assets/phet-simulation.stories-9vK1JFaQ.js b/assets/phet-simulation.stories-xIiQrJ_8.js similarity index 89% rename from assets/phet-simulation.stories-9vK1JFaQ.js rename to assets/phet-simulation.stories-xIiQrJ_8.js index fb47af088a..2b461d6cbc 100644 --- a/assets/phet-simulation.stories-9vK1JFaQ.js +++ b/assets/phet-simulation.stories-xIiQrJ_8.js @@ -1,4 +1,4 @@ -import{P as e}from"./phet-simulation-wNzquKfW.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-rfN0X25E.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-ngddCaVG.js";import"./index-xuPsLuPk.js";import"./arrow-square-out-bold-090vdhrx.js";import"./index-h_CiYGGb.js";import"./i18n-context-P5sgPFep.js";import"./dependencies-8XILypbq.js";import"./constants-iPV6vHZm.js";const y={component:e,title:"Perseus/Widgets/PhET Simulation"},t={args:{url:"https://phet.colorado.edu/sims/html/projectile-data-lab/latest/projectile-data-lab_all.html",description:"Projectile Data Lab"}};var r,o,a;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`{ +import{P as e}from"./phet-simulation-9PbE2pxN.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-rfN0X25E.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-ngddCaVG.js";import"./index-xuPsLuPk.js";import"./arrow-square-out-bold-090vdhrx.js";import"./index-h_CiYGGb.js";import"./i18n-context-P5sgPFep.js";import"./dependencies-d8cZibFS.js";import"./constants-iPV6vHZm.js";const y={component:e,title:"Perseus/Widgets/PhET Simulation"},t={args:{url:"https://phet.colorado.edu/sims/html/projectile-data-lab/latest/projectile-data-lab_all.html",description:"Projectile Data Lab"}};var r,o,a;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`{ args: { url: "https://phet.colorado.edu/sims/html/projectile-data-lab/latest/projectile-data-lab_all.html", description: "Projectile Data Lab" diff --git a/assets/plotter.stories-fYcrr8c3.js b/assets/plotter.stories-ASK-5i0r.js similarity index 71% rename from assets/plotter.stories-fYcrr8c3.js rename to assets/plotter.stories-ASK-5i0r.js index 08a761d433..73c4c317b2 100644 --- a/assets/plotter.stories-fYcrr8c3.js +++ b/assets/plotter.stories-ASK-5i0r.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{V as m}from"./index-6h5t6F0w.js";import{R as s}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const a={content:`The elementary school principal asked teachers to report the number of students absent in each grade during the past week. +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{V as m}from"./index-6h5t6F0w.js";import{R as s}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-I73s7vIV.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const a={content:`The elementary school principal asked teachers to report the number of students absent in each grade during the past week. **Create a bar graph to show how many students were absent in each grade.** diff --git a/assets/preview-F-0q-Qqi.js b/assets/preview-1S0PUX_6.js similarity index 68% rename from assets/preview-F-0q-Qqi.js rename to assets/preview-1S0PUX_6.js index 49d493cc4b..75222aceba 100644 --- a/assets/preview-F-0q-Qqi.js +++ b/assets/preview-1S0PUX_6.js @@ -1,7 +1,7 @@ -import{_ as t}from"./iframe-_HOM8AA9.js";import"../sb-preview/runtime.js";var _={docs:{renderer:async()=>{let{DocsRenderer:r}=await t(()=>import("./DocsRenderer-NNNQARDV-s8P9JC76.js").then(e=>e.D),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url);return new r}}};export{_ as parameters}; +import{_ as t}from"./iframe-7PiyMb9T.js";import"../sb-preview/runtime.js";var _={docs:{renderer:async()=>{let{DocsRenderer:r}=await t(()=>import("./DocsRenderer-NNNQARDV-jtC6Msq5.js").then(e=>e.D),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url);return new r}}};export{_ as parameters}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./DocsRenderer-NNNQARDV-s8P9JC76.js","./iframe-_HOM8AA9.js","./index-TT1qJ6UJ.js","./_commonjsHelpers-4gQjN7DL.js","./react-18-N0svEjlN.js","./client-rbWgHzHN.js","./index-7vsPyIck.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./bundle.esm-7jAAHVxW.js","./index-ogXoivrg.js","./_getPrototype-bjD8Yebc.js","./index-PPLHz8o0.js"] + __vite__mapDeps.viteFileDeps = ["./DocsRenderer-NNNQARDV-jtC6Msq5.js","./iframe-7PiyMb9T.js","./index-TT1qJ6UJ.js","./_commonjsHelpers-4gQjN7DL.js","./react-18-N0svEjlN.js","./client-rbWgHzHN.js","./index-7vsPyIck.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./bundle.esm-7jAAHVxW.js","./index-ogXoivrg.js","./_getPrototype-bjD8Yebc.js","./index-PPLHz8o0.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/preview-0kMR2tkV.js b/assets/preview-VNQ8rokx.js similarity index 60% rename from assets/preview-0kMR2tkV.js rename to assets/preview-VNQ8rokx.js index bc0a41da99..4588e74ef8 100644 --- a/assets/preview-0kMR2tkV.js +++ b/assets/preview-VNQ8rokx.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{c as i}from"./index-deFLJwr4.js";import{R as p}from"./index-6h5t6F0w.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import{D as m,s as e}from"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{s,a}from"./test-dependencies-zutb-QBJ.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-6SWUlni2.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-Ts3i1VPI.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-0_QL8uoF.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./register-all-widgets-for-testing-I8cwOiut.js";e(a);const Xo={decorators:[o=>r(p,{children:r(m.Provider,{value:s,children:r(o,{})})})],parameters:{options:{storySort:{order:["Perseus","PerseusEditor","Math-Input","*"],includeNames:!0}},actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},backgrounds:{values:Object.entries(i).map(([o,t])=>({name:o,value:t}))}}};export{Xo as default}; +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{c as i}from"./index-deFLJwr4.js";import{R as p}from"./index-6h5t6F0w.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import{D as m,s as e}from"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{s,a}from"./test-dependencies-fGmEXWK4.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-VNdK7gMK.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-MKIRfGVo.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-lqQAegUH.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./register-all-widgets-for-testing-xxgCysIB.js";e(a);const Xo={decorators:[o=>r(p,{children:r(m.Provider,{value:s,children:r(o,{})})})],parameters:{options:{storySort:{order:["Perseus","PerseusEditor","Math-Input","*"],includeNames:!0}},actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},backgrounds:{values:Object.entries(i).map(([o,t])=>({name:o,value:t}))}}};export{Xo as default}; diff --git a/assets/preview-7fQXWhX7.js b/assets/preview-olFnNaRi.js similarity index 94% rename from assets/preview-7fQXWhX7.js rename to assets/preview-olFnNaRi.js index 002241f033..c71f6e0c55 100644 --- a/assets/preview-7fQXWhX7.js +++ b/assets/preview-olFnNaRi.js @@ -1,4 +1,4 @@ -import{_ as N}from"./iframe-_HOM8AA9.js";import"../sb-preview/runtime.js";const{global:T}=__STORYBOOK_MODULE_GLOBAL__,{addons:y}=__STORYBOOK_MODULE_PREVIEW_API__;var n="storybook/a11y",U=`${n}/result`,f=`${n}/request`,g=`${n}/running`,p=`${n}/error`,w=`${n}/manual`,a={RESULT:U,REQUEST:f,RUNNING:g,ERROR:p,MANUAL:w},{document:L,window:d}=T,r=y.getChannel(),o=!1,_,A=async t=>{let{manual:e}=await s(t);e||await l(t)},l=async t=>{_=t;try{let e=await s(t);if(!o){o=!0,r.emit(a.RUNNING);let i=(await N(()=>import("./axe-5GIt4bd5.js").then(S=>S.a),__vite__mapDeps([0,1]),import.meta.url)).default,{element:u="#storybook-root",config:O,options:E={}}=e,R=L.querySelector(u);if(!R)return;i.reset(),O&&i.configure(O);let m=await i.run(R,E),c=JSON.parse(JSON.stringify(m));_===t?r.emit(a.RESULT,c):(o=!1,l(_))}}catch(e){r.emit(a.ERROR,e)}finally{o=!1}},s=async t=>{let{parameters:e}=await d.__STORYBOOK_STORY_STORE__.loadStory({storyId:t})||{};return e.a11y||{config:{},options:{}}};r.on(a.REQUEST,A);r.on(a.MANUAL,l); +import{_ as N}from"./iframe-7PiyMb9T.js";import"../sb-preview/runtime.js";const{global:T}=__STORYBOOK_MODULE_GLOBAL__,{addons:y}=__STORYBOOK_MODULE_PREVIEW_API__;var n="storybook/a11y",U=`${n}/result`,f=`${n}/request`,g=`${n}/running`,p=`${n}/error`,w=`${n}/manual`,a={RESULT:U,REQUEST:f,RUNNING:g,ERROR:p,MANUAL:w},{document:L,window:d}=T,r=y.getChannel(),o=!1,_,A=async t=>{let{manual:e}=await s(t);e||await l(t)},l=async t=>{_=t;try{let e=await s(t);if(!o){o=!0,r.emit(a.RUNNING);let i=(await N(()=>import("./axe-5GIt4bd5.js").then(S=>S.a),__vite__mapDeps([0,1]),import.meta.url)).default,{element:u="#storybook-root",config:O,options:E={}}=e,R=L.querySelector(u);if(!R)return;i.reset(),O&&i.configure(O);let m=await i.run(R,E),c=JSON.parse(JSON.stringify(m));_===t?r.emit(a.RESULT,c):(o=!1,l(_))}}catch(e){r.emit(a.ERROR,e)}finally{o=!1}},s=async t=>{let{parameters:e}=await d.__STORYBOOK_STORY_STORE__.loadStory({storyId:t})||{};return e.a11y||{config:{},options:{}}};r.on(a.REQUEST,A);r.on(a.MANUAL,l); function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = ["./axe-5GIt4bd5.js","./_commonjsHelpers-4gQjN7DL.js"] diff --git a/assets/python-program-editor-ReCi12oY.js b/assets/python-program-editor-kfW7ZX3D.js similarity index 75% rename from assets/python-program-editor-ReCi12oY.js rename to assets/python-program-editor-kfW7ZX3D.js index 1b49aba094..3047ecf037 100644 --- a/assets/python-program-editor-ReCi12oY.js +++ b/assets/python-program-editor-kfW7ZX3D.js @@ -1 +1 @@ -import{a as i,j as s}from"./jsx-runtime-FVsy8kgq.js";import{c as p}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as n}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{r as m}from"./index-TT1qJ6UJ.js";const{NumberInput:h,TextInput:l}=n;function u(a,r){const t=[];return r===""&&t.push("The program ID is required."),(!Number.isInteger(a)||a<1)&&t.push("The height must be a positive integer."),t}const e=class e extends m.Component{constructor(){super(...arguments),this.change=(...r)=>p.apply(this,r),this.getSaveWarnings=()=>u(this.props.height,this.props.programID)}serialize(){return{programID:this.props.programID,height:this.props.height}}render(){return i("div",{children:[i("label",{children:["User Program ID:"," ",s(l,{value:this.props.programID,onChange:this.change("programID"),placeholder:"123"})]}),s("br",{}),i("label",{children:["Height:"," ",s(h,{value:this.props.height,onChange:this.change("height"),placeholder:"400"})]})]})}};e.widgetName="python-program",e.defaultProps={programID:"",height:400};let o=e;o.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"PerseusPythonProgramWidgetOptions"}}},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PythonProgramEditor",props:{programID:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}}}};export{o as P}; +import{a as i,j as s}from"./jsx-runtime-FVsy8kgq.js";import{c as p}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as n}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{r as m}from"./index-TT1qJ6UJ.js";const{NumberInput:h,TextInput:l}=n;function u(a,r){const t=[];return r===""&&t.push("The program ID is required."),(!Number.isInteger(a)||a<1)&&t.push("The height must be a positive integer."),t}const e=class e extends m.Component{constructor(){super(...arguments),this.change=(...r)=>p.apply(this,r),this.getSaveWarnings=()=>u(this.props.height,this.props.programID)}serialize(){return{programID:this.props.programID,height:this.props.height}}render(){return i("div",{children:[i("label",{children:["User Program ID:"," ",s(l,{value:this.props.programID,onChange:this.change("programID"),placeholder:"123"})]}),s("br",{}),i("label",{children:["Height:"," ",s(h,{value:this.props.height,onChange:this.change("height"),placeholder:"400"})]})]})}};e.widgetName="python-program",e.defaultProps={programID:"",height:400};let o=e;o.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"PerseusPythonProgramWidgetOptions"}}},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PythonProgramEditor",props:{programID:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}}}};export{o as P}; diff --git a/assets/python-program-editor.stories-v1Wk4qek.js b/assets/python-program-editor.stories-K-870imI.js similarity index 69% rename from assets/python-program-editor.stories-v1Wk4qek.js rename to assets/python-program-editor.stories-K-870imI.js index 909f14953e..8155444c98 100644 --- a/assets/python-program-editor.stories-v1Wk4qek.js +++ b/assets/python-program-editor.stories-K-870imI.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{P as e}from"./python-program-editor-ReCi12oY.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";const Zr={title:"PerseusEditor/Widgets/Python Program Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{P as e}from"./python-program-editor-kfW7ZX3D.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";const Zr={title:"PerseusEditor/Widgets/Python Program Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const $r=["Default"];export{r as Default,$r as __namedExportsOrder,Zr as default}; diff --git a/assets/python-program.stories-8rRWUnB7.js b/assets/python-program.stories-1HkGLyek.js similarity index 64% rename from assets/python-program.stories-8rRWUnB7.js rename to assets/python-program.stories-1HkGLyek.js index d9ce15ef22..ebc1726fc9 100644 --- a/assets/python-program.stories-8rRWUnB7.js +++ b/assets/python-program.stories-1HkGLyek.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const e={content:`[[☃ python-program 1]] +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const e={content:`[[☃ python-program 1]] `,images:{},widgets:{"python-program 1":{version:{major:0,minor:0},static:!1,type:"python-program",options:{height:400,programID:"5207287069147136"},alignment:"block"}}},Xr={title:"Perseus/Widgets/Python Program"},r=s=>m(p,{question:e});r.__docgenInfo={description:"",methods:[],displayName:"Question1"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/question-markers-rbcwtTwt.js b/assets/question-markers-0U-M3sRj.js similarity index 85% rename from assets/question-markers-rbcwtTwt.js rename to assets/question-markers-0U-M3sRj.js index 2c6095bf58..7df389a622 100644 --- a/assets/question-markers-rbcwtTwt.js +++ b/assets/question-markers-0U-M3sRj.js @@ -1 +1 @@ -import{a as d,j as i}from"./jsx-runtime-FVsy8kgq.js";import{r as u}from"./index-TT1qJ6UJ.js";import{b as g}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import{U as h}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import{g as k}from"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{l as s}from"./index-awljIyHI.js";import{a as b,b as f}from"./global-colors-VIVU4Od4.js";import{M}from"./marker-4IxQ8C94.js";class R extends u.Component{constructor(){super(...arguments),this._markers=[],this.handleImageDoubleClick=r=>{r.preventDefault();const e=r.currentTarget.getBoundingClientRect(),t=Math.round((r.clientX-e.left)/e.width*1e3)/10,l=Math.round((r.clientY-e.top)/e.height*1e3)/10,{markers:a,onChange:n}=this.props;n([...a,{answers:[],label:"",x:t,y:l}])}}openDropdownForMarkerIndices(r){r.forEach(e=>{var t;this._markers[e]&&((t=this._markers[e])==null||t.openDropdown())})}render(){const{choices:r,imageUrl:e,imageWidth:t,imageHeight:l,markers:a,onChange:n}=this.props,y=k().staticUrl;return d("div",{children:[i("div",{className:s.css(m.title),children:"Markers"}),i("div",{className:s.css(m.subtitle),children:e?d("span",{children:["Double-click on the image to add a marker.",i("br",{}),i("br",{}),"Markers are read by screen readers in the order that you add them here, so add in a logical order for the learner (e.g. sequentially, clockwise). You can test order by using keyboard tabbing."]}):"Upload an image to place markers."}),e&&d("div",{className:s.css(m.markersCanvas),style:{maxWidth:t,maxHeight:l},children:[i("img",{alt:"",className:s.css(m.image),src:y(h.getRealImageUrl(e)),onDoubleClick:this.handleImageDoubleClick}),a.map((p,o)=>u.createElement(M,{...p,choices:r,key:`${p.x}.${p.y}`,onChange:c=>n([...a.slice(0,o),c,...a.slice(o+1)]),onRemove:()=>n([...a.slice(0,o),...a.slice(o+1)]),ref:c=>this._markers[o]=c}))]})]})}}const m=s.StyleSheet.create({title:{...g,marginBottom:6,color:b},subtitle:{fontFamily:"inherit",fontSize:12,lineHeight:"14px",marginBottom:12,color:f},markersCanvas:{position:"relative",border:"solid 1px rgba(33, 36, 44, 0.16)"},image:{display:"block",maxWidth:"100%"}});R.__docgenInfo={description:"",methods:[{name:"openDropdownForMarkerIndices",docblock:null,modifiers:[],params:[{name:"indices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleImageDoubleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null}],displayName:"QuestionMarkers",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},imageUrl:{required:!0,tsType:{name:"string"},description:""},imageWidth:{required:!0,tsType:{name:"number"},description:""},imageHeight:{required:!0,tsType:{name:"number"},description:""},markers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(markers: ReadonlyArray) => void",signature:{arguments:[{type:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},name:"markers"}],return:{name:"void"}}},description:""}}};export{R as Q}; +import{a as d,j as i}from"./jsx-runtime-FVsy8kgq.js";import{r as u}from"./index-TT1qJ6UJ.js";import{b as g}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import{U as h}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import{g as k}from"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{l as s}from"./index-awljIyHI.js";import{a as b,b as f}from"./global-colors-VIVU4Od4.js";import{M}from"./marker-de7YvUxA.js";class R extends u.Component{constructor(){super(...arguments),this._markers=[],this.handleImageDoubleClick=r=>{r.preventDefault();const e=r.currentTarget.getBoundingClientRect(),t=Math.round((r.clientX-e.left)/e.width*1e3)/10,l=Math.round((r.clientY-e.top)/e.height*1e3)/10,{markers:a,onChange:n}=this.props;n([...a,{answers:[],label:"",x:t,y:l}])}}openDropdownForMarkerIndices(r){r.forEach(e=>{var t;this._markers[e]&&((t=this._markers[e])==null||t.openDropdown())})}render(){const{choices:r,imageUrl:e,imageWidth:t,imageHeight:l,markers:a,onChange:n}=this.props,y=k().staticUrl;return d("div",{children:[i("div",{className:s.css(m.title),children:"Markers"}),i("div",{className:s.css(m.subtitle),children:e?d("span",{children:["Double-click on the image to add a marker.",i("br",{}),i("br",{}),"Markers are read by screen readers in the order that you add them here, so add in a logical order for the learner (e.g. sequentially, clockwise). You can test order by using keyboard tabbing."]}):"Upload an image to place markers."}),e&&d("div",{className:s.css(m.markersCanvas),style:{maxWidth:t,maxHeight:l},children:[i("img",{alt:"",className:s.css(m.image),src:y(h.getRealImageUrl(e)),onDoubleClick:this.handleImageDoubleClick}),a.map((p,o)=>u.createElement(M,{...p,choices:r,key:`${p.x}.${p.y}`,onChange:c=>n([...a.slice(0,o),c,...a.slice(o+1)]),onRemove:()=>n([...a.slice(0,o),...a.slice(o+1)]),ref:c=>this._markers[o]=c}))]})]})}}const m=s.StyleSheet.create({title:{...g,marginBottom:6,color:b},subtitle:{fontFamily:"inherit",fontSize:12,lineHeight:"14px",marginBottom:12,color:f},markersCanvas:{position:"relative",border:"solid 1px rgba(33, 36, 44, 0.16)"},image:{display:"block",maxWidth:"100%"}});R.__docgenInfo={description:"",methods:[{name:"openDropdownForMarkerIndices",docblock:null,modifiers:[],params:[{name:"indices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleImageDoubleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null}],displayName:"QuestionMarkers",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},imageUrl:{required:!0,tsType:{name:"string"},description:""},imageWidth:{required:!0,tsType:{name:"number"},description:""},imageHeight:{required:!0,tsType:{name:"number"},description:""},markers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(markers: ReadonlyArray) => void",signature:{arguments:[{type:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},name:"markers"}],return:{name:"void"}}},description:""}}};export{R as Q}; diff --git a/assets/question-markers.stories-cWNva5ig.js b/assets/question-markers.stories-YQ_DrHIl.js similarity index 75% rename from assets/question-markers.stories-cWNva5ig.js rename to assets/question-markers.stories-YQ_DrHIl.js index 6900992718..53b3220c91 100644 --- a/assets/question-markers.stories-cWNva5ig.js +++ b/assets/question-markers.stories-YQ_DrHIl.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as p}from"./index-awljIyHI.js";import{r as W}from"./index-TT1qJ6UJ.js";import{Q as b}from"./question-markers-rbcwtTwt.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./global-colors-VIVU4Od4.js";import"./marker-4IxQ8C94.js";import"./components-V6aclUoQ.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-A2kf-LD-.js";const lt={title:"PerseusEditor/Widgets/Label Image/Question Markers"},f=p.StyleSheet.create({wrapper:{width:338}}),k=t=>r("div",{className:p.css(f.wrapper),children:r(b,{...t})});class w extends W.Component{constructor(){super(...arguments),this.state={markers:[{answers:[],label:"",x:50,y:50}]}}render(){const{markers:m}=this.state;return r("div",{className:p.css(f.wrapper),children:r(b,{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:m,onChange:y=>this.setState({markers:y})})})}}const o=t=>r(k,{...{choices:[],imageUrl:"",imageWidth:0,imageHeight:0,markers:[],onChange:()=>{}}}),e=t=>r(k,{...{choices:[],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:[],label:"",x:50,y:50}],onChange:()=>{}}}),i=t=>r(w,{});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};e.__docgenInfo={description:"",methods:[],displayName:"Filled"};i.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as p}from"./index-awljIyHI.js";import{r as W}from"./index-TT1qJ6UJ.js";import{Q as b}from"./question-markers-0U-M3sRj.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./global-colors-VIVU4Od4.js";import"./marker-de7YvUxA.js";import"./components-yT7oveOH.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-A2kf-LD-.js";const lt={title:"PerseusEditor/Widgets/Label Image/Question Markers"},f=p.StyleSheet.create({wrapper:{width:338}}),k=t=>r("div",{className:p.css(f.wrapper),children:r(b,{...t})});class w extends W.Component{constructor(){super(...arguments),this.state={markers:[{answers:[],label:"",x:50,y:50}]}}render(){const{markers:m}=this.state;return r("div",{className:p.css(f.wrapper),children:r(b,{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:m,onChange:y=>this.setState({markers:y})})})}}const o=t=>r(k,{...{choices:[],imageUrl:"",imageWidth:0,imageHeight:0,markers:[],onChange:()=>{}}}),e=t=>r(k,{...{choices:[],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:[],label:"",x:50,y:50}],onChange:()=>{}}}),i=t=>r(w,{});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};e.__docgenInfo={description:"",methods:[],displayName:"Filled"};i.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ choices: [], imageUrl: "", diff --git a/assets/radio-editor.stories-6Hjdjqzp.js b/assets/radio-editor.stories-Bvf3EGgu.js similarity index 73% rename from assets/radio-editor.stories-6Hjdjqzp.js rename to assets/radio-editor.stories-Bvf3EGgu.js index 77d6d9e3b9..327270031c 100644 --- a/assets/radio-editor.stories-6Hjdjqzp.js +++ b/assets/radio-editor.stories-Bvf3EGgu.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";import{R as n}from"./editor-DsbDBOGq.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./index-0C4KXdeC.js";import"./editor-Y01VX-A3.js";import"./index-fuycm_QE.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-GM2LQRww.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const no={title:"PerseusEditor/Widgets/Radio Editor"},l=m.StyleSheet.create({wrapper:{width:338}}),c={content:`Which of the following values of $x$ satisfies the equation $\\sqrt{64}=x$ ? +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";import{R as n}from"./editor-EbDgkB5I.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./index-0C4KXdeC.js";import"./editor-1XE8pcNh.js";import"./index-fuycm_QE.js";import"./index-SM3muJE2.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-SLh88dRF.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const no={title:"PerseusEditor/Widgets/Radio Editor"},l=m.StyleSheet.create({wrapper:{width:338}}),c={content:`Which of the following values of $x$ satisfies the equation $\\sqrt{64}=x$ ? [[☃ radio 1]] diff --git a/assets/radio.stories-jqNZY-r4.js b/assets/radio.stories-jBzvFa5_.js similarity index 73% rename from assets/radio.stories-jqNZY-r4.js rename to assets/radio.stories-jBzvFa5_.js index 3ca14f3e09..0b1e7a0f6a 100644 --- a/assets/radio.stories-jqNZY-r4.js +++ b/assets/radio.stories-jBzvFa5_.js @@ -1,4 +1,4 @@ -import{j as M}from"./jsx-runtime-FVsy8kgq.js";import{R as O}from"./renderer-with-debug-ui-Ty_P7koE.js";import{q as w,c as b,m as I,a as y}from"./radio.testdata-sITJ8lxE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const wo={title:"Perseus/Widgets/Radio",args:{static:!1,crossOutEnabled:!1,reviewMode:!1,showSolutions:"none",question:w},argTypes:{showSolutions:{options:["none","all","selected"],control:{type:"select"}}},render:t=>M(O,{question:C(t),apiOptions:E(t),reviewMode:t.reviewMode,showSolutions:t.showSolutions})},C=t=>{const m={...t.question,widgets:{}};for(const[f,W]of Object.entries(t.question.widgets))m.widgets[f]={...W,static:t.static};return m},E=t=>({crossOutEnabled:t.crossOutEnabled}),o={args:{question:w}},i={args:{question:b}},r={args:{question:I}},e={args:{question:y}};var p,s,a;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{j as M}from"./jsx-runtime-FVsy8kgq.js";import{R as O}from"./renderer-with-debug-ui-DcZbZSiB.js";import{q as w,c as b,m as I,a as y}from"./radio.testdata-sITJ8lxE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const wo={title:"Perseus/Widgets/Radio",args:{static:!1,crossOutEnabled:!1,reviewMode:!1,showSolutions:"none",question:w},argTypes:{showSolutions:{options:["none","all","selected"],control:{type:"select"}}},render:t=>M(O,{question:C(t),apiOptions:E(t),reviewMode:t.reviewMode,showSolutions:t.showSolutions})},C=t=>{const m={...t.question,widgets:{}};for(const[f,W]of Object.entries(t.question.widgets))m.widgets[f]={...W,static:t.static};return m},E=t=>({crossOutEnabled:t.crossOutEnabled}),o={args:{question:w}},i={args:{question:b}},r={args:{question:I}},e={args:{question:y}};var p,s,a;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ args: { question: questionWithPassage } diff --git a/assets/register-all-widgets-and-editors-for-testing-2mH-ZU77.js b/assets/register-all-widgets-and-editors-for-testing-Tl0n0XMq.js similarity index 96% rename from assets/register-all-widgets-and-editors-for-testing-2mH-ZU77.js rename to assets/register-all-widgets-and-editors-for-testing-Tl0n0XMq.js index 541873a85e..673e5d961f 100644 --- a/assets/register-all-widgets-and-editors-for-testing-2mH-ZU77.js +++ b/assets/register-all-widgets-and-editors-for-testing-Tl0n0XMq.js @@ -1 +1 @@ -import{j as t,a}from"./jsx-runtime-FVsy8kgq.js";import{c as We}from"./index-fuycm_QE.js";import{_ as l,$ as Fe}from"./jquery-yG1GhClm.js";import{s as Be,D as He,t as je,u as Ge,v as Ke,x as Ye,c as h,p as c,G as Je,M as Xe,y as Ze,z as Qe,T as et,w as tt}from"./article-renderer-GCz9idJ2.js";import{E as st,U as de,r as at}from"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import{L as Me}from"./svg-image-vbtSDKh6.js";import{A as we}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import{m as rt,n as nt,r as it,b as lt,a as ot,c as pt}from"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{g as $e}from"./dependencies-8XILypbq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{r as u}from"./index-TT1qJ6UJ.js";import{C as ut}from"./categorizer-editor-3QAla4Wt.js";import{c as f}from"./components-V6aclUoQ.js";import{E as g}from"./editor-jsonify-yjAz4UcO.js";import{C as w}from"./index-QCAhLhLD.js";import{P as n}from"./index-0C4KXdeC.js";import{B as y}from"./blur-input-hjJsfoK9.js";import{D as ht}from"./definition-editor-jFzP_8M9.js";import{D as ct}from"./dropdown-editor-8wTJqqrY.js";import{E as dt}from"./explanation-editor-_xuXa3EA.js";import{E as mt}from"./expression-editor-TOSGrK7r.js";import{i as gt}from"./icon-paths-5JCXzGsq.js";import{l as W}from"./index-awljIyHI.js";import{E as b}from"./editor-Y01VX-A3.js";import{i as ft}from"./icon-paths-EoBkHOLI.js";import{G as yt}from"./graph-settings-6z3yJikg.js";import{I as bt}from"./image-editor-oat1qOOh.js";import{I as vt}from"./input-number-editor-Bkjav5mB.js";import{I as wt}from"./index-6m5XMHRW.js";import{I as Ct}from"./interactive-graph-editor-sXGG56UO.js";import{L as Tt}from"./label-image-editor-AWRkHIaL.js";import{M as xt}from"./matcher-editor-w387bK5J.js";import{N as kt}from"./number-line-editor-g8WyXFkD.js";import{N as Nt}from"./numeric-input-editor-wcLIK9qM.js";import{P as St}from"./phet-simulation-editor-KZoPAnLO.js";import{R as oe}from"./index-7vsPyIck.js";import{P as It}from"./python-program-editor-ReCi12oY.js";import{R as Ot}from"./editor-DsbDBOGq.js";import{S as qt}from"./sorter-editor-RE_zqP0r.js";const Pt={allTypes:Be,DEFAULT_GRAPHER_PROPS:He,chooseType:je,defaultPlotProps:Ge,getEquationString:Ke,typeToButton:Ye},fa=We({displayName:"JsonEditor",getInitialState:function(){return{currentValue:JSON.stringify(this.props.value,null,4),valid:!0}},UNSAFE_componentWillReceiveProps:function(o){(!this.state.valid||!l.isEqual(o.value,JSON.parse(this.state.currentValue)))&&this.setState(this.getInitialState())},handleKeyDown:function(o){if(o.key==="Tab"){const e=o.target.selectionStart,s=o.target.value,r=s.substring(0,e),i=s.substring(e,s.length);o.target.value=r+" "+i,o.target.selectionStart=r.length+4,o.target.selectionEnd=r.length+4,o.preventDefault(),this.handleChange(o)}},handleChange:function(o){const e=o.target.value;try{let s=JSON.parse(e);l.isString(s)&&(s=JSON.parse(s)),this.setState({currentValue:e,valid:!0},function(){this.props.onChange(s)})}catch{this.setState({currentValue:e,valid:!1})}},handleBlur:function(o){const e=o.target.value;try{let s=JSON.parse(e);l.isString(s)&&(s=JSON.parse(s)),this.setState({currentValue:JSON.stringify(s,null,4),valid:!0},function(){this.props.onChange(s)})}catch{this.setState({currentValue:JSON.stringify(this.props.value,null,4),valid:!0})}},render:function(){const o="perseus-json-editor "+(this.state.valid?"valid":"invalid");return t("textarea",{className:o,value:this.state.currentValue,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur})}});let Ne=0;const me={},ge={};window.iframeDataStore={};window.addEventListener("message",o=>{if(typeof o.data=="string"){const e=me[o.data];e&&e()}else o.data.id&&(o.data.height!==void 0?ge[o.data.id](o.data.height):o.data.lintWarnings&&Me.log("LINTER REPORT",{lintWarnings:JSON.stringify(o.data.lintWarnings)}))});class Rt extends u.Component{constructor(){super(...arguments),this.container=u.createRef()}componentDidMount(){this._isMounted=!0,this.iframeID=Ne,Ne++,this._prepareFrame(),me[this.iframeID]=()=>{this.sendNewData(this._lastData)},ge[this.iframeID]=e=>{this._lastHeight=e,this._isMounted&&this.props.seamless&&this.container.current&&(this.container.current.style.height=e+"px")}}shouldComponentUpdate(e){return e.datasetValue!==this.props.datasetValue||e.seamless!==this.props.seamless}componentDidUpdate(e){this.container.current&&(this.props.seamless?this.container.current.style.height=this._lastHeight+"px":this.container.current.style.height="100%"),e.datasetValue!==this.props.datasetValue&&this._prepareFrame()}componentWillUnmount(){me[this.iframeID]=null,ge[this.iframeID]=null,this._isMounted=!1}_prepareFrame(){var s,r;this._frame&&((s=this.container.current)==null||s.removeChild(this._frame));const e=document.createElement("iframe");e.style.width="100%",e.style.height="100%",e.src=this.props.url,this.props.datasetKey&&(e.dataset[this.props.datasetKey]=this.props.datasetValue),e.dataset.id=String(this.iframeID),this.props.seamless&&(e.dataset.lintGutter="true"),(r=this.container.current)==null||r.appendChild(e),this._frame=e}sendNewData(e){const s=this._frame;this._isMounted&&e&&(s!=null&&s.contentWindow)&&(this._lastData=e,window.iframeDataStore[this.iframeID]=e,s.contentWindow.postMessage(this.iframeID,"*"))}render(){return t("div",{ref:this.container,style:{width:"100%",height:"100%"}})}}Rt.__docgenInfo={description:"",methods:[{name:"_prepareFrame",docblock:null,modifiers:[],params:[],returns:null},{name:"sendNewData",docblock:null,modifiers:[],params:[{name:"data",optional:!1,type:{name:"any"}}],returns:null}],displayName:"IframeContentRenderer",props:{url:{required:!0,tsType:{name:"string"},description:""},datasetKey:{required:!0,tsType:{name:"string"},description:""},datasetValue:{required:!0,tsType:{name:"any"},description:""},seamless:{required:!0,tsType:{name:"boolean"},description:""}}};const{InfoTip:Se}=f,Ie=400,Oe=400;var T;let zt=(T=class extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("fieldset",{className:"pair-editor",children:[a("label",{children:["Name:"," ",t(y,{value:this.props.name,onChange:this.change("name")})]}),a("label",{children:[" ","Value:"," ",t(y,{value:this.props.value,onChange:this.change("value")})]})]})}},T.propTypes={...c,name:n.string,value:n.string},T.defaultProps={name:"",value:""},T);var U;let At=(U=class extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handlePairChange=(e,s)=>{const r=this.props.pairs.slice();r[e]=s;const i=r[r.length-1];i.name&&i.value&&r.push({name:"",value:""}),this.change("pairs",r)},this.serialize=()=>g.serialize.call(this)}render(){const e=l.map(this.props.pairs,(s,r)=>t(zt,{name:s.name,value:s.value,onChange:this.handlePairChange.bind(this,r)},r));return t("div",{children:e})}},U.propTypes={...c,pairs:n.arrayOf(n.shape({name:n.string,value:n.string})).isRequired},U);const Vt=/khanacademy\.org\/computer-programming\/[^\/]+\/(\d+)/;function Lt(o){const e=Vt.exec(o);return e&&(o=e[1]),o}const k=class k extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this._handleSettingsChange=e=>{this.change({settings:e.pairs})},this._handleProgramIDChange=e=>{e=Lt(e);const{isDevServer:s,InitialRequestUrl:r}=$e(),p=`${s?r.origin:"https://www.khanacademy.org"}/api/internal/scratchpads/${e}`;Fe.getJSON(p).done(m=>{const d=m.userAuthoredContentType;this.change({width:m.width,height:m.height,programID:e,programType:d})}).fail((m,d,v)=>{Me.error("Error retrieving scratchpad info for program ID ",st.TransientService,{cause:v,loggedMetadata:{textStatus:d,programID:e}}),this.change({width:Ie,height:Oe,programID:e,programType:null})})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[a("label",{children:["Url or Program ID:"," ",t(y,{value:this.props.programID,onChange:this._handleProgramIDChange})]}),t("br",{}),t(w,{label:"Show Editor",checked:this.props.showEditor,onChange:e=>{this.props.onChange({showEditor:e})}}),t(Se,{children:'If you show the editor, you should use the "full-width" alignment to make room for the width of the editor.'}),t("br",{}),t(w,{label:"Show Buttons",checked:this.props.showButtons,onChange:e=>{this.props.onChange({showButtons:e})}}),t("br",{}),a("label",{children:["Settings:",t(At,{name:"settings",pairs:this.props.settings,onChange:this._handleSettingsChange}),a(Se,{children:["Settings that you add here are available to the program as an object returned by ",t("code",{children:"Program.settings()"})]})]})]})}};k.propTypes={...c},k.widgetName="cs-program",k.defaultProps={programID:"",programType:null,settings:[{name:"",value:""}],showEditor:!1,showButtons:!1,width:Ie,height:Oe};let F=k;F.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"_handleProgramIDChange",docblock:null,modifiers:[],params:[{name:"programID",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CSProgramEditor",props:{programID:{defaultValue:{value:'""',computed:!1},required:!1},programType:{defaultValue:{value:"null",computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},showEditor:{defaultValue:{value:"false",computed:!1},required:!1},showButtons:{defaultValue:{value:"false",computed:!1},required:!1},width:{defaultValue:{value:"400",computed:!1},required:!1},height:{defaultValue:{value:"400",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const Ce=class Ce extends u.Component{serialize(){return g.serialize.call(this)}render(){return a("div",{children:[t("p",{children:"This widget has been deprecated and removed"}),t("p",{children:"Learners will see a message and they will not be graded on this part. Please replace this widget with a supported one."})]})}};Ce.widgetName="deprecated-standin";let B=Ce;B.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}}],displayName:"DeprecatedStandinEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};const{InlineIcon:qe,TextInput:Dt}=f,N=class N extends u.Component{constructor(){super(...arguments),this.editor=u.createRef(),this.hintEditor=u.createRef(),this.change=(...e)=>h.apply(this,e),this.handleAddHint=()=>{const e={content:""};this.props.onChange({hint:e},()=>{var s;(s=this.hintEditor.current)==null||s.focus()})},this.handleRemoveHint=e=>{this.props.onChange({hint:null})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e,s;return{title:this.props.title,...(e=this.editor.current)==null?void 0:e.serialize(),hint:(s=this.hintEditor.current)==null?void 0:s.serialize()}}}render(){return a("div",{className:"perseus-group-editor",children:[t("div",{className:"perseus-widget-row",children:a("label",{className:W.css(pe.title),children:["Title:"," ",t(Dt,{value:this.props.title,className:W.css(pe.input),onChange:this.change("title")})]})}),t(b,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange,warnNoPrompt:!0,warnNoWidgets:!0}),!this.props.hint&&a("button",{type:"button",style:{marginTop:10},className:"add-hint simple-button orange",onClick:this.handleAddHint,children:[t(qe,{...ft})," Add a hint"]}),this.props.hint&&a("div",{className:"perseus-hint-editor",children:[t("div",{className:W.css(pe.hintsTitle),children:"Hint"}),t(b,{ref:this.hintEditor,content:this.props.hint?this.props.hint.content:"",widgets:this.props.hint?this.props.hint.widgets:{},apiOptions:this.props.apiOptions,images:this.props.hint&&this.props.hint.images,widgetEnabled:!0,immutableWidgets:!1,onChange:e=>{this.change("hint",Object.assign({},this.props.hint,e))}}),a("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.handleRemoveHint,children:[t(qe,{...gt})," Remove this hint"]})]})]})}};N.propTypes={...c,title:n.string,content:n.string,widgets:n.object,images:n.object,apiOptions:we.propTypes},N.widgetName="graded-group",N.defaultProps={title:"",content:"",widgets:{},images:{},hint:null};let C=N;const pe=W.StyleSheet.create({title:{fontSize:18,fontWeight:"bold"},input:{fontSize:18},hintsTitle:{marginTop:10,fontSize:"110%",fontWeight:"bold"}});C.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAddHint",docblock:null,modifiers:[],params:[],returns:null},{name:"handleRemoveHint",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupEditor",props:{title:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},hint:{defaultValue:{value:"null",computed:!1},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};const S=class S extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.getSaveWarnings=()=>[].concat(...this._editors.map(e=>e?e.getSaveWarnings():[])),this.serialize=()=>({gradedGroups:this.props.gradedGroups}),this.renderGroups=()=>this.props.gradedGroups?this.props.gradedGroups.map((e,s)=>t(C,{ref:r=>this._editors[s]=r,...e,apiOptions:this.props.apiOptions,widgetEnabled:!0,immutableWidgets:!1,onChange:r=>this.change("gradedGroups",_t(this.props.gradedGroups,s,{...this.props.gradedGroups[s],...r}))},s)):null,this.addGroup=()=>{const e=this.props.gradedGroups||[];this.change("gradedGroups",e.concat([C.defaultProps]))}}UNSAFE_componentWillMount(){this._editors=[]}render(){return a("div",{className:"perseus-group-editor",children:[this.renderGroups(),t("button",{onClick:this.addGroup,children:"Add group"})]})}};S.propTypes={...c,apiOptions:we.propTypes,gradedGroups:n.array,onChange:n.func.isRequired},S.widgetName="graded-group-set",S.defaultProps={gradedGroups:[]};let H=S;const _t=(o,e,s)=>[...o.slice(0,e),s,...o.slice(e+1)];H.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null},{name:"renderGroups",docblock:null,modifiers:[],params:[],returns:null},{name:"addGroup",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupSetEditor",props:{gradedGroups:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1},onChange:{description:"",type:{name:"func"},required:!0}},composes:["@khanacademy/perseus"]};const{InfoTip:Ut,MultiButtonGroup:Et}=f,Mt=Je.widget,{DEFAULT_GRAPHER_PROPS:ue,allTypes:$t,chooseType:Wt,defaultPlotProps:Ft,getEquationString:Bt,typeToButton:Ht}=Pt,I=class I extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleAvailableTypesChange=e=>{let s=this.props.correct;if(!l.contains(e,this.props.correct.type)){const r=this.props.graph,i=Wt(e);s=Ft(i,r)}this.props.onChange({availableTypes:e,correct:s})},this.serialize=()=>l.chain(this.props).pick("correct","availableTypes").extend({graph:l.omit(this.props.graph,"box")}).value()}render(){const e=nt.SMALL;let s,r;if(this.props.graph.valid===!0){const i={graph:this.props.graph,plot:this.props.correct,availableTypes:this.props.availableTypes,onChange:(p,m)=>{var v;let d=this.props.correct;d.type===((v=p.plot)==null?void 0:v.type)?d=l.extend({},d,p.plot):d=p.plot,this.props.onChange({correct:d},m)},trackInteraction:function(){}};r=t(Mt,{...i,apiOptions:this.props.apiOptions,containerSizeClass:e}),s=Bt(i)}else r=t("div",{className:"perseus-error",children:this.props.graph.valid});return a("div",{children:[a("div",{children:["Correct answer"," ",t(Ut,{children:t("p",{children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."})})," ",": ",s]}),t(yt,{editableSettings:["graph","snap","image"],box:rt(e),range:this.props.graph.range,labels:this.props.graph.labels,step:this.props.graph.step,gridStep:this.props.graph.gridStep,snapStep:this.props.graph.snapStep,valid:this.props.graph.valid,backgroundImage:this.props.graph.backgroundImage,markings:this.props.graph.markings,rulerLabel:this.props.graph.rulerLabel,rulerTicks:this.props.graph.rulerTicks,showTooltips:this.props.graph.showTooltips,onChange:this.change("graph")}),a("div",{className:"perseus-widget-row",children:[t("label",{children:"Available functions: "}),t(Et,{allowEmpty:!1,values:this.props.availableTypes,buttons:l.map($t,Ht),onChange:this.handleAvailableTypesChange})]}),r]})}};I.propTypes={...c},I.widgetName="grapher",I.defaultProps={correct:ue.plot,graph:ue.graph,availableTypes:ue.availableTypes};let j=I;j.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAvailableTypesChange",docblock:null,modifiers:[],params:[{name:"newAvailableTypes",optional:!1,type:{name:"Array",elements:[{name:"any"}],raw:"Array",alias:"Array"}}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GrapherEditor",props:{correct:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.plot",computed:!0},required:!1},graph:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.graph",computed:!0},required:!1},availableTypes:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.availableTypes",computed:!0},required:!1}},composes:["@khanacademy/perseus"]};const O=class O extends u.Component{constructor(){super(...arguments),this.editor=u.createRef(),this._renderMetadataEditor=()=>{const e=this.props.apiOptions.GroupMetadataEditor;return t(e,{value:this.props.metadata,onChange:this.change("metadata")})},this.change=(...e)=>h.apply(this,e),this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e;return l.extend({},(e=this.editor.current)==null?void 0:e.serialize(),{metadata:this.props.metadata})}}render(){return a("div",{className:"perseus-group-editor",children:[t("div",{children:this._renderMetadataEditor()}),t(b,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange})]})}};O.propTypes={...c,content:n.string,widgets:n.object,images:n.object,metadata:n.any,apiOptions:we.propTypes},O.widgetName="group",O.defaultProps={content:"",widgets:{},images:{},metadata:void 0};let G=O;G.__docgenInfo={description:"",methods:[{name:"_renderMetadataEditor",docblock:null,modifiers:[],params:[],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GroupEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},metadata:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"any"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};const ne=class ne extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("fieldset",{children:[a("label",{children:["Name:",t(y,{value:this.props.name,onChange:this.change("name")})]}),a("label",{children:["Value:",t(y,{value:this.props.value,onChange:this.change("value")})]})]})}};ne.propTypes={...c,name:n.string,value:n.string},ne.defaultProps={name:"",value:""};let fe=ne;const Te=class Te extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handlePairChange=(e,s)=>{const r=this.props.pairs.slice();r[e]=s;const i=r[r.length-1];i.name&&i.value&&r.push({name:"",value:""}),this.change("pairs",r)},this.serialize=()=>g.serialize.call(this)}render(){const e=l.map(this.props.pairs,(s,r)=>t(fe,{name:s.name,value:s.value,onChange:this.handlePairChange.bind(this,r)},r));return t("div",{children:e})}};Te.propTypes={...c,pairs:n.arrayOf(n.shape({name:n.string,value:n.string})).isRequired};let ye=Te;const q=class q extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleSettingsChange=e=>{this.change({settings:e.pairs})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[a("div",{style:{fontWeight:"bold",textAlign:"center"},children:["This widget is deprecated! ",t("br",{}),"Try using the Video or CS Program widgets instead."]}),a("label",{children:["Url or Program ID:",t(y,{value:this.props.url,onChange:this.change("url")})]}),t("br",{}),a("label",{children:["Settings:",t(ye,{name:"settings",pairs:this.props.settings,onChange:this.handleSettingsChange})]}),t("br",{}),a("label",{children:["Width:",t(y,{value:this.props.width,onChange:this.change("width")})]}),a("label",{children:["Height:",t(y,{value:this.props.height,onChange:this.change("height")})]}),t(w,{label:"Allow full screen",checked:this.props.allowFullScreen,onChange:e=>{this.props.onChange({allowFullScreen:e})}}),t("br",{}),t(w,{label:"Allow iframe content to redirect the page",checked:this.props.allowTopNavigation,onChange:e=>{this.props.onChange({allowTopNavigation:e})}})]})}};q.propTypes={...c},q.widgetName="iframe",q.defaultProps={url:"",settings:[{name:"",value:""}],width:"400",height:"400",allowFullScreen:!1,allowTopNavigation:!1};let K=q;K.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"IframeEditor",props:{url:{defaultValue:{value:'""',computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},width:{defaultValue:{value:'"400"',computed:!1},required:!1},height:{defaultValue:{value:'"400"',computed:!1},required:!1},allowFullScreen:{defaultValue:{value:"false",computed:!1},required:!1},allowTopNavigation:{defaultValue:{value:"false",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const{RangeInput:jt}=f,Gt=Xe.widget,Pe=6,Kt=function(o){const e=[1,1];return l(o).each((s,r)=>{let i=0;l(s).each((p,m)=>{p!=null&&p.toString().length&&(i=m+1)}),e[1]=Math.max(e[1],i),i>0&&(e[0]=Math.max(e[0],r+1))}),e},P=class P extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.onMatrixBoardSizeChange=e=>{const s=Kt(this.props.answers);if(e[0]!==null&&e[1]!==null){e=[Math.round(Math.min(Math.max(e[0],1),Pe)),Math.round(Math.min(Math.max(e[1],1),Pe))];const r=l(Math.min(e[0],s[0])).times(i=>l(Math.min(e[1],s[1])).times(p=>this.props.answers[i][p]));this.props.onChange({matrixBoardSize:e,answers:r})}},this.serialize=()=>g.serialize.call(this)}render(){const e=l.extend({numericInput:!0,onBlur:()=>{},onFocus:()=>{},trackInteraction:()=>{}},this.props);return a("div",{className:"perseus-matrix-editor",children:[a("div",{className:"perseus-widget-row",children:[" ","Max matrix size:"," ",t(jt,{value:this.props.matrixBoardSize,onChange:this.onMatrixBoardSizeChange,format:this.props.labelStyle,useArrowKeys:!0})]}),t("div",{className:"perseus-widget-row",children:t(Gt,{...e})}),a("div",{className:"perseus-widget-row",children:[" ","Matrix prefix:"," ",t(b,{ref:"prefix",apiOptions:this.props.apiOptions,content:this.props.prefix,widgetEnabled:!1,onChange:s=>{this.change({prefix:s.content})}})]}),a("div",{className:"perseus-widget-row",children:[" ","Matrix suffix:"," ",t(b,{ref:"suffix",apiOptions:this.props.apiOptions,content:this.props.suffix,widgetEnabled:!1,onChange:s=>{this.change({suffix:s.content})}})]})]})}};P.propTypes={...c,matrixBoardSize:n.arrayOf(n.number).isRequired,answers:n.arrayOf(n.arrayOf(n.number)),prefix:n.string,suffix:n.string,cursorPosition:n.arrayOf(n.number)},P.widgetName="matrix",P.defaultProps={matrixBoardSize:[3,3],answers:[[]],prefix:"",suffix:"",cursorPosition:[0,0]};let Y=P;Y.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMatrixBoardSizeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatrixEditor",props:{matrixBoardSize:{defaultValue:{value:"[3, 3]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},answers:{defaultValue:{value:"[[]]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"number"}}},required:!1},prefix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},suffix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},cursorPosition:{defaultValue:{value:"[0, 0]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Yt,NumberInput:E,RangeInput:Jt}=f,Xt={url:null,top:0,left:0},R=class R extends u.Component{constructor(){super(...arguments),this.className="perseus-widget-measurer",this.change=(...e)=>h.apply(this,e),this._changeUrl=e=>{this._changeImage("url",e.target.value)},this._changeTop=e=>{this._changeImage("top",e)},this._changeLeft=e=>{this._changeImage("left",e)},this._changeImage=(e,s)=>{const r=l.clone(this.props.image);r[e]=s,this.change("image",r)},this.renderLabelChoices=e=>l.map(e,function(s){const[r,i]=s;return t("option",{value:i,children:r},i)}),this.serialize=()=>g.serialize.call(this)}render(){const e=l.extend({},Xt,this.props.image);return a("div",{className:"perseus-widget-measurer",children:[t("div",{children:"Image displayed under protractor and/or ruler:"}),a("div",{children:["URL:"," ",t("input",{type:"text",className:"perseus-widget-measurer-url",ref:"image-url",defaultValue:e.url,onChange:this._changeUrl}),t(Yt,{children:t("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),e.url&&a("div",{className:"perseus-widget-row",children:[a("label",{className:"perseus-widget-left-col",children:["Pixels from top:"," ",t(E,{placeholder:0,onChange:this._changeTop,value:e.top,useArrowKeys:!0})]}),a("label",{className:"perseus-widget-right-col",children:["Pixels from left:"," ",t(E,{placeholder:0,onChange:this._changeLeft,value:e.left,useArrowKeys:!0})]})]}),a("div",{children:["Containing area [width, height]:"," ",t(Jt,{onChange:this.change("box"),value:this.props.box,useArrowKeys:!0})]}),a("div",{className:"perseus-widget-row",children:[t("div",{className:"perseus-widget-left-col",children:t(w,{label:"Show ruler",checked:this.props.showRuler,onChange:s=>{this.props.onChange({showRuler:s})}})}),t("div",{className:"perseus-widget-right-col",children:t(w,{label:"Show protractor",checked:this.props.showProtractor,onChange:s=>{this.props.onChange({showProtractor:s})}})})]}),this.props.showRuler&&a("div",{children:[t("div",{children:a("label",{children:[" ","Ruler label:"," ",a("select",{onChange:s=>this.change("rulerLabel",s.target.value),value:this.props.rulerLabel,children:[t("option",{value:"",children:"None"}),t("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),t("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),t("div",{children:a("label",{children:[" ","Ruler ticks:"," ",t("select",{onChange:s=>this.change("rulerTicks",+s.target.value),value:this.props.rulerTicks,children:l.map([1,2,4,8,10,16],function(s){return t("option",{value:s,children:s},s)})})]})}),t("div",{children:a("label",{children:["Ruler pixels per unit:"," ",t(E,{placeholder:40,onChange:this.change("rulerPixels"),value:this.props.rulerPixels,useArrowKeys:!0})]})}),t("div",{children:a("label",{children:["Ruler length in units:"," ",t(E,{placeholder:10,onChange:this.change("rulerLength"),value:this.props.rulerLength,useArrowKeys:!0})]})})]})]})}};R.widgetName="measurer",R.propTypes={...c,box:n.arrayOf(n.number),image:n.shape({url:n.string,top:n.number,left:n.number}),showProtractor:n.bool,showRuler:n.bool,rulerLabel:n.string,rulerTicks:n.number,rulerPixels:n.number,rulerLength:n.number},R.defaultProps={box:[480,480],image:{},showProtractor:!0,showRuler:!1,rulerLabel:"",rulerTicks:10,rulerPixels:40,rulerLength:10};let J=R;J.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_changeUrl",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_changeTop",docblock:null,modifiers:[],params:[{name:"newTop",optional:!1,type:null}],returns:null},{name:"_changeLeft",docblock:null,modifiers:[],params:[{name:"newLeft",optional:!1,type:null}],returns:null},{name:"_changeImage",docblock:null,modifiers:[],params:[{name:"subProp",optional:!1,type:null},{name:"newValue",optional:!1,type:null}],returns:null},{name:"renderLabelChoices",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MeasurerEditor",props:{box:{defaultValue:{value:"[480, 480]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},image:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{url:{name:"string",required:!1},top:{name:"number",required:!1},left:{name:"number",required:!1}}},required:!1},showProtractor:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},showRuler:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},rulerLabel:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},rulerTicks:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1},rulerPixels:{defaultValue:{value:"40",computed:!1},description:"",type:{name:"number"},required:!1},rulerLength:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1}},composes:["@khanacademy/perseus"]};const{NumberInput:Zt,TextInput:Qt}=f,ie=class ie extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.updateMolecule=e=>{this.change({smiles:e})},this.updateRotation=e=>{this.change({rotationAngle:e})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[t("div",{children:a("label",{children:["SMILES: ",t(Qt,{onChange:this.updateMolecule,value:this.props.smiles})]})}),t("div",{children:a("label",{children:["Rotation (deg): ",t(Zt,{onChange:this.updateRotation,value:this.props.rotationAngle})]})})]})}};ie.propTypes={...c,rotationAngle:n.number,smiles:n.string},ie.widgetName="molecule-renderer";let X=ie;X.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"updateMolecule",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"updateRotation",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MoleculeWidgetEditor",props:{rotationAngle:{description:"",type:{name:"number"},required:!1},smiles:{description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:M,TextListEditor:Re}=f,he="normal",ze="auto",ce="horizontal",Ae="vertical",z=class z extends u.Component{constructor(){super(...arguments),this.onOptionsChange=(e,s,r)=>{const i={};i[e]=l.map(s,function(p){return{content:p}}),this.props.onChange(i,r)},this.onLayoutChange=e=>{this.props.onChange({layout:e.target.value})},this.onHeightChange=e=>{this.props.onChange({height:e.target.value})},this.serialize=()=>({options:l.chain(l.pluck(this.props.correctOptions,"content")).union(l.pluck(this.props.otherOptions,"content")).uniq().reject(function(s){return s===""}).sort().sortBy(function(s){return/\d/.test(s)?0:/^\$?[a-zA-Z]+\$?$/.test(s)?2:1}).map(function(s){return{content:s}}).value(),correctOptions:this.props.correctOptions,otherOptions:this.props.otherOptions,height:this.props.height,layout:this.props.layout})}render(){return a("div",{className:"perseus-widget-orderer",children:[a("div",{children:[" ","Correct answer:"," ",t(M,{children:t("p",{children:"Place the cards in the correct order. The same card can be used more than once in the answer but will only be displayed once at the top of a stack of identical cards."})})]}),t(Re,{options:l.pluck(this.props.correctOptions,"content"),onChange:this.onOptionsChange.bind(this,"correctOptions"),layout:this.props.layout}),a("div",{children:[" ","Other cards:"," ",t(M,{children:t("p",{children:"Create cards that are not part of the answer."})})]}),t(Re,{options:l.pluck(this.props.otherOptions,"content"),onChange:this.onOptionsChange.bind(this,"otherOptions"),layout:this.props.layout}),a("div",{children:[a("label",{children:[" ","Layout:"," ",a("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[t("option",{value:ce,children:"Horizontal"}),t("option",{value:Ae,children:"Vertical"})]})]}),t(M,{children:t("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text (e.g. proofs)."})})]}),a("div",{children:[a("label",{children:[" ","Height:"," ",a("select",{value:this.props.height,onChange:this.onHeightChange,children:[t("option",{value:he,children:"Normal"}),t("option",{value:ze,children:"Automatic"})]})]}),t(M,{children:t("p",{children:'Use "Normal" for text, "Automatic" for images.'})})]})]})}};z.propTypes={correctOptions:n.array,otherOptions:n.array,height:n.oneOf([he,ze]),layout:n.oneOf([ce,Ae]),onChange:n.func.isRequired},z.widgetName="orderer",z.defaultProps={correctOptions:[{content:"$x$"}],otherOptions:[{content:"$y$"}],height:he,layout:ce};let Z=z;Z.__docgenInfo={description:"",methods:[{name:"onOptionsChange",docblock:null,modifiers:[],params:[{name:"whichOptions",optional:!1,type:null},{name:"options",optional:!1,type:null},{name:"cb",optional:!1,type:null}],returns:null},{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onHeightChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"OrdererEditor",props:{correctOptions:{defaultValue:{value:'[{content: "$x$"}]',computed:!1},description:"",type:{name:"array"},required:!1},otherOptions:{defaultValue:{value:'[{content: "$y$"}]',computed:!1},description:"",type:{name:"array"},required:!1},height:{defaultValue:{value:'"normal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"normal"',computed:!1},{value:'"auto"',computed:!1}]},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};const{InfoTip:Ve}=f,A=class A extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){const e=t(b,{ref:"passage-editor",apiOptions:this.props.apiOptions,content:this.props.passageText,widgetEnabled:!1,placeholder:"Type passage here...",onChange:r=>{this.change({passageText:r.content})},showWordCount:!0}),s=t(b,{ref:"passage-footnotes-editor",apiOptions:this.props.apiOptions,content:this.props.footnotes,widgetEnabled:!1,placeholder:"Type footnotes here...",onChange:r=>{this.change({footnotes:r.content})}});return a("div",{className:"perseus-widget-passage-editor",children:[t("div",{className:"perseus-widget-row",children:t(w,{label:"Show line numbers",checked:this.props.showLineNumbers,onChange:r=>{this.props.onChange({showLineNumbers:r})}})}),a("div",{children:["Passage title:",t(Ve,{children:t("p",{children:"An optional title that will appear directly above the passage in the same font style. (E.g. Passage 1)"})}),t("div",{children:t("input",{type:"text",defaultValue:this.props.passageTitle,onChange:r=>{this.change({passageTitle:r.target.value})}})})]}),a("div",{children:["Passage Text:",e]}),a("div",{children:["Footnotes:",t(Ve,{children:t("p",{children:"To add footnotes, add ^ characters where they belong in the passage. Then, add ^ in the footnotes area to reference the footnotes in the passage."})}),s]})]})}};A.propTypes={...c,passageTitle:n.string,passageText:n.string,footnotes:n.string,showLineNumbers:n.bool},A.widgetName="passage",A.defaultProps={passageTitle:"",passageText:"",footnotes:"",showLineNumbers:!0};let Q=A;Q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageEditor",props:{passageTitle:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},passageText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},footnotes:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},showLineNumbers:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:es,NumberInput:Le,TextInput:ts}=f,V=class V extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[t("div",{children:a("label",{children:["Passage Number: ",t(Le,{value:this.props.passageNumber,onChange:this.change("passageNumber")})]})}),t("div",{children:a("label",{children:["Reference Number: ",t(Le,{value:this.props.referenceNumber,onChange:this.change("referenceNumber")})]})}),t("div",{children:a("label",{children:["Summary Text: ",t(ts,{value:this.props.summaryText,onChange:this.change("summaryText")}),a(es,{children:[t("p",{children:"Short summary of the referenced section. This will be included in parentheses and quotes automatically."}),t("p",{children:"Ex: The start ... the end"})]})]})})]})}};V.propTypes={...c,passageNumber:n.number,referenceNumber:n.number,summaryText:n.string},V.widgetName="passage-ref",V.defaultProps={passageNumber:1,referenceNumber:1,summaryText:""};let ee=V;ee.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefEditor",props:{passageNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},referenceNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},summaryText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const L=class L extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleContentChange=e=>{this.change({content:e.target.value})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:["Content:",t("input",{type:"text",value:this.props.content,onChange:this.handleContentChange})]})}};L.propTypes={...c,content:n.string},L.widgetName="passage-ref-target",L.defaultProps={content:""};let te=L;te.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleContentChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefTargetEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:x,NumberInput:De,RangeInput:ss,TextListEditor:as}=f,rs=Ze.widget,be="starting",ve="correct",ns=[be,ve];function _e(o,e,s){const r=l.clone(o);r.length=e;for(let i=o.length;i"$"+at(o,2)+"$",le=class le extends u.Component{constructor(){super(...arguments),this.state={editing:this.props.static?be:ve,pic:null,loadedUrl:null,minX:null,maxX:null,tickStep:null},this.fetchPic=e=>{if(this.state.loadedUrl!==e){const s=new Image;s.src=e,s.onload=()=>{this.setState({pic:s,loadedUrl:e})}}},this.handleChangeTickStep=e=>{this.setState({tickStep:e})},this.handleChangeRange=e=>{this.setState({minX:e[0],maxX:e[1]})},this.changeLabelInterval=e=>{this.props.onChange({labelInterval:e})},this.handlePlotterChange=e=>{const s={};s[this.state.editing]=e.values,this.props.onChange(s)},this.changeType=e=>{let s;if(e==="histogram"?(s=[Ue(0)].concat(this.props.categories),this.props.onChange({type:e,categories:s})):this.props.type==="histogram"?(s=this.props.categories.slice(1),this.props.onChange({type:e,categories:s})):this.props.onChange({type:e}),s){const r=oe.findDOMNode(this.refs.categories);r.value=s.join(", ")}},this.changeLabel=(e,s)=>{const r=l.clone(this.props.labels);r[e]=s.target.value,this.props.onChange({labels:r})},this.changePicUrl=e=>{const s=de.getRealImageUrl(e);this.props.onChange({picUrl:s})},this.changeCategories=e=>{let s=e.length;this.props.type==="histogram"&&s--;const r=this.props.scaleY;this.props.onChange({categories:e,correct:_e(this.props.correct,s,r),starting:_e(this.props.starting,s,r)})},this.changeScale=e=>{const s=this.props.scaleY,r=+e.target.value||$.scaleY,i=function(m){return m*r/s},p=i(this.props.maxY);this.props.onChange({scaleY:r,maxY:p,correct:l.map(this.props.correct,i),starting:l.map(this.props.starting,i)}),oe.findDOMNode(this.refs.maxY).value=p},this.changeMax=e=>{this.props.onChange({maxY:+e.target.value||$.maxY})},this.changeSnaps=e=>{this.props.onChange({snapsPerLine:+e.target.value||$.snapsPerLine})},this.changeEditing=e=>{this.setState({editing:e})},this.setCategoriesFromScale=()=>{const e=this.state.tickStep||1,s=this.state.minX||0,r=this.state.maxX||0,i=Math.floor((r-s)/e)*e;let p;this.props.type==="histogram"||this.props.type==="dotplot"?p=l.range(0,i+e,e):p=l.range(e,i+e,e),p=l.map(p,d=>d+s),p=l.map(p,Ue),this.changeCategories(p);const m=oe.findDOMNode(this.refs.categories);m.value=p.join(", ")},this.serialize=()=>{const e=l.pick(this.props,"correct","starting","type","labels","categories","scaleY","maxY","snapsPerLine","labelInterval");return this.props.type==="pic"&&(e.picUrl=this.props.picUrl),e}}UNSAFE_componentWillMount(){this.fetchPic(this.props.picUrl)}UNSAFE_componentWillReceiveProps(e){this.fetchPic(e.picUrl),e.static&&this.setState({editing:"starting"})}render(){const e=l.contains(["line","histogram","dotplot"],this.props.type),s=!l.contains(["pic","dotplot"],this.props.type),r={trackInteraction:()=>{},...this.props};return a("div",{className:"perseus-widget-plotter-editor",children:[a("div",{children:["Chart type:"," ",Qe.map(i=>a("label",{children:[t("input",{type:"radio",name:"chart-type",checked:this.props.type===i,onChange:l.partial(this.changeType,i)}),i]},i),this)]}),a("div",{children:["Labels:"," ",["x","y"].map((i,p)=>a("label",{children:[i+":",t("input",{type:"text",onChange:l.partial(this.changeLabel,p),defaultValue:this.props.labels[p]})]},i),this)]}),e&&a("div",{className:"set-from-scale-box",children:[t("span",{className:"categories-title",children:"Set Categories From Scale"}),a("div",{children:[a("label",{children:["Tick Step:"," ",t(De,{placeholder:1,useArrowKeys:!0,value:this.state.tickStep,onChange:this.handleChangeTickStep})]}),t(x,{children:t("p",{children:"The difference between adjacent ticks."})})]}),t("div",{children:a("label",{children:["Range:"," ",t(ss,{placeholder:[0,10],useArrowKeys:!0,value:[this.state.minX,this.state.maxX],onChange:this.handleChangeRange})]})}),t("div",{children:a("button",{onClick:this.setCategoriesFromScale,children:["Set Categories"," "]})})]}),a("div",{children:[a("label",{children:["Label Interval:"," ",t(De,{useArrowKeys:!0,value:this.props.labelInterval,onChange:this.changeLabelInterval})]}),t(x,{children:t("p",{children:'Which ticks to display the labels for. For instance, setting this to "4" will only show every 4th label (plus the last one)'})})]}),this.props.type==="pic"&&a("div",{children:[a("label",{children:["Picture:"," ",t(y,{className:"pic-url",value:this.props.picUrl,onChange:this.changePicUrl}),t(x,{children:t("p",{children:'Use the default picture of Earth, or insert the URL for a different picture using the "Add image" function.'})})]}),this.state.pic&&this.state.pic.width!==this.state.pic.height&&a("p",{className:"warning",children:[t("b",{children:"Warning"}),": You are using a picture which is not square. This means the image will get distorted. You should probably crop it to be square."]})]}),t("div",{children:a("label",{children:["Categories:"," ",t(as,{ref:"categories",layout:"horizontal",options:this.props.categories,onChange:this.changeCategories})]})}),t("div",{children:a("label",{children:["Scale (y):"," ",t("input",{type:"text",onChange:this.changeScale,defaultValue:this.props.scaleY})]})}),t("div",{children:a("label",{children:["Max y:"," ",t("input",{type:"text",ref:"maxY",onChange:this.changeMax,defaultValue:this.props.maxY})]})}),s&&a("div",{children:[a("label",{children:["Snaps per line:"," ",t("input",{type:"text",onChange:this.changeSnaps,defaultValue:this.props.snapsPerLine})]}),t(x,{children:t("p",{children:"Creates the specified number of divisions between the horizontal lines. Fewer snaps between lines makes the graph easier for the student to create correctly."})})]}),a("div",{children:["Editing values:"," ",ns.map(i=>a("label",{children:[t("input",{type:"radio",disabled:i===ve&&this.props.static,checked:this.props.static?i===be:this.state.editing===i,onChange:p=>this.changeEditing(i)}),i]},i)),a(x,{children:[t("p",{children:"Use this toggle to switch between editing the correct answer (what the student will be graded on) and the starting values (what the student will see plotted when they start the problem). Note: These cannot be the same."}),t("p",{children:"In static mode, the starting values are rendered out to the displayed widget."})]})]}),t(rs,{...r,starting:this.props[this.state.editing],onChange:this.handlePlotterChange})]})}};le.widgetName="plotter",le.defaultProps={...$,correct:[1],starting:[1],type:"bar",labels:["",""],categories:[""],picSize:30,picBoxHeight:36,plotDimensions:[275,200],labelInterval:1,get picUrl(){const e=$e().staticUrl;return e?e("/images/badges/earth-small.png"):null}};let se=le;se.__docgenInfo={description:"",methods:[{name:"fetchPic",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"handleChangeTickStep",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handleChangeRange",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"changeLabelInterval",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handlePlotterChange",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"changeType",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null}],returns:null},{name:"changeLabel",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"changePicUrl",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"changeCategories",docblock:null,modifiers:[],params:[{name:"categories",optional:!1,type:null}],returns:null},{name:"changeScale",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeMax",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeSnaps",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeEditing",docblock:null,modifiers:[],params:[{name:"editing",optional:!1,type:null}],returns:null},{name:"setCategoriesFromScale",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PlotterEditor",props:{type:{required:!1,tsType:{name:'PerseusPlotterWidgetOptions["type"]',raw:'PerseusPlotterWidgetOptions["type"]'},description:"",defaultValue:{value:'"bar"',computed:!1}},labels:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"Array"},description:"",defaultValue:{value:'["", ""]',computed:!1}},categories:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'[""]',computed:!1}},scaleY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},maxY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"10",computed:!1}},snapsPerLine:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}},picSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"30",computed:!1}},picBoxHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"36",computed:!1}},picUrl:{required:!0,tsType:{name:"string"},description:""},plotDimensions:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[275, 200]",computed:!1}},labelInterval:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},starting:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},correct:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},static:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""}}};const{InfoTip:is,NumberInput:Ee}=f,ls=et.widget,D=class D extends u.Component{constructor(){super(...arguments),this.numberOfColumns=u.createRef(),this.focus=()=>{var e;(e=this.numberOfColumns.current)==null||e.focus()},this.onSizeInput=(e,s)=>{let r=+e||0,i=+s||0;r=Math.min(Math.max(1,r),30),i=Math.min(Math.max(1,i),6);const p=this.props.columns,m=this.props.rows,d=this.props.answers;r<=m?d.length=r:l(r-m).times(function(){d.push(de.stringArrayOfSize(p))});function v(ke){i<=p?ke.length=i:l(i-p).times(function(){ke.push("")})}const xe=this.props.headers;v(xe),l.each(d,v),this.props.onChange({rows:r,columns:i,answers:d,headers:xe})},this.serialize=()=>{const e=l.pick(this.props,"headers","rows","columns");return l.extend({},e,{answers:l.map(this.props.answers,l.clone)})}}render(){return a("div",{children:[t("div",{className:"perseus-widget-row",children:a("label",{children:["Number of columns:"," ",t(Ee,{ref:this.numberOfColumns,value:this.props.columns,onChange:e=>{e&&this.onSizeInput(this.props.rows,e)},useArrowKeys:!0})]})}),t("div",{className:"perseus-widget-row",children:a("label",{children:["Number of rows:"," ",t(Ee,{ref:"numberOfRows",value:this.props.rows,onChange:e=>{e&&this.onSizeInput(e,this.props.columns)},useArrowKeys:!0})]})}),a("div",{children:[" ","Table of answers:"," ",t(is,{children:t("p",{children:"The student has to fill out all cells in the table. For partially filled tables create a table using the template, and insert text input boxes as desired."})})]}),t("div",{children:t(ls,{headers:this.props.headers,answers:this.props.answers,onChange:this.props.onChange,apiOptions:this.props.apiOptions,editableHeaders:!0,onFocus:()=>{},onBlur:()=>{},trackInteraction:()=>{},Editor:b})})]})}};D.propTypes={rows:n.number,columns:n.number,headers:n.arrayOf(n.string),answers:n.arrayOf(n.arrayOf(n.string))},D.widgetName="table",D.defaultProps=function(){const r=l(4).times(function(){return de.stringArrayOfSize(1)});return{headers:[""],rows:4,columns:1,answers:r}}();let ae=D;ae.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"onSizeInput",docblock:null,modifiers:[],params:[{name:"numRawRows",optional:!1,type:null},{name:"numRawColumns",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"TableEditor",props:{rows:{description:"",type:{name:"number"},required:!1},columns:{description:"",type:{name:"number"},required:!1},headers:{description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},answers:{description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"string"}}},required:!1}}};const{InfoTip:os}=f,ps=/khanacademy\.org\/.*\/v\/(.*)$/;function us(o){const e=ps.exec(o);return e?e[1]:o}const _=class _ extends u.Component{constructor(){super(...arguments),this._handleUrlChange=e=>{this.props.onChange({location:us(e)})},this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return t("div",{children:a("label",{children:["KA Video Slug:"," ",t(y,{value:this.props.location,style:{width:290},onChange:this._handleUrlChange}),t(os,{children:"KA video URLs will be converted to just the slug."})]})})}};_.propTypes={...c,location:n.string,onChange:n.func},_.widgetName="video",_.defaultProps={location:""};let re=_;re.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"_handleUrlChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"VideoEditor",props:{location:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},onChange:{description:"",type:{name:"func"},required:!1}},composes:["@khanacademy/perseus"]};const hs=[ut,F,ht,ct,dt,mt,C,H,j,G,K,bt,vt,wt,Ct,Tt,xt,Y,J,X,kt,Nt,Z,Q,ee,te,St,se,It,qt,ae,re,Ot,B],ya=()=>{it(tt),lt(hs),ot(),pt()};export{hs as A,Rt as I,fa as J,ya as r}; +import{j as t,a}from"./jsx-runtime-FVsy8kgq.js";import{c as We}from"./index-fuycm_QE.js";import{_ as l,$ as Fe}from"./jquery-yG1GhClm.js";import{s as Be,D as He,t as je,u as Ge,v as Ke,x as Ye,c as h,p as c,G as Je,M as Xe,y as Ze,z as Qe,T as et,w as tt}from"./article-renderer-ub6lGcPc.js";import{E as st,U as de,r as at}from"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import{L as Me}from"./svg-image-4Vh9uTQ6.js";import{A as we}from"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import{m as rt,n as nt,r as it,b as lt,a as ot,c as pt}from"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{g as $e}from"./dependencies-d8cZibFS.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{r as u}from"./index-TT1qJ6UJ.js";import{C as ut}from"./categorizer-editor-cvgo7rUS.js";import{c as f}from"./components-yT7oveOH.js";import{E as g}from"./editor-jsonify-4Li1SRv8.js";import{C as w}from"./index-QCAhLhLD.js";import{P as n}from"./index-0C4KXdeC.js";import{B as y}from"./blur-input-hjJsfoK9.js";import{D as ht}from"./definition-editor-yKychsEi.js";import{D as ct}from"./dropdown-editor-owePQkYW.js";import{E as dt}from"./explanation-editor-7sIPvPkn.js";import{E as mt}from"./expression-editor-qSSWTw9p.js";import{i as gt}from"./icon-paths-5JCXzGsq.js";import{l as W}from"./index-awljIyHI.js";import{E as b}from"./editor-1XE8pcNh.js";import{i as ft}from"./icon-paths-EoBkHOLI.js";import{G as yt}from"./graph-settings-VTKCtXa5.js";import{I as bt}from"./image-editor-xcASymG3.js";import{I as vt}from"./input-number-editor-Z-c49jcj.js";import{I as wt}from"./index-JX1pDXLf.js";import{I as Ct}from"./interactive-graph-editor-sYnTC31H.js";import{L as Tt}from"./label-image-editor-kPCp3zRh.js";import{M as xt}from"./matcher-editor-nUcHc7yM.js";import{N as kt}from"./number-line-editor-hnXuQMSB.js";import{N as Nt}from"./numeric-input-editor-xQu1_JCK.js";import{P as St}from"./phet-simulation-editor-1KD7oC0a.js";import{R as oe}from"./index-7vsPyIck.js";import{P as It}from"./python-program-editor-kfW7ZX3D.js";import{R as Ot}from"./editor-EbDgkB5I.js";import{S as qt}from"./sorter-editor-VTfqPYS3.js";const Pt={allTypes:Be,DEFAULT_GRAPHER_PROPS:He,chooseType:je,defaultPlotProps:Ge,getEquationString:Ke,typeToButton:Ye},fa=We({displayName:"JsonEditor",getInitialState:function(){return{currentValue:JSON.stringify(this.props.value,null,4),valid:!0}},UNSAFE_componentWillReceiveProps:function(o){(!this.state.valid||!l.isEqual(o.value,JSON.parse(this.state.currentValue)))&&this.setState(this.getInitialState())},handleKeyDown:function(o){if(o.key==="Tab"){const e=o.target.selectionStart,s=o.target.value,r=s.substring(0,e),i=s.substring(e,s.length);o.target.value=r+" "+i,o.target.selectionStart=r.length+4,o.target.selectionEnd=r.length+4,o.preventDefault(),this.handleChange(o)}},handleChange:function(o){const e=o.target.value;try{let s=JSON.parse(e);l.isString(s)&&(s=JSON.parse(s)),this.setState({currentValue:e,valid:!0},function(){this.props.onChange(s)})}catch{this.setState({currentValue:e,valid:!1})}},handleBlur:function(o){const e=o.target.value;try{let s=JSON.parse(e);l.isString(s)&&(s=JSON.parse(s)),this.setState({currentValue:JSON.stringify(s,null,4),valid:!0},function(){this.props.onChange(s)})}catch{this.setState({currentValue:JSON.stringify(this.props.value,null,4),valid:!0})}},render:function(){const o="perseus-json-editor "+(this.state.valid?"valid":"invalid");return t("textarea",{className:o,value:this.state.currentValue,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur})}});let Ne=0;const me={},ge={};window.iframeDataStore={};window.addEventListener("message",o=>{if(typeof o.data=="string"){const e=me[o.data];e&&e()}else o.data.id&&(o.data.height!==void 0?ge[o.data.id](o.data.height):o.data.lintWarnings&&Me.log("LINTER REPORT",{lintWarnings:JSON.stringify(o.data.lintWarnings)}))});class Rt extends u.Component{constructor(){super(...arguments),this.container=u.createRef()}componentDidMount(){this._isMounted=!0,this.iframeID=Ne,Ne++,this._prepareFrame(),me[this.iframeID]=()=>{this.sendNewData(this._lastData)},ge[this.iframeID]=e=>{this._lastHeight=e,this._isMounted&&this.props.seamless&&this.container.current&&(this.container.current.style.height=e+"px")}}shouldComponentUpdate(e){return e.datasetValue!==this.props.datasetValue||e.seamless!==this.props.seamless}componentDidUpdate(e){this.container.current&&(this.props.seamless?this.container.current.style.height=this._lastHeight+"px":this.container.current.style.height="100%"),e.datasetValue!==this.props.datasetValue&&this._prepareFrame()}componentWillUnmount(){me[this.iframeID]=null,ge[this.iframeID]=null,this._isMounted=!1}_prepareFrame(){var s,r;this._frame&&((s=this.container.current)==null||s.removeChild(this._frame));const e=document.createElement("iframe");e.style.width="100%",e.style.height="100%",e.src=this.props.url,this.props.datasetKey&&(e.dataset[this.props.datasetKey]=this.props.datasetValue),e.dataset.id=String(this.iframeID),this.props.seamless&&(e.dataset.lintGutter="true"),(r=this.container.current)==null||r.appendChild(e),this._frame=e}sendNewData(e){const s=this._frame;this._isMounted&&e&&(s!=null&&s.contentWindow)&&(this._lastData=e,window.iframeDataStore[this.iframeID]=e,s.contentWindow.postMessage(this.iframeID,"*"))}render(){return t("div",{ref:this.container,style:{width:"100%",height:"100%"}})}}Rt.__docgenInfo={description:"",methods:[{name:"_prepareFrame",docblock:null,modifiers:[],params:[],returns:null},{name:"sendNewData",docblock:null,modifiers:[],params:[{name:"data",optional:!1,type:{name:"any"}}],returns:null}],displayName:"IframeContentRenderer",props:{url:{required:!0,tsType:{name:"string"},description:""},datasetKey:{required:!0,tsType:{name:"string"},description:""},datasetValue:{required:!0,tsType:{name:"any"},description:""},seamless:{required:!0,tsType:{name:"boolean"},description:""}}};const{InfoTip:Se}=f,Ie=400,Oe=400;var T;let zt=(T=class extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("fieldset",{className:"pair-editor",children:[a("label",{children:["Name:"," ",t(y,{value:this.props.name,onChange:this.change("name")})]}),a("label",{children:[" ","Value:"," ",t(y,{value:this.props.value,onChange:this.change("value")})]})]})}},T.propTypes={...c,name:n.string,value:n.string},T.defaultProps={name:"",value:""},T);var U;let At=(U=class extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handlePairChange=(e,s)=>{const r=this.props.pairs.slice();r[e]=s;const i=r[r.length-1];i.name&&i.value&&r.push({name:"",value:""}),this.change("pairs",r)},this.serialize=()=>g.serialize.call(this)}render(){const e=l.map(this.props.pairs,(s,r)=>t(zt,{name:s.name,value:s.value,onChange:this.handlePairChange.bind(this,r)},r));return t("div",{children:e})}},U.propTypes={...c,pairs:n.arrayOf(n.shape({name:n.string,value:n.string})).isRequired},U);const Vt=/khanacademy\.org\/computer-programming\/[^\/]+\/(\d+)/;function Lt(o){const e=Vt.exec(o);return e&&(o=e[1]),o}const k=class k extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this._handleSettingsChange=e=>{this.change({settings:e.pairs})},this._handleProgramIDChange=e=>{e=Lt(e);const{isDevServer:s,InitialRequestUrl:r}=$e(),p=`${s?r.origin:"https://www.khanacademy.org"}/api/internal/scratchpads/${e}`;Fe.getJSON(p).done(m=>{const d=m.userAuthoredContentType;this.change({width:m.width,height:m.height,programID:e,programType:d})}).fail((m,d,v)=>{Me.error("Error retrieving scratchpad info for program ID ",st.TransientService,{cause:v,loggedMetadata:{textStatus:d,programID:e}}),this.change({width:Ie,height:Oe,programID:e,programType:null})})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[a("label",{children:["Url or Program ID:"," ",t(y,{value:this.props.programID,onChange:this._handleProgramIDChange})]}),t("br",{}),t(w,{label:"Show Editor",checked:this.props.showEditor,onChange:e=>{this.props.onChange({showEditor:e})}}),t(Se,{children:'If you show the editor, you should use the "full-width" alignment to make room for the width of the editor.'}),t("br",{}),t(w,{label:"Show Buttons",checked:this.props.showButtons,onChange:e=>{this.props.onChange({showButtons:e})}}),t("br",{}),a("label",{children:["Settings:",t(At,{name:"settings",pairs:this.props.settings,onChange:this._handleSettingsChange}),a(Se,{children:["Settings that you add here are available to the program as an object returned by ",t("code",{children:"Program.settings()"})]})]})]})}};k.propTypes={...c},k.widgetName="cs-program",k.defaultProps={programID:"",programType:null,settings:[{name:"",value:""}],showEditor:!1,showButtons:!1,width:Ie,height:Oe};let F=k;F.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"_handleProgramIDChange",docblock:null,modifiers:[],params:[{name:"programID",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CSProgramEditor",props:{programID:{defaultValue:{value:'""',computed:!1},required:!1},programType:{defaultValue:{value:"null",computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},showEditor:{defaultValue:{value:"false",computed:!1},required:!1},showButtons:{defaultValue:{value:"false",computed:!1},required:!1},width:{defaultValue:{value:"400",computed:!1},required:!1},height:{defaultValue:{value:"400",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const Ce=class Ce extends u.Component{serialize(){return g.serialize.call(this)}render(){return a("div",{children:[t("p",{children:"This widget has been deprecated and removed"}),t("p",{children:"Learners will see a message and they will not be graded on this part. Please replace this widget with a supported one."})]})}};Ce.widgetName="deprecated-standin";let B=Ce;B.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}}],displayName:"DeprecatedStandinEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};const{InlineIcon:qe,TextInput:Dt}=f,N=class N extends u.Component{constructor(){super(...arguments),this.editor=u.createRef(),this.hintEditor=u.createRef(),this.change=(...e)=>h.apply(this,e),this.handleAddHint=()=>{const e={content:""};this.props.onChange({hint:e},()=>{var s;(s=this.hintEditor.current)==null||s.focus()})},this.handleRemoveHint=e=>{this.props.onChange({hint:null})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e,s;return{title:this.props.title,...(e=this.editor.current)==null?void 0:e.serialize(),hint:(s=this.hintEditor.current)==null?void 0:s.serialize()}}}render(){return a("div",{className:"perseus-group-editor",children:[t("div",{className:"perseus-widget-row",children:a("label",{className:W.css(pe.title),children:["Title:"," ",t(Dt,{value:this.props.title,className:W.css(pe.input),onChange:this.change("title")})]})}),t(b,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange,warnNoPrompt:!0,warnNoWidgets:!0}),!this.props.hint&&a("button",{type:"button",style:{marginTop:10},className:"add-hint simple-button orange",onClick:this.handleAddHint,children:[t(qe,{...ft})," Add a hint"]}),this.props.hint&&a("div",{className:"perseus-hint-editor",children:[t("div",{className:W.css(pe.hintsTitle),children:"Hint"}),t(b,{ref:this.hintEditor,content:this.props.hint?this.props.hint.content:"",widgets:this.props.hint?this.props.hint.widgets:{},apiOptions:this.props.apiOptions,images:this.props.hint&&this.props.hint.images,widgetEnabled:!0,immutableWidgets:!1,onChange:e=>{this.change("hint",Object.assign({},this.props.hint,e))}}),a("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.handleRemoveHint,children:[t(qe,{...gt})," Remove this hint"]})]})]})}};N.propTypes={...c,title:n.string,content:n.string,widgets:n.object,images:n.object,apiOptions:we.propTypes},N.widgetName="graded-group",N.defaultProps={title:"",content:"",widgets:{},images:{},hint:null};let C=N;const pe=W.StyleSheet.create({title:{fontSize:18,fontWeight:"bold"},input:{fontSize:18},hintsTitle:{marginTop:10,fontSize:"110%",fontWeight:"bold"}});C.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAddHint",docblock:null,modifiers:[],params:[],returns:null},{name:"handleRemoveHint",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupEditor",props:{title:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},hint:{defaultValue:{value:"null",computed:!1},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};const S=class S extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.getSaveWarnings=()=>[].concat(...this._editors.map(e=>e?e.getSaveWarnings():[])),this.serialize=()=>({gradedGroups:this.props.gradedGroups}),this.renderGroups=()=>this.props.gradedGroups?this.props.gradedGroups.map((e,s)=>t(C,{ref:r=>this._editors[s]=r,...e,apiOptions:this.props.apiOptions,widgetEnabled:!0,immutableWidgets:!1,onChange:r=>this.change("gradedGroups",_t(this.props.gradedGroups,s,{...this.props.gradedGroups[s],...r}))},s)):null,this.addGroup=()=>{const e=this.props.gradedGroups||[];this.change("gradedGroups",e.concat([C.defaultProps]))}}UNSAFE_componentWillMount(){this._editors=[]}render(){return a("div",{className:"perseus-group-editor",children:[this.renderGroups(),t("button",{onClick:this.addGroup,children:"Add group"})]})}};S.propTypes={...c,apiOptions:we.propTypes,gradedGroups:n.array,onChange:n.func.isRequired},S.widgetName="graded-group-set",S.defaultProps={gradedGroups:[]};let H=S;const _t=(o,e,s)=>[...o.slice(0,e),s,...o.slice(e+1)];H.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null},{name:"renderGroups",docblock:null,modifiers:[],params:[],returns:null},{name:"addGroup",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupSetEditor",props:{gradedGroups:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1},onChange:{description:"",type:{name:"func"},required:!0}},composes:["@khanacademy/perseus"]};const{InfoTip:Ut,MultiButtonGroup:Et}=f,Mt=Je.widget,{DEFAULT_GRAPHER_PROPS:ue,allTypes:$t,chooseType:Wt,defaultPlotProps:Ft,getEquationString:Bt,typeToButton:Ht}=Pt,I=class I extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleAvailableTypesChange=e=>{let s=this.props.correct;if(!l.contains(e,this.props.correct.type)){const r=this.props.graph,i=Wt(e);s=Ft(i,r)}this.props.onChange({availableTypes:e,correct:s})},this.serialize=()=>l.chain(this.props).pick("correct","availableTypes").extend({graph:l.omit(this.props.graph,"box")}).value()}render(){const e=nt.SMALL;let s,r;if(this.props.graph.valid===!0){const i={graph:this.props.graph,plot:this.props.correct,availableTypes:this.props.availableTypes,onChange:(p,m)=>{var v;let d=this.props.correct;d.type===((v=p.plot)==null?void 0:v.type)?d=l.extend({},d,p.plot):d=p.plot,this.props.onChange({correct:d},m)},trackInteraction:function(){}};r=t(Mt,{...i,apiOptions:this.props.apiOptions,containerSizeClass:e}),s=Bt(i)}else r=t("div",{className:"perseus-error",children:this.props.graph.valid});return a("div",{children:[a("div",{children:["Correct answer"," ",t(Ut,{children:t("p",{children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."})})," ",": ",s]}),t(yt,{editableSettings:["graph","snap","image"],box:rt(e),range:this.props.graph.range,labels:this.props.graph.labels,step:this.props.graph.step,gridStep:this.props.graph.gridStep,snapStep:this.props.graph.snapStep,valid:this.props.graph.valid,backgroundImage:this.props.graph.backgroundImage,markings:this.props.graph.markings,rulerLabel:this.props.graph.rulerLabel,rulerTicks:this.props.graph.rulerTicks,showTooltips:this.props.graph.showTooltips,onChange:this.change("graph")}),a("div",{className:"perseus-widget-row",children:[t("label",{children:"Available functions: "}),t(Et,{allowEmpty:!1,values:this.props.availableTypes,buttons:l.map($t,Ht),onChange:this.handleAvailableTypesChange})]}),r]})}};I.propTypes={...c},I.widgetName="grapher",I.defaultProps={correct:ue.plot,graph:ue.graph,availableTypes:ue.availableTypes};let j=I;j.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAvailableTypesChange",docblock:null,modifiers:[],params:[{name:"newAvailableTypes",optional:!1,type:{name:"Array",elements:[{name:"any"}],raw:"Array",alias:"Array"}}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GrapherEditor",props:{correct:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.plot",computed:!0},required:!1},graph:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.graph",computed:!0},required:!1},availableTypes:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.availableTypes",computed:!0},required:!1}},composes:["@khanacademy/perseus"]};const O=class O extends u.Component{constructor(){super(...arguments),this.editor=u.createRef(),this._renderMetadataEditor=()=>{const e=this.props.apiOptions.GroupMetadataEditor;return t(e,{value:this.props.metadata,onChange:this.change("metadata")})},this.change=(...e)=>h.apply(this,e),this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e;return l.extend({},(e=this.editor.current)==null?void 0:e.serialize(),{metadata:this.props.metadata})}}render(){return a("div",{className:"perseus-group-editor",children:[t("div",{children:this._renderMetadataEditor()}),t(b,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange})]})}};O.propTypes={...c,content:n.string,widgets:n.object,images:n.object,metadata:n.any,apiOptions:we.propTypes},O.widgetName="group",O.defaultProps={content:"",widgets:{},images:{},metadata:void 0};let G=O;G.__docgenInfo={description:"",methods:[{name:"_renderMetadataEditor",docblock:null,modifiers:[],params:[],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GroupEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},metadata:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"any"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};const ne=class ne extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("fieldset",{children:[a("label",{children:["Name:",t(y,{value:this.props.name,onChange:this.change("name")})]}),a("label",{children:["Value:",t(y,{value:this.props.value,onChange:this.change("value")})]})]})}};ne.propTypes={...c,name:n.string,value:n.string},ne.defaultProps={name:"",value:""};let fe=ne;const Te=class Te extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handlePairChange=(e,s)=>{const r=this.props.pairs.slice();r[e]=s;const i=r[r.length-1];i.name&&i.value&&r.push({name:"",value:""}),this.change("pairs",r)},this.serialize=()=>g.serialize.call(this)}render(){const e=l.map(this.props.pairs,(s,r)=>t(fe,{name:s.name,value:s.value,onChange:this.handlePairChange.bind(this,r)},r));return t("div",{children:e})}};Te.propTypes={...c,pairs:n.arrayOf(n.shape({name:n.string,value:n.string})).isRequired};let ye=Te;const q=class q extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleSettingsChange=e=>{this.change({settings:e.pairs})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[a("div",{style:{fontWeight:"bold",textAlign:"center"},children:["This widget is deprecated! ",t("br",{}),"Try using the Video or CS Program widgets instead."]}),a("label",{children:["Url or Program ID:",t(y,{value:this.props.url,onChange:this.change("url")})]}),t("br",{}),a("label",{children:["Settings:",t(ye,{name:"settings",pairs:this.props.settings,onChange:this.handleSettingsChange})]}),t("br",{}),a("label",{children:["Width:",t(y,{value:this.props.width,onChange:this.change("width")})]}),a("label",{children:["Height:",t(y,{value:this.props.height,onChange:this.change("height")})]}),t(w,{label:"Allow full screen",checked:this.props.allowFullScreen,onChange:e=>{this.props.onChange({allowFullScreen:e})}}),t("br",{}),t(w,{label:"Allow iframe content to redirect the page",checked:this.props.allowTopNavigation,onChange:e=>{this.props.onChange({allowTopNavigation:e})}})]})}};q.propTypes={...c},q.widgetName="iframe",q.defaultProps={url:"",settings:[{name:"",value:""}],width:"400",height:"400",allowFullScreen:!1,allowTopNavigation:!1};let K=q;K.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"IframeEditor",props:{url:{defaultValue:{value:'""',computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},width:{defaultValue:{value:'"400"',computed:!1},required:!1},height:{defaultValue:{value:'"400"',computed:!1},required:!1},allowFullScreen:{defaultValue:{value:"false",computed:!1},required:!1},allowTopNavigation:{defaultValue:{value:"false",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const{RangeInput:jt}=f,Gt=Xe.widget,Pe=6,Kt=function(o){const e=[1,1];return l(o).each((s,r)=>{let i=0;l(s).each((p,m)=>{p!=null&&p.toString().length&&(i=m+1)}),e[1]=Math.max(e[1],i),i>0&&(e[0]=Math.max(e[0],r+1))}),e},P=class P extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.onMatrixBoardSizeChange=e=>{const s=Kt(this.props.answers);if(e[0]!==null&&e[1]!==null){e=[Math.round(Math.min(Math.max(e[0],1),Pe)),Math.round(Math.min(Math.max(e[1],1),Pe))];const r=l(Math.min(e[0],s[0])).times(i=>l(Math.min(e[1],s[1])).times(p=>this.props.answers[i][p]));this.props.onChange({matrixBoardSize:e,answers:r})}},this.serialize=()=>g.serialize.call(this)}render(){const e=l.extend({numericInput:!0,onBlur:()=>{},onFocus:()=>{},trackInteraction:()=>{}},this.props);return a("div",{className:"perseus-matrix-editor",children:[a("div",{className:"perseus-widget-row",children:[" ","Max matrix size:"," ",t(jt,{value:this.props.matrixBoardSize,onChange:this.onMatrixBoardSizeChange,format:this.props.labelStyle,useArrowKeys:!0})]}),t("div",{className:"perseus-widget-row",children:t(Gt,{...e})}),a("div",{className:"perseus-widget-row",children:[" ","Matrix prefix:"," ",t(b,{ref:"prefix",apiOptions:this.props.apiOptions,content:this.props.prefix,widgetEnabled:!1,onChange:s=>{this.change({prefix:s.content})}})]}),a("div",{className:"perseus-widget-row",children:[" ","Matrix suffix:"," ",t(b,{ref:"suffix",apiOptions:this.props.apiOptions,content:this.props.suffix,widgetEnabled:!1,onChange:s=>{this.change({suffix:s.content})}})]})]})}};P.propTypes={...c,matrixBoardSize:n.arrayOf(n.number).isRequired,answers:n.arrayOf(n.arrayOf(n.number)),prefix:n.string,suffix:n.string,cursorPosition:n.arrayOf(n.number)},P.widgetName="matrix",P.defaultProps={matrixBoardSize:[3,3],answers:[[]],prefix:"",suffix:"",cursorPosition:[0,0]};let Y=P;Y.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMatrixBoardSizeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatrixEditor",props:{matrixBoardSize:{defaultValue:{value:"[3, 3]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},answers:{defaultValue:{value:"[[]]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"number"}}},required:!1},prefix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},suffix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},cursorPosition:{defaultValue:{value:"[0, 0]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Yt,NumberInput:E,RangeInput:Jt}=f,Xt={url:null,top:0,left:0},R=class R extends u.Component{constructor(){super(...arguments),this.className="perseus-widget-measurer",this.change=(...e)=>h.apply(this,e),this._changeUrl=e=>{this._changeImage("url",e.target.value)},this._changeTop=e=>{this._changeImage("top",e)},this._changeLeft=e=>{this._changeImage("left",e)},this._changeImage=(e,s)=>{const r=l.clone(this.props.image);r[e]=s,this.change("image",r)},this.renderLabelChoices=e=>l.map(e,function(s){const[r,i]=s;return t("option",{value:i,children:r},i)}),this.serialize=()=>g.serialize.call(this)}render(){const e=l.extend({},Xt,this.props.image);return a("div",{className:"perseus-widget-measurer",children:[t("div",{children:"Image displayed under protractor and/or ruler:"}),a("div",{children:["URL:"," ",t("input",{type:"text",className:"perseus-widget-measurer-url",ref:"image-url",defaultValue:e.url,onChange:this._changeUrl}),t(Yt,{children:t("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),e.url&&a("div",{className:"perseus-widget-row",children:[a("label",{className:"perseus-widget-left-col",children:["Pixels from top:"," ",t(E,{placeholder:0,onChange:this._changeTop,value:e.top,useArrowKeys:!0})]}),a("label",{className:"perseus-widget-right-col",children:["Pixels from left:"," ",t(E,{placeholder:0,onChange:this._changeLeft,value:e.left,useArrowKeys:!0})]})]}),a("div",{children:["Containing area [width, height]:"," ",t(Jt,{onChange:this.change("box"),value:this.props.box,useArrowKeys:!0})]}),a("div",{className:"perseus-widget-row",children:[t("div",{className:"perseus-widget-left-col",children:t(w,{label:"Show ruler",checked:this.props.showRuler,onChange:s=>{this.props.onChange({showRuler:s})}})}),t("div",{className:"perseus-widget-right-col",children:t(w,{label:"Show protractor",checked:this.props.showProtractor,onChange:s=>{this.props.onChange({showProtractor:s})}})})]}),this.props.showRuler&&a("div",{children:[t("div",{children:a("label",{children:[" ","Ruler label:"," ",a("select",{onChange:s=>this.change("rulerLabel",s.target.value),value:this.props.rulerLabel,children:[t("option",{value:"",children:"None"}),t("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),t("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),t("div",{children:a("label",{children:[" ","Ruler ticks:"," ",t("select",{onChange:s=>this.change("rulerTicks",+s.target.value),value:this.props.rulerTicks,children:l.map([1,2,4,8,10,16],function(s){return t("option",{value:s,children:s},s)})})]})}),t("div",{children:a("label",{children:["Ruler pixels per unit:"," ",t(E,{placeholder:40,onChange:this.change("rulerPixels"),value:this.props.rulerPixels,useArrowKeys:!0})]})}),t("div",{children:a("label",{children:["Ruler length in units:"," ",t(E,{placeholder:10,onChange:this.change("rulerLength"),value:this.props.rulerLength,useArrowKeys:!0})]})})]})]})}};R.widgetName="measurer",R.propTypes={...c,box:n.arrayOf(n.number),image:n.shape({url:n.string,top:n.number,left:n.number}),showProtractor:n.bool,showRuler:n.bool,rulerLabel:n.string,rulerTicks:n.number,rulerPixels:n.number,rulerLength:n.number},R.defaultProps={box:[480,480],image:{},showProtractor:!0,showRuler:!1,rulerLabel:"",rulerTicks:10,rulerPixels:40,rulerLength:10};let J=R;J.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_changeUrl",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_changeTop",docblock:null,modifiers:[],params:[{name:"newTop",optional:!1,type:null}],returns:null},{name:"_changeLeft",docblock:null,modifiers:[],params:[{name:"newLeft",optional:!1,type:null}],returns:null},{name:"_changeImage",docblock:null,modifiers:[],params:[{name:"subProp",optional:!1,type:null},{name:"newValue",optional:!1,type:null}],returns:null},{name:"renderLabelChoices",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MeasurerEditor",props:{box:{defaultValue:{value:"[480, 480]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},image:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{url:{name:"string",required:!1},top:{name:"number",required:!1},left:{name:"number",required:!1}}},required:!1},showProtractor:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},showRuler:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},rulerLabel:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},rulerTicks:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1},rulerPixels:{defaultValue:{value:"40",computed:!1},description:"",type:{name:"number"},required:!1},rulerLength:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1}},composes:["@khanacademy/perseus"]};const{NumberInput:Zt,TextInput:Qt}=f,ie=class ie extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.updateMolecule=e=>{this.change({smiles:e})},this.updateRotation=e=>{this.change({rotationAngle:e})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[t("div",{children:a("label",{children:["SMILES: ",t(Qt,{onChange:this.updateMolecule,value:this.props.smiles})]})}),t("div",{children:a("label",{children:["Rotation (deg): ",t(Zt,{onChange:this.updateRotation,value:this.props.rotationAngle})]})})]})}};ie.propTypes={...c,rotationAngle:n.number,smiles:n.string},ie.widgetName="molecule-renderer";let X=ie;X.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"updateMolecule",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"updateRotation",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MoleculeWidgetEditor",props:{rotationAngle:{description:"",type:{name:"number"},required:!1},smiles:{description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:M,TextListEditor:Re}=f,he="normal",ze="auto",ce="horizontal",Ae="vertical",z=class z extends u.Component{constructor(){super(...arguments),this.onOptionsChange=(e,s,r)=>{const i={};i[e]=l.map(s,function(p){return{content:p}}),this.props.onChange(i,r)},this.onLayoutChange=e=>{this.props.onChange({layout:e.target.value})},this.onHeightChange=e=>{this.props.onChange({height:e.target.value})},this.serialize=()=>({options:l.chain(l.pluck(this.props.correctOptions,"content")).union(l.pluck(this.props.otherOptions,"content")).uniq().reject(function(s){return s===""}).sort().sortBy(function(s){return/\d/.test(s)?0:/^\$?[a-zA-Z]+\$?$/.test(s)?2:1}).map(function(s){return{content:s}}).value(),correctOptions:this.props.correctOptions,otherOptions:this.props.otherOptions,height:this.props.height,layout:this.props.layout})}render(){return a("div",{className:"perseus-widget-orderer",children:[a("div",{children:[" ","Correct answer:"," ",t(M,{children:t("p",{children:"Place the cards in the correct order. The same card can be used more than once in the answer but will only be displayed once at the top of a stack of identical cards."})})]}),t(Re,{options:l.pluck(this.props.correctOptions,"content"),onChange:this.onOptionsChange.bind(this,"correctOptions"),layout:this.props.layout}),a("div",{children:[" ","Other cards:"," ",t(M,{children:t("p",{children:"Create cards that are not part of the answer."})})]}),t(Re,{options:l.pluck(this.props.otherOptions,"content"),onChange:this.onOptionsChange.bind(this,"otherOptions"),layout:this.props.layout}),a("div",{children:[a("label",{children:[" ","Layout:"," ",a("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[t("option",{value:ce,children:"Horizontal"}),t("option",{value:Ae,children:"Vertical"})]})]}),t(M,{children:t("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text (e.g. proofs)."})})]}),a("div",{children:[a("label",{children:[" ","Height:"," ",a("select",{value:this.props.height,onChange:this.onHeightChange,children:[t("option",{value:he,children:"Normal"}),t("option",{value:ze,children:"Automatic"})]})]}),t(M,{children:t("p",{children:'Use "Normal" for text, "Automatic" for images.'})})]})]})}};z.propTypes={correctOptions:n.array,otherOptions:n.array,height:n.oneOf([he,ze]),layout:n.oneOf([ce,Ae]),onChange:n.func.isRequired},z.widgetName="orderer",z.defaultProps={correctOptions:[{content:"$x$"}],otherOptions:[{content:"$y$"}],height:he,layout:ce};let Z=z;Z.__docgenInfo={description:"",methods:[{name:"onOptionsChange",docblock:null,modifiers:[],params:[{name:"whichOptions",optional:!1,type:null},{name:"options",optional:!1,type:null},{name:"cb",optional:!1,type:null}],returns:null},{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onHeightChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"OrdererEditor",props:{correctOptions:{defaultValue:{value:'[{content: "$x$"}]',computed:!1},description:"",type:{name:"array"},required:!1},otherOptions:{defaultValue:{value:'[{content: "$y$"}]',computed:!1},description:"",type:{name:"array"},required:!1},height:{defaultValue:{value:'"normal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"normal"',computed:!1},{value:'"auto"',computed:!1}]},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};const{InfoTip:Ve}=f,A=class A extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){const e=t(b,{ref:"passage-editor",apiOptions:this.props.apiOptions,content:this.props.passageText,widgetEnabled:!1,placeholder:"Type passage here...",onChange:r=>{this.change({passageText:r.content})},showWordCount:!0}),s=t(b,{ref:"passage-footnotes-editor",apiOptions:this.props.apiOptions,content:this.props.footnotes,widgetEnabled:!1,placeholder:"Type footnotes here...",onChange:r=>{this.change({footnotes:r.content})}});return a("div",{className:"perseus-widget-passage-editor",children:[t("div",{className:"perseus-widget-row",children:t(w,{label:"Show line numbers",checked:this.props.showLineNumbers,onChange:r=>{this.props.onChange({showLineNumbers:r})}})}),a("div",{children:["Passage title:",t(Ve,{children:t("p",{children:"An optional title that will appear directly above the passage in the same font style. (E.g. Passage 1)"})}),t("div",{children:t("input",{type:"text",defaultValue:this.props.passageTitle,onChange:r=>{this.change({passageTitle:r.target.value})}})})]}),a("div",{children:["Passage Text:",e]}),a("div",{children:["Footnotes:",t(Ve,{children:t("p",{children:"To add footnotes, add ^ characters where they belong in the passage. Then, add ^ in the footnotes area to reference the footnotes in the passage."})}),s]})]})}};A.propTypes={...c,passageTitle:n.string,passageText:n.string,footnotes:n.string,showLineNumbers:n.bool},A.widgetName="passage",A.defaultProps={passageTitle:"",passageText:"",footnotes:"",showLineNumbers:!0};let Q=A;Q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageEditor",props:{passageTitle:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},passageText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},footnotes:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},showLineNumbers:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:es,NumberInput:Le,TextInput:ts}=f,V=class V extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[t("div",{children:a("label",{children:["Passage Number: ",t(Le,{value:this.props.passageNumber,onChange:this.change("passageNumber")})]})}),t("div",{children:a("label",{children:["Reference Number: ",t(Le,{value:this.props.referenceNumber,onChange:this.change("referenceNumber")})]})}),t("div",{children:a("label",{children:["Summary Text: ",t(ts,{value:this.props.summaryText,onChange:this.change("summaryText")}),a(es,{children:[t("p",{children:"Short summary of the referenced section. This will be included in parentheses and quotes automatically."}),t("p",{children:"Ex: The start ... the end"})]})]})})]})}};V.propTypes={...c,passageNumber:n.number,referenceNumber:n.number,summaryText:n.string},V.widgetName="passage-ref",V.defaultProps={passageNumber:1,referenceNumber:1,summaryText:""};let ee=V;ee.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefEditor",props:{passageNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},referenceNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},summaryText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const L=class L extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleContentChange=e=>{this.change({content:e.target.value})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:["Content:",t("input",{type:"text",value:this.props.content,onChange:this.handleContentChange})]})}};L.propTypes={...c,content:n.string},L.widgetName="passage-ref-target",L.defaultProps={content:""};let te=L;te.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleContentChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefTargetEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:x,NumberInput:De,RangeInput:ss,TextListEditor:as}=f,rs=Ze.widget,be="starting",ve="correct",ns=[be,ve];function _e(o,e,s){const r=l.clone(o);r.length=e;for(let i=o.length;i"$"+at(o,2)+"$",le=class le extends u.Component{constructor(){super(...arguments),this.state={editing:this.props.static?be:ve,pic:null,loadedUrl:null,minX:null,maxX:null,tickStep:null},this.fetchPic=e=>{if(this.state.loadedUrl!==e){const s=new Image;s.src=e,s.onload=()=>{this.setState({pic:s,loadedUrl:e})}}},this.handleChangeTickStep=e=>{this.setState({tickStep:e})},this.handleChangeRange=e=>{this.setState({minX:e[0],maxX:e[1]})},this.changeLabelInterval=e=>{this.props.onChange({labelInterval:e})},this.handlePlotterChange=e=>{const s={};s[this.state.editing]=e.values,this.props.onChange(s)},this.changeType=e=>{let s;if(e==="histogram"?(s=[Ue(0)].concat(this.props.categories),this.props.onChange({type:e,categories:s})):this.props.type==="histogram"?(s=this.props.categories.slice(1),this.props.onChange({type:e,categories:s})):this.props.onChange({type:e}),s){const r=oe.findDOMNode(this.refs.categories);r.value=s.join(", ")}},this.changeLabel=(e,s)=>{const r=l.clone(this.props.labels);r[e]=s.target.value,this.props.onChange({labels:r})},this.changePicUrl=e=>{const s=de.getRealImageUrl(e);this.props.onChange({picUrl:s})},this.changeCategories=e=>{let s=e.length;this.props.type==="histogram"&&s--;const r=this.props.scaleY;this.props.onChange({categories:e,correct:_e(this.props.correct,s,r),starting:_e(this.props.starting,s,r)})},this.changeScale=e=>{const s=this.props.scaleY,r=+e.target.value||$.scaleY,i=function(m){return m*r/s},p=i(this.props.maxY);this.props.onChange({scaleY:r,maxY:p,correct:l.map(this.props.correct,i),starting:l.map(this.props.starting,i)}),oe.findDOMNode(this.refs.maxY).value=p},this.changeMax=e=>{this.props.onChange({maxY:+e.target.value||$.maxY})},this.changeSnaps=e=>{this.props.onChange({snapsPerLine:+e.target.value||$.snapsPerLine})},this.changeEditing=e=>{this.setState({editing:e})},this.setCategoriesFromScale=()=>{const e=this.state.tickStep||1,s=this.state.minX||0,r=this.state.maxX||0,i=Math.floor((r-s)/e)*e;let p;this.props.type==="histogram"||this.props.type==="dotplot"?p=l.range(0,i+e,e):p=l.range(e,i+e,e),p=l.map(p,d=>d+s),p=l.map(p,Ue),this.changeCategories(p);const m=oe.findDOMNode(this.refs.categories);m.value=p.join(", ")},this.serialize=()=>{const e=l.pick(this.props,"correct","starting","type","labels","categories","scaleY","maxY","snapsPerLine","labelInterval");return this.props.type==="pic"&&(e.picUrl=this.props.picUrl),e}}UNSAFE_componentWillMount(){this.fetchPic(this.props.picUrl)}UNSAFE_componentWillReceiveProps(e){this.fetchPic(e.picUrl),e.static&&this.setState({editing:"starting"})}render(){const e=l.contains(["line","histogram","dotplot"],this.props.type),s=!l.contains(["pic","dotplot"],this.props.type),r={trackInteraction:()=>{},...this.props};return a("div",{className:"perseus-widget-plotter-editor",children:[a("div",{children:["Chart type:"," ",Qe.map(i=>a("label",{children:[t("input",{type:"radio",name:"chart-type",checked:this.props.type===i,onChange:l.partial(this.changeType,i)}),i]},i),this)]}),a("div",{children:["Labels:"," ",["x","y"].map((i,p)=>a("label",{children:[i+":",t("input",{type:"text",onChange:l.partial(this.changeLabel,p),defaultValue:this.props.labels[p]})]},i),this)]}),e&&a("div",{className:"set-from-scale-box",children:[t("span",{className:"categories-title",children:"Set Categories From Scale"}),a("div",{children:[a("label",{children:["Tick Step:"," ",t(De,{placeholder:1,useArrowKeys:!0,value:this.state.tickStep,onChange:this.handleChangeTickStep})]}),t(x,{children:t("p",{children:"The difference between adjacent ticks."})})]}),t("div",{children:a("label",{children:["Range:"," ",t(ss,{placeholder:[0,10],useArrowKeys:!0,value:[this.state.minX,this.state.maxX],onChange:this.handleChangeRange})]})}),t("div",{children:a("button",{onClick:this.setCategoriesFromScale,children:["Set Categories"," "]})})]}),a("div",{children:[a("label",{children:["Label Interval:"," ",t(De,{useArrowKeys:!0,value:this.props.labelInterval,onChange:this.changeLabelInterval})]}),t(x,{children:t("p",{children:'Which ticks to display the labels for. For instance, setting this to "4" will only show every 4th label (plus the last one)'})})]}),this.props.type==="pic"&&a("div",{children:[a("label",{children:["Picture:"," ",t(y,{className:"pic-url",value:this.props.picUrl,onChange:this.changePicUrl}),t(x,{children:t("p",{children:'Use the default picture of Earth, or insert the URL for a different picture using the "Add image" function.'})})]}),this.state.pic&&this.state.pic.width!==this.state.pic.height&&a("p",{className:"warning",children:[t("b",{children:"Warning"}),": You are using a picture which is not square. This means the image will get distorted. You should probably crop it to be square."]})]}),t("div",{children:a("label",{children:["Categories:"," ",t(as,{ref:"categories",layout:"horizontal",options:this.props.categories,onChange:this.changeCategories})]})}),t("div",{children:a("label",{children:["Scale (y):"," ",t("input",{type:"text",onChange:this.changeScale,defaultValue:this.props.scaleY})]})}),t("div",{children:a("label",{children:["Max y:"," ",t("input",{type:"text",ref:"maxY",onChange:this.changeMax,defaultValue:this.props.maxY})]})}),s&&a("div",{children:[a("label",{children:["Snaps per line:"," ",t("input",{type:"text",onChange:this.changeSnaps,defaultValue:this.props.snapsPerLine})]}),t(x,{children:t("p",{children:"Creates the specified number of divisions between the horizontal lines. Fewer snaps between lines makes the graph easier for the student to create correctly."})})]}),a("div",{children:["Editing values:"," ",ns.map(i=>a("label",{children:[t("input",{type:"radio",disabled:i===ve&&this.props.static,checked:this.props.static?i===be:this.state.editing===i,onChange:p=>this.changeEditing(i)}),i]},i)),a(x,{children:[t("p",{children:"Use this toggle to switch between editing the correct answer (what the student will be graded on) and the starting values (what the student will see plotted when they start the problem). Note: These cannot be the same."}),t("p",{children:"In static mode, the starting values are rendered out to the displayed widget."})]})]}),t(rs,{...r,starting:this.props[this.state.editing],onChange:this.handlePlotterChange})]})}};le.widgetName="plotter",le.defaultProps={...$,correct:[1],starting:[1],type:"bar",labels:["",""],categories:[""],picSize:30,picBoxHeight:36,plotDimensions:[275,200],labelInterval:1,get picUrl(){const e=$e().staticUrl;return e?e("/images/badges/earth-small.png"):null}};let se=le;se.__docgenInfo={description:"",methods:[{name:"fetchPic",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"handleChangeTickStep",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handleChangeRange",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"changeLabelInterval",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handlePlotterChange",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"changeType",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null}],returns:null},{name:"changeLabel",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"changePicUrl",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"changeCategories",docblock:null,modifiers:[],params:[{name:"categories",optional:!1,type:null}],returns:null},{name:"changeScale",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeMax",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeSnaps",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeEditing",docblock:null,modifiers:[],params:[{name:"editing",optional:!1,type:null}],returns:null},{name:"setCategoriesFromScale",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PlotterEditor",props:{type:{required:!1,tsType:{name:'PerseusPlotterWidgetOptions["type"]',raw:'PerseusPlotterWidgetOptions["type"]'},description:"",defaultValue:{value:'"bar"',computed:!1}},labels:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"Array"},description:"",defaultValue:{value:'["", ""]',computed:!1}},categories:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'[""]',computed:!1}},scaleY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},maxY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"10",computed:!1}},snapsPerLine:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}},picSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"30",computed:!1}},picBoxHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"36",computed:!1}},picUrl:{required:!0,tsType:{name:"string"},description:""},plotDimensions:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[275, 200]",computed:!1}},labelInterval:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},starting:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},correct:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},static:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""}}};const{InfoTip:is,NumberInput:Ee}=f,ls=et.widget,D=class D extends u.Component{constructor(){super(...arguments),this.numberOfColumns=u.createRef(),this.focus=()=>{var e;(e=this.numberOfColumns.current)==null||e.focus()},this.onSizeInput=(e,s)=>{let r=+e||0,i=+s||0;r=Math.min(Math.max(1,r),30),i=Math.min(Math.max(1,i),6);const p=this.props.columns,m=this.props.rows,d=this.props.answers;r<=m?d.length=r:l(r-m).times(function(){d.push(de.stringArrayOfSize(p))});function v(ke){i<=p?ke.length=i:l(i-p).times(function(){ke.push("")})}const xe=this.props.headers;v(xe),l.each(d,v),this.props.onChange({rows:r,columns:i,answers:d,headers:xe})},this.serialize=()=>{const e=l.pick(this.props,"headers","rows","columns");return l.extend({},e,{answers:l.map(this.props.answers,l.clone)})}}render(){return a("div",{children:[t("div",{className:"perseus-widget-row",children:a("label",{children:["Number of columns:"," ",t(Ee,{ref:this.numberOfColumns,value:this.props.columns,onChange:e=>{e&&this.onSizeInput(this.props.rows,e)},useArrowKeys:!0})]})}),t("div",{className:"perseus-widget-row",children:a("label",{children:["Number of rows:"," ",t(Ee,{ref:"numberOfRows",value:this.props.rows,onChange:e=>{e&&this.onSizeInput(e,this.props.columns)},useArrowKeys:!0})]})}),a("div",{children:[" ","Table of answers:"," ",t(is,{children:t("p",{children:"The student has to fill out all cells in the table. For partially filled tables create a table using the template, and insert text input boxes as desired."})})]}),t("div",{children:t(ls,{headers:this.props.headers,answers:this.props.answers,onChange:this.props.onChange,apiOptions:this.props.apiOptions,editableHeaders:!0,onFocus:()=>{},onBlur:()=>{},trackInteraction:()=>{},Editor:b})})]})}};D.propTypes={rows:n.number,columns:n.number,headers:n.arrayOf(n.string),answers:n.arrayOf(n.arrayOf(n.string))},D.widgetName="table",D.defaultProps=function(){const r=l(4).times(function(){return de.stringArrayOfSize(1)});return{headers:[""],rows:4,columns:1,answers:r}}();let ae=D;ae.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"onSizeInput",docblock:null,modifiers:[],params:[{name:"numRawRows",optional:!1,type:null},{name:"numRawColumns",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"TableEditor",props:{rows:{description:"",type:{name:"number"},required:!1},columns:{description:"",type:{name:"number"},required:!1},headers:{description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},answers:{description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"string"}}},required:!1}}};const{InfoTip:os}=f,ps=/khanacademy\.org\/.*\/v\/(.*)$/;function us(o){const e=ps.exec(o);return e?e[1]:o}const _=class _ extends u.Component{constructor(){super(...arguments),this._handleUrlChange=e=>{this.props.onChange({location:us(e)})},this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return t("div",{children:a("label",{children:["KA Video Slug:"," ",t(y,{value:this.props.location,style:{width:290},onChange:this._handleUrlChange}),t(os,{children:"KA video URLs will be converted to just the slug."})]})})}};_.propTypes={...c,location:n.string,onChange:n.func},_.widgetName="video",_.defaultProps={location:""};let re=_;re.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"_handleUrlChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"VideoEditor",props:{location:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},onChange:{description:"",type:{name:"func"},required:!1}},composes:["@khanacademy/perseus"]};const hs=[ut,F,ht,ct,dt,mt,C,H,j,G,K,bt,vt,wt,Ct,Tt,xt,Y,J,X,kt,Nt,Z,Q,ee,te,St,se,It,qt,ae,re,Ot,B],ya=()=>{it(tt),lt(hs),ot(),pt()};export{hs as A,Rt as I,fa as J,ya as r}; diff --git a/assets/register-all-widgets-for-testing-I8cwOiut.js b/assets/register-all-widgets-for-testing-I8cwOiut.js deleted file mode 100644 index b7f31e63d8..0000000000 --- a/assets/register-all-widgets-for-testing-I8cwOiut.js +++ /dev/null @@ -1 +0,0 @@ -import{w as e}from"./article-renderer-GCz9idJ2.js";import{r,a as s}from"./renderer-VfFjn7ah.js";const a=()=>{r(e),s()};export{a as r}; diff --git a/assets/register-all-widgets-for-testing-xxgCysIB.js b/assets/register-all-widgets-for-testing-xxgCysIB.js new file mode 100644 index 0000000000..1cb391cb3f --- /dev/null +++ b/assets/register-all-widgets-for-testing-xxgCysIB.js @@ -0,0 +1 @@ +import{w as e}from"./article-renderer-ub6lGcPc.js";import{r,a as s}from"./renderer-JG1Z7r2S.js";const a=()=>{r(e),s()};export{a as r}; diff --git a/assets/renderer-VfFjn7ah.js b/assets/renderer-JG1Z7r2S.js similarity index 99% rename from assets/renderer-VfFjn7ah.js rename to assets/renderer-JG1Z7r2S.js index 46f91e43db..a5bf2155af 100644 --- a/assets/renderer-VfFjn7ah.js +++ b/assets/renderer-JG1Z7r2S.js @@ -1,4 +1,4 @@ -import{j as h,a as me}from"./jsx-runtime-FVsy8kgq.js";import{a as We}from"./version-akiLXZts.js";import{P as E,E as A,U as J}from"./util-F8-MDmsT.js";import{g as lr}from"./_commonjsHelpers-4gQjN7DL.js";import{e as ur,i as dr}from"./invariant-bu5zBsRS.js";import{e as yr}from"./index-J2t_5nK1.js";import{c as ke}from"./index-dnMhQZ-1.js";import{_ as y,d as mr,$ as gr}from"./jquery-yG1GhClm.js";import{r as N}from"./index-TT1qJ6UJ.js";import{R as qe}from"./index-7vsPyIck.js";import{c as ce}from"./asset-context-I7yIqWki.js";import{P as hr}from"./i18n-context-P5sgPFep.js";import{L as G,S as pr,o as cr}from"./svg-image-vbtSDKh6.js";import{T as Le}from"./tex-VP4hirbI.js";import{Z as br}from"./zoomable-CA1NzpZD.js";import{Z as vr}from"./zoomable-tex-MZi7Hqbp.js";import{g as Y,D as wr}from"./dependencies-8XILypbq.js";import{A as fr,C as be}from"./perseus-api-Nq3s7IMx.js";import{L as kr}from"./lint-kpBgzQ8K.js";import{f as qr,t as Tr,u as Rr,z as Ar}from"./constants-iPV6vHZm.js";class K{static parse(r){return new ge(r).parse()}match(r){throw new E("Selector subclasses must implement match()",A.NotAllowed)}toString(){return"Unknown selector class"}}class ge{constructor(r){r=r.trim().replace(/\s+/g," "),this.tokens=r.match(ge.TOKENS)||[],this.tokenIndex=0}nextToken(){return this.tokens[this.tokenIndex]||""}consume(){this.tokenIndex++}isIdentifier(){const r=this.tokens[this.tokenIndex][0];return r>="a"&&r<="z"||r>="A"&&r<="Z"}skipSpace(){for(;this.nextToken()===" ";)this.consume()}parse(){const r=this.parseTreeSelector();let e=this.nextToken();if(!e)return r;const n=[r];for(;e;){if(e===",")this.consume();else throw new ve("Expected comma");n.push(this.parseTreeSelector()),e=this.nextToken()}return new Or(n)}parseTreeSelector(){this.skipSpace();let r=this.parseNodeSelector();for(;;){const e=this.nextToken();if(!e||e===",")break;if(e===" ")this.consume(),r=new Wr(r,this.parseNodeSelector());else if(e===">")this.consume(),r=new Cr(r,this.parseNodeSelector());else if(e==="+")this.consume(),r=new Ir(r,this.parseNodeSelector());else if(e==="~")this.consume(),r=new Er(r,this.parseNodeSelector());else throw new ve("Unexpected token: "+e)}return r}parseNodeSelector(){this.skipSpace();const r=this.nextToken();if(r==="*")return this.consume(),new xr;if(this.isIdentifier())return this.consume(),new jr(r);throw new ve("Expected node type")}}ge.TOKENS=/([a-zA-Z][\w-]*)|(\d+)|[^\s]|(\s(?=[a-zA-Z\*]))/g;class ve extends Error{constructor(r){super(r)}}class Or extends K{constructor(r){super(),this.selectors=r}match(r){for(let e=0;e0?", ":"",r+=this.selectors[e].toString();return r}}class xr extends K{match(r){return[r.currentNode()]}toString(){return"*"}}class jr extends K{constructor(r){super(),this.type=r}match(r){const e=r.currentNode();return e.type===this.type?[e]:null}toString(){return this.type}}class he extends K{constructor(r,e){super(),this.left=r,this.right=e}}class Wr extends he{constructor(r,e){super(r,e)}match(r){const e=this.right.match(r);if(e)for(r=r.clone();r.hasParent();){r.goToParent();const n=this.left.match(r);if(n)return n.concat(e)}return null}toString(){return this.left.toString()+" "+this.right.toString()}}class Cr extends he{constructor(r,e){super(r,e)}match(r){const e=this.right.match(r);if(e&&r.hasParent()){r=r.clone(),r.goToParent();const n=this.left.match(r);if(n)return n.concat(e)}return null}toString(){return this.left.toString()+" > "+this.right.toString()}}class Ir extends he{constructor(r,e){super(r,e)}match(r){const e=this.right.match(r);if(e&&r.hasPreviousSibling()){r=r.clone(),r.goToPreviousSibling();const n=this.left.match(r);if(n)return n.concat(e)}return null}toString(){return this.left.toString()+" + "+this.right.toString()}}class Er extends he{constructor(r,e){super(r,e)}match(r){const e=this.right.match(r);if(e)for(r=r.clone();r.hasPreviousSibling();){r.goToPreviousSibling();const n=this.left.match(r);if(n)return n.concat(e)}return null}toString(){return this.left.toString()+" ~ "+this.right.toString()}}const _=class _{constructor(r,e,n,a,i,s){if(!n&&!a)throw new E("Lint rules must have a selector or pattern",A.InvalidInput,{metadata:{name:r}});this.name=r||"unnamed rule",this.severity=e||_.Severity.BULK_WARNING,this.selector=n||_.DEFAULT_SELECTOR,this.pattern=a||null,typeof i=="function"?(this.lint=i,this.message=null):(this.lint=(...o)=>this._defaultLintFunction(...o),this.message=i),this.applies=s||function(){return!0}}static makeRule(r){return new _(r.name,r.severity,r.selector?K.parse(r.selector):null,_.makePattern(r.pattern),r.lint||r.message,r.applies)}check(r,e,n,a){const i=this.selector.match(e);if(!i)return null;let s;if(this.pattern?s=n.match(this.pattern):s=_.FakePatternMatch(n,n,0),!s)return null;try{const o=this.lint(e,n,i,s,a);return o?typeof o=="string"?{rule:this.name,severity:this.severity,message:o,start:0,end:n.length}:{rule:this.name,severity:this.severity,message:o.message,start:o.start,end:o.end}:null}catch(o){return{rule:"lint-rule-failure",message:`Exception in rule ${this.name}: ${o.message} +import{j as h,a as me}from"./jsx-runtime-FVsy8kgq.js";import{a as We}from"./version-akiLXZts.js";import{P as E,E as A,U as J}from"./util-F8-MDmsT.js";import{g as lr}from"./_commonjsHelpers-4gQjN7DL.js";import{e as ur,i as dr}from"./invariant-bu5zBsRS.js";import{e as yr}from"./index-J2t_5nK1.js";import{c as ke}from"./index-dnMhQZ-1.js";import{_ as y,d as mr,$ as gr}from"./jquery-yG1GhClm.js";import{r as N}from"./index-TT1qJ6UJ.js";import{R as qe}from"./index-7vsPyIck.js";import{c as ce}from"./asset-context-I7yIqWki.js";import{P as hr}from"./i18n-context-P5sgPFep.js";import{L as G,S as pr,o as cr}from"./svg-image-4Vh9uTQ6.js";import{T as Le}from"./tex-6yhnhbtf.js";import{Z as br}from"./zoomable-CA1NzpZD.js";import{Z as vr}from"./zoomable-tex-hbM7rxrP.js";import{g as Y,D as wr}from"./dependencies-d8cZibFS.js";import{A as fr,C as be}from"./perseus-api-Nq3s7IMx.js";import{L as kr}from"./lint-kpBgzQ8K.js";import{f as qr,t as Tr,u as Rr,z as Ar}from"./constants-iPV6vHZm.js";class K{static parse(r){return new ge(r).parse()}match(r){throw new E("Selector subclasses must implement match()",A.NotAllowed)}toString(){return"Unknown selector class"}}class ge{constructor(r){r=r.trim().replace(/\s+/g," "),this.tokens=r.match(ge.TOKENS)||[],this.tokenIndex=0}nextToken(){return this.tokens[this.tokenIndex]||""}consume(){this.tokenIndex++}isIdentifier(){const r=this.tokens[this.tokenIndex][0];return r>="a"&&r<="z"||r>="A"&&r<="Z"}skipSpace(){for(;this.nextToken()===" ";)this.consume()}parse(){const r=this.parseTreeSelector();let e=this.nextToken();if(!e)return r;const n=[r];for(;e;){if(e===",")this.consume();else throw new ve("Expected comma");n.push(this.parseTreeSelector()),e=this.nextToken()}return new Or(n)}parseTreeSelector(){this.skipSpace();let r=this.parseNodeSelector();for(;;){const e=this.nextToken();if(!e||e===",")break;if(e===" ")this.consume(),r=new Wr(r,this.parseNodeSelector());else if(e===">")this.consume(),r=new Cr(r,this.parseNodeSelector());else if(e==="+")this.consume(),r=new Ir(r,this.parseNodeSelector());else if(e==="~")this.consume(),r=new Er(r,this.parseNodeSelector());else throw new ve("Unexpected token: "+e)}return r}parseNodeSelector(){this.skipSpace();const r=this.nextToken();if(r==="*")return this.consume(),new xr;if(this.isIdentifier())return this.consume(),new jr(r);throw new ve("Expected node type")}}ge.TOKENS=/([a-zA-Z][\w-]*)|(\d+)|[^\s]|(\s(?=[a-zA-Z\*]))/g;class ve extends Error{constructor(r){super(r)}}class Or extends K{constructor(r){super(),this.selectors=r}match(r){for(let e=0;e0?", ":"",r+=this.selectors[e].toString();return r}}class xr extends K{match(r){return[r.currentNode()]}toString(){return"*"}}class jr extends K{constructor(r){super(),this.type=r}match(r){const e=r.currentNode();return e.type===this.type?[e]:null}toString(){return this.type}}class he extends K{constructor(r,e){super(),this.left=r,this.right=e}}class Wr extends he{constructor(r,e){super(r,e)}match(r){const e=this.right.match(r);if(e)for(r=r.clone();r.hasParent();){r.goToParent();const n=this.left.match(r);if(n)return n.concat(e)}return null}toString(){return this.left.toString()+" "+this.right.toString()}}class Cr extends he{constructor(r,e){super(r,e)}match(r){const e=this.right.match(r);if(e&&r.hasParent()){r=r.clone(),r.goToParent();const n=this.left.match(r);if(n)return n.concat(e)}return null}toString(){return this.left.toString()+" > "+this.right.toString()}}class Ir extends he{constructor(r,e){super(r,e)}match(r){const e=this.right.match(r);if(e&&r.hasPreviousSibling()){r=r.clone(),r.goToPreviousSibling();const n=this.left.match(r);if(n)return n.concat(e)}return null}toString(){return this.left.toString()+" + "+this.right.toString()}}class Er extends he{constructor(r,e){super(r,e)}match(r){const e=this.right.match(r);if(e)for(r=r.clone();r.hasPreviousSibling();){r.goToPreviousSibling();const n=this.left.match(r);if(n)return n.concat(e)}return null}toString(){return this.left.toString()+" ~ "+this.right.toString()}}const _=class _{constructor(r,e,n,a,i,s){if(!n&&!a)throw new E("Lint rules must have a selector or pattern",A.InvalidInput,{metadata:{name:r}});this.name=r||"unnamed rule",this.severity=e||_.Severity.BULK_WARNING,this.selector=n||_.DEFAULT_SELECTOR,this.pattern=a||null,typeof i=="function"?(this.lint=i,this.message=null):(this.lint=(...o)=>this._defaultLintFunction(...o),this.message=i),this.applies=s||function(){return!0}}static makeRule(r){return new _(r.name,r.severity,r.selector?K.parse(r.selector):null,_.makePattern(r.pattern),r.lint||r.message,r.applies)}check(r,e,n,a){const i=this.selector.match(e);if(!i)return null;let s;if(this.pattern?s=n.match(this.pattern):s=_.FakePatternMatch(n,n,0),!s)return null;try{const o=this.lint(e,n,i,s,a);return o?typeof o=="string"?{rule:this.name,severity:this.severity,message:o,start:0,end:n.length}:{rule:this.name,severity:this.severity,message:o.message,start:o.start,end:o.end}:null}catch(o){return{rule:"lint-rule-failure",message:`Exception in rule ${this.name}: ${o.message} Stack trace: ${o.stack}`,start:0,end:n.length}}}_defaultLintFunction(r,e,n,a,i){return{message:this.message||"",start:a.index,end:a.index+a[0].length}}static makePattern(r){if(!r)return null;if(r instanceof RegExp)return r;if(r[0]==="/"){const e=r.lastIndexOf("/"),n=r.substring(1,e),a=r.substring(e+1);return new RegExp(n,a)}return new RegExp(r)}static FakePatternMatch(r,e,n){const a=[e];return a.index=n,a.input=r,a}};_.Severity={ERROR:1,WARNING:2,GUIDELINE:3,BULK_WARNING:4};let m=_;m.DEFAULT_SELECTOR=K.parse("text");const zr=/\/\/([^\/]+)/;function Nr(t){if(!t)return"";const r=t.match(zr);return r?r[1]:""}const Lr=m.makeRule({name:"absolute-url",severity:m.Severity.GUIDELINE,selector:"link, image",lint:function(t,r,e,n){const a=e[0].target,i=Nr(a);if(i==="khanacademy.org"||i.endsWith(".khanacademy.org"))return`Don't use absolute URLs: When linking to KA content or images, omit the diff --git a/assets/renderer-with-debug-ui-Ty_P7koE.js b/assets/renderer-with-debug-ui-DcZbZSiB.js similarity index 99% rename from assets/renderer-with-debug-ui-Ty_P7koE.js rename to assets/renderer-with-debug-ui-DcZbZSiB.js index 695f667ae9..7590cf0a98 100644 --- a/assets/renderer-with-debug-ui-Ty_P7koE.js +++ b/assets/renderer-with-debug-ui-DcZbZSiB.js @@ -1,4 +1,4 @@ -import{j as e,a,F as v}from"./jsx-runtime-FVsy8kgq.js";import{B as u}from"./choice-I73s7vIV.js";import{V as r}from"./index-6h5t6F0w.js";import{P as w}from"./index-xuPsLuPk.js";import{S as f}from"./index-qUyqkRvh.js";import{S as k}from"./article-renderer-GCz9idJ2.js";import{H as d}from"./index-h_CiYGGb.js";import{r as o}from"./index-TT1qJ6UJ.js";import{S as q,R as y}from"./side-by-side-kGWaKY6T.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import{R as T}from"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import{u as R}from"./i18n-context-P5sgPFep.js";import{r as A}from"./register-all-widgets-for-testing-I8cwOiut.js";import"./index-IIMKO4_x.js";const O=""+new URL("device-mobile-o16X2EYh.svg",import.meta.url).href,j=({question:t,apiOptions:m,reviewMode:g=!1,...h})=>{A();const n=o.useRef(null),[i,p]=o.useState(null),[s,c]=o.useState(!1),{strings:b}=R();return e(q,{leftTitle:a(r,{style:{flexDirection:"row",alignItems:"center",width:"100%"},children:["Widget",e(r,{style:{marginLeft:"auto"},children:e(k,{icon:e(w,{icon:O}),checked:s,onChange:c})})]}),left:a(r,{children:[e(r,{className:s?"perseus-mobile":"",children:e(T,{ref:n,content:t.content,images:t.images,widgets:t.widgets,problemNum:0,apiOptions:{...m,isMobile:s},reviewMode:g,strings:b,...h})}),a(r,{style:{flexDirection:"row",alignItems:"center"},children:[e(u,{onClick:()=>{n.current&&p(n.current.guessAndScore())},children:"Check"}),e(f,{size:8}),e(u,{onClick:()=>{var l;(l=n.current)==null||l.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),i!=null&&a(v,{children:[e(d,{style:{marginTop:"10px"},children:"Guess"}),e(y,{quotesOnKeys:!1,enableClipboard:!1,src:i[0]}),e(d,{style:{marginTop:"10px"},children:"Score"}),e(y,{quotesOnKeys:!1,enableClipboard:!1,src:i[1]})]})]}),jsonObject:t})};j.__docgenInfo={description:"",methods:[],displayName:"RendererWithDebugUI",props:{question:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as e,a,F as v}from"./jsx-runtime-FVsy8kgq.js";import{B as u}from"./choice-I73s7vIV.js";import{V as r}from"./index-6h5t6F0w.js";import{P as w}from"./index-xuPsLuPk.js";import{S as f}from"./index-qUyqkRvh.js";import{S as k}from"./article-renderer-ub6lGcPc.js";import{H as d}from"./index-h_CiYGGb.js";import{r as o}from"./index-TT1qJ6UJ.js";import{S as q,R as y}from"./side-by-side-kGWaKY6T.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import{R as T}from"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import{u as R}from"./i18n-context-P5sgPFep.js";import{r as A}from"./register-all-widgets-for-testing-xxgCysIB.js";import"./index-IIMKO4_x.js";const O=""+new URL("device-mobile-o16X2EYh.svg",import.meta.url).href,j=({question:t,apiOptions:m,reviewMode:g=!1,...h})=>{A();const n=o.useRef(null),[i,p]=o.useState(null),[s,c]=o.useState(!1),{strings:b}=R();return e(q,{leftTitle:a(r,{style:{flexDirection:"row",alignItems:"center",width:"100%"},children:["Widget",e(r,{style:{marginLeft:"auto"},children:e(k,{icon:e(w,{icon:O}),checked:s,onChange:c})})]}),left:a(r,{children:[e(r,{className:s?"perseus-mobile":"",children:e(T,{ref:n,content:t.content,images:t.images,widgets:t.widgets,problemNum:0,apiOptions:{...m,isMobile:s},reviewMode:g,strings:b,...h})}),a(r,{style:{flexDirection:"row",alignItems:"center"},children:[e(u,{onClick:()=>{n.current&&p(n.current.guessAndScore())},children:"Check"}),e(f,{size:8}),e(u,{onClick:()=>{var l;(l=n.current)==null||l.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),i!=null&&a(v,{children:[e(d,{style:{marginTop:"10px"},children:"Guess"}),e(y,{quotesOnKeys:!1,enableClipboard:!1,src:i[0]}),e(d,{style:{marginTop:"10px"},children:"Score"}),e(y,{quotesOnKeys:!1,enableClipboard:!1,src:i[1]})]})]}),jsonObject:t})};j.__docgenInfo={description:"",methods:[],displayName:"RendererWithDebugUI",props:{question:{required:!0,tsType:{name:"signature",type:"object",raw:`{ // Translatable Markdown content to be rendered. May include references to // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). // For each image found in this content, there can be an entry in the diff --git a/assets/section-control-button-GM2LQRww.js b/assets/section-control-button-SLh88dRF.js similarity index 68% rename from assets/section-control-button-GM2LQRww.js rename to assets/section-control-button-SLh88dRF.js index 92fd048bae..bb02a01cc2 100644 --- a/assets/section-control-button-GM2LQRww.js +++ b/assets/section-control-button-SLh88dRF.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as i}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{C as p}from"./index-tFzzSRL2.js";import{c as s}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";const{InlineIcon:l}=i;class c extends a.Component{render(){const{icon:r,onClick:e,title:n}=this.props;return o(p,{className:"section-control-button simple-button simple-button--small ",onClick:t=>{t.preventDefault(),e()},role:"button",hideDefaultFocusRing:!0,"aria-label":n,style:u.button,children:({hovered:t,focused:f,pressed:g})=>o(l,{...r})})}}const u=m.StyleSheet.create({button:{backgroundColor:s.gold,margin:2,paddingRight:10,paddingLeft:10,paddingBottom:2}});c.__docgenInfo={description:"",methods:[],displayName:"SectionControlButton",props:{icon:{required:!0,tsType:{name:"PropsFor",elements:[{name:"InlineIcon"}],raw:"PropsFor"},description:""},onClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},title:{required:!0,tsType:{name:"string"},description:""}}};export{c as S}; +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as i}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{C as p}from"./index-tFzzSRL2.js";import{c as s}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";const{InlineIcon:l}=i;class c extends a.Component{render(){const{icon:r,onClick:e,title:n}=this.props;return o(p,{className:"section-control-button simple-button simple-button--small ",onClick:t=>{t.preventDefault(),e()},role:"button",hideDefaultFocusRing:!0,"aria-label":n,style:u.button,children:({hovered:t,focused:f,pressed:g})=>o(l,{...r})})}}const u=m.StyleSheet.create({button:{backgroundColor:s.gold,margin:2,paddingRight:10,paddingLeft:10,paddingBottom:2}});c.__docgenInfo={description:"",methods:[],displayName:"SectionControlButton",props:{icon:{required:!0,tsType:{name:"PropsFor",elements:[{name:"InlineIcon"}],raw:"PropsFor"},description:""},onClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},title:{required:!0,tsType:{name:"string"},description:""}}};export{c as S}; diff --git a/assets/section-control-button.stories-Tfc2d6_3.js b/assets/section-control-button.stories-t-0HHySj.js similarity index 65% rename from assets/section-control-button.stories-Tfc2d6_3.js rename to assets/section-control-button.stories-t-0HHySj.js index f2253da2c9..ee298dde85 100644 --- a/assets/section-control-button.stories-Tfc2d6_3.js +++ b/assets/section-control-button.stories-t-0HHySj.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{i as p}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{S as e}from"./section-control-button-GM2LQRww.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-6SWUlni2.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-Ts3i1VPI.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-0_QL8uoF.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./components-V6aclUoQ.js";import"./index-tFzzSRL2.js";const Xt={title:"PerseusEditor/Components/Section Control Button"},t=n=>m(e,{icon:p,onClick:()=>{},title:"Remove image widget"});t.__docgenInfo={description:"",methods:[],displayName:"ButtonForEditingSectionsOfContentWithInArticleEditor"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import{i as p}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{S as e}from"./section-control-button-SLh88dRF.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-VNdK7gMK.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./video-transcript-link-MKIRfGVo.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-74YQ4o9G.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./choice-none-above-lqQAegUH.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./components-yT7oveOH.js";import"./index-tFzzSRL2.js";const Xt={title:"PerseusEditor/Components/Section Control Button"},t=n=>m(e,{icon:p,onClick:()=>{},title:"Remove image widget"});t.__docgenInfo={description:"",methods:[],displayName:"ButtonForEditingSectionsOfContentWithInArticleEditor"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return {}} title="Remove image widget" />; }`,...(i=(r=t.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const Yt=["ButtonForEditingSectionsOfContentWithInArticleEditor"];export{t as ButtonForEditingSectionsOfContentWithInArticleEditor,Yt as __namedExportsOrder,Xt as default}; diff --git a/assets/select-image-cPUSf5YP.js b/assets/select-image-e-hQhRt5.js similarity index 75% rename from assets/select-image-cPUSf5YP.js rename to assets/select-image-e-hQhRt5.js index c214f5f8cb..b235fe0d58 100644 --- a/assets/select-image-cPUSf5YP.js +++ b/assets/select-image-e-hQhRt5.js @@ -1 +1 @@ -import{a as m,j as e}from"./jsx-runtime-FVsy8kgq.js";import{b as a}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{B as s}from"./choice-I73s7vIV.js";import{l as o}from"./index-awljIyHI.js";import{F as n}from"./form-wrapped-text-field-A2kf-LD-.js";import{a as l}from"./global-colors-VIVU4Od4.js";const d=({onChange:i,url:t})=>m("div",{children:[e("div",{className:o.css(r.title),children:"Image"}),m("div",{className:o.css(r.components),children:[e(n,{placeholder:"URL",grow:1,onChange:p=>i(p.target.value),value:t}),e("div",{className:o.css(r.spacer)}),e(s,{disabled:!t,"aria-label":t?"":"Not implemented. Use the 'Add Image' button in the editor to upload image, then copy the URL here.",onClick:()=>i(""),style:r.btn,children:t?"Remove":"Upload"})]})]}),r=o.StyleSheet.create({title:{...a,marginBottom:6,color:l},components:{display:"flex"},spacer:{width:16},btn:{minWidth:90}});d.__docgenInfo={description:"",methods:[],displayName:"SelectImage",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(url: string) => void",signature:{arguments:[{type:{name:"string"},name:"url"}],return:{name:"void"}}},description:""},url:{required:!0,tsType:{name:"string"},description:""}}};export{d as S}; +import{a as m,j as e}from"./jsx-runtime-FVsy8kgq.js";import{b as a}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{B as s}from"./choice-I73s7vIV.js";import{l as o}from"./index-awljIyHI.js";import{F as n}from"./form-wrapped-text-field-A2kf-LD-.js";import{a as l}from"./global-colors-VIVU4Od4.js";const d=({onChange:i,url:t})=>m("div",{children:[e("div",{className:o.css(r.title),children:"Image"}),m("div",{className:o.css(r.components),children:[e(n,{placeholder:"URL",grow:1,onChange:p=>i(p.target.value),value:t}),e("div",{className:o.css(r.spacer)}),e(s,{disabled:!t,"aria-label":t?"":"Not implemented. Use the 'Add Image' button in the editor to upload image, then copy the URL here.",onClick:()=>i(""),style:r.btn,children:t?"Remove":"Upload"})]})]}),r=o.StyleSheet.create({title:{...a,marginBottom:6,color:l},components:{display:"flex"},spacer:{width:16},btn:{minWidth:90}});d.__docgenInfo={description:"",methods:[],displayName:"SelectImage",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(url: string) => void",signature:{arguments:[{type:{name:"string"},name:"url"}],return:{name:"void"}}},description:""},url:{required:!0,tsType:{name:"string"},description:""}}};export{d as S}; diff --git a/assets/select-image.stories-CQal8_xI.js b/assets/select-image.stories-ARN5C_nE.js similarity index 75% rename from assets/select-image.stories-CQal8_xI.js rename to assets/select-image.stories-ARN5C_nE.js index 3b9e88954c..50d3c4d951 100644 --- a/assets/select-image.stories-CQal8_xI.js +++ b/assets/select-image.stories-ARN5C_nE.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as i}from"./index-awljIyHI.js";import{r as I}from"./index-TT1qJ6UJ.js";import{S}from"./select-image-cPUSf5YP.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";const ct={title:"PerseusEditor/Widgets/Label Image/Select Image"},f=i.StyleSheet.create({wrapper:{width:338}}),y=t=>r("div",{className:i.css(f.wrapper),children:r(S,{...t})}),_=()=>{const[t,e]=I.useState("");return r("div",{className:i.css(f.wrapper),children:r(S,{onChange:E=>e(E),url:t})})},o=t=>r(y,{...{url:"",onChange:()=>{}}}),p=t=>r(y,{...{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",onChange:()=>{}}}),m=t=>r(_,{});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};p.__docgenInfo={description:"",methods:[],displayName:"Filled"};m.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as i}from"./index-awljIyHI.js";import{r as I}from"./index-TT1qJ6UJ.js";import{S}from"./select-image-e-hQhRt5.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./form-wrapped-text-field-A2kf-LD-.js";import"./global-colors-VIVU4Od4.js";const ct={title:"PerseusEditor/Widgets/Label Image/Select Image"},f=i.StyleSheet.create({wrapper:{width:338}}),y=t=>r("div",{className:i.css(f.wrapper),children:r(S,{...t})}),_=()=>{const[t,e]=I.useState("");return r("div",{className:i.css(f.wrapper),children:r(S,{onChange:E=>e(E),url:t})})},o=t=>r(y,{...{url:"",onChange:()=>{}}}),p=t=>r(y,{...{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",onChange:()=>{}}}),m=t=>r(_,{});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};p.__docgenInfo={description:"",methods:[],displayName:"Filled"};m.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ url: "", onChange: () => {} diff --git a/assets/server-item-renderer-with-debug-ui-Idt1fZew.js b/assets/server-item-renderer-with-debug-ui-_MpsO46x.js similarity index 99% rename from assets/server-item-renderer-with-debug-ui-Idt1fZew.js rename to assets/server-item-renderer-with-debug-ui-_MpsO46x.js index 7319a42550..63a1e2e334 100644 --- a/assets/server-item-renderer-with-debug-ui-Idt1fZew.js +++ b/assets/server-item-renderer-with-debug-ui-_MpsO46x.js @@ -1,4 +1,4 @@ -import{j as e,a,F as m}from"./jsx-runtime-FVsy8kgq.js";import{B as i}from"./choice-I73s7vIV.js";import{V as g}from"./index-6h5t6F0w.js";import{S as h}from"./index-qUyqkRvh.js";import{r as s}from"./index-TT1qJ6UJ.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import{r as p}from"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{K as c}from"./ke-score-ui-VwVxZMGJ.js";import{S as b}from"./side-by-side-kGWaKY6T.js";import{s as v}from"./test-dependencies-zutb-QBJ.js";const w=({item:t,apiOptions:o,keypadElement:l})=>{const r=s.useRef(null),[u,d]=s.useState(null),y=o||Object.freeze({});return e(b,{leftTitle:"Renderer",left:a(m,{children:[e(p,{ref:r,problemNum:0,apiOptions:y,item:t,dependencies:v,keypadElement:l}),a(g,{style:{flexDirection:"row",alignItems:"center"},children:[e(i,{onClick:()=>{r.current&&d(r.current.scoreInput())},children:"Check"}),e(h,{size:8}),e(i,{onClick:()=>{var n;(n=r.current)==null||n.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),e(c,{score:u})]}),jsonObject:t})};w.__docgenInfo={description:"",methods:[],displayName:"ServerItemRendererWithDebugUI",props:{item:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as e,a,F as m}from"./jsx-runtime-FVsy8kgq.js";import{B as i}from"./choice-I73s7vIV.js";import{V as g}from"./index-6h5t6F0w.js";import{S as h}from"./index-qUyqkRvh.js";import{r as s}from"./index-TT1qJ6UJ.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import{r as p}from"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{K as c}from"./ke-score-ui-VwVxZMGJ.js";import{S as b}from"./side-by-side-kGWaKY6T.js";import{s as v}from"./test-dependencies-fGmEXWK4.js";const w=({item:t,apiOptions:o,keypadElement:l})=>{const r=s.useRef(null),[u,d]=s.useState(null),y=o||Object.freeze({});return e(b,{leftTitle:"Renderer",left:a(m,{children:[e(p,{ref:r,problemNum:0,apiOptions:y,item:t,dependencies:v,keypadElement:l}),a(g,{style:{flexDirection:"row",alignItems:"center"},children:[e(i,{onClick:()=>{r.current&&d(r.current.scoreInput())},children:"Check"}),e(h,{size:8}),e(i,{onClick:()=>{var n;(n=r.current)==null||n.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),e(c,{score:u})]}),jsonObject:t})};w.__docgenInfo={description:"",methods:[],displayName:"ServerItemRendererWithDebugUI",props:{item:{required:!0,tsType:{name:"signature",type:"object",raw:`{ // The details of the question being asked to the user. question: PerseusRenderer; // A collection of hints to be offered to the user that support answering the question. diff --git a/assets/server-item-renderer.stories-8t0Uujez.js b/assets/server-item-renderer.stories-cuHthi6R.js similarity index 93% rename from assets/server-item-renderer.stories-8t0Uujez.js rename to assets/server-item-renderer.stories-cuHthi6R.js index e46d262ad1..55056e9a8f 100644 --- a/assets/server-item-renderer.stories-8t0Uujez.js +++ b/assets/server-item-renderer.stories-cuHthi6R.js @@ -1,4 +1,4 @@ -import{j as t,a as s,F as K}from"./jsx-runtime-FVsy8kgq.js";import{r as x}from"./index-TT1qJ6UJ.js";import{S as i}from"./server-item-renderer-with-debug-ui-Idt1fZew.js";import{s as G}from"./test-dependencies-zutb-QBJ.js";import{I as Q}from"./article-renderer-GCz9idJ2.js";import{S as Y}from"./multi-renderer-Dj-_XIAo.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./shared-4TdECMLk.js";import"./base-radio-13woGQGc.js";import"./choice-none-above-0_QL8uoF.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-VwVxZMGJ.js";import"./side-by-side-kGWaKY6T.js";import"./register-all-widgets-for-testing-I8cwOiut.js";import"./enums-x5qaTru7.js";import"./input-with-examples-pL_l1Dse.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-6SWUlni2.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";const X={question:{content:"Enter the number $$-42$$ in the box: [[☃ input-number 1]]",images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"-42",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},ee={question:{content:`Enter the number $$1$$ in box one: [[☃ input-number 1]] +import{j as t,a as s,F as K}from"./jsx-runtime-FVsy8kgq.js";import{r as x}from"./index-TT1qJ6UJ.js";import{S as i}from"./server-item-renderer-with-debug-ui-_MpsO46x.js";import{s as G}from"./test-dependencies-fGmEXWK4.js";import{I as Q}from"./article-renderer-ub6lGcPc.js";import{S as Y}from"./multi-renderer-la0A-h33.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-d8cZibFS.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./shared-4TdECMLk.js";import"./base-radio-SM-baXgO.js";import"./choice-none-above-lqQAegUH.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./hud-4BOtaFc1.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-VwVxZMGJ.js";import"./side-by-side-kGWaKY6T.js";import"./register-all-widgets-for-testing-xxgCysIB.js";import"./enums-x5qaTru7.js";import"./input-with-examples-Jnnd0mF0.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./answer-choices-VNdK7gMK.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";const X={question:{content:"Enter the number $$-42$$ in the box: [[☃ input-number 1]]",images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"-42",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},ee={question:{content:`Enter the number $$1$$ in box one: [[☃ input-number 1]] Enter the number $$2$$ in box two: [[☃ input-number 2]]`,images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"1",simplify:"required",size:"normal",inexact:!1,maxError:.1}},"input-number 2":{type:"input-number",graded:!0,options:{answerType:"number",value:"2",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},te={question:{content:`Here's a radio widget: [[☃ radio 1]] diff --git a/assets/simple-keypad-input.stories-7zCo_AQF.js b/assets/simple-keypad-input.stories-7zCo_AQF.js index 799ab477dc..9fe806d96c 100644 --- a/assets/simple-keypad-input.stories-7zCo_AQF.js +++ b/assets/simple-keypad-input.stories-7zCo_AQF.js @@ -1,4 +1,4 @@ -import{a as t}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as n}from"./simple-keypad-input-LEkrmlga.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-SKtvHVtl.js";import"./version-akiLXZts.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-k-0mNqHS.js";const G={title:"Perseus/Components/Simple Keypad Input",component:n,args:{onChange:t("onChange"),onFocus:t("onFocus"),onBlur:t("onBlur")}},o={},r={args:{value:"Test value"}};var p,m,e;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:"{}",...(e=(m=o.parameters)==null?void 0:m.docs)==null?void 0:e.source}}};var s,a,i;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{ +import{a as t}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as n}from"./simple-keypad-input-LEkrmlga.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-SKtvHVtl.js";import"./version-akiLXZts.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-k-0mNqHS.js";const G={title:"Perseus/Components/Simple Keypad Input",component:n,args:{onChange:t("onChange"),onFocus:t("onFocus"),onBlur:t("onBlur")}},o={},r={args:{value:"Test value"}};var p,m,e;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:"{}",...(e=(m=o.parameters)==null?void 0:m.docs)==null?void 0:e.source}}};var s,a,i;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{ args: { value: "Test value" } diff --git a/assets/sortable-PVTgDRY4.js b/assets/sortable-1xjW6Ojf.js similarity index 98% rename from assets/sortable-PVTgDRY4.js rename to assets/sortable-1xjW6Ojf.js index b2ca81cc0d..b407afac27 100644 --- a/assets/sortable-PVTgDRY4.js +++ b/assets/sortable-1xjW6Ojf.js @@ -1,4 +1,4 @@ -import{j as c,a as A,F as I}from"./jsx-runtime-FVsy8kgq.js";import{l as S,R as T,p as P}from"./renderer-VfFjn7ah.js";import{C as D}from"./svg-image-vbtSDKh6.js";import{l as k}from"./index-awljIyHI.js";import{$ as d,_ as i}from"./jquery-yG1GhClm.js";import{r as x}from"./index-TT1qJ6UJ.js";import{R as g}from"./index-7vsPyIck.js";import{g as U}from"./dependencies-8XILypbq.js";import{C as O}from"./perseus-api-Nq3s7IMx.js";import{U as v}from"./util-F8-MDmsT.js";import{P as F}from"./i18n-context-P5sgPFep.js";const C=(R,e)=>{const t=R.offsetParent();return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft()}};class E extends x.Component{render(){const{layout:e}=this.props,t=k.css(p.card,p.placeholder,e==="horizontal"&&p.horizontalCard),n={width:this.props.width,height:this.props.height};return this.props.margin!=null&&(n.margin=this.props.margin),c("li",{className:t,style:n})}}const M=class M extends x.Component{constructor(){super(...arguments),this.animationFrameRequest=null,this.state={startPosition:{left:0,top:0},startMouse:{left:0,top:0},mouse:{left:0,top:0},dragging:!1},this.getCurrentPosition=()=>({left:this.state.startPosition.left+this.state.mouse.left-this.state.startMouse.left,top:this.state.startPosition.top+this.state.mouse.top-this.state.startMouse.top}),this.bindMouseMoveUp=()=>{this.isMouseMoveUpBound=!0,d(document).on("mousemove",this.onMouseMove),d(document).on("mouseup",this.onMouseUp)},this.unbindMouseMoveUp=()=>{this.isMouseMoveUpBound=!1,d(document).off("mousemove",this.onMouseMove),d(document).off("mouseup",this.onMouseUp)},this.onMouseDown=e=>{if(this.props.state!=="static"||!(e.button===0||e.touches!=null&&e.touches.length===1))return;e.preventDefault();const t=v.extractPointerLocation(e);this.animationFrameRequest=requestAnimationFrame(()=>{const n=d(g.findDOMNode(this)),o=n.position(),r=C(n,o);t&&this._mounted&&this.setState({startPosition:r,startMouse:t,mouse:t,dragging:!0},function(){this.bindMouseMoveUp(),this.props.onMouseDown()})})},this.onMouseMove=e=>{if(this.props.state!=="dragging"||!this.state.dragging)return;e.preventDefault();const n=v.extractPointerLocation(e);n&&(this.animationFrameRequest=requestAnimationFrame(()=>{this.setState({mouse:n},this.props.onMouseMove)}))},this.onMouseUp=e=>{if(this.props.state!=="dragging"||!this.state.dragging)return;e.preventDefault(),v.extractPointerLocation(e)&&(this.setState({dragging:!1}),this.unbindMouseMoveUp(),this.props.onMouseUp())}}componentDidMount(){this._mounted=!0,this.isMouseMoveUpBound=!1,document.addEventListener("touchmove",this.onMouseMove,v.supportsPassiveEvents()?{passive:!1}:!1)}componentDidUpdate(e){if(this.props.state!==e.state)if(this.props.state==="animating"&&this.props.endPosition){const t=this.getCurrentPosition(),n=15*Math.sqrt(Math.sqrt(Math.pow(this.props.endPosition.left-t.left,2)+Math.pow(this.props.endPosition.top-t.top,2)));d(g.findDOMNode(this)).animate(this.props.endPosition,{duration:Math.max(n,1),complete:this.props.onAnimationEnd})}else this.props.state==="static"&&d(g.findDOMNode(this)).finish()}componentWillUnmount(){this._mounted=!1,this.isMouseMoveUpBound&&this.unbindMouseMoveUp(),this.animationFrameRequest&&cancelAnimationFrame(this.animationFrameRequest),document.removeEventListener("touchmove",this.onMouseMove)}render(){const{includePadding:e,layout:t,state:n}=this.props;let o=k.css(p.card,p.draggable,t==="horizontal"&&p.horizontalCard,t==="vertical"&&p.verticalCard,n==="dragging"&&p.dragging,n==="disabled"&&p.disabled,!e&&p.unpaddedCard)+" "+O.INTERACTIVE+" perseus-sortable-draggable";e||(o+=" perseus-sortable-draggable-unpadded");const r={position:"static"};return(this.props.state==="dragging"||this.props.state==="animating")&&i.extend(r,{position:"absolute"},this.getCurrentPosition()),this.props.width&&(r.width=this.props.width+1),this.props.height&&(r.height=this.props.height),this.props.margin!=null&&(r.margin=this.props.margin),c("li",{className:o,style:r,onMouseDown:this.onMouseDown,onTouchStart:this.onMouseDown,onTouchMove:this.onMouseMove,onTouchEnd:this.onMouseUp,onTouchCancel:this.onMouseUp,children:c(T,{content:this.props.content,linterContext:P(this.props.linterContext,"draggable"),onRender:this.props.onRender,strings:this.context.strings})})}};M.contextType=F,M.defaultProps={includePadding:!0,type:"static",linterContext:S};let w=M;const f=class f extends x.Component{constructor(e){super(e),this.remeasureItems=i.debounce(()=>{this.setState({items:f.clearItemMeasurements(this.state.items)})},20),this.state={items:f.itemsFromProps(this.props),texRendererLoaded:!1}}static itemsFromProps(e){const t=e.disabled?"disabled":"static";return e.options.map((n,o)=>({option:n,key:o,state:t,width:0,height:0}))}static clearItemMeasurements(e){return e.map(t=>({...t,width:0,height:0}))}UNSAFE_componentWillReceiveProps(e){const t=this.props;i.isEqual(e.options,t.options)?(e.layout!==t.layout||e.padding!==t.padding||e.disabled!==t.disabled||!i.isEqual(e.constraints,t.constraints))&&this.setState({items:f.clearItemMeasurements(this.state.items)}):this.setState({items:f.itemsFromProps(e)})}componentDidUpdate(){this.state.items.length&&!this.state.items[0].width&&!this.state.items[0].height&&setTimeout(()=>{this.measureItems()},0)}measureItems(){let e=[...this.state.items];const t=i.map(e,function(l){return d(g.findDOMNode(this.refs[l.key]))},this),n=i.invoke(t,"outerWidth"),o=i.invoke(t,"outerHeight"),{constraints:r,layout:u}=this.props;let a=null;r!=null&&r.width?a=i.max(n.concat(r.width)):u==="vertical"&&(a=i.max(n));let s=null;r!=null&&r.height?s=i.max(o.concat(r.height)):u==="horizontal"&&(s=i.max(o)),e=i.map(e,function(l,m){return l.width=a||n[m],l.height=s||o[m],l}),this.setState({items:e},()=>{this.props.onMeasure&&this.props.onMeasure({widths:n,heights:o})})}onMouseDown(e){const t=i.map(this.state.items,function(n){return n.key===e&&(n.state="dragging"),n});this.setState({items:t})}moveOptionToIndex(e,t){const{items:n}=this.state;if(t<0||t>n.length)throw new Error(`index ${t} out of bounds`);const o=i.clone(n),r=n.filter(a=>a.option===e)[0];if(r==null)throw new Error(`option ${e} not found`);const u=n.findIndex(a=>a.key===r.key);o.splice(u,1),o.splice(t,0,r),this.setState({items:o}),this.props.onChange&&this.props.onChange({})}onMouseMove(e){const t=d(g.findDOMNode(this.refs[e])),n=d(g.findDOMNode(this)),o=i.clone(this.state.items),r=i.findWhere(this.state.items,{key:e}),u=this.props.margin||0,a=i.indexOf(o,r);let s=0;if(o.splice(a,1),this.props.layout==="horizontal"){const l=t.offset().left-n.offset().left;let m=0,h;i.each(o,function(y){h=y.width,l>m+h/2&&(s+=1),m+=h+u})}else{const l=t.offset().top-n.offset().top;let m=0,h;i.each(o,function(y){h=y.height,l>m+h/2&&(s+=1),m+=h+u})}s!==a&&(o.splice(s,0,r),this.setState({items:o}))}onMouseUp(e){const t=requestAnimationFrame(()=>{const n=i.map(this.state.items,function(o){if(o.key===e){o.state="animating";const r=d(g.findDOMNode(this.refs["placeholder_"+e])),u=r.position(),a=C(r,u);o.endPosition=a}return o},this);this.setState({items:n}),this.props.onChange&&this.props.onChange({})});this.animationFrameRequest=t}onAnimationEnd(e){const t=i.map(this.state.items,function(n){return n.key===e&&(n.state="static"),n});this.setState({items:t})}getOptions(){return i.pluck(this.state.items,"option")}render(){var u,a;if(this.props.waitForTexRendererToLoad&&!this.state.texRendererLoaded){const{TeX:s}=U();return A(I,{children:[c(D,{}),c("div",{style:{display:"none"},children:c(s,{onRender:()=>this.setState({texRendererLoaded:!0}),children:"1"})})]})}const e=[],{layout:t}=this.props,n=k.css(p.sortable)+" perseus-sortable",o=((u=this.props.constraints)==null?void 0:u.width)||t==="vertical",r=((a=this.props.constraints)==null?void 0:a.height)||t==="horizontal";return i.each(this.state.items,function(s,l,m){const h=l===m.length-1,y=s.state==="static"||s.state==="disabled";let b;this.props.layout==="horizontal"?b="0 "+this.props.margin+"px 0 0":this.props.layout==="vertical"&&(b="0 0 "+this.props.margin+"px 0"),e.push(c(w,{content:s.option,state:s.state,ref:s.key,width:o?s.width:void 0,height:r?s.height:void 0,layout:t,includePadding:this.props.padding,margin:h&&y?0:b,endPosition:s.endPosition,linterContext:P(this.props.linterContext,"sortable"),onRender:this.remeasureItems,onMouseDown:this.onMouseDown.bind(this,s.key),onMouseMove:this.onMouseMove.bind(this,s.key),onMouseUp:this.onMouseUp.bind(this,s.key),onTouchMove:this.onMouseMove.bind(this,s.key),onTouchEnd:this.onMouseUp.bind(this,s.key),onTouchCancel:this.onMouseUp.bind(this,s.key),onAnimationEnd:this.onAnimationEnd.bind(this,s.key)},s.key)),(s.state==="dragging"||s.state==="animating")&&e.push(c(E,{ref:"placeholder_"+s.key,width:s.width,height:s.height,layout:t,margin:h?0:b},"placeholder_"+s.key))},this),c("ul",{className:n,children:e})}};f.defaultProps={layout:"horizontal",padding:!0,disabled:!1,constraints:{},onMeasure:function(){},margin:5,onChange:function(){},linterContext:S,waitForTexRendererToLoad:!0};let q=f;const p=k.StyleSheet.create({sortable:{boxSizing:"border-box",float:"left",padding:0,margin:0},card:{boxSizing:"border-box",background:"#fff",border:"1px solid #ddd",borderRadius:4,cursor:"pointer",minWidth:25,minHeight:44,padding:10,listStyleType:"none",userSelect:"none",touchAction:"none"},placeholder:{background:"#ddd",border:"1px solid #ccc"},draggable:{textAlign:"center"},horizontalCard:{float:"left",cursor:"ew-resize"},verticalCard:{maxWidth:"100%",cursor:"ns-resize"},unpaddedCard:{padding:0},dragging:{background:"#ffedcd",opacity:.8},disabled:{backgroundColor:"inherit",border:"1px solid transparent",cursor:"default"}});q.__docgenInfo={description:"",methods:[{name:"itemsFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{j as c,a as A,F as I}from"./jsx-runtime-FVsy8kgq.js";import{l as S,R as T,p as P}from"./renderer-JG1Z7r2S.js";import{C as D}from"./svg-image-4Vh9uTQ6.js";import{l as k}from"./index-awljIyHI.js";import{$ as d,_ as i}from"./jquery-yG1GhClm.js";import{r as x}from"./index-TT1qJ6UJ.js";import{R as g}from"./index-7vsPyIck.js";import{g as U}from"./dependencies-d8cZibFS.js";import{C as O}from"./perseus-api-Nq3s7IMx.js";import{U as v}from"./util-F8-MDmsT.js";import{P as F}from"./i18n-context-P5sgPFep.js";const C=(R,e)=>{const t=R.offsetParent();return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft()}};class E extends x.Component{render(){const{layout:e}=this.props,t=k.css(p.card,p.placeholder,e==="horizontal"&&p.horizontalCard),n={width:this.props.width,height:this.props.height};return this.props.margin!=null&&(n.margin=this.props.margin),c("li",{className:t,style:n})}}const M=class M extends x.Component{constructor(){super(...arguments),this.animationFrameRequest=null,this.state={startPosition:{left:0,top:0},startMouse:{left:0,top:0},mouse:{left:0,top:0},dragging:!1},this.getCurrentPosition=()=>({left:this.state.startPosition.left+this.state.mouse.left-this.state.startMouse.left,top:this.state.startPosition.top+this.state.mouse.top-this.state.startMouse.top}),this.bindMouseMoveUp=()=>{this.isMouseMoveUpBound=!0,d(document).on("mousemove",this.onMouseMove),d(document).on("mouseup",this.onMouseUp)},this.unbindMouseMoveUp=()=>{this.isMouseMoveUpBound=!1,d(document).off("mousemove",this.onMouseMove),d(document).off("mouseup",this.onMouseUp)},this.onMouseDown=e=>{if(this.props.state!=="static"||!(e.button===0||e.touches!=null&&e.touches.length===1))return;e.preventDefault();const t=v.extractPointerLocation(e);this.animationFrameRequest=requestAnimationFrame(()=>{const n=d(g.findDOMNode(this)),o=n.position(),r=C(n,o);t&&this._mounted&&this.setState({startPosition:r,startMouse:t,mouse:t,dragging:!0},function(){this.bindMouseMoveUp(),this.props.onMouseDown()})})},this.onMouseMove=e=>{if(this.props.state!=="dragging"||!this.state.dragging)return;e.preventDefault();const n=v.extractPointerLocation(e);n&&(this.animationFrameRequest=requestAnimationFrame(()=>{this.setState({mouse:n},this.props.onMouseMove)}))},this.onMouseUp=e=>{if(this.props.state!=="dragging"||!this.state.dragging)return;e.preventDefault(),v.extractPointerLocation(e)&&(this.setState({dragging:!1}),this.unbindMouseMoveUp(),this.props.onMouseUp())}}componentDidMount(){this._mounted=!0,this.isMouseMoveUpBound=!1,document.addEventListener("touchmove",this.onMouseMove,v.supportsPassiveEvents()?{passive:!1}:!1)}componentDidUpdate(e){if(this.props.state!==e.state)if(this.props.state==="animating"&&this.props.endPosition){const t=this.getCurrentPosition(),n=15*Math.sqrt(Math.sqrt(Math.pow(this.props.endPosition.left-t.left,2)+Math.pow(this.props.endPosition.top-t.top,2)));d(g.findDOMNode(this)).animate(this.props.endPosition,{duration:Math.max(n,1),complete:this.props.onAnimationEnd})}else this.props.state==="static"&&d(g.findDOMNode(this)).finish()}componentWillUnmount(){this._mounted=!1,this.isMouseMoveUpBound&&this.unbindMouseMoveUp(),this.animationFrameRequest&&cancelAnimationFrame(this.animationFrameRequest),document.removeEventListener("touchmove",this.onMouseMove)}render(){const{includePadding:e,layout:t,state:n}=this.props;let o=k.css(p.card,p.draggable,t==="horizontal"&&p.horizontalCard,t==="vertical"&&p.verticalCard,n==="dragging"&&p.dragging,n==="disabled"&&p.disabled,!e&&p.unpaddedCard)+" "+O.INTERACTIVE+" perseus-sortable-draggable";e||(o+=" perseus-sortable-draggable-unpadded");const r={position:"static"};return(this.props.state==="dragging"||this.props.state==="animating")&&i.extend(r,{position:"absolute"},this.getCurrentPosition()),this.props.width&&(r.width=this.props.width+1),this.props.height&&(r.height=this.props.height),this.props.margin!=null&&(r.margin=this.props.margin),c("li",{className:o,style:r,onMouseDown:this.onMouseDown,onTouchStart:this.onMouseDown,onTouchMove:this.onMouseMove,onTouchEnd:this.onMouseUp,onTouchCancel:this.onMouseUp,children:c(T,{content:this.props.content,linterContext:P(this.props.linterContext,"draggable"),onRender:this.props.onRender,strings:this.context.strings})})}};M.contextType=F,M.defaultProps={includePadding:!0,type:"static",linterContext:S};let w=M;const f=class f extends x.Component{constructor(e){super(e),this.remeasureItems=i.debounce(()=>{this.setState({items:f.clearItemMeasurements(this.state.items)})},20),this.state={items:f.itemsFromProps(this.props),texRendererLoaded:!1}}static itemsFromProps(e){const t=e.disabled?"disabled":"static";return e.options.map((n,o)=>({option:n,key:o,state:t,width:0,height:0}))}static clearItemMeasurements(e){return e.map(t=>({...t,width:0,height:0}))}UNSAFE_componentWillReceiveProps(e){const t=this.props;i.isEqual(e.options,t.options)?(e.layout!==t.layout||e.padding!==t.padding||e.disabled!==t.disabled||!i.isEqual(e.constraints,t.constraints))&&this.setState({items:f.clearItemMeasurements(this.state.items)}):this.setState({items:f.itemsFromProps(e)})}componentDidUpdate(){this.state.items.length&&!this.state.items[0].width&&!this.state.items[0].height&&setTimeout(()=>{this.measureItems()},0)}measureItems(){let e=[...this.state.items];const t=i.map(e,function(l){return d(g.findDOMNode(this.refs[l.key]))},this),n=i.invoke(t,"outerWidth"),o=i.invoke(t,"outerHeight"),{constraints:r,layout:u}=this.props;let a=null;r!=null&&r.width?a=i.max(n.concat(r.width)):u==="vertical"&&(a=i.max(n));let s=null;r!=null&&r.height?s=i.max(o.concat(r.height)):u==="horizontal"&&(s=i.max(o)),e=i.map(e,function(l,m){return l.width=a||n[m],l.height=s||o[m],l}),this.setState({items:e},()=>{this.props.onMeasure&&this.props.onMeasure({widths:n,heights:o})})}onMouseDown(e){const t=i.map(this.state.items,function(n){return n.key===e&&(n.state="dragging"),n});this.setState({items:t})}moveOptionToIndex(e,t){const{items:n}=this.state;if(t<0||t>n.length)throw new Error(`index ${t} out of bounds`);const o=i.clone(n),r=n.filter(a=>a.option===e)[0];if(r==null)throw new Error(`option ${e} not found`);const u=n.findIndex(a=>a.key===r.key);o.splice(u,1),o.splice(t,0,r),this.setState({items:o}),this.props.onChange&&this.props.onChange({})}onMouseMove(e){const t=d(g.findDOMNode(this.refs[e])),n=d(g.findDOMNode(this)),o=i.clone(this.state.items),r=i.findWhere(this.state.items,{key:e}),u=this.props.margin||0,a=i.indexOf(o,r);let s=0;if(o.splice(a,1),this.props.layout==="horizontal"){const l=t.offset().left-n.offset().left;let m=0,h;i.each(o,function(y){h=y.width,l>m+h/2&&(s+=1),m+=h+u})}else{const l=t.offset().top-n.offset().top;let m=0,h;i.each(o,function(y){h=y.height,l>m+h/2&&(s+=1),m+=h+u})}s!==a&&(o.splice(s,0,r),this.setState({items:o}))}onMouseUp(e){const t=requestAnimationFrame(()=>{const n=i.map(this.state.items,function(o){if(o.key===e){o.state="animating";const r=d(g.findDOMNode(this.refs["placeholder_"+e])),u=r.position(),a=C(r,u);o.endPosition=a}return o},this);this.setState({items:n}),this.props.onChange&&this.props.onChange({})});this.animationFrameRequest=t}onAnimationEnd(e){const t=i.map(this.state.items,function(n){return n.key===e&&(n.state="static"),n});this.setState({items:t})}getOptions(){return i.pluck(this.state.items,"option")}render(){var u,a;if(this.props.waitForTexRendererToLoad&&!this.state.texRendererLoaded){const{TeX:s}=U();return A(I,{children:[c(D,{}),c("div",{style:{display:"none"},children:c(s,{onRender:()=>this.setState({texRendererLoaded:!0}),children:"1"})})]})}const e=[],{layout:t}=this.props,n=k.css(p.sortable)+" perseus-sortable",o=((u=this.props.constraints)==null?void 0:u.width)||t==="vertical",r=((a=this.props.constraints)==null?void 0:a.height)||t==="horizontal";return i.each(this.state.items,function(s,l,m){const h=l===m.length-1,y=s.state==="static"||s.state==="disabled";let b;this.props.layout==="horizontal"?b="0 "+this.props.margin+"px 0 0":this.props.layout==="vertical"&&(b="0 0 "+this.props.margin+"px 0"),e.push(c(w,{content:s.option,state:s.state,ref:s.key,width:o?s.width:void 0,height:r?s.height:void 0,layout:t,includePadding:this.props.padding,margin:h&&y?0:b,endPosition:s.endPosition,linterContext:P(this.props.linterContext,"sortable"),onRender:this.remeasureItems,onMouseDown:this.onMouseDown.bind(this,s.key),onMouseMove:this.onMouseMove.bind(this,s.key),onMouseUp:this.onMouseUp.bind(this,s.key),onTouchMove:this.onMouseMove.bind(this,s.key),onTouchEnd:this.onMouseUp.bind(this,s.key),onTouchCancel:this.onMouseUp.bind(this,s.key),onAnimationEnd:this.onAnimationEnd.bind(this,s.key)},s.key)),(s.state==="dragging"||s.state==="animating")&&e.push(c(E,{ref:"placeholder_"+s.key,width:s.width,height:s.height,layout:t,margin:h?0:b},"placeholder_"+s.key))},this),c("ul",{className:n,children:e})}};f.defaultProps={layout:"horizontal",padding:!0,disabled:!1,constraints:{},onMeasure:function(){},margin:5,onChange:function(){},linterContext:S,waitForTexRendererToLoad:!0};let q=f;const p=k.StyleSheet.create({sortable:{boxSizing:"border-box",float:"left",padding:0,margin:0},card:{boxSizing:"border-box",background:"#fff",border:"1px solid #ddd",borderRadius:4,cursor:"pointer",minWidth:25,minHeight:44,padding:10,listStyleType:"none",userSelect:"none",touchAction:"none"},placeholder:{background:"#ddd",border:"1px solid #ccc"},draggable:{textAlign:"center"},horizontalCard:{float:"left",cursor:"ew-resize"},verticalCard:{maxWidth:"100%",cursor:"ns-resize"},unpaddedCard:{padding:0},dragging:{background:"#ffedcd",opacity:.8},disabled:{backgroundColor:"inherit",border:"1px solid transparent",cursor:"default"}});q.__docgenInfo={description:"",methods:[{name:"itemsFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ disabled: boolean; options: ReadonlyArray; }`,signature:{properties:[{key:"disabled",value:{name:"boolean",required:!0}},{key:"options",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}}]}}}],returns:{type:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ diff --git a/assets/sortable.stories-wvLpEGub.js b/assets/sortable.stories-oLGzYzKZ.js similarity index 89% rename from assets/sortable.stories-wvLpEGub.js rename to assets/sortable.stories-oLGzYzKZ.js index 082541ba02..b5849617b8 100644 --- a/assets/sortable.stories-wvLpEGub.js +++ b/assets/sortable.stories-oLGzYzKZ.js @@ -1,4 +1,4 @@ -import{S as z}from"./sortable-PVTgDRY4.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-VfFjn7ah.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";const pr={title:"Perseus/Components/Sortable",component:z,args:{options:["Option 1","Option 2","Option 3"]}},r={args:{layout:"horizontal",options:["a","b","c"],waitForTexRendererToLoad:!1}},o={args:{layout:"vertical",options:["a","b","c"],waitForTexRendererToLoad:!1}},t={},a={args:{padding:!1}},e={args:{margin:64}},s={args:{disabled:!0}},i={args:{constraints:{height:128,width:256}}};var n,p,c;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{S as z}from"./sortable-1xjW6Ojf.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-JG1Z7r2S.js";import"./version-akiLXZts.js";import"./util-F8-MDmsT.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";const pr={title:"Perseus/Components/Sortable",component:z,args:{options:["Option 1","Option 2","Option 3"]}},r={args:{layout:"horizontal",options:["a","b","c"],waitForTexRendererToLoad:!1}},o={args:{layout:"vertical",options:["a","b","c"],waitForTexRendererToLoad:!1}},t={},a={args:{padding:!1}},e={args:{margin:64}},s={args:{disabled:!0}},i={args:{constraints:{height:128,width:256}}};var n,p,c;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ args: { layout: "horizontal", options: ["a", "b", "c"], diff --git a/assets/sorter-editor-RE_zqP0r.js b/assets/sorter-editor-VTfqPYS3.js similarity index 81% rename from assets/sorter-editor-RE_zqP0r.js rename to assets/sorter-editor-VTfqPYS3.js index 892b687b7e..8d180d9ccb 100644 --- a/assets/sorter-editor-RE_zqP0r.js +++ b/assets/sorter-editor-VTfqPYS3.js @@ -1 +1 @@ -import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import{_ as c}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as h}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{C as u}from"./index-QCAhLhLD.js";import{P as i}from"./index-0C4KXdeC.js";import{r as m}from"./index-TT1qJ6UJ.js";const{InfoTip:n,TextListEditor:f}=h,s="horizontal",p="vertical",o=class o extends m.Component{constructor(){super(...arguments),this.onLayoutChange=r=>{this.props.onChange({layout:r.target.value})},this.serialize=()=>c.pick(this.props,"correct","layout","padding")}render(){const r=this;return t("div",{children:[t("div",{children:[" ","Correct answer:"," ",e(n,{children:e("p",{children:"Enter the correct answer (in the correct order) here. The preview on the right will have the cards in a randomized order, which is how the student will see them."})})]}),e(f,{options:this.props.correct,onChange:function(a,d){r.props.onChange({correct:a},d)},layout:this.props.layout}),t("div",{children:[t("label",{children:[" ","Layout:"," ",t("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[e("option",{value:s,children:"Horizontal"}),e("option",{value:p,children:"Vertical"})]})]}),e(n,{children:e("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text and larger images."})})]}),t("div",{children:[e(u,{label:"Padding:",checked:this.props.padding,onChange:a=>{this.props.onChange({padding:a})}}),e(n,{children:e("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};o.propTypes={correct:i.array,layout:i.oneOf([s,p]),padding:i.bool},o.widgetName="sorter",o.defaultProps={correct:["$x$","$y$","$z$"],layout:s,padding:!0};let l=o;l.__docgenInfo={description:"",methods:[{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"SorterEditor",props:{correct:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{l as S}; +import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import{_ as c}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as h}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{C as u}from"./index-QCAhLhLD.js";import{P as i}from"./index-0C4KXdeC.js";import{r as m}from"./index-TT1qJ6UJ.js";const{InfoTip:n,TextListEditor:f}=h,s="horizontal",p="vertical",o=class o extends m.Component{constructor(){super(...arguments),this.onLayoutChange=r=>{this.props.onChange({layout:r.target.value})},this.serialize=()=>c.pick(this.props,"correct","layout","padding")}render(){const r=this;return t("div",{children:[t("div",{children:[" ","Correct answer:"," ",e(n,{children:e("p",{children:"Enter the correct answer (in the correct order) here. The preview on the right will have the cards in a randomized order, which is how the student will see them."})})]}),e(f,{options:this.props.correct,onChange:function(a,d){r.props.onChange({correct:a},d)},layout:this.props.layout}),t("div",{children:[t("label",{children:[" ","Layout:"," ",t("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[e("option",{value:s,children:"Horizontal"}),e("option",{value:p,children:"Vertical"})]})]}),e(n,{children:e("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text and larger images."})})]}),t("div",{children:[e(u,{label:"Padding:",checked:this.props.padding,onChange:a=>{this.props.onChange({padding:a})}}),e(n,{children:e("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};o.propTypes={correct:i.array,layout:i.oneOf([s,p]),padding:i.bool},o.widgetName="sorter",o.defaultProps={correct:["$x$","$y$","$z$"],layout:s,padding:!0};let l=o;l.__docgenInfo={description:"",methods:[{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"SorterEditor",props:{correct:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{l as S}; diff --git a/assets/sorter-editor.stories-jb1fDQ7f.js b/assets/sorter-editor.stories-Lo2mcYjs.js similarity index 69% rename from assets/sorter-editor.stories-jb1fDQ7f.js rename to assets/sorter-editor.stories-Lo2mcYjs.js index e977a7df5f..cb2bf3e243 100644 --- a/assets/sorter-editor.stories-jb1fDQ7f.js +++ b/assets/sorter-editor.stories-Lo2mcYjs.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as e}from"./sorter-editor-RE_zqP0r.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./index-0C4KXdeC.js";const $r={title:"PerseusEditor/Widgets/Sorter Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as e}from"./sorter-editor-VTfqPYS3.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./index-0C4KXdeC.js";const $r={title:"PerseusEditor/Widgets/Sorter Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const ro=["Default"];export{r as Default,ro as __namedExportsOrder,$r as default}; diff --git a/assets/sorter.stories-pmGMfYhH.js b/assets/sorter.stories--pe5jLyw.js similarity index 64% rename from assets/sorter.stories-pmGMfYhH.js rename to assets/sorter.stories--pe5jLyw.js index f20921ac80..d542f7d779 100644 --- a/assets/sorter.stories-pmGMfYhH.js +++ b/assets/sorter.stories--pe5jLyw.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const e={content:`**Arrange the following measurements in order from smallest to largest.** +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const e={content:`**Arrange the following measurements in order from smallest to largest.** [[☃ sorter 1]]`,images:{},widgets:{"sorter 1":{version:{major:0,minor:0},type:"sorter",graded:!0,options:{padding:!0,layout:"horizontal",correct:["$0.005$ kilograms","$15$ grams","$55$ grams"]}}}},Vr={title:"Perseus/Widgets/Sorter"},r=s=>m(p,{question:e});r.__docgenInfo={description:"",methods:[],displayName:"Question1"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/structured-item-diff-EmSySxnw.js b/assets/structured-item-diff-UZ_vLVui.js similarity index 94% rename from assets/structured-item-diff-EmSySxnw.js rename to assets/structured-item-diff-UZ_vLVui.js index e609d51bc4..642408ac5d 100644 --- a/assets/structured-item-diff-EmSySxnw.js +++ b/assets/structured-item-diff-UZ_vLVui.js @@ -1,4 +1,4 @@ -import{j as d,a as k}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import{_ as y}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import{d as U,e as W,g as B,s as $}from"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import{g as ie,s as ae}from"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{r as N}from"./index-TT1qJ6UJ.js";import{T as oe}from"./text-diff-yU5JXCsK.js";import{c as de}from"./components-V6aclUoQ.js";import{c as A}from"./index-dnMhQZ-1.js";import{P as i}from"./index-0C4KXdeC.js";import{T as pe}from"./tags-diff-Nd2k4lKQ.js";const V="unchanged",Y="changed",Z="added",_="removed",le=function(s,e,t){let n;return s===e?n=V:s===void 0?n=Z:e===void 0?n=_:n=Y,{after:JSON.stringify(e),before:JSON.stringify(s),children:[],key:t,status:n}},ce=function(s,e,t){const n=y.isObject(s)?y(s).keys():[],r=y.isObject(e)?y(e).keys():[],o=y.union(n,r),a=y.map(o,function(c){return ee((s||{})[c],(e||{})[c],c)});let p;return s===void 0?p=Z:e===void 0?p=_:p=y.any(a,function(h){return h.status!==V})?Y:V,{after:"",before:"",children:a,key:t,status:p}},ee=function(s,e,t){return typeof s=="object"||typeof e=="object"?ce(s,e,t):le(s,e,t)},{SvgImage:z}=de,te=function(s){return(s-1)*20},C="before",j="after",ue="unchanged",F=class F extends N.Component{render(){const e=A(this.props.className,{"diff-row":!0,before:this.props.side===C,after:this.props.side===j});return d("div",{className:e,children:k("div",{style:{paddingLeft:te(this.props.depth)},children:[this.props.showKey&&this.props.propKey+": ",d("span",{className:"inner-value dark "+this.props.className,children:this.props.value})]})})}};F.propTypes={className:i.string.isRequired,depth:i.number.isRequired,propKey:i.string.isRequired,showKey:i.bool.isRequired,side:i.oneOf([C,j]).isRequired,value:i.string};let S=F;const K=class K extends N.Component{render(){const e=this;return d("div",{onClick:e.props.onClick,style:{clear:"both"},children:y.map([C,j],function(t){return d("div",{className:"diff-row collapsed "+t,children:d("div",{style:{paddingLeft:te(e.props.depth)},children:d("span",{children:" [ show unmodified ] "})})},t)})})}};K.propTypes={depth:i.number,onClick:i.func.isRequired},K.defaultProps={depth:0};let I=K;const R=class R extends N.Component{constructor(){super(...arguments),this.state={expanded:this.props.expanded},this.expand=()=>{this.setState({expanded:!0})}}render(){const e=this.props.entry,t=e.status==="removed",n=e.status==="added",r=e.status==="changed",o=e.children.length>0,a=A({removed:t||r&&!o,dark:t,"blank-space":n}),p=A({added:n||r&&!o,dark:n,"blank-space":t});let c;this.state.expanded?c=e.children:c=y(e.children).select(function(m){return m.status!==ue});let h=c.length1&&(a.alignment=t),o==="transformer"&&(a.graded=n),ae(o)&&(a.static=(s==null?void 0:s.static)??void 0),a},J=class J extends N.Component{render(){const{after:e,before:t,showAlignmentOptions:n,showSeparator:r,title:o}=this.props;let a,p;(t.content||e.content)&&(a=d(oe,{before:t.content,after:e.content,title:o}));const c=Object.keys(t.widgets??{}).filter(w=>t.content.includes(w)),h=Object.keys(e.widgets??{}).filter(w=>e.content.includes(w));return(c.length||h.length)&&(p=y.union(c,h).map(m=>{var l,f,u,P;return d(E,{before:Q((l=t.widgets)==null?void 0:l[m],n),after:Q((f=e.widgets)==null?void 0:f[m],n),title:m,type:(((u=t.widgets)==null?void 0:u[m])??{}).type||(((P=e.widgets)==null?void 0:P[m])??{}).type},m)})),k("div",{children:[a,p,r&&d("div",{className:"diff-separator"})]})}};J.defaultProps={after:{content:"",images:{},widgets:{}},before:{content:"",images:{},widgets:{}},showAlignmentOptions:!1,showSeparator:!1};let M=J;M.__docgenInfo={description:"",methods:[],displayName:"RendererDiff",props:{after:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{j as d,a as k}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import{_ as y}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import{d as U,e as W,g as B,s as $}from"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import{g as ie,s as ae}from"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{r as N}from"./index-TT1qJ6UJ.js";import{T as oe}from"./text-diff-ftiYrVyQ.js";import{c as de}from"./components-yT7oveOH.js";import{c as A}from"./index-dnMhQZ-1.js";import{P as i}from"./index-0C4KXdeC.js";import{T as pe}from"./tags-diff-wQwsbtqj.js";const V="unchanged",Y="changed",Z="added",_="removed",le=function(s,e,t){let n;return s===e?n=V:s===void 0?n=Z:e===void 0?n=_:n=Y,{after:JSON.stringify(e),before:JSON.stringify(s),children:[],key:t,status:n}},ce=function(s,e,t){const n=y.isObject(s)?y(s).keys():[],r=y.isObject(e)?y(e).keys():[],o=y.union(n,r),a=y.map(o,function(c){return ee((s||{})[c],(e||{})[c],c)});let p;return s===void 0?p=Z:e===void 0?p=_:p=y.any(a,function(h){return h.status!==V})?Y:V,{after:"",before:"",children:a,key:t,status:p}},ee=function(s,e,t){return typeof s=="object"||typeof e=="object"?ce(s,e,t):le(s,e,t)},{SvgImage:z}=de,te=function(s){return(s-1)*20},C="before",j="after",ue="unchanged",F=class F extends N.Component{render(){const e=A(this.props.className,{"diff-row":!0,before:this.props.side===C,after:this.props.side===j});return d("div",{className:e,children:k("div",{style:{paddingLeft:te(this.props.depth)},children:[this.props.showKey&&this.props.propKey+": ",d("span",{className:"inner-value dark "+this.props.className,children:this.props.value})]})})}};F.propTypes={className:i.string.isRequired,depth:i.number.isRequired,propKey:i.string.isRequired,showKey:i.bool.isRequired,side:i.oneOf([C,j]).isRequired,value:i.string};let S=F;const K=class K extends N.Component{render(){const e=this;return d("div",{onClick:e.props.onClick,style:{clear:"both"},children:y.map([C,j],function(t){return d("div",{className:"diff-row collapsed "+t,children:d("div",{style:{paddingLeft:te(e.props.depth)},children:d("span",{children:" [ show unmodified ] "})})},t)})})}};K.propTypes={depth:i.number,onClick:i.func.isRequired},K.defaultProps={depth:0};let I=K;const R=class R extends N.Component{constructor(){super(...arguments),this.state={expanded:this.props.expanded},this.expand=()=>{this.setState({expanded:!0})}}render(){const e=this.props.entry,t=e.status==="removed",n=e.status==="added",r=e.status==="changed",o=e.children.length>0,a=A({removed:t||r&&!o,dark:t,"blank-space":n}),p=A({added:n||r&&!o,dark:n,"blank-space":t});let c;this.state.expanded?c=e.children:c=y(e.children).select(function(m){return m.status!==ue});let h=c.length1&&(a.alignment=t),o==="transformer"&&(a.graded=n),ae(o)&&(a.static=(s==null?void 0:s.static)??void 0),a},J=class J extends N.Component{render(){const{after:e,before:t,showAlignmentOptions:n,showSeparator:r,title:o}=this.props;let a,p;(t.content||e.content)&&(a=d(oe,{before:t.content,after:e.content,title:o}));const c=Object.keys(t.widgets??{}).filter(w=>t.content.includes(w)),h=Object.keys(e.widgets??{}).filter(w=>e.content.includes(w));return(c.length||h.length)&&(p=y.union(c,h).map(m=>{var l,f,u,P;return d(E,{before:Q((l=t.widgets)==null?void 0:l[m],n),after:Q((f=e.widgets)==null?void 0:f[m],n),title:m,type:(((u=t.widgets)==null?void 0:u[m])??{}).type||(((P=e.widgets)==null?void 0:P[m])??{}).type},m)})),k("div",{children:[a,p,r&&d("div",{className:"diff-separator"})]})}};J.defaultProps={after:{content:"",images:{},widgets:{}},before:{content:"",images:{},widgets:{}},showAlignmentOptions:!1,showSeparator:!1};let M=J;M.__docgenInfo={description:"",methods:[],displayName:"RendererDiff",props:{after:{required:!1,tsType:{name:"signature",type:"object",raw:`{ content: string; // NOTE: images and widgets may not be set for some items hints, // specifically in old revisions, which may only be loaded for diffing. diff --git a/assets/structured-item-diff.stories-TVyqhX33.js b/assets/structured-item-diff.stories-0VB9CdqV.js similarity index 95% rename from assets/structured-item-diff.stories-TVyqhX33.js rename to assets/structured-item-diff.stories-0VB9CdqV.js index 99a472686a..d1db5810a7 100644 --- a/assets/structured-item-diff.stories-TVyqhX33.js +++ b/assets/structured-item-diff.stories-0VB9CdqV.js @@ -1,4 +1,4 @@ -import{_ as I}from"./iframe-_HOM8AA9.js";import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{S as a}from"./structured-item-diff-EmSySxnw.js";import{W as b}from"./perseus-diff-wrapper-dJxBlkDd.js";import"../sb-preview/runtime.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./text-diff-yU5JXCsK.js";import"./components-V6aclUoQ.js";import"./index-0C4KXdeC.js";import"./tags-diff-Nd2k4lKQ.js";I(()=>Promise.resolve({}),__vite__mapDeps([0]),import.meta.url);const qt={title:"PerseusEditor/Diffs/Structured Item Diff",decorators:[e=>t(b,{children:t(e,{})})]},c={a:"a tag",b:"b tag",c:"c tag"},i=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),s=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),o=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}},{type:"hint",content:"hint 3",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}},{type:"hint",content:"question hint 2",images:{},widgets:{}},{type:"hint",content:"question hint 3",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),p=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}});i.__docgenInfo={description:"",methods:[],displayName:"ContentAdded"};s.__docgenInfo={description:"",methods:[],displayName:"ContentAddedRemovedAndChanged"};o.__docgenInfo={description:"",methods:[],displayName:"MiscContentChanges"};p.__docgenInfo={description:"",methods:[],displayName:"ContentRemoved"};var r,m,d;i.parameters={...i.parameters,docs:{...(r=i.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{_ as I}from"./iframe-7PiyMb9T.js";import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{S as a}from"./structured-item-diff-UZ_vLVui.js";import{W as b}from"./perseus-diff-wrapper-dJxBlkDd.js";import"../sb-preview/runtime.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./text-diff-ftiYrVyQ.js";import"./components-yT7oveOH.js";import"./index-0C4KXdeC.js";import"./tags-diff-wQwsbtqj.js";I(()=>Promise.resolve({}),__vite__mapDeps([0]),import.meta.url);const qt={title:"PerseusEditor/Diffs/Structured Item Diff",decorators:[e=>t(b,{children:t(e,{})})]},c={a:"a tag",b:"b tag",c:"c tag"},i=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),s=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),o=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}},{type:"hint",content:"hint 3",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}},{type:"hint",content:"question hint 2",images:{},widgets:{}},{type:"hint",content:"question hint 3",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),p=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}});i.__docgenInfo={description:"",methods:[],displayName:"ContentAdded"};s.__docgenInfo={description:"",methods:[],displayName:"ContentAddedRemovedAndChanged"};o.__docgenInfo={description:"",methods:[],displayName:"MiscContentChanges"};p.__docgenInfo={description:"",methods:[],displayName:"ContentRemoved"};var r,m,d;i.parameters={...i.parameters,docs:{...(r=i.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ before: { _multi: { diff --git a/assets/svg-image-vbtSDKh6.js b/assets/svg-image-4Vh9uTQ6.js similarity index 99% rename from assets/svg-image-vbtSDKh6.js rename to assets/svg-image-4Vh9uTQ6.js index 0b65ebf9f6..0d1c8510c2 100644 --- a/assets/svg-image-vbtSDKh6.js +++ b/assets/svg-image-4Vh9uTQ6.js @@ -1,4 +1,4 @@ -var On=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var Ee=(i,t,e)=>(On(i,t,"read from private field"),e?e.call(i):t.get(i)),Ti=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},ki=(i,t,e,o)=>(On(i,t,"write to private field"),o?o.call(i,e):t.set(i,e),e);import{j as zt,a as _i}from"./jsx-runtime-FVsy8kgq.js";import"./version-akiLXZts.js";import{b as eo,e as cs,c as io,f as no,d as so,P as $t,E as Ft,K as Xt,r as oo,s as ro,U as _t}from"./util-F8-MDmsT.js";import{r as ie}from"./index-TT1qJ6UJ.js";import{l as ao}from"./index-awljIyHI.js";import{b as lo,V as co,R as ho}from"./index-6h5t6F0w.js";import{c as ae}from"./index-deFLJwr4.js";import{c as uo}from"./index-dnMhQZ-1.js";import{$ as P,_ as y}from"./jquery-yG1GhClm.js";import{g as se}from"./dependencies-8XILypbq.js";import{F as Vn}from"./fixed-to-responsive-AkRQxH3P.js";import{R as fo}from"./index-7vsPyIck.js";import{e as po}from"./index-J2t_5nK1.js";import{a as mo}from"./client-rbWgHzHN.js";import{I as go}from"./inline-icon-NjJlm7d0.js";import{i as vo}from"./icon-paths-5JCXzGsq.js";import{I as Qe}from"./image-loader-44YtE05i.js";const Fe={log:(i,t)=>{se().Log.log(i,t)},error:(i,t,e)=>{se().Log.error(i,t,e)}};function hs(i){return i.reduce((t,e)=>t+e,0)}function bo(i){return i.reduce((t,e)=>t*e,1)}function Be(...i){const t=Math.min(...i.map(o=>o.length)),e=[];for(let o=0;oa[o]));return e}function ha(i,t){return[t(i[0],0),t(i[1],1)]}function yo(i,t){return!Array.isArray(i)||t!==void 0&&i.length!==t?!1:i.every(eo)}function Di(i){return Pt(i,1/Zi(i))}function Zi(i){return Math.sqrt(Ni(i,i))}function Ni(i,t){const o=Be(i,t).map(bo);return hs(o)}function ct(...i){return Be(...i).map(hs)}function ht(i,t){return Be(i,t).map(e=>e[0]-e[1])}function wo(i){return i.map(t=>-t)}function Pt(i,t){return i.map(e=>e*t)}function xo(i,t,e){return i.length===t.length&&Be(i,t).every(o=>cs(o[0],o[1],e))}function Mo(i){const t=Zi(i);let e=Math.atan2(i[1],i[0]);return e<0&&(e+=2*Math.PI),[t,e]}function qt(i){const t=Mo(i);return[t[0],t[1]*180/Math.PI]}function So(i,t=0){return[i*Math.cos(t),i*Math.sin(t)]}function ve(i,t=0){return So(i,t*Math.PI/180)}function ti(i,t){const e=qt(i),o=e[1]+t;return ve(e[0],o)}function To(i,t){const e=Ni(i,t)/Ni(t,t);return Pt(t,e)}function ko(i,t){return i.map((e,o)=>io(e,t[o]||t))}function _o(i,t){return i.map((e,o)=>no(e,t[o]||t))}function Co(i,t){return i.map((e,o)=>so(e,t[o]||t))}function us(i,t){return Zi(ht(i,t))}function ua(i,t){const e=ht(t[1],t[0]),o=ht(i,t[0]),a=To(o,e),h=ht(Pt(a,2),o);return ct(t[0],h)}const Jt=yo,Gn=ct,ge=ct,Wi=xo,$i=ko,Ki=_o,ji=Co;function zn(i){return[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]}const Ao={xsmall:16,small:24,medium:48,large:96},Po={xsmall:"M7.237.741C7.165.393 6.95.154 6.656.053A1.01 1.01 0 0 0 6.18.01c-.053.009-.053.009-.087.017C2.553.949 0 4.214 0 7.91 0 12.36 3.598 16 8 16c4.4 0 8-3.647 8-8.112a1.02 1.02 0 0 0-.118-.423.877.877 0 0 0-.808-.48.909.909 0 0 0-.81.46c-.09.151-.13.296-.146.455-.08 3.493-2.737 6.207-6.118 6.207-3.41 0-6.118-2.74-6.118-6.196 0-2.843 1.936-5.291 4.644-6.022.1-.028.224-.082.352-.177a.928.928 0 0 0 .36-.97z",small:"M10.598.943c-.093-.449-.362-.748-.732-.875a1.314 1.314 0 0 0-.723-.033C3.83 1.417 0 6.317 0 11.864 0 18.538 5.398 24 12 24c6.598 0 12-5.471 12-12.16a1.333 1.333 0 0 0-.154-.548c-.193-.368-.544-.606-1.023-.606-.472 0-.825.229-1.035.585-.117.2-.169.39-.189.582-.124 5.472-4.294 9.73-9.599 9.73-5.349 0-9.599-4.3-9.599-9.72 0-4.46 3.036-8.299 7.28-9.444.127-.036.291-.107.458-.232.373-.28.57-.711.46-1.244z",medium:"M44.19 23.455a1.91 1.91 0 1 1 3.801 0h.003c.004.18.006.363.006.545 0 13.255-10.745 24-24 24S0 37.255 0 24 10.745 0 24 0c.182 0 .364.002.545.006V.01a1.91 1.91 0 1 1 0 3.801v.015A20.564 20.564 0 0 0 24 3.818C12.854 3.818 3.818 12.854 3.818 24c0 11.146 9.036 20.182 20.182 20.182 11.146 0 20.182-9.036 20.182-20.182 0-.182-.003-.364-.007-.545h.015z",large:"M88.38 46.91a3.818 3.818 0 1 1 7.602 0h.006c.008.362.012.725.012 1.09 0 26.51-21.49 48-48 48S0 74.51 0 48 21.49 0 48 0c.365 0 .728.004 1.09.012v.005a3.818 3.818 0 1 1 0 7.602v.032c-.362-.01-.725-.015-1.09-.015C25.708 7.636 7.636 25.708 7.636 48c0 22.292 18.072 40.364 40.364 40.364 22.292 0 40.364-18.072 40.364-40.364 0-.365-.005-.728-.015-1.09h.032z"},Hn={light:ae.white,dark:ae.offBlack16},Eo=lo("path");class ds extends ie.Component{render(){const{size:t,light:e,style:o,testId:a}=this.props,h=Ao[t],d=Po[t],g=e?Hn.light:Hn.dark,w=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:`0 0 ${h} ${h}`,"data-testid":a},ie.createElement(Eo,{style:[Yn.loadingSpinner,{fill:g}],fillRule:"nonzero",d}));return ie.createElement(co,{style:[Yn.spinnerContainer,o]},w)}}ds.defaultProps={size:"large",light:!1};const Lo={"0%":{transform:"rotate(0deg)"},"50%":{transform:"rotate(180deg)"},"100%":{transform:"rotate(360deg)"}},Yn=ao.StyleSheet.create({spinnerContainer:{justifyContent:"center"},loadingSpinner:{transformOrigin:"50% 50%",animationName:Lo,animationDuration:"1.1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}});function Io(){const i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(const e in t)if(i.style[e]!==void 0)return{end:t[e]};return!1}P.fn.emulateTransitionEnd=function(i){let t=!1;const e=this;return P(this).one("bsTransitionEnd",function(){t=!0}),setTimeout(function(){t||P(e).trigger(P.support.transition.end)},i),this};P(function(){P.support.transition=Io(),P.support.transition&&(P.event.special.bsTransitionEnd={bindType:P.support.transition.end,delegateType:P.support.transition.end,handle:function(i){if(P(i.target).is(this))return i.handleObj.handler.apply(this,arguments)}})});function fs(i,t){const e=window.scrollX,o=window.scrollY,a=document.querySelector("meta[name=viewport]");a?a.setAttribute("content",i):P("head").append(``),document.body.style.opacity=.9999,setTimeout(()=>{document.body.style.opacity=1,window.scrollTo(e,o),t&&setTimeout(t,0)},0)}function Ut(){}Ut.prototype._initialize=function(i){this._$document||(this._activeZoom=this._initialScrollPosition=this._initialTouchPosition=this._touchMoveListener=null,this._$document=P(document),this._$window=P(window),this._$body=P(document.body),this._boundClick=P.proxy(this._clickHandler,this),this._enableMobilePinch=i)};Ut.prototype.handleZoomClick=function(i,t){this._initialize(t);const e=i.target;if(!(!e||e.tagName!=="IMG")&&!this._$body.hasClass("zoom-overlay-open")){if(i.metaKey||i.ctrlKey)return window.open(i.target.src,"_blank");!t&&e.width>=window.innerWidth-Et.getOffset()||(this._activeZoomClose(!0),t?fs("width=device-width, initial-scale=1, minimum-scale=1",()=>this._zoom(e)):this._zoom(e),t||(this._$window.on("scroll.zoom",P.proxy(this._scrollHandler,this)),this._$document.on("keyup.zoom",P.proxy(this._keyHandler,this)),this._$document.on("touchstart.zoom",P.proxy(this._touchStart,this))),document.addEventListener("click",this._boundClick,!0),i.stopPropagation())}};Ut.prototype._zoom=function(i){this._activeZoom=new Et(i,this._enableMobilePinch),this._activeZoom.zoomImage()};Ut.prototype._activeZoomClose=function(i){this._activeZoom&&(i?(this._activeZoom.dispose(),this._disposeActiveZoom()):fs(`width=device-width, initial-scale=1, minimum-scale=1, +var On=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var Ee=(i,t,e)=>(On(i,t,"read from private field"),e?e.call(i):t.get(i)),Ti=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},ki=(i,t,e,o)=>(On(i,t,"write to private field"),o?o.call(i,e):t.set(i,e),e);import{j as zt,a as _i}from"./jsx-runtime-FVsy8kgq.js";import"./version-akiLXZts.js";import{b as eo,e as cs,c as io,f as no,d as so,P as $t,E as Ft,K as Xt,r as oo,s as ro,U as _t}from"./util-F8-MDmsT.js";import{r as ie}from"./index-TT1qJ6UJ.js";import{l as ao}from"./index-awljIyHI.js";import{b as lo,V as co,R as ho}from"./index-6h5t6F0w.js";import{c as ae}from"./index-deFLJwr4.js";import{c as uo}from"./index-dnMhQZ-1.js";import{$ as P,_ as y}from"./jquery-yG1GhClm.js";import{g as se}from"./dependencies-d8cZibFS.js";import{F as Vn}from"./fixed-to-responsive-AkRQxH3P.js";import{R as fo}from"./index-7vsPyIck.js";import{e as po}from"./index-J2t_5nK1.js";import{a as mo}from"./client-rbWgHzHN.js";import{I as go}from"./inline-icon-NjJlm7d0.js";import{i as vo}from"./icon-paths-5JCXzGsq.js";import{I as Qe}from"./image-loader-3HliPbpF.js";const Fe={log:(i,t)=>{se().Log.log(i,t)},error:(i,t,e)=>{se().Log.error(i,t,e)}};function hs(i){return i.reduce((t,e)=>t+e,0)}function bo(i){return i.reduce((t,e)=>t*e,1)}function Be(...i){const t=Math.min(...i.map(o=>o.length)),e=[];for(let o=0;oa[o]));return e}function ha(i,t){return[t(i[0],0),t(i[1],1)]}function yo(i,t){return!Array.isArray(i)||t!==void 0&&i.length!==t?!1:i.every(eo)}function Di(i){return Pt(i,1/Zi(i))}function Zi(i){return Math.sqrt(Ni(i,i))}function Ni(i,t){const o=Be(i,t).map(bo);return hs(o)}function ct(...i){return Be(...i).map(hs)}function ht(i,t){return Be(i,t).map(e=>e[0]-e[1])}function wo(i){return i.map(t=>-t)}function Pt(i,t){return i.map(e=>e*t)}function xo(i,t,e){return i.length===t.length&&Be(i,t).every(o=>cs(o[0],o[1],e))}function Mo(i){const t=Zi(i);let e=Math.atan2(i[1],i[0]);return e<0&&(e+=2*Math.PI),[t,e]}function qt(i){const t=Mo(i);return[t[0],t[1]*180/Math.PI]}function So(i,t=0){return[i*Math.cos(t),i*Math.sin(t)]}function ve(i,t=0){return So(i,t*Math.PI/180)}function ti(i,t){const e=qt(i),o=e[1]+t;return ve(e[0],o)}function To(i,t){const e=Ni(i,t)/Ni(t,t);return Pt(t,e)}function ko(i,t){return i.map((e,o)=>io(e,t[o]||t))}function _o(i,t){return i.map((e,o)=>no(e,t[o]||t))}function Co(i,t){return i.map((e,o)=>so(e,t[o]||t))}function us(i,t){return Zi(ht(i,t))}function ua(i,t){const e=ht(t[1],t[0]),o=ht(i,t[0]),a=To(o,e),h=ht(Pt(a,2),o);return ct(t[0],h)}const Jt=yo,Gn=ct,ge=ct,Wi=xo,$i=ko,Ki=_o,ji=Co;function zn(i){return[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]}const Ao={xsmall:16,small:24,medium:48,large:96},Po={xsmall:"M7.237.741C7.165.393 6.95.154 6.656.053A1.01 1.01 0 0 0 6.18.01c-.053.009-.053.009-.087.017C2.553.949 0 4.214 0 7.91 0 12.36 3.598 16 8 16c4.4 0 8-3.647 8-8.112a1.02 1.02 0 0 0-.118-.423.877.877 0 0 0-.808-.48.909.909 0 0 0-.81.46c-.09.151-.13.296-.146.455-.08 3.493-2.737 6.207-6.118 6.207-3.41 0-6.118-2.74-6.118-6.196 0-2.843 1.936-5.291 4.644-6.022.1-.028.224-.082.352-.177a.928.928 0 0 0 .36-.97z",small:"M10.598.943c-.093-.449-.362-.748-.732-.875a1.314 1.314 0 0 0-.723-.033C3.83 1.417 0 6.317 0 11.864 0 18.538 5.398 24 12 24c6.598 0 12-5.471 12-12.16a1.333 1.333 0 0 0-.154-.548c-.193-.368-.544-.606-1.023-.606-.472 0-.825.229-1.035.585-.117.2-.169.39-.189.582-.124 5.472-4.294 9.73-9.599 9.73-5.349 0-9.599-4.3-9.599-9.72 0-4.46 3.036-8.299 7.28-9.444.127-.036.291-.107.458-.232.373-.28.57-.711.46-1.244z",medium:"M44.19 23.455a1.91 1.91 0 1 1 3.801 0h.003c.004.18.006.363.006.545 0 13.255-10.745 24-24 24S0 37.255 0 24 10.745 0 24 0c.182 0 .364.002.545.006V.01a1.91 1.91 0 1 1 0 3.801v.015A20.564 20.564 0 0 0 24 3.818C12.854 3.818 3.818 12.854 3.818 24c0 11.146 9.036 20.182 20.182 20.182 11.146 0 20.182-9.036 20.182-20.182 0-.182-.003-.364-.007-.545h.015z",large:"M88.38 46.91a3.818 3.818 0 1 1 7.602 0h.006c.008.362.012.725.012 1.09 0 26.51-21.49 48-48 48S0 74.51 0 48 21.49 0 48 0c.365 0 .728.004 1.09.012v.005a3.818 3.818 0 1 1 0 7.602v.032c-.362-.01-.725-.015-1.09-.015C25.708 7.636 7.636 25.708 7.636 48c0 22.292 18.072 40.364 40.364 40.364 22.292 0 40.364-18.072 40.364-40.364 0-.365-.005-.728-.015-1.09h.032z"},Hn={light:ae.white,dark:ae.offBlack16},Eo=lo("path");class ds extends ie.Component{render(){const{size:t,light:e,style:o,testId:a}=this.props,h=Ao[t],d=Po[t],g=e?Hn.light:Hn.dark,w=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:`0 0 ${h} ${h}`,"data-testid":a},ie.createElement(Eo,{style:[Yn.loadingSpinner,{fill:g}],fillRule:"nonzero",d}));return ie.createElement(co,{style:[Yn.spinnerContainer,o]},w)}}ds.defaultProps={size:"large",light:!1};const Lo={"0%":{transform:"rotate(0deg)"},"50%":{transform:"rotate(180deg)"},"100%":{transform:"rotate(360deg)"}},Yn=ao.StyleSheet.create({spinnerContainer:{justifyContent:"center"},loadingSpinner:{transformOrigin:"50% 50%",animationName:Lo,animationDuration:"1.1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}});function Io(){const i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(const e in t)if(i.style[e]!==void 0)return{end:t[e]};return!1}P.fn.emulateTransitionEnd=function(i){let t=!1;const e=this;return P(this).one("bsTransitionEnd",function(){t=!0}),setTimeout(function(){t||P(e).trigger(P.support.transition.end)},i),this};P(function(){P.support.transition=Io(),P.support.transition&&(P.event.special.bsTransitionEnd={bindType:P.support.transition.end,delegateType:P.support.transition.end,handle:function(i){if(P(i.target).is(this))return i.handleObj.handler.apply(this,arguments)}})});function fs(i,t){const e=window.scrollX,o=window.scrollY,a=document.querySelector("meta[name=viewport]");a?a.setAttribute("content",i):P("head").append(``),document.body.style.opacity=.9999,setTimeout(()=>{document.body.style.opacity=1,window.scrollTo(e,o),t&&setTimeout(t,0)},0)}function Ut(){}Ut.prototype._initialize=function(i){this._$document||(this._activeZoom=this._initialScrollPosition=this._initialTouchPosition=this._touchMoveListener=null,this._$document=P(document),this._$window=P(window),this._$body=P(document.body),this._boundClick=P.proxy(this._clickHandler,this),this._enableMobilePinch=i)};Ut.prototype.handleZoomClick=function(i,t){this._initialize(t);const e=i.target;if(!(!e||e.tagName!=="IMG")&&!this._$body.hasClass("zoom-overlay-open")){if(i.metaKey||i.ctrlKey)return window.open(i.target.src,"_blank");!t&&e.width>=window.innerWidth-Et.getOffset()||(this._activeZoomClose(!0),t?fs("width=device-width, initial-scale=1, minimum-scale=1",()=>this._zoom(e)):this._zoom(e),t||(this._$window.on("scroll.zoom",P.proxy(this._scrollHandler,this)),this._$document.on("keyup.zoom",P.proxy(this._keyHandler,this)),this._$document.on("touchstart.zoom",P.proxy(this._touchStart,this))),document.addEventListener("click",this._boundClick,!0),i.stopPropagation())}};Ut.prototype._zoom=function(i){this._activeZoom=new Et(i,this._enableMobilePinch),this._activeZoom.zoomImage()};Ut.prototype._activeZoomClose=function(i){this._activeZoom&&(i?(this._activeZoom.dispose(),this._disposeActiveZoom()):fs(`width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1`,()=>{this._activeZoom&&(this._activeZoom.close(),this._disposeActiveZoom())}))};Ut.prototype._disposeActiveZoom=function(){this._$window.off(".zoom"),this._$document.off(".zoom"),document.removeEventListener("click",this._boundClick,!0),this._activeZoom=null};Ut.prototype._scrollHandler=function(i){this._initialScrollPosition===null&&(this._initialScrollPosition=window.scrollY);const t=this._initialScrollPosition-window.scrollY;Math.abs(t)>=40&&this._activeZoomClose()};Ut.prototype._keyHandler=function(i){i.keyCode===27&&this._activeZoomClose()};Ut.prototype._clickHandler=function(i){i.stopPropagation(),i.preventDefault(),this._activeZoomClose()};Ut.prototype._touchStart=function(i){this._initialTouchPosition=i.originalEvent.touches[0].pageY,P(i.target).on("touchmove.zoom",P.proxy(this._touchMove,this))};Ut.prototype._touchMove=function(i){Math.abs(i.originalEvent.touches[0].pageY-this._initialTouchPosition)>10&&(this._activeZoomClose(),P(i.target).off("touchmove.zoom"))};function Et(i,t){this._fullHeight=this._fullWidth=this._overlay=null,this._targetImage=i,this._enableMobilePinch=t,this._$body=P(document.body)}Et._OFFSET=80;Et._MAX_WIDTH=2560;Et._MAX_HEIGHT=4096;Et.getOffset=function(i){return i?0:Et._OFFSET};Et.prototype.getOffset=function(){return Et.getOffset(this._enableMobilePinch)};Et.prototype.zoomImage=function(){const i=document.createElement("img"),t=P(i);i.onload=(function(){this._fullHeight=Number(i.height),this._fullWidth=Number(i.width);const e=this._imageOffset=P(this._targetImage).offset(),o=this._left=e.left-P(window).scrollLeft(),a=this._top=e.top-P(window).scrollTop();t.css({left:o,top:a,width:this._targetImage.width,height:this._targetImage.height}),this._zoomOriginal()}).bind(this),i.src=this._targetImage.src,this.$zoomedImage=t};Et.prototype._zoomOriginal=function(){var i,t,e;this.$zoomedImage.addClass("zoom-img").attr("data-action","zoom-out"),P(this._targetImage).css("visibility","hidden"),this._backdrop=document.createElement("div"),this._backdrop.className="zoom-backdrop",(i=document.body)==null||i.appendChild(this._backdrop),this._overlay=document.createElement("div"),this._overlay.className="zoom-overlay",(t=document.body)==null||t.appendChild(this._overlay),(e=this._overlay)==null||e.appendChild(this.$zoomedImage[0]),this._calculateZoom(),this._triggerAnimation()};Et.prototype._calculateZoom=function(){const i=this._fullWidth,t=this._fullHeight,e=window.innerHeight-this.getOffset(),o=window.innerWidth-this.getOffset(),a=i/this._targetImage.width,h=i/t,d=o/e;i{e.onSelectItem(r),c(r)}})}const t={argTypes:{selectedItem:{options:["Numbers","Geometry","Operators"]}},args:{items:["Numbers","Geometry","Operators"]},parameters:{controls:{exclude:["items","onSelectItem","selectedItem","onClickClose"]}},render:e=>a(l,{...e})};var o,s,m;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`{ +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{r as i}from"./index-TT1qJ6UJ.js";import{T as n}from"./tabbar-WYCYDof0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const O={title:"math-input/components/Tab Bar",component:n};function l(e){const[p,c]=i.useState("Numbers");return a(n,{...e,selectedItem:p,onSelectItem:r=>{e.onSelectItem(r),c(r)}})}const t={argTypes:{selectedItem:{options:["Numbers","Geometry","Operators"]}},args:{items:["Numbers","Geometry","Operators"]},parameters:{controls:{exclude:["items","onSelectItem","selectedItem","onClickClose"]}},render:e=>a(l,{...e})};var o,s,m;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`{ argTypes: { selectedItem: { options: ["Numbers", "Geometry", "Operators"] diff --git a/assets/tabbaritem.stories-mdibAqRo.js b/assets/tabbaritem.stories-mdibAqRo.js index a216874ffc..b7ee914b8a 100644 --- a/assets/tabbaritem.stories-mdibAqRo.js +++ b/assets/tabbaritem.stories-mdibAqRo.js @@ -1,4 +1,4 @@ -import{T as o}from"./item-X9tjzx12.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-2dmvOE3q.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const g={title:"math-input/components/Tab Bar Item",component:o},t={args:{itemState:"inactive",itemType:"Numbers"}};var e,r,m;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:`{ +import{T as o}from"./item-X9tjzx12.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-WNT3sUKf.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const g={title:"math-input/components/Tab Bar Item",component:o},t={args:{itemState:"inactive",itemType:"Numbers"}};var e,r,m;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:`{ args: { itemState: ("inactive" as const), itemType: "Numbers" diff --git a/assets/tags-diff-Nd2k4lKQ.js b/assets/tags-diff-wQwsbtqj.js similarity index 90% rename from assets/tags-diff-Nd2k4lKQ.js rename to assets/tags-diff-wQwsbtqj.js index e6fbe65031..bed94fc6a6 100644 --- a/assets/tags-diff-Nd2k4lKQ.js +++ b/assets/tags-diff-wQwsbtqj.js @@ -1,4 +1,4 @@ -import{a as d,j as t}from"./jsx-runtime-FVsy8kgq.js";import{r as p}from"./index-TT1qJ6UJ.js";import{T as f}from"./text-diff-yU5JXCsK.js";const a=class a extends p.Component{render(){const{afterOnly:s,beforeOnly:n,intersection:r,showSeparator:o}=this.props,i=r.concat(n).join(` +import{a as d,j as t}from"./jsx-runtime-FVsy8kgq.js";import{r as p}from"./index-TT1qJ6UJ.js";import{T as f}from"./text-diff-ftiYrVyQ.js";const a=class a extends p.Component{render(){const{afterOnly:s,beforeOnly:n,intersection:r,showSeparator:o}=this.props,i=r.concat(n).join(` `)+` `,l=r.concat(s).join(` `)+` diff --git a/assets/tags-diff.stories-lx3zgqPw.js b/assets/tags-diff.stories-Ph7yn91K.js similarity index 64% rename from assets/tags-diff.stories-lx3zgqPw.js rename to assets/tags-diff.stories-Ph7yn91K.js index 5bc0d71e07..1a153eb6b7 100644 --- a/assets/tags-diff.stories-lx3zgqPw.js +++ b/assets/tags-diff.stories-Ph7yn91K.js @@ -1,3 +1,3 @@ -import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{T as e}from"./tags-diff-Nd2k4lKQ.js";import{W as s}from"./perseus-diff-wrapper-dJxBlkDd.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./text-diff-yU5JXCsK.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./index-0C4KXdeC.js";const Zr={title:"PerseusEditor/Diffs/Tags Diff",decorators:[o=>t(s,{children:t(o,{})})]},r=o=>t(e,{title:"tags",beforeOnly:["Math","Biology","History"],afterOnly:["World War I"],intersection:["Physics","Chemistry"]});r.__docgenInfo={description:"",methods:[],displayName:"Example"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{T as e}from"./tags-diff-wQwsbtqj.js";import{W as s}from"./perseus-diff-wrapper-dJxBlkDd.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./text-diff-ftiYrVyQ.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./index-0C4KXdeC.js";const Zr={title:"PerseusEditor/Diffs/Tags Diff",decorators:[o=>t(s,{children:t(o,{})})]},r=o=>t(e,{title:"tags",beforeOnly:["Math","Biology","History"],afterOnly:["World War I"],intersection:["Physics","Chemistry"]});r.__docgenInfo={description:"",methods:[],displayName:"Example"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const $r=["Example"];export{r as Example,$r as __namedExportsOrder,Zr as default}; diff --git a/assets/test-dependencies-zutb-QBJ.js b/assets/test-dependencies-fGmEXWK4.js similarity index 57% rename from assets/test-dependencies-zutb-QBJ.js rename to assets/test-dependencies-fGmEXWK4.js index a3bc67ca00..b37147924d 100644 --- a/assets/test-dependencies-zutb-QBJ.js +++ b/assets/test-dependencies-fGmEXWK4.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{r as u}from"./register-all-widgets-for-testing-I8cwOiut.js";import{d as c}from"./key-translator-Bl2XtQm9.js";import{r as n}from"./index-TT1qJ6UJ.js";const s=new c.MathJaxRenderer({shouldFixUnicodeLayout:!0,fontURL:"https://cdn.kastatic.org/fonts/mathjax",locale:"en"});function a({children:e,onRender:t}){const o=n.useRef(null),{domElement:i,addLabelWhenPresentational:d}=n.useMemo(()=>s.render(e),[e]);return n.useLayoutEffect(()=>{o.current&&(d(o.current),o.current.innerHTML="",o.current.appendChild(i))}),n.useEffect(()=>{s.updateStyles(),t==null||t()},[e,t]),r("span",{ref:o})}a.__docgenInfo={description:"",methods:[],displayName:"TestMathjax",props:{children:{required:!0,tsType:{name:"string"},description:""},onRender:{required:!1,tsType:{name:"signature",type:"function",raw:"(root?: any) => unknown",signature:{arguments:[{type:{name:"any"},name:"root"}],return:{name:"unknown"}}},description:""}}};u();const l={log:()=>{},error:()=>{}},p={JIPT:{useJIPT:!1},graphieMovablesJiptLabels:{addLabel:(e,t)=>{}},svgImageJiptLabels:{addLabel:(e,t)=>{}},rendererTranslationComponents:{addComponent:e=>-1,removeComponentAtIndex:e=>{}},logKaTeXError:(e,t)=>Promise.resolve({}),TeX:({children:e})=>r("span",{className:"mock-TeX",children:e}),staticUrl:e=>`mockStaticUrl(${e})`,useVideo:(e,t)=>e==="YoutubeId"&&t==="YOUTUBE_ID"?{status:"success",data:{video:{id:"YoutubeVideo",contentId:"contentId",youtubeId:"YoutubeId",title:"Youtube Video Title",__typename:"Video"}}}:e==="slug-video-id"&&t==="READABLE_ID"?{status:"success",data:{video:{title:"Slug Video Title",id:"VideoId",youtubeId:"YoutubeId",contentId:"contentId",__typename:"Video"}}}:{status:"loading"},InitialRequestUrl:{origin:"origin-test-interface",host:"host-test-interface",protocol:"protocol-test-interface"},isDevServer:!1,kaLocale:"en",Log:l},I={...p,TeX:a,staticUrl:e=>e},T={analytics:{onAnalyticsEvent:async e=>{console.log("⚡️ Sending analytics event:",e)}}};export{I as a,T as s}; +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{r as c}from"./register-all-widgets-for-testing-xxgCysIB.js";import{d as u}from"./key-translator-Bl2XtQm9.js";import{r as s}from"./index-TT1qJ6UJ.js";const o=new u.MathJaxRenderer({shouldFixUnicodeLayout:!0,fontURL:"https://cdn.kastatic.org/fonts/mathjax",locale:"en"});function a({children:e,onRender:t}){const n=s.useRef(null),{domElement:i,addLabelWhenPresentational:d}=s.useMemo(()=>o.render(e),[e]);return s.useLayoutEffect(()=>{n.current&&(d(n.current),n.current.innerHTML="",n.current.appendChild(i))}),s.useEffect(()=>{o.updateStyles(),t==null||t()},[e,t]),r("span",{ref:n})}a.__docgenInfo={description:"",methods:[],displayName:"TestMathjax",props:{children:{required:!0,tsType:{name:"string"},description:""},onRender:{required:!1,tsType:{name:"signature",type:"function",raw:"(root?: any) => unknown",signature:{arguments:[{type:{name:"any"},name:"root"}],return:{name:"unknown"}}},description:""}}};c();const l={log:()=>{},error:()=>{}},p={JIPT:{useJIPT:!1},graphieMovablesJiptLabels:{addLabel:(e,t)=>{}},svgImageJiptLabels:{addLabel:(e,t)=>{}},rendererTranslationComponents:{addComponent:e=>-1,removeComponentAtIndex:e=>{}},logKaTeXError:(e,t)=>Promise.resolve({}),TeX:({children:e})=>r("span",{className:"mock-TeX",children:e}),staticUrl:e=>`mockStaticUrl(${e})`,useVideo:(e,t)=>e==="YoutubeId"&&t==="YOUTUBE_ID"?{status:"success",data:{video:{id:"YoutubeVideo",contentId:"contentId",youtubeId:"YoutubeId",title:"Youtube Video Title",__typename:"Video"}}}:e==="slug-video-id"&&t==="READABLE_ID"?{status:"success",data:{video:{title:"Slug Video Title",id:"VideoId",youtubeId:"YoutubeId",contentId:"contentId",__typename:"Video"}}}:{status:"loading"},InitialRequestUrl:{origin:"origin-test-interface",host:"host-test-interface",protocol:"protocol-test-interface"},isDevServer:!1,kaLocale:"en",Log:l},m={analytics:{onAnalyticsEvent:async()=>{}},useVideo:()=>({status:"success",data:{video:null}})},T={...p,TeX:a,staticUrl:e=>e},b={...m,analytics:{onAnalyticsEvent:async e=>{console.log("⚡️ Sending analytics event:",e)}}};export{T as a,b as s}; diff --git a/assets/tex-VP4hirbI.js b/assets/tex-6yhnhbtf.js similarity index 95% rename from assets/tex-VP4hirbI.js rename to assets/tex-6yhnhbtf.js index f0653e2de2..fbfd76fdad 100644 --- a/assets/tex-VP4hirbI.js +++ b/assets/tex-6yhnhbtf.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{r as n}from"./index-TT1qJ6UJ.js";import{g as a}from"./dependencies-8XILypbq.js";const t=class t extends n.Component{constructor(e){super(e),this.handleRender=()=>{this.setState({rendered:!0}),this.props.onRender(),this._hasRendered||(this._hasRendered=!0,this.props.setAssetStatus(this.props.children,!0))},this.props.setAssetStatus(this.props.children,!1),this.state={rendered:!1},this._hasRendered=!1}render(){const{TeX:e}=a();return r(e,{onRender:this.handleRender,children:this.props.children})}};t.defaultProps={onRender:()=>{},setAssetStatus:(e,d)=>{}};let s=t;s.__docgenInfo={description:"",methods:[{name:"handleRender",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Tex",props:{children:{required:!0,tsType:{name:"string"},description:""},onRender:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},setAssetStatus:{required:!1,tsType:{name:"signature",type:"function",raw:"(assetKey: string, loaded: boolean) => void",signature:{arguments:[{type:{name:"string"},name:"assetKey"},{type:{name:"boolean"},name:"loaded"}],return:{name:"void"}}},description:"",defaultValue:{value:"(src: string, status: boolean) => {}",computed:!1}}}};export{s as T}; +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{r as n}from"./index-TT1qJ6UJ.js";import{g as a}from"./dependencies-d8cZibFS.js";const t=class t extends n.Component{constructor(e){super(e),this.handleRender=()=>{this.setState({rendered:!0}),this.props.onRender(),this._hasRendered||(this._hasRendered=!0,this.props.setAssetStatus(this.props.children,!0))},this.props.setAssetStatus(this.props.children,!1),this.state={rendered:!1},this._hasRendered=!1}render(){const{TeX:e}=a();return r(e,{onRender:this.handleRender,children:this.props.children})}};t.defaultProps={onRender:()=>{},setAssetStatus:(e,d)=>{}};let s=t;s.__docgenInfo={description:"",methods:[{name:"handleRender",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Tex",props:{children:{required:!0,tsType:{name:"string"},description:""},onRender:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},setAssetStatus:{required:!1,tsType:{name:"signature",type:"function",raw:"(assetKey: string, loaded: boolean) => void",signature:{arguments:[{type:{name:"string"},name:"assetKey"},{type:{name:"boolean"},name:"loaded"}],return:{name:"void"}}},description:"",defaultValue:{value:"(src: string, status: boolean) => {}",computed:!1}}}};export{s as T}; diff --git a/assets/tex.stories-5oJiLdsC.js b/assets/tex.stories-RdMEbt3U.js similarity index 76% rename from assets/tex.stories-5oJiLdsC.js rename to assets/tex.stories-RdMEbt3U.js index 466c538780..f4a59af9f8 100644 --- a/assets/tex.stories-5oJiLdsC.js +++ b/assets/tex.stories-RdMEbt3U.js @@ -1 +1 @@ -import{T as s}from"./tex-VP4hirbI.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./dependencies-8XILypbq.js";const n={title:"Perseus/Components/Tex",component:s,args:{children:"f(x) = x + 1"}},r={};var e,o,t;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:"{}",...(t=(o=r.parameters)==null?void 0:o.docs)==null?void 0:t.source}}};const d=["BasicOperation"];export{r as BasicOperation,d as __namedExportsOrder,n as default}; +import{T as s}from"./tex-6yhnhbtf.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./dependencies-d8cZibFS.js";const n={title:"Perseus/Components/Tex",component:s,args:{children:"f(x) = x + 1"}},r={};var e,o,t;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:"{}",...(t=(o=r.parameters)==null?void 0:o.docs)==null?void 0:t.source}}};const d=["BasicOperation"];export{r as BasicOperation,d as __namedExportsOrder,n as default}; diff --git a/assets/text-diff-yU5JXCsK.js b/assets/text-diff-ftiYrVyQ.js similarity index 93% rename from assets/text-diff-yU5JXCsK.js rename to assets/text-diff-ftiYrVyQ.js index 48eda0bde3..42a7ee9a00 100644 --- a/assets/text-diff-yU5JXCsK.js +++ b/assets/text-diff-ftiYrVyQ.js @@ -1,4 +1,4 @@ -import{j as c,a as b}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import{_ as d}from"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as Q}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{c as R}from"./index-dnMhQZ-1.js";import{P as E}from"./index-0C4KXdeC.js";import{r as U}from"./index-TT1qJ6UJ.js";function M(t){return{newPos:t.newPos,components:t.components.slice(0)}}function V(t){for(var e=[],n=0;n/g,">"),e=e.replace(/"/g,"""),e}var C=function(t){this.ignoreWhitespace=t};C.prototype={diff:function(t,e){if(e===t)return[{value:e}];if(!e)return[{value:t,removed:!0}];if(!t)return[{value:e,added:!0}];e=this.tokenize(e),t=this.tokenize(t);var n=e.length,r=t.length,f=n+r,i=[{newPos:-1,components:[]}],s=this.extractCommon(i[0],e,t,0);if(i[0].newPos+1>=n&&s+1>=r)return i[0].components;for(var p=1;p<=f;p++)for(var o=-1*p;o<=p;o+=2){var a,l=i[o-1],u=i[o+1];s=(u?u.newPos:0)-o,l&&(i[o-1]=void 0);var m=l&&l.newPos+1=n&&s+1>=r)return a.components;i[o]=a}},pushComponent:function(t,e,n,r){var f=t[t.length-1];f&&f.added===n&&f.removed===r?t[t.length-1]={value:this.join(f.value,e),added:n,removed:r}:t.push({value:e,added:n,removed:r})},extractCommon:function(t,e,n,r){for(var f=e.length,i=n.length,s=t.newPos,p=s-r;s+1/g,">"),e=e.replace(/"/g,"""),e}var C=function(t){this.ignoreWhitespace=t};C.prototype={diff:function(t,e){if(e===t)return[{value:e}];if(!e)return[{value:t,removed:!0}];if(!t)return[{value:e,added:!0}];e=this.tokenize(e),t=this.tokenize(t);var n=e.length,r=t.length,f=n+r,i=[{newPos:-1,components:[]}],s=this.extractCommon(i[0],e,t,0);if(i[0].newPos+1>=n&&s+1>=r)return i[0].components;for(var p=1;p<=f;p++)for(var o=-1*p;o<=p;o+=2){var a,l=i[o-1],u=i[o+1];s=(u?u.newPos:0)-o,l&&(i[o-1]=void 0);var m=l&&l.newPos+1=n&&s+1>=r)return a.components;i[o]=a}},pushComponent:function(t,e,n,r){var f=t[t.length-1];f&&f.added===n&&f.removed===r?t[t.length-1]={value:this.join(f.value,e),added:n,removed:r}:t.push({value:e,added:n,removed:r})},extractCommon:function(t,e,n,r){for(var f=e.length,i=n.length,s=t.newPos,p=s-r;s+1"u"?"":" "+r)),i.push("+++ "+t+(typeof f>"u"?"":" "+f));var s=F.diff(e,n);s[s.length-1].value||s.pop(),s.push({value:"",lines:[]});function p(N){return N.map(function(y){return" "+y})}function o(N,y,W){var A=s[s.length-2],J=y===s.length-2,K=y===s.length-3&&(W.added!==A.added||W.removed!==A.removed);!/\n$/.test(W.value)&&(J||K)&&N.push("\\ No newline at end of file")}for(var a=0,l=0,u=[],m=1,v=1,w=0;wt(a,{children:t(o,{})})]},r=o=>t(e,{title:"A day in the life of a text diff",before:"🥱 Hello world!",after:"😴 Goodbye world!"});r.__docgenInfo={description:"",methods:[],displayName:"Example"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{T as e}from"./text-diff-ftiYrVyQ.js";import{W as a}from"./perseus-diff-wrapper-dJxBlkDd.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./index-0C4KXdeC.js";const Yr={title:"PerseusEditor/Diffs/Text Diff",decorators:[o=>t(a,{children:t(o,{})})]},r=o=>t(e,{title:"A day in the life of a text diff",before:"🥱 Hello world!",after:"😴 Goodbye world!"});r.__docgenInfo={description:"",methods:[],displayName:"Example"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const Zr=["Example"];export{r as Example,Zr as __namedExportsOrder,Yr as default}; diff --git a/assets/util-w4oIPZJv.js b/assets/util-a_JWUtR1.js similarity index 84% rename from assets/util-w4oIPZJv.js rename to assets/util-a_JWUtR1.js index c293c91262..dc43e36de3 100644 --- a/assets/util-w4oIPZJv.js +++ b/assets/util-a_JWUtR1.js @@ -1 +1 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{l}from"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./svg-image-vbtSDKh6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as m}from"./index-6h5t6F0w.js";import{c as p,s as n}from"./index-deFLJwr4.js";import{l as u}from"./index-awljIyHI.js";import{w as s}from"./index-J2t_5nK1.js";const c=e=>{const{color:o,filled:i=!0,decorative:r=!1}=e;return d(m,{"aria-label":r?void 0:`${o}, ${i?"filled":"open"}`,style:[f.colorSwatch,{border:`4px solid ${l[o]}`,backgroundColor:i?l[o]:p.white}]})},f=u.StyleSheet.create({colorSwatch:{outline:`2px solid ${p.offWhite}`,borderRadius:"50%",width:n.large_24,height:n.large_24}}),J=c;c.__docgenInfo={description:"",methods:[],displayName:"ColorSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},filled:{required:!1,tsType:{name:"boolean"},description:""},decorative:{required:!1,tsType:{name:"boolean"},description:""}}};const t="grayH";function a(e){switch(e){case"point":return{type:"point",coord:[0,0],color:t,filled:!0};case"line":return{type:"line",kind:"line",points:[a("point"),{...a("point"),coord:[2,2]}],color:t,lineStyle:"solid",showPoint1:!1,showPoint2:!1};case"vector":return{type:"vector",points:[[0,0],[2,2]],color:t};case"ellipse":return{type:"ellipse",center:[0,0],radius:[1,1],angle:0,color:t,fillStyle:"none",strokeStyle:"solid"};case"polygon":return{type:"polygon",points:[[0,2],[-1,0],[1,0]],color:t,showVertices:!1,fillStyle:"none",strokeStyle:"solid"};case"function":return{type:"function",color:t,strokeStyle:"solid",equation:"x^2",directionalAxis:"x"};case"label":return{type:"label",coord:[0,0],text:"",color:t,size:"medium"};default:throw new s(e)}}function K(e,o="solid",i){const r=e==="grayH"?"gray":e;switch(i){case"none":return`. Appearance ${o} ${r} border, with no fill.`;case"white":return`. Appearance ${o} ${r} border, with a white fill.`;case"solid":case"translucent":return`. Appearance ${o} ${r} border, with a ${i} ${r} fill.`;case void 0:return`. Appearance ${o} ${r}.`;default:throw new s(i)}}export{J as C,K as a,a as g}; +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{l}from"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./svg-image-4Vh9uTQ6.js";import"./hud-4BOtaFc1.js";import"./icon-R5gZamfG.js";import"./index-K9BSJPWl.js";import"./inline-icon-NjJlm7d0.js";import"./math-input-JZMGF6RZ.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-Jz35fIN1.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./index-IIMKO4_x.js";import{V as m}from"./index-6h5t6F0w.js";import{c as p,s as n}from"./index-deFLJwr4.js";import{l as u}from"./index-awljIyHI.js";import{w as s}from"./index-J2t_5nK1.js";const c=e=>{const{color:o,filled:i=!0,decorative:r=!1}=e;return d(m,{"aria-label":r?void 0:`${o}, ${i?"filled":"open"}`,style:[f.colorSwatch,{border:`4px solid ${l[o]}`,backgroundColor:i?l[o]:p.white}]})},f=u.StyleSheet.create({colorSwatch:{outline:`2px solid ${p.offWhite}`,borderRadius:"50%",width:n.large_24,height:n.large_24}}),J=c;c.__docgenInfo={description:"",methods:[],displayName:"ColorSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},filled:{required:!1,tsType:{name:"boolean"},description:""},decorative:{required:!1,tsType:{name:"boolean"},description:""}}};const t="grayH";function a(e){switch(e){case"point":return{type:"point",coord:[0,0],color:t,filled:!0};case"line":return{type:"line",kind:"line",points:[a("point"),{...a("point"),coord:[2,2]}],color:t,lineStyle:"solid",showPoint1:!1,showPoint2:!1};case"vector":return{type:"vector",points:[[0,0],[2,2]],color:t};case"ellipse":return{type:"ellipse",center:[0,0],radius:[1,1],angle:0,color:t,fillStyle:"none",strokeStyle:"solid"};case"polygon":return{type:"polygon",points:[[0,2],[-1,0],[1,0]],color:t,showVertices:!1,fillStyle:"none",strokeStyle:"solid"};case"function":return{type:"function",color:t,strokeStyle:"solid",equation:"x^2",directionalAxis:"x"};case"label":return{type:"label",coord:[0,0],text:"",color:t,size:"medium"};default:throw new s(e)}}function K(e,o="solid",i){const r=e==="grayH"?"gray":e;switch(i){case"none":return`. Appearance ${o} ${r} border, with no fill.`;case"white":return`. Appearance ${o} ${r} border, with a white fill.`;case"solid":case"translucent":return`. Appearance ${o} ${r} border, with a ${i} ${r} fill.`;case void 0:return`. Appearance ${o} ${r}.`;default:throw new s(i)}}export{J as C,K as a,a as g}; diff --git a/assets/video-transcript-link-Ts3i1VPI.js b/assets/video-transcript-link-MKIRfGVo.js similarity index 97% rename from assets/video-transcript-link-Ts3i1VPI.js rename to assets/video-transcript-link-MKIRfGVo.js index d048d0e2f8..4b425fd083 100644 --- a/assets/video-transcript-link-Ts3i1VPI.js +++ b/assets/video-transcript-link-MKIRfGVo.js @@ -1 +1 @@ -import{j as b,a as q}from"./jsx-runtime-FVsy8kgq.js";import{b as R,a as O,_ as i,V as D,T as G}from"./index-6h5t6F0w.js";import{S as H}from"./index-qUyqkRvh.js";import{e as J,_ as A}from"./arrow-square-out-bold-090vdhrx.js";import{r as o}from"./index-TT1qJ6UJ.js";import{c as z,L as M}from"./react-router-dom-W_e8xVUu.js";import{i as Q,g as X}from"./index-o3wWn3Y5.js";import{l as T}from"./index-awljIyHI.js";import{s as K,m as U,f as W,c as B}from"./index-deFLJwr4.js";import{P as Z}from"./index-xuPsLuPk.js";import{u as ee}from"./i18n-context-P5sgPFep.js";import{g as te}from"./dependencies-8XILypbq.js";const ne=["children","skipClientNav","focused","hovered","href","inline","kind","light","visitable","pressed","style","testId","waiting","target","startIcon","endIcon"],re=R("a"),oe=R(M),$=o.forwardRef(function(t,e){const l=s=>{const{children:u,skipClientNav:n,focused:a,hovered:r,href:p,inline:k=!1,kind:v="primary",light:y=!1,visitable:C=!1,pressed:g,style:x,testId:w,target:S,startIcon:d,endIcon:h}=t,L=O(t,ne),f=se(k,v,y,C),c=k?f.restingInline:f.resting,I=[ie.shared,c,g&&f.active,!g&&r&&f.hover,!g&&a&&f.focus],N=i({"data-testid":w,style:[I,x],target:S},L),F=new URL(p,window.location.origin).origin!==window.location.origin,Y=o.createElement(Z,{icon:J,size:"small",style:[E.endIcon,E.centered],testId:"external-icon"});let P,V;d&&(P=o.cloneElement(d,i({style:[E.startIcon,E.centered],testId:"start-icon","aria-hidden":"true"},d.props))),h&&(V=o.cloneElement(h,i({style:[E.endIcon,E.centered],testId:"end-icon","aria-hidden":"true"},h.props)));const j=o.createElement(o.Fragment,null,d&&P,u,h?V:F&&S==="_blank"&&Y);return s&&!n&&Q(p)?o.createElement(oe,i({},N,{to:p,ref:e}),j):o.createElement(re,i({},N,{href:p,ref:e}),j)};return o.createElement(z.Consumer,null,s=>l(s))}),_={},E=T.StyleSheet.create({startIcon:{marginInlineEnd:K.xxxSmall_4},endIcon:{marginInlineStart:K.xxxSmall_4},centered:{verticalAlign:"-10%"}}),ie=T.StyleSheet.create({shared:{cursor:"pointer",textDecoration:"none",outline:"none",alignItems:"center"}}),se=(m,t,e,l)=>{const s=`${t}-${m.toString()}-${e.toString()}-${l.toString()}`;if(_[s])return _[s];if(t==="secondary"&&e)throw new Error("Secondary Light links are not supported");if(l&&t!=="primary")throw new Error("Only primary link is visitable");const{blue:u,purple:n,white:a,offBlack:r,offBlack32:p,offBlack64:k}=B,v="#fa50ae",y=U(W(r,.08),n),C=B.fadedBlue,g=U(W(a,.32),v),x=B.activeBlue,d=t==="primary"?e?a:u:m?r:k,f=t==="primary"?e?C:x:m?x:r,c=l?{":visited":{color:e?v:y}}:Object.freeze({}),I=l?{":visited":{color:e?g:U(p,y)}}:Object.freeze({}),N={resting:i({color:d},c),restingInline:i({color:d,textDecoration:"underline currentcolor solid",textUnderlineOffset:2},c),hover:i({textDecoration:"underline currentcolor solid",color:d},c),focus:{":focus-visible":i({color:d,outline:`1px solid ${e?a:u}`,borderRadius:3},c)},active:i({color:f,textDecoration:"underline currentcolor solid"},I)};return _[s]=T.StyleSheet.create(N),_[s]},ae=["onClick","beforeNav","safeWithNav","href","skipClientNav","children","tabIndex","onKeyDown","onKeyUp","target","inline","kind","light","visitable"],ce=o.forwardRef(function(t,e){const{onClick:l,beforeNav:s=void 0,safeWithNav:u,href:n,skipClientNav:a,children:r,tabIndex:p,onKeyDown:k,onKeyUp:v,target:y=void 0,inline:C=!1,kind:g="primary",light:x=!1,visitable:w=!1}=t,S=O(t,ae),d=h=>{const L=X(n,a,h);return s?o.createElement(L,{disabled:!1,href:n,role:"link",onClick:l,beforeNav:s,safeWithNav:u,onKeyDown:k,onKeyUp:v},(f,c)=>{let I=i({},(A(c),c));return o.createElement($,i({},S,f,I,{skipClientNav:a,href:n,target:y,tabIndex:p,inline:C,kind:g,light:x,visitable:w,ref:e}),r)}):o.createElement(L,{disabled:!1,href:n,role:"link",onClick:l,safeWithNav:u,target:y,onKeyDown:k,onKeyUp:v},(f,c)=>{let I=i({},(A(c),c));return o.createElement($,i({},S,f,I,{skipClientNav:a,href:n,target:y,tabIndex:p,inline:C,kind:g,light:x,visitable:w,ref:e}),r)})};return o.createElement(z.Consumer,null,h=>d(h))}),le=/^https?:\/\//,de=m=>{const t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/,e=m.match(t);return e&&e[7].length===11?e[7]:"videoNotFound"},fe=m=>{var a;const{location:t}=m,{useVideo:e}=te(),[l,s]=le.test(t)?[de(t),"YOUTUBE_ID"]:[t,"READABLE_ID"],u=e(l,s),{strings:n}=ee();switch(u.status){case"loading":return b(D,{children:n.loading});case"success":{const r=(a=u.data)==null?void 0:a.video;return q(D,{style:ue.transcriptLink,children:[b(G,{children:r==null?void 0:r.title}),b(H,{size:10}),b(ce,{href:"/transcript/"+((r==null?void 0:r.contentId)||"videoNotFound"),target:"_blank",className:"visited-no-recolor",children:n.videoTranscript})]})}case"error":return b(D,{children:n.somethingWrong});case"aborted":return b(D,{children:n.somethingWrong});default:return b(D,{children:n.somethingWrong})}},ue=T.StyleSheet.create({transcriptLink:{flexDirection:"row",width:"100%",justifyContent:"center"}});fe.__docgenInfo={description:"Video Transcript Link Component.",methods:[],displayName:"VideoTranscriptLink",props:{location:{required:!0,tsType:{name:"string"},description:""}}};export{ce as L,fe as V}; +import{j as b,a as q}from"./jsx-runtime-FVsy8kgq.js";import{b as R,a as O,_ as i,V as D,T as G}from"./index-6h5t6F0w.js";import{S as H}from"./index-qUyqkRvh.js";import{e as J,_ as A}from"./arrow-square-out-bold-090vdhrx.js";import{r as o}from"./index-TT1qJ6UJ.js";import{c as z,L as M}from"./react-router-dom-W_e8xVUu.js";import{i as Q,g as X}from"./index-o3wWn3Y5.js";import{l as T}from"./index-awljIyHI.js";import{s as K,m as U,f as W,c as B}from"./index-deFLJwr4.js";import{P as Z}from"./index-xuPsLuPk.js";import{u as ee}from"./i18n-context-P5sgPFep.js";import{u as te}from"./dependencies-d8cZibFS.js";const ne=["children","skipClientNav","focused","hovered","href","inline","kind","light","visitable","pressed","style","testId","waiting","target","startIcon","endIcon"],re=R("a"),oe=R(M),$=o.forwardRef(function(t,e){const l=s=>{const{children:u,skipClientNav:n,focused:a,hovered:r,href:p,inline:k=!1,kind:v="primary",light:y=!1,visitable:C=!1,pressed:g,style:x,testId:w,target:S,startIcon:d,endIcon:h}=t,L=O(t,ne),f=se(k,v,y,C),c=k?f.restingInline:f.resting,I=[ie.shared,c,g&&f.active,!g&&r&&f.hover,!g&&a&&f.focus],N=i({"data-testid":w,style:[I,x],target:S},L),F=new URL(p,window.location.origin).origin!==window.location.origin,Y=o.createElement(Z,{icon:J,size:"small",style:[E.endIcon,E.centered],testId:"external-icon"});let P,V;d&&(P=o.cloneElement(d,i({style:[E.startIcon,E.centered],testId:"start-icon","aria-hidden":"true"},d.props))),h&&(V=o.cloneElement(h,i({style:[E.endIcon,E.centered],testId:"end-icon","aria-hidden":"true"},h.props)));const j=o.createElement(o.Fragment,null,d&&P,u,h?V:F&&S==="_blank"&&Y);return s&&!n&&Q(p)?o.createElement(oe,i({},N,{to:p,ref:e}),j):o.createElement(re,i({},N,{href:p,ref:e}),j)};return o.createElement(z.Consumer,null,s=>l(s))}),_={},E=T.StyleSheet.create({startIcon:{marginInlineEnd:K.xxxSmall_4},endIcon:{marginInlineStart:K.xxxSmall_4},centered:{verticalAlign:"-10%"}}),ie=T.StyleSheet.create({shared:{cursor:"pointer",textDecoration:"none",outline:"none",alignItems:"center"}}),se=(m,t,e,l)=>{const s=`${t}-${m.toString()}-${e.toString()}-${l.toString()}`;if(_[s])return _[s];if(t==="secondary"&&e)throw new Error("Secondary Light links are not supported");if(l&&t!=="primary")throw new Error("Only primary link is visitable");const{blue:u,purple:n,white:a,offBlack:r,offBlack32:p,offBlack64:k}=B,v="#fa50ae",y=U(W(r,.08),n),C=B.fadedBlue,g=U(W(a,.32),v),x=B.activeBlue,d=t==="primary"?e?a:u:m?r:k,f=t==="primary"?e?C:x:m?x:r,c=l?{":visited":{color:e?v:y}}:Object.freeze({}),I=l?{":visited":{color:e?g:U(p,y)}}:Object.freeze({}),N={resting:i({color:d},c),restingInline:i({color:d,textDecoration:"underline currentcolor solid",textUnderlineOffset:2},c),hover:i({textDecoration:"underline currentcolor solid",color:d},c),focus:{":focus-visible":i({color:d,outline:`1px solid ${e?a:u}`,borderRadius:3},c)},active:i({color:f,textDecoration:"underline currentcolor solid"},I)};return _[s]=T.StyleSheet.create(N),_[s]},ae=["onClick","beforeNav","safeWithNav","href","skipClientNav","children","tabIndex","onKeyDown","onKeyUp","target","inline","kind","light","visitable"],ce=o.forwardRef(function(t,e){const{onClick:l,beforeNav:s=void 0,safeWithNav:u,href:n,skipClientNav:a,children:r,tabIndex:p,onKeyDown:k,onKeyUp:v,target:y=void 0,inline:C=!1,kind:g="primary",light:x=!1,visitable:w=!1}=t,S=O(t,ae),d=h=>{const L=X(n,a,h);return s?o.createElement(L,{disabled:!1,href:n,role:"link",onClick:l,beforeNav:s,safeWithNav:u,onKeyDown:k,onKeyUp:v},(f,c)=>{let I=i({},(A(c),c));return o.createElement($,i({},S,f,I,{skipClientNav:a,href:n,target:y,tabIndex:p,inline:C,kind:g,light:x,visitable:w,ref:e}),r)}):o.createElement(L,{disabled:!1,href:n,role:"link",onClick:l,safeWithNav:u,target:y,onKeyDown:k,onKeyUp:v},(f,c)=>{let I=i({},(A(c),c));return o.createElement($,i({},S,f,I,{skipClientNav:a,href:n,target:y,tabIndex:p,inline:C,kind:g,light:x,visitable:w,ref:e}),r)})};return o.createElement(z.Consumer,null,h=>d(h))}),le=/^https?:\/\//,de=m=>{const t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/,e=m.match(t);return e&&e[7].length===11?e[7]:"videoNotFound"},fe=m=>{var a;const{location:t}=m,{useVideo:e}=te(),[l,s]=le.test(t)?[de(t),"YOUTUBE_ID"]:[t,"READABLE_ID"],u=e(l,s),{strings:n}=ee();switch(u.status){case"loading":return b(D,{children:n.loading});case"success":{const r=(a=u.data)==null?void 0:a.video;return q(D,{style:ue.transcriptLink,children:[b(G,{children:r==null?void 0:r.title}),b(H,{size:10}),b(ce,{href:"/transcript/"+((r==null?void 0:r.contentId)||"videoNotFound"),target:"_blank",className:"visited-no-recolor",children:n.videoTranscript})]})}case"error":return b(D,{children:n.somethingWrong});case"aborted":return b(D,{children:n.somethingWrong});default:return b(D,{children:n.somethingWrong})}},ue=T.StyleSheet.create({transcriptLink:{flexDirection:"row",width:"100%",justifyContent:"center"}});fe.__docgenInfo={description:"Video Transcript Link Component.",methods:[],displayName:"VideoTranscriptLink",props:{location:{required:!0,tsType:{name:"string"},description:""}}};export{ce as L,fe as V}; diff --git a/assets/video-transcript-link.stories-RYTD175i.js b/assets/video-transcript-link.stories-La4j2ZS0.js similarity index 87% rename from assets/video-transcript-link.stories-RYTD175i.js rename to assets/video-transcript-link.stories-La4j2ZS0.js index 1e2c54f456..74d5e6f784 100644 --- a/assets/video-transcript-link.stories-RYTD175i.js +++ b/assets/video-transcript-link.stories-La4j2ZS0.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{V as p}from"./video-transcript-link-Ts3i1VPI.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-qUyqkRvh.js";import"./index-deFLJwr4.js";import"./arrow-square-out-bold-090vdhrx.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-xuPsLuPk.js";import"./i18n-context-P5sgPFep.js";import"./dependencies-8XILypbq.js";const T={title:"Perseus/Components/Video Transcript Link"},o=m=>c(p,{location:"https://www.youtube.com/watch?v=YoutubeId"}),r=m=>c(p,{location:"slug-video-id"});o.__docgenInfo={description:"",methods:[],displayName:"YoutubeVideoLink"};r.__docgenInfo={description:"",methods:[],displayName:"SlugVideoLink"};var t,e,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{V as p}from"./video-transcript-link-MKIRfGVo.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-qUyqkRvh.js";import"./index-deFLJwr4.js";import"./arrow-square-out-bold-090vdhrx.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-xuPsLuPk.js";import"./i18n-context-P5sgPFep.js";import"./dependencies-d8cZibFS.js";const T={title:"Perseus/Components/Video Transcript Link"},o=m=>c(p,{location:"https://www.youtube.com/watch?v=YoutubeId"}),r=m=>c(p,{location:"slug-video-id"});o.__docgenInfo={description:"",methods:[],displayName:"YoutubeVideoLink"};r.__docgenInfo={description:"",methods:[],displayName:"SlugVideoLink"};var t,e,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(e=o.parameters)==null?void 0:e.docs)==null?void 0:i.source}}};var s,a,n;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/video.stories-FH7Ic73j.js b/assets/video.stories-cDBg-zPN.js similarity index 73% rename from assets/video.stories-FH7Ic73j.js rename to assets/video.stories-cDBg-zPN.js index 6fd1fcc5de..181353ea0c 100644 --- a/assets/video.stories-FH7Ic73j.js +++ b/assets/video.stories-cDBg-zPN.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as e}from"./renderer-with-debug-ui-Ty_P7koE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./asset-context-I7yIqWki.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./shared-4TdECMLk.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./register-all-widgets-for-testing-I8cwOiut.js";const h={content:`Watch the Biogeography: Where Life Lives video to find the answer. +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as e}from"./renderer-with-debug-ui-DcZbZSiB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-I73s7vIV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-P5sgPFep.js";import"./icon-R5gZamfG.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-StuadxRF.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./asset-context-I7yIqWki.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./client-rbWgHzHN.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./math-input-JZMGF6RZ.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./shared-4TdECMLk.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./side-by-side-kGWaKY6T.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./register-all-widgets-for-testing-xxgCysIB.js";const h={content:`Watch the Biogeography: Where Life Lives video to find the answer. [[☃ video 1]] diff --git a/assets/viewport-resizer-pZjHp3_4.js b/assets/viewport-resizer-rIRGcoAM.js similarity index 68% rename from assets/viewport-resizer-pZjHp3_4.js rename to assets/viewport-resizer-rIRGcoAM.js index b2853856f5..c044705143 100644 --- a/assets/viewport-resizer-pZjHp3_4.js +++ b/assets/viewport-resizer-rIRGcoAM.js @@ -1,2 +1,2 @@ -import{a as e,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-GCz9idJ2.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-wNzquKfW.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./renderer-VfFjn7ah.js";import"./base-radio-13woGQGc.js";import{c as a}from"./components-V6aclUoQ.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./index-IIMKO4_x.js";import{d as o}from"./constants-p_UgHLsb.js";import{d as c,e as m,f as d}from"./icon-paths-EoBkHOLI.js";const{ButtonGroup:u,InlineIcon:n}=a,l=i=>{const r=e("span",{children:[t(n,{...c})," Phone"]}),p=e("span",{children:[t(n,{...m})," Tablet"]}),s=e("span",{children:[t(n,{...d})," Desktop"]});return e("span",{className:"viewport-resizer",children:["Viewport:"," ",t(u,{value:i.deviceType,allowEmpty:!1,buttons:[{value:o.PHONE,content:r},{value:o.TABLET,content:p},{value:o.DESKTOP,content:s}],onChange:i.onViewportSizeChanged})]})};l.__docgenInfo={description:"",methods:[],displayName:"ViewportResizer",props:{deviceType:{required:!0,tsType:{name:"DeviceType"},description:"The current device type that is selected."},onViewportSizeChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(deviceType: DeviceType) => unknown",signature:{arguments:[{type:{name:"DeviceType"},name:"deviceType"}],return:{name:"unknown"}}},description:`A callback that is passed (width, height) as the dimensions of the +import{a as e,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-ub6lGcPc.js";import"./jquery-yG1GhClm.js";import"./util-F8-MDmsT.js";import"./phet-simulation-9PbE2pxN.js";import"./version-akiLXZts.js";import"./dependencies-d8cZibFS.js";import"./perseus-api-Nq3s7IMx.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./renderer-JG1Z7r2S.js";import"./base-radio-SM-baXgO.js";import{c as a}from"./components-yT7oveOH.js";import"./index-k-0mNqHS.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./index-IIMKO4_x.js";import{d as o}from"./constants-p_UgHLsb.js";import{d as c,e as m,f as d}from"./icon-paths-EoBkHOLI.js";const{ButtonGroup:u,InlineIcon:n}=a,l=i=>{const r=e("span",{children:[t(n,{...c})," Phone"]}),p=e("span",{children:[t(n,{...m})," Tablet"]}),s=e("span",{children:[t(n,{...d})," Desktop"]});return e("span",{className:"viewport-resizer",children:["Viewport:"," ",t(u,{value:i.deviceType,allowEmpty:!1,buttons:[{value:o.PHONE,content:r},{value:o.TABLET,content:p},{value:o.DESKTOP,content:s}],onChange:i.onViewportSizeChanged})]})};l.__docgenInfo={description:"",methods:[],displayName:"ViewportResizer",props:{deviceType:{required:!0,tsType:{name:"DeviceType"},description:"The current device type that is selected."},onViewportSizeChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(deviceType: DeviceType) => unknown",signature:{arguments:[{type:{name:"DeviceType"},name:"deviceType"}],return:{name:"unknown"}}},description:`A callback that is passed (width, height) as the dimensions of the viewport to resize to.`}}};export{l as V}; diff --git a/assets/viewport-resizer.stories-PcXXeY7Z.js b/assets/viewport-resizer.stories-4HOb7afw.js similarity index 70% rename from assets/viewport-resizer.stories-PcXXeY7Z.js rename to assets/viewport-resizer.stories-4HOb7afw.js index 0fbbbc70cd..8d5823270c 100644 --- a/assets/viewport-resizer.stories-PcXXeY7Z.js +++ b/assets/viewport-resizer.stories-4HOb7afw.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{V as m}from"./viewport-resizer-pZjHp3_4.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-GCz9idJ2.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-VfFjn7ah.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-vbtSDKh6.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-44YtE05i.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-pL_l1Dse.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-13woGQGc.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-0_QL8uoF.js";import"./phet-simulation-wNzquKfW.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-6SWUlni2.js";import"./button-group-nsoLlHtM.js";import"./graph-6kifrlu5.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-AnHLRo1F.js";import"./answer-pill-0VqGKN9U.js";import"./sortable-PVTgDRY4.js";import"./video-transcript-link-Ts3i1VPI.js";import"./multi-renderer-Dj-_XIAo.js";import"./hints-renderer-PJ9GMfp4.js";import"./components-V6aclUoQ.js";import"./constants-p_UgHLsb.js";import"./icon-paths-EoBkHOLI.js";const pt={component:m,title:"PerseusEditor/Components/Viewport Resizer"},o=()=>{const[e,n]=c.useState("phone");return s(m,{deviceType:e,onViewportSizeChanged:t=>{a("onViewportSizeChanged")(t),n(t)}})};o.__docgenInfo={description:"",methods:[],displayName:"Controlled"};var r,i,p;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`() => { +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{V as m}from"./viewport-resizer-rIRGcoAM.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-ub6lGcPc.js";import"./util-F8-MDmsT.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-SKtvHVtl.js";import"./mobile-keypad-wPUeR8mM.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-Bl2XtQm9.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-JG1Z7r2S.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./i18n-context-P5sgPFep.js";import"./svg-image-4Vh9uTQ6.js";import"./dependencies-d8cZibFS.js";import"./fixed-to-responsive-AkRQxH3P.js";import"./constants-iPV6vHZm.js";import"./client-rbWgHzHN.js";import"./inline-icon-NjJlm7d0.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-3HliPbpF.js";import"./tex-6yhnhbtf.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-hbM7rxrP.js";import"./perseus-api-Nq3s7IMx.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-74YQ4o9G.js";import"./text-list-editor-Jz35fIN1.js";import"./lint-kpBgzQ8K.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./math-input-JZMGF6RZ.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-Jnnd0mF0.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip--mhQefx0.js";import"./simple-keypad-input-LEkrmlga.js";import"./base-radio-SM-baXgO.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-I73s7vIV.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-R5gZamfG.js";import"./choice-icon-StuadxRF.js";import"./focus-ring-2b4ybtc7.js";import"./option-status-Yr5mIJZ4.js";import"./choice-none-above-lqQAegUH.js";import"./phet-simulation-9PbE2pxN.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-VNdK7gMK.js";import"./button-group-nsoLlHtM.js";import"./graph-2fIs0C28.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-4BOtaFc1.js";import"./multi-button-group-atHe8dYZ.js";import"./number-input-AfYHd3vF.js";import"./range-input-gZ_c3T2F.js";import"./marker-Tbl1FJz5.js";import"./answer-pill-DPPg5zNJ.js";import"./sortable-1xjW6Ojf.js";import"./video-transcript-link-MKIRfGVo.js";import"./multi-renderer-la0A-h33.js";import"./hints-renderer-eYcfi__L.js";import"./components-yT7oveOH.js";import"./constants-p_UgHLsb.js";import"./icon-paths-EoBkHOLI.js";const pt={component:m,title:"PerseusEditor/Components/Viewport Resizer"},o=()=>{const[e,n]=c.useState("phone");return s(m,{deviceType:e,onViewportSizeChanged:t=>{a("onViewportSizeChanged")(t),n(t)}})};o.__docgenInfo={description:"",methods:[],displayName:"Controlled"};var r,i,p;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`() => { const [deviceType, setDeviceType] = React.useState("phone"); return { action("onViewportSizeChanged")(newDeviceType); diff --git a/assets/zoomable-tex-MZi7Hqbp.js b/assets/zoomable-tex-hbM7rxrP.js similarity index 93% rename from assets/zoomable-tex-MZi7Hqbp.js rename to assets/zoomable-tex-hbM7rxrP.js index ce13f6a17e..5f576c7532 100644 --- a/assets/zoomable-tex-MZi7Hqbp.js +++ b/assets/zoomable-tex-hbM7rxrP.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{r as i}from"./index-TT1qJ6UJ.js";import{c as n}from"./asset-context-I7yIqWki.js";import{T as a}from"./tex-VP4hirbI.js";import{Z as d}from"./zoomable-CA1NzpZD.js";const h=(t,e)=>{const s=t.querySelector(".katex-html")||t.querySelector(".MathJax"),o={width:s.offsetWidth,height:s.offsetHeight};return{width:Math.max(e.width,o.width),height:Math.max(e.height,o.height)}};class m extends i.Component{constructor(){super(),this.handleRender=()=>{this.setState({isRendered:!0})},this.state={isRendered:!1}}render(){return r(d,{readyToMeasure:this.state.isRendered,computeChildBounds:h,animateHeight:!1,disableEntranceAnimation:!0,children:r(n.Consumer,{children:({setAssetStatus:e})=>r(a,{onRender:this.handleRender,setAssetStatus:e,children:this.props.children})})})}}m.__docgenInfo={description:"",methods:[{name:"handleRender",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ZoomableTeX",props:{children:{required:!0,tsType:{name:"string"},description:""}}};export{m as Z}; +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{r as i}from"./index-TT1qJ6UJ.js";import{c as n}from"./asset-context-I7yIqWki.js";import{T as a}from"./tex-6yhnhbtf.js";import{Z as d}from"./zoomable-CA1NzpZD.js";const h=(t,e)=>{const s=t.querySelector(".katex-html")||t.querySelector(".MathJax"),o={width:s.offsetWidth,height:s.offsetHeight};return{width:Math.max(e.width,o.width),height:Math.max(e.height,o.height)}};class m extends i.Component{constructor(){super(),this.handleRender=()=>{this.setState({isRendered:!0})},this.state={isRendered:!1}}render(){return r(d,{readyToMeasure:this.state.isRendered,computeChildBounds:h,animateHeight:!1,disableEntranceAnimation:!0,children:r(n.Consumer,{children:({setAssetStatus:e})=>r(a,{onRender:this.handleRender,setAssetStatus:e,children:this.props.children})})})}}m.__docgenInfo={description:"",methods:[{name:"handleRender",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ZoomableTeX",props:{children:{required:!0,tsType:{name:"string"},description:""}}};export{m as Z}; diff --git a/assets/zoomable-tex.stories-YE5z48ur.js b/assets/zoomable-tex.stories-4XZZtFwQ.js similarity index 88% rename from assets/zoomable-tex.stories-YE5z48ur.js rename to assets/zoomable-tex.stories-4XZZtFwQ.js index 52735078ef..7bedd77825 100644 --- a/assets/zoomable-tex.stories-YE5z48ur.js +++ b/assets/zoomable-tex.stories-4XZZtFwQ.js @@ -1,4 +1,4 @@ -import{a as p,F as m,j as a}from"./jsx-runtime-FVsy8kgq.js";import{Z as d}from"./zoomable-tex-MZi7Hqbp.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./dependencies-8XILypbq.js";import"./zoomable-CA1NzpZD.js";import"./index-7vsPyIck.js";const T={title:"Perseus/Components/Zoomable Tex",component:d,decorators:[function(c){return p(m,{children:[a("h1",{children:"Click on equation to zoom/unzoom"}),a("div",{style:{width:"80px"},children:a(c,{})})]})}]},r={args:{children:"\\sum_{i=1}^\\infty\\frac{1}{n^2} = \\frac{\\pi^2}{6}"}},e={args:{children:"\\begin{aligned}h\\blueE{v_1} \\left(\\dfrac{\\partial f}{\\partial x}(x_0, y_0) \\right) + h\\greenE{v_2}\\left( \\dfrac{\\partial f}{\\partial y}(x_0 \\redD{+ h\\blueE{v_1}}, y_0)\\right)\\end{aligned}"}};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{ +import{a as p,F as m,j as a}from"./jsx-runtime-FVsy8kgq.js";import{Z as d}from"./zoomable-tex-hbM7rxrP.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./asset-context-I7yIqWki.js";import"./tex-6yhnhbtf.js";import"./dependencies-d8cZibFS.js";import"./zoomable-CA1NzpZD.js";import"./index-7vsPyIck.js";const T={title:"Perseus/Components/Zoomable Tex",component:d,decorators:[function(c){return p(m,{children:[a("h1",{children:"Click on equation to zoom/unzoom"}),a("div",{style:{width:"80px"},children:a(c,{})})]})}]},r={args:{children:"\\sum_{i=1}^\\infty\\frac{1}{n^2} = \\frac{\\pi^2}{6}"}},e={args:{children:"\\begin{aligned}h\\blueE{v_1} \\left(\\dfrac{\\partial f}{\\partial x}(x_0, y_0) \\right) + h\\greenE{v_2}\\left( \\dfrac{\\partial f}{\\partial y}(x_0 \\redD{+ h\\blueE{v_1}}, y_0)\\right)\\end{aligned}"}};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{ args: { children: "\\\\sum_{i=1}^\\\\infty\\\\frac{1}{n^2} = \\\\frac{\\\\pi^2}{6}" } diff --git a/iframe.html b/iframe.html index b4da35f94c..ef55623575 100644 --- a/iframe.html +++ b/iframe.html @@ -425,7 +425,7 @@ } - + diff --git a/preview-stats.json b/preview-stats.json index 6a84581369..742501e8e2 100644 --- a/preview-stats.json +++ b/preview-stats.json @@ -1222,41 +1222,11 @@ { "moduleName": "./packages/math-input/src/full-keypad.stories.tsx" }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" - }, { "moduleName": "./packages/math-input/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", - "name": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx", - "name": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" } ] }, @@ -1339,14 +1309,38 @@ ] }, { - "id": "./packages/perseus-editor/src/tex-error-view.tsx", - "name": "./packages/perseus-editor/src/tex-error-view.tsx", + "id": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" } ] }, @@ -1374,6 +1368,72 @@ } ] }, + { + "id": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", + "name": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx", + "name": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/tex-error-view.tsx", + "name": "./packages/perseus-editor/src/tex-error-view.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/graph-settings.tsx", + "name": "./packages/perseus-editor/src/components/graph-settings.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/interaction-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/__stories__/graph-settings.argtypes.ts", + "name": "./packages/perseus-editor/src/components/__stories__/graph-settings.argtypes.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx" + } + ] + }, { "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx", "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx", @@ -1382,10 +1442,10 @@ "moduleName": "./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" } ] }, @@ -1397,28 +1457,28 @@ "moduleName": "./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" @@ -1426,15 +1486,6 @@ { "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, @@ -1442,70 +1493,19 @@ "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/graph-settings.tsx", - "name": "./packages/perseus-editor/src/components/graph-settings.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/interaction-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/__stories__/graph-settings.argtypes.ts", - "name": "./packages/perseus-editor/src/components/__stories__/graph-settings.argtypes.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, @@ -1520,26 +1520,26 @@ "moduleName": "./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx" }, { - "moduleName": "./.storybook/preview.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./.storybook/preview.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" }, - { - "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" - }, { "moduleName": "./packages/perseus-editor/src/index.ts" }, { "moduleName": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts" }, + { + "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" + }, { "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" }, @@ -1562,13 +1562,13 @@ "moduleName": "./packages/perseus-editor/src/widgets/input-number-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" }, { "moduleName": "./packages/perseus-editor/src/iframe-content-renderer.tsx" @@ -1576,9 +1576,6 @@ { "moduleName": "./packages/perseus-editor/src/i18n.ts" }, - { - "moduleName": "./testing/renderer-with-debug-ui.tsx" - }, { "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" }, @@ -1592,13 +1589,10 @@ "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" }, { - "moduleName": "./dev/flipbook.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" + "moduleName": "./testing/renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx" + "moduleName": "./dev/flipbook.tsx" }, { "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" @@ -1612,50 +1606,56 @@ { "moduleName": "./packages/perseus-editor/src/components/widget-select.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx" + }, { "moduleName": "./packages/perseus-editor/src/editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/parametric-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/point-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/sorter-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/matcher-editor.tsx" @@ -1664,46 +1664,49 @@ "moduleName": "./packages/perseus-editor/src/widgets/number-line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/sorter-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/group-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/molecule-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/matrix-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/matrix-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/molecule-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/orderer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/passage-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/orderer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/measurer-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/measurer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/table-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/table-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/diffs/widget-diff.tsx" @@ -1711,9 +1714,6 @@ { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/arrow-picker.tsx" }, @@ -1736,10 +1736,10 @@ "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" }, { - "moduleName": "./packages/perseus-editor/src/content-preview.tsx" + "moduleName": "./packages/perseus-editor/src/item-extras-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-extras-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx" @@ -1748,28 +1748,28 @@ "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/content-preview.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/components/section-control-button.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/section-control-button.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" @@ -1777,27 +1777,27 @@ { "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" }, { - "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/polygon-swatch.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx" + }, { "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" }, @@ -1822,14 +1822,17 @@ ] }, { - "id": "./packages/perseus-editor/src/diffs/tags-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/tags-diff.tsx", + "id": "./packages/perseus-editor/src/diffs/text-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/text-diff.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/tags-diff.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" } ] }, @@ -1838,10 +1841,10 @@ "name": "./packages/perseus-editor/src/diffs/__stories__/perseus-diff-wrapper.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" @@ -1849,47 +1852,38 @@ ] }, { - "id": "./packages/perseus-editor/src/diffs/text-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/text-diff.tsx", + "id": "./packages/perseus-editor/src/diffs/tags-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/tags-diff.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/diffs/tags-diff.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" } ] }, { - "id": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", + "id": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus-editor/src/styles/perseus-editor.less", - "name": "./packages/perseus-editor/src/styles/perseus-editor.less", + "id": "./packages/perseus-editor/src/widgets/definition-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/definition-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, @@ -1906,11 +1900,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/definition-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/definition-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/explanation-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/explanation-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/explanation-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -1918,35 +1912,41 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/explanation-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/explanation-editor.tsx", + "id": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/explanation-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus-editor/src/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/sorter-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/sorter-editor.tsx", + "id": "./packages/perseus-editor/src/styles/perseus-editor.less", + "name": "./packages/perseus-editor/src/styles/perseus-editor.less", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/matcher-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/matcher-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -1954,11 +1954,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/matcher-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/matcher-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -1966,11 +1966,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/python-program-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/python-program-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/number-line-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/number-line-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -1978,11 +1978,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/number-line-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/number-line-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -1990,11 +1990,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/python-program-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/python-program-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -2002,11 +2002,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -2014,11 +2014,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/sorter-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/sorter-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -2066,10 +2066,10 @@ "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" }, { - "moduleName": "./.storybook/preview.tsx" + "moduleName": "./packages/perseus/src/__stories__/server-item-renderer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/__stories__/server-item-renderer.stories.tsx" + "moduleName": "./.storybook/preview.tsx" }, { "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" @@ -2122,44 +2122,65 @@ ] }, { - "id": "./packages/perseus/src/components/info-tip/index.tsx", - "name": "./packages/perseus/src/components/info-tip/index.tsx", + "id": "./packages/perseus/src/components/graph.tsx", + "name": "./packages/perseus/src/components/graph.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/info-tip.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/graph.stories.tsx" }, { "moduleName": "./packages/perseus/src/components.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" } ] }, { - "id": "./packages/perseus/src/components/graph.tsx", - "name": "./packages/perseus/src/components/graph.tsx", + "id": "./packages/perseus/src/icon-paths.ts", + "name": "./packages/perseus/src/icon-paths.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/graph.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/icon.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/index.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" } ] }, { - "id": "./packages/perseus/src/components/sortable.tsx", - "name": "./packages/perseus/src/components/sortable.tsx", + "id": "./packages/perseus/src/components/icon.tsx", + "name": "./packages/perseus/src/components/icon.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/sortable.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/icon.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" + "moduleName": "./packages/perseus/src/components.ts" }, { - "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" } ] }, @@ -2218,14 +2239,50 @@ ] }, { - "id": "./packages/perseus/src/dependencies.ts", - "name": "./packages/perseus/src/dependencies.ts", + "id": "./packages/perseus/src/components/hud.tsx", + "name": "./packages/perseus/src/components/hud.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/hud.stories.tsx" }, { - "moduleName": "./.storybook/preview.tsx" + "moduleName": "./packages/perseus/src/components.ts" + } + ] + }, + { + "id": "./packages/perseus/src/components/image-loader.tsx", + "name": "./packages/perseus/src/components/image-loader.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/image-loader.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/components/svg-image.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/info-tip/index.tsx", + "name": "./packages/perseus/src/components/info-tip/index.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/info-tip.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/components.ts" + } + ] + }, + { + "id": "./packages/perseus/src/dependencies.ts", + "name": "./packages/perseus/src/dependencies.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx" + }, + { + "moduleName": "./.storybook/preview.tsx" }, { "moduleName": "./packages/perseus/src/index.ts" @@ -2249,25 +2306,25 @@ "moduleName": "./packages/perseus/src/article-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/components/graphie-movables.ts" }, { - "moduleName": "./packages/perseus/src/components/graphie-movables.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { "moduleName": "./packages/perseus/src/util/tex.ts" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" }, { - "moduleName": "./packages/perseus/src/widget-container.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widget-container.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" @@ -2282,10 +2339,10 @@ "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" + "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" @@ -2328,66 +2385,6 @@ } ] }, - { - "id": "./packages/perseus/src/components/simple-keypad-input.tsx", - "name": "./packages/perseus/src/components/simple-keypad-input.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/components/range-input.tsx", - "name": "./packages/perseus/src/components/range-input.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/__stories__/range-input.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components.ts" - } - ] - }, - { - "id": "./packages/perseus/src/components/image-loader.tsx", - "name": "./packages/perseus/src/components/image-loader.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/__stories__/image-loader.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/components/lint.tsx", - "name": "./packages/perseus/src/components/lint.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/__stories__/lint.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" - } - ] - }, { "id": "./packages/perseus/src/components/input-with-examples.tsx", "name": "./packages/perseus/src/components/input-with-examples.tsx", @@ -2434,14 +2431,14 @@ ] }, { - "id": "./packages/perseus/src/components/hud.tsx", - "name": "./packages/perseus/src/components/hud.tsx", + "id": "./packages/perseus/src/components/lint.tsx", + "name": "./packages/perseus/src/components/lint.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/hud.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/lint.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" } ] }, @@ -2461,71 +2458,74 @@ ] }, { - "id": "./packages/perseus/src/icon-paths.ts", - "name": "./packages/perseus/src/icon-paths.ts", + "id": "./packages/perseus/src/components/number-input.tsx", + "name": "./packages/perseus/src/components/number-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/icon.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/index.ts" + "moduleName": "./packages/perseus/src/components/__stories__/number-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus/src/components.ts" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" + "moduleName": "./packages/perseus/src/components/range-input.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" - }, + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/range-input.tsx", + "name": "./packages/perseus/src/components/range-input.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/range-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + "moduleName": "./packages/perseus/src/components.ts" } ] }, { - "id": "./packages/perseus/src/components/icon.tsx", - "name": "./packages/perseus/src/components/icon.tsx", + "id": "./packages/perseus/src/components/simple-keypad-input.tsx", + "name": "./packages/perseus/src/components/simple-keypad-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/icon.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" } ] }, { - "id": "./packages/perseus/src/components/number-input.tsx", - "name": "./packages/perseus/src/components/number-input.tsx", + "id": "./packages/perseus/src/components/sortable.tsx", + "name": "./packages/perseus/src/components/sortable.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/number-input.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components.ts" - }, - { - "moduleName": "./packages/perseus/src/components/range-input.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/sortable.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" + "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" } ] }, @@ -2555,13 +2555,13 @@ "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { - "moduleName": "./packages/perseus/src/components/graph.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/components/graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/measurer/measurer.tsx" @@ -2651,25 +2651,25 @@ "name": "./testing/renderer-with-debug-ui.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" @@ -2678,31 +2678,31 @@ "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matcher/matcher.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/matcher/matcher.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" @@ -2710,23 +2710,26 @@ { "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/passage/passage.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/sorter/sorter.stories.tsx" @@ -2734,23 +2737,11 @@ { "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx" } ] }, - { - "id": "./packages/perseus/src/widgets/explanation/explanation.testdata.ts", - "name": "./packages/perseus/src/widgets/explanation/explanation.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/categorizer/categorizer.testdata.ts", "name": "./packages/perseus/src/widgets/categorizer/categorizer.testdata.ts", @@ -2761,29 +2752,20 @@ ] }, { - "id": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", - "name": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/dropdown/dropdown.testdata.ts", - "name": "./packages/perseus/src/widgets/dropdown/dropdown.testdata.ts", + "id": "./packages/perseus/src/widgets/group/group.testdata.ts", + "name": "./packages/perseus/src/widgets/group/group.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.testdata.ts", - "name": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.testdata.ts", + "id": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", + "name": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" } ] }, @@ -2839,65 +2821,74 @@ ] }, { - "id": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", - "name": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", + "id": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", + "name": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", - "name": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", + "id": "./packages/perseus/src/widgets/interaction/interaction.testdata.ts", + "name": "./packages/perseus/src/widgets/interaction/interaction.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/group/group.testdata.ts", - "name": "./packages/perseus/src/widgets/group/group.testdata.ts", + "id": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", + "name": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interaction/interaction.testdata.ts", - "name": "./packages/perseus/src/widgets/interaction/interaction.testdata.ts", + "id": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", + "name": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/image/image.testdata.ts", - "name": "./packages/perseus/src/widgets/image/image.testdata.ts", + "id": "./packages/perseus/src/widgets/explanation/explanation.testdata.ts", + "name": "./packages/perseus/src/widgets/explanation/explanation.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", - "name": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", + "id": "./packages/perseus/src/widgets/dropdown/dropdown.testdata.ts", + "name": "./packages/perseus/src/widgets/dropdown/dropdown.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", - "name": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", + "id": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.testdata.ts", + "name": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/image/image.testdata.ts", + "name": "./packages/perseus/src/widgets/image/image.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" } ] }, @@ -2926,38 +2917,11 @@ ] }, { - "id": "./packages/perseus/src/widgets/matcher/matcher.testdata.ts", - "name": "./packages/perseus/src/widgets/matcher/matcher.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/matcher/matcher.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", - "name": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", - "name": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", - "name": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", + "id": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", + "name": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" } ] }, @@ -2986,9 +2950,6 @@ { "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" }, @@ -2999,10 +2960,13 @@ "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { "moduleName": "./packages/perseus/src/components/sortable.tsx" @@ -3082,23 +3046,11 @@ ] }, { - "id": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx", - "name": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/numeric-input/index.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/numeric-input/numeric-input.testdata.ts", - "name": "./packages/perseus/src/widgets/numeric-input/numeric-input.testdata.ts", + "id": "./packages/perseus/src/widgets/label-image/__tests__/label-image.testdata.ts", + "name": "./packages/perseus/src/widgets/label-image/__tests__/label-image.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx" } ] }, @@ -3115,83 +3067,92 @@ ] }, { - "id": "./packages/perseus/src/widgets/label-image/__tests__/label-image.testdata.ts", - "name": "./packages/perseus/src/widgets/label-image/__tests__/label-image.testdata.ts", + "id": "./packages/perseus/src/widgets/matcher/matcher.testdata.ts", + "name": "./packages/perseus/src/widgets/matcher/matcher.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/matcher/matcher.stories.tsx" } ] }, { - "id": "./packages/perseus/src/hints-renderer.tsx", - "name": "./packages/perseus/src/hints-renderer.tsx", + "id": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", + "name": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/__stories__/hints-renderer.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/index.ts" - }, + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", + "name": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", + "reasons": [ { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" - }, + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", + "name": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", + "reasons": [ { - "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" } ] }, { - "id": "./packages/perseus/src/components/tooltip.tsx", - "name": "./packages/perseus/src/components/tooltip.tsx", + "id": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx", + "name": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/tooltip.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components/input-with-examples.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", - "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", + "id": "./packages/perseus/src/widgets/numeric-input/numeric-input.testdata.ts", + "name": "./packages/perseus/src/widgets/numeric-input/numeric-input.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", - "name": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", + "id": "./packages/math-input/src/components/tabbar/tabbar.tsx", + "name": "./packages/math-input/src/components/tabbar/tabbar.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/math-input/src/components/tabbar/tabbar.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" + "moduleName": "./packages/math-input/src/components/tabbar/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/components/device-framer.tsx", - "name": "./packages/perseus-editor/src/components/device-framer.tsx", + "id": "./packages/perseus-editor/src/article-editor.tsx", + "name": "./packages/perseus-editor/src/article-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/index.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" - }, + } + ] + }, + { + "id": "./packages/perseus-editor/src/item-extras-editor.tsx", + "name": "./packages/perseus-editor/src/item-extras-editor.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/item-editor.tsx" @@ -3199,41 +3160,71 @@ ] }, { - "id": "./packages/perseus-editor/src/components/viewport-resizer.tsx", - "name": "./packages/perseus-editor/src/components/viewport-resizer.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/content-preview.tsx", - "name": "./packages/perseus-editor/src/content-preview.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/item-extras-editor.tsx", - "name": "./packages/perseus-editor/src/item-extras-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" } ] }, @@ -3265,113 +3256,32 @@ ] }, { - "id": "./packages/perseus-editor/src/article-editor.tsx", - "name": "./packages/perseus-editor/src/article-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" - } - ] - }, - { - "id": "./packages/math-input/src/components/tabbar/tabbar.tsx", - "name": "./packages/math-input/src/components/tabbar/tabbar.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/tabbar/tabbar.stories.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/tabbar/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/index.ts", - "name": "./packages/perseus-editor/src/index.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" - } - ] - }, - { - "id": "./testing/side-by-side.tsx", - "name": "./testing/side-by-side.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - }, - { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/renderer-with-debug-ui.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", - "name": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", - "name": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, @@ -3400,11 +3310,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" @@ -3412,11 +3322,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" @@ -3424,11 +3334,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" @@ -3436,83 +3346,50 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx", + "id": "./packages/perseus-editor/src/components/viewport-resizer.tsx", + "name": "./packages/perseus-editor/src/components/viewport-resizer.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx", + "id": "./packages/perseus-editor/src/widgets/interaction-editor/index.ts", + "name": "./packages/perseus-editor/src/widgets/interaction-editor/index.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx", + "id": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", + "name": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interaction-editor/index.ts", - "name": "./packages/perseus-editor/src/widgets/interaction-editor/index.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" } ] }, @@ -3564,18 +3441,6 @@ } ] }, - { - "id": "./packages/perseus/src/components/multi-button-group.tsx", - "name": "./packages/perseus/src/components/multi-button-group.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/__stories__/multi-button-group.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components.ts" - } - ] - }, { "id": "./packages/perseus/src/__testdata__/server-item-renderer.testdata.ts", "name": "./packages/perseus/src/__testdata__/server-item-renderer.testdata.ts", @@ -3597,6 +3462,18 @@ } ] }, + { + "id": "./packages/perseus/src/components/multi-button-group.tsx", + "name": "./packages/perseus/src/components/multi-button-group.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/multi-button-group.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/components.ts" + } + ] + }, { "id": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx", "name": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx", @@ -3619,59 +3496,47 @@ ] }, { - "id": "./packages/perseus/src/widgets/passage/__tests__/passage.testdata.ts", - "name": "./packages/perseus/src/widgets/passage/__tests__/passage.testdata.ts", + "id": "./packages/perseus/src/widgets/python-program/python-program.testdata.ts", + "name": "./packages/perseus/src/widgets/python-program/python-program.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage/passage.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/plotter/plotter.testdata.ts", - "name": "./packages/perseus/src/widgets/plotter/plotter.testdata.ts", + "id": "./packages/perseus/src/widgets/radio/__tests__/base-radio.testdata.ts", + "name": "./packages/perseus/src/widgets/radio/__tests__/base-radio.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/python-program/python-program.testdata.ts", - "name": "./packages/perseus/src/widgets/python-program/python-program.testdata.ts", + "id": "./packages/perseus/src/widgets/radio/base-radio.tsx", + "name": "./packages/perseus/src/widgets/radio/base-radio.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/video/video-transcript-link.tsx", - "name": "./packages/perseus/src/widgets/video/video-transcript-link.tsx", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx" + }, { - "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx" + "moduleName": "./packages/perseus/src/index.ts" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/sorter/sorter.testdata.ts", - "name": "./packages/perseus/src/widgets/sorter/sorter.testdata.ts", + "id": "./packages/perseus/src/widgets/radio/option-status.tsx", + "name": "./packages/perseus/src/widgets/radio/option-status.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/video/video.testdata.ts", - "name": "./packages/perseus/src/widgets/video/video.testdata.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx" + }, { - "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" } ] }, @@ -3688,26 +3553,29 @@ ] }, { - "id": "./packages/perseus/src/widgets/radio/__tests__/base-radio.testdata.ts", - "name": "./packages/perseus/src/widgets/radio/__tests__/base-radio.testdata.ts", + "id": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", + "name": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/base-radio.tsx", - "name": "./packages/perseus/src/widgets/radio/base-radio.tsx", + "id": "./packages/perseus/src/widgets/radio/choice.tsx", + "name": "./packages/perseus/src/widgets/radio/choice.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx" }, { - "moduleName": "./packages/perseus/src/index.ts" + "moduleName": "./packages/perseus/src/widgets/radio/choice-none-above.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" } ] }, @@ -3723,18 +3591,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/radio/option-status.tsx", - "name": "./packages/perseus/src/widgets/radio/option-status.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" - } - ] - }, { "id": "./packages/perseus/src/styles/constants.ts", "name": "./packages/perseus/src/styles/constants.ts", @@ -3776,10 +3632,10 @@ "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/components/lint.tsx" + "moduleName": "./packages/perseus/src/components/hud.tsx" }, { - "moduleName": "./packages/perseus/src/components/hud.tsx" + "moduleName": "./packages/perseus/src/components/lint.tsx" }, { "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" @@ -3803,10 +3659,10 @@ "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" } ] }, @@ -3823,110 +3679,182 @@ ] }, { - "id": "./packages/perseus/src/widgets/radio/choice.tsx", - "name": "./packages/perseus/src/widgets/radio/choice.tsx", + "id": "./packages/perseus-editor/src/index.ts", + "name": "./packages/perseus-editor/src/index.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/choice-none-above.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/cursor-contexts.ts", - "name": "./packages/math-input/src/components/input/cursor-contexts.ts", + "id": "./testing/side-by-side.tsx", + "name": "./testing/side-by-side.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/math-input/src/index.ts" + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/math-input/src/components/input/mathquill-helpers.ts" + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" - }, + "moduleName": "./testing/renderer-with-debug-ui.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", + "name": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", + "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/utils.ts" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/mathquill-helpers.ts", - "name": "./packages/math-input/src/components/input/mathquill-helpers.ts", + "id": "./packages/perseus-editor/src/components/device-framer.tsx", + "name": "./packages/perseus-editor/src/components/device-framer.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/math-input/src/index.ts" + "moduleName": "./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-backspace.ts" + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/mathquill-instance.ts", - "name": "./packages/math-input/src/components/input/mathquill-instance.ts", + "id": "./packages/perseus-editor/src/content-preview.tsx", + "name": "./packages/perseus-editor/src/content-preview.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" - }, + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/hints-renderer.tsx", + "name": "./packages/perseus/src/hints-renderer.tsx", + "reasons": [ { - "moduleName": "./packages/math-input/src/index.ts" + "moduleName": "./packages/perseus/src/__stories__/hints-renderer.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/input/mathquill-helpers.ts" + "moduleName": "./packages/perseus/src/index.ts" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" - }, + "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/tooltip.tsx", + "name": "./packages/perseus/src/components/tooltip.tsx", + "reasons": [ { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-exponent.ts" + "moduleName": "./packages/perseus/src/components/__stories__/tooltip.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" - }, + "moduleName": "./packages/perseus/src/components/input-with-examples.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/passage/__tests__/passage.testdata.ts", + "name": "./packages/perseus/src/widgets/passage/__tests__/passage.testdata.ts", + "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" - }, + "moduleName": "./packages/perseus/src/widgets/passage/passage.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", + "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", + "reasons": [ { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-backspace.ts" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" } ] }, { - "id": "./packages/math-input/src/components/key-handlers/key-translator.ts", - "name": "./packages/math-input/src/components/key-handlers/key-translator.ts", + "id": "./packages/perseus/src/widgets/plotter/plotter.testdata.ts", + "name": "./packages/perseus/src/widgets/plotter/plotter.testdata.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/sorter/sorter.testdata.ts", + "name": "./packages/perseus/src/widgets/sorter/sorter.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/video/video-transcript-link.tsx", + "name": "./packages/perseus/src/widgets/video/video-transcript-link.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx" }, { - "moduleName": "./packages/math-input/src/index.ts" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/video/video.testdata.ts", + "name": "./packages/perseus/src/widgets/video/video.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/keypad.tsx", + "name": "./packages/math-input/src/components/keypad/keypad.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/index.tsx" }, { - "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/mobile-keypad.tsx", + "name": "./packages/math-input/src/components/keypad/mobile-keypad.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/index.tsx" } ] }, @@ -3957,6 +3885,84 @@ } ] }, + { + "id": "./packages/math-input/src/components/input/mathquill-instance.ts", + "name": "./packages/math-input/src/components/input/mathquill-instance.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/index.ts" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/input/mathquill-helpers.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-exponent.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" + }, + { + "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-backspace.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/input/cursor-contexts.ts", + "name": "./packages/math-input/src/components/input/cursor-contexts.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/index.ts" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/input/mathquill-helpers.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/utils.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/input/mathquill-helpers.ts", + "name": "./packages/math-input/src/components/input/mathquill-helpers.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/index.ts" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" + }, + { + "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-backspace.ts" + } + ] + }, { "id": "./packages/math-input/src/components/i18n-context.tsx", "name": "./packages/math-input/src/components/i18n-context.tsx", @@ -4042,23 +4048,17 @@ ] }, { - "id": "./packages/math-input/src/components/keypad/keypad.tsx", - "name": "./packages/math-input/src/components/keypad/keypad.tsx", + "id": "./packages/math-input/src/components/key-handlers/key-translator.ts", + "name": "./packages/math-input/src/components/key-handlers/key-translator.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/index.tsx" + "moduleName": "./packages/math-input/src/index.ts" }, { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/mobile-keypad.tsx", - "name": "./packages/math-input/src/components/keypad/mobile-keypad.tsx", - "reasons": [ + "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + }, { - "moduleName": "./packages/math-input/src/components/keypad/index.tsx" + "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" } ] }, @@ -4084,6 +4084,9 @@ { "moduleName": "./packages/perseus/src/article-renderer.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + }, { "moduleName": "./packages/perseus/src/renderer.tsx" }, @@ -4096,9 +4099,6 @@ { "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, @@ -4121,10 +4121,10 @@ "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" }, { "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" @@ -4412,10 +4412,10 @@ "moduleName": "./packages/perseus/src/widgets.ts" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" }, { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" @@ -4466,19 +4466,19 @@ "moduleName": "./packages/perseus/src/util/graphie.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + "moduleName": "./packages/perseus/src/util/answer-types.ts" }, { - "moduleName": "./packages/perseus/src/util/answer-types.ts" + "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" }, { "moduleName": "./packages/perseus/src/util/geometry.ts" }, { - "moduleName": "./packages/perseus/src/util/tex.ts" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/perseus/src/util/tex.ts" }, { "moduleName": "./packages/perseus/src/interactive2/arrowhead.ts" @@ -4547,10 +4547,10 @@ "moduleName": "./packages/perseus/src/index.ts" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, @@ -4580,10 +4580,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-point.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-vector.tsx" @@ -4661,55 +4661,55 @@ "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, { - "moduleName": "./packages/perseus/src/components/number-input.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/components/number-input.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" + "moduleName": "./packages/perseus/src/widgets/passage/passage-markdown.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage/passage-markdown.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" @@ -4718,10 +4718,10 @@ "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/components/sortable.tsx" + "moduleName": "./packages/perseus/src/components/math-input.tsx" }, { - "moduleName": "./packages/perseus/src/components/math-input.tsx" + "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { "moduleName": "./packages/perseus/src/server-item-renderer.tsx" @@ -4733,10 +4733,10 @@ "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" + "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/option-status.tsx" @@ -4750,15 +4750,15 @@ { "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { "moduleName": "./packages/perseus/src/hint-renderer.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" }, @@ -4775,10 +4775,10 @@ "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" }, { "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" @@ -4823,31 +4823,31 @@ "moduleName": "./packages/perseus/src/article-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/components/graphie-classes.ts" }, { - "moduleName": "./packages/perseus/src/components/graphie-classes.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { "moduleName": "./dev/flipbook.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus/src/renderer-util.ts" }, { "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" }, { - "moduleName": "./packages/perseus/src/util/geometry.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph-validator.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + "moduleName": "./packages/perseus/src/util/geometry.ts" }, { - "moduleName": "./packages/perseus/src/renderer-util.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph-validator.ts" }, { "moduleName": "./packages/perseus/src/widgets/plotter/plotter-validator.ts" @@ -4856,31 +4856,31 @@ "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, { - "moduleName": "./packages/perseus/src/components/graph.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" }, { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" }, { - "moduleName": "./packages/perseus/src/components/number-input.tsx" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/components/graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus/src/components/graphie.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + "moduleName": "./packages/perseus/src/components/number-input.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" @@ -5098,24 +5098,24 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/grid.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" }, @@ -5129,28 +5129,28 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-polygon.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/angle-indicators.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/angle-indicators.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx" @@ -5194,9 +5194,6 @@ { "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, @@ -5206,6 +5203,9 @@ { "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, @@ -5219,10 +5219,10 @@ "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" } ] }, @@ -5322,6 +5322,15 @@ } ] }, + { + "id": "./packages/keypad-context/src/keypad-context.tsx", + "name": "./packages/keypad-context/src/keypad-context.tsx", + "reasons": [ + { + "moduleName": "./packages/keypad-context/src/index.ts" + } + ] + }, { "id": "./packages/perseus-editor/src/all-editors.ts", "name": "./packages/perseus-editor/src/all-editors.ts", @@ -5385,63 +5394,6 @@ } ] }, - { - "id": "./packages/keypad-context/src/keypad-context.tsx", - "name": "./packages/keypad-context/src/keypad-context.tsx", - "reasons": [ - { - "moduleName": "./packages/keypad-context/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/styles/constants.ts", - "name": "./packages/perseus-editor/src/styles/constants.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/device-framer.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/content-preview.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/styles/icon-paths.ts", - "name": "./packages/perseus-editor/src/styles/icon-paths.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/components/widget-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" - } - ] - }, { "id": "./packages/perseus-editor/src/version.ts", "name": "./packages/perseus-editor/src/version.ts", @@ -5507,10 +5459,10 @@ "moduleName": "./packages/perseus-editor/src/item-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" @@ -5580,6 +5532,21 @@ } ] }, + { + "id": "./packages/perseus-editor/src/styles/constants.ts", + "name": "./packages/perseus-editor/src/styles/constants.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/components/device-framer.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/content-preview.tsx" + } + ] + }, { "id": "./packages/perseus-editor/src/components/scrollless-number-text-field.tsx", "name": "./packages/perseus-editor/src/components/scrollless-number-text-field.tsx", @@ -5588,10 +5555,10 @@ "moduleName": "./packages/perseus-editor/src/components/__stories__/scrollless-number-text-field.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/angle-input.tsx" + "moduleName": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx" + "moduleName": "./packages/perseus-editor/src/components/angle-input.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" @@ -5611,32 +5578,50 @@ ] }, { - "id": "./packages/perseus-editor/src/components/toggleable-caret.tsx", - "name": "./packages/perseus-editor/src/components/toggleable-caret.tsx", + "id": "./packages/perseus-editor/src/styles/icon-paths.ts", + "name": "./packages/perseus-editor/src/styles/icon-paths.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/toggleable-caret.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" }, { - "moduleName": "./packages/perseus-editor/src/tex-error-view.tsx" + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/heading.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/components/widget-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" } ] }, { - "id": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", + "id": "./packages/perseus-editor/src/components/toggleable-caret.tsx", + "name": "./packages/perseus-editor/src/components/toggleable-caret.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/toggleable-caret.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/article-diff.tsx" + "moduleName": "./packages/perseus-editor/src/tex-error-view.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/item-diff.tsx" + "moduleName": "./packages/perseus-editor/src/components/heading.tsx" } ] }, @@ -5649,6 +5634,21 @@ } ] }, + { + "id": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/diffs/article-diff.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/diffs/item-diff.tsx" + } + ] + }, { "id": "./packages/perseus/src/components/info-tip/info-tip-base.tsx", "name": "./packages/perseus/src/components/info-tip/info-tip-base.tsx", @@ -5666,13 +5666,13 @@ "moduleName": "./packages/perseus/src/components/zoomable-tex.tsx" }, { - "moduleName": "./packages/perseus/src/components/graph.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/components/graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx" @@ -5685,6 +5685,39 @@ } ] }, + { + "id": "./packages/perseus/src/basic-widgets.ts", + "name": "./packages/perseus/src/basic-widgets.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/init.ts" + }, + { + "moduleName": "./packages/perseus/src/all-widgets.ts" + } + ] + }, + { + "id": "./packages/perseus/src/extra-widgets.ts", + "name": "./packages/perseus/src/extra-widgets.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/init.ts" + }, + { + "moduleName": "./packages/perseus/src/all-widgets.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", + "name": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad.tsx" + } + ] + }, { "id": "./packages/perseus-core/src/index.ts", "name": "./packages/perseus-core/src/index.ts", @@ -5717,25 +5750,25 @@ "moduleName": "./packages/perseus-editor/src/version.ts" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/components/graphie-classes.ts" }, { - "moduleName": "./packages/perseus/src/components/graphie-classes.ts" + "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" }, { "moduleName": "./packages/perseus/src/util/graphie.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus/src/error-boundary.tsx" }, { - "moduleName": "./packages/perseus/src/error-boundary.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { "moduleName": "./packages/perseus/src/util/answer-types.ts" @@ -5750,10 +5783,10 @@ "moduleName": "./packages/kas/src/version.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" }, { "moduleName": "./packages/perseus-linter/src/rule.ts" @@ -5771,13 +5804,13 @@ "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, { - "moduleName": "./packages/pure-markdown/src/version.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher-validator.ts" }, { - "moduleName": "./packages/simple-markdown/src/version.ts" + "moduleName": "./packages/pure-markdown/src/version.ts" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher-validator.ts" + "moduleName": "./packages/simple-markdown/src/version.ts" }, { "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" @@ -5811,39 +5844,6 @@ } ] }, - { - "id": "./packages/perseus/src/basic-widgets.ts", - "name": "./packages/perseus/src/basic-widgets.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/init.ts" - }, - { - "moduleName": "./packages/perseus/src/all-widgets.ts" - } - ] - }, - { - "id": "./packages/perseus/src/extra-widgets.ts", - "name": "./packages/perseus/src/extra-widgets.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/init.ts" - }, - { - "moduleName": "./packages/perseus/src/all-widgets.ts" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", - "name": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/input-number/input-number.tsx", "name": "./packages/perseus/src/widgets/input-number/input-number.tsx", @@ -5928,30 +5928,6 @@ } ] }, - { - "id": "./testing/ke-score-ui.tsx", - "name": "./testing/ke-score-ui.tsx", - "reasons": [ - { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", - "name": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", - "reasons": [ - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx" - } - ] - }, { "id": "./packages/perseus/src/multi-items/multi-renderer.tsx", "name": "./packages/perseus/src/multi-items/multi-renderer.tsx", @@ -5971,302 +5947,122 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/math/clamp.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/math/clamp.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/interpolation.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/math/snap.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/math/snap.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/expression-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/expression-editor.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/math/coordinates.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/math/coordinates.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/math/interval.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/math/interval.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/grapher-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/grapher-editor.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/math/interpolation.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/math/interpolation.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/group-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/group-editor.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/math/geometry.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/math/geometry.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/iframe-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/iframe-editor.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/math/angles.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/math/angles.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph-validator.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/image-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/image-editor.tsx", + "id": "./testing/ke-score-ui.tsx", + "name": "./testing/ke-score-ui.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx" + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image-editor.tsx", + "id": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", + "name": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx" + "moduleName": "./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/matrix-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/matrix-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/measurer-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/measurer-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/molecule-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/molecule-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/orderer-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/orderer-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/passage-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/passage-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/plotter-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/plotter-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/radio/editor.tsx", - "name": "./packages/perseus-editor/src/widgets/radio/editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/table-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/table-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/video-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/video-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/math/clamp.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/math/clamp.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/interpolation.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/math/snap.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/math/snap.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/math/coordinates.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/math/coordinates.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/math/interval.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/math/interval.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/box.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/math/interpolation.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/math/interpolation.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/math/geometry.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/math/geometry.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/math/angles.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/math/angles.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/index.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph-validator.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/json-editor.tsx", - "name": "./packages/perseus-editor/src/components/json-editor.tsx", + "id": "./packages/perseus-editor/src/components/json-editor.tsx", + "name": "./packages/perseus-editor/src/components/json-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/article-editor.tsx" @@ -6296,28 +6092,28 @@ "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/widget-container.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widget-container.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { "moduleName": "./packages/perseus/src/hints-renderer.tsx" @@ -6328,15 +6124,15 @@ { "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { "moduleName": "./packages/perseus/src/hint-renderer.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" }, @@ -6350,10 +6146,10 @@ "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" }, { "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" @@ -6385,6 +6181,9 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + }, { "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" }, @@ -6395,20 +6194,17 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph-validator.ts" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" }, { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/perseus/src/interactive2/movable.ts" }, { "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" }, - { - "moduleName": "./packages/perseus/src/interactive2/movable.ts" - }, { "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" }, @@ -6427,6 +6223,9 @@ { "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" }, + { + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + }, { "moduleName": "./packages/perseus/src/components/graph.tsx" }, @@ -6436,9 +6235,6 @@ { "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, @@ -6446,13 +6242,13 @@ "moduleName": "./packages/perseus/src/interactive2/movable-line-options.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point-options.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon-options.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-point-options.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon-options.ts" }, { "moduleName": "./packages/perseus/src/interactive2/get-clip-point.ts" @@ -6467,91 +6263,295 @@ "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + } + ] + }, + { + "id": "./packages/pure-markdown/src/index.ts", + "name": "./packages/pure-markdown/src/index.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/interactive2/objective_.ts", + "name": "./packages/perseus/src/interactive2/objective_.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/traversal.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + }, + { + "moduleName": "./packages/perseus/src/renderer.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/util/answer-types.ts", + "name": "./packages/perseus/src/util/answer-types.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/input-number/input-number-validator.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/table/table-validator.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/matrix/matrix-validator.ts" + } + ] + }, + { + "id": "./packages/perseus/src/util.graphie.ts", + "name": "./packages/perseus/src/util.graphie.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/hint-editor.tsx", + "name": "./packages/perseus-editor/src/hint-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/item-editor.tsx", + "name": "./packages/perseus-editor/src/item-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/expression-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/expression-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/grapher-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/grapher-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/group-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/group-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/iframe-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/iframe-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/image-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/image-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/label-image-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/matrix-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/matrix-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/measurer-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/measurer-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/molecule-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/molecule-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus/src/interactive2/objective_.ts", - "name": "./packages/perseus/src/interactive2/objective_.ts", + "id": "./packages/perseus-editor/src/widgets/orderer-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/orderer-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/traversal.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" - }, - { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/pure-markdown/src/index.ts", - "name": "./packages/pure-markdown/src/index.ts", + "id": "./packages/perseus-editor/src/widgets/passage-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/passage-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus/src/util/answer-types.ts", - "name": "./packages/perseus/src/util/answer-types.ts", + "id": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number-validator.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/table/table-validator.ts" - }, + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix-validator.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus/src/util.graphie.ts", - "name": "./packages/perseus/src/util.graphie.ts", + "id": "./packages/perseus-editor/src/widgets/plotter-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/plotter-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus-editor/src/hint-editor.tsx", - "name": "./packages/perseus-editor/src/hint-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/radio/editor.tsx", + "name": "./packages/perseus-editor/src/widgets/radio/editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" }, { - "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/item-editor.tsx", - "name": "./packages/perseus-editor/src/item-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/table-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/table-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/video-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/video-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, @@ -6665,10 +6665,10 @@ "moduleName": "./packages/kmath/src/index.ts" }, { - "moduleName": "./packages/kmath/src/point.ts" + "moduleName": "./packages/kmath/src/vector.ts" }, { - "moduleName": "./packages/kmath/src/vector.ts" + "moduleName": "./packages/kmath/src/point.ts" } ] }, @@ -6680,13 +6680,13 @@ "moduleName": "./packages/kmath/src/index.ts" }, { - "moduleName": "./packages/kmath/src/line.ts" + "moduleName": "./packages/kmath/src/point.ts" }, { "moduleName": "./packages/kmath/src/ray.ts" }, { - "moduleName": "./packages/kmath/src/point.ts" + "moduleName": "./packages/kmath/src/line.ts" } ] }, @@ -6698,10 +6698,10 @@ "moduleName": "./packages/kmath/src/index.ts" }, { - "moduleName": "./packages/kmath/src/line.ts" + "moduleName": "./packages/kmath/src/ray.ts" }, { - "moduleName": "./packages/kmath/src/ray.ts" + "moduleName": "./packages/kmath/src/line.ts" } ] }, @@ -6735,33 +6735,6 @@ } ] }, - { - "id": "./packages/kas/src/version.ts", - "name": "./packages/kas/src/version.ts", - "reasons": [ - { - "moduleName": "./packages/kas/src/index.js" - } - ] - }, - { - "id": "./packages/kas/src/nodes.ts", - "name": "./packages/kas/src/nodes.ts", - "reasons": [ - { - "moduleName": "./packages/kas/src/index.js" - } - ] - }, - { - "id": "./packages/kas/src/compare.ts", - "name": "./packages/kas/src/compare.ts", - "reasons": [ - { - "moduleName": "./packages/kas/src/index.js" - } - ] - }, { "id": "./packages/perseus-editor/src/diffs/widget-diff.tsx", "name": "./packages/perseus-editor/src/diffs/widget-diff.tsx", @@ -6774,27 +6747,6 @@ } ] }, - { - "id": "./packages/perseus-editor/src/components/heading.tsx", - "name": "./packages/perseus-editor/src/components/heading.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-correct-answer.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-description.tsx" - } - ] - }, { "id": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx", "name": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx", @@ -6876,6 +6828,54 @@ } ] }, + { + "id": "./packages/perseus-editor/src/components/heading.tsx", + "name": "./packages/perseus-editor/src/components/heading.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-correct-answer.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-description.tsx" + } + ] + }, + { + "id": "./packages/kas/src/version.ts", + "name": "./packages/kas/src/version.ts", + "reasons": [ + { + "moduleName": "./packages/kas/src/index.js" + } + ] + }, + { + "id": "./packages/kas/src/nodes.ts", + "name": "./packages/kas/src/nodes.ts", + "reasons": [ + { + "moduleName": "./packages/kas/src/index.js" + } + ] + }, + { + "id": "./packages/kas/src/compare.ts", + "name": "./packages/kas/src/compare.ts", + "reasons": [ + { + "moduleName": "./packages/kas/src/index.js" + } + ] + }, { "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx", "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx", @@ -6952,20 +6952,11 @@ { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/zoom.ts", - "name": "./packages/perseus/src/zoom.ts", - "reasons": [ + }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" } ] }, @@ -6983,94 +6974,55 @@ "moduleName": "./packages/perseus/src/util/interactive.ts" }, { - "moduleName": "./packages/perseus/src/components/graphie.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/util/interactive.ts", - "name": "./packages/perseus/src/util/interactive.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/util/graph-utils.ts" - } - ] - }, - { - "id": "./packages/perseus/src/interactive2.ts", - "name": "./packages/perseus/src/interactive2.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/graphie-movables.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/components/graphie-classes.ts", - "name": "./packages/perseus/src/components/graphie-classes.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/graphie-movables.ts" - }, - { - "moduleName": "./packages/perseus/src/components/graphie.tsx" - } - ] - }, - { - "id": "./vendor/raphael/raphael.js", - "name": "./vendor/raphael/raphael.js", - "reasons": [ - { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/components/graphie.tsx" } ] }, { - "id": "./packages/perseus/src/util/drawing-transform.ts", - "name": "./packages/perseus/src/util/drawing-transform.ts", + "id": "./packages/perseus/src/util/interactive.ts", + "name": "./packages/perseus/src/util/interactive.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/util/graph-utils.ts" } ] }, { - "id": "./packages/perseus/src/util/graph-bounds.ts", - "name": "./packages/perseus/src/util/graph-bounds.ts", + "id": "./packages/perseus/src/interactive2/movable-helper-methods.ts", + "name": "./packages/perseus/src/interactive2/movable-helper-methods.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" } ] }, { - "id": "./packages/perseus/src/util/tex.ts", - "name": "./packages/perseus/src/util/tex.ts", + "id": "./packages/perseus/src/interactive2.ts", + "name": "./packages/perseus/src/interactive2.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/components/graphie-movables.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" } ] }, { - "id": "./packages/perseus/src/interactive2/movable-helper-methods.ts", - "name": "./packages/perseus/src/interactive2/movable-helper-methods.ts", + "id": "./packages/perseus/src/components/graphie-classes.ts", + "name": "./packages/perseus/src/components/graphie-classes.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" + "moduleName": "./packages/perseus/src/components/graphie-movables.ts" + }, + { + "moduleName": "./packages/perseus/src/components/graphie.tsx" } ] }, @@ -7094,13 +7046,13 @@ "moduleName": "./packages/perseus-linter/src/rules/double-spacing-after-terminal.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/extra-content-spacing.ts" + "moduleName": "./packages/perseus-linter/src/rules/expression-widget.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-level-1.ts" + "moduleName": "./packages/perseus-linter/src/rules/extra-content-spacing.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/expression-widget.ts" + "moduleName": "./packages/perseus-linter/src/rules/heading-level-1.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/heading-level-skip.ts" @@ -7108,6 +7060,9 @@ { "moduleName": "./packages/perseus-linter/src/rules/heading-sentence-case.ts" }, + { + "moduleName": "./packages/perseus-linter/src/rules/heading-title-case.ts" + }, { "moduleName": "./packages/perseus-linter/src/rules/image-alt-text.ts" }, @@ -7115,23 +7070,20 @@ "moduleName": "./packages/perseus-linter/src/rules/image-in-table.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-title-case.ts" + "moduleName": "./packages/perseus-linter/src/rules/image-spaces-around-urls.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/image-spaces-around-urls.ts" + "moduleName": "./packages/perseus-linter/src/rules/link-click-here.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/image-widget.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/link-click-here.ts" + "moduleName": "./packages/perseus-linter/src/rules/long-paragraph.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/math-adjacent.ts" }, - { - "moduleName": "./packages/perseus-linter/src/rules/long-paragraph.ts" - }, { "moduleName": "./packages/perseus-linter/src/rules/math-align-extra-break.ts" }, @@ -7139,10 +7091,10 @@ "moduleName": "./packages/perseus-linter/src/rules/math-empty.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-align-linebreaks.ts" + "moduleName": "./packages/perseus-linter/src/rules/math-font-size.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-font-size.ts" + "moduleName": "./packages/perseus-linter/src/rules/math-align-linebreaks.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/math-frac.ts" @@ -7162,18 +7114,18 @@ { "moduleName": "./packages/perseus-linter/src/rules/nested-lists.ts" }, - { - "moduleName": "./packages/perseus-linter/src/rules/unbalanced-code-delimiters.ts" - }, { "moduleName": "./packages/perseus-linter/src/rules/static-widget-in-question-stem.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/unescaped-dollar.ts" + "moduleName": "./packages/perseus-linter/src/rules/unbalanced-code-delimiters.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/table-missing-cells.ts" }, + { + "moduleName": "./packages/perseus-linter/src/rules/unescaped-dollar.ts" + }, { "moduleName": "./packages/perseus-linter/src/rules/widget-in-table.ts" } @@ -7216,125 +7168,107 @@ ] }, { - "id": "./dev/cache.ts", - "name": "./dev/cache.ts", + "id": "./vendor/raphael/raphael.js", + "name": "./vendor/raphael/raphael.js", "reasons": [ { - "moduleName": "./dev/flipbook-model.ts" + "moduleName": "./packages/perseus/src/util/graphie.ts" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", + "id": "./packages/perseus/src/util/drawing-transform.ts", + "name": "./packages/perseus/src/util/drawing-transform.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" } ] }, { - "id": "./dev/editable-controlled-input.tsx", - "name": "./dev/editable-controlled-input.tsx", + "id": "./packages/perseus/src/util/graph-bounds.ts", + "name": "./packages/perseus/src/util/graph-bounds.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" } ] }, { - "id": "./dev/flipbook-model.ts", - "name": "./dev/flipbook-model.ts", + "id": "./packages/perseus/src/util/tex.ts", + "name": "./packages/perseus/src/util/tex.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" } ] }, { - "id": "./dev/header.tsx", - "name": "./dev/header.tsx", + "id": "./packages/perseus/src/zoom.ts", + "name": "./packages/perseus/src/zoom.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" } ] }, { - "id": "./packages/perseus/src/styles/perseus-renderer.less", - "name": "./packages/perseus/src/styles/perseus-renderer.less", + "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", "reasons": [ { "moduleName": "./dev/flipbook.tsx" - }, - { - "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/tex-wrangler.ts", - "name": "./packages/perseus/src/tex-wrangler.ts", + "id": "./dev/editable-controlled-input.tsx", + "name": "./dev/editable-controlled-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number-validator.ts" + "moduleName": "./dev/flipbook.tsx" } ] }, { - "id": "./packages/kas/src/index.js", - "name": "./packages/kas/src/index.js", + "id": "./dev/flipbook-model.ts", + "name": "./dev/flipbook-model.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" - }, - { - "moduleName": "./packages/perseus/src/util/answer-types.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" + "moduleName": "./dev/flipbook.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", - "name": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", + "id": "./dev/header.tsx", + "name": "./dev/header.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./dev/flipbook.tsx" } ] }, { - "id": "./packages/math-input/src/components/keypad/utils.ts", - "name": "./packages/math-input/src/components/keypad/utils.ts", + "id": "./packages/perseus/src/styles/perseus-renderer.less", + "name": "./packages/perseus/src/styles/perseus-renderer.less", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" + "moduleName": "./dev/flipbook.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" - }, + "moduleName": "./packages/perseus/src/renderer.tsx" + } + ] + }, + { + "id": "./dev/cache.ts", + "name": "./dev/cache.ts", + "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" + "moduleName": "./dev/flipbook-model.ts" } ] }, @@ -7523,55 +7457,130 @@ "name": "./packages/perseus/src/widgets/python-program/index.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/extra-widgets.ts" + "moduleName": "./packages/perseus/src/extra-widgets.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/sorter/index.ts", + "name": "./packages/perseus/src/widgets/sorter/index.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/extra-widgets.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/video/index.ts", + "name": "./packages/perseus/src/widgets/video/index.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/extra-widgets.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/input/cursor-styles.ts", + "name": "./packages/math-input/src/components/input/cursor-styles.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/input/cursor-handle.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/key-handlers/handle-backspace.ts", + "name": "./packages/math-input/src/components/key-handlers/handle-backspace.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" + } + ] + }, + { + "id": "./packages/math-input/src/fake-react-native-web/view.tsx", + "name": "./packages/math-input/src/fake-react-native-web/view.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/fake-react-native-web/index.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/utils.ts", + "name": "./packages/math-input/src/components/keypad/utils.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" + } + ] + }, + { + "id": "./packages/kas/src/index.js", + "name": "./packages/kas/src/index.js", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" + }, + { + "moduleName": "./packages/perseus/src/util/answer-types.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/sorter/index.ts", - "name": "./packages/perseus/src/widgets/sorter/index.ts", + "id": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", + "name": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/extra-widgets.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/video/index.ts", - "name": "./packages/perseus/src/widgets/video/index.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" + }, { - "moduleName": "./packages/perseus/src/extra-widgets.ts" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" } ] }, { - "id": "./packages/math-input/src/components/key-handlers/handle-backspace.ts", - "name": "./packages/math-input/src/components/key-handlers/handle-backspace.ts", + "id": "./packages/perseus/src/widgets/radio/radio-component.tsx", + "name": "./packages/perseus/src/widgets/radio/radio-component.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" + "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" } ] }, { - "id": "./packages/math-input/src/components/input/cursor-styles.ts", - "name": "./packages/math-input/src/components/input/cursor-styles.ts", + "id": "./packages/perseus/src/widgets/radio/radio-validator.ts", + "name": "./packages/perseus/src/widgets/radio/radio-validator.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/cursor-handle.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" }, { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/fake-react-native-web/view.tsx", - "name": "./packages/math-input/src/fake-react-native-web/view.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/fake-react-native-web/index.ts" + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" } ] }, @@ -7642,23 +7651,11 @@ ] }, { - "id": "./packages/perseus/src/widgets/radio/radio-component.tsx", - "name": "./packages/perseus/src/widgets/radio/radio-component.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/radio/radio-validator.ts", - "name": "./packages/perseus/src/widgets/radio/radio-validator.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/index.ts" } ] }, @@ -7699,11 +7696,23 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", + "id": "./packages/perseus/src/widgets/grapher/grapher-validator.ts", + "name": "./packages/perseus/src/widgets/grapher/grapher-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/index.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/tex-wrangler.ts", + "name": "./packages/perseus/src/tex-wrangler.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/input-number/input-number-validator.ts" } ] }, @@ -7715,10 +7724,10 @@ "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + "moduleName": "./packages/perseus/src/interactive2/movable.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" }, { "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" @@ -7761,15 +7770,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/grapher/grapher-validator.ts", - "name": "./packages/perseus/src/widgets/grapher/grapher-validator.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" - } - ] - }, { "id": "./packages/pure-markdown/src/version.ts", "name": "./packages/pure-markdown/src/version.ts", @@ -7840,18 +7840,18 @@ { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/parametric-editor.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/point-editor.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" } @@ -7879,26 +7879,26 @@ { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/parametric-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/point-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/constraint-editor.tsx" @@ -7918,23 +7918,11 @@ "id": "./packages/perseus-editor/src/widgets/interaction-editor/constraint-editor.tsx", "name": "./packages/perseus-editor/src/widgets/interaction-editor/constraint-editor.tsx", "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/util/react-render.tsx", - "name": "./packages/perseus/src/util/react-render.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/util/tex.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" } ] }, @@ -7983,6 +7971,18 @@ } ] }, + { + "id": "./packages/perseus/src/util/react-render.tsx", + "name": "./packages/perseus/src/util/react-render.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util/tex.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + } + ] + }, { "id": "./packages/perseus-linter/src/rules/absolute-url.ts", "name": "./packages/perseus-linter/src/rules/absolute-url.ts", @@ -8299,20 +8299,20 @@ ] }, { - "id": "./packages/perseus/src/widgets/dropdown/dropdown.tsx", - "name": "./packages/perseus/src/widgets/dropdown/dropdown.tsx", + "id": "./packages/perseus/src/widgets/explanation/explanation.tsx", + "name": "./packages/perseus/src/widgets/explanation/explanation.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/dropdown/index.ts" + "moduleName": "./packages/perseus/src/widgets/explanation/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/explanation/explanation.tsx", - "name": "./packages/perseus/src/widgets/explanation/explanation.tsx", + "id": "./packages/perseus/src/widgets/dropdown/dropdown.tsx", + "name": "./packages/perseus/src/widgets/dropdown/dropdown.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/explanation/index.ts" + "moduleName": "./packages/perseus/src/widgets/dropdown/index.ts" } ] }, @@ -8421,27 +8421,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", - "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/passage-ref/index.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/python-program/python-program.tsx", - "name": "./packages/perseus/src/widgets/python-program/python-program.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/python-program/index.ts" - } - ] - }, { "id": "./packages/perseus/src/widgets/measurer/measurer.tsx", "name": "./packages/perseus/src/widgets/measurer/measurer.tsx", @@ -8461,56 +8440,50 @@ ] }, { - "id": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx", - "name": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx", + "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", + "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/index.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/sorter/sorter.tsx", - "name": "./packages/perseus/src/widgets/sorter/sorter.tsx", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/passage-ref/index.ts" + }, { - "moduleName": "./packages/perseus/src/widgets/sorter/index.ts" + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/video/video.tsx", - "name": "./packages/perseus/src/widgets/video/video.tsx", + "id": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx", + "name": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/video/index.ts" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/index.ts" } ] }, { - "id": "./packages/perseus/src/interactive2/movable-line-options.ts", - "name": "./packages/perseus/src/interactive2/movable-line-options.ts", + "id": "./packages/perseus/src/widgets/python-program/python-program.tsx", + "name": "./packages/perseus/src/widgets/python-program/python-program.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + "moduleName": "./packages/perseus/src/widgets/python-program/index.ts" } ] }, { - "id": "./packages/perseus/src/interactive2/movable-polygon-options.ts", - "name": "./packages/perseus/src/interactive2/movable-polygon-options.ts", + "id": "./packages/perseus/src/widgets/sorter/sorter.tsx", + "name": "./packages/perseus/src/widgets/sorter/sorter.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + "moduleName": "./packages/perseus/src/widgets/sorter/index.ts" } ] }, { - "id": "./packages/perseus/src/interactive2/movable-point-options.ts", - "name": "./packages/perseus/src/interactive2/movable-point-options.ts", + "id": "./packages/perseus/src/widgets/video/video.tsx", + "name": "./packages/perseus/src/widgets/video/video.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus/src/widgets/video/index.ts" } ] }, @@ -8545,27 +8518,27 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/segment.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" }, @@ -8578,26 +8551,53 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-state-to-interactive-graph.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/interactive2/movable-line-options.ts", + "name": "./packages/perseus/src/interactive2/movable-line-options.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + } + ] + }, + { + "id": "./packages/perseus/src/interactive2/movable-polygon-options.ts", + "name": "./packages/perseus/src/interactive2/movable-polygon-options.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "id": "./packages/perseus/src/interactive2/movable-point-options.ts", + "name": "./packages/perseus/src/interactive2/movable-point-options.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-state-to-interactive-graph.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" } ] }, @@ -8677,269 +8677,269 @@ ] }, { - "id": "./packages/perseus/src/components/graphie-movables.ts", - "name": "./packages/perseus/src/components/graphie-movables.ts", + "id": "./packages/perseus/src/definition-context.tsx", + "name": "./packages/perseus/src/definition-context.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + }, + { + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/components/visibility-observer/create-visibility-observer.ts", - "name": "./packages/perseus/src/components/visibility-observer/create-visibility-observer.ts", + "id": "./packages/perseus/src/widgets/__shared__/noop-validator.ts", + "name": "./packages/perseus/src/widgets/__shared__/noop-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/measurer/measurer.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" } ] }, { - "id": "./packages/perseus/src/components/visibility-observer/get-scroll-parent.ts", - "name": "./packages/perseus/src/components/visibility-observer/get-scroll-parent.ts", + "id": "./packages/perseus/src/widgets/iframe/iframe-validator.ts", + "name": "./packages/perseus/src/widgets/iframe/iframe-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" } ] }, { - "id": "./packages/perseus/src/definition-context.tsx", - "name": "./packages/perseus/src/definition-context.tsx", + "id": "./packages/perseus/src/widgets/molecule/molecule-drawing.ts", + "name": "./packages/perseus/src/widgets/molecule/molecule-drawing.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" } ] }, { - "id": "./packages/perseus/src/error-boundary.tsx", - "name": "./packages/perseus/src/error-boundary.tsx", + "id": "./packages/perseus/src/widgets/molecule/molecule-layout.ts", + "name": "./packages/perseus/src/widgets/molecule/molecule-layout.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" - }, - { - "moduleName": "./packages/perseus/src/widget-container.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" } ] }, { - "id": "./packages/perseus/src/interaction-tracker.ts", - "name": "./packages/perseus/src/interaction-tracker.ts", + "id": "./packages/perseus/src/widgets/molecule/smiles-parser.ts", + "name": "./packages/perseus/src/widgets/molecule/smiles-parser.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" } ] }, { - "id": "./packages/perseus/src/question-paragraph.tsx", - "name": "./packages/perseus/src/question-paragraph.tsx", + "id": "./packages/perseus/src/widgets/passage/utils.ts", + "name": "./packages/perseus/src/widgets/passage/utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" } ] }, { - "id": "./packages/perseus/src/renderer-util.ts", - "name": "./packages/perseus/src/renderer-util.ts", + "id": "./packages/perseus/src/widgets/sorter/sorter-validator.ts", + "name": "./packages/perseus/src/widgets/sorter/sorter-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" } ] }, { - "id": "./packages/perseus/src/translation-linter.ts", - "name": "./packages/perseus/src/translation-linter.ts", + "id": "./packages/perseus/src/util/a11y.ts", + "name": "./packages/perseus/src/util/a11y.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + }, + { + "moduleName": "./packages/perseus/src/components/math-input.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" } ] }, { - "id": "./packages/perseus/src/widget-container.tsx", - "name": "./packages/perseus/src/widget-container.tsx", + "id": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", + "name": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/table/table-validator.ts", - "name": "./packages/perseus/src/widgets/table/table-validator.ts", + "id": "./packages/perseus/src/components/graphie-movables.ts", + "name": "./packages/perseus/src/components/graphie-movables.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus/src/components/graphie.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/plotter/plotter-validator.ts", - "name": "./packages/perseus/src/widgets/plotter/plotter-validator.ts", + "id": "./packages/perseus/src/components/visibility-observer/create-visibility-observer.ts", + "name": "./packages/perseus/src/components/visibility-observer/create-visibility-observer.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/__shared__/noop-validator.ts", - "name": "./packages/perseus/src/widgets/__shared__/noop-validator.ts", + "id": "./packages/perseus/src/components/visibility-observer/get-scroll-parent.ts", + "name": "./packages/perseus/src/components/visibility-observer/get-scroll-parent.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/measurer/measurer.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/dropdown/dropdown-validator.ts", - "name": "./packages/perseus/src/widgets/dropdown/dropdown-validator.ts", + "id": "./packages/perseus/src/error-boundary.tsx", + "name": "./packages/perseus/src/error-boundary.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" + }, + { + "moduleName": "./packages/perseus/src/widget-container.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/iframe/iframe-validator.ts", - "name": "./packages/perseus/src/widgets/iframe/iframe-validator.ts", + "id": "./packages/perseus/src/interaction-tracker.ts", + "name": "./packages/perseus/src/interaction-tracker.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/number-line/number-line-validator.ts", - "name": "./packages/perseus/src/widgets/number-line/number-line-validator.ts", + "id": "./packages/perseus/src/question-paragraph.tsx", + "name": "./packages/perseus/src/question-paragraph.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/orderer/orderer-validator.ts", - "name": "./packages/perseus/src/widgets/orderer/orderer-validator.ts", + "id": "./packages/perseus/src/renderer-util.ts", + "name": "./packages/perseus/src/renderer-util.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/passage/utils.ts", - "name": "./packages/perseus/src/widgets/passage/utils.ts", + "id": "./packages/perseus/src/translation-linter.ts", + "name": "./packages/perseus/src/translation-linter.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/molecule/molecule-drawing.ts", - "name": "./packages/perseus/src/widgets/molecule/molecule-drawing.ts", + "id": "./packages/perseus/src/widget-container.tsx", + "name": "./packages/perseus/src/widget-container.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/molecule/molecule-layout.ts", - "name": "./packages/perseus/src/widgets/molecule/molecule-layout.ts", + "id": "./packages/perseus/src/widgets/table/table-validator.ts", + "name": "./packages/perseus/src/widgets/table/table-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/molecule/smiles-parser.ts", - "name": "./packages/perseus/src/widgets/molecule/smiles-parser.ts", + "id": "./packages/perseus/src/widgets/plotter/plotter-validator.ts", + "name": "./packages/perseus/src/widgets/plotter/plotter-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/sorter/sorter-validator.ts", - "name": "./packages/perseus/src/widgets/sorter/sorter-validator.ts", + "id": "./packages/perseus/src/widgets/dropdown/dropdown-validator.ts", + "name": "./packages/perseus/src/widgets/dropdown/dropdown-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" } ] }, { - "id": "./packages/perseus/src/util/a11y.ts", - "name": "./packages/perseus/src/util/a11y.ts", + "id": "./packages/perseus/src/widgets/number-line/number-line-validator.ts", + "name": "./packages/perseus/src/widgets/number-line/number-line-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" - }, - { - "moduleName": "./packages/perseus/src/components/math-input.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" } ] }, { - "id": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", - "name": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", + "id": "./packages/perseus/src/widgets/orderer/orderer-validator.ts", + "name": "./packages/perseus/src/widgets/orderer/orderer-validator.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" } ] }, @@ -9148,15 +9148,15 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" }, @@ -9170,10 +9170,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx" @@ -9216,51 +9216,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-ellipse.tsx", "name": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-ellipse.tsx", @@ -9316,11 +9271,14 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" @@ -9329,34 +9287,31 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx" } ] }, @@ -9368,13 +9323,13 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/segment.tsx" @@ -9393,6 +9348,30 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + } + ] + }, { "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx", "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx", @@ -9456,6 +9435,27 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx" + } + ] + }, { "id": "./packages/perseus/src/util/svg.ts", "name": "./packages/perseus/src/util/svg.ts", @@ -9490,26 +9490,26 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image/marker.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image/marker.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image/marker.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image/marker.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" } ] }, @@ -9570,15 +9570,6 @@ } ] }, - { - "id": "./packages/math-input/src/components/keypad/navigation-button.tsx", - "name": "./packages/math-input/src/components/keypad/navigation-button.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/navigation-pad.tsx" - } - ] - }, { "id": "./packages/math-input/src/components/tabbar/icons.tsx", "name": "./packages/math-input/src/components/tabbar/icons.tsx", @@ -9589,11 +9580,11 @@ ] }, { - "id": "./packages/perseus-editor/src/components/angle-input.tsx", - "name": "./packages/perseus-editor/src/components/angle-input.tsx", + "id": "./packages/math-input/src/components/keypad/navigation-button.tsx", + "name": "./packages/math-input/src/components/keypad/navigation-button.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/math-input/src/components/keypad/navigation-pad.tsx" } ] }, @@ -9601,29 +9592,29 @@ "id": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", "name": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" @@ -9632,10 +9623,10 @@ "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" } ] }, @@ -9644,25 +9635,25 @@ "name": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" @@ -9670,24 +9661,27 @@ ] }, { - "id": "./packages/perseus-editor/src/components/util.ts", - "name": "./packages/perseus-editor/src/components/util.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/angle-input.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } @@ -9698,121 +9692,94 @@ "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" } ] }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-select.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-select.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", "reasons": [ { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-select.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-select.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" } ] }, @@ -9826,56 +9793,47 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", + "id": "./packages/perseus-editor/src/components/angle-input.tsx", + "name": "./packages/perseus-editor/src/components/angle-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx", - "name": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx", + "id": "./packages/perseus-editor/src/components/util.ts", + "name": "./packages/perseus-editor/src/components/util.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" + "moduleName": "./packages/perseus-editor/src/components/angle-input.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" + "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" } ] }, { - "id": "./vendor/hubble/hubble.js", - "name": "./vendor/hubble/hubble.js", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" - }, - { - "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/sortable.tsx", - "name": "./packages/perseus-editor/src/components/sortable.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" } ] }, @@ -9945,6 +9903,48 @@ } ] }, + { + "id": "./vendor/hubble/hubble.js", + "name": "./vendor/hubble/hubble.js", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" + }, + { + "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/sortable.tsx", + "name": "./packages/perseus-editor/src/components/sortable.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx", + "name": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" + } + ] + }, { "id": "./packages/perseus-editor/src/components/checkbox.tsx", "name": "./packages/perseus-editor/src/components/checkbox.tsx", @@ -9961,18 +9961,18 @@ { "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" + }, { "moduleName": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx" }, @@ -9985,20 +9985,20 @@ ] }, { - "id": "./packages/perseus-editor/src/components/link.ts", - "name": "./packages/perseus-editor/src/components/link.ts", + "id": "./packages/perseus-editor/src/components/dropdown-option.tsx", + "name": "./packages/perseus-editor/src/components/dropdown-option.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/dropdown-option.tsx", - "name": "./packages/perseus-editor/src/components/dropdown-option.tsx", + "id": "./packages/perseus-editor/src/components/link.ts", + "name": "./packages/perseus-editor/src/components/link.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" } ] }, @@ -10060,38 +10060,50 @@ ] }, { - "id": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", - "name": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", + "id": "./packages/math-input/src/fake-react-native-web/index.ts", + "name": "./packages/math-input/src/fake-react-native-web/index.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" } ] }, { - "id": "./packages/perseus/src/util/scroll-utils.ts", - "name": "./packages/perseus/src/util/scroll-utils.ts", + "id": "./packages/math-input/src/components/input/cursor-handle.tsx", + "name": "./packages/math-input/src/components/input/cursor-handle.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts", - "name": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts", + "id": "./packages/math-input/src/components/input/drag-listener.ts", + "name": "./packages/math-input/src/components/input/drag-listener.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/expression/expression-validator.ts", - "name": "./packages/perseus/src/widgets/expression/expression-validator.ts", + "id": "./packages/math-input/src/components/input/math-wrapper.ts", + "name": "./packages/math-input/src/components/input/math-wrapper.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/input/scroll-into-view.ts", + "name": "./packages/math-input/src/components/input/scroll-into-view.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" } ] }, @@ -10132,50 +10144,38 @@ ] }, { - "id": "./packages/math-input/src/fake-react-native-web/index.ts", - "name": "./packages/math-input/src/fake-react-native-web/index.ts", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/components/input/cursor-handle.tsx", - "name": "./packages/math-input/src/components/input/cursor-handle.tsx", + "id": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", + "name": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/drag-listener.ts", - "name": "./packages/math-input/src/components/input/drag-listener.ts", + "id": "./packages/perseus/src/util/scroll-utils.ts", + "name": "./packages/perseus/src/util/scroll-utils.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/math-wrapper.ts", - "name": "./packages/math-input/src/components/input/math-wrapper.ts", + "id": "./packages/perseus/src/widgets/expression/expression-validator.ts", + "name": "./packages/perseus/src/widgets/expression/expression-validator.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/scroll-into-view.ts", - "name": "./packages/math-input/src/components/input/scroll-into-view.ts", + "id": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts", + "name": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" } ] }, @@ -10394,10 +10394,10 @@ "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" } ] }, @@ -10410,15 +10410,6 @@ } ] }, - { - "id": "./packages/perseus/src/components/highlighting/ui/highlight-renderer.tsx", - "name": "./packages/perseus/src/components/highlighting/ui/highlight-renderer.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/highlighting/ui/highlight-set-renderer.tsx" - } - ] - }, { "id": "./packages/perseus/src/components/highlighting/ui/util.ts", "name": "./packages/perseus/src/components/highlighting/ui/util.ts", @@ -10431,6 +10422,15 @@ } ] }, + { + "id": "./packages/perseus/src/components/highlighting/ui/highlight-renderer.tsx", + "name": "./packages/perseus/src/components/highlighting/ui/highlight-renderer.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/highlighting/ui/highlight-set-renderer.tsx" + } + ] + }, { "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx", "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx", diff --git a/project.json b/project.json index c1a2b32588..7e0764c0ed 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1730501631975,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"1.22.22"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"7.6.17","storybookVersionSpecifier":"^7.6.17","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.17"},"@storybook/addon-controls":{"version":"7.6.17"},"@storybook/addon-viewport":{"version":"7.6.17"},"@storybook/react":{"version":"7.6.17"},"@storybook/react-vite":{"version":"7.6.17"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"7.6.17"}},"addons":{"@storybook/addon-links":{"version":"7.6.17"},"@storybook/addon-essentials":{"version":"7.6.17"},"@storybook/addon-a11y":{"version":"7.6.17"}}} +{"generatedAt":1730735543807,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"1.22.22"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"7.6.17","storybookVersionSpecifier":"^7.6.17","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.17"},"@storybook/addon-controls":{"version":"7.6.17"},"@storybook/addon-viewport":{"version":"7.6.17"},"@storybook/react":{"version":"7.6.17"},"@storybook/react-vite":{"version":"7.6.17"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"7.6.17"}},"addons":{"@storybook/addon-links":{"version":"7.6.17"},"@storybook/addon-essentials":{"version":"7.6.17"},"@storybook/addon-a11y":{"version":"7.6.17"}}}