@pie-element/graphing-solution-set 6.1.2-next.13 → 6.1.2-next.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { E as e, g as t, o as n, r, s as i, t as a, x as o } from "../browser-BQg8KPEc.js";
2
- import { $ as s, A as c, B as l, D as u, E as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, O as b, P as x, Q as S, R as C, V as w, W as T, X as E, Y as D, Z as O, _ as k, a as A, b as ee, c as j, d as M, et as te, f as ne, g as N, h as re, k as ie, l as P, m as F, n as ae, nt as oe, o as se, p as ce, q as le, r as ue, s as de, t as fe, tt as pe, u as me, v as he, x as ge, y as I, z as L } from "../alert-dialog-B48iT-0z.js";
2
+ import { $ as s, A as c, B as l, D as u, E as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, O as b, P as x, Q as S, R as C, V as w, W as T, X as E, Y as D, Z as O, _ as k, a as A, b as ee, c as j, d as M, et as te, f as ne, g as N, h as re, k as ie, l as P, m as F, n as ae, nt as oe, o as se, p as ce, q as le, r as ue, s as de, t as fe, tt as pe, u as me, v as he, x as ge, y as I, z as L } from "../alert-dialog-NRlYz3Y7.js";
3
3
  import * as R from "react";
4
4
  import z, { Component as _e, createElement as ve } from "react";
5
5
  import { createRoot as ye } from "react-dom/client";
@@ -1,5 +1,5 @@
1
1
  import { E as e } from "../browser-BQg8KPEc.js";
2
- import { C as t, K as n, N as r, S as i, T as a, U as o, W as s, i as c, j as l, n as u, nt as d, t as ee, tt as f, w as p, x as m } from "../alert-dialog-B48iT-0z.js";
2
+ import { C as t, K as n, N as r, S as i, T as a, U as o, W as s, i as c, j as l, n as u, nt as d, t as ee, tt as f, w as p, x as m } from "../alert-dialog-NRlYz3Y7.js";
3
3
  import h, { useRef as g } from "react";
4
4
  import { createRoot as _ } from "react-dom/client";
5
5
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
@@ -361,7 +361,7 @@ The error may be correlated with this previous error:
361
361
  ${C.current.stack}
362
362
 
363
363
  `),e}d8(()=>{C.current=void 0,b.current=void 0,v.current=E});let D=F.useMemo(()=>F.createElement(e,{...E,ref:i}),[i,e,E]);return F.useMemo(()=>m?F.createElement(o.Provider,{value:_},D):D,[o,D,_])}let h=F.memo(l);if(h.WrappedComponent=e,h.displayName=l.displayName=n,c){let t=F.forwardRef(function(e,t){return F.createElement(h,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,E8(t,e)}return E8(h,e)}}var L8=I8;function R8(e){let{children:t,context:n,serverState:r,store:i}=e,a=F.useMemo(()=>{let e=c8(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}},[i,r]),o=F.useMemo(()=>i.getState(),[i]);d8(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);let s=n||A8;return F.createElement(s.Provider,{value:a},t)}var z8=R8;function B8(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var V8=typeof Symbol==`function`&&Symbol.observable||`@@observable`,H8=()=>Math.random().toString(36).substring(7).split(``).join(`.`),U8={INIT:`@@redux/INIT${H8()}`,REPLACE:`@@redux/REPLACE${H8()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${H8()}`};function W8(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function G8(e,t,n){if(typeof e!=`function`)throw Error(B8(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(B8(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(B8(1));return n(G8)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(B8(3));return i}function d(e){if(typeof e!=`function`)throw Error(B8(4));if(c)throw Error(B8(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(B8(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!W8(e))throw Error(B8(7));if(e.type===void 0)throw Error(B8(8));if(typeof e.type!=`string`)throw Error(B8(17));if(c)throw Error(B8(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(B8(10));r=e,f({type:U8.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(B8(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[V8](){return this}}}return f({type:U8.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[V8]:m}}function K8(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:U8.INIT})===void 0)throw Error(B8(12));if(n(void 0,{type:U8.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(B8(13))})}function q8(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{K8(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(B8(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function J8(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Y8(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(B8(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=J8(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}var X8=(e=[],t)=>{switch(t.type){case`CHANGE_MARKS`:if(Array.isArray(t.marks))return t.marks;throw Error(`marks must be an array`);default:return e}},Z8={UNDO:`@@redux-undo/UNDO`,REDO:`@@redux-undo/REDO`,JUMP_TO_FUTURE:`@@redux-undo/JUMP_TO_FUTURE`,JUMP_TO_PAST:`@@redux-undo/JUMP_TO_PAST`,JUMP:`@@redux-undo/JUMP`,CLEAR_HISTORY:`@@redux-undo/CLEAR_HISTORY`},Q8={undo(){return{type:Z8.UNDO}},redo(){return{type:Z8.REDO}},jumpToFuture(e){return{type:Z8.JUMP_TO_FUTURE,index:e}},jumpToPast(e){return{type:Z8.JUMP_TO_PAST,index:e}},jump(e){return{type:Z8.JUMP,index:e}},clearHistory(){return{type:Z8.CLEAR_HISTORY}}};function $8(e,t=[]){return Array.isArray(e)?e:typeof e==`string`?[e]:t}function e5(e){return typeof e.present<`u`&&typeof e.future<`u`&&typeof e.past<`u`&&Array.isArray(e.future)&&Array.isArray(e.past)}function t5(e,t,n,r=null){return{past:e,present:t,future:n,group:r,_latestUnfiltered:t,index:e.length,limit:e.length+n.length+1}}var n5,r5,i5={prevState:`#9E9E9E`,action:`#03A9F4`,nextState:`#4CAF50`};function a5(){r5={header:[],prev:[],action:[],next:[],msgs:[]}}function o5(){let{header:e,prev:t,next:n,action:r,msgs:i}=r5;console.group?(console.groupCollapsed(...e),console.log(...t),console.log(...r),console.log(...n),console.log(...i),console.groupEnd()):(console.log(...e),console.log(...t),console.log(...r),console.log(...n),console.log(...i))}function s5(e,t,n){return[`%c${e}`,`color: ${t}; font-weight: bold`,n]}function c5(e,t){a5(),n5&&(console.group?(r5.header=[`%credux-undo`,`font-style: italic`,`action`,e.type],r5.action=s5(`action`,i5.action,e),r5.prev=s5(`prev history`,i5.prevState,t)):(r5.header=[`redux-undo action`,e.type],r5.action=[`action`,e],r5.prev=[`prev history`,t]))}function l5(e){n5&&(console.group?r5.next=s5(`next history`,i5.nextState,e):r5.next=[`next history`,e],o5())}function u5(...e){n5&&(r5.msgs=r5.msgs.concat([...e,`
364
- `]))}function d5(e){n5=e}function f5(e,t){let n=t5([],e,[]);return t&&(n._latestUnfiltered=null),n}function p5(e,t,n,r){let i=e.past.length+1;u5(`inserting`,t),u5(`new free: `,n-i);let{past:a,_latestUnfiltered:o}=e,s=n&&n<=i,c=a.slice(+!!s);return t5(o==null?c:[...c,o],t,[],r)}function m5(e,t){if(t<0||t>=e.future.length)return e;let{past:n,future:r,_latestUnfiltered:i}=e,a=[...n,i,...r.slice(0,t)],o=r[t];return t5(a,o,r.slice(t+1))}function h5(e,t){if(t<0||t>=e.past.length)return e;let{past:n,future:r,_latestUnfiltered:i}=e,a=n.slice(0,t),o=[...n.slice(t+1),i,...r],s=n[t];return t5(a,s,o)}function g5(e,t){return t>0?m5(e,t-1):t<0?h5(e,e.past.length+t):e}function _5(e,t){return t.indexOf(e)>-1?e:!e}function v5(e,t={}){d5(t.debug);let n={limit:void 0,filter:()=>!0,groupBy:()=>null,undoType:Z8.UNDO,redoType:Z8.REDO,jumpToPastType:Z8.JUMP_TO_PAST,jumpToFutureType:Z8.JUMP_TO_FUTURE,jumpType:Z8.JUMP,neverSkipReducer:!1,ignoreInitialState:!1,syncFilter:!1,...t,initTypes:$8(t.initTypes,[`@@redux-undo/INIT`]),clearHistoryType:$8(t.clearHistoryType,[Z8.CLEAR_HISTORY])},r=n.neverSkipReducer?(t,n,...r)=>({...t,present:e(t.present,n,...r)}):e=>e,i;return(t=i,a={},...o)=>{c5(a,t);let s=t;if(!i){if(u5(`history is uninitialized`),t===void 0)return s=f5(e(t,{type:`@@redux-undo/CREATE_HISTORY`},...o),n.ignoreInitialState),u5(`do not set initialState on probe actions`),l5(s),s;e5(t)?(s=i=n.ignoreInitialState?t:t5(t.past,t.present,t.future),u5(`initialHistory initialized: initialState is a history`,i)):(s=i=f5(t,n.ignoreInitialState),u5(`initialHistory initialized: initialState is not a history`,i))}let c;switch(a.type){case void 0:return s;case n.undoType:return c=g5(s,-1),u5(`perform undo`),l5(c),r(c,a,...o);case n.redoType:return c=g5(s,1),u5(`perform redo`),l5(c),r(c,a,...o);case n.jumpToPastType:return c=h5(s,a.index),u5(`perform jumpToPast to ${a.index}`),l5(c),r(c,a,...o);case n.jumpToFutureType:return c=m5(s,a.index),u5(`perform jumpToFuture to ${a.index}`),l5(c),r(c,a,...o);case n.jumpType:return c=g5(s,a.index),u5(`perform jump to ${a.index}`),l5(c),r(c,a,...o);case _5(a.type,n.clearHistoryType):return c=f5(s.present,n.ignoreInitialState),u5(`perform clearHistory`),l5(c),r(c,a,...o);default:if(c=e(s.present,a,...o),n.initTypes.some(e=>e===a.type))return u5(`reset history due to init action`),l5(i),i;if(s._latestUnfiltered===c)return s;if(typeof n.filter==`function`&&!n.filter(a,c,s)){let e=t5(s.past,c,s.future,s.group);return n.syncFilter||(e._latestUnfiltered=s._latestUnfiltered),u5(`filter ignored action, not storing it in past`),l5(e),e}let t=n.groupBy(a,c,s);if(t!=null&&t===s.group){let e=t5(s.past,c,s.future,s.group);return u5(`groupBy grouped the action with the previous action`),l5(e),e}return s=p5(s,c,n.limit,t),u5(`inserted new state into history`),l5(s),s}}}var y5=()=>q8({marks:v5(X8,{debug:!1})}),b5=e=>({type:`CHANGE_MARKS`,marks:e}),x5=F.createContext({});function S5(e){return _i(`MuiAccordion`,e)}var C5=vi(`MuiAccordion`,[`root`,`heading`,`rounded`,`expanded`,`disabled`,`gutters`,`region`]),w5=e=>{let{classes:t,square:n,expanded:r,disabled:i,disableGutters:a}=e;return za({root:[`root`,!n&&`rounded`,r&&`expanded`,i&&`disabled`,!a&&`gutters`],heading:[`heading`],region:[`region`]},S5,t)},T5=z(sf,{name:`MuiAccordion`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${C5.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(jd(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{position:`relative`,transition:e.transitions.create([`margin`],t),overflowAnchor:`none`,"&::before":{position:`absolute`,left:0,top:-1,right:0,height:1,content:`""`,opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create([`opacity`,`background-color`],t)},"&:first-of-type":{"&::before":{display:`none`}},[`&.${C5.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:`none`}}},[`&.${C5.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),jd(({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${C5.expanded}`]:{margin:`16px 0`}}}]}))),E5=z(`h3`,{name:`MuiAccordion`,slot:`Heading`})({all:`unset`}),D5=z(`div`,{name:`MuiAccordion`,slot:`Region`})({}),O5=F.forwardRef(function(e,t){let n=ou({props:e,name:`MuiAccordion`}),{children:r,className:i,defaultExpanded:a=!1,disabled:o=!1,disableGutters:s=!1,expanded:c,onChange:l,slots:u={},slotProps:d={},TransitionComponent:f,TransitionProps:p,...m}=n,[h,g]=gf({controlled:c,default:a,name:`Accordion`,state:`expanded`}),_=F.useCallback(e=>{g(!h),l&&l(e,!h)},[h,l,g]),[v,...y]=F.Children.toArray(r),b=F.useMemo(()=>({expanded:h,disabled:o,disableGutters:s,toggle:_}),[h,o,s,_]),x={...n,disabled:o,disableGutters:s,expanded:h},S=w5(x),C={slots:{transition:f,...u},slotProps:{transition:p,...d}},[w,T]=Ld(`root`,{elementType:T5,externalForwardedProps:{...C,...m},className:L(S.root,i),shouldForwardComponentProp:!0,ownerState:x,ref:t}),[E,D]=Ld(`heading`,{elementType:E5,externalForwardedProps:C,className:S.heading,ownerState:x}),[O,k]=Ld(`transition`,{elementType:nm,externalForwardedProps:C,ownerState:x}),[A,j]=Ld(`region`,{elementType:D5,externalForwardedProps:C,ownerState:x,className:S.region,additionalProps:{"aria-labelledby":v.props.id,id:v.props[`aria-controls`],role:`region`}});return(0,I.jsxs)(w,{...T,children:[(0,I.jsx)(E,{...D,children:(0,I.jsx)(x5.Provider,{value:b,children:v})}),(0,I.jsx)(O,{in:h,timeout:`auto`,...k,children:(0,I.jsx)(A,{...j,children:y})})]})});function k5(e){return _i(`MuiAccordionDetails`,e)}vi(`MuiAccordionDetails`,[`root`]);var A5=e=>{let{classes:t}=e;return za({root:[`root`]},k5,t)},j5=z(`div`,{name:`MuiAccordionDetails`,slot:`Root`})(jd(({theme:e})=>({padding:e.spacing(1,2,2)}))),M5=F.forwardRef(function(e,t){let n=ou({props:e,name:`MuiAccordionDetails`}),{className:r,...i}=n,a=n,o=A5(a);return(0,I.jsx)(j5,{className:L(o.root,r),ref:t,ownerState:a,...i})});function N5(e){return _i(`MuiAccordionSummary`,e)}var P5=vi(`MuiAccordionSummary`,[`root`,`expanded`,`focusVisible`,`disabled`,`gutters`,`contentGutters`,`content`,`expandIconWrapper`]),F5=e=>{let{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return za({root:[`root`,n&&`expanded`,r&&`disabled`,!i&&`gutters`],focusVisible:[`focusVisible`],content:[`content`,n&&`expanded`,!i&&`contentGutters`],expandIconWrapper:[`expandIconWrapper`,n&&`expanded`]},N5,t)},I5=z(mm,{name:`MuiAccordionSummary`,slot:`Root`})(jd(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{display:`flex`,width:`100%`,minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create([`min-height`,`background-color`],t),[`&.${P5.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${P5.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${P5.disabled})`]:{cursor:`pointer`},variants:[{props:e=>!e.disableGutters,style:{[`&.${P5.expanded}`]:{minHeight:64}}}]}})),L5=z(`span`,{name:`MuiAccordionSummary`,slot:`Content`})(jd(({theme:e})=>({display:`flex`,textAlign:`start`,flexGrow:1,margin:`12px 0`,variants:[{props:e=>!e.disableGutters,style:{transition:e.transitions.create([`margin`],{duration:e.transitions.duration.shortest}),[`&.${P5.expanded}`]:{margin:`20px 0`}}}]}))),R5=z(`span`,{name:`MuiAccordionSummary`,slot:`ExpandIconWrapper`})(jd(({theme:e})=>({display:`flex`,color:(e.vars||e).palette.action.active,transform:`rotate(0deg)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shortest}),[`&.${P5.expanded}`]:{transform:`rotate(180deg)`}}))),z5=F.forwardRef(function(e,t){let n=ou({props:e,name:`MuiAccordionSummary`}),{children:r,className:i,expandIcon:a,focusVisibleClassName:o,onClick:s,slots:c,slotProps:l,...u}=n,{disabled:d=!1,disableGutters:f,expanded:p,toggle:m}=F.useContext(x5),h=e=>{m&&m(e),s&&s(e)},g={...n,expanded:p,disabled:d,disableGutters:f},_=F5(g),v={slots:c,slotProps:l},[y,b]=Ld(`root`,{ref:t,shouldForwardComponentProp:!0,className:L(_.root,i),elementType:I5,externalForwardedProps:{...v,...u},ownerState:g,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:d,"aria-expanded":p,focusVisibleClassName:L(_.focusVisible,o)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),h(t)}})}),[x,S]=Ld(`content`,{className:_.content,elementType:L5,externalForwardedProps:v,ownerState:g}),[C,w]=Ld(`expandIconWrapper`,{className:_.expandIconWrapper,elementType:R5,externalForwardedProps:v,ownerState:g});return(0,I.jsxs)(y,{...b,children:[(0,I.jsx)(x,{...S,children:r}),a&&(0,I.jsx)(C,{...w,children:a})]})});function B5(e){return _i(`PrivateSwitchBase`,e)}vi(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var V5=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e;return za({root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${V(i)}`],input:[`input`]},B5,t)},H5=z(mm,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),U5=z(`input`,{name:`MuiSwitchBase`,shouldForwardProp:es})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),W5=F.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:l,id:u,inputProps:d,inputRef:f,name:p,onBlur:m,onChange:h,onFocus:g,readOnly:_,required:v=!1,tabIndex:y,type:b,value:x,slots:S={},slotProps:C={},...w}=e,[T,E]=gf({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),D=ih(),O=e=>{g&&g(e),D&&D.onFocus&&D.onFocus(e)},k=e=>{m&&m(e),D&&D.onBlur&&D.onBlur(e)},A=e=>{if(e.nativeEvent.defaultPrevented||_)return;let t=e.target.checked;E(t),h&&h(e,t)},j=o;D&&j===void 0&&(j=D.disabled);let M=b===`checkbox`||b===`radio`,ee={...e,checked:T,disabled:j,disableFocusRipple:s,edge:c},N=V5(ee),te={slots:S,slotProps:{input:d,...C}},[ne,re]=Ld(`root`,{ref:t,elementType:H5,className:N.root,shouldForwardComponentProp:!0,externalForwardedProps:{...te,component:`span`,...w},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),O(t)},onBlur:t=>{e.onBlur?.(t),k(t)}}),ownerState:ee,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[ie,ae]=Ld(`input`,{ref:f,elementType:U5,className:N.input,externalForwardedProps:te,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),A(t)}}),ownerState:ee,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:j,id:M?u:void 0,name:p,readOnly:_,required:v,tabIndex:y,type:b,...b===`checkbox`&&x===void 0?{}:{value:x}}});return(0,I.jsxs)(ne,{...re,children:[(0,I.jsx)(ie,{...ae}),T?i:l]})}),G5=df((0,I.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`RadioButtonUnchecked`),K5=df((0,I.jsx)(`path`,{d:`M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z`}),`RadioButtonChecked`),q5=z(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:es})({position:`relative`,display:`flex`}),J5=z(G5,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),Y5=z(K5,{name:`MuiRadioButtonIcon`})(jd(({theme:e})=>({left:0,position:`absolute`,transform:`scale(0)`,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:`scale(1)`,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function X5(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,I.jsxs)(q5,{className:n.root,ownerState:i,children:[(0,I.jsx)(J5,{fontSize:r,className:n.background,ownerState:i}),(0,I.jsx)(Y5,{fontSize:r,className:n.dot,ownerState:i})]})}var Z5=F.createContext(void 0);function Q5(){return F.useContext(Z5)}function $5(e){return _i(`MuiRadio`,e)}var e7=vi(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]),t7=e=>{let{classes:t,color:n,size:r}=e,i={root:[`root`,`color${V(n)}`,r!==`medium`&&`size${V(r)}`]};return{...t,...za(i,$5,t)}},n7=z(W5,{shouldForwardProp:e=>es(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${V(n.size)}`],t[`color${V(n.color)}`]]}})(jd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${e7.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:`default`,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(vm()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(vm()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${e7.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]})));function r7(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var i7=(0,I.jsx)(X5,{checked:!0}),a7=(0,I.jsx)(X5,{}),o7=F.forwardRef(function(e,t){let n=ou({props:e,name:`MuiRadio`}),{checked:r,checkedIcon:i=i7,color:a=`primary`,icon:o=a7,name:s,onChange:c,size:l=`medium`,className:u,disabled:d,disableRipple:f=!1,slots:p={},slotProps:m={},inputProps:h,...g}=n,_=ih(),v=d;_&&v===void 0&&(v=_.disabled),v??=!1;let y={...n,disabled:v,disableRipple:f,color:a,size:l},b=t7(y),x=Q5(),S=r,C=lf(c,x&&x.onChange),w=s;x&&(S===void 0&&(S=r7(x.value,n.value)),w===void 0&&(w=x.name));let T=m.input??h,[E,D]=Ld(`root`,{ref:t,elementType:n7,className:L(b.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:m,...g},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),C(t,...n)}}),ownerState:y,additionalProps:{type:`radio`,icon:F.cloneElement(o,{fontSize:o.props.fontSize??l}),checkedIcon:F.cloneElement(i,{fontSize:i.props.fontSize??l}),disabled:v,name:w,checked:S,slots:p,slotProps:{input:typeof T==`function`?T(y):T}}});return(0,I.jsx)(E,{...D,classes:b})}),s7=class extends F.Component{static propTypes={gssLineData:P.object,disabled:P.bool,onChange:P.func};onChangeRadioValue=e=>{let{gssLineData:t,onChange:n}=this.props,r=t.selectedTool;t.selectedTool=e.target.value,n(t,r)};lineTypeChange=(e,t)=>{let{gssLineData:n,onChange:r}=this.props,i=n.selectedTool;n[`line${e}`].lineType=t,r(n,i)};render(){let{gssLineData:e,disabled:t}=this.props;return(0,I.jsx)(c7,{children:(0,I.jsxs)(`div`,{className:`selectLineRadioGroup`,children:[(0,I.jsxs)(`div`,{className:`radioFieldOuter`,children:[(0,I.jsxs)(`div`,{className:`radioFieldInner`,children:[(0,I.jsx)(o7,{name:`select-line-radio-buttons`,onChange:this.onChangeRadioValue,value:`lineA`,disabled:!!t,checked:e.selectedTool===`lineA`,className:`lineTypeRadio`}),(0,I.jsx)(AG,{className:`lineNameFont`,children:`Line A`})]}),(0,I.jsxs)(`div`,{className:`radioFieldButtons`,children:[(0,I.jsxs)(Hm,{size:`small`,variant:`contained`,color:e.lineA.lineType===`Solid`?`primary`:`inherit`,disabled:!!t,onClick:()=>this.lineTypeChange(`A`,`Solid`),className:e.lineA.lineType===`Solid`?t?`lineTypeButtonLeftSelectedDisabled`:`lineTypeButtonLeftSelected`:t?`lineTypeButtonLeftUnSelectedDisabled`:`lineTypeButtonLeftUnSelected`,children:[e.lineA.lineType===`Solid`&&`✔`,` Solid`]}),(0,I.jsxs)(Hm,{size:`small`,variant:`contained`,color:e.lineA.lineType===`Dashed`?`primary`:`inherit`,disabled:!!t,onClick:()=>this.lineTypeChange(`A`,`Dashed`),className:e.lineA.lineType===`Dashed`?t?`lineTypeButtonRightSelectedDisabled`:`lineTypeButtonRightSelected`:t?`lineTypeButtonRightUnSelectedDisabled`:`lineTypeButtonRightUnSelected`,children:[e.lineA.lineType===`Dashed`&&`✔`,` Dashed`]})]})]}),e.numberOfLines===2&&(0,I.jsxs)(`div`,{className:`radioFieldOuter`,children:[(0,I.jsxs)(`div`,{className:`radioFieldInner`,children:[(0,I.jsx)(o7,{name:`select-line-radio-buttons`,onChange:this.onChangeRadioValue,value:`lineB`,disabled:!!t,checked:e.selectedTool===`lineB`,className:`lineTypeRadio`}),(0,I.jsx)(AG,{className:`lineNameFont`,children:`Line B`})]}),(0,I.jsxs)(`div`,{className:`radioFieldButtons`,children:[(0,I.jsxs)(Hm,{size:`small`,variant:`contained`,color:e.lineB.lineType===`Solid`?`primary`:`inherit`,disabled:!!t,onClick:()=>this.lineTypeChange(`B`,`Solid`),className:e.lineB.lineType===`Solid`?t?`lineTypeButtonLeftSelectedDisabled`:`lineTypeButtonLeftSelected`:t?`lineTypeButtonLeftUnSelectedDisabled`:`lineTypeButtonLeftUnSelected`,children:[e.lineB.lineType===`Solid`&&`✔`,` Solid`]}),(0,I.jsxs)(Hm,{size:`small`,variant:`contained`,color:e.lineB.lineType===`Dashed`?`primary`:`inherit`,disabled:!!t,onClick:()=>this.lineTypeChange(`B`,`Dashed`),className:e.lineB.lineType===`Dashed`?t?`lineTypeButtonRightSelectedDisabled`:`lineTypeButtonRightSelected`:t?`lineTypeButtonRightUnSelectedDisabled`:`lineTypeButtonRightUnSelected`,children:[e.lineB.lineType===`Dashed`&&`✔`,` Dashed`]})]})]}),(0,I.jsx)(`div`,{className:`radioFieldOuter`,children:(0,I.jsxs)(`div`,{className:`radioFieldInner`,children:[(0,I.jsx)(o7,{name:`select-line-radio-buttons`,onChange:this.onChangeRadioValue,value:`solutionSet`,disabled:!!t,checked:e.selectedTool===`solutionSet`,className:`lineTypeRadio`}),(0,I.jsx)(AG,{className:`lineNameFont`,children:`Solution Set`})]})})]})})}},c7=z(`div`)(()=>({"& .selectLineRadioGroup":{display:`flex`,flexWrap:`wrap`,flexDirection:`row`},"& .radioFieldOuter":{display:`flex`,flexWrap:`wrap`,flexDirection:`column`},"& .radioFieldInner":{display:`flex`,flexWrap:`wrap`,flexDirection:`row`,alignItems:`center`},"& .radioFieldButtons":{display:`flex`,flexWrap:`wrap`,flexDirection:`row`,padding:`0 .9rem`},"& .lineNameFont":{fontWeight:`bold`,padding:`0 5px 0 0`},"& .lineTypeRadio":{color:`#000000 !important`},"& .lineTypeButtonLeftSelected":{textTransform:`none`,border:`1px solid #3E4EB1`,backgroundColor:`#3E4EB1 !important`,color:`#FFFFFF !important`,borderRadius:`4px 0 0 4px`},"& .lineTypeButtonLeftUnSelected":{textTransform:`none`,border:`1px solid #3E4EB1`,backgroundColor:`#FFFFFF !important`,color:`#3E4EB1 !important`,borderRadius:`4px 0 0 4px`},"& .lineTypeButtonRightSelected":{textTransform:`none`,border:`1px solid #3E4EB1`,backgroundColor:`#3E4EB1 !important`,color:`#FFFFFF !important`,borderRadius:`0 4px 4px 0`},"& .lineTypeButtonRightUnSelected":{textTransform:`none`,border:`1px solid #3E4EB1`,backgroundColor:`#FFFFFF !important`,color:`#3E4EB1 !important`,borderRadius:`0 4px 4px 0`},"& .lineTypeButtonLeftSelectedDisabled, & .lineTypeButtonRightSelectedDisabled":{backgroundColor:`#3E4EB1 !important`,color:`#FFFFFF !important`,cursor:`default`,pointerEvents:`none`},"& .lineTypeButtonLeftUnSelectedDisabled, & .lineTypeButtonRightUnSelectedDisabled":{backgroundColor:`#FFFFFF !important`,color:`#3E4EB1 !important`,cursor:`default`,pointerEvents:`none`}})),l7={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,redo:`Redo`,reset:`Reset`},mathInline:{primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`,printKey:`(key)`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`}},u7={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`}},graphing:{point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`,printKey:`(clave)`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`}},d7=e=>typeof e==`string`,f7=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},p7=e=>e==null?``:``+e,m7=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},h7=/###/g,g7=e=>e&&e.indexOf(`###`)>-1?e.replace(h7,`.`):e,_7=e=>!e||d7(e),v7=(e,t,n)=>{let r=d7(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(_7(e))return{};let t=g7(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return _7(e)?{}:{obj:e,k:g7(r[i])}},y7=(e,t,n)=>{let{obj:r,k:i}=v7(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=v7(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=v7(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},b7=(e,t,n,r)=>{let{obj:i,k:a}=v7(e,t,Object);i[a]=i[a]||[],i[a].push(n)},x7=(e,t)=>{let{obj:n,k:r}=v7(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},S7=(e,t,n)=>{let r=x7(e,n);return r===void 0?x7(t,n):r},C7=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?d7(e[r])||e[r]instanceof String||d7(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):C7(e[r],t[r],n):e[r]=t[r]);return e},w7=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),T7={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},E7=e=>d7(e)?e.replace(/[&<>"'\/]/g,e=>T7[e]):e,D7=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},O7=[` `,`,`,`?`,`!`,`;`],k7=new D7(20),A7=(e,t,n)=>{t||=``,n||=``;let r=O7.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=k7.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},j7=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},M7=e=>e?.replace(/_/g,`-`),N7={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},P7=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||N7,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(d7(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},F7=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},I7=class extends F7{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):d7(n)&&i?o.push(...n.split(i)):o.push(n)));let s=x7(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!d7(n)?s:j7(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),y7(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(d7(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=x7(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?C7(s,n,i):s={...s,...n},y7(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},L7={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},R7=Symbol(`i18next/PATH_KEY`);function z7(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===R7?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function B7(e,t){let{[R7]:n}=e(z7()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var V7={},H7=e=>!d7(e)&&typeof e!=`boolean`&&typeof e!=`number`,U7=class e extends F7{constructor(e,t={}){super(),m7([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=P7.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=H7(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!A7(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:d7(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:d7(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=B7(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?B7(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!d7(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=H7(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(d7(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:H7(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&d7(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=d7(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!d7(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=d7(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=L7.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return d7(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?B7(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!d7(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(d7(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!V7[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(V7[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!d7(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},W7=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=P7.create(`languageUtils`)}getScriptPartFromCode(e){if(e=M7(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=M7(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(d7(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),d7(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return d7(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):d7(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},G7={zero:0,one:1,two:2,few:3,many:4,other:5},K7={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},q7=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=P7.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=M7(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),K7;if(!e.match(/-|_/))return K7;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>G7[e]-G7[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},J7=(e,t,n,r=`.`,i=!0)=>{let a=S7(e,t,n);return!a&&i&&d7(n)&&(a=j7(e,n,r),a===void 0&&(a=j7(t,n,r))),a},Y7=e=>e.replace(/\$/g,`$$$$`),X7=class{constructor(e={}){this.logger=P7.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?E7:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?w7(i):a||`{{`,this.suffix=o?w7(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?w7(d):f||w7(`$t(`),this.nestingSuffix=p?w7(p):m||w7(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=J7(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(J7(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Y7(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Y7(this.escape(e)):Y7(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=d7(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!d7(a)&&!this.useRawValueToEscape&&(a=p7(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${w7(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!d7(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!d7(i))return i;d7(i)||(i=p7(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Z7=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Q7=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(M7(r),i),t[o]=s),s(n)}},$7=e=>(t,n,r)=>e(M7(n),r)(t),e9=class{constructor(e={}){this.logger=P7.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Q7:$7;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Q7(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Z7(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},t9=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},n9=class extends F7{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=P7.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{b7(n.loaded,[i],a),t9(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();d7(e)&&(e=this.languageUtils.toResolveHierarchy(e)),d7(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},r9=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),d7(e[1])&&(t.defaultValue=e[1]),d7(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),i9=e=>(d7(e.ns)&&(e.ns=[e.ns]),d7(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),d7(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),a9=()=>{},o9=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},s9=`__i18next_supportNoticeShown`,Jee=()=>!!(typeof globalThis<`u`&&globalThis[s9]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),Yee=()=>{typeof globalThis<`u`&&(globalThis[s9]=!0)},Xee=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),c9=class e extends F7{constructor(e={},t){if(super(),this.options=i9(e),this.services={},this.logger=P7,this.modules={external:[]},o9(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(d7(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=r9();this.options={...n,...this.options,...i9(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Xee(this)&&!Jee()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),Yee());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?P7.init(r(this.modules.logger),this.options):P7.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:e9;let t=new W7(this.options);this.store=new I7(this.options.resources,this.options);let i=this.services;i.logger=P7,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new q7(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new X7(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new n9(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new U7(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=a9,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=f7(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=a9){let n=t,r=d7(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=f7();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=a9,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&L7.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=f7();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=d7(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(d7(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=B7(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=B7(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=B7(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return d7(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=f7();return this.options.ns?(d7(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=f7();d7(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new W7(r9());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=a9){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new I7(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...r9().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new X7(n)}return a.translator=new U7(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();c9.createInstance,c9.dir,c9.init,c9.loadResources,c9.reloadResources,c9.use,c9.changeLanguage,c9.getFixedT,c9.t,c9.exists,c9.setDefaultNamespace,c9.hasLoadedNamespace,c9.loadNamespaces,c9.loadLanguages,c9.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:l7,es:u7}});var l9={translator:{...c9,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return c9.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},{translator:Zee}=l9,Qee=z(Hm)(({theme:e})=>({color:Nf(),fontWeight:`bold`,marginBottom:e.spacing(.5),"&:not(:last-of-type)":{marginRight:e.spacing(.5)}})),$ee=class extends F.Component{static propTypes={className:P.string,onReset:P.func.isRequired,language:P.string};static defaultProps={};render(){let{className:e,onReset:t=!1,language:n}=this.props;return(0,I.jsx)(`div`,{className:e,children:(0,I.jsx)(Qee,{onClick:()=>t(),children:Zee.t(`graphing.reset`,{lng:n})})})}},ete={mark:P.any,onChange:P.func,onDragStart:P.func,onDragStop:P.func},u9=(e=`fill`)=>({[e]:H.DISABLED,pointerEvents:`none`}),d9=(e=`fill`)=>({[e]:Lf(),pointerEvents:`none`}),f9=(e=`fill`)=>({[e]:Vf(),pointerEvents:`none`}),p9=(e=`fill`)=>({[e]:Wf(),pointerEvents:`none`}),tte=z(`polygon`,{shouldForwardProp:e=>![`isSolution`,`correctness`].includes(e)})(({isSolution:e,correctness:t})=>({fill:e?`rgb(60, 73, 150, 0.6)`:`transparent`,strokeWidth:2,"&:hover":{fill:e?`rgb(60, 73, 150, 0.6)`:`rgb(0, 0, 0, 0.25)`},...t===`correct`&&d9(`stroke`),...t===`incorrect`&&f9(`stroke`)})),nte=z(`polyline`,{shouldForwardProp:e=>![`isSolution`,`correctness`].includes(e)})(({isSolution:e,correctness:t})=>({fill:e?`rgb(60, 73, 150, 0.6)`:`transparent`,strokeWidth:2,"&:hover":{fill:e?`rgb(60, 73, 150, 0.6)`:`rgb(0, 0, 0, 0.25)`},...t===`correct`&&d9(`stroke`),...t===`incorrect`&&f9(`stroke`)})),rte=(e,t)=>(e||[]).map(e=>{let n={x:t.x(e.x),y:t.y(e.y)};return`${n.x},${n.y}`}).join(` `),ite=class extends F.Component{static propTypes={className:P.string,isSolution:P.bool,points:P.arrayOf(M$),graphProps:I$.isRequired,closed:P.bool.isRequired,correctness:P.string};static defaultProps={points:[]};render(){let{points:e,className:t,correctness:n,graphProps:r,closed:i,isSolution:a,...o}=this.props,{scale:s}=r,c=rte(e,s);return(0,I.jsx)(i?tte:nte,{points:c,isSolution:a,correctness:n,className:t,...o})}},ate=b0({bounds:(e,{domain:t,range:n})=>{let{points:r}=e;return b3(O3(r),t,n)},anchorPoint:e=>{let{points:t}=e;return t[0]},fromDelta:(e,t)=>{let{points:n}=e;return n.map(e=>x3(e).add(x3(t)))}})(ite),m9=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},h9=(e,t)=>{let n=e??t;return typeof n==`number`?n:typeof n==`string`&&n.endsWith(`px`)?m9(n):1},g9=F.forwardRef(({className:e,inputClassName:t,inputRef:n,inputStyle:r,minWidth:i,placeholder:a,style:o,value:s,defaultValue:c,...l},u)=>{let d=(0,F.useRef)(null),f=(0,F.useRef)(n),p=(0,F.useRef)(u),m=(0,F.useRef)(null),[h,g]=(0,F.useState)(()=>h9(i,r?.minWidth));f.current=n,p.current=u;let _=(0,F.useCallback)(e=>{d.current=e,f.current?.(e);let t=p.current;typeof t==`function`?t(e):t&&(t.current=e)},[]);return(0,F.useLayoutEffect)(()=>{let e=d.current,t=m.current;if(!e||!t)return;let n=window.getComputedStyle(e);t.style.font=n.font,t.style.letterSpacing=n.letterSpacing,t.style.textTransform=n.textTransform,t.textContent=String(s??c??a??``)||` `;let o=m9(n.paddingLeft)+m9(n.paddingRight)+m9(n.borderLeftWidth)+m9(n.borderRightWidth),l=Math.ceil(t.getBoundingClientRect().width+2),u=n.boxSizing===`border-box`?l+o:l;g(Math.max(h9(i,r?.minWidth),u))},[c,t,r,i,a,s]),(0,I.jsxs)(`span`,{className:e,style:{display:`inline-block`,...o},children:[(0,I.jsx)(`input`,{...l,ref:_,className:t,placeholder:a,style:{width:h,...r},value:s,defaultValue:c}),(0,I.jsx)(`span`,{ref:m,"aria-hidden":`true`,style:{height:0,left:0,overflow:`hidden`,position:`absolute`,top:0,visibility:`hidden`,whiteSpace:`pre`}})]})});g9.displayName=`AutosizeInput`;var ote=(e,t)=>{let[n,r]=(0,F.useState)(e);return(0,F.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>clearTimeout(n)},[e]),n},ste=z(g9,{shouldForwardProp:e=>![`disabled`,`markDisabled`].includes(e)})(({theme:e,disabled:t,markDisabled:n})=>({"& input":{float:`right`,padding:e.spacing(.5),fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,border:`solid 1px ${t?H.PRIMARY_DARK:n?Pf():H.SECONDARY}`,borderRadius:`3px`,color:n?Pf():H.PRIMARY_DARK,background:t||n?e.palette.background.paper:`transparent`}})),cte=(e,t,n)=>{n||={width:0,height:0};let{scale:r,domain:i,range:a}=e,o=r.x(t.x)+n.width+10,s=r.y(t.y)+n.height+10,c=o>=r.x(i.max)?`left`:`right`;return`${s>=r.y(a.min)?`top`:`bottom`}-${c}`},lte=(e,t,n,r)=>{let{scale:i}=e;switch(n||={width:0,height:0},r){case`bottom-right`:return{left:i.x(t.x)+10,top:i.y(t.y)+10};case`bottom-left`:return{left:i.x(t.x)-10-n.width,top:i.y(t.y)+10};case`top-left`:return{left:i.x(t.x)-10-n.width,top:i.y(t.y)-10-n.height};case`top-right`:return{left:i.x(t.x)+10,top:i.y(t.y)-10-n.height}}},_9=e=>{let[t,n]=(0,F.useState)(null),r=(0,F.useCallback)(e=>n(e)),{mark:i,graphProps:a,disabled:o,inputRef:s}=e,[c,l]=(0,F.useState)(i.label),u=e=>l(e.target.value),d=ote(c,200);(0,F.useEffect)(()=>{l(i.label)},[i.label]),(0,F.useEffect)(()=>{typeof d==`string`&&d!==i.label&&e.onChange(d)},[d]);let f=t?t.getBoundingClientRect():{width:0,height:0},p={position:`fixed`,pointerEvents:`auto`,...lte(a,i,f,cte(a,i,f))},m=o||i.disabled;return(0,I.jsx)(ste,{inputRef:e=>{r(e),s(e)},disabled:m,markDisabled:i.disabled,value:c,style:p,onChange:u})};_9.propTypes={disabled:P.bool,onChange:P.func,graphProps:I$,inputRef:P.func,mark:P.object,theme:P.object};var v9=Bp(`pie-lib:graphing-solution-set:polygon`),ute=(e,...t)=>fs(t,2).reduce((e,t)=>{if(t.length===2){let[n,r]=t;(0,B$.default)(Number.isFinite(n.index),`Index must be defined`);let i=n.index;return i>=0&&e.splice(i,1,r),e}else return e},[...e]),dte=class extends F.Component{static propTypes={className:P.string,disabled:P.bool,correctness:P.string,points:P.arrayOf(M$),closed:P.bool,isSolution:P.bool,coordinatesOnHover:P.bool,onChange:P.func.isRequired,onClosePolygon:P.func.isRequired,onDragStart:P.func,onDragStop:P.func,onClick:P.func,graphProps:I$.isRequired,isToolActive:P.bool,middle:P.object,labelNode:P.object,labelModeEnabled:P.bool,onChangeLabelProps:P.func,onChangeProps:P.func};static defaultProps={points:[]};dragPoint=(e,t,n)=>{v9(`[dragPoint] from, to:`,t,n);let{onChange:r,points:i}=this.props,a=[...i],o=!!(i||[]).find(e=>N3(e,n));N3(t,n)||o||(i[e].label&&(n.label=i[e].label),a.splice(e,1,n),r(a))};dragLine=(e,t)=>{v9(`[dragLine]: `,e,t);let{onChange:n}=this.props;e.from.label&&(t.from.label=e.from.label),e.to.label&&(t.to.label=e.to.label),n(ute(this.props.points,e.from,t.from,e.to,t.to))};dragPoly=(e,t)=>{v9(`[dragPoly] `,e,t);let{onChange:n}=this.props;t.forEach((n,r)=>{e[r].label&&(t[r].label=e[r].label)}),n(t)};close=()=>{let{points:e,onClosePolygon:t}=this.props;v9(`[close] ...`),e.length>=3?t():v9(`[close] - nope`)};labelChange=(e,t)=>{let{points:n,onChangeProps:r}=this.props,i={...e};(!e.label||ys(e.label))&&delete i.label;let a=[...n];a.splice(t,1,i),r(a)};clickPoint=(e,t,n)=>{let{closed:r,disabled:i,onClick:a,isToolActive:o,labelModeEnabled:s,onChangeProps:c,onChangeLabelProps:l,points:u}=this.props;if(s){if(i)return;if(u&&t===u.length){let{a:t,b:n}=k3(u);l({label:``,...e,...A3(t,n)})}else{let n=[...u];n.splice(t,1,{label:``,...e}),c(n)}this.input[t]&&this.input[t].focus();return}if(o&&!r&&t===0){this.close();return}a(e||n)};input={};render(){let{closed:e,graphProps:t,onChangeLabelProps:n,points:r,middle:i,labelNode:a,labelModeEnabled:o,isSolution:s=!1}=this.props,c=r&&r.length||0;return a&&i&&Object.prototype.hasOwnProperty.call(i,`label`)&&Au.createPortal((0,I.jsx)(_9,{inputRef:e=>this.input[c]=e,disabled:!o,mark:i,graphProps:t,onChange:e=>n({...i,label:e})}),a),(0,I.jsx)(`g`,{children:(0,I.jsx)(F.Fragment,{children:(0,I.jsx)(ate,{points:r,closed:e,isSolution:s,graphProps:t,onClick:this.clickPoint.bind(this,i,c)})})})}},fte=class extends F.Component{static propTypes={...ete,graphProps:I$.isRequired};static defaultProps={};constructor(e){super(e),this.state={}}change=e=>{let{mark:{middle:t}}=this.props,n={...this.state.mark,points:e};if(t){let{a:r,b:i}=k3(e);n.middle={...t,...A3(r,i)}}this.setState({mark:n})};changeProps=e=>{let t={...this.props.mark,points:e};this.props.onChange(this.props.mark,t)};changeLabelProps=e=>{let{mark:t,onChange:n}=this.props,r={...t.middle,...e};n(t,{...t,middle:r})};closePolygon=()=>{v9(`[closePolygon] ...`);let{onComplete:e,mark:t}=this.props;e(t,{...t,closed:!0})};dragStart=()=>this.setState({mark:this.props.mark});dragStop=()=>{let{onChange:e}=this.props,t={...this.state.mark};this.setState({mark:void 0},()=>{e(this.props.mark,t)})};render(){let{coordinatesOnHover:e,mark:t,graphProps:n,onClick:r,isToolActive:i,labelNode:a,labelModeEnabled:o}=this.props,{mark:s}=this.state;return(0,I.jsx)(dte,{...s||t,coordinatesOnHover:e,onChange:this.change,onChangeLabelProps:this.changeLabelProps,onChangeProps:this.changeProps,onClosePolygon:this.closePolygon,onDragStart:this.dragStart,onDragStop:this.dragStop,onClick:r,graphProps:n,isToolActive:i,labelNode:a,labelModeEnabled:o})}},pte=(e,t)=>{if(t||=[],t.length===0)return{points:[e],closed:!1};if(t.length===1)return N3(e,t[0])?{points:t,closed:!1}:{points:[...t,e],closed:!1};if(t.length>=2){let n=N3(e,t[0]);return n?{points:t,closed:n}:t.find(t=>N3(t,e))?{points:t,closed:!1}:{points:[...t,e],closed:!1}}},mte=()=>({type:`polygon`,Component:fte,complete:(e,t)=>({...t,building:!1,closed:!0}),addPoint:(e,t)=>{if(t){let{closed:n,points:r}=pte(e,t.points);return{...t,closed:n,points:r,building:!n}}else return{type:`polygon`,points:[e],closed:!1,building:!0}}}),hte=z(yK)(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,borderRadius:`8px`,background:e.palette.common.white,color:H.BLACK,"& .MuiInputBase-input":{padding:0}})),gte=(e,t,n,r)=>{let{scale:i,domain:a,range:o}=e,s=n===o.min?16:n===o.max?0:8;return i.x(t)+r+10>=i.x(a.max)?{left:i.x(t)-10-r,top:i.y(n)-s}:{left:i.x(t)+10,top:i.y(n)-s}},y9=({x:e,y:t,graphProps:n})=>{let r=`(${j3(e)}, ${j3(t)})`,i=(r.length||0)*6,a={position:`absolute`,pointerEvents:`auto`,width:i,padding:0,...gte(n,e,t,i)};return(0,I.jsx)(hte,{style:a,value:r,inputProps:{ariaLabel:`naked`}})};y9.propTypes={graphProps:I$,x:P.number,y:P.number};var _te=z(`g`)(({disabled:e,correctness:t})=>({cursor:`pointer`,"& circle":{fill:`currentColor`},...e&&{...u9(`fill`),...u9(`color`)},...t===`correct`&&{...d9(`fill`),...d9(`color`)},...t===`incorrect`&&{...f9(`fill`),...f9(`color`)},...t===`missing`&&{...p9(`fill`),...p9(`color`)}})),vte=class extends F.Component{static propTypes={className:P.string,coordinatesOnHover:P.bool,correctness:P.string,disabled:P.bool,labelNode:P.object,x:P.number,y:P.number,graphProps:I$.isRequired,onClick:P.func,onTouchStart:P.func,onTouchEnd:P.func};constructor(e){super(e),this.state={showCoordinates:!1}}render(){let{className:e,coordinatesOnHover:t,x:n,y:r,disabled:i,correctness:a,graphProps:o,labelNode:s,style:c,onClick:l,onTouchStart:u,onTouchEnd:d,...f}=this.props,{showCoordinates:p}=this.state,{scale:m}=o,h=F3(o)?5:7;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`circle`,{style:{fill:`transparent`,cursor:`pointer`,pointerEvents:`all`},r:h*3,cx:m.x(n),cy:m.y(r),onMouseEnter:()=>this.setState({showCoordinates:!0}),onMouseLeave:()=>this.setState({showCoordinates:!1}),onTouchStart:u,onTouchEnd:d,onClick:l}),(0,I.jsxs)(_te,{disabled:i,correctness:a,className:e,onMouseEnter:()=>this.setState({showCoordinates:!0}),onMouseLeave:()=>this.setState({showCoordinates:!1}),children:[(0,I.jsx)(`circle`,{...f,style:{fill:H.BLACK,cursor:`pointer`},r:h,cx:m.x(n),cy:m.y(r)}),s&&t&&p&&Au.createPortal((0,I.jsx)(y9,{graphProps:o,x:n,y:r}),s)]})]})}},yte=class extends F.Component{static propTypes={classes:P.object,className:P.string,correctness:P.string,disabled:P.bool,x:P.number,y:P.number,from:P.shape({x:P.number,y:P.number}).isRequired,to:P.shape({x:P.number,y:P.number}),graphProps:I$.isRequired};static defaultProps={from:{},to:{}};render(){let{classes:e,className:t,x:n,y:r,disabled:i,correctness:a,graphProps:o,from:s,to:c,...l}=this.props,{scale:u}=o,d=S3(s.x,s.y,c.x,c.y),f=``;return f=xs(s,c)?`0,0 0,0 0,0`:`0,0 ${C3.vector},${C3.vector*2}
364
+ `]))}function d5(e){n5=e}function f5(e,t){let n=t5([],e,[]);return t&&(n._latestUnfiltered=null),n}function p5(e,t,n,r){let i=e.past.length+1;u5(`inserting`,t),u5(`new free: `,n-i);let{past:a,_latestUnfiltered:o}=e,s=n&&n<=i,c=a.slice(+!!s);return t5(o==null?c:[...c,o],t,[],r)}function m5(e,t){if(t<0||t>=e.future.length)return e;let{past:n,future:r,_latestUnfiltered:i}=e,a=[...n,i,...r.slice(0,t)],o=r[t];return t5(a,o,r.slice(t+1))}function h5(e,t){if(t<0||t>=e.past.length)return e;let{past:n,future:r,_latestUnfiltered:i}=e,a=n.slice(0,t),o=[...n.slice(t+1),i,...r],s=n[t];return t5(a,s,o)}function g5(e,t){return t>0?m5(e,t-1):t<0?h5(e,e.past.length+t):e}function _5(e,t){return t.indexOf(e)>-1?e:!e}function v5(e,t={}){d5(t.debug);let n={limit:void 0,filter:()=>!0,groupBy:()=>null,undoType:Z8.UNDO,redoType:Z8.REDO,jumpToPastType:Z8.JUMP_TO_PAST,jumpToFutureType:Z8.JUMP_TO_FUTURE,jumpType:Z8.JUMP,neverSkipReducer:!1,ignoreInitialState:!1,syncFilter:!1,...t,initTypes:$8(t.initTypes,[`@@redux-undo/INIT`]),clearHistoryType:$8(t.clearHistoryType,[Z8.CLEAR_HISTORY])},r=n.neverSkipReducer?(t,n,...r)=>({...t,present:e(t.present,n,...r)}):e=>e,i;return(t=i,a={},...o)=>{c5(a,t);let s=t;if(!i){if(u5(`history is uninitialized`),t===void 0)return s=f5(e(t,{type:`@@redux-undo/CREATE_HISTORY`},...o),n.ignoreInitialState),u5(`do not set initialState on probe actions`),l5(s),s;e5(t)?(s=i=n.ignoreInitialState?t:t5(t.past,t.present,t.future),u5(`initialHistory initialized: initialState is a history`,i)):(s=i=f5(t,n.ignoreInitialState),u5(`initialHistory initialized: initialState is not a history`,i))}let c;switch(a.type){case void 0:return s;case n.undoType:return c=g5(s,-1),u5(`perform undo`),l5(c),r(c,a,...o);case n.redoType:return c=g5(s,1),u5(`perform redo`),l5(c),r(c,a,...o);case n.jumpToPastType:return c=h5(s,a.index),u5(`perform jumpToPast to ${a.index}`),l5(c),r(c,a,...o);case n.jumpToFutureType:return c=m5(s,a.index),u5(`perform jumpToFuture to ${a.index}`),l5(c),r(c,a,...o);case n.jumpType:return c=g5(s,a.index),u5(`perform jump to ${a.index}`),l5(c),r(c,a,...o);case _5(a.type,n.clearHistoryType):return c=f5(s.present,n.ignoreInitialState),u5(`perform clearHistory`),l5(c),r(c,a,...o);default:if(c=e(s.present,a,...o),n.initTypes.some(e=>e===a.type))return u5(`reset history due to init action`),l5(i),i;if(s._latestUnfiltered===c)return s;if(typeof n.filter==`function`&&!n.filter(a,c,s)){let e=t5(s.past,c,s.future,s.group);return n.syncFilter||(e._latestUnfiltered=s._latestUnfiltered),u5(`filter ignored action, not storing it in past`),l5(e),e}let t=n.groupBy(a,c,s);if(t!=null&&t===s.group){let e=t5(s.past,c,s.future,s.group);return u5(`groupBy grouped the action with the previous action`),l5(e),e}return s=p5(s,c,n.limit,t),u5(`inserted new state into history`),l5(s),s}}}var y5=()=>q8({marks:v5(X8,{debug:!1})}),b5=e=>({type:`CHANGE_MARKS`,marks:e}),x5=F.createContext({});function S5(e){return _i(`MuiAccordion`,e)}var C5=vi(`MuiAccordion`,[`root`,`heading`,`rounded`,`expanded`,`disabled`,`gutters`,`region`]),w5=e=>{let{classes:t,square:n,expanded:r,disabled:i,disableGutters:a}=e;return za({root:[`root`,!n&&`rounded`,r&&`expanded`,i&&`disabled`,!a&&`gutters`],heading:[`heading`],region:[`region`]},S5,t)},T5=z(sf,{name:`MuiAccordion`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${C5.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(jd(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{position:`relative`,transition:e.transitions.create([`margin`],t),overflowAnchor:`none`,"&::before":{position:`absolute`,left:0,top:-1,right:0,height:1,content:`""`,opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create([`opacity`,`background-color`],t)},"&:first-of-type":{"&::before":{display:`none`}},[`&.${C5.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:`none`}}},[`&.${C5.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),jd(({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${C5.expanded}`]:{margin:`16px 0`}}}]}))),E5=z(`h3`,{name:`MuiAccordion`,slot:`Heading`})({all:`unset`}),D5=z(`div`,{name:`MuiAccordion`,slot:`Region`})({}),O5=F.forwardRef(function(e,t){let n=ou({props:e,name:`MuiAccordion`}),{children:r,className:i,defaultExpanded:a=!1,disabled:o=!1,disableGutters:s=!1,expanded:c,onChange:l,slots:u={},slotProps:d={},TransitionComponent:f,TransitionProps:p,...m}=n,[h,g]=gf({controlled:c,default:a,name:`Accordion`,state:`expanded`}),_=F.useCallback(e=>{g(!h),l&&l(e,!h)},[h,l,g]),[v,...y]=F.Children.toArray(r),b=F.useMemo(()=>({expanded:h,disabled:o,disableGutters:s,toggle:_}),[h,o,s,_]),x={...n,disabled:o,disableGutters:s,expanded:h},S=w5(x),C={slots:{transition:f,...u},slotProps:{transition:p,...d}},[w,T]=Ld(`root`,{elementType:T5,externalForwardedProps:{...C,...m},className:L(S.root,i),shouldForwardComponentProp:!0,ownerState:x,ref:t}),[E,D]=Ld(`heading`,{elementType:E5,externalForwardedProps:C,className:S.heading,ownerState:x}),[O,k]=Ld(`transition`,{elementType:nm,externalForwardedProps:C,ownerState:x}),[A,j]=Ld(`region`,{elementType:D5,externalForwardedProps:C,ownerState:x,className:S.region,additionalProps:{"aria-labelledby":v.props.id,id:v.props[`aria-controls`],role:`region`}});return(0,I.jsxs)(w,{...T,children:[(0,I.jsx)(E,{...D,children:(0,I.jsx)(x5.Provider,{value:b,children:v})}),(0,I.jsx)(O,{in:h,timeout:`auto`,...k,children:(0,I.jsx)(A,{...j,children:y})})]})});function k5(e){return _i(`MuiAccordionDetails`,e)}vi(`MuiAccordionDetails`,[`root`]);var A5=e=>{let{classes:t}=e;return za({root:[`root`]},k5,t)},j5=z(`div`,{name:`MuiAccordionDetails`,slot:`Root`})(jd(({theme:e})=>({padding:e.spacing(1,2,2)}))),M5=F.forwardRef(function(e,t){let n=ou({props:e,name:`MuiAccordionDetails`}),{className:r,...i}=n,a=n,o=A5(a);return(0,I.jsx)(j5,{className:L(o.root,r),ref:t,ownerState:a,...i})});function N5(e){return _i(`MuiAccordionSummary`,e)}var P5=vi(`MuiAccordionSummary`,[`root`,`expanded`,`focusVisible`,`disabled`,`gutters`,`contentGutters`,`content`,`expandIconWrapper`]),F5=e=>{let{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return za({root:[`root`,n&&`expanded`,r&&`disabled`,!i&&`gutters`],focusVisible:[`focusVisible`],content:[`content`,n&&`expanded`,!i&&`contentGutters`],expandIconWrapper:[`expandIconWrapper`,n&&`expanded`]},N5,t)},I5=z(mm,{name:`MuiAccordionSummary`,slot:`Root`})(jd(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{display:`flex`,width:`100%`,minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create([`min-height`,`background-color`],t),[`&.${P5.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${P5.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${P5.disabled})`]:{cursor:`pointer`},variants:[{props:e=>!e.disableGutters,style:{[`&.${P5.expanded}`]:{minHeight:64}}}]}})),L5=z(`span`,{name:`MuiAccordionSummary`,slot:`Content`})(jd(({theme:e})=>({display:`flex`,textAlign:`start`,flexGrow:1,margin:`12px 0`,variants:[{props:e=>!e.disableGutters,style:{transition:e.transitions.create([`margin`],{duration:e.transitions.duration.shortest}),[`&.${P5.expanded}`]:{margin:`20px 0`}}}]}))),R5=z(`span`,{name:`MuiAccordionSummary`,slot:`ExpandIconWrapper`})(jd(({theme:e})=>({display:`flex`,color:(e.vars||e).palette.action.active,transform:`rotate(0deg)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shortest}),[`&.${P5.expanded}`]:{transform:`rotate(180deg)`}}))),z5=F.forwardRef(function(e,t){let n=ou({props:e,name:`MuiAccordionSummary`}),{children:r,className:i,expandIcon:a,focusVisibleClassName:o,onClick:s,slots:c,slotProps:l,...u}=n,{disabled:d=!1,disableGutters:f,expanded:p,toggle:m}=F.useContext(x5),h=e=>{m&&m(e),s&&s(e)},g={...n,expanded:p,disabled:d,disableGutters:f},_=F5(g),v={slots:c,slotProps:l},[y,b]=Ld(`root`,{ref:t,shouldForwardComponentProp:!0,className:L(_.root,i),elementType:I5,externalForwardedProps:{...v,...u},ownerState:g,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:d,"aria-expanded":p,focusVisibleClassName:L(_.focusVisible,o)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),h(t)}})}),[x,S]=Ld(`content`,{className:_.content,elementType:L5,externalForwardedProps:v,ownerState:g}),[C,w]=Ld(`expandIconWrapper`,{className:_.expandIconWrapper,elementType:R5,externalForwardedProps:v,ownerState:g});return(0,I.jsxs)(y,{...b,children:[(0,I.jsx)(x,{...S,children:r}),a&&(0,I.jsx)(C,{...w,children:a})]})});function B5(e){return _i(`PrivateSwitchBase`,e)}vi(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var V5=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e;return za({root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${V(i)}`],input:[`input`]},B5,t)},H5=z(mm,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),U5=z(`input`,{name:`MuiSwitchBase`,shouldForwardProp:es})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),W5=F.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:l,id:u,inputProps:d,inputRef:f,name:p,onBlur:m,onChange:h,onFocus:g,readOnly:_,required:v=!1,tabIndex:y,type:b,value:x,slots:S={},slotProps:C={},...w}=e,[T,E]=gf({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),D=ih(),O=e=>{g&&g(e),D&&D.onFocus&&D.onFocus(e)},k=e=>{m&&m(e),D&&D.onBlur&&D.onBlur(e)},A=e=>{if(e.nativeEvent.defaultPrevented||_)return;let t=e.target.checked;E(t),h&&h(e,t)},j=o;D&&j===void 0&&(j=D.disabled);let M=b===`checkbox`||b===`radio`,ee={...e,checked:T,disabled:j,disableFocusRipple:s,edge:c},N=V5(ee),te={slots:S,slotProps:{input:d,...C}},[ne,re]=Ld(`root`,{ref:t,elementType:H5,className:N.root,shouldForwardComponentProp:!0,externalForwardedProps:{...te,component:`span`,...w},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),O(t)},onBlur:t=>{e.onBlur?.(t),k(t)}}),ownerState:ee,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[ie,ae]=Ld(`input`,{ref:f,elementType:U5,className:N.input,externalForwardedProps:te,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),A(t)}}),ownerState:ee,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:j,id:M?u:void 0,name:p,readOnly:_,required:v,tabIndex:y,type:b,...b===`checkbox`&&x===void 0?{}:{value:x}}});return(0,I.jsxs)(ne,{...re,children:[(0,I.jsx)(ie,{...ae}),T?i:l]})}),G5=df((0,I.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`RadioButtonUnchecked`),K5=df((0,I.jsx)(`path`,{d:`M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z`}),`RadioButtonChecked`),q5=z(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:es})({position:`relative`,display:`flex`}),J5=z(G5,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),Y5=z(K5,{name:`MuiRadioButtonIcon`})(jd(({theme:e})=>({left:0,position:`absolute`,transform:`scale(0)`,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:`scale(1)`,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function X5(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,I.jsxs)(q5,{className:n.root,ownerState:i,children:[(0,I.jsx)(J5,{fontSize:r,className:n.background,ownerState:i}),(0,I.jsx)(Y5,{fontSize:r,className:n.dot,ownerState:i})]})}var Z5=F.createContext(void 0);function Q5(){return F.useContext(Z5)}function $5(e){return _i(`MuiRadio`,e)}var e7=vi(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]),t7=e=>{let{classes:t,color:n,size:r}=e,i={root:[`root`,`color${V(n)}`,r!==`medium`&&`size${V(r)}`]};return{...t,...za(i,$5,t)}},n7=z(W5,{shouldForwardProp:e=>es(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${V(n.size)}`],t[`color${V(n.color)}`]]}})(jd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${e7.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:`default`,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(vm()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(vm()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${e7.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]})));function r7(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var i7=(0,I.jsx)(X5,{checked:!0}),a7=(0,I.jsx)(X5,{}),o7=F.forwardRef(function(e,t){let n=ou({props:e,name:`MuiRadio`}),{checked:r,checkedIcon:i=i7,color:a=`primary`,icon:o=a7,name:s,onChange:c,size:l=`medium`,className:u,disabled:d,disableRipple:f=!1,slots:p={},slotProps:m={},inputProps:h,...g}=n,_=ih(),v=d;_&&v===void 0&&(v=_.disabled),v??=!1;let y={...n,disabled:v,disableRipple:f,color:a,size:l},b=t7(y),x=Q5(),S=r,C=lf(c,x&&x.onChange),w=s;x&&(S===void 0&&(S=r7(x.value,n.value)),w===void 0&&(w=x.name));let T=m.input??h,[E,D]=Ld(`root`,{ref:t,elementType:n7,className:L(b.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:m,...g},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),C(t,...n)}}),ownerState:y,additionalProps:{type:`radio`,icon:F.cloneElement(o,{fontSize:o.props.fontSize??l}),checkedIcon:F.cloneElement(i,{fontSize:i.props.fontSize??l}),disabled:v,name:w,checked:S,slots:p,slotProps:{input:typeof T==`function`?T(y):T}}});return(0,I.jsx)(E,{...D,classes:b})}),s7=class extends F.Component{static propTypes={gssLineData:P.object,disabled:P.bool,onChange:P.func};onChangeRadioValue=e=>{let{gssLineData:t,onChange:n}=this.props,r=t.selectedTool;t.selectedTool=e.target.value,n(t,r)};lineTypeChange=(e,t)=>{let{gssLineData:n,onChange:r}=this.props,i=n.selectedTool;n[`line${e}`].lineType=t,r(n,i)};render(){let{gssLineData:e,disabled:t}=this.props;return(0,I.jsx)(c7,{children:(0,I.jsxs)(`div`,{className:`selectLineRadioGroup`,children:[(0,I.jsxs)(`div`,{className:`radioFieldOuter`,children:[(0,I.jsxs)(`div`,{className:`radioFieldInner`,children:[(0,I.jsx)(o7,{name:`select-line-radio-buttons`,onChange:this.onChangeRadioValue,value:`lineA`,disabled:!!t,checked:e.selectedTool===`lineA`,className:`lineTypeRadio`}),(0,I.jsx)(AG,{className:`lineNameFont`,children:`Line A`})]}),(0,I.jsxs)(`div`,{className:`radioFieldButtons`,children:[(0,I.jsxs)(Hm,{size:`small`,variant:`contained`,color:e.lineA.lineType===`Solid`?`primary`:`inherit`,disabled:!!t,onClick:()=>this.lineTypeChange(`A`,`Solid`),className:e.lineA.lineType===`Solid`?t?`lineTypeButtonLeftSelectedDisabled`:`lineTypeButtonLeftSelected`:t?`lineTypeButtonLeftUnSelectedDisabled`:`lineTypeButtonLeftUnSelected`,children:[e.lineA.lineType===`Solid`&&`✔`,` Solid`]}),(0,I.jsxs)(Hm,{size:`small`,variant:`contained`,color:e.lineA.lineType===`Dashed`?`primary`:`inherit`,disabled:!!t,onClick:()=>this.lineTypeChange(`A`,`Dashed`),className:e.lineA.lineType===`Dashed`?t?`lineTypeButtonRightSelectedDisabled`:`lineTypeButtonRightSelected`:t?`lineTypeButtonRightUnSelectedDisabled`:`lineTypeButtonRightUnSelected`,children:[e.lineA.lineType===`Dashed`&&`✔`,` Dashed`]})]})]}),e.numberOfLines===2&&(0,I.jsxs)(`div`,{className:`radioFieldOuter`,children:[(0,I.jsxs)(`div`,{className:`radioFieldInner`,children:[(0,I.jsx)(o7,{name:`select-line-radio-buttons`,onChange:this.onChangeRadioValue,value:`lineB`,disabled:!!t,checked:e.selectedTool===`lineB`,className:`lineTypeRadio`}),(0,I.jsx)(AG,{className:`lineNameFont`,children:`Line B`})]}),(0,I.jsxs)(`div`,{className:`radioFieldButtons`,children:[(0,I.jsxs)(Hm,{size:`small`,variant:`contained`,color:e.lineB.lineType===`Solid`?`primary`:`inherit`,disabled:!!t,onClick:()=>this.lineTypeChange(`B`,`Solid`),className:e.lineB.lineType===`Solid`?t?`lineTypeButtonLeftSelectedDisabled`:`lineTypeButtonLeftSelected`:t?`lineTypeButtonLeftUnSelectedDisabled`:`lineTypeButtonLeftUnSelected`,children:[e.lineB.lineType===`Solid`&&`✔`,` Solid`]}),(0,I.jsxs)(Hm,{size:`small`,variant:`contained`,color:e.lineB.lineType===`Dashed`?`primary`:`inherit`,disabled:!!t,onClick:()=>this.lineTypeChange(`B`,`Dashed`),className:e.lineB.lineType===`Dashed`?t?`lineTypeButtonRightSelectedDisabled`:`lineTypeButtonRightSelected`:t?`lineTypeButtonRightUnSelectedDisabled`:`lineTypeButtonRightUnSelected`,children:[e.lineB.lineType===`Dashed`&&`✔`,` Dashed`]})]})]}),(0,I.jsx)(`div`,{className:`radioFieldOuter`,children:(0,I.jsxs)(`div`,{className:`radioFieldInner`,children:[(0,I.jsx)(o7,{name:`select-line-radio-buttons`,onChange:this.onChangeRadioValue,value:`solutionSet`,disabled:!!t,checked:e.selectedTool===`solutionSet`,className:`lineTypeRadio`}),(0,I.jsx)(AG,{className:`lineNameFont`,children:`Solution Set`})]})})]})})}},c7=z(`div`)(()=>({"& .selectLineRadioGroup":{display:`flex`,flexWrap:`wrap`,flexDirection:`row`},"& .radioFieldOuter":{display:`flex`,flexWrap:`wrap`,flexDirection:`column`},"& .radioFieldInner":{display:`flex`,flexWrap:`wrap`,flexDirection:`row`,alignItems:`center`},"& .radioFieldButtons":{display:`flex`,flexWrap:`wrap`,flexDirection:`row`,padding:`0 .9rem`},"& .lineNameFont":{fontWeight:`bold`,padding:`0 5px 0 0`},"& .lineTypeRadio":{color:`#000000 !important`},"& .lineTypeButtonLeftSelected":{textTransform:`none`,border:`1px solid #3E4EB1`,backgroundColor:`#3E4EB1 !important`,color:`#FFFFFF !important`,borderRadius:`4px 0 0 4px`},"& .lineTypeButtonLeftUnSelected":{textTransform:`none`,border:`1px solid #3E4EB1`,backgroundColor:`#FFFFFF !important`,color:`#3E4EB1 !important`,borderRadius:`4px 0 0 4px`},"& .lineTypeButtonRightSelected":{textTransform:`none`,border:`1px solid #3E4EB1`,backgroundColor:`#3E4EB1 !important`,color:`#FFFFFF !important`,borderRadius:`0 4px 4px 0`},"& .lineTypeButtonRightUnSelected":{textTransform:`none`,border:`1px solid #3E4EB1`,backgroundColor:`#FFFFFF !important`,color:`#3E4EB1 !important`,borderRadius:`0 4px 4px 0`},"& .lineTypeButtonLeftSelectedDisabled, & .lineTypeButtonRightSelectedDisabled":{backgroundColor:`#3E4EB1 !important`,color:`#FFFFFF !important`,cursor:`default`,pointerEvents:`none`},"& .lineTypeButtonLeftUnSelectedDisabled, & .lineTypeButtonRightUnSelectedDisabled":{backgroundColor:`#FFFFFF !important`,color:`#3E4EB1 !important`,cursor:`default`,pointerEvents:`none`}})),l7={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,redo:`Redo`,reset:`Reset`},mathInline:{primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`}},u7={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`}},graphing:{point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`}},d7=e=>typeof e==`string`,f7=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},p7=e=>e==null?``:``+e,m7=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},h7=/###/g,g7=e=>e&&e.indexOf(`###`)>-1?e.replace(h7,`.`):e,_7=e=>!e||d7(e),v7=(e,t,n)=>{let r=d7(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(_7(e))return{};let t=g7(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return _7(e)?{}:{obj:e,k:g7(r[i])}},y7=(e,t,n)=>{let{obj:r,k:i}=v7(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=v7(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=v7(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},b7=(e,t,n,r)=>{let{obj:i,k:a}=v7(e,t,Object);i[a]=i[a]||[],i[a].push(n)},x7=(e,t)=>{let{obj:n,k:r}=v7(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},S7=(e,t,n)=>{let r=x7(e,n);return r===void 0?x7(t,n):r},C7=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?d7(e[r])||e[r]instanceof String||d7(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):C7(e[r],t[r],n):e[r]=t[r]);return e},w7=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),T7={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},E7=e=>d7(e)?e.replace(/[&<>"'\/]/g,e=>T7[e]):e,D7=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},O7=[` `,`,`,`?`,`!`,`;`],k7=new D7(20),A7=(e,t,n)=>{t||=``,n||=``;let r=O7.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=k7.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},j7=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},M7=e=>e?.replace(/_/g,`-`),N7={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},P7=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||N7,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(d7(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},F7=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},I7=class extends F7{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):d7(n)&&i?o.push(...n.split(i)):o.push(n)));let s=x7(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!d7(n)?s:j7(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),y7(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(d7(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=x7(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?C7(s,n,i):s={...s,...n},y7(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},L7={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},R7=Symbol(`i18next/PATH_KEY`);function z7(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===R7?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function B7(e,t){let{[R7]:n}=e(z7()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var V7={},H7=e=>!d7(e)&&typeof e!=`boolean`&&typeof e!=`number`,U7=class e extends F7{constructor(e,t={}){super(),m7([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=P7.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=H7(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!A7(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:d7(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:d7(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=B7(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?B7(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!d7(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=H7(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(d7(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:H7(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&d7(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=d7(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!d7(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=d7(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=L7.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return d7(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?B7(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!d7(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(d7(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!V7[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(V7[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!d7(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},W7=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=P7.create(`languageUtils`)}getScriptPartFromCode(e){if(e=M7(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=M7(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(d7(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),d7(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return d7(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):d7(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},G7={zero:0,one:1,two:2,few:3,many:4,other:5},K7={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},q7=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=P7.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=M7(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),K7;if(!e.match(/-|_/))return K7;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>G7[e]-G7[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},J7=(e,t,n,r=`.`,i=!0)=>{let a=S7(e,t,n);return!a&&i&&d7(n)&&(a=j7(e,n,r),a===void 0&&(a=j7(t,n,r))),a},Y7=e=>e.replace(/\$/g,`$$$$`),X7=class{constructor(e={}){this.logger=P7.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?E7:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?w7(i):a||`{{`,this.suffix=o?w7(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?w7(d):f||w7(`$t(`),this.nestingSuffix=p?w7(p):m||w7(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=J7(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(J7(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Y7(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Y7(this.escape(e)):Y7(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=d7(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!d7(a)&&!this.useRawValueToEscape&&(a=p7(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${w7(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!d7(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!d7(i))return i;d7(i)||(i=p7(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Z7=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Q7=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(M7(r),i),t[o]=s),s(n)}},$7=e=>(t,n,r)=>e(M7(n),r)(t),e9=class{constructor(e={}){this.logger=P7.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Q7:$7;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Q7(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Z7(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},t9=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},n9=class extends F7{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=P7.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{b7(n.loaded,[i],a),t9(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();d7(e)&&(e=this.languageUtils.toResolveHierarchy(e)),d7(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},r9=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),d7(e[1])&&(t.defaultValue=e[1]),d7(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),i9=e=>(d7(e.ns)&&(e.ns=[e.ns]),d7(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),d7(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),a9=()=>{},o9=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},s9=`__i18next_supportNoticeShown`,Jee=()=>!!(typeof globalThis<`u`&&globalThis[s9]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),Yee=()=>{typeof globalThis<`u`&&(globalThis[s9]=!0)},Xee=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),c9=class e extends F7{constructor(e={},t){if(super(),this.options=i9(e),this.services={},this.logger=P7,this.modules={external:[]},o9(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(d7(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=r9();this.options={...n,...this.options,...i9(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Xee(this)&&!Jee()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),Yee());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?P7.init(r(this.modules.logger),this.options):P7.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:e9;let t=new W7(this.options);this.store=new I7(this.options.resources,this.options);let i=this.services;i.logger=P7,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new q7(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new X7(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new n9(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new U7(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=a9,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=f7(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=a9){let n=t,r=d7(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=f7();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=a9,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&L7.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=f7();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=d7(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(d7(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=B7(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=B7(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=B7(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return d7(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=f7();return this.options.ns?(d7(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=f7();d7(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new W7(r9());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=a9){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new I7(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...r9().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new X7(n)}return a.translator=new U7(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();c9.createInstance,c9.dir,c9.init,c9.loadResources,c9.reloadResources,c9.use,c9.changeLanguage,c9.getFixedT,c9.t,c9.exists,c9.setDefaultNamespace,c9.hasLoadedNamespace,c9.loadNamespaces,c9.loadLanguages,c9.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:l7,es:u7}});var l9={translator:{...c9,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return c9.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},{translator:Zee}=l9,Qee=z(Hm)(({theme:e})=>({color:Nf(),fontWeight:`bold`,marginBottom:e.spacing(.5),"&:not(:last-of-type)":{marginRight:e.spacing(.5)}})),$ee=class extends F.Component{static propTypes={className:P.string,onReset:P.func.isRequired,language:P.string};static defaultProps={};render(){let{className:e,onReset:t=!1,language:n}=this.props;return(0,I.jsx)(`div`,{className:e,children:(0,I.jsx)(Qee,{onClick:()=>t(),children:Zee.t(`graphing.reset`,{lng:n})})})}},ete={mark:P.any,onChange:P.func,onDragStart:P.func,onDragStop:P.func},u9=(e=`fill`)=>({[e]:H.DISABLED,pointerEvents:`none`}),d9=(e=`fill`)=>({[e]:Lf(),pointerEvents:`none`}),f9=(e=`fill`)=>({[e]:Vf(),pointerEvents:`none`}),p9=(e=`fill`)=>({[e]:Wf(),pointerEvents:`none`}),tte=z(`polygon`,{shouldForwardProp:e=>![`isSolution`,`correctness`].includes(e)})(({isSolution:e,correctness:t})=>({fill:e?`rgb(60, 73, 150, 0.6)`:`transparent`,strokeWidth:2,"&:hover":{fill:e?`rgb(60, 73, 150, 0.6)`:`rgb(0, 0, 0, 0.25)`},...t===`correct`&&d9(`stroke`),...t===`incorrect`&&f9(`stroke`)})),nte=z(`polyline`,{shouldForwardProp:e=>![`isSolution`,`correctness`].includes(e)})(({isSolution:e,correctness:t})=>({fill:e?`rgb(60, 73, 150, 0.6)`:`transparent`,strokeWidth:2,"&:hover":{fill:e?`rgb(60, 73, 150, 0.6)`:`rgb(0, 0, 0, 0.25)`},...t===`correct`&&d9(`stroke`),...t===`incorrect`&&f9(`stroke`)})),rte=(e,t)=>(e||[]).map(e=>{let n={x:t.x(e.x),y:t.y(e.y)};return`${n.x},${n.y}`}).join(` `),ite=class extends F.Component{static propTypes={className:P.string,isSolution:P.bool,points:P.arrayOf(M$),graphProps:I$.isRequired,closed:P.bool.isRequired,correctness:P.string};static defaultProps={points:[]};render(){let{points:e,className:t,correctness:n,graphProps:r,closed:i,isSolution:a,...o}=this.props,{scale:s}=r,c=rte(e,s);return(0,I.jsx)(i?tte:nte,{points:c,isSolution:a,correctness:n,className:t,...o})}},ate=b0({bounds:(e,{domain:t,range:n})=>{let{points:r}=e;return b3(O3(r),t,n)},anchorPoint:e=>{let{points:t}=e;return t[0]},fromDelta:(e,t)=>{let{points:n}=e;return n.map(e=>x3(e).add(x3(t)))}})(ite),m9=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},h9=(e,t)=>{let n=e??t;return typeof n==`number`?n:typeof n==`string`&&n.endsWith(`px`)?m9(n):1},g9=F.forwardRef(({className:e,inputClassName:t,inputRef:n,inputStyle:r,minWidth:i,placeholder:a,style:o,value:s,defaultValue:c,...l},u)=>{let d=(0,F.useRef)(null),f=(0,F.useRef)(n),p=(0,F.useRef)(u),m=(0,F.useRef)(null),[h,g]=(0,F.useState)(()=>h9(i,r?.minWidth));f.current=n,p.current=u;let _=(0,F.useCallback)(e=>{d.current=e,f.current?.(e);let t=p.current;typeof t==`function`?t(e):t&&(t.current=e)},[]);return(0,F.useLayoutEffect)(()=>{let e=d.current,t=m.current;if(!e||!t)return;let n=window.getComputedStyle(e);t.style.font=n.font,t.style.letterSpacing=n.letterSpacing,t.style.textTransform=n.textTransform,t.textContent=String(s??c??a??``)||` `;let o=m9(n.paddingLeft)+m9(n.paddingRight)+m9(n.borderLeftWidth)+m9(n.borderRightWidth),l=Math.ceil(t.getBoundingClientRect().width+2),u=n.boxSizing===`border-box`?l+o:l;g(Math.max(h9(i,r?.minWidth),u))},[c,t,r,i,a,s]),(0,I.jsxs)(`span`,{className:e,style:{display:`inline-block`,...o},children:[(0,I.jsx)(`input`,{...l,ref:_,className:t,placeholder:a,style:{width:h,...r},value:s,defaultValue:c}),(0,I.jsx)(`span`,{ref:m,"aria-hidden":`true`,style:{height:0,left:0,overflow:`hidden`,position:`absolute`,top:0,visibility:`hidden`,whiteSpace:`pre`}})]})});g9.displayName=`AutosizeInput`;var ote=(e,t)=>{let[n,r]=(0,F.useState)(e);return(0,F.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>clearTimeout(n)},[e]),n},ste=z(g9,{shouldForwardProp:e=>![`disabled`,`markDisabled`].includes(e)})(({theme:e,disabled:t,markDisabled:n})=>({"& input":{float:`right`,padding:e.spacing(.5),fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,border:`solid 1px ${t?H.PRIMARY_DARK:n?Pf():H.SECONDARY}`,borderRadius:`3px`,color:n?Pf():H.PRIMARY_DARK,background:t||n?e.palette.background.paper:`transparent`}})),cte=(e,t,n)=>{n||={width:0,height:0};let{scale:r,domain:i,range:a}=e,o=r.x(t.x)+n.width+10,s=r.y(t.y)+n.height+10,c=o>=r.x(i.max)?`left`:`right`;return`${s>=r.y(a.min)?`top`:`bottom`}-${c}`},lte=(e,t,n,r)=>{let{scale:i}=e;switch(n||={width:0,height:0},r){case`bottom-right`:return{left:i.x(t.x)+10,top:i.y(t.y)+10};case`bottom-left`:return{left:i.x(t.x)-10-n.width,top:i.y(t.y)+10};case`top-left`:return{left:i.x(t.x)-10-n.width,top:i.y(t.y)-10-n.height};case`top-right`:return{left:i.x(t.x)+10,top:i.y(t.y)-10-n.height}}},_9=e=>{let[t,n]=(0,F.useState)(null),r=(0,F.useCallback)(e=>n(e)),{mark:i,graphProps:a,disabled:o,inputRef:s}=e,[c,l]=(0,F.useState)(i.label),u=e=>l(e.target.value),d=ote(c,200);(0,F.useEffect)(()=>{l(i.label)},[i.label]),(0,F.useEffect)(()=>{typeof d==`string`&&d!==i.label&&e.onChange(d)},[d]);let f=t?t.getBoundingClientRect():{width:0,height:0},p={position:`fixed`,pointerEvents:`auto`,...lte(a,i,f,cte(a,i,f))},m=o||i.disabled;return(0,I.jsx)(ste,{inputRef:e=>{r(e),s(e)},disabled:m,markDisabled:i.disabled,value:c,style:p,onChange:u})};_9.propTypes={disabled:P.bool,onChange:P.func,graphProps:I$,inputRef:P.func,mark:P.object,theme:P.object};var v9=Bp(`pie-lib:graphing-solution-set:polygon`),ute=(e,...t)=>fs(t,2).reduce((e,t)=>{if(t.length===2){let[n,r]=t;(0,B$.default)(Number.isFinite(n.index),`Index must be defined`);let i=n.index;return i>=0&&e.splice(i,1,r),e}else return e},[...e]),dte=class extends F.Component{static propTypes={className:P.string,disabled:P.bool,correctness:P.string,points:P.arrayOf(M$),closed:P.bool,isSolution:P.bool,coordinatesOnHover:P.bool,onChange:P.func.isRequired,onClosePolygon:P.func.isRequired,onDragStart:P.func,onDragStop:P.func,onClick:P.func,graphProps:I$.isRequired,isToolActive:P.bool,middle:P.object,labelNode:P.object,labelModeEnabled:P.bool,onChangeLabelProps:P.func,onChangeProps:P.func};static defaultProps={points:[]};dragPoint=(e,t,n)=>{v9(`[dragPoint] from, to:`,t,n);let{onChange:r,points:i}=this.props,a=[...i],o=!!(i||[]).find(e=>N3(e,n));N3(t,n)||o||(i[e].label&&(n.label=i[e].label),a.splice(e,1,n),r(a))};dragLine=(e,t)=>{v9(`[dragLine]: `,e,t);let{onChange:n}=this.props;e.from.label&&(t.from.label=e.from.label),e.to.label&&(t.to.label=e.to.label),n(ute(this.props.points,e.from,t.from,e.to,t.to))};dragPoly=(e,t)=>{v9(`[dragPoly] `,e,t);let{onChange:n}=this.props;t.forEach((n,r)=>{e[r].label&&(t[r].label=e[r].label)}),n(t)};close=()=>{let{points:e,onClosePolygon:t}=this.props;v9(`[close] ...`),e.length>=3?t():v9(`[close] - nope`)};labelChange=(e,t)=>{let{points:n,onChangeProps:r}=this.props,i={...e};(!e.label||ys(e.label))&&delete i.label;let a=[...n];a.splice(t,1,i),r(a)};clickPoint=(e,t,n)=>{let{closed:r,disabled:i,onClick:a,isToolActive:o,labelModeEnabled:s,onChangeProps:c,onChangeLabelProps:l,points:u}=this.props;if(s){if(i)return;if(u&&t===u.length){let{a:t,b:n}=k3(u);l({label:``,...e,...A3(t,n)})}else{let n=[...u];n.splice(t,1,{label:``,...e}),c(n)}this.input[t]&&this.input[t].focus();return}if(o&&!r&&t===0){this.close();return}a(e||n)};input={};render(){let{closed:e,graphProps:t,onChangeLabelProps:n,points:r,middle:i,labelNode:a,labelModeEnabled:o,isSolution:s=!1}=this.props,c=r&&r.length||0;return a&&i&&Object.prototype.hasOwnProperty.call(i,`label`)&&Au.createPortal((0,I.jsx)(_9,{inputRef:e=>this.input[c]=e,disabled:!o,mark:i,graphProps:t,onChange:e=>n({...i,label:e})}),a),(0,I.jsx)(`g`,{children:(0,I.jsx)(F.Fragment,{children:(0,I.jsx)(ate,{points:r,closed:e,isSolution:s,graphProps:t,onClick:this.clickPoint.bind(this,i,c)})})})}},fte=class extends F.Component{static propTypes={...ete,graphProps:I$.isRequired};static defaultProps={};constructor(e){super(e),this.state={}}change=e=>{let{mark:{middle:t}}=this.props,n={...this.state.mark,points:e};if(t){let{a:r,b:i}=k3(e);n.middle={...t,...A3(r,i)}}this.setState({mark:n})};changeProps=e=>{let t={...this.props.mark,points:e};this.props.onChange(this.props.mark,t)};changeLabelProps=e=>{let{mark:t,onChange:n}=this.props,r={...t.middle,...e};n(t,{...t,middle:r})};closePolygon=()=>{v9(`[closePolygon] ...`);let{onComplete:e,mark:t}=this.props;e(t,{...t,closed:!0})};dragStart=()=>this.setState({mark:this.props.mark});dragStop=()=>{let{onChange:e}=this.props,t={...this.state.mark};this.setState({mark:void 0},()=>{e(this.props.mark,t)})};render(){let{coordinatesOnHover:e,mark:t,graphProps:n,onClick:r,isToolActive:i,labelNode:a,labelModeEnabled:o}=this.props,{mark:s}=this.state;return(0,I.jsx)(dte,{...s||t,coordinatesOnHover:e,onChange:this.change,onChangeLabelProps:this.changeLabelProps,onChangeProps:this.changeProps,onClosePolygon:this.closePolygon,onDragStart:this.dragStart,onDragStop:this.dragStop,onClick:r,graphProps:n,isToolActive:i,labelNode:a,labelModeEnabled:o})}},pte=(e,t)=>{if(t||=[],t.length===0)return{points:[e],closed:!1};if(t.length===1)return N3(e,t[0])?{points:t,closed:!1}:{points:[...t,e],closed:!1};if(t.length>=2){let n=N3(e,t[0]);return n?{points:t,closed:n}:t.find(t=>N3(t,e))?{points:t,closed:!1}:{points:[...t,e],closed:!1}}},mte=()=>({type:`polygon`,Component:fte,complete:(e,t)=>({...t,building:!1,closed:!0}),addPoint:(e,t)=>{if(t){let{closed:n,points:r}=pte(e,t.points);return{...t,closed:n,points:r,building:!n}}else return{type:`polygon`,points:[e],closed:!1,building:!0}}}),hte=z(yK)(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,borderRadius:`8px`,background:e.palette.common.white,color:H.BLACK,"& .MuiInputBase-input":{padding:0}})),gte=(e,t,n,r)=>{let{scale:i,domain:a,range:o}=e,s=n===o.min?16:n===o.max?0:8;return i.x(t)+r+10>=i.x(a.max)?{left:i.x(t)-10-r,top:i.y(n)-s}:{left:i.x(t)+10,top:i.y(n)-s}},y9=({x:e,y:t,graphProps:n})=>{let r=`(${j3(e)}, ${j3(t)})`,i=(r.length||0)*6,a={position:`absolute`,pointerEvents:`auto`,width:i,padding:0,...gte(n,e,t,i)};return(0,I.jsx)(hte,{style:a,value:r,inputProps:{ariaLabel:`naked`}})};y9.propTypes={graphProps:I$,x:P.number,y:P.number};var _te=z(`g`)(({disabled:e,correctness:t})=>({cursor:`pointer`,"& circle":{fill:`currentColor`},...e&&{...u9(`fill`),...u9(`color`)},...t===`correct`&&{...d9(`fill`),...d9(`color`)},...t===`incorrect`&&{...f9(`fill`),...f9(`color`)},...t===`missing`&&{...p9(`fill`),...p9(`color`)}})),vte=class extends F.Component{static propTypes={className:P.string,coordinatesOnHover:P.bool,correctness:P.string,disabled:P.bool,labelNode:P.object,x:P.number,y:P.number,graphProps:I$.isRequired,onClick:P.func,onTouchStart:P.func,onTouchEnd:P.func};constructor(e){super(e),this.state={showCoordinates:!1}}render(){let{className:e,coordinatesOnHover:t,x:n,y:r,disabled:i,correctness:a,graphProps:o,labelNode:s,style:c,onClick:l,onTouchStart:u,onTouchEnd:d,...f}=this.props,{showCoordinates:p}=this.state,{scale:m}=o,h=F3(o)?5:7;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`circle`,{style:{fill:`transparent`,cursor:`pointer`,pointerEvents:`all`},r:h*3,cx:m.x(n),cy:m.y(r),onMouseEnter:()=>this.setState({showCoordinates:!0}),onMouseLeave:()=>this.setState({showCoordinates:!1}),onTouchStart:u,onTouchEnd:d,onClick:l}),(0,I.jsxs)(_te,{disabled:i,correctness:a,className:e,onMouseEnter:()=>this.setState({showCoordinates:!0}),onMouseLeave:()=>this.setState({showCoordinates:!1}),children:[(0,I.jsx)(`circle`,{...f,style:{fill:H.BLACK,cursor:`pointer`},r:h,cx:m.x(n),cy:m.y(r)}),s&&t&&p&&Au.createPortal((0,I.jsx)(y9,{graphProps:o,x:n,y:r}),s)]})]})}},yte=class extends F.Component{static propTypes={classes:P.object,className:P.string,correctness:P.string,disabled:P.bool,x:P.number,y:P.number,from:P.shape({x:P.number,y:P.number}).isRequired,to:P.shape({x:P.number,y:P.number}),graphProps:I$.isRequired};static defaultProps={from:{},to:{}};render(){let{classes:e,className:t,x:n,y:r,disabled:i,correctness:a,graphProps:o,from:s,to:c,...l}=this.props,{scale:u}=o,d=S3(s.x,s.y,c.x,c.y),f=``;return f=xs(s,c)?`0,0 0,0 0,0`:`0,0 ${C3.vector},${C3.vector*2}
365
365
  -${C3.vector},${C3.vector*2}`,(0,I.jsx)(`g`,{className:L(e.point,i&&e.disabled,e[a],t),...l,children:(0,I.jsx)(`polygon`,{points:f,transform:`
366
366
  translate(${u.x(n)}, ${u.y(r)})
367
367
  rotate(${d} 0 0)`})})}},b9=({size:e,transform:t,points:n})=>(0,I.jsx)(`polygon`,{points:n||`0,0 ${e},${e/2} 0,${e}`,transform:t});b9.propTypes={points:P.string,size:P.number,transform:P.string},b9.defaultProps={points:``,size:10,transform:``};var bte=()=>`arrow-${(Math.random()*1e3).toFixed(0)}`,x9=({id:e,size:t,className:n})=>(0,I.jsx)(`marker`,{id:e,viewBox:`0 0 ${t} ${t}`,refX:t/2,refY:t/2,markerWidth:t,markerHeight:t,orient:`auto-start-reverse`,className:n,style:{fill:H.BLACK},children:(0,I.jsx)(b9,{size:t})});x9.propTypes={id:P.string,size:P.number,className:P.string},x9.defaultProps={size:5};var xte=class extends F.Component{static propTypes={classes:P.object,className:P.string,correctness:P.string,disabled:P.bool,x:P.number.isRequired,y:P.number.isRequired,angle:P.number.isRequired,graphProps:I$.isRequired};render(){let{classes:e,angle:t,className:n,x:r,y:i,disabled:a,correctness:o,graphProps:s,...c}=this.props,l=F3(s)?12:14,{scale:u}=s,d=u.x(r),f=u.y(i),p=`rotate(${-t}, ${d},${f})`,m=`${d},${f}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/graphing-solution-set",
3
- "version": "6.1.2-next.13",
3
+ "version": "6.1.2-next.14",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,8 +13,8 @@
13
13
  "@mui/icons-material": "^7.3.4",
14
14
  "@mui/material": "^7.3.4",
15
15
  "@pie-lib/config-ui": "14.0.0-next.36",
16
- "@pie-lib/correct-answer-toggle": "5.0.0-next.43",
17
- "@pie-lib/graphing-solution-set": "5.0.0-next.37",
16
+ "@pie-lib/correct-answer-toggle": "5.0.0-next.44",
17
+ "@pie-lib/graphing-solution-set": "5.0.0-next.38",
18
18
  "@pie-lib/render-ui": "6.2.0-next.42",
19
19
  "debug": "^4.1.1",
20
20
  "prop-types": "^15.8.1",