@pie-element/explicit-constructed-response 11.2.2 → 11.2.3

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.
package/module/print.js CHANGED
@@ -1 +1 @@
1
- import{_dll_react as e,_dll_react_dom as t,_dll_prop_types as n,_dll_mui__material_styles as r,_dll_mui__material_colors as o,_dll_mui__material as i,_dll_debug as s,_dll_mui__material_collapse as a,_dll_classnames as l,_dll_mui__icons_material as c,_dll_react_dom_client as d}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as u}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";import{_dll_pie_lib__drag as p}from"../../../@pie-lib/drag-module@5.0.0/module/index.js";var h="object"==typeof global&&global&&global.Object===Object&&global,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),m=f.Symbol,v=Object.prototype,b=v.hasOwnProperty,y=v.toString,x=m?m.toStringTag:void 0;var E=Object.prototype.toString;var C=m?m.toStringTag:void 0;function w(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":C&&C in Object(e)?function(e){var t=b.call(e,x),n=e[x];try{e[x]=void 0;var r=!0}catch(e){}var o=y.call(e);return r&&(t?e[x]=n:delete e[x]),o}(e):function(e){return E.call(e)}(e)}function S(e){return null!=e&&"object"==typeof e}function k(e){return"symbol"==typeof e||S(e)&&"[object Symbol]"==w(e)}var _=Array.isArray,A=m?m.prototype:void 0,R=A?A.toString:void 0;function O(e){if("string"==typeof e)return e;if(_(e))return function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(e,O)+"";if(k(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var D=/\s/;var T=/^\s+/;function L(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&D.test(e.charAt(t)););return t}(e)+1).replace(T,""):e}function N(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var j=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,I=/^0o[0-7]+$/i,M=parseInt;function $(e){if("number"==typeof e)return e;if(k(e))return NaN;if(N(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=N(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=L(e);var n=P.test(e);return n||I.test(e)?M(e.slice(2),n?2:8):j.test(e)?NaN:+e}function F(e){return e}function z(e){if(!N(e))return!1;var t=w(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var B,U=f["__core-js_shared__"],W=(B=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"";var H=Function.prototype.toString;function V(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var K=/^\[object .+?Constructor\]$/,q=Function.prototype,Y=Object.prototype,J=q.toString,G=Y.hasOwnProperty,X=RegExp("^"+J.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q(e){return!(!N(e)||(t=e,W&&W in t))&&(z(e)?X:K).test(V(e));var t}function Z(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Q(n)?n:void 0}var ee=Z(f,"WeakMap"),te=/^(?:0|[1-9]\d*)$/;function ne(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&te.test(e))&&e>-1&&e%1==0&&e<t}function re(e,t){return e===t||e!=e&&t!=t}function oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ie(e){return null!=e&&oe(e.length)&&!z(e)}var se=Object.prototype;function ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||se)}function le(e){return S(e)&&"[object Arguments]"==w(e)}var ce=Object.prototype,de=ce.hasOwnProperty,ue=ce.propertyIsEnumerable,pe=le(function(){return arguments}())?le:function(e){return S(e)&&de.call(e,"callee")&&!ue.call(e,"callee")};var he="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=he&&"object"==typeof module&&module&&!module.nodeType&&module,fe=ge&&ge.exports===he?f.Buffer:void 0,me=(fe?fe.isBuffer:void 0)||function(){return!1},ve={};ve["[object Float32Array]"]=ve["[object Float64Array]"]=ve["[object Int8Array]"]=ve["[object Int16Array]"]=ve["[object Int32Array]"]=ve["[object Uint8Array]"]=ve["[object Uint8ClampedArray]"]=ve["[object Uint16Array]"]=ve["[object Uint32Array]"]=!0,ve["[object Arguments]"]=ve["[object Array]"]=ve["[object ArrayBuffer]"]=ve["[object Boolean]"]=ve["[object DataView]"]=ve["[object Date]"]=ve["[object Error]"]=ve["[object Function]"]=ve["[object Map]"]=ve["[object Number]"]=ve["[object Object]"]=ve["[object RegExp]"]=ve["[object Set]"]=ve["[object String]"]=ve["[object WeakMap]"]=!1;var be,ye="object"==typeof exports&&exports&&!exports.nodeType&&exports,xe=ye&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=xe&&xe.exports===ye&&h.process,Ce=function(){try{var e=xe&&xe.require&&xe.require("util").types;return e||Ee&&Ee.binding&&Ee.binding("util")}catch(e){}}(),we=Ce&&Ce.isTypedArray,Se=we?(be=we,function(e){return be(e)}):function(e){return S(e)&&oe(e.length)&&!!ve[w(e)]},ke=Object.prototype.hasOwnProperty;function _e(e,t){var n=_(e),r=!n&&pe(e),o=!n&&!r&&me(e),i=!n&&!r&&!o&&Se(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!ke.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ne(c,l))||a.push(c);return a}var Ae=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Re=Ae,Oe=Object.prototype.hasOwnProperty;function De(e){if(!ae(e))return Re(e);var t=[];for(var n in Object(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Te(e){return ie(e)?_e(e):De(e)}var Le=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ne=/^\w*$/;function je(e,t){if(_(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!k(e))||(Ne.test(e)||!Le.test(e)||null!=t&&e in Object(t))}var Pe=Z(Object,"create");var Ie=Object.prototype.hasOwnProperty;var Me=Object.prototype.hasOwnProperty;function $e(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fe(e,t){for(var n=e.length;n--;)if(re(e[n][0],t))return n;return-1}$e.prototype.clear=function(){this.__data__=Pe?Pe(null):{},this.size=0},$e.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$e.prototype.get=function(e){var t=this.__data__;if(Pe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ie.call(t,e)?t[e]:void 0},$e.prototype.has=function(e){var t=this.__data__;return Pe?void 0!==t[e]:Me.call(t,e)},$e.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pe&&void 0===t?"__lodash_hash_undefined__":t,this};var ze=Array.prototype.splice;function Be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Be.prototype.clear=function(){this.__data__=[],this.size=0},Be.prototype.delete=function(e){var t=this.__data__,n=Fe(t,e);return!(n<0)&&(n==t.length-1?t.pop():ze.call(t,n,1),--this.size,!0)},Be.prototype.get=function(e){var t=this.__data__,n=Fe(t,e);return n<0?void 0:t[n][1]},Be.prototype.has=function(e){return Fe(this.__data__,e)>-1},Be.prototype.set=function(e,t){var n=this.__data__,r=Fe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Ue=Z(f,"Map");function We(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function He(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}He.prototype.clear=function(){this.size=0,this.__data__={hash:new $e,map:new(Ue||Be),string:new $e}},He.prototype.delete=function(e){var t=We(this,e).delete(e);return this.size-=t?1:0,t},He.prototype.get=function(e){return We(this,e).get(e)},He.prototype.has=function(e){return We(this,e).has(e)},He.prototype.set=function(e,t){var n=We(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ve(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Ve.Cache||He),n}Ve.Cache=He;var Ke=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qe=/\\(\\)?/g,Ye=function(e){var t=Ve(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ke,function(e,n,r,o){t.push(r?o.replace(qe,"$1"):n||e)}),t}),Je=Ye;function Ge(e,t){return _(e)?e:je(e,t)?[e]:Je(function(e){return null==e?"":O(e)}(e))}function Xe(e){if("string"==typeof e||k(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Qe(e,t){for(var n=0,r=(t=Ge(t,e)).length;null!=e&&n<r;)e=e[Xe(t[n++])];return n&&n==r?e:void 0}function Ze(e,t,n){var r=null==e?void 0:Qe(e,t);return void 0===r?n:r}function et(e){var t=this.__data__=new Be(e);this.size=t.size}et.prototype.clear=function(){this.__data__=new Be,this.size=0},et.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},et.prototype.get=function(e){return this.__data__.get(e)},et.prototype.has=function(e){return this.__data__.has(e)},et.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Be){var r=n.__data__;if(!Ue||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new He(r)}return n.set(e,t),this.size=n.size,this};var tt=Object.prototype.propertyIsEnumerable,nt=Object.getOwnPropertySymbols,rt=nt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(nt(e),function(t){return tt.call(e,t)}))}:function(){return[]};function ot(e){return function(e,t,n){var r=t(e);return _(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Te,rt)}var it=Z(f,"DataView"),st=Z(f,"Promise"),at=Z(f,"Set"),lt="[object Map]",ct="[object Promise]",dt="[object Set]",ut="[object WeakMap]",pt="[object DataView]",ht=V(it),gt=V(Ue),ft=V(st),mt=V(at),vt=V(ee),bt=w;(it&&bt(new it(new ArrayBuffer(1)))!=pt||Ue&&bt(new Ue)!=lt||st&&bt(st.resolve())!=ct||at&&bt(new at)!=dt||ee&&bt(new ee)!=ut)&&(bt=function(e){var t=w(e),n="[object Object]"==t?e.constructor:void 0,r=n?V(n):"";if(r)switch(r){case ht:return pt;case gt:return lt;case ft:return ct;case mt:return dt;case vt:return ut}return t});var yt=bt,xt=f.Uint8Array;function Et(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new He;++t<n;)this.add(e[t])}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wt(e,t){return e.has(t)}Et.prototype.add=Et.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Et.prototype.has=function(e){return this.__data__.has(e)};function St(e,t,n,r,o,i){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var u=-1,p=!0,h=2&n?new Et:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var g=e[u],f=t[u];if(r)var m=s?r(f,g,u,t,e,i):r(g,f,u,e,t,i);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!Ct(t,function(e,t){if(!wt(h,t)&&(g===e||o(g,e,n,r,i)))return h.push(t)})){p=!1;break}}else if(g!==f&&!o(g,f,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function kt(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function _t(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var At=m?m.prototype:void 0,Rt=At?At.valueOf:void 0;var Ot=Object.prototype.hasOwnProperty;var Dt="[object Arguments]",Tt="[object Array]",Lt="[object Object]",Nt=Object.prototype.hasOwnProperty;function jt(e,t,n,r,o,i){var s=_(e),a=_(t),l=s?Tt:yt(e),c=a?Tt:yt(t),d=(l=l==Dt?Lt:l)==Lt,u=(c=c==Dt?Lt:c)==Lt,p=l==c;if(p&&me(e)){if(!me(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new et),s||Se(e)?St(e,t,n,r,o,i):function(e,t,n,r,o,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new xt(e),new xt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return re(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=kt;case"[object Set]":var l=1&r;if(a||(a=_t),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var d=St(a(e),a(t),r,o,i,s);return s.delete(e),d;case"[object Symbol]":if(Rt)return Rt.call(e)==Rt.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var h=d&&Nt.call(e,"__wrapped__"),g=u&&Nt.call(t,"__wrapped__");if(h||g){var f=h?e.value():e,m=g?t.value():t;return i||(i=new et),o(f,m,n,r,i)}}return!!p&&(i||(i=new et),function(e,t,n,r,o,i){var s=1&n,a=ot(e),l=a.length;if(l!=ot(t).length&&!s)return!1;for(var c=l;c--;){var d=a[c];if(!(s?d in t:Ot.call(t,d)))return!1}var u=i.get(e),p=i.get(t);if(u&&p)return u==t&&p==e;var h=!0;i.set(e,t),i.set(t,e);for(var g=s;++c<l;){var f=e[d=a[c]],m=t[d];if(r)var v=s?r(m,f,d,t,e,i):r(f,m,d,e,t,i);if(!(void 0===v?f===m||o(f,m,n,r,i):v)){h=!1;break}g||(g="constructor"==d)}if(h&&!g){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}function Pt(e,t,n,r,o){return e===t||(null==e||null==t||!S(e)&&!S(t)?e!=e&&t!=t:jt(e,t,n,r,Pt,o))}function It(e){return e==e&&!N(e)}function Mt(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function $t(e){var t=function(e){for(var t=Te(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,It(o)]}return t}(e);return 1==t.length&&t[0][2]?Mt(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,s=!r;if(null==e)return!i;for(e=Object(e);o--;){var a=n[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var l=(a=n[o])[0],c=e[l],d=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var u=new et;if(r)var p=r(c,d,l,e,t,u);if(!(void 0===p?Pt(d,c,3,r,u):p))return!1}}return!0}(n,e,t)}}function Ft(e,t){return null!=e&&t in Object(e)}function zt(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=Ge(t,e)).length,i=!1;++r<o;){var s=Xe(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&oe(o)&&ne(s,o)&&(_(e)||pe(e))}(e,t,Ft)}function Bt(e){return je(e)?function(e){return function(t){return null==t?void 0:t[e]}}(Xe(e)):function(e){return function(t){return Qe(t,e)}}(e)}function Ut(e){return"function"==typeof e?e:null==e?F:"object"==typeof e?_(e)?(t=e[0],n=e[1],je(t)&&It(n)?Mt(Xe(t),n):function(e){var r=Ze(e,t);return void 0===r&&r===n?zt(e,t):Pt(n,r,3)}):$t(e):Bt(e);var t,n}var Wt,Ht=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[Wt?s:++r];if(!1===t(o[a],a,o))break}return e},Vt=Ht;function Kt(e,t){return e&&Vt(e,t,Te)}var qt=function(){return f.Date.now()},Yt=Math.max,Jt=Math.min;function Gt(e,t,n){var r,o,i,s,a,l,c=0,d=!1,u=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,i=o;return r=o=void 0,c=t,s=e.apply(i,n)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||u&&e-c>=i}function f(){var e=qt();if(g(e))return m(e);a=setTimeout(f,function(e){var n=t-(e-l);return u?Jt(n,i-(e-c)):n}(e))}function m(e){return a=void 0,p&&r?h(e):(r=o=void 0,s)}function v(){var e=qt(),n=g(e);if(r=arguments,o=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),d?h(e):s}(l);if(u)return clearTimeout(a),a=setTimeout(f,t),h(l)}return void 0===a&&(a=setTimeout(f,t)),s}return t=$(t)||0,N(n)&&(d=!!n.leading,i=(u="maxWait"in n)?Yt($(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=o=a=void 0},v.flush=function(){return void 0===a?s:m(qt())},v}var Xt=Object.prototype.hasOwnProperty;function Qt(){return Qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qt.apply(null,arguments)}function Zt(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function en(e,t){return en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},en(e,t)}function tn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,en(e,t)}function nn(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var rn=!1;var on=e.createContext(null),sn=function(e){return e.scrollTop};const an=e,ln=t;var cn="unmounted",dn="exited",un="entering",pn="entered",hn="exiting",gn=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=dn,r.appearStatus=un):o=pn:o=t.unmountOnExit||t.mountOnEnter?cn:dn,r.state={status:o},r.nextCallback=null,r}tn(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===cn?{status:dn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==un&&n!==pn&&(t=un):n!==un&&n!==pn||(t=hn)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===un){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this);n&&sn(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===dn&&this.setState({status:cn})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[ln.findDOMNode(this),r],i=o[0],s=o[1],a=this.getTimeouts(),l=r?a.appear:a.enter;!e&&!n||rn?this.safeSetState({status:pn},function(){t.props.onEntered(i)}):(this.props.onEnter(i,s),this.safeSetState({status:un},function(){t.props.onEntering(i,s),t.onTransitionEnd(l,function(){t.safeSetState({status:pn},function(){t.props.onEntered(i,s)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ln.findDOMNode(this);t&&!rn?(this.props.onExit(r),this.safeSetState({status:hn},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:dn},function(){e.props.onExited(r)})})})):this.safeSetState({status:dn},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],s=o[1];this.props.addEndListener(i,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===cn)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Zt(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return an.createElement(on.Provider,{value:null},"function"==typeof n?n(e,r):an.cloneElement(an.Children.only(n),r))},t}(an.Component);function fn(){}gn.contextType=on,gn.propTypes={},gn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fn,onEntering:fn,onEntered:fn,onExit:fn,onExiting:fn,onExited:fn},gn.UNMOUNTED=cn,gn.EXITED=dn,gn.ENTERING=un,gn.ENTERED=pn,gn.EXITING=hn;var mn=gn;const vn=e;var bn=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})},yn=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=nn(n.className,r):n.setAttribute("class",nn(n.className&&n.className.baseVal||"",r)));var n,r})},xn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}tn(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&sn(e),r&&(this.appliedClasses[t][n]=r,bn(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&yn(e,r),o&&yn(e,o),i&&yn(e,i)},n.render=function(){var e=this.props;e.classNames;var t=Zt(e,["classNames"]);return vn.createElement(mn,Qt({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(vn.Component);xn.defaultProps={classNames:""},xn.propTypes={};var En=xn;const{Children:Cn}=e,{cloneElement:wn}=e,{isValidElement:Sn}=e;function kn(e,t){var n=Object.create(null);return e&&Cn.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Sn(e)?t(e):e}(e)}),n}function _n(e,t,n){return null!=n[t]?n[t]:e.props[t]}function An(e,t,n){var r=kn(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var s in e)s in t?i.length&&(o[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];a[o[l][r]]=n(c)}a[l]=n(l)}for(r=0;r<i.length;r++)a[i[r]]=n(i[r]);return a}(t,r);return Object.keys(o).forEach(function(i){var s=o[i];if(Sn(s)){var a=i in t,l=i in r,c=t[i],d=Sn(c)&&!c.props.in;!l||a&&!d?l||!a||d?l&&a&&Sn(c)&&(o[i]=wn(s,{onExited:n.bind(null,s),in:c.props.in,exit:_n(s,"exit",e),enter:_n(s,"enter",e)})):o[i]=wn(s,{in:!1}):o[i]=wn(s,{onExited:n.bind(null,s),in:!0,exit:_n(s,"exit",e),enter:_n(s,"enter",e)})}}),o}const Rn=e;var On=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Dn=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}tn(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,kn(n.children,function(e){return wn(e,{onExited:r.bind(null,e),in:!0,appear:_n(e,"appear",n),enter:_n(e,"enter",n),exit:_n(e,"exit",n)})})):An(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=kn(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Qt({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Zt(e,["component","childFactory"]),o=this.state.contextValue,i=On(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Rn.createElement(on.Provider,{value:o},i):Rn.createElement(on.Provider,{value:o},Rn.createElement(t,r,i))},t}(Rn.Component);Dn.propTypes={},Dn.defaultProps={component:"div",childFactory:function(e){return e}};var Tn=Dn;const Ln=e,Nn=n,jn=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",Pn=({size:e,children:t})=>{const n={height:e=jn(e),width:e,display:"inline-block",position:"relative"};return Ln.createElement("div",{style:n},t)};Pn.propTypes={size:Nn.number,children:Nn.oneOfType([Nn.arrayOf(Nn.node),Nn.node]).isRequired};const In=e,Mn=n,$n=({size:e,children:t,sx:n})=>In.createElement(Pn,{size:e},In.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...n}},t));$n.propTypes={size:Mn.oneOfType([Mn.string,Mn.number]),children:Mn.oneOfType([Mn.arrayOf(Mn.node),Mn.node]).isRequired,sx:Mn.object},Mn.string.isRequired;const Fn=({fill:e})=>In.createElement("polygon",{transform:"translate(2, 0)",points:"34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3",fill:e});Fn.propTypes={fill:Mn.string.isRequired};const zn=({fill:e})=>In.createElement("path",{transform:"translate(1, 0)",d:"M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z",fill:e});zn.propTypes={fill:Mn.string.isRequired};const Bn=({fill:e})=>In.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});Bn.propTypes={fill:Mn.string.isRequired};const Un=({fill:e})=>In.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});Un.propTypes={fill:Mn.string.isRequired};const Wn=n,Hn=e;var Vn=(e,t)=>{class n extends Hn.Component{static __initStatic(){this.propTypes={iconSet:Wn.oneOf(["emoji","check"]),shape:Wn.oneOf(["round","square"]),category:Wn.oneOf(["feedback",void 0]),open:Wn.bool,size:Wn.oneOfType([Wn.number,Wn.string]),fg:Wn.string,bg:Wn.string}}static __initStatic2(){this.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,size:30,fg:"#4aaf46",bg:"#f8ffe2"}}render(){const{iconSet:n,shape:r,category:o,open:i,size:s,fg:a,bg:l}=this.props,c="check"===n?Hn.createElement(e,{fill:a}):Hn.createElement(t,{fill:a}),d="check"===n?Hn.createElement(e,{fill:l}):Hn.createElement(t,{fill:l});return i?Hn.createElement($n,{size:s},d):Hn.createElement($n,{size:s},"feedback"===o?"round"===r?Hn.createElement(zn,{fill:l}):Hn.createElement(Fn,{fill:l}):"round"===r?Hn.createElement(Bn,{fill:l}):Hn.createElement(Un,{fill:l}),c)}}return n.__initStatic(),n.__initStatic2(),n};const Kn=n,qn=e,Yn=({fill:e})=>qn.createElement("g",{transform:"translate(1, 0)"},qn.createElement("path",{d:"M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2 c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z",fill:e}),qn.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),qn.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));Yn.propTypes={fill:Kn.string.isRequired};const Jn=({fill:e,x:t=0,y:n=0})=>qn.createElement("polygon",{transform:`translate(${t}, ${n})`,points:"19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4",fill:e});Jn.propTypes={fill:Kn.string.isRequired,x:Kn.number,y:Kn.number};const Gn=Vn(Jn,Yn);Gn.propTypes={iconSet:Kn.oneOf(["emoji","check"]),shape:Kn.oneOf(["round","square"]),category:Kn.oneOf(["feedback",void 0]),open:Kn.bool,fg:Kn.string,bg:Kn.string,size:Kn.oneOfType([Kn.string,Kn.number])},Gn.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const Xn=n,Qn=e,{styled:Zn}=r,er=({bgFill:e,fgFill:t})=>Qn.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-283 359 34 35",style:{enableBackground:"new -283 359 34 35"}},Qn.createElement("circle",{cx:"-266",cy:"375.9",r:"14",fill:e}),Qn.createElement("path",{d:"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",fill:e}),Qn.createElement("polygon",{points:"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",fill:t}));er.propTypes={bgFill:Xn.string.isRequired,fgFill:Xn.string.isRequired};const tr=({bgFill:e,fgFill:t,borderFill:n})=>Qn.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-129.5 127 34 35",style:{enableBackground:"new -129.5 127 34 35"}},Qn.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"}),Qn.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"}),Qn.createElement("circle",{cx:"-114.2",cy:"143.5",r:"14",fill:e}),Qn.createElement("path",{d:"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",fill:n}),Qn.createElement("polygon",{points:"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",fill:t}));tr.propTypes={bgFill:Xn.string.isRequired,fgFill:Xn.string.isRequired,borderFill:Xn.string.isRequired};const nr=Zn("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),rr=({open:e,size:t})=>Qn.createElement(nr,{size:t},e?Qn.createElement(er,{bgFill:"#bce2ff",fgFill:"#1a9cff"}):Qn.createElement(tr,{bgFill:"white",fgFill:"#1a9cff",borderFill:"#bce2ff"}));rr.propTypes={open:Xn.bool,size:Xn.string},rr.defaultProps={open:!1};const or=n,ir=e,sr=({fill:e})=>ir.createElement("g",{transform:"translate(0.5, 0.5)"},ir.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",width:"16.6",height:"3.7",fill:e}),ir.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",width:"3.7",height:"16.6",fill:e}));sr.propTypes={fill:or.string.isRequired};const ar=({fill:e})=>ir.createElement("g",{transform:"translate(1,0)"},ir.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),ir.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),ir.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));ar.propTypes={fill:or.string.isRequired};const lr=Vn(sr,ar);lr.propTypes={iconSet:or.oneOf(["emoji","check"]),shape:or.oneOf(["round","square"]),category:or.oneOf(["feedback",void 0]),open:or.bool,fg:or.string,bg:or.string,size:or.oneOfType([or.string,or.number])},lr.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const cr=n,dr=e,ur=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return dr.createElement("g",null,dr.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),dr.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),dr.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},pr=({children:e,size:t})=>dr.createElement(Pn,{size:t},dr.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));pr.propTypes={children:cr.oneOfType([cr.arrayOf(cr.node),cr.node]).isRequired,size:cr.number};const hr=()=>dr.createElement("g",null,dr.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),dr.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),dr.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#7FABC6"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "})),gr=()=>dr.createElement("g",null,dr.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),dr.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),dr.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#1A9CFF"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "}));class fr extends dr.Component{constructor(e){super(e)}render(){return!0===this.props.open?dr.createElement(pr,null,dr.createElement(hr,null),dr.createElement(ur,null)):dr.createElement(pr,null,dr.createElement(gr,null),dr.createElement(ur,null))}}fr.propTypes={open:cr.bool},fr.defaultProps={open:!1};const mr=n,vr=e,br=({fill:e})=>vr.createElement("path",{fill:e,d:"M-130.4,142.1c0-2.1,1.7-3.9,3.9-3.9c0.3,0,0.5,0,0.8,0.1c-0.6-0.8-1.5-1.3-2.6-1.3c-1.8,0-3.3,1.5-3.3,3.3c0,1.1,0.5,2,1.3,2.6C-130.4,142.6-130.4,142.4-130.4,142.1z"});br.propTypes={fill:mr.string};class yr extends vr.Component{static __initStatic(){this.propTypes={classes:mr.object.isRequired,size:mr.number}}render(){const{size:e}=this.props;return!0===this.props.open?vr.createElement(Pn,{size:e},vr.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},vr.createElement("path",{fill:"#BCE2FF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),vr.createElement("path",{fill:"#BCE2FF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),vr.createElement(br,{fill:"#1A9CFF"}))):vr.createElement(Pn,{size:e},vr.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},vr.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-120.7,142.4c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-121.6,146-120.7,144.3-120.7,142.4z"}),vr.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-124.4,154.3h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-123.6,153.9-123.9,154.3-124.4,154.3z"}),vr.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-121.3,141.8c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.2,145.3-121.3,143.7-121.3,141.8z"}),",",vr.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-125,153.7h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.2,153.3-124.6,153.7-125,153.7z"}),vr.createElement("path",{fill:"#1A9CFF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),vr.createElement("path",{fill:"#1A9CFF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),vr.createElement(br,{fill:"1A9CFF"})))}}yr.__initStatic(),yr.propTypes={open:mr.bool},yr.defaultProps={open:!1};const xr=n,Er=e,Cr=({fill:e})=>Er.createElement("g",null,Er.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),Er.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));Cr.propTypes={fill:xr.string.isRequired};const wr=({fill:e})=>Er.createElement("polygon",{points:"14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5",fill:e});wr.propTypes={fill:xr.string.isRequired};const Sr=({fill:e})=>Er.createElement("g",null,Er.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),Er.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),Er.createElement("path",{d:"M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0 C25.7,26.4,25,27.1,24.2,27.1z",fill:e}));Sr.propTypes={fill:xr.string.isRequired};class kr extends Er.Component{constructor(e){super(e);const{fg:t="#464146",bg:n="white"}=this.props;this.icons={check:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Cr,{fill:t})),emoji:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Sr,{fill:t})),feedback:{check:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Sr,{fill:t})),emoji:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Sr,{fill:t})),square:{check:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Cr,{fill:t})),emoji:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Sr,{fill:t})),open:{check:Er.createElement($n,null,Er.createElement(Cr,{fill:n})),emoji:Er.createElement($n,null,Er.createElement(Sr,{fill:n}))}}}}}render(){const{iconSet:e,category:t,shape:n,open:r}=this.props;return void 0===t?this.icons[e]:void 0===n?this.icons.feedback[e]:!0===r?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}kr.propTypes={iconSet:xr.oneOf(["emoji","check",void 0]),shape:xr.oneOf(["square",void 0]),category:xr.oneOf(["feedback",void 0]),open:xr.bool,fg:xr.string,bg:xr.string},kr.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const _r=n,Ar=e,Rr=({fill:e})=>Ar.createElement("g",{transform:"translate(0, 0)"},Ar.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),Ar.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));Rr.propTypes={fill:_r.string.isRequired};const Or=({fill:e})=>Ar.createElement("g",{transform:"translate(2, 0)"},Ar.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),Ar.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),Ar.createElement("rect",{x:"10.9",y:"22.9",transform:"matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)",width:"14.3",height:"3.7",fill:e}));Or.propTypes={fill:_r.string.isRequired};const Dr=Vn(Rr,Or);Dr.propTypes={iconSet:_r.oneOf(["emoji","check"]),shape:_r.oneOf(["round","square"]),category:_r.oneOf(["feedback",void 0]),open:_r.bool,fg:_r.string,bg:_r.string,size:_r.oneOfType([_r.string,_r.number])},Dr.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const Tr=n,Lr=e,Nr=({fill:e})=>Lr.createElement("g",null,Lr.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),Lr.createElement("polygon",{points:"-112,147.7 -112,141.7 -115.8,141.7 -115.8,143.7 -114,143.7 -114,147.7 -116.2,147.7 -116.2,149.7 -109.8,149.7 -109.8,147.7",fill:e}));Nr.propTypes={fill:Tr.string.isRequired};const jr=({fill:e})=>Lr.createElement("path",{d:"M-113,158.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105,158.5-113,158.5z M-113,130.5c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-105.6,130.5-113,130.5z",fill:e});jr.propTypes={fill:Tr.string.isRequired};const Pr=({fill:e="#FFFFFF"})=>Lr.createElement("g",null,Lr.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-111.7,160.9c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5C-96.2,154-103.1,160.9-111.7,160.9z"}),Lr.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-112,159.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-104,159.5-112,159.5z"}),Lr.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));Pr.propTypes={fill:Tr.string};const Ir=({children:e,size:t})=>{const n=jn(t),r={height:n,width:n,display:"inline-block",position:"relative"};return Lr.createElement("div",{style:r},Lr.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};Ir.propTypes={children:Tr.oneOfType([Tr.arrayOf(Tr.node),Tr.node]).isRequired,size:Tr.oneOfType([Tr.string,Tr.number])};class Mr extends Lr.Component{render(){const{iconSet:e,open:t,fg:n="#1a9cff",bg:r="#bce2ff",border:o="#bbe3fd"}=this.props,i=Lr.createElement(Nr,{fill:n}),s={check:Lr.createElement(Ir,{size:this.props.size},Lr.createElement(Pr,null),i,Lr.createElement(jr,{fill:o})),emoji:Lr.createElement(Ir,{size:this.props.size},Lr.createElement(Pr,null),i,Lr.createElement(jr,{fill:o})),open:{check:Lr.createElement(Ir,{size:this.props.size},Lr.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Lr.createElement(Nr,{fill:r}),Lr.createElement(jr,{fill:"#FFFFFF"})),emoji:Lr.createElement(Ir,{size:this.props.size},Lr.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Lr.createElement(Nr,{fill:r}),Lr.createElement(jr,{fill:o}))}};return!0===t?s.open[e]:s[e]}}Mr.propTypes={iconSet:Tr.oneOf(["emoji","check"]),open:Tr.bool,fg:Tr.string,bg:Tr.string,border:Tr.string,size:Tr.oneOfType([Tr.string,Tr.number])},Mr.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};const{green:$r}=o,{indigo:Fr}=o,{orange:zr}=o,{pink:Br}=o,{red:Ur}=o,Wr={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:$r[500],CORRECT_SECONDARY:$r[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:zr[500],INCORRECT_SECONDARY:Ur[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:Ur[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:Fr[500],PRIMARY_LIGHT:Fr[200],PRIMARY_DARK:Fr[800],SECONDARY:Br.A400,SECONDARY_LIGHT:Br[200],SECONDARY_DARK:Br[900],TERTIARY:"#146EB3",TERTIARY_LIGHT:"#D0E2F0",BACKGROUND:"rgba(255,255,255,0)",BACKGROUND_DARK:"#ECEDF1",DROPDOWN_BACKGROUND:"#E0E1E6",SECONDARY_BACKGROUND:"rgba(241,241,241,1)",BORDER:"#9A9A9A",BORDER_LIGHT:"#D1D1D1",BORDER_DARK:"#646464",BORDER_GRAY:"#7E8494",TABLE_GRID:"black",TABLE_GRID_LIGHT:"#dfe2e5",TABLE_STRIPE:"#f6f8fa",BLACK:"#000000",WHITE:"#ffffff",TRANSPARENT:"transparent",FOCUS_CHECKED:"#BBDEFB",FOCUS_CHECKED_BORDER:"#1565C0",FOCUS_UNCHECKED:"#E0E0E0",FOCUS_UNCHECKED_BORDER:"#757575",BUTTON_FOCUS_OUTLINE:"#3B82F6",BLUE_GREY100:"#F3F5F7",BLUE_GREY300:"#C0C3CF",BLUE_GREY600:"#7E8494",BLUE_GREY900:"#152452",FADED_PRIMARY:"#DCDAFB",KEYPAD_BUTTON:"rgb(188, 194, 229)",KEYPAD_BUTTON_OPERATOR:"rgb(255, 159, 192)",KEYPAD_EMPTY_PLACEHOLDER:"rgba(245, 0, 87, 0.4)",KEYPAD_BUTTON_HOVER:"rgb(214, 218, 239)",KEYPAD_BUTTON_OPERATOR_HOVER:"rgb(255, 197, 217)",KEY_BOARD_FOCUS_INDICATOR:"#2B87FF",BUTTON_BORDER:"rgba(0, 0, 0, 0.23)",BUTTON_HOVER_BG:"rgba(0, 0, 0, 0.08)"};Object.freeze(Wr);const Hr=(Vr="pie",(...e)=>{const t=e.pop();return e.reduceRight((e,t)=>`var(--${Vr}-${t}, ${e})`,t)});var Vr;const Kr=()=>Hr("text",Wr.TEXT),qr=()=>Hr("correct",Wr.CORRECT),Yr=()=>Hr("incorrect",Wr.INCORRECT),Jr=()=>Hr("incorrect-icon",Wr.INCORRECT_WITH_ICON),Gr=()=>Hr("background",Wr.BACKGROUND),Xr=()=>Hr("dropdown-background",Wr.DROPDOWN_BACKGROUND),Qr=()=>Hr("tertiary",Wr.TERTIARY),Zr=()=>Hr("table-stripe","background-dark",Wr.TABLE_STRIPE),eo=()=>Hr("white",Wr.WHITE),to=e,no=n,{styled:ro}=r,oo=ro("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),io=ro("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${Hr("disabled",Wr.DISABLED)})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${qr()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${Yr()})`}}),so=ro("div")({"&.feedback-enter":{height:"1px"},"&.feedback-enter-active":{height:"45px",transition:"height 500ms"},"&.feedback-exit":{height:"45px"},"&.feedback-exit-active":{height:"1px",transition:"height 200ms"}});class ao extends to.Component{constructor(...e){super(...e),ao.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:no.string,feedback:no.string}}__init(){this.nodeRef=to.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?to.createElement(En,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},to.createElement(so,{ref:this.nodeRef},to.createElement(oo,null,to.createElement(io,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return to.createElement("div",null,to.createElement(Tn,null,this.renderFeedback()))}}ao.__initStatic();const lo=e,co=n,{Popover:uo}=i,{styled:po}=r,ho=s("pie-libs:render-ui:response-indicators"),go=po("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),fo=po(uo)({cursor:"pointer"}),mo=po("div")({padding:"0",borderRadius:"4px"}),vo=(e,t)=>{class n extends lo.Component{constructor(e){super(e),n.prototype.__init.call(this),n.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{ho("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:n}=this.props,{anchorEl:r}=this.state;return lo.createElement(go,{hasFeedback:!!n},lo.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},lo.createElement(e,null)),n&&lo.createElement(fo,{PaperComponent:mo,open:!!r,anchorEl:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},lo.createElement(ao,{feedback:n,correctness:t})))}}return n.propTypes={feedback:co.string},n};vo(Gn,"correct"),vo(lr,"incorrect"),vo(Dr,"partially-correct"),vo(kr,"nothing-submitted");const bo=e,{styled:yo}=r,xo=a,Eo=n,{renderMath:Co}=u,wo=yo("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),So=yo(xo)(({theme:e})=>({paddingTop:e.spacing(2)}));class ko extends bo.Component{constructor(...e){super(...e),ko.prototype.__init.call(this),ko.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:Eo.string,children:Eo.object,labels:Eo.shape({visible:Eo.string,hidden:Eo.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){Co(this.root)}componentDidUpdate(){Co(this.root)}render(){const{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return bo.createElement("div",{className:n,ref:e=>this.root=e},bo.createElement("div",{onClick:this.toggleExpanded},bo.createElement(wo,null,r)),bo.createElement(So,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}ko.__initStatic(),ko.__initStatic2();const{Button:_o}=i,{styled:Ao}=r;Ao("div")({display:"flex",flexDirection:"column"}),Ao("div")({display:"flex",alignItems:"center",justifyContent:"center"}),Ao("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),Ao(_o)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const Ro=e,{createTheme:Oo}=r,{styled:Do}=r,{StyledEngineProvider:To}=r,{ThemeProvider:Lo}=r,No=n;const jo=Oo({typography:{fontFamily:"inherit"},palette:{action:{disabled:"rgba(0, 0, 0, 0.54);"}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:"inherit"}}},MuiButton:{styleOverrides:{contained:{backgroundColor:"#e0e0e0",color:"#000000","&:hover":{backgroundColor:"#bdbdbd"}}}}}}),Po=Do("div")({"& table, th, td":{fontSize:"inherit"}});class Io extends Ro.Component{static __initStatic(){this.propTypes={className:No.string,children:No.array,extraCSSRules:No.shape({names:No.arrayOf(No.string),rules:No.string}),fontSizeFactor:No.number}}static __initStatic2(){this.defaultProps={extraCSSRules:{},fontSizeFactor:1}}constructor(e){super(e),this.classesSheet=document.createElement("style")}computeStyle(e){const t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),o=Math.max(n,r),i=null!=e&&"number"==typeof e?e:1;return 1!==i?{fontSize:o*i+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:o,...i}=r,s=this.computeStyle(n);return Ro.createElement(To,{injectFirst:!0},Ro.createElement(Lo,{theme:jo},function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([o,"optionalAccess",e=>e.rules])?Ro.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${o.rules} }`}}):null,Ro.createElement(Po,{className:`${t} extraCSSRules`,...i,...s&&{style:s}},e)))}}Io.__initStatic(),Io.__initStatic2();const Mo=e,{styled:$o}=r,Fo=n,zo=$o(Io)({display:"flex",flexDirection:"column",position:"relative"});class Bo extends Mo.Component{static __initStatic(){this.propTypes={ariaLabel:Fo.string,children:Fo.oneOfType([Fo.arrayOf(Fo.node),Fo.node]).isRequired,role:Fo.string,extraCSSRules:Fo.shape({names:Fo.arrayOf(Fo.string),rules:Fo.string}),fontSizeFactor:Fo.number}}render(){const{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:o,classes:i}=this.props,s=t?{"aria-label":t,role:n}:{};return Mo.createElement(zo,{...s,extraCSSRules:r,fontSizeFactor:o,classes:i},e)}}Bo.__initStatic();const Uo=e,Wo=n;class Ho extends Uo.Component{static __initStatic(){this.propTypes={tag:Wo.string,className:Wo.string,html:Wo.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:n}=this.props,r=e||"div";return Uo.createElement(r,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}}Ho.__initStatic(),Ho.__initStatic2();const{InputLabel:Vo}=i,{FormControl:Ko}=i,qo=n,{styled:Yo}=r;Yo(Ko)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),Yo(Vo)(()=>({fontSize:"inherit",whiteSpace:"nowrap",margin:0,padding:0,alignSelf:"flex-start",position:"absolute",top:0,left:0,transformOrigin:"top left",pointerEvents:"none","&.MuiInputLabel-shrink":{transform:"scale(0.75) translate(0, -0.75em)"},"&:not(.MuiInputLabel-shrink)":{transform:"translate(0, 0)"}})),qo.oneOfType([qo.string,qo.object]).isRequired,qo.string,qo.oneOfType([qo.arrayOf(qo.node),qo.node]).isRequired;const Jo=e,{Component:Go}=e,{styled:Xo}=r,Qo=n,{renderMath:Zo}=u,ei=Xo("div")(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:"collapse"},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:"solid",borderColor:Hr("table-grid","text",Wr.TABLE_GRID)},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:Zr()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:Zr()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:".6em 1em",textAlign:"left"},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:"initial"},"&.prompt":{verticalAlign:"middle",color:Kr()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Kr()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),ti=/\\embed\{newLine\}\[\]/g;class ni extends Go{constructor(...e){super(...e),ni.prototype.__init.call(this),ni.prototype.__init2.call(this)}static __initStatic(){this.propTypes={prompt:Qo.string,tagName:Qo.string,className:Qo.string,onClick:Qo.func,defaultClassName:Qo.string,autoplayAudioEnabled:Qo.bool,customAudioButton:{playImage:Qo.string,pauseImage:Qo.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.promptRef=Jo.createRef()}__init2(){this.parsedText=e=>{const{customAudioButton:t}=this.props,n=document.createElement("div");n.innerHTML=e;const r=n.querySelector("audio");if(r){const e=document.createElement("source");if(e.setAttribute("type","audio/mp3"),e.setAttribute("src",r.getAttribute("src")),r.removeAttribute("src"),r.setAttribute("id","pie-prompt-audio-player"),r.appendChild(e),t){r.style.display="none";const e=document.createElement("div");e.id="play-audio-button",Object.assign(e.style,{cursor:"pointer",display:"block",width:"128px",height:"128px",backgroundImage:`url(${t.pauseImage})`,backgroundSize:"cover",borderRadius:"50%",border:"1px solid #326295"}),r.parentNode.insertBefore(e,r)}}return n.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById("play-audio-button"),r=document.getElementById("pie-prompt-audio-player");if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener("ended",i)}).catch(e=>{console.error("Error playing audio",e)}),!n||!r||!t)return;const o=()=>{r.paused&&(n.style.backgroundImage.includes(t.pauseImage)||r.play())},i=()=>{n.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},a=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};n.addEventListener("click",o),r.addEventListener("play",s),r.addEventListener("pause",a),r.addEventListener("ended",i),this._handlePlayClick=o,this._handleAudioPlay=s,this._handleAudioPause=a,this._handleAudioEnded=i}removeCustomAudioButtonListeners(){const e=document.getElementById("play-audio-button"),t=document.querySelector("audio");e&&t&&(e.removeEventListener("click",this._handlePlayClick),t.removeEventListener("play",this._handleAudioPlay),t.removeEventListener("pause",this._handleAudioPause),t.removeEventListener("ended",this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){const e=this.promptRef.current;e&&"function"==typeof Zo&&Zo(e)}alignImages(){const e=this.promptRef.current;if(!e)return;const t=e.getElementsByTagName("img");if(t&&t.length)for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){const t=e.attributes.alignment.value,n="center"===t?"center":"right"===t?"flex-end":"flex-start",r=e.parentElement;if("DIV"===r.tagName&&"flex"===r.style.display&&"100%"===r.style.width)r.style.justifyContent=n;else{const t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent=n;const o=e.cloneNode(!0);t.appendChild(o),r.replaceChild(t,e)}}}render(){const{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:o}=this.props,i=`${n||""} ${o||""} ${"legend"===t?"legend":""} preview-prompt`.trim();return Jo.createElement(ei,{as:t||"div",ref:this.promptRef,onClick:r,className:i,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(ti,"\\newline ")}})}}ni.__initStatic(),ni.__initStatic2();const ri=n,oi=e,ii=e=>oi.createElement(oi.Fragment,null,oi.Children.map(e.children,t=>oi.cloneElement(t,{"data-pie-readable":void 0===e.false})));ii.propTypes={children:ri.node,false:ri.bool};const si=n;let ai;si.node,si.string,"undefined"!=typeof window&&(ai=new DOMParser);const li=e=>{if(!e)return!1;const t=(e=>ai.parseFromString(e,"text/html").body.textContent)(e);return!(!t||!t.trim())};let ci;"undefined"!=typeof window&&(ci=new DOMParser);const di=e=>{if(!e)return!1;const t=ci.parseFromString(e,"text/html");return!!t.body.querySelector("img")||!!t.body.querySelector("video")||!!t.body.querySelector("audio")},ui=e,{useRef:pi}=e,hi=n,{styled:gi}=r,fi="height ease-in 300ms, opacity ease-in 300ms",mi=gi("div")(()=>({position:"relative",height:0,overflow:"hidden",display:"flex",visibility:"hidden",width:0,"&.enter":{transition:fi,opacity:1,height:"auto",width:"auto",visibility:"visible",minHeight:"25px"},"&.enter-done":{height:"auto",visibility:"visible",width:"auto",minHeight:"25px"},"&.exit":{transition:fi,opacity:0,height:0,visibility:"visible",width:0},"&.exit-done":{opacity:0,visibility:"hidden",height:0,width:0}})),vi=e=>{const{show:t,children:n,className:r}=e,o=pi(null);return ui.createElement(En,{nodeRef:o,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:"enter",enterDone:"enter-done",exit:"exit",exitDone:"exit-done"}},ui.createElement(mi,{ref:o,className:r},n))};function bi(e,t){return null!=e?e:t()}function yi(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}vi.propTypes={show:hi.bool.isRequired,className:hi.string,children:hi.oneOfType([hi.arrayOf(hi.node),hi.node]).isRequired};const xi=e=>"string"==typeof e,Ei=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ci=e=>null==e?"":""+e,wi=/###/g,Si=e=>e&&e.indexOf("###")>-1?e.replace(wi,"."):e,ki=e=>!e||xi(e),_i=(e,t,n)=>{const r=xi(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(ki(e))return{};const t=Si(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return ki(e)?{}:{obj:e,k:Si(r[o])}},Ai=(e,t,n)=>{const{obj:r,k:o}=_i(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],s=t.slice(0,t.length-1),a=_i(e,s,Object);for(;void 0===a.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=_i(e,s,Object),yi([a,"optionalAccess",e=>e.obj])&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},Ri=(e,t)=>{const{obj:n,k:r}=_i(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Oi=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?xi(e[r])||e[r]instanceof String||xi(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Oi(e[r],t[r],n):e[r]=t[r]);return e},Di=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ti={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Li=e=>xi(e)?e.replace(/[&<>"'\/]/g,e=>Ti[e]):e;const Ni=[" ",",","?","!",";"],ji=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const 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}}(20),Pi=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let s=e;s<r.length;++s)if(s!==e&&(i+=n),i+=r[s],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<r.length-1)continue;e+=s-e+1;break}o=t}return o},Ii=e=>yi([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),Mi={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){yi([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class $i{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Mi,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:(xi(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new $i(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new $i(this.logger,e)}}var Fi=new $i;class zi{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}}class Bi extends zi{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):xi(n)&&o?s.push(...n.split(o)):s.push(n)));const a=Ri(this.data,s);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=s[0],t=s[1],n=s.slice(2).join(".")),!a&&i&&xi(n)?Pi(yi([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),n,o):a}addResource(e,t,n,r,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),Ai(this.data,s,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(xi(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,o,i={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=Ri(this.data,s)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Oi(a,n,o):a={...a,...n},Ai(this.data,s,a),i.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 void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Ui={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=bi(yi([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,n,r,o)]),()=>t)}),t}};const Wi=Symbol("i18next/PATH_KEY");function Hi(e,t){const{[Wi]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(yi([n,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),o===Wi?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(bi(yi([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const Vi={},Ki=e=>!xi(e)&&"boolean"!=typeof e&&"number"!=typeof e;class qi extends zi{constructor(e,t={}){var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Fi.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===yi([r,"optionalAccess",e=>e.res]))return!1;const o=Ki(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Ni.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=ji.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:xi(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:xi(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Hi(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],r),l=a[a.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const d=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===yi([d,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return u?o?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${s}`:o?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:s;const p=this.resolve(e,r);let h=yi([p,"optionalAccess",e=>e.res]);const g=yi([p,"optionalAccess",e=>e.usedKey])||s,f=yi([p,"optionalAccess",e=>e.exactUsedKey])||s,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!xi(r.count),y=qi.hasDefaultValue(r),x=b?this.pluralResolver.getSuffix(d,r.count,r):"",E=r.ordinal&&b?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",C=b&&!r.ordinal&&0===r.count,w=C&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${E}`]||r.defaultValue;let S=h;v&&!h&&y&&(S=w);const k=Ki(S),_=Object.prototype.toString.apply(S);if(!(v&&S&&k&&["[object Number]","[object Function]","[object RegExp]"].indexOf(_)<0)||xi(m)&&Array.isArray(S))if(v&&xi(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(h)&&y&&(t=!0,h=w),this.isValidLookup(h)||(o=!0,h=s);const a=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:h,u=y&&w!==h&&this.options.updateMissing;if(o||t||u){if(this.logger.log(u?"updateKey":"missingKey",d,l,s,u?w:h),i){const e=this.resolve(s,{...r,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=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const o=y&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,u,r):yi([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,l,t,o,u,r),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);C&&r[`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,r[`defaultValue${t}`]||w)})}):n(e,s,w))}h=this.extendTranslation(h,e,r,p,n),o&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${l}${c}${s}`),(o||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,t?h:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,S,{...r,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(i){const e=Array.isArray(S),t=e?[]:{},n=e?f:g;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const o=`${n}${i}${e}`;t[e]=y&&!h?this.translate(o,{...r,defaultValue:Ki(w)?w[e]:void 0,joinArrays:!1,ns:a}):this.translate(o,{...r,joinArrays:!1,ns:a}),t[e]===o&&(t[e]=S[e])}h=t}}return o?(p.res=h,p.usedParams=this.getUsedParamsDetails(r),p):h}extendTranslation(e,t,n,r,o){if(yi([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.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}});const i=xi(e)&&(void 0!==yi([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(i){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let a=n.replace&&!xi(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,n.lng||this.language||r.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>yi([o,"optionalAccess",e=>e[0]])!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,s=xi(i)?[i]:i;return null!=e&&yi([s,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=Ui.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,s;return xi(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const a=this.extractFromKey(e,t),l=a.key;r=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const d=void 0!==t.count&&!xi(t.count),u=d&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(xi(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(s=e,Vi[`${h[0]}-${e}`]||!yi([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||yi([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(s)])||(Vi[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${s}" 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!!!")),h.forEach(r=>{if(this.isValidLookup(n))return;i=r;const s=[l];if(yi([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(s,l,r,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),u&&s.push(l+n)),p){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(r),d&&(t.ordinal&&0===e.indexOf(o)&&s.push(r+e.replace(o,this.options.pluralSeparator)),s.push(r+e),u&&s.push(r+n))}}let a;for(;a=s.pop();)this.isValidLookup(n)||(o=a,n=this.getResource(r,e,a,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return yi([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!xi(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class Yi{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Fi.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Ii(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Ii(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(xi(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}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("languageOnly"===this.options.load||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;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),xi(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return xi(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):xi(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const Ji={zero:0,one:1,two:2,few:3,many:4,other:5},Gi={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Xi{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Fi.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Ii("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Gi;if(!e.match(/-|_/))return Gi;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),yi([n,"optionalAccess",e=>e.resolvedOptions,"call",e=>e(),"access",e=>e.pluralCategories,"access",e=>e.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||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Ji[e]-Ji[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const 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))}}const Qi=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=Ri(e,n);return void 0!==r?r:Ri(t,n)})(e,t,n);return!i&&o&&xi(n)&&(i=Pi(e,n,r),void 0===i&&(i=Pi(t,n,r))),i},Zi=e=>e.replace(/\$/g,"$$$$");class es{constructor(e={}){this.logger=Fi.create("interpolator"),this.options=e,this.format=yi([e,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.format])||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:u,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Li,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Di(o):i||"{{",this.suffix=s?Di(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?Di(u):p||Di("$t("),this.nestingSuffix=h?Di(h):g||Di(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>yi([e,"optionalAccess",e=>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 o,i,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Qi(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),s=o.join(this.formatSeparator).trim();return this.format(Qi(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const c=yi([r,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,d=void 0!==yi([r,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Zi(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Zi(this.escape(e)):Zi(e)}].forEach(t=>{for(s=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,r);i=xi(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(d){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else xi(i)||this.useRawValueToEscape||(i=Ci(i));const a=t.safeValue(i);if(e=e.replace(o[0],a),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i;const s=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const s=o.match(/'/g),a=o.match(/"/g);(bi(yi([s,"optionalAccess",e=>e.length]),()=>0)%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let a=[];i={...n},i=i.replace&&!xi(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(a=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),o=t(s.call(this,r[1].trim(),i),i),o&&r[0]===e&&!xi(o))return o;xi(o)||(o=Ci(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),a.length&&(o=a.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}const ts=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Ii(r),o),t[s]=a),a(n)}},ns=e=>(t,n,r)=>e(Ii(n),r)(t);class rs{constructor(e={}){this.logger=Fi.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?ts:ns;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const 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()]=ts(t)}format(e,t,n,r={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const s=yi([r,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[r.interpolationkey]])||{},a=s.locale||s.lng||r.locale||r.lng||n;t=this.formats[o](e,a,{...i,...r,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class os extends zi{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Fi.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=[],yi([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(n,r.backend,r)])}queueLoad(e,t,n,r){const o={},i={},s={},a={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,r=!1,void 0===i[s]&&(i[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=_i(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}}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();xi(e)&&(e=this.languageUtils.toResolveHierarchy(e)),xi(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.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=""){const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},s=()=>{}){if(!yi([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||yi([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(yi([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const a={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,n,r,a):l(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>s(null,e)).catch(s):s(null,o)}catch(e){s(e)}else l(e,t,n,r,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else 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!!!")}}const is=()=>({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("object"==typeof e[1]&&(t=e[1]),xi(e[1])&&(t.defaultValue=e[1]),xi(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const 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}),ss=e=>(xi(e.ns)&&(e.ns=[e.ns]),xi(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),xi(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),yi([e,"access",e=>e.supportedLngs,"optionalAccess",e=>e.indexOf,"optionalCall",e=>e("cimode")])<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),as=()=>{};class ls extends zi{constructor(e={},t){var n;if(super(),this.options=ss(e),this.services={},this.logger=Fi,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),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,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(xi(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=is();var r;this.options={...n,...this.options,...ss(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(yi([r=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||yi([r,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||yi([r,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&r.options.backend.backends.some(e=>yi([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||yi([e,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0))||"undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Fi.init(o(this.modules.logger),this.options):Fi.init(null,this.options),e=this.modules.formatter?this.modules.formatter:rs;const t=new Yi(this.options);this.store=new Bi(this.options.resources,this.options);const r=this.services;r.logger=Fi,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new Xi(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||(r.formatter=o(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new es(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new os(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new qi(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||(t=as),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(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)});const i=Ei(),s=()=>{const 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?s():setTimeout(s,0),i}loadResources(e,t=as){let n=t;const r=xi(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===yi([r,"optionalAccess",e=>e.toLowerCase,"call",e=>e()])&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}yi([this,"access",e=>e.options,"access",e=>e.preload,"optionalAccess",e=>e.forEach,"optionalCall",e=>e(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){const r=Ei();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=as),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ui.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&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++){const 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;const n=Ei();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=xi(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(xi(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),yi([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(i)])),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const s=this.options.keySeparator||".";let a;return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=Hi(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=Hi(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return xi(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return yi([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return yi([this,"access",e=>e.translator,"optionalAccess",e=>e.exists,"call",t=>t(...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;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=Ei();return this.options.ns?(xi(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){const n=Ei();xi(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(yi([this,"access",e=>e.languages,"optionalAccess",e=>e.length])>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=yi([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new Yi(is());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new ls(e,t);return n.createInstance=ls.createInstance,n}cloneInstance(e={},t=as){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new ls(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=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),{});o.store=new Bi(e,r),o.services.resourceStore=o.store}if(e.interpolation){const t={...is().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};o.services.interpolator=new es(n)}return o.translator=new qi(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const cs=ls.createInstance();cs.createInstance,cs.dir,cs.init,cs.loadResources,cs.reloadResources,cs.use,cs.changeLanguage,cs.getFixedT,cs.t,cs.exists,cs.setDefaultNamespace,cs.hasLoadedNamespace,cs.loadNamespaces,cs.loadLanguages;cs.init({fallbackLng:"en",lng:"en",debug:!0,resources:{en:{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."},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"}},common:{undo:"Undo",clearAll:"Clear all",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Show correct answer",hideCorrectAnswer:"Hide correct answer",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"}},es:{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."},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"}},common:{undo:"Deshacer",clearAll:"Borrar todo",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Mostrar respuesta correcta",hideCorrectAnswer:"Ocultar respuesta correcta",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"}}}});var ds={translator:{...cs,t:(e,t)=>{const{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"}return cs.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]};const{styled:us}=r,ps=e,hs=n;const{translator:gs}=ds,fs={"-webkit-touchCcallout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},ms=us("div")(()=>({width:"100%",cursor:"pointer"})),vs=us("div")(()=>({margin:"0 auto",textAlign:"center",display:"flex"})),bs=us("div")(()=>({width:"fit-content",minWidth:"140px",alignSelf:"center",verticalAlign:"middle",color:`var(--correct-answer-toggle-label-color, ${Kr()})`,fontWeight:"normal",...fs})),ys=us("div")(()=>({position:"absolute",width:"25px","&.enter":{opacity:"0"},"&.enter-active":{opacity:"1",transition:"opacity 0.3s ease-in"},"&.exit":{opacity:"1"},"&.exit-active":{opacity:"0",transition:"opacity 0.3s ease-in"}})),xs=us("div")(()=>({width:"25px",marginRight:"5px",display:"flex",alignItems:"center"}));class Es extends ps.Component{static __initStatic(){this.propTypes={onToggle:hs.func,toggled:hs.bool,show:hs.bool,hideMessage:hs.string,showMessage:hs.string,className:hs.string,language:hs.string}}static __initStatic2(){this.defaultProps={showMessage:"Show correct answer",hideMessage:"Hide correct answer",show:!1,toggled:!1}}constructor(e){super(e),this.state={show:e.show},this.openIconRef=ps.createRef(),this.closedIconRef=ps.createRef(),Es.defaultProps={...Es.defaultProps,showMessage:gs.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:gs.t("common:hideCorrectAnswer",{lng:e.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(e){this.setState({show:e.show}),e.language!==function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e.props,"optionalAccess",e=>e.language])&&(Es.defaultProps={...Es.defaultProps,showMessage:gs.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:gs.t("common:hideCorrectAnswer",{lng:e.language})})}render(){const{className:e,toggled:t,hideMessage:n,showMessage:r}=this.props;return ps.createElement(ms,{className:e},ps.createElement(vi,{show:this.state.show},ps.createElement(vs,{onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this)},ps.createElement(xs,null,ps.createElement(En,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},ps.createElement(ys,{ref:this.openIconRef},ps.createElement(rr,{open:t,key:"correct-open"}))),ps.createElement(En,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},ps.createElement(ys,{ref:this.closedIconRef},ps.createElement(rr,{open:t,key:"correct-closed"})))),ps.createElement(ii,{false:!0},ps.createElement(bs,{"aria-hidden":!this.state.show},t?n:r)))))}}Es.__initStatic(),Es.__initStatic2();var Cs,ws={"border-radius":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"box-shadow":1,order:1,flex:function(e,t){return[t+"box-flex"]},"box-flex":1,"box-align":1,animation:1,"animation-duration":1,"animation-name":1,transition:1,"transition-duration":1,transform:1,"transform-style":1,"transform-origin":1,"backface-visibility":1,perspective:1,"box-pack":1},Ss={animation:1,"column-count":1,columns:1,"font-weight":1,opacity:1,"order ":1,"z-index":1,zoom:1,flex:1,"box-flex":1,transform:1,perspective:1,"box-pack":1,"box-align":1,colspan:1,rowspan:1},ks=function(e){return e.length?e.charAt(0).toUpperCase()+e.substring(1):e},_s=ks,As=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,Rs="undefined"==typeof document?{}:document.documentElement.style,Os=function(){var e=function(){for(var e in Rs)if(As.test(e))return e.match(As)[0];return"WebkitOpacity"in Rs?"Webkit":"KhtmlOpacity"in Rs?"Khtml":""}(),t=e.toLowerCase();return{style:e,css:"-"+t+"-",dom:{Webkit:"WebKit",ms:"MS",o:"WebKit"}[e]||_s(e)}}(),Ds=function(e,t){return t?t.toUpperCase():""},Ts=/[-\s]+(.)?/g,Ls=function(e){return e?e.replace(Ts,Ds):""},Ns=/::/g,js=/([A-Z]+)([A-Z][a-z])/g,Ps=/([a-z\d])([A-Z])/g,Is=/_/g,Ms=function(e,t){return e?e.replace(Ns,"/").replace(js,"$1_$2").replace(Ps,"$1_$2").replace(Is,t||"-"):""},$s=function(e){return Ms(e).toLowerCase()},Fs=Ls,zs=$s,Bs=function(e){return e.length?e.charAt(0).toLowerCase()+e.substring(1):e},Us=ks,Ws=Os,Hs=ws,Vs="undefined"==typeof document?{}:document.documentElement.style,Ks=function(e,t){t=t||{};var n=Bs(Fs(e)),r=zs(e),o=Cs?n:r,i=Ws.style?Cs?Ws.style:Ws.css:"";if(n in Vs)return t.asString?o:[o];var s=o,a=Hs[r],l=[];if(Cs&&(s=Us(o)),"function"==typeof a){var c=a(o,i)||[];c&&!Array.isArray(c)&&(c=[c]),c.length&&(c=c.map(function(e){return Cs?Bs(Fs(e)):zs(e)})),l=l.concat(c)}return i&&l.push(i+s),l.push(o),t.asString||1==l.length?l[0]:l},qs=Object.prototype.hasOwnProperty,Ys=function(e,t){return qs.call(e,t)},Js=Object.prototype.toString,Gs=Object.prototype.toString,Xs=Ks,Qs=$s,Zs=Ls,ea=Ys,ta=function(e){return!!e&&"[object Object]"===Js.call(e)},na=function(e){return"[object Function]"===Gs.apply(e)},ra=function(e,t,n,r){Xs(t).forEach(function(t){e[r?r(t):t]=n})},oa={cssUnitless:Ss},ia=function(e,t,n,r){"string"==typeof e&&(e=function(e){e=(e||"").split(";");var t={};return e.forEach(function(e){var n=e.split(":");2==n.length&&(t[n[0].trim()]=n[1].trim())}),t}(e)),(t=t||oa).cssUnitless=t.cssUnitless||oa.cssUnitless,r=r||{};var o,i,s,a,l,c,d,u,p=t.scope||{},h=null!=t.addUnits?t.addUnits:!p||null==p.addUnits||p.addUnits,g=(null!=t.cssUnitless?t.cssUnitless:p?p.cssUnitless:null)||{},f=(t.cssUnit||p?p.cssUnit:null)||"px",m=t.prefixProperties||(p?p.prefixProperties:null)||{},v=t.camelize?Zs:Qs;for(s in e)if(ea(e,s)){if(a=e[s],i=Qs(n?n+s:s),o=!1,u=!1,na(a)&&(d=a.call(p||e,a,s,i,e),ta(d)&&null!=d.value?(a=d.value,u=d.prefix,i=d.name?Qs(d.name):i):a=d),c="number"==(l=typeof a)||"string"==l&&""!=a&&1*a==a,null==a||null==i||""===i)continue;if((c||"string"==l)&&(o=!0),!o&&null!=a.value&&a.prefix&&(o=!0,u=a.prefix,a=a.value),o){if(u=u||!!m[i],c&&(a=h&&!(i in g)?a+f:a+""),"border"!=i&&(i.indexOf("border")||~i.indexOf("radius")||~i.indexOf("width"))||!c||(i+="-width"),!i.indexOf("border-radius-")&&(i.replace(/border(-radius)(-(.*))/,function(e,t,n){var r={"-top":["-top-left","-top-right"],"-left":["-top-left","-bottom-left"],"-right":["-top-right","-bottom-right"],"-bottom":["-bottom-left","-bottom-right"]};n in r?(i=[],r[n].forEach(function(e){i.push("border"+e+t)})):i="border"+n+t}),Array.isArray(i))){i.forEach(function(e){u?ra(r,e,a,v):r[v(e)]=a});continue}u?ra(r,i,a,v):r[v(i)]=a}else ia(a,t,i+"-",r)}return r},sa=ia,aa=Ys,la={prefixProperties:ws,cssUnitless:Ss,object:ia,string:function(e,t){e=sa(e,t);var n,r=[];for(n in e)aa(e,n)&&r.push(n+": "+e[n]);return r.join("; ")}};const ca=s("@pie-lib:mask-markup:serialization"),da=["span"],ua=["em","strong","u"],pa=(e,t)=>{const n=e.getAttribute(t);return r=(e=>{const t=/([\w-]*)\s*:\s*([^;]*)/g;let n;const r={};for(;n=t.exec(e);)r[n[1]]=n[2].trim();return r})(n),la.object(r,{camelize:!0,addUnits:!1});var r},ha=["border","class","style"],ga={b:"bold",em:"italic",u:"underline",s:"strikethrough",code:"code",strong:"strong"},fa=(e,t=[])=>{if(8===e.nodeType)return null;if(3===e.nodeType){const n={text:e.textContent};return t.length>0&&(n.marks=t.map(e=>({type:e,data:void 0}))),{object:"text",leaves:[n]}}if(1===e.nodeType){const r=e.tagName.toLowerCase(),o=ga[r];if(o){ca("[deserialize] mark: ",o);return{_flatten:!0,nodes:ma(e.childNodes,[...t,o])}}if("math"===r)return{isMath:!0,nodes:[e]};const i=(e=>{if(!e.attributes||e.attributes.length<=0)return;const t={};let n;for(n=0;n<e.attributes.length;n++){const r=e.attributes[n];t[r.name]=r.value}return t})(e)||{};"audio"===r&&""===i.controls&&(i.controls=!0);const s=ha.reduce((n=e,(e,t)=>{if(!n.getAttribute)return e;if(n.getAttribute(t))switch(t){case"style":e.style=pa(n,t);break;case"class":e.className=((e,t,n)=>{const r=e.getAttribute(n);return delete t.class,r})(n,e,t);break;default:e[t]=n.getAttribute(t)}return e}),{...i}),a=(e=>da.includes(e)?"inline":ua.includes(e)?"mark":"block")(r),l=ma(e.childNodes,t);return{object:a,type:r,data:{dataset:{...e.dataset},attributes:{...s}},nodes:l}}var n;return null},ma=(e,t=[])=>{const n=[];for(let r=0;r<e.length;r++){const o=fa(e[r],t);null!==o&&(o._flatten&&o.nodes?n.push(...o.nodes):n.push(o))}return n},va=e,ba=n,{styled:ya}=r,{renderMath:xa}=u;function Ea(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const Ca=ya("div")(({theme:e})=>({paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5)})),wa=ya("span")(()=>({display:"inline-block",width:".75em"})),Sa=["tbody","tr"],ka=(e,t,n,r,o,i)=>{if(!t)return null;const s=[];return(e.nodes||[]).forEach((e,i)=>{const a=e.type?`${e.type}-${i}`:`${i}`;if(e.isMath)return s.push(va.createElement("span",{dangerouslySetInnerHTML:{__html:`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`}})),s;if(r){const o=r(e,t,n);if(o){const t="blank"===Ea([e,"access",e=>e.data,"optionalAccess",e=>e.dataset,"optionalAccess",e=>e.component]);return t&&s.push(va.createElement(wa,{key:`spacer-${i}`})),s.push(o),void(t&&s.push(va.createElement(wa,{key:`spacer-${i}`})))}}if("text"===e.object){const t=e.leaves.reduce((e,t)=>{const n=t.text,r=((e,t)=>{const n=""===t.trim(),r=e&&e.type;return n&&Sa.includes(r)?void 0:t})(o,n);return r?e+r:e},""),n=(e=>{const t=e.leaves.find(e=>Ze(e,"marks",[]).length);return t?t.marks:null})(e);if(Ea([n,"optionalAccess",e=>e.length])>0){const e=n.map(e=>Object.keys(ga).find(t=>ga[t]===e.type)).filter(Boolean);e.length>0?s.push(e.reduceRight((e,t,n)=>va.createElement(t,{key:`${a}-${t}-${n}`},e),t)):s.push(t)}else t.length>0&&s.push(t)}else{const o=ka(e,t,n,r,e);if("p"===e.type||"paragraph"===e.type)s.push(va.createElement(Ca,{key:a},o));else{const t=e.type;e.nodes&&e.nodes.length>0?s.push(va.createElement(t,{key:a,...e.data.attributes},o)):s.push(va.createElement(t,{key:a,...e.data.attributes}))}}}),s},_a=ya("div")(()=>({display:"initial","&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"}}));class Aa extends va.Component{constructor(e){super(e),Aa.prototype.__init.call(this),this.internalContainerRef=va.createRef()}static __initStatic(){this.propTypes={renderChildren:ba.func,layout:ba.object,value:ba.object,onChange:ba.func,elementType:ba.string,containerRef:ba.oneOfType([ba.func,ba.shape({current:ba.instanceOf(Element)})])}}componentDidMount(){const e=this.props.containerRef||this.internalContainerRef;e.current&&"function"==typeof xa&&xa(e.current)}__init(){this.handleChange=(e,t)=>{const n={...this.props.value,[e]:t};this.props.onChange(n)}}render(){const{value:e,layout:t,elementType:n,containerRef:r}=this.props,o=ka(t,e,this.handleChange,this.props.renderChildren,null),i=r||this.internalContainerRef;return va.createElement(_a,{ref:i},o)}}Aa.__initStatic();const Ra=/\{\{(\d+)\}\}/g;const Oa=e,Da=n;var Ta;const La=(e,t)=>{const{markup:n}=(o=t,(r=e)?{markup:r.replace(Ra,(e,t)=>`<span data-component="${o}" data-id="${t}"></span>`)}:{markup:""});var r,o;return(e=>{if(!e||!e.trim())return{object:"value",document:{object:"document",data:{},nodes:[{object:"block",type:"span",data:{},isVoid:!1,nodes:[]}]}};const t=(new DOMParser).parseFromString(e,"text/html");let n=ma(t.body.childNodes);return!n.some(e=>"block"===e.object||"inline"===e.object)&&n.length>0&&(n=[{object:"block",type:"span",data:{},isVoid:!1,nodes:n}]),0===n.length&&(n=[{object:"block",type:"span",data:{},isVoid:!1,nodes:[]}]),{object:"value",document:{object:"document",data:{},nodes:n}}})(n).document},Na=(e,t)=>((Ta=class extends Oa.Component{static __initStatic(){this.propTypes={markup:Da.string,layout:Da.object,value:Da.object,onChange:Da.func,customMarkMarkupComponent:Da.func,elementType:Da.string}}constructor(e){super(e),this.containerRef=Oa.createRef()}componentDidUpdate(e){if(this.props.markup!==e.markup){const e=this.containerRef.current;(e&&e.querySelectorAll('[data-latex][data-math-handled="true"]')||[]).forEach(e=>{const t=e.querySelector("mjx-container");t&&e.removeChild(t);const n=e.getAttribute("data-raw");e.innerHTML=n,e.removeAttribute("data-math-handled")})}}render(){const{markup:n,layout:r,value:o,onChange:i,elementType:s}=this.props,a=r||La(n,e);return Oa.createElement(Aa,{containerRef:this.containerRef,elementType:s,layout:a,value:o,onChange:i,renderChildren:t(this.props)})}}).__initStatic(),Ta),{useMemo:ja}=e,{useLayoutEffect:Pa}=e,{useEffect:Ia}=e,{useRef:Ma}=e,{useCallback:$a}=e,Fa="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function za(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Ba(e){return"nodeType"in e}function Ua(e){var t,n;return e?za(e)?e:Ba(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Wa(e){const{Document:t}=Ua(e);return e instanceof t}function Ha(e){return!za(e)&&e instanceof Ua(e).HTMLElement}function Va(e){return e instanceof Ua(e).SVGElement}function Ka(e){return e?za(e)?e.document:Ba(e)?Wa(e)?e:Ha(e)||Va(e)?e.ownerDocument:document:document:document}const qa=Fa?Pa:Ia;function Ya(e){const t=Ma(e);return qa(()=>{t.current=e}),$a(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function Ja(e,t){void 0===t&&(t=[e]);const n=Ma(e);return qa(()=>{n.current!==e&&(n.current=e)},t),n}function Ga(e,t){const n=Ma();return ja(()=>{const t=e(n.current);return n.current=t,t},[...t])}function Xa(e){const t=Ya(e),n=Ma(null),r=$a(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function Qa(e){const t=Ma();return Ia(()=>{t.current=e},[e]),t.current}let Za={};function el(e,t){return ja(()=>{if(t)return t;const n=null==Za[e]?0:Za[e]+1;return Za[e]=n,e+"-"+n},[e,t])}function tl(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}}const nl=tl(1),rl=tl(-1);function ol(e){if(!e)return!1;const{KeyboardEvent:t}=Ua(e.target);return t&&e instanceof t}function il(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Ua(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const sl=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[sl.Translate.toString(e),sl.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),al="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ll(e){return e.matches(al)?e:e.querySelector(al)}const cl=e,{useState:dl}=e,{useCallback:ul}=e,pl={display:"none"};function hl(e){let{id:t,value:n}=e;return cl.createElement("div",{id:t,style:pl},n)}function gl(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return cl.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const fl=e,{createContext:ml}=e,{useContext:vl}=e,{useEffect:bl}=e,{useState:yl}=e,{useCallback:xl}=e,{useMemo:El}=e,{useRef:Cl}=e,{memo:wl}=e,{useReducer:Sl}=e,{cloneElement:kl}=e,{forwardRef:_l}=e,{createPortal:Al}=t,{unstable_batchedUpdates:Rl}=t,Ol=ml(null);const Dl={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Tl={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Ll(e){let{announcements:t=Tl,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Dl}=e;const{announce:i,announcement:s}=function(){const[e,t]=dl("");return{announce:ul(e=>{null!=e&&t(e)},[]),announcement:e}}(),a=el("DndLiveRegion"),[l,c]=yl(!1);if(bl(()=>{c(!0)},[]),function(e){const t=vl(Ol);bl(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(El(()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}}),[i,t])),!l)return null;const d=fl.createElement(fl.Fragment,null,fl.createElement(hl,{id:r,value:o.draggable}),fl.createElement(gl,{id:a,announcement:s}));return n?Al(d,n):d}var Nl;function jl(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Nl||(Nl={}));const Pl=Object.freeze({x:0,y:0});function Il(e,t){const n=il(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function Ml(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function $l(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-r,a=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=s*a;return Number((o/(n+r-o)).toFixed(4))}return 0}const Fl=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=$l(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Ml)};function zl(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Pl}const Bl=(Ul=1,function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((e,t)=>({...e,top:e.top+Ul*t.y,bottom:e.bottom+Ul*t.y,left:e.left+Ul*t.x,right:e.right+Ul*t.x}),{...e})});var Ul;function Wl(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const Hl={ignoreTransform:!1};function Vl(e,t){void 0===t&&(t=Hl);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=Ua(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=Wl(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:a}=r,l=e.left-s-(1-o)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:s,bottom:a,right:l}=n;return{top:r,left:o,width:i,height:s,bottom:a,right:l}}function Kl(e){return Vl(e,{ignoreTransform:!0})}function ql(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(Wa(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ha(o)||Va(o))return n;if(n.includes(o))return n;const i=Ua(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=Ua(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=Ua(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Yl(e){const[t]=ql(e,1);return null!=t?t:null}function Jl(e){return Fa&&e?za(e)?e:Ba(e)?Wa(e)||e===Ka(e).scrollingElement?window:Ha(e)?e:null:null:null}function Gl(e){return za(e)?e.scrollX:e.scrollLeft}function Xl(e){return za(e)?e.scrollY:e.scrollTop}function Ql(e){return{x:Gl(e),y:Xl(e)}}var Zl;function ec(e){return!(!Fa||!e)&&e===document.scrollingElement}function tc(e){const t={x:0,y:0},n=ec(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Zl||(Zl={}));const nc={x:.2,y:.2};function rc(e,t,n,r,o){let{top:i,left:s,right:a,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=nc);const{isTop:c,isBottom:d,isLeft:u,isRight:p}=tc(e),h={x:0,y:0},g={x:0,y:0},f=t.height*o.y,m=t.width*o.x;return!c&&i<=t.top+f?(h.y=Zl.Backward,g.y=r*Math.abs((t.top+f-i)/f)):!d&&l>=t.bottom-f&&(h.y=Zl.Forward,g.y=r*Math.abs((t.bottom-f-l)/f)),!p&&a>=t.right-m?(h.x=Zl.Forward,g.x=r*Math.abs((t.right-m-a)/m)):!u&&s<=t.left+m&&(h.x=Zl.Backward,g.x=r*Math.abs((t.left+m-s)/m)),{direction:h,speed:g}}function oc(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ic(e){return e.reduce((e,t)=>nl(e,Ql(t)),Pl)}function sc(e,t){if(void 0===t&&(t=Vl),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Yl(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ac=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Gl(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Xl(t),0)}]];class lc{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ql(t),r=ic(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of ac)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),s=r[e]-t;return this.rect[i]+s},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class cc{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function dc(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var uc,pc;function hc(e){e.preventDefault()}function gc(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(uc||(uc={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(pc||(pc={}));const fc={start:[pc.Space,pc.Enter],cancel:[pc.Esc],end:[pc.Space,pc.Enter,pc.Tab]},mc=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case pc.Right:return{...n,x:n.x+25};case pc.Left:return{...n,x:n.x-25};case pc.Down:return{...n,y:n.y+25};case pc.Up:return{...n,y:n.y-25}}};class vc{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new cc(Ka(t)),this.windowListeners=new cc(Ua(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(uc.Resize,this.handleCancel),this.windowListeners.add(uc.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(uc.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&sc(n),t(Pl)}handleKeyDown(e){if(ol(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=fc,coordinateGetter:i=mc,scrollBehavior:s="smooth"}=r,{code:a}=e;if(o.end.includes(a))return void this.handleEnd(e);if(o.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:Pl;this.referenceCoordinates||(this.referenceCoordinates=c);const d=i(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=rl(d,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:l,isBottom:c,maxScroll:u,minScroll:p}=tc(n),h=oc(n),g={x:Math.min(o===pc.Right?h.right-h.width/2:h.right,Math.max(o===pc.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(o===pc.Down?h.bottom-h.height/2:h.bottom,Math.max(o===pc.Down?h.top:h.top+h.height/2,d.y))},f=o===pc.Right&&!a||o===pc.Left&&!l,m=o===pc.Down&&!c||o===pc.Up&&!i;if(f&&g.x!==d.x){const e=n.scrollLeft+t.x,i=o===pc.Right&&e<=u.x||o===pc.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:s});r.x=i?n.scrollLeft-e:o===pc.Right?n.scrollLeft-u.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:s});break}if(m&&g.y!==d.y){const e=n.scrollTop+t.y,i=o===pc.Down&&e<=u.y||o===pc.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:s});r.y=i?n.scrollTop-e:o===pc.Down?n.scrollTop-u.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:s});break}}this.handleMove(e,nl(rl(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function bc(e){return Boolean(e&&"distance"in e)}function yc(e){return Boolean(e&&"delay"in e)}vc.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=fc,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class xc{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=Ua(e);return e instanceof t?e:Ka(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=Ka(i),this.documentListeners=new cc(this.document),this.listeners=new cc(n),this.windowListeners=new cc(Ua(i)),this.initialCoordinates=null!=(r=il(o))?r:Pl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(uc.Resize,this.handleCancel),this.windowListeners.add(uc.DragStart,hc),this.windowListeners.add(uc.VisibilityChange,this.handleCancel),this.windowListeners.add(uc.ContextMenu,hc),this.documentListeners.add(uc.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(yc(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(bc(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(uc.Click,gc,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(uc.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:s}}=o;if(!r)return;const a=null!=(t=il(e))?t:Pl,l=rl(r,a);if(!n&&s){if(bc(s)){if(null!=s.tolerance&&dc(l,s.tolerance))return this.handleCancel();if(dc(l,s.distance))return this.handleStart()}return yc(s)&&dc(l,s.tolerance)?this.handleCancel():void this.handlePending(s,l)}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===pc.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Ec={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Cc extends xc{constructor(e){const{event:t}=e,n=Ka(t.target);super(e,Ec,n)}}Cc.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const wc={move:{name:"mousemove"},end:{name:"mouseup"}};var Sc;!function(e){e[e.RightClick=2]="RightClick"}(Sc||(Sc={}));(class extends xc{constructor(e){super(e,wc,Ka(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Sc.RightClick&&(null==r||r({event:n}),!0)}}];const kc={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var _c,Ac;function Rc(e){let{acceleration:t,activator:n=_c.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:a=Ac.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:p}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=Qa(t);return Ga(e=>{if(n||!r||!e)return Oc;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Zl.Backward]:e.x[Zl.Backward]||-1===o.x,[Zl.Forward]:e.x[Zl.Forward]||1===o.x},y:{[Zl.Backward]:e.y[Zl.Backward]||-1===o.y,[Zl.Forward]:e.y[Zl.Forward]||1===o.y}}},[n,t,r])}({delta:u,disabled:!i}),[g,f]=function(){const e=Ma(null);return[$a((t,n)=>{e.current=setInterval(t,n)},[]),$a(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),m=Cl({x:0,y:0}),v=Cl({x:0,y:0}),b=El(()=>{switch(n){case _c.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case _c.DraggableRect:return o}},[n,o,l]),y=Cl(null),x=xl(()=>{const e=y.current;if(!e)return;const t=m.current.x*v.current.x,n=m.current.y*v.current.y;e.scrollBy(t,n)},[]),E=El(()=>a===Ac.TreeOrder?[...c].reverse():c,[a,c]);bl(()=>{if(i&&c.length&&b){for(const e of E){if(!1===(null==r?void 0:r(e)))continue;const n=c.indexOf(e),o=d[n];if(!o)continue;const{direction:i,speed:a}=rc(e,o,b,t,p);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return f(),y.current=e,g(x,s),m.current=a,void(v.current=i)}m.current={x:0,y:0},v.current={x:0,y:0},f()}else f()},[t,x,r,f,i,s,JSON.stringify(b),JSON.stringify(h),g,c,E,d,JSON.stringify(p)])}(class extends xc{constructor(e){super(e,kc)}static setup(){return window.addEventListener(kc.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(kc.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(_c||(_c={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Ac||(Ac={}));const Oc={x:{[Zl.Backward]:!1,[Zl.Forward]:!1},y:{[Zl.Backward]:!1,[Zl.Forward]:!1}};var Dc,Tc;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Dc||(Dc={})),function(e){e.Optimized="optimized"}(Tc||(Tc={}));const Lc=new Map;function Nc(e,t){return Ga(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function jc(e){let{callback:t,disabled:n}=e;const r=Ya(t),o=El(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return bl(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Pc(e){return new lc(Vl(e),e)}function Ic(e,t,n){void 0===t&&(t=Pc);const[r,o]=yl(null);function i(){o(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const s=function(e){let{callback:t,disabled:n}=e;const r=Ya(t),o=El(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return bl(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),a=jc({callback:i});return qa(()=>{i(),e?(null==a||a.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==s||s.disconnect())},[e]),r}const Mc=[];function $c(e,t){void 0===t&&(t=[]);const n=Cl(null);return bl(()=>{n.current=null},t),bl(()=>{const t=e!==Pl;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?rl(e,n.current):Pl}function Fc(e){return El(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const zc=[];function Bc(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ha(t)?t:e}const Uc=[{sensor:Cc,options:{}},{sensor:vc,options:{}}],Wc={current:{}},Hc={draggable:{measure:Kl},droppable:{measure:Kl,strategy:Dc.WhileDragging,frequency:Tc.Optimized},dragOverlay:{measure:Vl}};class Vc extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Kc={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Vc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:jl},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Hc,measureDroppableContainers:jl,windowRect:null,measuringScheduled:!1},qc={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:jl,draggableNodes:new Map,over:null,measureDroppableContainers:jl},Yc=ml(qc),Jc=ml(Kc);function Gc(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Vc}}}function Xc(e,t){switch(t.type){case Nl.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Nl.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Nl.DragEnd:case Nl.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Nl.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Vc(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Nl.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new Vc(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case Nl.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Vc(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Qc(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=vl(Yc),i=Qa(r),s=Qa(null==n?void 0:n.id);return bl(()=>{if(!t&&!r&&i&&null!=s){if(!ol(i))return;if(document.activeElement===i.target)return;const e=o.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=ll(e);if(t){t.focus();break}}})}},[r,t,o,s,i]),null}function Zc(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}const ed=ml({...Pl,scaleX:1,scaleY:1});var td;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(td||(td={})),wl(function(e){var t,n,r,o;let{id:i,accessibility:s,autoScroll:a=!0,children:l,sensors:c=Uc,collisionDetection:d=Fl,measuring:u,modifiers:p,...h}=e;const g=Sl(Xc,void 0,Gc),[f,m]=g,[v,b]=function(){const[e]=yl(()=>new Set),t=xl(t=>(e.add(t),()=>e.delete(t)),[e]);return[xl(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[y,x]=yl(td.Uninitialized),E=y===td.Initialized,{draggable:{active:C,nodes:w,translate:S},droppable:{containers:k}}=f,_=null!=C?w.get(C):null,A=Cl({initial:null,translated:null}),R=El(()=>{var e;return null!=C?{id:C,data:null!=(e=null==_?void 0:_.data)?e:Wc,rect:A}:null},[C,_]),O=Cl(null),[D,T]=yl(null),[L,N]=yl(null),j=Ja(h,Object.values(h)),P=el("DndDescribedBy",i),I=El(()=>k.getEnabled(),[k]),M=function(e){return El(()=>({draggable:{...Hc.draggable,...null==e?void 0:e.draggable},droppable:{...Hc.droppable,...null==e?void 0:e.droppable},dragOverlay:{...Hc.dragOverlay,...null==e?void 0:e.dragOverlay}}),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(u),{droppableRects:$,measureDroppableContainers:F,measuringScheduled:z}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=yl(null),{frequency:a,measure:l,strategy:c}=o,d=Cl(e),u=function(){switch(c){case Dc.Always:return!1;case Dc.BeforeDragging:return n;default:return!n}}(),p=Ja(u),h=xl(function(e){void 0===e&&(e=[]),p.current||s(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),g=Cl(null),f=Ga(t=>{if(u&&!n)return Lc;if(!t||t===Lc||d.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new lc(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,i,n,u,l]);return bl(()=>{d.current=e},[e]),bl(()=>{u||h()},[n,u]),bl(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),bl(()=>{u||"number"!=typeof a||null!==g.current||(g.current=setTimeout(()=>{h(),g.current=null},a))},[a,u,h,...r]),{droppableRects:f,measureDroppableContainers:h,measuringScheduled:null!=i}}(I,{dragging:E,dependencies:[S.x,S.y],config:M.droppable}),B=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return Ga(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(w,C),U=El(()=>L?il(L):null,[L]),W=function(){const e=!1===(null==D?void 0:D.autoScrollEnabled),t="object"==typeof a?!1===a.enabled:!1===a,n=E&&!e&&!t;if("object"==typeof a)return{...a,enabled:n};return{enabled:n}}(),H=function(e,t){return Nc(e,t)}(B,M.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=Cl(!1),{x:s,y:a}="boolean"==typeof o?{x:o,y:o}:o;qa(()=>{if(!s&&!a||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=zl(n(e),r);if(s||(o.x=0),a||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=Yl(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,s,a,r,n])}({activeNode:null!=C?w.get(C):null,config:W.layoutShiftCompensation,initialRect:H,measure:M.draggable.measure});const V=Ic(B,M.draggable.measure,H),K=Ic(B?B.parentElement:null),q=Cl({activatorEvent:null,active:null,activeNode:B,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:w,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Y=k.getNodeFor(null==(t=q.current.over)?void 0:t.id),J=function(e){let{measure:t}=e;const[n,r]=yl(null),o=jc({callback:xl(e=>{for(const{target:n}of e)if(Ha(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),i=xl(e=>{const n=Bc(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)},[t,o]),[s,a]=Xa(i);return El(()=>({nodeRef:s,rect:n,setRef:a}),[n,s,a])}({measure:M.dragOverlay.measure}),G=null!=(n=J.nodeRef.current)?n:B,X=E?null!=(r=J.rect)?r:V:null,Q=Boolean(J.nodeRef.current&&J.rect),Z=zl(ee=Q?null:V,Nc(ee));var ee;const te=Fc(G?Ua(G):null),ne=function(e){const t=Cl(e),n=Ga(n=>e?n&&n!==Mc&&e&&t.current&&e.parentNode===t.current.parentNode?n:ql(e):Mc,[e]);return bl(()=>{t.current=e},[e]),n}(E?null!=Y?Y:B:null),re=function(e,t){void 0===t&&(t=Vl);const[n]=e,r=Fc(n?Ua(n):null),[o,i]=yl(zc);function s(){i(()=>e.length?e.map(e=>ec(e)?r:new lc(t(e),e)):zc)}const a=jc({callback:s});return qa(()=>{null==a||a.disconnect(),s(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),o}(ne),oe=Zc(p,{transform:{x:S.x-Z.x,y:S.y-Z.y,scaleX:1,scaleY:1},activatorEvent:L,active:R,activeNodeRect:V,containerNodeRect:K,draggingNodeRect:X,over:q.current.over,overlayNodeRect:J.rect,scrollableAncestors:ne,scrollableAncestorRects:re,windowRect:te}),ie=U?nl(U,S):null,se=function(e){const[t,n]=yl(null),r=Cl(e),o=xl(e=>{const t=Jl(e.target);t&&n(e=>e?(e.set(t,Ql(t)),new Map(e)):null)},[]);return bl(()=>{const t=r.current;if(e!==t){i(t);const s=e.map(e=>{const t=Jl(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,Ql(t)]):null}).filter(e=>null!=e);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{const t=Jl(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),El(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>nl(e,t),Pl):ic(e):Pl,[e,t])}(ne),ae=$c(se),le=$c(se,[V]),ce=nl(oe,ae),de=X?Bl(X,oe):null,ue=R&&de?d({active:R,collisionRect:de,droppableRects:$,droppableContainers:I,pointerCoordinates:ie}):null,pe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(ue,"id"),[he,ge]=yl(null),fe=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Q?oe:nl(oe,le),null!=(o=null==he?void 0:he.rect)?o:null,V),me=Cl(null),ve=xl((e,t)=>{let{sensor:n,options:r}=t;if(null==O.current)return;const o=w.get(O.current);if(!o)return;const i=e.nativeEvent,s=new n({active:O.current,activeNode:o,event:i,options:r,context:q,onAbort(e){if(!w.get(e))return;const{onDragAbort:t}=j.current,n={id:e};null==t||t(n),v({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!w.get(e))return;const{onDragPending:o}=j.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),v({type:"onDragPending",event:i})},onStart(e){const t=O.current;if(null==t)return;const n=w.get(t);if(!n)return;const{onDragStart:r}=j.current,o={activatorEvent:i,active:{id:t,data:n.data,rect:A}};Rl(()=>{null==r||r(o),x(td.Initializing),m({type:Nl.DragStart,initialCoordinates:e,active:t}),v({type:"onDragStart",event:o}),T(me.current),N(i)})},onMove(e){m({type:Nl.DragMove,coordinates:e})},onEnd:a(Nl.DragEnd),onCancel:a(Nl.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=q.current;let s=null;if(t&&o){const{cancelDrop:a}=j.current;if(s={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Nl.DragEnd&&"function"==typeof a){await Promise.resolve(a(s))&&(e=Nl.DragCancel)}}O.current=null,Rl(()=>{m({type:e}),x(td.Uninitialized),ge(null),T(null),N(null),me.current=null;const t=e===Nl.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=j.current[t];null==e||e(s),v({type:t,event:s})}})}}me.current=s},[w]),be=xl((e,t)=>(n,r)=>{const o=n.nativeEvent,i=w.get(r);if(null!==O.current||!i||o.dndKit||o.defaultPrevented)return;const s={active:i};!0===e(n,t.options,s)&&(o.dndKit={capturedBy:t.sensor},O.current=r,ve(n,t))},[w,ve]),ye=function(e,t){return El(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,be);!function(e){bl(()=>{if(!Fa)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),qa(()=>{V&&y===td.Initializing&&x(td.Initialized)},[V,y]),bl(()=>{const{onDragMove:e}=j.current,{active:t,activatorEvent:n,collisions:r,over:o}=q.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:ce.x,y:ce.y},over:o};Rl(()=>{null==e||e(i),v({type:"onDragMove",event:i})})},[ce.x,ce.y]),bl(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=q.current;if(!e||null==O.current||!t||!o)return;const{onDragOver:i}=j.current,s=r.get(pe),a=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:a};Rl(()=>{ge(a),null==i||i(l),v({type:"onDragOver",event:l})})},[pe]),qa(()=>{q.current={activatorEvent:L,active:R,activeNode:B,collisionRect:de,collisions:ue,droppableRects:$,draggableNodes:w,draggingNode:G,draggingNodeRect:X,droppableContainers:k,over:he,scrollableAncestors:ne,scrollAdjustedTranslate:ce},A.current={initial:X,translated:de}},[R,B,ue,de,w,G,X,$,k,he,ne,ce]),Rc({...W,delta:S,draggingRect:de,pointerCoordinates:ie,scrollableAncestors:ne,scrollableAncestorRects:re});const xe=El(()=>({active:R,activeNode:B,activeNodeRect:V,activatorEvent:L,collisions:ue,containerNodeRect:K,dragOverlay:J,draggableNodes:w,droppableContainers:k,droppableRects:$,over:he,measureDroppableContainers:F,scrollableAncestors:ne,scrollableAncestorRects:re,measuringConfiguration:M,measuringScheduled:z,windowRect:te}),[R,B,V,L,ue,K,J,w,k,$,he,F,ne,re,M,z,te]),Ee=El(()=>({activatorEvent:L,activators:ye,active:R,activeNodeRect:V,ariaDescribedById:{draggable:P},dispatch:m,draggableNodes:w,over:he,measureDroppableContainers:F}),[L,ye,R,V,m,P,w,he,F]);return fl.createElement(Ol.Provider,{value:b},fl.createElement(Yc.Provider,{value:Ee},fl.createElement(Jc.Provider,{value:xe},fl.createElement(ed.Provider,{value:fe},l)),fl.createElement(Qc,{disabled:!1===(null==s?void 0:s.restoreFocus)})),fl.createElement(Ll,{...s,hiddenTextDescribedById:P}))});const nd=ml(null),rd="button";function od(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=el("Draggable"),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:p}=vl(Yc),{role:h=rd,roleDescription:g="draggable",tabIndex:f=0}=null!=o?o:{},m=(null==l?void 0:l.id)===t,v=vl(m?ed:nd),[b,y]=Xa(),[x,E]=Xa(),C=function(e,t){return El(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(s,t),w=Ja(n);qa(()=>(u.set(t,{id:t,key:i,node:b,activatorNode:x,data:w}),()=>{const e=u.get(t);e&&e.key===i&&u.delete(t)}),[u,t]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:El(()=>({role:h,tabIndex:f,"aria-disabled":r,"aria-pressed":!(!m||h!==rd)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[r,h,f,m,g,d.draggable]),isDragging:m,listeners:r?void 0:C,node:b,over:p,setNodeRef:y,setActivatorNodeRef:E,transform:v}}const id={timeout:25};function sd(e){let{animation:t,children:n}=e;const[r,o]=yl(null),[i,s]=yl(null),a=Qa(n);return n||r||!a||o(a),qa(()=>{if(!i)return;const e=null==r?void 0:r.key,n=null==r?void 0:r.props.id;null!=e&&null!=n?Promise.resolve(t(n,i)).then(()=>{o(null)}):o(null)},[t,r,i]),fl.createElement(fl.Fragment,null,n,r?kl(r,{ref:s}):null)}const ad={x:0,y:0,scaleX:1,scaleY:1};function ld(e){let{children:t}=e;return fl.createElement(Yc.Provider,{value:qc},fl.createElement(ed.Provider,{value:ad},t))}const cd={position:"fixed",touchAction:"none"},dd=e=>ol(e)?"transform 250ms ease":void 0,ud=_l((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:s,rect:a,style:l,transform:c,transition:d=dd}=e;if(!a)return null;const u=o?c:{...c,scaleX:1,scaleY:1},p={...cd,width:a.width,height:a.height,top:a.top,left:a.left,transform:sl.Transform.toString(u),transformOrigin:o&&r?Il(r,a):void 0,transition:"function"==typeof d?d(r):d,...l};return fl.createElement(n,{className:s,style:p,ref:t},i)}),pd={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:sl.Transform.toString(t)},{transform:sl.Transform.toString(n)}]},sideEffects:(hd={styles:{active:{opacity:"0"}}},e=>{let{active:t,dragOverlay:n}=e;const r={},{styles:o,className:i}=hd;if(null!=o&&o.active)for(const[e,n]of Object.entries(o.active))void 0!==n&&(r[e]=t.node.style.getPropertyValue(e),t.node.style.setProperty(e,n));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&n.node.style.setProperty(e,t);return null!=i&&i.active&&t.node.classList.add(i.active),null!=i&&i.dragOverlay&&n.node.classList.add(i.dragOverlay),function(){for(const[e,n]of Object.entries(r))t.node.style.setProperty(e,n);null!=i&&i.active&&t.node.classList.remove(i.active)}})};var hd;function gd(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Ya((e,i)=>{if(null===t)return;const s=n.get(e);if(!s)return;const a=s.node.current;if(!a)return;const l=Bc(i);if(!l)return;const{transform:c}=Ua(i).getComputedStyle(i),d=Wl(c);if(!d)return;const u="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...pd,...e};return e=>{let{active:i,dragOverlay:s,transform:a,...l}=e;if(!t)return;const c={x:s.rect.left-i.rect.left,y:s.rect.top-i.rect.top},d={scaleX:1!==a.scaleX?i.rect.width*a.scaleX/s.rect.width:1,scaleY:1!==a.scaleY?i.rect.height*a.scaleY/s.rect.height:1},u={x:a.x-c.x,y:a.y-c.y,...d},p=o({...l,active:i,dragOverlay:s,transform:{initial:a,final:u}}),[h]=p,g=p[p.length-1];if(JSON.stringify(h)===JSON.stringify(g))return;const f=null==r?void 0:r({active:i,dragOverlay:s,...l}),m=s.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{m.onfinish=()=>{null==f||f(),e()}})}}(t);return sc(a,o.draggable.measure),u({active:{id:e,data:s.data,node:a,rect:o.draggable.measure(a)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:o,transform:d})})}let fd=0;function md(e){return El(()=>{if(null!=e)return fd++,fd},[e])}const vd=fl.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:u,activeNodeRect:p,containerNodeRect:h,draggableNodes:g,droppableContainers:f,dragOverlay:m,over:v,measuringConfiguration:b,scrollableAncestors:y,scrollableAncestorRects:x,windowRect:E}=vl(Jc),C=vl(ed),w=md(null==u?void 0:u.id),S=Zc(s,{activatorEvent:d,active:u,activeNodeRect:p,containerNodeRect:h,draggingNodeRect:m.rect,over:v,overlayNodeRect:m.rect,scrollableAncestors:y,scrollableAncestorRects:x,transform:C,windowRect:E}),k=Nc(p),_=gd({config:r,draggableNodes:g,droppableContainers:f,measuringConfiguration:b}),A=k?m.setRef:void 0;return fl.createElement(ld,null,fl.createElement(sd,{animation:_},u&&w?fl.createElement(ud,{key:w,id:u.id,ref:A,as:a,activatorEvent:d,adjustScale:t,className:l,transition:i,rect:k,style:{zIndex:c,...o},transform:S},n):null))}),bd=e,{useEffect:yd}=e,{useRef:xd}=e,Ed=n,{styled:Cd}=r,{Chip:wd}=i,{renderMath:Sd}=u;function kd(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const _d="MaskBlank",Ad=Cd("span")(({theme:e,disabled:t,selected:n})=>({border:`solid 0px ${e.palette.primary.main}`,margin:e.spacing(.5),transform:"translate(0, 0)",display:"inline-flex",opacity:n?.7:1,...t&&{}})),Rd=Cd(wd)(()=>({backgroundColor:eo(),border:`1px solid ${Kr()}`,color:Kr(),alignItems:"center",display:"inline-flex",height:"initial",minHeight:"32px",fontSize:"inherit",whiteSpace:"pre-wrap",maxWidth:"374px",pointerEvents:"none",borderRadius:"3px",paddingTop:"12px",paddingBottom:"12px","&.Mui-disabled":{opacity:1}})),Od=Cd("span")(()=>({whiteSpace:"normal","& img":{display:"block",padding:"2px 0"},"& mjx-frac":{fontSize:"120% !important"},"& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn":{fontSize:"120% !important"}}));function Dd({choice:e,disabled:t,instanceId:n,selectedItem:r,onSelectClick:o}){const i=xd(null),{attributes:s,listeners:a,setNodeRef:l,isDragging:c}=od({id:`choice-${e.id}`,data:{choice:e,instanceId:n,fromChoice:!0,type:_d},disabled:t});yd(()=>{Sd(i.current)},[e.value]);const d=!!r&&!0===r.fromChoice&&r.choice.id===e.id;return bd.createElement(Ad,{ref:l,style:c?{width:kd([i,"access",e=>e.current,"optionalAccess",e=>e.offsetWidth])||90,height:kd([i,"access",e=>e.current,"optionalAccess",e=>e.offsetHeight])||32}:{},disabled:t,selected:d,onClick:r=>{t||(r.stopPropagation(),kd([o,"optionalCall",t=>t({choice:e,instanceId:n,fromChoice:!0,type:_d})]))},...a,...s},bd.createElement(Rd,{clickable:!1,disabled:t,ref:i,label:bd.createElement(Od,{dangerouslySetInnerHTML:{__html:e.value}})}))}Dd.propTypes={choice:Ed.object.isRequired,disabled:Ed.bool,instanceId:Ed.oneOfType([Ed.string,Ed.number]),selectedItem:Ed.object,onSelectClick:Ed.func};const Td=e,Ld=n,{DragDroppablePlaceholder:Nd}=p;class jd extends Td.Component{constructor(...e){super(...e),jd.prototype.__init.call(this),jd.prototype.__init2.call(this)}static __initStatic(){this.propTypes={disabled:Ld.bool,duplicates:Ld.bool,choices:Ld.arrayOf(Ld.shape({label:Ld.string,value:Ld.string})),value:Ld.object,choicePosition:Ld.string.isRequired,instanceId:Ld.string,selectedItem:Ld.object,onSelectClick:Ld.func,onPlacementClick:Ld.func}}__init(){this.getStyleForWrapper=()=>{const{choicePosition:e}=this.props;switch(e){case"above":return{margin:"0 0 40px 0"};case"below":return{margin:"40px 0 0 0"};case"right":return{margin:"0 0 0 40px"};default:return{margin:"0 40px 0 0"}}}}__init2(){this.handlePoolClick=()=>{const{disabled:e,selectedItem:t,onPlacementClick:n}=this.props;e||t&&function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}}([n,"optionalCall",e=>e(void 0)])}}render(){const{disabled:e,duplicates:t,choices:n,value:r,instanceId:o,selectedItem:i,onSelectClick:s}=this.props,a=n.filter(e=>{if(!0===t)return!0;const n=(o=t=>t===e.id,function(e,t){var n;return Kt(e,function(e,r,o){if(t(e,r,o))return n=r,!1}),n}(r,Ut(o)));var o;return void 0===n}),l={...this.getStyleForWrapper(),minWidth:"100px"};return Td.createElement("div",{style:l,onClick:this.handlePoolClick},Td.createElement(Nd,{disabled:e,instanceId:o},a.map((t,n)=>Td.createElement(Dd,{key:`${t.value}-${n}`,disabled:e,choice:t,instanceId:o,selectedItem:i,onSelectClick:s}))))}}jd.__initStatic();const Pd=e,{useEffect:Id}=e,{useRef:Md}=e,{useState:$d}=e,Fd=n,zd=s,{styled:Bd}=r,{Chip:Ud}=i,Wd=l,{grey:Hd}=o,{renderMath:Vd}=u;function Kd(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}zd("pie-lib:mask-markup:blank");const qd=Bd("span")(({dragged:e,over:t,selected:n,showsPointerCursor:r})=>({border:`solid 0px ${Hr("primary",Wr.PRIMARY)}`,minWidth:"200px",overflow:"hidden",whiteSpace:"nowrap",opacity:1,cursor:"default",...t&&{whiteSpace:"nowrap",overflow:"hidden"},...(e||n)&&{opacity:.5},...r&&{"&:hover":{cursor:"pointer"}}})),Yd=Bd("span")({display:"inline-flex",touchAction:"none"}),Jd=Bd(Ud)(()=>({backgroundColor:Gr(),border:`2px dashed ${Kr()}`,touchAction:"none",color:Kr(),fontSize:"inherit",maxWidth:"374px",position:"relative",borderRadius:"3px","&.over":{whiteSpace:"nowrap",overflow:"hidden"},"&.parentOver":{border:`1px solid ${Hd[500]}`,backgroundColor:`${Hd[300]}`},"&.correct":{border:`solid 1px ${qr()}`},"&.incorrect":{border:`solid 1px ${Yr()}`},"&.Mui-disabled":{opacity:1}})),Gd=Bd("span")(()=>({whiteSpace:"normal",pointerEvents:"none","& img":{display:"block",padding:"2px 0"},"& p":{marginTop:"0",marginBottom:"0"},"& mjx-frac":{fontSize:"120% !important"},"& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn":{fontSize:"120% !important"},"&.over":{whiteSpace:"nowrap",overflow:"hidden"},"&.hidden":{color:"transparent",opacity:0},"&.dragged":{position:"absolute",left:16,maxWidth:"60px",top:"50%",transform:"translateY(-50%)"}}));function Xd({disabled:e,choice:t,isOver:n,isDragging:r,dragItem:o,correct:i,emptyResponseAreaWidth:s,emptyResponseAreaHeight:a}){const l=Md(null),c=Md(null),d=Md(null),u=Md(!1),[p,h]=$d({height:0,width:0}),g=()=>{m()},f=()=>{const e=Kd([c,"access",e=>e.current,"optionalAccess",e=>e.querySelector,"call",e=>e("img")]);e?e.onload=g:setTimeout(()=>{m()},300)},m=()=>{if(c.current&&l.current&&!u.current){u.current=!0,l.current.style.width="auto",l.current.style.height="auto",l.current.offsetHeight;const e=(()=>{if(!c.current)return null;if(c.current.querySelector("mjx-container")&&c.current.parentElement)return c.current.parentElement;const e=c.current.querySelector("img");if(e)return c.current.textContent.trim().length>0?c.current:e;return c.current})()||c.current,t=e.getBoundingClientRect(),n=12,r=2,o=1,i=(e.offsetWidth||t.width||0)+2*n+2*r+o,d=Math.max(e.offsetHeight||0,t.height||0,e.scrollHeight||0,c.current.scrollHeight||0)+2*n+2*r+o,p=parseFloat(s)||0,g=parseFloat(a)||0,f=i<=p?p:i,m=d<=g?g:d;h(e=>({width:f>p?f:e.width,height:m>g?m:e.height}));const v=`${f}px`,b=`${m}px`;l.current.style.width!==v&&(l.current.style.width=v),l.current.style.height!==b&&(l.current.style.height=b),u.current=!1}};Id(()=>{f()},[]),Id(()=>{if("undefined"==typeof IntersectionObserver||!l.current)return;const e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&m()},{threshold:0});return e.observe(l.current),()=>e.disconnect()},[]),Id(()=>{l.current&&Vd(l.current)},[i,n,Kd([o,"optionalAccess",e=>e.choice,"optionalAccess",e=>e.value])]),Id(()=>{t?f():h({height:0,width:0})},[Kd([t,"optionalAccess",e=>e.value])]),Id(()=>{n||r||(d.current={width:l.current.offsetWidth,height:l.current.offsetHeight})},[t,n,r]);const v=o&&n&&o.choice&&o.choice.value,b=t&&t.value,y=n||r?{width:Kd([d,"access",e=>e.current,"optionalAccess",e=>e.width]),height:Kd([d,"access",e=>e.current,"optionalAccess",e=>e.height])}:(()=>{const e=isNaN(parseFloat(s))?0:parseFloat(s),t=isNaN(parseFloat(a))?0:parseFloat(a);return{...{height:p.height||t,width:p.width||e},...e?{}:{minWidth:90},...t?{}:{minHeight:32}}})();return Pd.createElement(Jd,{clickable:!1,disabled:e,ref:l,component:"span",label:Pd.createElement(Pd.Fragment,null,Pd.createElement(Gd,{ref:c,draggable:!0,className:Wd({over:n,hidden:v}),dangerouslySetInnerHTML:{__html:b||""}}),v&&Pd.createElement(Gd,{draggable:!0,className:Wd({over:n,dragged:!0}),dangerouslySetInnerHTML:{__html:v||""}})),className:Wd({over:n,parentOver:n,correct:void 0!==i&&i,incorrect:void 0!==i&&!i}),variant:e?"outlined":void 0,style:y})}function Qd({id:e,disabled:t,duplicates:n,choice:r,correct:o,onChange:i,emptyResponseAreaWidth:s,emptyResponseAreaHeight:a,instanceId:l,selectedItem:c,onSelectClick:d,onPlacementClick:u}){const[p,h]=$d(!1),g={id:e,choice:r,instanceId:l,fromChoice:!1,type:"MaskBlank"},{attributes:f,listeners:m,setNodeRef:v,isDragging:b}=od({id:`mask-blank-drag-${e}`,disabled:t||!r,data:g,attributes:{tabIndex:r&&!t?0:-1}}),{setNodeRef:y,isOver:x,active:E}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=el("Droppable"),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=vl(Yc),d=Cl({disabled:n}),u=Cl(!1),p=Cl(null),h=Cl(null),{disabled:g,updateMeasurementsFor:f,timeout:m}={...id,...o},v=Ja(null!=f?f:r),b=jc({callback:xl(()=>{u.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(v.current)?v.current:[v.current]),h.current=null},m)):u.current=!0},[m]),disabled:g||!s}),y=xl((e,t)=>{b&&(t&&(b.unobserve(t),u.current=!1),e&&b.observe(e))},[b]),[x,E]=Xa(y),C=Ja(t);return bl(()=>{b&&x.current&&(b.disconnect(),u.current=!1,b.observe(x.current))},[x,b]),bl(()=>(a({type:Nl.RegisterDroppable,element:{id:r,key:i,disabled:n,node:x,rect:p,data:C}}),()=>a({type:Nl.UnregisterDroppable,key:i,id:r})),[r]),bl(()=>{n!==d.current.disabled&&(a({type:Nl.SetDroppableDisabled,id:r,key:i,disabled:n}),d.current.disabled=n)},[r,i,n,a]),{active:s,rect:p,isOver:(null==l?void 0:l.id)===r,node:x,over:l,setNodeRef:E}}({id:`mask-blank-drop-${e}`,data:{id:e,accepts:["MaskBlank"],instanceId:l}}),C=!!c&&!1===c.fromChoice&&c.id===e,w=()=>{t||(C?Kd([d,"optionalCall",e=>e(g)]):c?Kd([u,"optionalCall",t=>t(e)]):r&&Kd([d,"optionalCall",e=>e(g)]))},S=!r&&!t,k=!!r&&!t,_=!!c,A=x||_&&p&&!t;return Pd.createElement(qd,{ref:y,role:S?"button":void 0,tabIndex:S?0:-1,onClick:w,onKeyDown:S?e=>{"Space"!==e.code&&"Enter"!==e.code||(e.preventDefault(),w())}:void 0,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),dragged:b,over:A,selected:C,showsPointerCursor:_&&!t},Pd.createElement(Yd,{ref:v,...k?f:{},...m},Pd.createElement(Xd,{id:e,disabled:t,duplicates:n,choice:r,isOver:A,dragItem:Kd([E,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),correct:o,onChange:i,emptyResponseAreaWidth:s,emptyResponseAreaHeight:a,instanceId:l})))}function Zd(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}Xd.defaultProps={emptyResponseAreaWidth:0,emptyResponseAreaHeight:0},Xd.propTypes={id:Fd.oneOfType([Fd.string,Fd.number]),disabled:Fd.bool,duplicates:Fd.bool,choice:Fd.object,isOver:Fd.bool,dragItem:Fd.object,correct:Fd.bool,onChange:Fd.func,emptyResponseAreaWidth:Fd.oneOfType([Fd.string,Fd.number]),emptyResponseAreaHeight:Fd.oneOfType([Fd.string,Fd.number]),instanceId:Fd.string},Qd.defaultProps={emptyResponseAreaWidth:0,emptyResponseAreaHeight:0},Qd.propTypes={id:Fd.oneOfType([Fd.string,Fd.number]),disabled:Fd.bool,duplicates:Fd.bool,choice:Fd.object,correct:Fd.bool,onChange:Fd.func,emptyResponseAreaWidth:Fd.oneOfType([Fd.string,Fd.number]),emptyResponseAreaHeight:Fd.oneOfType([Fd.string,Fd.number]),instanceId:Fd.string,selectedItem:Fd.object,onSelectClick:Fd.func,onPlacementClick:Fd.func};const eu=(e,{active:t,context:n,currentCoordinates:r})=>{const{code:o}=e,i=o===pc.Tab,s=o===pc.Down||o===pc.Up||o===pc.Left||o===pc.Right;if(!i&&!s)return;if(s)return mc(e,{context:n,currentCoordinates:r});e.preventDefault();const{droppableRects:a,droppableContainers:l,collisionRect:c}=n;if(!a||0===a.size)return r;const d=Zd([t,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),u=d&&!1===d.fromChoice&&null!=d.id?`mask-blank-drop-${d.id}`:void 0,p=[];let h;for(const[e,t]of l){if(Zd([t,"optionalAccess",e=>e.disabled]))continue;if(e===u)continue;const n=a.get(e);if(!n)continue;const r={x:n.left+n.width/2,y:n.top+n.height/2},o={id:e,rect:n,dropPosition:{x:n.left,y:n.top+n.height/2},center:r};"drag-in-the-blank-droppable"===e?h=o:p.push(o)}if(0===p.length&&!h)return r;const g=e.shiftKey;p.sort((e,t)=>Math.abs(e.center.y-t.center.y)>10?e.center.y-t.center.y:e.center.x-t.center.x),h&&p.push(h);const f=c?{x:c.left+c.width/2,y:c.top+c.height/2}:r;let m=p.findIndex(e=>f.x>=e.rect.left&&f.x<=e.rect.right&&f.y>=e.rect.top&&f.y<=e.rect.bottom);if(-1===m){let e=1/0;for(let t=0;t<p.length;t++){const n=tu(r,p[t].dropPosition);n<e&&(e=n,m=t)}}return p[g?(m-1+p.length)%p.length:(m+1)%p.length].dropPosition},tu=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),nu=e,ru=n,{DragProvider:ou}=p;function iu(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const su=Na("blank",e=>(t,n,r)=>{const o=iu([t,"access",e=>e.data,"optionalAccess",e=>e.dataset])||{};if("blank"===o.component){const{disabled:i,duplicates:s,correctResponse:a,feedback:l,showCorrectAnswer:c,emptyResponseAreaWidth:d,emptyResponseAreaHeight:u,instanceId:p,isDragging:h,selectedItem:g,onSelectClick:f,onPlacementClick:m}=e,v=c?a[o.id]:n[o.id],b=v&&e.choices.find(e=>e.id===v);return nu.createElement(Qd,{key:`${t.type}-${o.id}`,correct:c||l&&l[o.id],disabled:i,duplicates:s,choice:b,id:o.id,emptyResponseAreaWidth:d,emptyResponseAreaHeight:u,onChange:(e,t)=>{const o={...n};void 0===t?delete o[e]:o[e]=t,r(o)},instanceId:p,isDragging:h,selectedItem:g,onSelectClick:f,onPlacementClick:m})}});class au extends nu.Component{constructor(e){super(e),au.prototype.__init.call(this),au.prototype.__init2.call(this),au.prototype.__init3.call(this),au.prototype.__init4.call(this),au.prototype.__init5.call(this),au.prototype.__init6.call(this),au.prototype.__init7.call(this),au.prototype.__init8.call(this),au.prototype.__init9.call(this),au.prototype.__init10.call(this),au.prototype.__init11.call(this),au.prototype.__init12.call(this),au.prototype.__init13.call(this),au.prototype.__init14.call(this),this.state={activeDragItem:null,dropAnimation:void 0,selectedItem:null},this.lastDragEndAt=0}static __initStatic(){this.propTypes={markup:ru.string,layout:ru.object,choicesPosition:ru.string,choices:ru.array,value:ru.object,onChange:ru.func,duplicates:ru.bool,disabled:ru.bool,feedback:ru.object,correctResponse:ru.object,showCorrectAnswer:ru.bool,emptyResponseAreaWidth:ru.oneOfType([ru.string,ru.number]),emptyResponseAreaHeight:ru.oneOfType([ru.string,ru.number]),instanceId:ru.string}}static __initStatic2(){this.defaultProps={instanceId:"drag-in-the-blank"}}__init(){this.handleDragStart=e=>{const{active:t}=e;iu([t,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current])&&this.setState({activeDragItem:t.data.current,dropAnimation:void 0,selectedItem:t.data.current})}}__init2(){this.renderDragOverlay=()=>{const{activeDragItem:e}=this.state;return e&&"MaskBlank"===e.type?nu.createElement(Dd,{disabled:e.disabled,choice:e.choice,instanceId:e.instanceId}):null}}__init3(){this.commitPlacement=(e,t)=>{const{onChange:n,value:r}=this.props;if(n)if(void 0!==t){if(!0===e.fromChoice){const o={...r};o[t]=e.choice.id,n(o)}else if(e.id&&e.id!==t){const o={...r};o[t]=e.choice.id,delete o[e.id],n(o)}}else if(!e.fromChoice&&e.id){const t={...r};delete t[e.id],n(t)}}}__init4(){this.handleDragEnd=e=>{const{active:t,over:n}=e,r=iu([t,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),o=iu([n,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),i=!!t&&!!n&&"MaskBlank"===iu([r,"optionalAccess",e=>e.type])&&iu([o,"optionalAccess",e=>e.accepts,"optionalAccess",e=>e.includes,"call",e=>e("MaskBlank")]);if(this.setState({activeDragItem:null,dropAnimation:i?null:void 0}),this.cancelSelection(),this.lastDragEndAt=Date.now(),!i)return;const s=!0===o.toChoiceBoard?void 0:o.id;this.commitPlacement(r,s)}}__init5(){this.onDragCancel=()=>{this.setState({activeDragItem:null,dropAnimation:void 0}),this.cancelSelection(),this.lastDragEndAt=Date.now()}}__init6(){this.isSameItem=(e,t)=>!(!e||!t||e.fromChoice!==t.fromChoice)&&(e.fromChoice?e.choice.id===t.choice.id:e.id===t.id)}__init7(){this.toggleItemSelection=e=>{this.setState(t=>({selectedItem:this.isSameItem(t.selectedItem,e)?null:e}))}}__init8(){this.cancelSelection=()=>{this.setState({selectedItem:null})}}__init9(){this.endAnyLiveKeyboardDrag=()=>{this.state.activeDragItem&&document.dispatchEvent(new KeyboardEvent("keydown",{code:"Escape",bubbles:!0,cancelable:!0}))}}__init10(){this.placeSelectedItem=e=>{const{selectedItem:t}=this.state;t&&(this.commitPlacement(t,e),this.cancelSelection(),this.endAnyLiveKeyboardDrag())}}__init11(){this.isClickSoonAfterDragEnd=()=>Date.now()-this.lastDragEndAt<250}__init12(){this.onItemClick=e=>{this.isClickSoonAfterDragEnd()||(this.endAnyLiveKeyboardDrag(),this.toggleItemSelection(e))}}__init13(){this.onPlacementClick=e=>{this.isClickSoonAfterDragEnd()||this.placeSelectedItem(e)}}__init14(){this.getPositionDirection=e=>{let t,n,r;switch(e){case"left":t="row",r="center";break;case"right":t="row-reverse",n="flex-end",r="center";break;case"below":t="column-reverse";break;default:t="column"}return{flexDirection:t,justifyContent:n,alignItems:r}}}render(){const{markup:e,duplicates:t,value:n,onChange:r,choicesPosition:o,choices:i,correctResponse:s,disabled:a,feedback:l,showCorrectAnswer:c,emptyResponseAreaWidth:d,emptyResponseAreaHeight:u,layout:p,instanceId:h}=this.props,g=o||"below",f={display:"flex",minWidth:"100px",...this.getPositionDirection(g)};return nu.createElement(ou,{onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd,onDragCancel:this.onDragCancel,collisionDetection:Fl,keyboardCoordinateGetter:eu,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter"]}},nu.createElement("div",{ref:e=>this.rootRef=e,style:f},nu.createElement(jd,{choicePosition:g,choices:i,value:n,duplicates:t,disabled:a,instanceId:h,selectedItem:this.state.selectedItem,onSelectClick:this.onItemClick,onPlacementClick:this.onPlacementClick}),nu.createElement(su,{elementType:"drag-in-the-blank",markup:e,layout:p,value:n,choices:i,onChange:r,disabled:a,duplicates:t,feedback:l,correctResponse:s,showCorrectAnswer:c,emptyResponseAreaWidth:d,emptyResponseAreaHeight:u,instanceId:h,isDragging:!!this.state.activeDragItem,selectedItem:this.state.selectedItem,onSelectClick:this.onItemClick,onPlacementClick:this.onPlacementClick}),nu.createElement(vd,{style:{pointerEvents:"none"},dropAnimation:this.state.dropAnimation},this.renderDragOverlay())))}}au.__initStatic(),au.__initStatic2();const lu=e,{styled:cu}=r,du=l;function uu(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}let pu,hu;"undefined"!=typeof window&&(pu=require("@pie-lib/editable-html-tip-tap").default,hu=cu(pu)(()=>({display:"inline-block",verticalAlign:"middle",margin:"4px",borderRadius:"4px",border:`1px solid ${Hr("black",Wr.BLACK)}`,"&.correct":{border:`1px solid ${qr()}`},"&.incorrect":{border:`1px solid ${Yr()}`}})));var gu=Na("input",e=>(t,n)=>{const{adjustedLimit:r,disabled:o,feedback:i,showCorrectAnswer:s,maxLength:a,spellCheck:l,pluginProps:c,onChange:d}=e,u=uu([t,"access",e=>e.data,"optionalAccess",e=>e.dataset])||{};if("input"===u.component){const p=(e.choices&&u&&e.choices[u.id]||[])[0],h=s?p&&p.label:n[u.id]||"",g=a&&a[u.id],f=i&&i[u.id],m=s||"correct"===f,v=!s&&"incorrect"===f,b=e=>{const t={...n,[u.id]:e};d(t)},y=e=>{if("Enter"===e.key||13===e.keyCode)return!0};return lu.createElement(hu,{id:u.id,key:`${t.type}-input-${u.id}`,disabled:s||o,disableUnderline:!0,onChange:b,markup:h||"",charactersLimit:r?g:25,activePlugins:["languageCharacters"],pluginProps:c,languageCharactersProps:[{language:"spanish"}],spellCheck:l,adjustWidthForLimit:!0,onKeyDown:y,autoWidthToolbar:!0,toolbarOpts:{minWidth:"auto",noBorder:!0,isHidden:!!uu([c,"optionalAccess",e=>e.characters,"optionalAccess",e=>e.disabled])},className:du({correct:m,incorrect:v})})}});Na("input",e=>(t,n,r)=>{const o=t.data&&t.data.dataset||{};if("input"===o.component)return e.customMarkMarkupComponent(o.id)});const fu=e,mu=n,{Button:vu}=i,{InputLabel:bu}=i,{Menu:yu}=i,{MenuItem:xu}=i,{ArrowDropDown:Eu}=c,{ArrowDropUp:Cu}=c,{Close:wu}=c,{Check:Su}=c,{styled:ku}=r,{renderMath:_u}=u,Au=ku(vu)(()=>({color:Kr(),border:`1px solid ${Hr("border-gray",Wr.BORDER_GRAY)}`,borderRadius:"4px",justifyContent:"space-between",backgroundColor:Gr(),position:"relative",height:"45px",width:"fit-content",margin:"2px",textTransform:"none","& span":{paddingRight:"24px"},"& svg":{position:"absolute",right:"4px",top:"calc(50% - 12px)",pointerEvents:"none",color:Kr(),marginLeft:"5px"},"&.Mui-focused":{outline:`3px solid ${Qr()}`,outlineOffset:"2px",borderWidth:"3px"},"&.disabledCorrect":{borderWidth:"2px",borderColor:qr(),color:`${Kr()} !important`},"&.disabledIncorrect":{borderWidth:"2px",borderColor:Jr(),color:`${Kr()} !important`}})),Ru=ku(yu)(()=>({"& .MuiPaper-root":{backgroundColor:Gr()},"& .MuiList-root":{padding:0}})),Ou=ku(xu)(()=>({height:24,overflow:"hidden",fontSize:"1rem",fontWeight:400,fontFamily:"inherit",lineHeight:"1.5em",whiteSpace:"nowrap",color:Kr(),backgroundColor:Gr(),"&.Mui-focusVisible":{outline:`3px solid ${Qr()}`,outlineOffset:"-1px",color:Kr(),backgroundColor:Gr()},"&:hover":{color:Kr(),backgroundColor:Xr()},boxSizing:"border-box",padding:"16px 8px",borderRadius:"4px","&.selected":{color:`${Kr()} !important`,backgroundColor:`${Gr()} !important`,"&:hover":{color:Kr(),backgroundColor:`${Xr()} !important`}}})),Du=ku("span")(()=>({fontSize:"max(1rem, 14px)"})),Tu=ku("span")(()=>({fontSize:"max(1rem, 14px)",flexShrink:0,paddingLeft:"8px"})),Lu=ku(bu)(()=>({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"})),Nu=ku(Su)(()=>({color:`${eo()} !important`,position:"absolute",top:"-8px !important",left:"-8px",marginLeft:"0 !important",borderRadius:"50%",fontSize:"16px",padding:"2px","&.correct":{backgroundColor:qr()},"&.incorrect":{backgroundColor:Jr()}})),ju=ku(wu)(()=>({color:`${eo()} !important`,position:"absolute",top:"-8px !important",left:"-8px",marginLeft:"0 !important",borderRadius:"50%",fontSize:"16px",padding:"2px","&.correct":{backgroundColor:qr()},"&.incorrect":{backgroundColor:Jr()}}));class Pu extends fu.Component{static __initStatic(){this.propTypes={id:mu.string,value:mu.string,disabled:mu.bool,onChange:mu.func,correct:mu.bool,choices:mu.arrayOf(mu.shape({value:mu.string,label:mu.string})),showCorrectAnswer:mu.bool,singleQuery:mu.bool,correctValue:mu.string}}constructor(e){super(e),Pu.prototype.__init.call(this),Pu.prototype.__init2.call(this),Pu.prototype.__init3.call(this),Pu.prototype.__init4.call(this),Pu.prototype.__init5.call(this),this.state={anchorEl:null,highlightedOptionId:null,menuWidth:null,previewValue:null},this.hiddenRef=fu.createRef(),this.buttonRef=fu.createRef(),this.previewRef=fu.createRef(),this.elementRefs=[]}componentDidMount(){this.hiddenRef.current&&null===this.state.menuWidth&&this.setState({menuWidth:this.hiddenRef.current.clientWidth})}componentDidUpdate(e,t){const n=this.hiddenRef.current;if(!t.anchorEl&&this.state.anchorEl&&this.elementRefs.forEach(e=>{if(!e)return;const t=e.querySelector("[data-latex], [data-raw]"),n=e.querySelector("mjx-container"),r=e.querySelector('[data-math-handled="true"]');!t||r&&n||_u(e)}),n){const e=n.clientWidth;e!==this.state.menuWidth&&(this.elementRefs.forEach(e=>{e&&_u(e)}),_u(n),this.setState({menuWidth:e}))}}__init(){this.handleClick=e=>{const{id:t,value:n,choices:r}=this.props;let o=null;if(n){const e=(r||[]).findIndex(e=>e.value===n);e>=0&&(o=`dropdown-option-${t}-${e}`)}this.setState({anchorEl:e.currentTarget,highlightedOptionId:o})}}__init2(){this.handleClose=()=>{const{value:e}=this.props;this.setState({anchorEl:null,previewValue:null,highlightedOptionId:null}),!e&&this.previewRef.current&&(this.previewRef.current.innerHTML="")}}__init3(){this.handleHighlight=e=>{const t={highlightedOptionId:`dropdown-option-${this.props.id}-${e}`};this.props.value||(t.previewValue=this.props.choices[e].value),this.setState(t)}}__init4(){this.handleSelect=(e,t)=>{this.props.onChange(this.props.id,e),this.handleHighlight(t),this.handleClose()}}__init5(){this.handleHover=e=>{if(this.props.value)return;const t=`dropdown-option-${this.props.id}-${e}`,n=this.state.previewValue;this.setState({highlightedOptionId:t,previewValue:n},()=>{const t=this.elementRefs[e],n=this.previewRef.current;t&&n&&(n.innerHTML=t.innerHTML)})}}getLabel(e,t){const n=(e||[]).find(e=>e.value===t);return n?n.label.trim():void 0}render(){const{id:e,correct:t,disabled:n,value:r,choices:o,showCorrectAnswer:i,singleQuery:s,correctValue:a}=this.props,{anchorEl:l}=this.state,c=Boolean(l),d=`dropdown-button-${e}`,u=`dropdown-menu-${e}`,p=`dropdown-value-${e}`;let h;this.elementRefs=[],n&&void 0!==t&&(h=t||i?"disabledCorrect":"disabledIncorrect");const g=parseInt(e,10)+1,f=s?"Query-label":`Query-label-${g}`,m=s?"Query":`Query ${g}`;let v=null;return n&&void 0!==t&&(v=t||i?fu.createElement(Nu,{className:"correct"}):fu.createElement(ju,{className:"incorrect"})),fu.createElement(fu.Fragment,null,fu.createElement("div",{ref:this.hiddenRef,style:{position:"absolute",visibility:"hidden",top:0,left:0},tabIndex:-1,"aria-hidden":"true"},(o||[]).map((e,t)=>fu.createElement(Ou,{key:t,tabIndex:-1,"aria-hidden":"true"},fu.createElement(Du,{dangerouslySetInnerHTML:{__html:e.label}})))),fu.createElement(Lu,{id:f,tabIndex:-1,"aria-hidden":"true"},m),fu.createElement(Au,{ref:this.buttonRef,style:{...this.state.menuWidth&&{minWidth:`calc(${this.state.menuWidth}px + 8px)`},borderWidth:c?"2px":"1px",transition:"border-width 0.2s ease-in-out"},"aria-controls":c?u:void 0,"aria-haspopup":"listbox","aria-expanded":c?"true":void 0,"aria-activedescendant":this.state.highlightedOptionId,onClick:this.handleClick,className:h,disabled:n,id:d,role:"combobox","aria-label":`Select an option for ${m}`,"aria-labelledby":p},v,fu.createElement(Du,{id:p,ref:this.previewRef,dangerouslySetInnerHTML:{__html:a||(c&&this.state.previewValue?this.getLabel(o,this.state.previewValue):this.getLabel(o,r)||"")}}),c?fu.createElement(Cu,null):fu.createElement(Eu,null)),fu.createElement(Ru,{id:u,anchorEl:l,keepMounted:!0,open:c,onClose:this.handleClose,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},transitionDuration:{enter:225,exit:195},slotProps:{paper:this.state.menuWidth?{style:{minWidth:this.state.menuWidth,padding:"4px"}}:void 0,list:{"aria-labelledby":d,role:"listbox",disablePadding:!0}}},(o||[]).map((t,n)=>{const o=`dropdown-option-${e}-${n}`;return fu.createElement(Ou,{id:o,className:t.value===r?"selected":"",selected:t.value===r,key:`${t.label}-${n}`,value:t.value,onClick:()=>this.handleSelect(t.value,n),role:"option","aria-selected":this.state.highlightedOptionId===o?"true":void 0,onMouseOver:()=>this.handleHover(n)},fu.createElement(Du,{ref:e=>this.elementRefs[n]=e,dangerouslySetInnerHTML:{__html:t.label}}),fu.createElement(Tu,{dangerouslySetInnerHTML:{__html:t.value===r?" &check;":""}}))})))}}Pu.__initStatic();const Iu=e;Na("dropdown",e=>(t,n,r)=>{const o=t.data&&t.data.dataset||{};if("dropdown"===o.component){const{choices:i,disabled:s,feedback:a,showCorrectAnswer:l}=e,c=i&&i[o.id]&&i[o.id].find(e=>e.correct),d=l?c&&c.value:n[o.id];return Iu.createElement(Pu,{key:`${t.type}-dropdown-${o.id}`,correct:a&&a[o.id]&&"correct"===a[o.id],disabled:s||l,value:d,correctValue:l?c&&c.label:void 0,id:o.id,onChange:r,choices:i[o.id],showCorrectAnswer:l,singleQuery:1==Object.keys(i).length})}});const Mu=e,$u=n,{styled:Fu}=r,{translator:zu}=ds,Bu=Fu(Io)(({alwaysShowCorrect:e})=>({color:Kr(),backgroundColor:Gr(),...e&&{"& *":{borderColor:`${Kr()} !important`}}})),Uu=Fu("div")(({theme:e})=>({marginBottom:e.spacing(2)})),Wu=Fu("div")(({theme:e})=>({marginBottom:e.spacing(2)})),Hu=Fu("h2")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"});class Vu extends Mu.Component{constructor(...e){super(...e),Vu.prototype.__init.call(this),Vu.prototype.__init2.call(this),Vu.prototype.__init3.call(this),Vu.prototype.__init4.call(this),Vu.prototype.__init5.call(this)}static __initStatic(){this.propTypes={alwaysShowCorrect:$u.bool,animationsDisabled:$u.bool,disabled:$u.bool,displayType:$u.string,feedback:$u.object,language:$u.string,markup:$u.string,maxLengthPerChoice:$u.array,maxLengthPerChoiceEnabled:$u.bool,mode:$u.string,note:$u.string,onChange:$u.func,playerSpellCheckEnabled:$u.bool,prompt:$u.string,rationale:$u.string,role:$u.string,showNote:$u.bool,teacherInstructions:$u.string,value:$u.object,responseAreaInputConfiguration:$u.object,model:$u.object.isRequired}}static __initStatic2(){this.defaultProps={value:{}}}__init(){this.state={showCorrectAnswer:this.props.alwaysShowCorrect||!1}}__init2(){this.getChangeSession=e=>e&&e.every((e,t,n)=>e===n[0]&&1===e)?this.props.onChange:Gt(this.props.onChange,200,{maxWait:200})}UNSAFE_componentWillReceiveProps(e){const{maxLengthPerChoice:t,language:n}=this.props;let{note:r}=this.props;var o,i;(function(e){if(null==e)return!0;if(ie(e)&&(_(e)||"string"==typeof e||"function"==typeof e.splice||me(e)||Se(e)||pe(e)))return!e.length;var t=yt(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(ae(e))return!De(e).length;for(var n in e)if(Xt.call(e,n))return!1;return!0})(e.feedback)&&this.setState({showCorrectAnswer:!1}),e.alwaysShowCorrect&&this.setState({showCorrectAnswer:!0}),t&&(o=t,i=e.maxLengthPerChoice,!Pt(o,i))&&(this.changeSession=this.getChangeSession(e.maxLengthPerChoice)),r&&n&&n!==e.language&&r===zu.t("common:commonCorrectAnswerWithAlternates",{lng:n})&&(r=zu.t("common:commonCorrectAnswerWithAlternates",{lng:e.language}))}__init3(){this.toggleShowCorrect=()=>{this.setState({showCorrectAnswer:!this.state.showCorrectAnswer})}}__init4(){this.changeSession=this.getChangeSession(this.props.maxLengthPerChoice)}__init5(){this.onChange=e=>{this.changeSession(e)}}render(){const{showCorrectAnswer:e}=this.state,{alwaysShowCorrect:t,animationsDisabled:n,mode:r,displayType:o,role:i,language:s,maxLengthPerChoice:a,maxLengthPerChoiceEnabled:l,note:c,playerSpellCheckEnabled:d,prompt:u,rationale:p,showNote:h,teacherInstructions:g,responseAreaInputConfiguration:f,model:m,value:v}=this.props,{extraCSSRules:b}=m||{},y=(e||"view"===r&&"instructor"===i)&&h&&c,x=Mu.createElement(ni,{defaultClassName:"teacher-instructions",prompt:g}),E=Mu.createElement(ni,{prompt:p}),C=p&&(li(p)||di(p)),w=g&&(li(g)||di(g));return Mu.createElement(Bu,{extraCSSRules:b,alwaysShowCorrect:t,style:{display:`${o}`}},"gather"===r&&Mu.createElement(Hu,null,"Fill in the Blank Question"),w&&Mu.createElement(Wu,null,n?x:Mu.createElement(ko,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},x)),u&&Mu.createElement(ni,{prompt:u}),!t&&"evaluate"===r&&Mu.createElement(Es,{show:!0,toggled:e,onToggle:this.toggleShowCorrect,language:s}),Mu.createElement(gu,{...this.props,onChange:this.onChange,showCorrectAnswer:e,value:v,maxLength:a,adjustedLimit:l,spellCheck:d,pluginProps:f}),y&&Mu.createElement(Uu,{dangerouslySetInnerHTML:{__html:c}}),C&&Mu.createElement(Wu,null,n?E:Mu.createElement(ko,{labels:{hidden:"Show Rationale",visible:"Hide Rationale"}},E)))}}Vu.__initStatic(),Vu.__initStatic2();const Ku=e,{createRoot:qu}=d,Yu=s,{renderMath:Ju}=u,Gu=Yu("pie-element:explicit-constructed-response:print");class Xu extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=Gt(()=>{if(this._model&&this._session){const e=((e,t)=>{const n="instructor"===t.role;return e.prompt=!1!==e.promptEnabled?e.prompt:void 0,e.teacherInstructions=n&&!1!==e.teacherInstructionsEnabled?e.teacherInstructions:void 0,e.rationale=n&&!1!==e.rationaleEnabled?e.rationale:void 0,e.alwaysShowCorrect=n,e.mode=n?"evaluate":e.mode,e.disabled=!0,e.animationsDisabled=!0,e})(this._model,this._options),t=this._options&&Ku.createElement(Vu,{...e,onChange:()=>{}});this._root||(this._root=qu(this)),this._root.render(t),queueMicrotask(()=>{Gu("render complete - render math"),Ju(this)})}else Gu("skip")},50,{leading:!1,trailing:!0})}set options(e){this._options=e}set model(e){this._model=e,this._rerender()}connectedCallback(){}disconnectedCallback(){this._root&&this._root.unmount()}}export{Xu as default};
1
+ import{_dll_react as e,_dll_react_dom as t,_dll_prop_types as n,_dll_mui__material_styles as r,_dll_mui__material_colors as o,_dll_mui__material as i,_dll_debug as s,_dll_mui__material_collapse as a,_dll_classnames as l,_dll_mui__icons_material as c,_dll_react_dom_client as d}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as u}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";import{_dll_pie_lib__drag as p}from"../../../@pie-lib/drag-module@5.0.0/module/index.js";var h="object"==typeof global&&global&&global.Object===Object&&global,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),m=f.Symbol,v=Object.prototype,b=v.hasOwnProperty,y=v.toString,x=m?m.toStringTag:void 0;var E=Object.prototype.toString;var C=m?m.toStringTag:void 0;function w(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":C&&C in Object(e)?function(e){var t=b.call(e,x),n=e[x];try{e[x]=void 0;var r=!0}catch(e){}var o=y.call(e);return r&&(t?e[x]=n:delete e[x]),o}(e):function(e){return E.call(e)}(e)}function S(e){return null!=e&&"object"==typeof e}function k(e){return"symbol"==typeof e||S(e)&&"[object Symbol]"==w(e)}var _=Array.isArray,A=m?m.prototype:void 0,R=A?A.toString:void 0;function O(e){if("string"==typeof e)return e;if(_(e))return function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(e,O)+"";if(k(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var T=/\s/;var D=/^\s+/;function L(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&T.test(e.charAt(t)););return t}(e)+1).replace(D,""):e}function N(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var j=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,I=/^0o[0-7]+$/i,M=parseInt;function $(e){if("number"==typeof e)return e;if(k(e))return NaN;if(N(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=N(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=L(e);var n=P.test(e);return n||I.test(e)?M(e.slice(2),n?2:8):j.test(e)?NaN:+e}function F(e){return e}function z(e){if(!N(e))return!1;var t=w(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var B,W=f["__core-js_shared__"],H=(B=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"";var U=Function.prototype.toString;function V(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var K=/^\[object .+?Constructor\]$/,q=Function.prototype,Y=Object.prototype,J=q.toString,G=Y.hasOwnProperty,X=RegExp("^"+J.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q(e){return!(!N(e)||(t=e,H&&H in t))&&(z(e)?X:K).test(V(e));var t}function Z(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Q(n)?n:void 0}var ee=Z(f,"WeakMap"),te=/^(?:0|[1-9]\d*)$/;function ne(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&te.test(e))&&e>-1&&e%1==0&&e<t}function re(e,t){return e===t||e!=e&&t!=t}function oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ie(e){return null!=e&&oe(e.length)&&!z(e)}var se=Object.prototype;function ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||se)}function le(e){return S(e)&&"[object Arguments]"==w(e)}var ce=Object.prototype,de=ce.hasOwnProperty,ue=ce.propertyIsEnumerable,pe=le(function(){return arguments}())?le:function(e){return S(e)&&de.call(e,"callee")&&!ue.call(e,"callee")};var he="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=he&&"object"==typeof module&&module&&!module.nodeType&&module,fe=ge&&ge.exports===he?f.Buffer:void 0,me=(fe?fe.isBuffer:void 0)||function(){return!1},ve={};ve["[object Float32Array]"]=ve["[object Float64Array]"]=ve["[object Int8Array]"]=ve["[object Int16Array]"]=ve["[object Int32Array]"]=ve["[object Uint8Array]"]=ve["[object Uint8ClampedArray]"]=ve["[object Uint16Array]"]=ve["[object Uint32Array]"]=!0,ve["[object Arguments]"]=ve["[object Array]"]=ve["[object ArrayBuffer]"]=ve["[object Boolean]"]=ve["[object DataView]"]=ve["[object Date]"]=ve["[object Error]"]=ve["[object Function]"]=ve["[object Map]"]=ve["[object Number]"]=ve["[object Object]"]=ve["[object RegExp]"]=ve["[object Set]"]=ve["[object String]"]=ve["[object WeakMap]"]=!1;var be,ye="object"==typeof exports&&exports&&!exports.nodeType&&exports,xe=ye&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=xe&&xe.exports===ye&&h.process,Ce=function(){try{var e=xe&&xe.require&&xe.require("util").types;return e||Ee&&Ee.binding&&Ee.binding("util")}catch(e){}}(),we=Ce&&Ce.isTypedArray,Se=we?(be=we,function(e){return be(e)}):function(e){return S(e)&&oe(e.length)&&!!ve[w(e)]},ke=Object.prototype.hasOwnProperty;function _e(e,t){var n=_(e),r=!n&&pe(e),o=!n&&!r&&me(e),i=!n&&!r&&!o&&Se(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!ke.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ne(c,l))||a.push(c);return a}var Ae=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Re=Ae,Oe=Object.prototype.hasOwnProperty;function Te(e){if(!ae(e))return Re(e);var t=[];for(var n in Object(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function De(e){return ie(e)?_e(e):Te(e)}var Le=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ne=/^\w*$/;function je(e,t){if(_(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!k(e))||(Ne.test(e)||!Le.test(e)||null!=t&&e in Object(t))}var Pe=Z(Object,"create");var Ie=Object.prototype.hasOwnProperty;var Me=Object.prototype.hasOwnProperty;function $e(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fe(e,t){for(var n=e.length;n--;)if(re(e[n][0],t))return n;return-1}$e.prototype.clear=function(){this.__data__=Pe?Pe(null):{},this.size=0},$e.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$e.prototype.get=function(e){var t=this.__data__;if(Pe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ie.call(t,e)?t[e]:void 0},$e.prototype.has=function(e){var t=this.__data__;return Pe?void 0!==t[e]:Me.call(t,e)},$e.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pe&&void 0===t?"__lodash_hash_undefined__":t,this};var ze=Array.prototype.splice;function Be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Be.prototype.clear=function(){this.__data__=[],this.size=0},Be.prototype.delete=function(e){var t=this.__data__,n=Fe(t,e);return!(n<0)&&(n==t.length-1?t.pop():ze.call(t,n,1),--this.size,!0)},Be.prototype.get=function(e){var t=this.__data__,n=Fe(t,e);return n<0?void 0:t[n][1]},Be.prototype.has=function(e){return Fe(this.__data__,e)>-1},Be.prototype.set=function(e,t){var n=this.__data__,r=Fe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var We=Z(f,"Map");function He(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Ue(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ue.prototype.clear=function(){this.size=0,this.__data__={hash:new $e,map:new(We||Be),string:new $e}},Ue.prototype.delete=function(e){var t=He(this,e).delete(e);return this.size-=t?1:0,t},Ue.prototype.get=function(e){return He(this,e).get(e)},Ue.prototype.has=function(e){return He(this,e).has(e)},Ue.prototype.set=function(e,t){var n=He(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ve(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Ve.Cache||Ue),n}Ve.Cache=Ue;var Ke=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qe=/\\(\\)?/g,Ye=function(e){var t=Ve(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ke,function(e,n,r,o){t.push(r?o.replace(qe,"$1"):n||e)}),t}),Je=Ye;function Ge(e,t){return _(e)?e:je(e,t)?[e]:Je(function(e){return null==e?"":O(e)}(e))}function Xe(e){if("string"==typeof e||k(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Qe(e,t){for(var n=0,r=(t=Ge(t,e)).length;null!=e&&n<r;)e=e[Xe(t[n++])];return n&&n==r?e:void 0}function Ze(e,t,n){var r=null==e?void 0:Qe(e,t);return void 0===r?n:r}function et(e){var t=this.__data__=new Be(e);this.size=t.size}et.prototype.clear=function(){this.__data__=new Be,this.size=0},et.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},et.prototype.get=function(e){return this.__data__.get(e)},et.prototype.has=function(e){return this.__data__.has(e)},et.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Be){var r=n.__data__;if(!We||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ue(r)}return n.set(e,t),this.size=n.size,this};var tt=Object.prototype.propertyIsEnumerable,nt=Object.getOwnPropertySymbols,rt=nt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(nt(e),function(t){return tt.call(e,t)}))}:function(){return[]};function ot(e){return function(e,t,n){var r=t(e);return _(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,De,rt)}var it=Z(f,"DataView"),st=Z(f,"Promise"),at=Z(f,"Set"),lt="[object Map]",ct="[object Promise]",dt="[object Set]",ut="[object WeakMap]",pt="[object DataView]",ht=V(it),gt=V(We),ft=V(st),mt=V(at),vt=V(ee),bt=w;(it&&bt(new it(new ArrayBuffer(1)))!=pt||We&&bt(new We)!=lt||st&&bt(st.resolve())!=ct||at&&bt(new at)!=dt||ee&&bt(new ee)!=ut)&&(bt=function(e){var t=w(e),n="[object Object]"==t?e.constructor:void 0,r=n?V(n):"";if(r)switch(r){case ht:return pt;case gt:return lt;case ft:return ct;case mt:return dt;case vt:return ut}return t});var yt=bt,xt=f.Uint8Array;function Et(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ue;++t<n;)this.add(e[t])}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wt(e,t){return e.has(t)}Et.prototype.add=Et.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Et.prototype.has=function(e){return this.__data__.has(e)};function St(e,t,n,r,o,i){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var u=-1,p=!0,h=2&n?new Et:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var g=e[u],f=t[u];if(r)var m=s?r(f,g,u,t,e,i):r(g,f,u,e,t,i);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!Ct(t,function(e,t){if(!wt(h,t)&&(g===e||o(g,e,n,r,i)))return h.push(t)})){p=!1;break}}else if(g!==f&&!o(g,f,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function kt(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function _t(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var At=m?m.prototype:void 0,Rt=At?At.valueOf:void 0;var Ot=Object.prototype.hasOwnProperty;var Tt="[object Arguments]",Dt="[object Array]",Lt="[object Object]",Nt=Object.prototype.hasOwnProperty;function jt(e,t,n,r,o,i){var s=_(e),a=_(t),l=s?Dt:yt(e),c=a?Dt:yt(t),d=(l=l==Tt?Lt:l)==Lt,u=(c=c==Tt?Lt:c)==Lt,p=l==c;if(p&&me(e)){if(!me(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new et),s||Se(e)?St(e,t,n,r,o,i):function(e,t,n,r,o,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new xt(e),new xt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return re(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=kt;case"[object Set]":var l=1&r;if(a||(a=_t),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var d=St(a(e),a(t),r,o,i,s);return s.delete(e),d;case"[object Symbol]":if(Rt)return Rt.call(e)==Rt.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var h=d&&Nt.call(e,"__wrapped__"),g=u&&Nt.call(t,"__wrapped__");if(h||g){var f=h?e.value():e,m=g?t.value():t;return i||(i=new et),o(f,m,n,r,i)}}return!!p&&(i||(i=new et),function(e,t,n,r,o,i){var s=1&n,a=ot(e),l=a.length;if(l!=ot(t).length&&!s)return!1;for(var c=l;c--;){var d=a[c];if(!(s?d in t:Ot.call(t,d)))return!1}var u=i.get(e),p=i.get(t);if(u&&p)return u==t&&p==e;var h=!0;i.set(e,t),i.set(t,e);for(var g=s;++c<l;){var f=e[d=a[c]],m=t[d];if(r)var v=s?r(m,f,d,t,e,i):r(f,m,d,e,t,i);if(!(void 0===v?f===m||o(f,m,n,r,i):v)){h=!1;break}g||(g="constructor"==d)}if(h&&!g){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}function Pt(e,t,n,r,o){return e===t||(null==e||null==t||!S(e)&&!S(t)?e!=e&&t!=t:jt(e,t,n,r,Pt,o))}function It(e){return e==e&&!N(e)}function Mt(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function $t(e){var t=function(e){for(var t=De(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,It(o)]}return t}(e);return 1==t.length&&t[0][2]?Mt(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,s=!r;if(null==e)return!i;for(e=Object(e);o--;){var a=n[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var l=(a=n[o])[0],c=e[l],d=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var u=new et;if(r)var p=r(c,d,l,e,t,u);if(!(void 0===p?Pt(d,c,3,r,u):p))return!1}}return!0}(n,e,t)}}function Ft(e,t){return null!=e&&t in Object(e)}function zt(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=Ge(t,e)).length,i=!1;++r<o;){var s=Xe(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&oe(o)&&ne(s,o)&&(_(e)||pe(e))}(e,t,Ft)}function Bt(e){return je(e)?function(e){return function(t){return null==t?void 0:t[e]}}(Xe(e)):function(e){return function(t){return Qe(t,e)}}(e)}function Wt(e){return"function"==typeof e?e:null==e?F:"object"==typeof e?_(e)?(t=e[0],n=e[1],je(t)&&It(n)?Mt(Xe(t),n):function(e){var r=Ze(e,t);return void 0===r&&r===n?zt(e,t):Pt(n,r,3)}):$t(e):Bt(e);var t,n}var Ht,Ut=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[Ht?s:++r];if(!1===t(o[a],a,o))break}return e},Vt=Ut;function Kt(e,t){return e&&Vt(e,t,De)}var qt=function(){return f.Date.now()},Yt=Math.max,Jt=Math.min;function Gt(e,t,n){var r,o,i,s,a,l,c=0,d=!1,u=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,i=o;return r=o=void 0,c=t,s=e.apply(i,n)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||u&&e-c>=i}function f(){var e=qt();if(g(e))return m(e);a=setTimeout(f,function(e){var n=t-(e-l);return u?Jt(n,i-(e-c)):n}(e))}function m(e){return a=void 0,p&&r?h(e):(r=o=void 0,s)}function v(){var e=qt(),n=g(e);if(r=arguments,o=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),d?h(e):s}(l);if(u)return clearTimeout(a),a=setTimeout(f,t),h(l)}return void 0===a&&(a=setTimeout(f,t)),s}return t=$(t)||0,N(n)&&(d=!!n.leading,i=(u="maxWait"in n)?Yt($(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=o=a=void 0},v.flush=function(){return void 0===a?s:m(qt())},v}var Xt=Object.prototype.hasOwnProperty;function Qt(){return Qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qt.apply(null,arguments)}function Zt(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function en(e,t){return en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},en(e,t)}function tn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,en(e,t)}function nn(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var rn=!1;var on=e.createContext(null),sn=function(e){return e.scrollTop};const an=e,ln=t;var cn="unmounted",dn="exited",un="entering",pn="entered",hn="exiting",gn=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=dn,r.appearStatus=un):o=pn:o=t.unmountOnExit||t.mountOnEnter?cn:dn,r.state={status:o},r.nextCallback=null,r}tn(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===cn?{status:dn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==un&&n!==pn&&(t=un):n!==un&&n!==pn||(t=hn)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===un){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this);n&&sn(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===dn&&this.setState({status:cn})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[ln.findDOMNode(this),r],i=o[0],s=o[1],a=this.getTimeouts(),l=r?a.appear:a.enter;!e&&!n||rn?this.safeSetState({status:pn},function(){t.props.onEntered(i)}):(this.props.onEnter(i,s),this.safeSetState({status:un},function(){t.props.onEntering(i,s),t.onTransitionEnd(l,function(){t.safeSetState({status:pn},function(){t.props.onEntered(i,s)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ln.findDOMNode(this);t&&!rn?(this.props.onExit(r),this.safeSetState({status:hn},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:dn},function(){e.props.onExited(r)})})})):this.safeSetState({status:dn},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],s=o[1];this.props.addEndListener(i,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===cn)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Zt(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return an.createElement(on.Provider,{value:null},"function"==typeof n?n(e,r):an.cloneElement(an.Children.only(n),r))},t}(an.Component);function fn(){}gn.contextType=on,gn.propTypes={},gn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fn,onEntering:fn,onEntered:fn,onExit:fn,onExiting:fn,onExited:fn},gn.UNMOUNTED=cn,gn.EXITED=dn,gn.ENTERING=un,gn.ENTERED=pn,gn.EXITING=hn;var mn=gn;const vn=e;var bn=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})},yn=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=nn(n.className,r):n.setAttribute("class",nn(n.className&&n.className.baseVal||"",r)));var n,r})},xn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}tn(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&sn(e),r&&(this.appliedClasses[t][n]=r,bn(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&yn(e,r),o&&yn(e,o),i&&yn(e,i)},n.render=function(){var e=this.props;e.classNames;var t=Zt(e,["classNames"]);return vn.createElement(mn,Qt({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(vn.Component);xn.defaultProps={classNames:""},xn.propTypes={};var En=xn;const{Children:Cn}=e,{cloneElement:wn}=e,{isValidElement:Sn}=e;function kn(e,t){var n=Object.create(null);return e&&Cn.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Sn(e)?t(e):e}(e)}),n}function _n(e,t,n){return null!=n[t]?n[t]:e.props[t]}function An(e,t,n){var r=kn(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var s in e)s in t?i.length&&(o[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];a[o[l][r]]=n(c)}a[l]=n(l)}for(r=0;r<i.length;r++)a[i[r]]=n(i[r]);return a}(t,r);return Object.keys(o).forEach(function(i){var s=o[i];if(Sn(s)){var a=i in t,l=i in r,c=t[i],d=Sn(c)&&!c.props.in;!l||a&&!d?l||!a||d?l&&a&&Sn(c)&&(o[i]=wn(s,{onExited:n.bind(null,s),in:c.props.in,exit:_n(s,"exit",e),enter:_n(s,"enter",e)})):o[i]=wn(s,{in:!1}):o[i]=wn(s,{onExited:n.bind(null,s),in:!0,exit:_n(s,"exit",e),enter:_n(s,"enter",e)})}}),o}const Rn=e;var On=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Tn=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}tn(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,kn(n.children,function(e){return wn(e,{onExited:r.bind(null,e),in:!0,appear:_n(e,"appear",n),enter:_n(e,"enter",n),exit:_n(e,"exit",n)})})):An(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=kn(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Qt({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Zt(e,["component","childFactory"]),o=this.state.contextValue,i=On(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Rn.createElement(on.Provider,{value:o},i):Rn.createElement(on.Provider,{value:o},Rn.createElement(t,r,i))},t}(Rn.Component);Tn.propTypes={},Tn.defaultProps={component:"div",childFactory:function(e){return e}};var Dn=Tn;const Ln=e,Nn=n,jn=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",Pn=({size:e,children:t})=>{const n={height:e=jn(e),width:e,display:"inline-block",position:"relative"};return Ln.createElement("div",{style:n},t)};Pn.propTypes={size:Nn.number,children:Nn.oneOfType([Nn.arrayOf(Nn.node),Nn.node]).isRequired};const In=e,Mn=n,$n=({size:e,children:t,sx:n})=>In.createElement(Pn,{size:e},In.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...n}},t));$n.propTypes={size:Mn.oneOfType([Mn.string,Mn.number]),children:Mn.oneOfType([Mn.arrayOf(Mn.node),Mn.node]).isRequired,sx:Mn.object},Mn.string.isRequired;const Fn=({fill:e})=>In.createElement("polygon",{transform:"translate(2, 0)",points:"34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3",fill:e});Fn.propTypes={fill:Mn.string.isRequired};const zn=({fill:e})=>In.createElement("path",{transform:"translate(1, 0)",d:"M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z",fill:e});zn.propTypes={fill:Mn.string.isRequired};const Bn=({fill:e})=>In.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});Bn.propTypes={fill:Mn.string.isRequired};const Wn=({fill:e})=>In.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});Wn.propTypes={fill:Mn.string.isRequired};const Hn=n,Un=e;var Vn=(e,t)=>{class n extends Un.Component{static __initStatic(){this.propTypes={iconSet:Hn.oneOf(["emoji","check"]),shape:Hn.oneOf(["round","square"]),category:Hn.oneOf(["feedback",void 0]),open:Hn.bool,size:Hn.oneOfType([Hn.number,Hn.string]),fg:Hn.string,bg:Hn.string}}static __initStatic2(){this.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,size:30,fg:"#4aaf46",bg:"#f8ffe2"}}render(){const{iconSet:n,shape:r,category:o,open:i,size:s,fg:a,bg:l}=this.props,c="check"===n?Un.createElement(e,{fill:a}):Un.createElement(t,{fill:a}),d="check"===n?Un.createElement(e,{fill:l}):Un.createElement(t,{fill:l});return i?Un.createElement($n,{size:s},d):Un.createElement($n,{size:s},"feedback"===o?"round"===r?Un.createElement(zn,{fill:l}):Un.createElement(Fn,{fill:l}):"round"===r?Un.createElement(Bn,{fill:l}):Un.createElement(Wn,{fill:l}),c)}}return n.__initStatic(),n.__initStatic2(),n};const Kn=n,qn=e,Yn=({fill:e})=>qn.createElement("g",{transform:"translate(1, 0)"},qn.createElement("path",{d:"M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2 c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z",fill:e}),qn.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),qn.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));Yn.propTypes={fill:Kn.string.isRequired};const Jn=({fill:e,x:t=0,y:n=0})=>qn.createElement("polygon",{transform:`translate(${t}, ${n})`,points:"19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4",fill:e});Jn.propTypes={fill:Kn.string.isRequired,x:Kn.number,y:Kn.number};const Gn=Vn(Jn,Yn);Gn.propTypes={iconSet:Kn.oneOf(["emoji","check"]),shape:Kn.oneOf(["round","square"]),category:Kn.oneOf(["feedback",void 0]),open:Kn.bool,fg:Kn.string,bg:Kn.string,size:Kn.oneOfType([Kn.string,Kn.number])},Gn.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const Xn=n,Qn=e,{styled:Zn}=r,er=({bgFill:e,fgFill:t})=>Qn.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-283 359 34 35",style:{enableBackground:"new -283 359 34 35"}},Qn.createElement("circle",{cx:"-266",cy:"375.9",r:"14",fill:e}),Qn.createElement("path",{d:"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",fill:e}),Qn.createElement("polygon",{points:"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",fill:t}));er.propTypes={bgFill:Xn.string.isRequired,fgFill:Xn.string.isRequired};const tr=({bgFill:e,fgFill:t,borderFill:n})=>Qn.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-129.5 127 34 35",style:{enableBackground:"new -129.5 127 34 35"}},Qn.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"}),Qn.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"}),Qn.createElement("circle",{cx:"-114.2",cy:"143.5",r:"14",fill:e}),Qn.createElement("path",{d:"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",fill:n}),Qn.createElement("polygon",{points:"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",fill:t}));tr.propTypes={bgFill:Xn.string.isRequired,fgFill:Xn.string.isRequired,borderFill:Xn.string.isRequired};const nr=Zn("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),rr=({open:e,size:t})=>Qn.createElement(nr,{size:t},e?Qn.createElement(er,{bgFill:"#bce2ff",fgFill:"#1a9cff"}):Qn.createElement(tr,{bgFill:"white",fgFill:"#1a9cff",borderFill:"#bce2ff"}));rr.propTypes={open:Xn.bool,size:Xn.string},rr.defaultProps={open:!1};const or=n,ir=e,sr=({fill:e})=>ir.createElement("g",{transform:"translate(0.5, 0.5)"},ir.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",width:"16.6",height:"3.7",fill:e}),ir.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",width:"3.7",height:"16.6",fill:e}));sr.propTypes={fill:or.string.isRequired};const ar=({fill:e})=>ir.createElement("g",{transform:"translate(1,0)"},ir.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),ir.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),ir.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));ar.propTypes={fill:or.string.isRequired};const lr=Vn(sr,ar);lr.propTypes={iconSet:or.oneOf(["emoji","check"]),shape:or.oneOf(["round","square"]),category:or.oneOf(["feedback",void 0]),open:or.bool,fg:or.string,bg:or.string,size:or.oneOfType([or.string,or.number])},lr.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const cr=n,dr=e,ur=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return dr.createElement("g",null,dr.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),dr.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),dr.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},pr=({children:e,size:t})=>dr.createElement(Pn,{size:t},dr.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));pr.propTypes={children:cr.oneOfType([cr.arrayOf(cr.node),cr.node]).isRequired,size:cr.number};const hr=()=>dr.createElement("g",null,dr.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),dr.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),dr.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#7FABC6"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "})),gr=()=>dr.createElement("g",null,dr.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),dr.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),dr.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),dr.createElement("polygon",{style:{fill:"#1A9CFF"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "}));class fr extends dr.Component{constructor(e){super(e)}render(){return!0===this.props.open?dr.createElement(pr,null,dr.createElement(hr,null),dr.createElement(ur,null)):dr.createElement(pr,null,dr.createElement(gr,null),dr.createElement(ur,null))}}fr.propTypes={open:cr.bool},fr.defaultProps={open:!1};const mr=n,vr=e,br=({fill:e})=>vr.createElement("path",{fill:e,d:"M-130.4,142.1c0-2.1,1.7-3.9,3.9-3.9c0.3,0,0.5,0,0.8,0.1c-0.6-0.8-1.5-1.3-2.6-1.3c-1.8,0-3.3,1.5-3.3,3.3c0,1.1,0.5,2,1.3,2.6C-130.4,142.6-130.4,142.4-130.4,142.1z"});br.propTypes={fill:mr.string};class yr extends vr.Component{static __initStatic(){this.propTypes={classes:mr.object.isRequired,size:mr.number}}render(){const{size:e}=this.props;return!0===this.props.open?vr.createElement(Pn,{size:e},vr.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},vr.createElement("path",{fill:"#BCE2FF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),vr.createElement("path",{fill:"#BCE2FF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),vr.createElement(br,{fill:"#1A9CFF"}))):vr.createElement(Pn,{size:e},vr.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},vr.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-120.7,142.4c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-121.6,146-120.7,144.3-120.7,142.4z"}),vr.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-124.4,154.3h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-123.6,153.9-123.9,154.3-124.4,154.3z"}),vr.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-121.3,141.8c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.2,145.3-121.3,143.7-121.3,141.8z"}),",",vr.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-125,153.7h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.2,153.3-124.6,153.7-125,153.7z"}),vr.createElement("path",{fill:"#1A9CFF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),vr.createElement("path",{fill:"#1A9CFF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),vr.createElement(br,{fill:"1A9CFF"})))}}yr.__initStatic(),yr.propTypes={open:mr.bool},yr.defaultProps={open:!1};const xr=n,Er=e,Cr=({fill:e})=>Er.createElement("g",null,Er.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),Er.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));Cr.propTypes={fill:xr.string.isRequired};const wr=({fill:e})=>Er.createElement("polygon",{points:"14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5",fill:e});wr.propTypes={fill:xr.string.isRequired};const Sr=({fill:e})=>Er.createElement("g",null,Er.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),Er.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),Er.createElement("path",{d:"M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0 C25.7,26.4,25,27.1,24.2,27.1z",fill:e}));Sr.propTypes={fill:xr.string.isRequired};class kr extends Er.Component{constructor(e){super(e);const{fg:t="#464146",bg:n="white"}=this.props;this.icons={check:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Cr,{fill:t})),emoji:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Sr,{fill:t})),feedback:{check:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Sr,{fill:t})),emoji:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Sr,{fill:t})),square:{check:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Cr,{fill:t})),emoji:Er.createElement($n,null,Er.createElement(wr,{fill:n}),Er.createElement(Sr,{fill:t})),open:{check:Er.createElement($n,null,Er.createElement(Cr,{fill:n})),emoji:Er.createElement($n,null,Er.createElement(Sr,{fill:n}))}}}}}render(){const{iconSet:e,category:t,shape:n,open:r}=this.props;return void 0===t?this.icons[e]:void 0===n?this.icons.feedback[e]:!0===r?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}kr.propTypes={iconSet:xr.oneOf(["emoji","check",void 0]),shape:xr.oneOf(["square",void 0]),category:xr.oneOf(["feedback",void 0]),open:xr.bool,fg:xr.string,bg:xr.string},kr.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const _r=n,Ar=e,Rr=({fill:e})=>Ar.createElement("g",{transform:"translate(0, 0)"},Ar.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),Ar.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));Rr.propTypes={fill:_r.string.isRequired};const Or=({fill:e})=>Ar.createElement("g",{transform:"translate(2, 0)"},Ar.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),Ar.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),Ar.createElement("rect",{x:"10.9",y:"22.9",transform:"matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)",width:"14.3",height:"3.7",fill:e}));Or.propTypes={fill:_r.string.isRequired};const Tr=Vn(Rr,Or);Tr.propTypes={iconSet:_r.oneOf(["emoji","check"]),shape:_r.oneOf(["round","square"]),category:_r.oneOf(["feedback",void 0]),open:_r.bool,fg:_r.string,bg:_r.string,size:_r.oneOfType([_r.string,_r.number])},Tr.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const Dr=n,Lr=e,Nr=({fill:e})=>Lr.createElement("g",null,Lr.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),Lr.createElement("polygon",{points:"-112,147.7 -112,141.7 -115.8,141.7 -115.8,143.7 -114,143.7 -114,147.7 -116.2,147.7 -116.2,149.7 -109.8,149.7 -109.8,147.7",fill:e}));Nr.propTypes={fill:Dr.string.isRequired};const jr=({fill:e})=>Lr.createElement("path",{d:"M-113,158.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105,158.5-113,158.5z M-113,130.5c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-105.6,130.5-113,130.5z",fill:e});jr.propTypes={fill:Dr.string.isRequired};const Pr=({fill:e="#FFFFFF"})=>Lr.createElement("g",null,Lr.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-111.7,160.9c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5C-96.2,154-103.1,160.9-111.7,160.9z"}),Lr.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-112,159.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-104,159.5-112,159.5z"}),Lr.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));Pr.propTypes={fill:Dr.string};const Ir=({children:e,size:t})=>{const n=jn(t),r={height:n,width:n,display:"inline-block",position:"relative"};return Lr.createElement("div",{style:r},Lr.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};Ir.propTypes={children:Dr.oneOfType([Dr.arrayOf(Dr.node),Dr.node]).isRequired,size:Dr.oneOfType([Dr.string,Dr.number])};class Mr extends Lr.Component{render(){const{iconSet:e,open:t,fg:n="#1a9cff",bg:r="#bce2ff",border:o="#bbe3fd"}=this.props,i=Lr.createElement(Nr,{fill:n}),s={check:Lr.createElement(Ir,{size:this.props.size},Lr.createElement(Pr,null),i,Lr.createElement(jr,{fill:o})),emoji:Lr.createElement(Ir,{size:this.props.size},Lr.createElement(Pr,null),i,Lr.createElement(jr,{fill:o})),open:{check:Lr.createElement(Ir,{size:this.props.size},Lr.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Lr.createElement(Nr,{fill:r}),Lr.createElement(jr,{fill:"#FFFFFF"})),emoji:Lr.createElement(Ir,{size:this.props.size},Lr.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Lr.createElement(Nr,{fill:r}),Lr.createElement(jr,{fill:o}))}};return!0===t?s.open[e]:s[e]}}Mr.propTypes={iconSet:Dr.oneOf(["emoji","check"]),open:Dr.bool,fg:Dr.string,bg:Dr.string,border:Dr.string,size:Dr.oneOfType([Dr.string,Dr.number])},Mr.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};const{green:$r}=o,{indigo:Fr}=o,{orange:zr}=o,{pink:Br}=o,{red:Wr}=o,Hr={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:$r[500],CORRECT_SECONDARY:$r[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:zr[500],INCORRECT_SECONDARY:Wr[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:Wr[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:Fr[500],PRIMARY_LIGHT:Fr[200],PRIMARY_DARK:Fr[800],SECONDARY:Br.A400,SECONDARY_LIGHT:Br[200],SECONDARY_DARK:Br[900],TERTIARY:"#146EB3",TERTIARY_LIGHT:"#D0E2F0",BACKGROUND:"rgba(255,255,255,0)",BACKGROUND_DARK:"#ECEDF1",DROPDOWN_BACKGROUND:"#E0E1E6",SECONDARY_BACKGROUND:"rgba(241,241,241,1)",BORDER:"#9A9A9A",BORDER_LIGHT:"#D1D1D1",BORDER_DARK:"#646464",BORDER_GRAY:"#7E8494",TABLE_GRID:"black",TABLE_GRID_LIGHT:"#dfe2e5",TABLE_STRIPE:"#f6f8fa",BLACK:"#000000",WHITE:"#ffffff",TRANSPARENT:"transparent",FOCUS_CHECKED:"#BBDEFB",FOCUS_CHECKED_BORDER:"#1565C0",FOCUS_UNCHECKED:"#E0E0E0",FOCUS_UNCHECKED_BORDER:"#757575",BUTTON_FOCUS_OUTLINE:"#3B82F6",BLUE_GREY100:"#F3F5F7",BLUE_GREY300:"#C0C3CF",BLUE_GREY600:"#7E8494",BLUE_GREY900:"#152452",FADED_PRIMARY:"#DCDAFB",KEYPAD_BUTTON:"rgb(188, 194, 229)",KEYPAD_BUTTON_OPERATOR:"rgb(255, 159, 192)",KEYPAD_EMPTY_PLACEHOLDER:"rgba(245, 0, 87, 0.4)",KEYPAD_BUTTON_HOVER:"rgb(214, 218, 239)",KEYPAD_BUTTON_OPERATOR_HOVER:"rgb(255, 197, 217)",KEY_BOARD_FOCUS_INDICATOR:"#2B87FF",BUTTON_BORDER:"rgba(0, 0, 0, 0.23)",BUTTON_HOVER_BG:"rgba(0, 0, 0, 0.08)"};Object.freeze(Hr);const Ur=e=>(...t)=>{const n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},Vr=Ur("pie"),Kr=()=>Vr("text",Hr.TEXT),qr=()=>Vr("correct",Hr.CORRECT),Yr=()=>Vr("incorrect",Hr.INCORRECT),Jr=()=>Vr("incorrect-icon",Hr.INCORRECT_WITH_ICON),Gr=()=>Vr("background",Hr.BACKGROUND),Xr=()=>Vr("dropdown-background",Hr.DROPDOWN_BACKGROUND),Qr=()=>Vr("tertiary",Hr.TERTIARY),Zr=()=>Vr("table-stripe","background-dark",Hr.TABLE_STRIPE),eo=()=>Vr("white",Hr.WHITE),to=e,no=n,{styled:ro}=r,oo=ro("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),io=ro("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${Vr("disabled",Hr.DISABLED)})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${qr()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${Yr()})`}}),so=ro("div")({"&.feedback-enter":{height:"1px"},"&.feedback-enter-active":{height:"45px",transition:"height 500ms"},"&.feedback-exit":{height:"45px"},"&.feedback-exit-active":{height:"1px",transition:"height 200ms"}});class ao extends to.Component{constructor(...e){super(...e),ao.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:no.string,feedback:no.string}}__init(){this.nodeRef=to.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?to.createElement(En,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},to.createElement(so,{ref:this.nodeRef},to.createElement(oo,null,to.createElement(io,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return to.createElement("div",null,to.createElement(Dn,null,this.renderFeedback()))}}ao.__initStatic();const lo=e,co=n,{Popover:uo}=i,{styled:po}=r,ho=s("pie-libs:render-ui:response-indicators"),go=po("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),fo=po(uo)({cursor:"pointer"}),mo=po("div")({padding:"0",borderRadius:"4px"}),vo=(e,t)=>{class n extends lo.Component{constructor(e){super(e),n.prototype.__init.call(this),n.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{ho("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:n}=this.props,{anchorEl:r}=this.state;return lo.createElement(go,{hasFeedback:!!n},lo.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},lo.createElement(e,null)),n&&lo.createElement(fo,{PaperComponent:mo,open:!!r,anchorEl:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},lo.createElement(ao,{feedback:n,correctness:t})))}}return n.propTypes={feedback:co.string},n};vo(Gn,"correct"),vo(lr,"incorrect"),vo(Tr,"partially-correct"),vo(kr,"nothing-submitted");const bo=e,{styled:yo}=r,xo=a,Eo=n,{renderMath:Co}=u,wo=yo("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),So=yo(xo)(({theme:e})=>({paddingTop:e.spacing(2)}));class ko extends bo.Component{constructor(...e){super(...e),ko.prototype.__init.call(this),ko.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:Eo.string,children:Eo.object,labels:Eo.shape({visible:Eo.string,hidden:Eo.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){Co(this.root)}componentDidUpdate(){Co(this.root)}render(){const{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return bo.createElement("div",{className:n,ref:e=>this.root=e},bo.createElement("div",{onClick:this.toggleExpanded},bo.createElement(wo,null,r)),bo.createElement(So,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}ko.__initStatic(),ko.__initStatic2();const{Button:_o}=i,{styled:Ao}=r;Ao("div")({display:"flex",flexDirection:"column"}),Ao("div")({display:"flex",alignItems:"center",justifyContent:"center"}),Ao("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),Ao(_o)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const Ro=e,{createTheme:Oo}=r,{styled:To}=r,{StyledEngineProvider:Do}=r,{ThemeProvider:Lo}=r,No=n;const jo=Oo({typography:{fontFamily:"inherit"},palette:{action:{disabled:"rgba(0, 0, 0, 0.54);"}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:"inherit"}}},MuiButton:{styleOverrides:{contained:{backgroundColor:"#e0e0e0",color:"#000000","&:hover":{backgroundColor:"#bdbdbd"}}}}}}),Po=To("div")({"& table, th, td":{fontSize:"inherit"}});class Io extends Ro.Component{static __initStatic(){this.propTypes={className:No.string,children:No.array,extraCSSRules:No.shape({names:No.arrayOf(No.string),rules:No.string}),fontSizeFactor:No.number}}static __initStatic2(){this.defaultProps={extraCSSRules:{},fontSizeFactor:1}}constructor(e){super(e),this.classesSheet=document.createElement("style")}computeStyle(e){const t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),o=Math.max(n,r),i=null!=e&&"number"==typeof e?e:1;return 1!==i?{fontSize:o*i+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:o,...i}=r,s=this.computeStyle(n);return Ro.createElement(Do,{injectFirst:!0},Ro.createElement(Lo,{theme:jo},function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([o,"optionalAccess",e=>e.rules])?Ro.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${o.rules} }`}}):null,Ro.createElement(Po,{className:`${t} extraCSSRules`,...i,...s&&{style:s}},e)))}}Io.__initStatic(),Io.__initStatic2();const Mo=e,{styled:$o}=r,Fo=n,zo=$o(Io)({display:"flex",flexDirection:"column",position:"relative"});class Bo extends Mo.Component{static __initStatic(){this.propTypes={ariaLabel:Fo.string,children:Fo.oneOfType([Fo.arrayOf(Fo.node),Fo.node]).isRequired,role:Fo.string,extraCSSRules:Fo.shape({names:Fo.arrayOf(Fo.string),rules:Fo.string}),fontSizeFactor:Fo.number}}render(){const{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:o,classes:i}=this.props,s=t?{"aria-label":t,role:n}:{};return Mo.createElement(zo,{...s,extraCSSRules:r,fontSizeFactor:o,classes:i},e)}}Bo.__initStatic();const Wo=e,Ho=n;class Uo extends Wo.Component{static __initStatic(){this.propTypes={tag:Ho.string,className:Ho.string,html:Ho.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:n}=this.props,r=e||"div";return Wo.createElement(r,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}}Uo.__initStatic(),Uo.__initStatic2();const{InputLabel:Vo}=i,{FormControl:Ko}=i,qo=n,{styled:Yo}=r;Yo(Ko)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),Yo(Vo)(()=>({fontSize:"inherit",whiteSpace:"nowrap",margin:0,padding:0,alignSelf:"flex-start",position:"absolute",top:0,left:0,transformOrigin:"top left",pointerEvents:"none","&.MuiInputLabel-shrink":{transform:"scale(0.75) translate(0, -0.75em)"},"&:not(.MuiInputLabel-shrink)":{transform:"translate(0, 0)"}})),qo.oneOfType([qo.string,qo.object]).isRequired,qo.string,qo.oneOfType([qo.arrayOf(qo.node),qo.node]).isRequired;const Jo=e,{Component:Go}=e,{styled:Xo}=r,Qo=n,{renderMath:Zo}=u,ei=Xo("div")(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:"collapse"},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:"solid",borderColor:Vr("table-grid","text",Hr.TABLE_GRID)},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:Zr()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:Zr()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:".6em 1em",textAlign:"left"},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:"initial"},"&.prompt":{verticalAlign:"middle",color:Kr()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Kr()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),ti=/\\embed\{newLine\}\[\]/g;class ni extends Go{constructor(...e){super(...e),ni.prototype.__init.call(this),ni.prototype.__init2.call(this)}static __initStatic(){this.propTypes={prompt:Qo.string,tagName:Qo.string,className:Qo.string,onClick:Qo.func,defaultClassName:Qo.string,autoplayAudioEnabled:Qo.bool,customAudioButton:{playImage:Qo.string,pauseImage:Qo.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.promptRef=Jo.createRef()}__init2(){this.parsedText=e=>{const{customAudioButton:t}=this.props,n=document.createElement("div");n.innerHTML=e;const r=n.querySelector("audio");if(r){const e=document.createElement("source");if(e.setAttribute("type","audio/mp3"),e.setAttribute("src",r.getAttribute("src")),r.removeAttribute("src"),r.setAttribute("id","pie-prompt-audio-player"),r.appendChild(e),t){r.style.display="none";const e=document.createElement("div");e.id="play-audio-button",Object.assign(e.style,{cursor:"pointer",display:"block",width:"128px",height:"128px",backgroundImage:`url(${t.pauseImage})`,backgroundSize:"cover",borderRadius:"50%",border:"1px solid #326295"}),r.parentNode.insertBefore(e,r)}}return n.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById("play-audio-button"),r=document.getElementById("pie-prompt-audio-player");if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener("ended",i)}).catch(e=>{console.error("Error playing audio",e)}),!n||!r||!t)return;const o=()=>{r.paused&&(n.style.backgroundImage.includes(t.pauseImage)||r.play())},i=()=>{n.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},a=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};n.addEventListener("click",o),r.addEventListener("play",s),r.addEventListener("pause",a),r.addEventListener("ended",i),this._handlePlayClick=o,this._handleAudioPlay=s,this._handleAudioPause=a,this._handleAudioEnded=i}removeCustomAudioButtonListeners(){const e=document.getElementById("play-audio-button"),t=document.querySelector("audio");e&&t&&(e.removeEventListener("click",this._handlePlayClick),t.removeEventListener("play",this._handleAudioPlay),t.removeEventListener("pause",this._handleAudioPause),t.removeEventListener("ended",this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){const e=this.promptRef.current;e&&"function"==typeof Zo&&Zo(e)}alignImages(){const e=this.promptRef.current;if(!e)return;const t=e.getElementsByTagName("img");if(t&&t.length)for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){const t=e.attributes.alignment.value,n="center"===t?"center":"right"===t?"flex-end":"flex-start",r=e.parentElement;if("DIV"===r.tagName&&"flex"===r.style.display&&"100%"===r.style.width)r.style.justifyContent=n;else{const t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent=n;const o=e.cloneNode(!0);t.appendChild(o),r.replaceChild(t,e)}}}render(){const{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:o}=this.props,i=`${n||""} ${o||""} ${"legend"===t?"legend":""} preview-prompt`.trim();return Jo.createElement(ei,{as:t||"div",ref:this.promptRef,onClick:r,className:i,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(ti,"\\newline ")}})}}ni.__initStatic(),ni.__initStatic2();const ri=n,oi=e,ii=e=>oi.createElement(oi.Fragment,null,oi.Children.map(e.children,t=>oi.cloneElement(t,{"data-pie-readable":void 0===e.false})));ii.propTypes={children:ri.node,false:ri.bool};const si=n;let ai;si.node,si.string,"undefined"!=typeof window&&(ai=new DOMParser);const li=e=>{if(!e)return!1;const t=(e=>ai.parseFromString(e,"text/html").body.textContent)(e);return!(!t||!t.trim())};let ci;"undefined"!=typeof window&&(ci=new DOMParser);const di=e=>{if(!e)return!1;const t=ci.parseFromString(e,"text/html");return!!t.body.querySelector("img")||!!t.body.querySelector("video")||!!t.body.querySelector("audio")},ui=e,{useRef:pi}=e,hi=n,{styled:gi}=r,fi="height ease-in 300ms, opacity ease-in 300ms",mi=gi("div")(()=>({position:"relative",height:0,overflow:"hidden",display:"flex",visibility:"hidden",width:0,"&.enter":{transition:fi,opacity:1,height:"auto",width:"auto",visibility:"visible",minHeight:"25px"},"&.enter-done":{height:"auto",visibility:"visible",width:"auto",minHeight:"25px"},"&.exit":{transition:fi,opacity:0,height:0,visibility:"visible",width:0},"&.exit-done":{opacity:0,visibility:"hidden",height:0,width:0}})),vi=e=>{const{show:t,children:n,className:r}=e,o=pi(null);return ui.createElement(En,{nodeRef:o,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:"enter",enterDone:"enter-done",exit:"exit",exitDone:"exit-done"}},ui.createElement(mi,{ref:o,className:r},n))};function bi(e,t){return null!=e?e:t()}function yi(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}vi.propTypes={show:hi.bool.isRequired,className:hi.string,children:hi.oneOfType([hi.arrayOf(hi.node),hi.node]).isRequired};const xi=e=>"string"==typeof e,Ei=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ci=e=>null==e?"":""+e,wi=/###/g,Si=e=>e&&e.indexOf("###")>-1?e.replace(wi,"."):e,ki=e=>!e||xi(e),_i=(e,t,n)=>{const r=xi(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(ki(e))return{};const t=Si(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return ki(e)?{}:{obj:e,k:Si(r[o])}},Ai=(e,t,n)=>{const{obj:r,k:o}=_i(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],s=t.slice(0,t.length-1),a=_i(e,s,Object);for(;void 0===a.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=_i(e,s,Object),yi([a,"optionalAccess",e=>e.obj])&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},Ri=(e,t)=>{const{obj:n,k:r}=_i(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Oi=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?xi(e[r])||e[r]instanceof String||xi(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Oi(e[r],t[r],n):e[r]=t[r]);return e},Ti=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Di={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Li=e=>xi(e)?e.replace(/[&<>"'\/]/g,e=>Di[e]):e;const Ni=[" ",",","?","!",";"],ji=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const 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}}(20),Pi=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let s=e;s<r.length;++s)if(s!==e&&(i+=n),i+=r[s],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<r.length-1)continue;e+=s-e+1;break}o=t}return o},Ii=e=>yi([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),Mi={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){yi([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class $i{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Mi,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:(xi(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new $i(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new $i(this.logger,e)}}var Fi=new $i;class zi{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}}class Bi extends zi{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):xi(n)&&o?s.push(...n.split(o)):s.push(n)));const a=Ri(this.data,s);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=s[0],t=s[1],n=s.slice(2).join(".")),!a&&i&&xi(n)?Pi(yi([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),n,o):a}addResource(e,t,n,r,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),Ai(this.data,s,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(xi(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,o,i={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=Ri(this.data,s)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Oi(a,n,o):a={...a,...n},Ai(this.data,s,a),i.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 void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Wi={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=bi(yi([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,n,r,o)]),()=>t)}),t}};const Hi=Symbol("i18next/PATH_KEY");function Ui(e,t){const{[Hi]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(yi([n,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),o===Hi?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(bi(yi([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const Vi={},Ki=e=>!xi(e)&&"boolean"!=typeof e&&"number"!=typeof e;class qi extends zi{constructor(e,t={}){var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Fi.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===yi([r,"optionalAccess",e=>e.res]))return!1;const o=Ki(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Ni.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=ji.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:xi(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:xi(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Ui(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],r),l=a[a.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const d=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===yi([d,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return u?o?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${s}`:o?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:s;const p=this.resolve(e,r);let h=yi([p,"optionalAccess",e=>e.res]);const g=yi([p,"optionalAccess",e=>e.usedKey])||s,f=yi([p,"optionalAccess",e=>e.exactUsedKey])||s,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!xi(r.count),y=qi.hasDefaultValue(r),x=b?this.pluralResolver.getSuffix(d,r.count,r):"",E=r.ordinal&&b?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",C=b&&!r.ordinal&&0===r.count,w=C&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${E}`]||r.defaultValue;let S=h;v&&!h&&y&&(S=w);const k=Ki(S),_=Object.prototype.toString.apply(S);if(!(v&&S&&k&&["[object Number]","[object Function]","[object RegExp]"].indexOf(_)<0)||xi(m)&&Array.isArray(S))if(v&&xi(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(h)&&y&&(t=!0,h=w),this.isValidLookup(h)||(o=!0,h=s);const a=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:h,u=y&&w!==h&&this.options.updateMissing;if(o||t||u){if(this.logger.log(u?"updateKey":"missingKey",d,l,s,u?w:h),i){const e=this.resolve(s,{...r,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=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const o=y&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,u,r):yi([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,l,t,o,u,r),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);C&&r[`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,r[`defaultValue${t}`]||w)})}):n(e,s,w))}h=this.extendTranslation(h,e,r,p,n),o&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${l}${c}${s}`),(o||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,t?h:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,S,{...r,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(i){const e=Array.isArray(S),t=e?[]:{},n=e?f:g;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const o=`${n}${i}${e}`;t[e]=y&&!h?this.translate(o,{...r,defaultValue:Ki(w)?w[e]:void 0,joinArrays:!1,ns:a}):this.translate(o,{...r,joinArrays:!1,ns:a}),t[e]===o&&(t[e]=S[e])}h=t}}return o?(p.res=h,p.usedParams=this.getUsedParamsDetails(r),p):h}extendTranslation(e,t,n,r,o){if(yi([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.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}});const i=xi(e)&&(void 0!==yi([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(i){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let a=n.replace&&!xi(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,n.lng||this.language||r.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>yi([o,"optionalAccess",e=>e[0]])!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,s=xi(i)?[i]:i;return null!=e&&yi([s,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=Wi.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,s;return xi(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const a=this.extractFromKey(e,t),l=a.key;r=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const d=void 0!==t.count&&!xi(t.count),u=d&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(xi(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(s=e,Vi[`${h[0]}-${e}`]||!yi([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||yi([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(s)])||(Vi[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${s}" 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!!!")),h.forEach(r=>{if(this.isValidLookup(n))return;i=r;const s=[l];if(yi([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(s,l,r,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),u&&s.push(l+n)),p){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(r),d&&(t.ordinal&&0===e.indexOf(o)&&s.push(r+e.replace(o,this.options.pluralSeparator)),s.push(r+e),u&&s.push(r+n))}}let a;for(;a=s.pop();)this.isValidLookup(n)||(o=a,n=this.getResource(r,e,a,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return yi([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!xi(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class Yi{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Fi.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Ii(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Ii(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(xi(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}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("languageOnly"===this.options.load||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;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),xi(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return xi(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):xi(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const Ji={zero:0,one:1,two:2,few:3,many:4,other:5},Gi={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Xi{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Fi.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Ii("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Gi;if(!e.match(/-|_/))return Gi;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),yi([n,"optionalAccess",e=>e.resolvedOptions,"call",e=>e(),"access",e=>e.pluralCategories,"access",e=>e.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||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Ji[e]-Ji[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const 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))}}const Qi=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=Ri(e,n);return void 0!==r?r:Ri(t,n)})(e,t,n);return!i&&o&&xi(n)&&(i=Pi(e,n,r),void 0===i&&(i=Pi(t,n,r))),i},Zi=e=>e.replace(/\$/g,"$$$$");class es{constructor(e={}){this.logger=Fi.create("interpolator"),this.options=e,this.format=yi([e,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.format])||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:u,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Li,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Ti(o):i||"{{",this.suffix=s?Ti(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?Ti(u):p||Ti("$t("),this.nestingSuffix=h?Ti(h):g||Ti(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>yi([e,"optionalAccess",e=>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 o,i,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Qi(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),s=o.join(this.formatSeparator).trim();return this.format(Qi(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const c=yi([r,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,d=void 0!==yi([r,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Zi(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Zi(this.escape(e)):Zi(e)}].forEach(t=>{for(s=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,r);i=xi(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(d){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else xi(i)||this.useRawValueToEscape||(i=Ci(i));const a=t.safeValue(i);if(e=e.replace(o[0],a),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i;const s=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const s=o.match(/'/g),a=o.match(/"/g);(bi(yi([s,"optionalAccess",e=>e.length]),()=>0)%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let a=[];i={...n},i=i.replace&&!xi(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(a=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),o=t(s.call(this,r[1].trim(),i),i),o&&r[0]===e&&!xi(o))return o;xi(o)||(o=Ci(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),a.length&&(o=a.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}const ts=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Ii(r),o),t[s]=a),a(n)}},ns=e=>(t,n,r)=>e(Ii(n),r)(t);class rs{constructor(e={}){this.logger=Fi.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?ts:ns;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const 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()]=ts(t)}format(e,t,n,r={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const s=yi([r,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[r.interpolationkey]])||{},a=s.locale||s.lng||r.locale||r.lng||n;t=this.formats[o](e,a,{...i,...r,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class os extends zi{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Fi.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=[],yi([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(n,r.backend,r)])}queueLoad(e,t,n,r){const o={},i={},s={},a={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,r=!1,void 0===i[s]&&(i[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=_i(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}}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();xi(e)&&(e=this.languageUtils.toResolveHierarchy(e)),xi(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.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=""){const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},s=()=>{}){if(!yi([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||yi([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(yi([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const a={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,n,r,a):l(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>s(null,e)).catch(s):s(null,o)}catch(e){s(e)}else l(e,t,n,r,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else 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!!!")}}const is=()=>({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("object"==typeof e[1]&&(t=e[1]),xi(e[1])&&(t.defaultValue=e[1]),xi(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const 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}),ss=e=>(xi(e.ns)&&(e.ns=[e.ns]),xi(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),xi(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),yi([e,"access",e=>e.supportedLngs,"optionalAccess",e=>e.indexOf,"optionalCall",e=>e("cimode")])<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),as=()=>{};class ls extends zi{constructor(e={},t){var n;if(super(),this.options=ss(e),this.services={},this.logger=Fi,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),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,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(xi(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=is();var r;this.options={...n,...this.options,...ss(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(yi([r=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||yi([r,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||yi([r,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&r.options.backend.backends.some(e=>yi([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||yi([e,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0))||"undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Fi.init(o(this.modules.logger),this.options):Fi.init(null,this.options),e=this.modules.formatter?this.modules.formatter:rs;const t=new Yi(this.options);this.store=new Bi(this.options.resources,this.options);const r=this.services;r.logger=Fi,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new Xi(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||(r.formatter=o(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new es(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new os(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new qi(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||(t=as),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(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)});const i=Ei(),s=()=>{const 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?s():setTimeout(s,0),i}loadResources(e,t=as){let n=t;const r=xi(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===yi([r,"optionalAccess",e=>e.toLowerCase,"call",e=>e()])&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}yi([this,"access",e=>e.options,"access",e=>e.preload,"optionalAccess",e=>e.forEach,"optionalCall",e=>e(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){const r=Ei();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=as),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Wi.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&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++){const 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;const n=Ei();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=xi(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(xi(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),yi([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(i)])),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const s=this.options.keySeparator||".";let a;return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=Ui(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=Ui(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return xi(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return yi([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return yi([this,"access",e=>e.translator,"optionalAccess",e=>e.exists,"call",t=>t(...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;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=Ei();return this.options.ns?(xi(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){const n=Ei();xi(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(yi([this,"access",e=>e.languages,"optionalAccess",e=>e.length])>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=yi([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new Yi(is());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new ls(e,t);return n.createInstance=ls.createInstance,n}cloneInstance(e={},t=as){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new ls(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=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),{});o.store=new Bi(e,r),o.services.resourceStore=o.store}if(e.interpolation){const t={...is().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};o.services.interpolator=new es(n)}return o.translator=new qi(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const cs=ls.createInstance();cs.createInstance,cs.dir,cs.init,cs.loadResources,cs.reloadResources,cs.use,cs.changeLanguage,cs.getFixedT,cs.t,cs.exists,cs.setDefaultNamespace,cs.hasLoadedNamespace,cs.loadNamespaces,cs.loadLanguages;cs.init({fallbackLng:"en",lng:"en",debug:!0,resources:{en:{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."},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"}},common:{undo:"Undo",clearAll:"Clear all",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Show correct answer",hideCorrectAnswer:"Hide correct answer",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"}},es:{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."},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"}},common:{undo:"Deshacer",clearAll:"Borrar todo",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Mostrar respuesta correcta",hideCorrectAnswer:"Ocultar respuesta correcta",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"}}}});var ds={translator:{...cs,t:(e,t)=>{const{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"}return cs.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]};const{styled:us}=r,ps=e,hs=n;const{translator:gs}=ds,fs={"-webkit-touchCcallout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},ms=us("div")(()=>({width:"100%",cursor:"pointer"})),vs=us("div")(()=>({margin:"0 auto",textAlign:"center",display:"flex"})),bs=us("div")(()=>({width:"fit-content",minWidth:"140px",alignSelf:"center",verticalAlign:"middle",color:`var(--correct-answer-toggle-label-color, ${Kr()})`,fontWeight:"normal",...fs})),ys=us("div")(()=>({position:"absolute",width:"25px","&.enter":{opacity:"0"},"&.enter-active":{opacity:"1",transition:"opacity 0.3s ease-in"},"&.exit":{opacity:"1"},"&.exit-active":{opacity:"0",transition:"opacity 0.3s ease-in"}})),xs=us("div")(()=>({width:"25px",marginRight:"5px",display:"flex",alignItems:"center"}));class Es extends ps.Component{static __initStatic(){this.propTypes={onToggle:hs.func,toggled:hs.bool,show:hs.bool,hideMessage:hs.string,showMessage:hs.string,className:hs.string,language:hs.string}}static __initStatic2(){this.defaultProps={showMessage:"Show correct answer",hideMessage:"Hide correct answer",show:!1,toggled:!1}}constructor(e){super(e),this.state={show:e.show},this.openIconRef=ps.createRef(),this.closedIconRef=ps.createRef(),Es.defaultProps={...Es.defaultProps,showMessage:gs.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:gs.t("common:hideCorrectAnswer",{lng:e.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(e){this.setState({show:e.show}),e.language!==function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e.props,"optionalAccess",e=>e.language])&&(Es.defaultProps={...Es.defaultProps,showMessage:gs.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:gs.t("common:hideCorrectAnswer",{lng:e.language})})}render(){const{className:e,toggled:t,hideMessage:n,showMessage:r}=this.props;return ps.createElement(ms,{className:e},ps.createElement(vi,{show:this.state.show},ps.createElement(vs,{onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this)},ps.createElement(xs,null,ps.createElement(En,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},ps.createElement(ys,{ref:this.openIconRef},ps.createElement(rr,{open:t,key:"correct-open"}))),ps.createElement(En,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},ps.createElement(ys,{ref:this.closedIconRef},ps.createElement(rr,{open:t,key:"correct-closed"})))),ps.createElement(ii,{false:!0},ps.createElement(bs,{"aria-hidden":!this.state.show},t?n:r)))))}}Es.__initStatic(),Es.__initStatic2();var Cs,ws,Ss,ks={"border-radius":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"box-shadow":1,order:1,flex:function(e,t){return[t+"box-flex"]},"box-flex":1,"box-align":1,animation:1,"animation-duration":1,"animation-name":1,transition:1,"transition-duration":1,transform:1,"transform-style":1,"transform-origin":1,"backface-visibility":1,perspective:1,"box-pack":1},_s={animation:1,"column-count":1,columns:1,"font-weight":1,opacity:1,"order ":1,"z-index":1,zoom:1,flex:1,"box-flex":1,transform:1,perspective:1,"box-pack":1,"box-align":1,colspan:1,rowspan:1},As=function(e){return e.length?e.charAt(0).toUpperCase()+e.substring(1):e},Rs=As,Os=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,Ts="undefined"==typeof document?{}:document.documentElement.style,Ds=(Cs=function(){for(var e in Ts)if(Os.test(e))return e.match(Os)[0];return"WebkitOpacity"in Ts?"Webkit":"KhtmlOpacity"in Ts?"Khtml":""}(),ws=Cs.toLowerCase(),{style:Cs,css:"-"+ws+"-",dom:{Webkit:"WebKit",ms:"MS",o:"WebKit"}[Cs]||Rs(Cs)}),Ls=function(e,t){return t?t.toUpperCase():""},Ns=/[-\s]+(.)?/g,js=function(e){return e?e.replace(Ns,Ls):""},Ps=/::/g,Is=/([A-Z]+)([A-Z][a-z])/g,Ms=/([a-z\d])([A-Z])/g,$s=/_/g,Fs=function(e,t){return e?e.replace(Ps,"/").replace(Is,"$1_$2").replace(Ms,"$1_$2").replace($s,t||"-"):""},zs=function(e){return Fs(e).toLowerCase()},Bs=js,Ws=zs,Hs=function(e){return e.length?e.charAt(0).toLowerCase()+e.substring(1):e},Us=As,Vs=Ds,Ks=ks,qs="undefined"==typeof document?{}:document.documentElement.style,Ys=function(e,t){t=t||{};var n=Hs(Bs(e)),r=Ws(e),o=Ss?n:r,i=Vs.style?Ss?Vs.style:Vs.css:"";if(n in qs)return t.asString?o:[o];var s=o,a=Ks[r],l=[];if(Ss&&(s=Us(o)),"function"==typeof a){var c=a(o,i)||[];c&&!Array.isArray(c)&&(c=[c]),c.length&&(c=c.map(function(e){return Ss?Hs(Bs(e)):Ws(e)})),l=l.concat(c)}return i&&l.push(i+s),l.push(o),t.asString||1==l.length?l[0]:l},Js=Object.prototype.hasOwnProperty,Gs=function(e,t){return Js.call(e,t)},Xs=Object.prototype.toString,Qs=Object.prototype.toString,Zs=Ys,ea=zs,ta=js,na=Gs,ra=function(e){return!!e&&"[object Object]"===Xs.call(e)},oa=function(e){return"[object Function]"===Qs.apply(e)},ia=function(e,t,n,r){Zs(t).forEach(function(t){e[r?r(t):t]=n})},sa={cssUnitless:_s},aa=function(e,t,n,r){"string"==typeof e&&(e=function(e){e=(e||"").split(";");var t={};return e.forEach(function(e){var n=e.split(":");2==n.length&&(t[n[0].trim()]=n[1].trim())}),t}(e)),(t=t||sa).cssUnitless=t.cssUnitless||sa.cssUnitless,r=r||{};var o,i,s,a,l,c,d,u,p=t.scope||{},h=null!=t.addUnits?t.addUnits:!p||null==p.addUnits||p.addUnits,g=(null!=t.cssUnitless?t.cssUnitless:p?p.cssUnitless:null)||{},f=(t.cssUnit||p?p.cssUnit:null)||"px",m=t.prefixProperties||(p?p.prefixProperties:null)||{},v=t.camelize?ta:ea;for(s in e)if(na(e,s)){if(a=e[s],i=ea(n?n+s:s),o=!1,u=!1,oa(a)&&(d=a.call(p||e,a,s,i,e),ra(d)&&null!=d.value?(a=d.value,u=d.prefix,i=d.name?ea(d.name):i):a=d),c="number"==(l=typeof a)||"string"==l&&""!=a&&1*a==a,null==a||null==i||""===i)continue;if((c||"string"==l)&&(o=!0),!o&&null!=a.value&&a.prefix&&(o=!0,u=a.prefix,a=a.value),o){if(u=u||!!m[i],c&&(a=h&&!(i in g)?a+f:a+""),"border"!=i&&(i.indexOf("border")||~i.indexOf("radius")||~i.indexOf("width"))||!c||(i+="-width"),!i.indexOf("border-radius-")&&(i.replace(/border(-radius)(-(.*))/,function(e,t,n){var r={"-top":["-top-left","-top-right"],"-left":["-top-left","-bottom-left"],"-right":["-top-right","-bottom-right"],"-bottom":["-bottom-left","-bottom-right"]};n in r?(i=[],r[n].forEach(function(e){i.push("border"+e+t)})):i="border"+n+t}),Array.isArray(i))){i.forEach(function(e){u?ia(r,e,a,v):r[v(e)]=a});continue}u?ia(r,i,a,v):r[v(i)]=a}else aa(a,t,i+"-",r)}return r},la=aa,ca=Gs,da={prefixProperties:ks,cssUnitless:_s,object:aa,string:function(e,t){e=la(e,t);var n,r=[];for(n in e)ca(e,n)&&r.push(n+": "+e[n]);return r.join("; ")}};const ua=s("@pie-lib:mask-markup:serialization"),pa=["span"],ha=["em","strong","u"],ga=(e,t)=>{const n=e.getAttribute(t);return r=(e=>{const t=/([\w-]*)\s*:\s*([^;]*)/g;let n;const r={};for(;n=t.exec(e);)r[n[1]]=n[2].trim();return r})(n),da.object(r,{camelize:!0,addUnits:!1});var r},fa=["border","class","style"],ma={b:"bold",em:"italic",u:"underline",s:"strikethrough",code:"code",strong:"strong"},va=(e,t=[])=>{if(8===e.nodeType)return null;if(3===e.nodeType){const n={text:e.textContent};return t.length>0&&(n.marks=t.map(e=>({type:e,data:void 0}))),{object:"text",leaves:[n]}}if(1===e.nodeType){const r=e.tagName.toLowerCase(),o=ma[r];if(o){ua("[deserialize] mark: ",o);return{_flatten:!0,nodes:ba(e.childNodes,[...t,o])}}if("math"===r)return{isMath:!0,nodes:[e]};const i=(e=>{if(!e.attributes||e.attributes.length<=0)return;const t={};let n;for(n=0;n<e.attributes.length;n++){const r=e.attributes[n];t[r.name]=r.value}return t})(e)||{};"audio"===r&&""===i.controls&&(i.controls=!0);const s=fa.reduce((n=e,(e,t)=>{if(!n.getAttribute)return e;if(n.getAttribute(t))switch(t){case"style":e.style=ga(n,t);break;case"class":e.className=((e,t,n)=>{const r=e.getAttribute(n);return delete t.class,r})(n,e,t);break;default:e[t]=n.getAttribute(t)}return e}),{...i}),a=(e=>pa.includes(e)?"inline":ha.includes(e)?"mark":"block")(r),l=ba(e.childNodes,t);return{object:a,type:r,data:{dataset:{...e.dataset},attributes:{...s}},nodes:l}}var n;return null},ba=(e,t=[])=>{const n=[];for(let r=0;r<e.length;r++){const o=va(e[r],t);null!==o&&(o._flatten&&o.nodes?n.push(...o.nodes):n.push(o))}return n},ya=e,xa=n,{styled:Ea}=r,{renderMath:Ca}=u;function wa(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const Sa=Ea("div")(({theme:e})=>({paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5)})),ka=Ea("span")(()=>({display:"inline-block",width:".75em"})),_a=["tbody","tr"],Aa=(e,t,n,r,o,i)=>{if(!t)return null;const s=[];return(e.nodes||[]).forEach((e,i)=>{const a=e.type?`${e.type}-${i}`:`${i}`;if(e.isMath)return s.push(ya.createElement("span",{dangerouslySetInnerHTML:{__html:`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`}})),s;if(r){const o=r(e,t,n);if(o){const t="blank"===wa([e,"access",e=>e.data,"optionalAccess",e=>e.dataset,"optionalAccess",e=>e.component]);return t&&s.push(ya.createElement(ka,{key:`spacer-${i}`})),s.push(o),void(t&&s.push(ya.createElement(ka,{key:`spacer-${i}`})))}}if("text"===e.object){const t=e.leaves.reduce((e,t)=>{const n=t.text,r=((e,t)=>{const n=""===t.trim(),r=e&&e.type;return n&&_a.includes(r)?void 0:t})(o,n);return r?e+r:e},""),n=(e=>{const t=e.leaves.find(e=>Ze(e,"marks",[]).length);return t?t.marks:null})(e);if(wa([n,"optionalAccess",e=>e.length])>0){const e=n.map(e=>Object.keys(ma).find(t=>ma[t]===e.type)).filter(Boolean);e.length>0?s.push(e.reduceRight((e,t,n)=>ya.createElement(t,{key:`${a}-${t}-${n}`},e),t)):s.push(t)}else t.length>0&&s.push(t)}else{const o=Aa(e,t,n,r,e);if("p"===e.type||"paragraph"===e.type)s.push(ya.createElement(Sa,{key:a},o));else{const t=e.type;e.nodes&&e.nodes.length>0?s.push(ya.createElement(t,{key:a,...e.data.attributes},o)):s.push(ya.createElement(t,{key:a,...e.data.attributes}))}}}),s},Ra=Ea("div")(()=>({display:"initial","&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"}}));class Oa extends ya.Component{constructor(e){super(e),Oa.prototype.__init.call(this),this.internalContainerRef=ya.createRef()}static __initStatic(){this.propTypes={renderChildren:xa.func,layout:xa.object,value:xa.object,onChange:xa.func,elementType:xa.string,containerRef:xa.oneOfType([xa.func,xa.shape({current:xa.instanceOf(Element)})])}}componentDidMount(){const e=this.props.containerRef||this.internalContainerRef;e.current&&"function"==typeof Ca&&Ca(e.current)}__init(){this.handleChange=(e,t)=>{const n={...this.props.value,[e]:t};this.props.onChange(n)}}render(){const{value:e,layout:t,elementType:n,containerRef:r}=this.props,o=Aa(t,e,this.handleChange,this.props.renderChildren,null),i=r||this.internalContainerRef;return ya.createElement(Ra,{ref:i},o)}}Oa.__initStatic();const Ta=/\{\{(\d+)\}\}/g;const Da=e,La=n;var Na;const ja=(e,t)=>{const{markup:n}=(o=t,(r=e)?{markup:r.replace(Ta,(e,t)=>`<span data-component="${o}" data-id="${t}"></span>`)}:{markup:""});var r,o;return(e=>{if(!e||!e.trim())return{object:"value",document:{object:"document",data:{},nodes:[{object:"block",type:"span",data:{},isVoid:!1,nodes:[]}]}};const t=(new DOMParser).parseFromString(e,"text/html");let n=ba(t.body.childNodes);return!n.some(e=>"block"===e.object||"inline"===e.object)&&n.length>0&&(n=[{object:"block",type:"span",data:{},isVoid:!1,nodes:n}]),0===n.length&&(n=[{object:"block",type:"span",data:{},isVoid:!1,nodes:[]}]),{object:"value",document:{object:"document",data:{},nodes:n}}})(n).document},Pa=(e,t)=>((Na=class extends Da.Component{static __initStatic(){this.propTypes={markup:La.string,layout:La.object,value:La.object,onChange:La.func,customMarkMarkupComponent:La.func,elementType:La.string}}constructor(e){super(e),this.containerRef=Da.createRef()}componentDidUpdate(e){if(this.props.markup!==e.markup){const e=this.containerRef.current;(e&&e.querySelectorAll('[data-latex][data-math-handled="true"]')||[]).forEach(e=>{const t=e.querySelector("mjx-container");t&&e.removeChild(t);const n=e.getAttribute("data-raw");e.innerHTML=n,e.removeAttribute("data-math-handled")})}}render(){const{markup:n,layout:r,value:o,onChange:i,elementType:s}=this.props,a=r||ja(n,e);return Da.createElement(Oa,{containerRef:this.containerRef,elementType:s,layout:a,value:o,onChange:i,renderChildren:t(this.props)})}}).__initStatic(),Na),{useMemo:Ia}=e,{useLayoutEffect:Ma}=e,{useEffect:$a}=e,{useRef:Fa}=e,{useCallback:za}=e,Ba="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Wa(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Ha(e){return"nodeType"in e}function Ua(e){var t,n;return e?Wa(e)?e:Ha(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Va(e){const{Document:t}=Ua(e);return e instanceof t}function Ka(e){return!Wa(e)&&e instanceof Ua(e).HTMLElement}function qa(e){return e instanceof Ua(e).SVGElement}function Ya(e){return e?Wa(e)?e.document:Ha(e)?Va(e)?e:Ka(e)||qa(e)?e.ownerDocument:document:document:document}const Ja=Ba?Ma:$a;function Ga(e){const t=Fa(e);return Ja(()=>{t.current=e}),za(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function Xa(e,t){void 0===t&&(t=[e]);const n=Fa(e);return Ja(()=>{n.current!==e&&(n.current=e)},t),n}function Qa(e,t){const n=Fa();return Ia(()=>{const t=e(n.current);return n.current=t,t},[...t])}function Za(e){const t=Ga(e),n=Fa(null),r=za(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function el(e){const t=Fa();return $a(()=>{t.current=e},[e]),t.current}let tl={};function nl(e,t){return Ia(()=>{if(t)return t;const n=null==tl[e]?0:tl[e]+1;return tl[e]=n,e+"-"+n},[e,t])}function rl(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}}const ol=rl(1),il=rl(-1);function sl(e){if(!e)return!1;const{KeyboardEvent:t}=Ua(e.target);return t&&e instanceof t}function al(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Ua(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const ll=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ll.Translate.toString(e),ll.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),cl="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function dl(e){return e.matches(cl)?e:e.querySelector(cl)}const ul=e,{useState:pl}=e,{useCallback:hl}=e,gl={display:"none"};function fl(e){let{id:t,value:n}=e;return ul.createElement("div",{id:t,style:gl},n)}function ml(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return ul.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const vl=e,{createContext:bl}=e,{useContext:yl}=e,{useEffect:xl}=e,{useState:El}=e,{useCallback:Cl}=e,{useMemo:wl}=e,{useRef:Sl}=e,{memo:kl}=e,{useReducer:_l}=e,{cloneElement:Al}=e,{forwardRef:Rl}=e,{createPortal:Ol}=t,{unstable_batchedUpdates:Tl}=t,Dl=bl(null);const Ll={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Nl={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function jl(e){let{announcements:t=Nl,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Ll}=e;const{announce:i,announcement:s}=function(){const[e,t]=pl("");return{announce:hl(e=>{null!=e&&t(e)},[]),announcement:e}}(),a=nl("DndLiveRegion"),[l,c]=El(!1);if(xl(()=>{c(!0)},[]),function(e){const t=yl(Dl);xl(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(wl(()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}}),[i,t])),!l)return null;const d=vl.createElement(vl.Fragment,null,vl.createElement(fl,{id:r,value:o.draggable}),vl.createElement(ml,{id:a,announcement:s}));return n?Ol(d,n):d}var Pl;function Il(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Pl||(Pl={}));const Ml=Object.freeze({x:0,y:0});function $l(e,t){const n=al(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function Fl(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function zl(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-r,a=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=s*a;return Number((o/(n+r-o)).toFixed(4))}return 0}const Bl=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=zl(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Fl)};function Wl(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ml}const Hl=(Ul=1,function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((e,t)=>({...e,top:e.top+Ul*t.y,bottom:e.bottom+Ul*t.y,left:e.left+Ul*t.x,right:e.right+Ul*t.x}),{...e})});var Ul;function Vl(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const Kl={ignoreTransform:!1};function ql(e,t){void 0===t&&(t=Kl);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=Ua(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=Vl(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:a}=r,l=e.left-s-(1-o)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:s,bottom:a,right:l}=n;return{top:r,left:o,width:i,height:s,bottom:a,right:l}}function Yl(e){return ql(e,{ignoreTransform:!0})}function Jl(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(Va(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ka(o)||qa(o))return n;if(n.includes(o))return n;const i=Ua(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=Ua(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=Ua(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Gl(e){const[t]=Jl(e,1);return null!=t?t:null}function Xl(e){return Ba&&e?Wa(e)?e:Ha(e)?Va(e)||e===Ya(e).scrollingElement?window:Ka(e)?e:null:null:null}function Ql(e){return Wa(e)?e.scrollX:e.scrollLeft}function Zl(e){return Wa(e)?e.scrollY:e.scrollTop}function ec(e){return{x:Ql(e),y:Zl(e)}}var tc;function nc(e){return!(!Ba||!e)&&e===document.scrollingElement}function rc(e){const t={x:0,y:0},n=nc(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(tc||(tc={}));const oc={x:.2,y:.2};function ic(e,t,n,r,o){let{top:i,left:s,right:a,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=oc);const{isTop:c,isBottom:d,isLeft:u,isRight:p}=rc(e),h={x:0,y:0},g={x:0,y:0},f=t.height*o.y,m=t.width*o.x;return!c&&i<=t.top+f?(h.y=tc.Backward,g.y=r*Math.abs((t.top+f-i)/f)):!d&&l>=t.bottom-f&&(h.y=tc.Forward,g.y=r*Math.abs((t.bottom-f-l)/f)),!p&&a>=t.right-m?(h.x=tc.Forward,g.x=r*Math.abs((t.right-m-a)/m)):!u&&s<=t.left+m&&(h.x=tc.Backward,g.x=r*Math.abs((t.left+m-s)/m)),{direction:h,speed:g}}function sc(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ac(e){return e.reduce((e,t)=>ol(e,ec(t)),Ml)}function lc(e,t){if(void 0===t&&(t=ql),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Gl(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const cc=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Ql(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Zl(t),0)}]];class dc{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Jl(t),r=ac(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of cc)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),s=r[e]-t;return this.rect[i]+s},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class uc{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function pc(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var hc,gc;function fc(e){e.preventDefault()}function mc(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(hc||(hc={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(gc||(gc={}));const vc={start:[gc.Space,gc.Enter],cancel:[gc.Esc],end:[gc.Space,gc.Enter,gc.Tab]},bc=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case gc.Right:return{...n,x:n.x+25};case gc.Left:return{...n,x:n.x-25};case gc.Down:return{...n,y:n.y+25};case gc.Up:return{...n,y:n.y-25}}};class yc{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new uc(Ya(t)),this.windowListeners=new uc(Ua(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(hc.Resize,this.handleCancel),this.windowListeners.add(hc.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(hc.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&lc(n),t(Ml)}handleKeyDown(e){if(sl(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=vc,coordinateGetter:i=bc,scrollBehavior:s="smooth"}=r,{code:a}=e;if(o.end.includes(a))return void this.handleEnd(e);if(o.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:Ml;this.referenceCoordinates||(this.referenceCoordinates=c);const d=i(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=il(d,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:l,isBottom:c,maxScroll:u,minScroll:p}=rc(n),h=sc(n),g={x:Math.min(o===gc.Right?h.right-h.width/2:h.right,Math.max(o===gc.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(o===gc.Down?h.bottom-h.height/2:h.bottom,Math.max(o===gc.Down?h.top:h.top+h.height/2,d.y))},f=o===gc.Right&&!a||o===gc.Left&&!l,m=o===gc.Down&&!c||o===gc.Up&&!i;if(f&&g.x!==d.x){const e=n.scrollLeft+t.x,i=o===gc.Right&&e<=u.x||o===gc.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:s});r.x=i?n.scrollLeft-e:o===gc.Right?n.scrollLeft-u.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:s});break}if(m&&g.y!==d.y){const e=n.scrollTop+t.y,i=o===gc.Down&&e<=u.y||o===gc.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:s});r.y=i?n.scrollTop-e:o===gc.Down?n.scrollTop-u.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:s});break}}this.handleMove(e,ol(il(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function xc(e){return Boolean(e&&"distance"in e)}function Ec(e){return Boolean(e&&"delay"in e)}yc.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=vc,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class Cc{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=Ua(e);return e instanceof t?e:Ya(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=Ya(i),this.documentListeners=new uc(this.document),this.listeners=new uc(n),this.windowListeners=new uc(Ua(i)),this.initialCoordinates=null!=(r=al(o))?r:Ml,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(hc.Resize,this.handleCancel),this.windowListeners.add(hc.DragStart,fc),this.windowListeners.add(hc.VisibilityChange,this.handleCancel),this.windowListeners.add(hc.ContextMenu,fc),this.documentListeners.add(hc.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ec(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(xc(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(hc.Click,mc,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(hc.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:s}}=o;if(!r)return;const a=null!=(t=al(e))?t:Ml,l=il(r,a);if(!n&&s){if(xc(s)){if(null!=s.tolerance&&pc(l,s.tolerance))return this.handleCancel();if(pc(l,s.distance))return this.handleStart()}return Ec(s)&&pc(l,s.tolerance)?this.handleCancel():void this.handlePending(s,l)}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===gc.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const wc={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Sc extends Cc{constructor(e){const{event:t}=e,n=Ya(t.target);super(e,wc,n)}}Sc.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const kc={move:{name:"mousemove"},end:{name:"mouseup"}};var _c;!function(e){e[e.RightClick=2]="RightClick"}(_c||(_c={}));(class extends Cc{constructor(e){super(e,kc,Ya(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==_c.RightClick&&(null==r||r({event:n}),!0)}}];const Ac={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Rc,Oc;function Tc(e){let{acceleration:t,activator:n=Rc.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:a=Oc.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:p}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=el(t);return Qa(e=>{if(n||!r||!e)return Dc;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[tc.Backward]:e.x[tc.Backward]||-1===o.x,[tc.Forward]:e.x[tc.Forward]||1===o.x},y:{[tc.Backward]:e.y[tc.Backward]||-1===o.y,[tc.Forward]:e.y[tc.Forward]||1===o.y}}},[n,t,r])}({delta:u,disabled:!i}),[g,f]=function(){const e=Fa(null);return[za((t,n)=>{e.current=setInterval(t,n)},[]),za(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),m=Sl({x:0,y:0}),v=Sl({x:0,y:0}),b=wl(()=>{switch(n){case Rc.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Rc.DraggableRect:return o}},[n,o,l]),y=Sl(null),x=Cl(()=>{const e=y.current;if(!e)return;const t=m.current.x*v.current.x,n=m.current.y*v.current.y;e.scrollBy(t,n)},[]),E=wl(()=>a===Oc.TreeOrder?[...c].reverse():c,[a,c]);xl(()=>{if(i&&c.length&&b){for(const e of E){if(!1===(null==r?void 0:r(e)))continue;const n=c.indexOf(e),o=d[n];if(!o)continue;const{direction:i,speed:a}=ic(e,o,b,t,p);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return f(),y.current=e,g(x,s),m.current=a,void(v.current=i)}m.current={x:0,y:0},v.current={x:0,y:0},f()}else f()},[t,x,r,f,i,s,JSON.stringify(b),JSON.stringify(h),g,c,E,d,JSON.stringify(p)])}(class extends Cc{constructor(e){super(e,Ac)}static setup(){return window.addEventListener(Ac.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ac.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Rc||(Rc={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Oc||(Oc={}));const Dc={x:{[tc.Backward]:!1,[tc.Forward]:!1},y:{[tc.Backward]:!1,[tc.Forward]:!1}};var Lc,Nc;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Lc||(Lc={})),function(e){e.Optimized="optimized"}(Nc||(Nc={}));const jc=new Map;function Pc(e,t){return Qa(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Ic(e){let{callback:t,disabled:n}=e;const r=Ga(t),o=wl(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return xl(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Mc(e){return new dc(ql(e),e)}function $c(e,t,n){void 0===t&&(t=Mc);const[r,o]=El(null);function i(){o(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const s=function(e){let{callback:t,disabled:n}=e;const r=Ga(t),o=wl(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return xl(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),a=Ic({callback:i});return Ja(()=>{i(),e?(null==a||a.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==s||s.disconnect())},[e]),r}const Fc=[];function zc(e,t){void 0===t&&(t=[]);const n=Sl(null);return xl(()=>{n.current=null},t),xl(()=>{const t=e!==Ml;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?il(e,n.current):Ml}function Bc(e){return wl(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Wc=[];function Hc(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ka(t)?t:e}const Uc=[{sensor:Sc,options:{}},{sensor:yc,options:{}}],Vc={current:{}},Kc={draggable:{measure:Yl},droppable:{measure:Yl,strategy:Lc.WhileDragging,frequency:Nc.Optimized},dragOverlay:{measure:ql}};class qc extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Yc={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new qc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Il},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Kc,measureDroppableContainers:Il,windowRect:null,measuringScheduled:!1},Jc={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Il,draggableNodes:new Map,over:null,measureDroppableContainers:Il},Gc=bl(Jc),Xc=bl(Yc);function Qc(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new qc}}}function Zc(e,t){switch(t.type){case Pl.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Pl.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Pl.DragEnd:case Pl.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Pl.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new qc(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Pl.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new qc(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case Pl.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new qc(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function ed(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=yl(Gc),i=el(r),s=el(null==n?void 0:n.id);return xl(()=>{if(!t&&!r&&i&&null!=s){if(!sl(i))return;if(document.activeElement===i.target)return;const e=o.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=dl(e);if(t){t.focus();break}}})}},[r,t,o,s,i]),null}function td(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}const nd=bl({...Ml,scaleX:1,scaleY:1});var rd;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(rd||(rd={})),kl(function(e){var t,n,r,o;let{id:i,accessibility:s,autoScroll:a=!0,children:l,sensors:c=Uc,collisionDetection:d=Bl,measuring:u,modifiers:p,...h}=e;const g=_l(Zc,void 0,Qc),[f,m]=g,[v,b]=function(){const[e]=El(()=>new Set),t=Cl(t=>(e.add(t),()=>e.delete(t)),[e]);return[Cl(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[y,x]=El(rd.Uninitialized),E=y===rd.Initialized,{draggable:{active:C,nodes:w,translate:S},droppable:{containers:k}}=f,_=null!=C?w.get(C):null,A=Sl({initial:null,translated:null}),R=wl(()=>{var e;return null!=C?{id:C,data:null!=(e=null==_?void 0:_.data)?e:Vc,rect:A}:null},[C,_]),O=Sl(null),[T,D]=El(null),[L,N]=El(null),j=Xa(h,Object.values(h)),P=nl("DndDescribedBy",i),I=wl(()=>k.getEnabled(),[k]),M=function(e){return wl(()=>({draggable:{...Kc.draggable,...null==e?void 0:e.draggable},droppable:{...Kc.droppable,...null==e?void 0:e.droppable},dragOverlay:{...Kc.dragOverlay,...null==e?void 0:e.dragOverlay}}),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(u),{droppableRects:$,measureDroppableContainers:F,measuringScheduled:z}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=El(null),{frequency:a,measure:l,strategy:c}=o,d=Sl(e),u=function(){switch(c){case Lc.Always:return!1;case Lc.BeforeDragging:return n;default:return!n}}(),p=Xa(u),h=Cl(function(e){void 0===e&&(e=[]),p.current||s(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),g=Sl(null),f=Qa(t=>{if(u&&!n)return jc;if(!t||t===jc||d.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new dc(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,i,n,u,l]);return xl(()=>{d.current=e},[e]),xl(()=>{u||h()},[n,u]),xl(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),xl(()=>{u||"number"!=typeof a||null!==g.current||(g.current=setTimeout(()=>{h(),g.current=null},a))},[a,u,h,...r]),{droppableRects:f,measureDroppableContainers:h,measuringScheduled:null!=i}}(I,{dragging:E,dependencies:[S.x,S.y],config:M.droppable}),B=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return Qa(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(w,C),W=wl(()=>L?al(L):null,[L]),H=function(){const e=!1===(null==T?void 0:T.autoScrollEnabled),t="object"==typeof a?!1===a.enabled:!1===a,n=E&&!e&&!t;if("object"==typeof a)return{...a,enabled:n};return{enabled:n}}(),U=function(e,t){return Pc(e,t)}(B,M.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=Sl(!1),{x:s,y:a}="boolean"==typeof o?{x:o,y:o}:o;Ja(()=>{if(!s&&!a||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=Wl(n(e),r);if(s||(o.x=0),a||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=Gl(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,s,a,r,n])}({activeNode:null!=C?w.get(C):null,config:H.layoutShiftCompensation,initialRect:U,measure:M.draggable.measure});const V=$c(B,M.draggable.measure,U),K=$c(B?B.parentElement:null),q=Sl({activatorEvent:null,active:null,activeNode:B,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:w,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Y=k.getNodeFor(null==(t=q.current.over)?void 0:t.id),J=function(e){let{measure:t}=e;const[n,r]=El(null),o=Ic({callback:Cl(e=>{for(const{target:n}of e)if(Ka(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),i=Cl(e=>{const n=Hc(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)},[t,o]),[s,a]=Za(i);return wl(()=>({nodeRef:s,rect:n,setRef:a}),[n,s,a])}({measure:M.dragOverlay.measure}),G=null!=(n=J.nodeRef.current)?n:B,X=E?null!=(r=J.rect)?r:V:null,Q=Boolean(J.nodeRef.current&&J.rect),Z=Wl(ee=Q?null:V,Pc(ee));var ee;const te=Bc(G?Ua(G):null),ne=function(e){const t=Sl(e),n=Qa(n=>e?n&&n!==Fc&&e&&t.current&&e.parentNode===t.current.parentNode?n:Jl(e):Fc,[e]);return xl(()=>{t.current=e},[e]),n}(E?null!=Y?Y:B:null),re=function(e,t){void 0===t&&(t=ql);const[n]=e,r=Bc(n?Ua(n):null),[o,i]=El(Wc);function s(){i(()=>e.length?e.map(e=>nc(e)?r:new dc(t(e),e)):Wc)}const a=Ic({callback:s});return Ja(()=>{null==a||a.disconnect(),s(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),o}(ne),oe=td(p,{transform:{x:S.x-Z.x,y:S.y-Z.y,scaleX:1,scaleY:1},activatorEvent:L,active:R,activeNodeRect:V,containerNodeRect:K,draggingNodeRect:X,over:q.current.over,overlayNodeRect:J.rect,scrollableAncestors:ne,scrollableAncestorRects:re,windowRect:te}),ie=W?ol(W,S):null,se=function(e){const[t,n]=El(null),r=Sl(e),o=Cl(e=>{const t=Xl(e.target);t&&n(e=>e?(e.set(t,ec(t)),new Map(e)):null)},[]);return xl(()=>{const t=r.current;if(e!==t){i(t);const s=e.map(e=>{const t=Xl(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,ec(t)]):null}).filter(e=>null!=e);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{const t=Xl(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),wl(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>ol(e,t),Ml):ac(e):Ml,[e,t])}(ne),ae=zc(se),le=zc(se,[V]),ce=ol(oe,ae),de=X?Hl(X,oe):null,ue=R&&de?d({active:R,collisionRect:de,droppableRects:$,droppableContainers:I,pointerCoordinates:ie}):null,pe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(ue,"id"),[he,ge]=El(null),fe=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Q?oe:ol(oe,le),null!=(o=null==he?void 0:he.rect)?o:null,V),me=Sl(null),ve=Cl((e,t)=>{let{sensor:n,options:r}=t;if(null==O.current)return;const o=w.get(O.current);if(!o)return;const i=e.nativeEvent,s=new n({active:O.current,activeNode:o,event:i,options:r,context:q,onAbort(e){if(!w.get(e))return;const{onDragAbort:t}=j.current,n={id:e};null==t||t(n),v({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!w.get(e))return;const{onDragPending:o}=j.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),v({type:"onDragPending",event:i})},onStart(e){const t=O.current;if(null==t)return;const n=w.get(t);if(!n)return;const{onDragStart:r}=j.current,o={activatorEvent:i,active:{id:t,data:n.data,rect:A}};Tl(()=>{null==r||r(o),x(rd.Initializing),m({type:Pl.DragStart,initialCoordinates:e,active:t}),v({type:"onDragStart",event:o}),D(me.current),N(i)})},onMove(e){m({type:Pl.DragMove,coordinates:e})},onEnd:a(Pl.DragEnd),onCancel:a(Pl.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=q.current;let s=null;if(t&&o){const{cancelDrop:a}=j.current;if(s={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Pl.DragEnd&&"function"==typeof a){await Promise.resolve(a(s))&&(e=Pl.DragCancel)}}O.current=null,Tl(()=>{m({type:e}),x(rd.Uninitialized),ge(null),D(null),N(null),me.current=null;const t=e===Pl.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=j.current[t];null==e||e(s),v({type:t,event:s})}})}}me.current=s},[w]),be=Cl((e,t)=>(n,r)=>{const o=n.nativeEvent,i=w.get(r);if(null!==O.current||!i||o.dndKit||o.defaultPrevented)return;const s={active:i};!0===e(n,t.options,s)&&(o.dndKit={capturedBy:t.sensor},O.current=r,ve(n,t))},[w,ve]),ye=function(e,t){return wl(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,be);!function(e){xl(()=>{if(!Ba)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),Ja(()=>{V&&y===rd.Initializing&&x(rd.Initialized)},[V,y]),xl(()=>{const{onDragMove:e}=j.current,{active:t,activatorEvent:n,collisions:r,over:o}=q.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:ce.x,y:ce.y},over:o};Tl(()=>{null==e||e(i),v({type:"onDragMove",event:i})})},[ce.x,ce.y]),xl(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=q.current;if(!e||null==O.current||!t||!o)return;const{onDragOver:i}=j.current,s=r.get(pe),a=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:a};Tl(()=>{ge(a),null==i||i(l),v({type:"onDragOver",event:l})})},[pe]),Ja(()=>{q.current={activatorEvent:L,active:R,activeNode:B,collisionRect:de,collisions:ue,droppableRects:$,draggableNodes:w,draggingNode:G,draggingNodeRect:X,droppableContainers:k,over:he,scrollableAncestors:ne,scrollAdjustedTranslate:ce},A.current={initial:X,translated:de}},[R,B,ue,de,w,G,X,$,k,he,ne,ce]),Tc({...H,delta:S,draggingRect:de,pointerCoordinates:ie,scrollableAncestors:ne,scrollableAncestorRects:re});const xe=wl(()=>({active:R,activeNode:B,activeNodeRect:V,activatorEvent:L,collisions:ue,containerNodeRect:K,dragOverlay:J,draggableNodes:w,droppableContainers:k,droppableRects:$,over:he,measureDroppableContainers:F,scrollableAncestors:ne,scrollableAncestorRects:re,measuringConfiguration:M,measuringScheduled:z,windowRect:te}),[R,B,V,L,ue,K,J,w,k,$,he,F,ne,re,M,z,te]),Ee=wl(()=>({activatorEvent:L,activators:ye,active:R,activeNodeRect:V,ariaDescribedById:{draggable:P},dispatch:m,draggableNodes:w,over:he,measureDroppableContainers:F}),[L,ye,R,V,m,P,w,he,F]);return vl.createElement(Dl.Provider,{value:b},vl.createElement(Gc.Provider,{value:Ee},vl.createElement(Xc.Provider,{value:xe},vl.createElement(nd.Provider,{value:fe},l)),vl.createElement(ed,{disabled:!1===(null==s?void 0:s.restoreFocus)})),vl.createElement(jl,{...s,hiddenTextDescribedById:P}))});const od=bl(null),id="button";function sd(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=nl("Draggable"),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:p}=yl(Gc),{role:h=id,roleDescription:g="draggable",tabIndex:f=0}=null!=o?o:{},m=(null==l?void 0:l.id)===t,v=yl(m?nd:od),[b,y]=Za(),[x,E]=Za(),C=function(e,t){return wl(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(s,t),w=Xa(n);Ja(()=>(u.set(t,{id:t,key:i,node:b,activatorNode:x,data:w}),()=>{const e=u.get(t);e&&e.key===i&&u.delete(t)}),[u,t]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:wl(()=>({role:h,tabIndex:f,"aria-disabled":r,"aria-pressed":!(!m||h!==id)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[r,h,f,m,g,d.draggable]),isDragging:m,listeners:r?void 0:C,node:b,over:p,setNodeRef:y,setActivatorNodeRef:E,transform:v}}const ad={timeout:25};function ld(e){let{animation:t,children:n}=e;const[r,o]=El(null),[i,s]=El(null),a=el(n);return n||r||!a||o(a),Ja(()=>{if(!i)return;const e=null==r?void 0:r.key,n=null==r?void 0:r.props.id;null!=e&&null!=n?Promise.resolve(t(n,i)).then(()=>{o(null)}):o(null)},[t,r,i]),vl.createElement(vl.Fragment,null,n,r?Al(r,{ref:s}):null)}const cd={x:0,y:0,scaleX:1,scaleY:1};function dd(e){let{children:t}=e;return vl.createElement(Gc.Provider,{value:Jc},vl.createElement(nd.Provider,{value:cd},t))}const ud={position:"fixed",touchAction:"none"},pd=e=>sl(e)?"transform 250ms ease":void 0,hd=Rl((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:s,rect:a,style:l,transform:c,transition:d=pd}=e;if(!a)return null;const u=o?c:{...c,scaleX:1,scaleY:1},p={...ud,width:a.width,height:a.height,top:a.top,left:a.left,transform:ll.Transform.toString(u),transformOrigin:o&&r?$l(r,a):void 0,transition:"function"==typeof d?d(r):d,...l};return vl.createElement(n,{className:s,style:p,ref:t},i)}),gd={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:ll.Transform.toString(t)},{transform:ll.Transform.toString(n)}]},sideEffects:(fd={styles:{active:{opacity:"0"}}},e=>{let{active:t,dragOverlay:n}=e;const r={},{styles:o,className:i}=fd;if(null!=o&&o.active)for(const[e,n]of Object.entries(o.active))void 0!==n&&(r[e]=t.node.style.getPropertyValue(e),t.node.style.setProperty(e,n));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&n.node.style.setProperty(e,t);return null!=i&&i.active&&t.node.classList.add(i.active),null!=i&&i.dragOverlay&&n.node.classList.add(i.dragOverlay),function(){for(const[e,n]of Object.entries(r))t.node.style.setProperty(e,n);null!=i&&i.active&&t.node.classList.remove(i.active)}})};var fd;function md(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Ga((e,i)=>{if(null===t)return;const s=n.get(e);if(!s)return;const a=s.node.current;if(!a)return;const l=Hc(i);if(!l)return;const{transform:c}=Ua(i).getComputedStyle(i),d=Vl(c);if(!d)return;const u="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...gd,...e};return e=>{let{active:i,dragOverlay:s,transform:a,...l}=e;if(!t)return;const c={x:s.rect.left-i.rect.left,y:s.rect.top-i.rect.top},d={scaleX:1!==a.scaleX?i.rect.width*a.scaleX/s.rect.width:1,scaleY:1!==a.scaleY?i.rect.height*a.scaleY/s.rect.height:1},u={x:a.x-c.x,y:a.y-c.y,...d},p=o({...l,active:i,dragOverlay:s,transform:{initial:a,final:u}}),[h]=p,g=p[p.length-1];if(JSON.stringify(h)===JSON.stringify(g))return;const f=null==r?void 0:r({active:i,dragOverlay:s,...l}),m=s.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{m.onfinish=()=>{null==f||f(),e()}})}}(t);return lc(a,o.draggable.measure),u({active:{id:e,data:s.data,node:a,rect:o.draggable.measure(a)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:o,transform:d})})}let vd=0;function bd(e){return wl(()=>{if(null!=e)return vd++,vd},[e])}const yd=vl.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:u,activeNodeRect:p,containerNodeRect:h,draggableNodes:g,droppableContainers:f,dragOverlay:m,over:v,measuringConfiguration:b,scrollableAncestors:y,scrollableAncestorRects:x,windowRect:E}=yl(Xc),C=yl(nd),w=bd(null==u?void 0:u.id),S=td(s,{activatorEvent:d,active:u,activeNodeRect:p,containerNodeRect:h,draggingNodeRect:m.rect,over:v,overlayNodeRect:m.rect,scrollableAncestors:y,scrollableAncestorRects:x,transform:C,windowRect:E}),k=Pc(p),_=md({config:r,draggableNodes:g,droppableContainers:f,measuringConfiguration:b}),A=k?m.setRef:void 0;return vl.createElement(dd,null,vl.createElement(ld,{animation:_},u&&w?vl.createElement(hd,{key:w,id:u.id,ref:A,as:a,activatorEvent:d,adjustScale:t,className:l,transition:i,rect:k,style:{zIndex:c,...o},transform:S},n):null))}),xd=e,{useEffect:Ed}=e,{useRef:Cd}=e,wd=n,{styled:Sd}=r,{Chip:kd}=i,{renderMath:_d}=u;function Ad(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const Rd="MaskBlank",Od=Sd("span")(({theme:e,disabled:t,selected:n})=>({border:`solid 0px ${e.palette.primary.main}`,margin:e.spacing(.5),transform:"translate(0, 0)",display:"inline-flex",opacity:n?.7:1,...t&&{}})),Td=Sd(kd)(()=>({backgroundColor:eo(),border:`1px solid ${Kr()}`,color:Kr(),alignItems:"center",display:"inline-flex",height:"initial",minHeight:"32px",fontSize:"inherit",whiteSpace:"pre-wrap",maxWidth:"374px",pointerEvents:"none",borderRadius:"3px",paddingTop:"12px",paddingBottom:"12px","&.Mui-disabled":{opacity:1}})),Dd=Sd("span")(()=>({whiteSpace:"normal","& img":{display:"block",padding:"2px 0"},"& mjx-frac":{fontSize:"120% !important"},"& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn":{fontSize:"120% !important"}}));function Ld({choice:e,disabled:t,instanceId:n,selectedItem:r,onSelectClick:o}){const i=Cd(null),{attributes:s,listeners:a,setNodeRef:l,isDragging:c}=sd({id:`choice-${e.id}`,data:{choice:e,instanceId:n,fromChoice:!0,type:Rd},disabled:t});Ed(()=>{_d(i.current)},[e.value]);const d=!!r&&!0===r.fromChoice&&r.choice.id===e.id;return xd.createElement(Od,{ref:l,style:c?{width:Ad([i,"access",e=>e.current,"optionalAccess",e=>e.offsetWidth])||90,height:Ad([i,"access",e=>e.current,"optionalAccess",e=>e.offsetHeight])||32}:{},disabled:t,selected:d,onClick:r=>{t||(r.stopPropagation(),Ad([o,"optionalCall",t=>t({choice:e,instanceId:n,fromChoice:!0,type:Rd})]))},...a,...s},xd.createElement(Td,{clickable:!1,disabled:t,ref:i,label:xd.createElement(Dd,{dangerouslySetInnerHTML:{__html:e.value}})}))}Ld.propTypes={choice:wd.object.isRequired,disabled:wd.bool,instanceId:wd.oneOfType([wd.string,wd.number]),selectedItem:wd.object,onSelectClick:wd.func};const Nd=e,jd=n,{DragDroppablePlaceholder:Pd}=p;class Id extends Nd.Component{constructor(...e){super(...e),Id.prototype.__init.call(this),Id.prototype.__init2.call(this)}static __initStatic(){this.propTypes={disabled:jd.bool,duplicates:jd.bool,choices:jd.arrayOf(jd.shape({label:jd.string,value:jd.string})),value:jd.object,choicePosition:jd.string.isRequired,instanceId:jd.string,selectedItem:jd.object,onSelectClick:jd.func,onPlacementClick:jd.func}}__init(){this.getStyleForWrapper=()=>{const{choicePosition:e}=this.props;switch(e){case"above":return{margin:"0 0 40px 0"};case"below":return{margin:"40px 0 0 0"};case"right":return{margin:"0 0 0 40px"};default:return{margin:"0 40px 0 0"}}}}__init2(){this.handlePoolClick=()=>{const{disabled:e,selectedItem:t,onPlacementClick:n}=this.props;e||t&&function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}}([n,"optionalCall",e=>e(void 0)])}}render(){const{disabled:e,duplicates:t,choices:n,value:r,instanceId:o,selectedItem:i,onSelectClick:s}=this.props,a=n.filter(e=>{if(!0===t)return!0;const n=(o=t=>t===e.id,function(e,t){var n;return Kt(e,function(e,r,o){if(t(e,r,o))return n=r,!1}),n}(r,Wt(o)));var o;return void 0===n}),l={...this.getStyleForWrapper(),minWidth:"100px"};return Nd.createElement("div",{style:l,onClick:this.handlePoolClick},Nd.createElement(Pd,{disabled:e,instanceId:o},a.map((t,n)=>Nd.createElement(Ld,{key:`${t.value}-${n}`,disabled:e,choice:t,instanceId:o,selectedItem:i,onSelectClick:s}))))}}Id.__initStatic();const Md=e,{useEffect:$d}=e,{useRef:Fd}=e,{useState:zd}=e,Bd=n,Wd=s,{styled:Hd}=r,{Chip:Ud}=i,Vd=l,{grey:Kd}=o,{renderMath:qd}=u;function Yd(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}Wd("pie-lib:mask-markup:blank");const Jd=Hd("span")(({dragged:e,over:t,selected:n,showsPointerCursor:r})=>({border:`solid 0px ${Vr("primary",Hr.PRIMARY)}`,minWidth:"200px",overflow:"hidden",whiteSpace:"nowrap",opacity:1,cursor:"default",...t&&{whiteSpace:"nowrap",overflow:"hidden"},...(e||n)&&{opacity:.5},...r&&{"&:hover":{cursor:"pointer"}}})),Gd=Hd("span")({display:"inline-flex",touchAction:"none"}),Xd=Hd(Ud)(()=>({backgroundColor:Gr(),border:`2px dashed ${Kr()}`,touchAction:"none",color:Kr(),fontSize:"inherit",maxWidth:"374px",position:"relative",borderRadius:"3px","&.over":{whiteSpace:"nowrap",overflow:"hidden"},"&.parentOver":{border:`1px solid ${Kd[500]}`,backgroundColor:`${Kd[300]}`},"&.correct":{border:`solid 1px ${qr()}`},"&.incorrect":{border:`solid 1px ${Yr()}`},"&.Mui-disabled":{opacity:1}})),Qd=Hd("span")(()=>({whiteSpace:"normal",pointerEvents:"none","& img":{display:"block",padding:"2px 0"},"& p":{marginTop:"0",marginBottom:"0"},"& mjx-frac":{fontSize:"120% !important"},"& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn":{fontSize:"120% !important"},"&.over":{whiteSpace:"nowrap",overflow:"hidden"},"&.hidden":{color:"transparent",opacity:0},"&.dragged":{position:"absolute",left:16,maxWidth:"60px",top:"50%",transform:"translateY(-50%)"}}));function Zd({disabled:e,choice:t,isOver:n,isDragging:r,dragItem:o,correct:i,emptyResponseAreaWidth:s,emptyResponseAreaHeight:a}){const l=Fd(null),c=Fd(null),d=Fd(null),u=Fd(!1),[p,h]=zd({height:0,width:0}),g=()=>{m()},f=()=>{const e=Yd([c,"access",e=>e.current,"optionalAccess",e=>e.querySelector,"call",e=>e("img")]);e?e.onload=g:setTimeout(()=>{m()},300)},m=()=>{if(c.current&&l.current&&!u.current){u.current=!0,l.current.style.width="auto",l.current.style.height="auto",l.current.offsetHeight;const e=(()=>{if(!c.current)return null;if(c.current.querySelector("mjx-container")&&c.current.parentElement)return c.current.parentElement;const e=c.current.querySelector("img");if(e)return c.current.textContent.trim().length>0?c.current:e;return c.current})()||c.current,t=e.getBoundingClientRect(),n=12,r=2,o=1,i=(e.offsetWidth||t.width||0)+2*n+2*r+o,d=Math.max(e.offsetHeight||0,t.height||0,e.scrollHeight||0,c.current.scrollHeight||0)+2*n+2*r+o,p=parseFloat(s)||0,g=parseFloat(a)||0,f=i<=p?p:i,m=d<=g?g:d;h(e=>({width:f>p?f:e.width,height:m>g?m:e.height}));const v=`${f}px`,b=`${m}px`;l.current.style.width!==v&&(l.current.style.width=v),l.current.style.height!==b&&(l.current.style.height=b),u.current=!1}};$d(()=>{f()},[]),$d(()=>{if("undefined"==typeof IntersectionObserver||!l.current)return;const e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&m()},{threshold:0});return e.observe(l.current),()=>e.disconnect()},[]),$d(()=>{l.current&&qd(l.current)},[i,n,Yd([o,"optionalAccess",e=>e.choice,"optionalAccess",e=>e.value])]),$d(()=>{t?f():h({height:0,width:0})},[Yd([t,"optionalAccess",e=>e.value])]),$d(()=>{n||r||(d.current={width:l.current.offsetWidth,height:l.current.offsetHeight})},[t,n,r]);const v=o&&n&&o.choice&&o.choice.value,b=t&&t.value,y=n||r?{width:Yd([d,"access",e=>e.current,"optionalAccess",e=>e.width]),height:Yd([d,"access",e=>e.current,"optionalAccess",e=>e.height])}:(()=>{const e=isNaN(parseFloat(s))?0:parseFloat(s),t=isNaN(parseFloat(a))?0:parseFloat(a);return{...{height:p.height||t,width:p.width||e},...e?{}:{minWidth:90},...t?{}:{minHeight:32}}})();return Md.createElement(Xd,{clickable:!1,disabled:e,ref:l,component:"span",label:Md.createElement(Md.Fragment,null,Md.createElement(Qd,{ref:c,draggable:!0,className:Vd({over:n,hidden:v}),dangerouslySetInnerHTML:{__html:b||""}}),v&&Md.createElement(Qd,{draggable:!0,className:Vd({over:n,dragged:!0}),dangerouslySetInnerHTML:{__html:v||""}})),className:Vd({over:n,parentOver:n,correct:void 0!==i&&i,incorrect:void 0!==i&&!i}),variant:e?"outlined":void 0,style:y})}function eu({id:e,disabled:t,duplicates:n,choice:r,correct:o,onChange:i,emptyResponseAreaWidth:s,emptyResponseAreaHeight:a,instanceId:l,selectedItem:c,onSelectClick:d,onPlacementClick:u}){const[p,h]=zd(!1),g={id:e,choice:r,instanceId:l,fromChoice:!1,type:"MaskBlank"},{attributes:f,listeners:m,setNodeRef:v,isDragging:b}=sd({id:`mask-blank-drag-${e}`,disabled:t||!r,data:g,attributes:{tabIndex:r&&!t?0:-1}}),{setNodeRef:y,isOver:x,active:E}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=nl("Droppable"),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=yl(Gc),d=Sl({disabled:n}),u=Sl(!1),p=Sl(null),h=Sl(null),{disabled:g,updateMeasurementsFor:f,timeout:m}={...ad,...o},v=Xa(null!=f?f:r),b=Ic({callback:Cl(()=>{u.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(v.current)?v.current:[v.current]),h.current=null},m)):u.current=!0},[m]),disabled:g||!s}),y=Cl((e,t)=>{b&&(t&&(b.unobserve(t),u.current=!1),e&&b.observe(e))},[b]),[x,E]=Za(y),C=Xa(t);return xl(()=>{b&&x.current&&(b.disconnect(),u.current=!1,b.observe(x.current))},[x,b]),xl(()=>(a({type:Pl.RegisterDroppable,element:{id:r,key:i,disabled:n,node:x,rect:p,data:C}}),()=>a({type:Pl.UnregisterDroppable,key:i,id:r})),[r]),xl(()=>{n!==d.current.disabled&&(a({type:Pl.SetDroppableDisabled,id:r,key:i,disabled:n}),d.current.disabled=n)},[r,i,n,a]),{active:s,rect:p,isOver:(null==l?void 0:l.id)===r,node:x,over:l,setNodeRef:E}}({id:`mask-blank-drop-${e}`,data:{id:e,accepts:["MaskBlank"],instanceId:l}}),C=!!c&&!1===c.fromChoice&&c.id===e,w=()=>{t||(C?Yd([d,"optionalCall",e=>e(g)]):c?Yd([u,"optionalCall",t=>t(e)]):r&&Yd([d,"optionalCall",e=>e(g)]))},S=!r&&!t,k=!!r&&!t,_=!!c,A=x||_&&p&&!t;return Md.createElement(Jd,{ref:y,role:S?"button":void 0,tabIndex:S?0:-1,onClick:w,onKeyDown:S?e=>{"Space"!==e.code&&"Enter"!==e.code||(e.preventDefault(),w())}:void 0,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),dragged:b,over:A,selected:C,showsPointerCursor:_&&!t},Md.createElement(Gd,{ref:v,...k?f:{},...m},Md.createElement(Zd,{id:e,disabled:t,duplicates:n,choice:r,isOver:A,dragItem:Yd([E,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),correct:o,onChange:i,emptyResponseAreaWidth:s,emptyResponseAreaHeight:a,instanceId:l})))}function tu(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}Zd.defaultProps={emptyResponseAreaWidth:0,emptyResponseAreaHeight:0},Zd.propTypes={id:Bd.oneOfType([Bd.string,Bd.number]),disabled:Bd.bool,duplicates:Bd.bool,choice:Bd.object,isOver:Bd.bool,dragItem:Bd.object,correct:Bd.bool,onChange:Bd.func,emptyResponseAreaWidth:Bd.oneOfType([Bd.string,Bd.number]),emptyResponseAreaHeight:Bd.oneOfType([Bd.string,Bd.number]),instanceId:Bd.string},eu.defaultProps={emptyResponseAreaWidth:0,emptyResponseAreaHeight:0},eu.propTypes={id:Bd.oneOfType([Bd.string,Bd.number]),disabled:Bd.bool,duplicates:Bd.bool,choice:Bd.object,correct:Bd.bool,onChange:Bd.func,emptyResponseAreaWidth:Bd.oneOfType([Bd.string,Bd.number]),emptyResponseAreaHeight:Bd.oneOfType([Bd.string,Bd.number]),instanceId:Bd.string,selectedItem:Bd.object,onSelectClick:Bd.func,onPlacementClick:Bd.func};const nu=(e,{active:t,context:n,currentCoordinates:r})=>{const{code:o}=e,i=o===gc.Tab,s=o===gc.Down||o===gc.Up||o===gc.Left||o===gc.Right;if(!i&&!s)return;if(s)return bc(e,{context:n,currentCoordinates:r});e.preventDefault();const{droppableRects:a,droppableContainers:l,collisionRect:c}=n;if(!a||0===a.size)return r;const d=tu([t,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),u=d&&!1===d.fromChoice&&null!=d.id?`mask-blank-drop-${d.id}`:void 0,p=[];let h;for(const[e,t]of l){if(tu([t,"optionalAccess",e=>e.disabled]))continue;if(e===u)continue;const n=a.get(e);if(!n)continue;const r={x:n.left+n.width/2,y:n.top+n.height/2},o={id:e,rect:n,dropPosition:{x:n.left,y:n.top+n.height/2},center:r};"drag-in-the-blank-droppable"===e?h=o:p.push(o)}if(0===p.length&&!h)return r;const g=e.shiftKey;p.sort((e,t)=>Math.abs(e.center.y-t.center.y)>10?e.center.y-t.center.y:e.center.x-t.center.x),h&&p.push(h);const f=c?{x:c.left+c.width/2,y:c.top+c.height/2}:r;let m=p.findIndex(e=>f.x>=e.rect.left&&f.x<=e.rect.right&&f.y>=e.rect.top&&f.y<=e.rect.bottom);if(-1===m){let e=1/0;for(let t=0;t<p.length;t++){const n=ru(r,p[t].dropPosition);n<e&&(e=n,m=t)}}return p[g?(m-1+p.length)%p.length:(m+1)%p.length].dropPosition},ru=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),ou=e,iu=n,{DragProvider:su}=p;function au(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const lu=Pa("blank",e=>(t,n,r)=>{const o=au([t,"access",e=>e.data,"optionalAccess",e=>e.dataset])||{};if("blank"===o.component){const{disabled:i,duplicates:s,correctResponse:a,feedback:l,showCorrectAnswer:c,emptyResponseAreaWidth:d,emptyResponseAreaHeight:u,instanceId:p,isDragging:h,selectedItem:g,onSelectClick:f,onPlacementClick:m}=e,v=c?a[o.id]:n[o.id],b=v&&e.choices.find(e=>e.id===v);return ou.createElement(eu,{key:`${t.type}-${o.id}`,correct:c||l&&l[o.id],disabled:i,duplicates:s,choice:b,id:o.id,emptyResponseAreaWidth:d,emptyResponseAreaHeight:u,onChange:(e,t)=>{const o={...n};void 0===t?delete o[e]:o[e]=t,r(o)},instanceId:p,isDragging:h,selectedItem:g,onSelectClick:f,onPlacementClick:m})}});class cu extends ou.Component{constructor(e){super(e),cu.prototype.__init.call(this),cu.prototype.__init2.call(this),cu.prototype.__init3.call(this),cu.prototype.__init4.call(this),cu.prototype.__init5.call(this),cu.prototype.__init6.call(this),cu.prototype.__init7.call(this),cu.prototype.__init8.call(this),cu.prototype.__init9.call(this),cu.prototype.__init10.call(this),cu.prototype.__init11.call(this),cu.prototype.__init12.call(this),cu.prototype.__init13.call(this),cu.prototype.__init14.call(this),this.state={activeDragItem:null,dropAnimation:void 0,selectedItem:null},this.lastDragEndAt=0}static __initStatic(){this.propTypes={markup:iu.string,layout:iu.object,choicesPosition:iu.string,choices:iu.array,value:iu.object,onChange:iu.func,duplicates:iu.bool,disabled:iu.bool,feedback:iu.object,correctResponse:iu.object,showCorrectAnswer:iu.bool,emptyResponseAreaWidth:iu.oneOfType([iu.string,iu.number]),emptyResponseAreaHeight:iu.oneOfType([iu.string,iu.number]),instanceId:iu.string}}static __initStatic2(){this.defaultProps={instanceId:"drag-in-the-blank"}}__init(){this.handleDragStart=e=>{const{active:t}=e;au([t,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current])&&this.setState({activeDragItem:t.data.current,dropAnimation:void 0,selectedItem:t.data.current})}}__init2(){this.renderDragOverlay=()=>{const{activeDragItem:e}=this.state;return e&&"MaskBlank"===e.type?ou.createElement(Ld,{disabled:e.disabled,choice:e.choice,instanceId:e.instanceId}):null}}__init3(){this.commitPlacement=(e,t)=>{const{onChange:n,value:r}=this.props;if(n)if(void 0!==t){if(!0===e.fromChoice){const o={...r};o[t]=e.choice.id,n(o)}else if(e.id&&e.id!==t){const o={...r};o[t]=e.choice.id,delete o[e.id],n(o)}}else if(!e.fromChoice&&e.id){const t={...r};delete t[e.id],n(t)}}}__init4(){this.handleDragEnd=e=>{const{active:t,over:n}=e,r=au([t,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),o=au([n,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),i=!!t&&!!n&&"MaskBlank"===au([r,"optionalAccess",e=>e.type])&&au([o,"optionalAccess",e=>e.accepts,"optionalAccess",e=>e.includes,"call",e=>e("MaskBlank")]);if(this.setState({activeDragItem:null,dropAnimation:i?null:void 0}),this.cancelSelection(),this.lastDragEndAt=Date.now(),!i)return;const s=!0===o.toChoiceBoard?void 0:o.id;this.commitPlacement(r,s)}}__init5(){this.onDragCancel=()=>{this.setState({activeDragItem:null,dropAnimation:void 0}),this.cancelSelection(),this.lastDragEndAt=Date.now()}}__init6(){this.isSameItem=(e,t)=>!(!e||!t||e.fromChoice!==t.fromChoice)&&(e.fromChoice?e.choice.id===t.choice.id:e.id===t.id)}__init7(){this.toggleItemSelection=e=>{this.setState(t=>({selectedItem:this.isSameItem(t.selectedItem,e)?null:e}))}}__init8(){this.cancelSelection=()=>{this.setState({selectedItem:null})}}__init9(){this.endAnyLiveKeyboardDrag=()=>{this.state.activeDragItem&&document.dispatchEvent(new KeyboardEvent("keydown",{code:"Escape",bubbles:!0,cancelable:!0}))}}__init10(){this.placeSelectedItem=e=>{const{selectedItem:t}=this.state;t&&(this.commitPlacement(t,e),this.cancelSelection(),this.endAnyLiveKeyboardDrag())}}__init11(){this.isClickSoonAfterDragEnd=()=>Date.now()-this.lastDragEndAt<250}__init12(){this.onItemClick=e=>{this.isClickSoonAfterDragEnd()||(this.endAnyLiveKeyboardDrag(),this.toggleItemSelection(e))}}__init13(){this.onPlacementClick=e=>{this.isClickSoonAfterDragEnd()||this.placeSelectedItem(e)}}__init14(){this.getPositionDirection=e=>{let t,n,r;switch(e){case"left":t="row",r="center";break;case"right":t="row-reverse",n="flex-end",r="center";break;case"below":t="column-reverse";break;default:t="column"}return{flexDirection:t,justifyContent:n,alignItems:r}}}render(){const{markup:e,duplicates:t,value:n,onChange:r,choicesPosition:o,choices:i,correctResponse:s,disabled:a,feedback:l,showCorrectAnswer:c,emptyResponseAreaWidth:d,emptyResponseAreaHeight:u,layout:p,instanceId:h}=this.props,g=o||"below",f={display:"flex",minWidth:"100px",...this.getPositionDirection(g)};return ou.createElement(su,{onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd,onDragCancel:this.onDragCancel,collisionDetection:Bl,keyboardCoordinateGetter:nu,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter"]}},ou.createElement("div",{ref:e=>this.rootRef=e,style:f},ou.createElement(Id,{choicePosition:g,choices:i,value:n,duplicates:t,disabled:a,instanceId:h,selectedItem:this.state.selectedItem,onSelectClick:this.onItemClick,onPlacementClick:this.onPlacementClick}),ou.createElement(lu,{elementType:"drag-in-the-blank",markup:e,layout:p,value:n,choices:i,onChange:r,disabled:a,duplicates:t,feedback:l,correctResponse:s,showCorrectAnswer:c,emptyResponseAreaWidth:d,emptyResponseAreaHeight:u,instanceId:h,isDragging:!!this.state.activeDragItem,selectedItem:this.state.selectedItem,onSelectClick:this.onItemClick,onPlacementClick:this.onPlacementClick}),ou.createElement(yd,{style:{pointerEvents:"none"},dropAnimation:this.state.dropAnimation},this.renderDragOverlay())))}}cu.__initStatic(),cu.__initStatic2();const du=e,{styled:uu}=r,pu=l;function hu(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}let gu,fu;"undefined"!=typeof window&&(gu=require("@pie-lib/editable-html-tip-tap").default,fu=uu(gu)(()=>({display:"inline-block",verticalAlign:"middle",margin:"4px",borderRadius:"4px",border:`1px solid ${Vr("black",Hr.BLACK)}`,"&.correct":{border:`1px solid ${qr()}`},"&.incorrect":{border:`1px solid ${Yr()}`}})));var mu=Pa("input",e=>(t,n)=>{const{adjustedLimit:r,disabled:o,feedback:i,showCorrectAnswer:s,maxLength:a,spellCheck:l,pluginProps:c,onChange:d}=e,u=hu([t,"access",e=>e.data,"optionalAccess",e=>e.dataset])||{};if("input"===u.component){const p=(e.choices&&u&&e.choices[u.id]||[])[0],h=s?p&&p.label:n[u.id]||"",g=a&&a[u.id],f=i&&i[u.id],m=s||"correct"===f,v=!s&&"incorrect"===f,b=e=>{const t={...n,[u.id]:e};d(t)},y=e=>{if("Enter"===e.key||13===e.keyCode)return!0};return du.createElement(fu,{id:u.id,key:`${t.type}-input-${u.id}`,disabled:s||o,disableUnderline:!0,onChange:b,markup:h||"",charactersLimit:r?g:25,activePlugins:["languageCharacters"],pluginProps:c,languageCharactersProps:[{language:"spanish"}],spellCheck:l,adjustWidthForLimit:!0,onKeyDown:y,autoWidthToolbar:!0,toolbarOpts:{minWidth:"auto",noBorder:!0,isHidden:!!hu([c,"optionalAccess",e=>e.characters,"optionalAccess",e=>e.disabled])},className:pu({correct:m,incorrect:v})})}});Pa("input",e=>(t,n,r)=>{const o=t.data&&t.data.dataset||{};if("input"===o.component)return e.customMarkMarkupComponent(o.id)});const vu=e,bu=n,{Button:yu}=i,{InputLabel:xu}=i,{Menu:Eu}=i,{MenuItem:Cu}=i,{ArrowDropDown:wu}=c,{ArrowDropUp:Su}=c,{Close:ku}=c,{Check:_u}=c,{styled:Au}=r,{renderMath:Ru}=u,Ou=Ur("pie"),Tu=Au(yu)(()=>({color:Kr(),border:`1px solid ${Vr("border-gray",Hr.BORDER_GRAY)}`,borderRadius:"4px",justifyContent:"space-between",backgroundColor:Gr(),position:"relative",height:"45px",width:"fit-content",margin:"2px",textTransform:"none","& span":{paddingRight:"24px"},"& svg":{position:"absolute",right:"4px",top:"calc(50% - 12px)",pointerEvents:"none",color:Kr(),marginLeft:"5px"},"&.Mui-focused":{outline:`3px solid ${Qr()}`,outlineOffset:"2px",borderWidth:"3px"},"&.disabledCorrect":{borderWidth:"2px",borderColor:qr(),color:`${Kr()} !important`},"&.disabledIncorrect":{borderWidth:"2px",borderColor:Jr(),color:`${Kr()} !important`}})),Du=Au(Eu)(()=>({"& .MuiPaper-root":{backgroundColor:Ou("background",Hr.WHITE)},"& .MuiList-root":{padding:0}})),Lu=Au(Cu)(()=>({height:24,overflow:"hidden",fontSize:"1rem",fontWeight:400,fontFamily:"inherit",lineHeight:"1.5em",whiteSpace:"nowrap",color:Kr(),backgroundColor:Gr(),"&.Mui-focusVisible":{outline:`3px solid ${Qr()}`,outlineOffset:"-1px",color:Kr(),backgroundColor:Gr()},"&:hover":{color:Kr(),backgroundColor:Xr()},boxSizing:"border-box",padding:"16px 8px",borderRadius:"4px","&.selected":{color:`${Kr()} !important`,backgroundColor:`${Gr()} !important`,"&:hover":{color:Kr(),backgroundColor:`${Xr()} !important`}}})),Nu=Au("span")(()=>({fontSize:"max(1rem, 14px)"})),ju=Au("span")(()=>({fontSize:"max(1rem, 14px)",flexShrink:0,paddingLeft:"8px"})),Pu=Au(xu)(()=>({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"})),Iu=Au(_u)(()=>({color:`${eo()} !important`,position:"absolute",top:"-8px !important",left:"-8px",marginLeft:"0 !important",borderRadius:"50%",fontSize:"16px",padding:"2px","&.correct":{backgroundColor:qr()},"&.incorrect":{backgroundColor:Jr()}})),Mu=Au(ku)(()=>({color:`${eo()} !important`,position:"absolute",top:"-8px !important",left:"-8px",marginLeft:"0 !important",borderRadius:"50%",fontSize:"16px",padding:"2px","&.correct":{backgroundColor:qr()},"&.incorrect":{backgroundColor:Jr()}}));class $u extends vu.Component{static __initStatic(){this.propTypes={id:bu.string,value:bu.string,disabled:bu.bool,onChange:bu.func,correct:bu.bool,choices:bu.arrayOf(bu.shape({value:bu.string,label:bu.string})),showCorrectAnswer:bu.bool,singleQuery:bu.bool,correctValue:bu.string}}constructor(e){super(e),$u.prototype.__init.call(this),$u.prototype.__init2.call(this),$u.prototype.__init3.call(this),$u.prototype.__init4.call(this),$u.prototype.__init5.call(this),this.state={anchorEl:null,highlightedOptionId:null,menuWidth:null,previewValue:null},this.hiddenRef=vu.createRef(),this.buttonRef=vu.createRef(),this.previewRef=vu.createRef(),this.elementRefs=[]}componentDidMount(){this.hiddenRef.current&&null===this.state.menuWidth&&this.setState({menuWidth:this.hiddenRef.current.clientWidth})}componentDidUpdate(e,t){const n=this.hiddenRef.current;if(!t.anchorEl&&this.state.anchorEl&&this.elementRefs.forEach(e=>{if(!e)return;const t=e.querySelector("[data-latex], [data-raw]"),n=e.querySelector("mjx-container"),r=e.querySelector('[data-math-handled="true"]');!t||r&&n||Ru(e)}),n){const e=n.clientWidth;e!==this.state.menuWidth&&(this.elementRefs.forEach(e=>{e&&Ru(e)}),Ru(n),this.setState({menuWidth:e}))}}__init(){this.handleClick=e=>{const{id:t,value:n,choices:r}=this.props;let o=null;if(n){const e=(r||[]).findIndex(e=>e.value===n);e>=0&&(o=`dropdown-option-${t}-${e}`)}this.setState({anchorEl:e.currentTarget,highlightedOptionId:o})}}__init2(){this.handleClose=()=>{const{value:e}=this.props;this.setState({anchorEl:null,previewValue:null,highlightedOptionId:null}),!e&&this.previewRef.current&&(this.previewRef.current.innerHTML="")}}__init3(){this.handleHighlight=e=>{const t={highlightedOptionId:`dropdown-option-${this.props.id}-${e}`};this.props.value||(t.previewValue=this.props.choices[e].value),this.setState(t)}}__init4(){this.handleSelect=(e,t)=>{this.props.onChange(this.props.id,e),this.handleHighlight(t),this.handleClose()}}__init5(){this.handleHover=e=>{if(this.props.value)return;const t=`dropdown-option-${this.props.id}-${e}`,n=this.state.previewValue;this.setState({highlightedOptionId:t,previewValue:n},()=>{const t=this.elementRefs[e],n=this.previewRef.current;t&&n&&(n.innerHTML=t.innerHTML)})}}getLabel(e,t){const n=(e||[]).find(e=>e.value===t);return n?n.label.trim():void 0}render(){const{id:e,correct:t,disabled:n,value:r,choices:o,showCorrectAnswer:i,singleQuery:s,correctValue:a}=this.props,{anchorEl:l}=this.state,c=Boolean(l),d=`dropdown-button-${e}`,u=`dropdown-menu-${e}`,p=`dropdown-value-${e}`;let h;this.elementRefs=[],n&&void 0!==t&&(h=t||i?"disabledCorrect":"disabledIncorrect");const g=parseInt(e,10)+1,f=s?"Query-label":`Query-label-${g}`,m=s?"Query":`Query ${g}`;let v=null;return n&&void 0!==t&&(v=t||i?vu.createElement(Iu,{className:"correct"}):vu.createElement(Mu,{className:"incorrect"})),vu.createElement(vu.Fragment,null,vu.createElement("div",{ref:this.hiddenRef,style:{position:"absolute",visibility:"hidden",top:0,left:0},tabIndex:-1,"aria-hidden":"true"},(o||[]).map((e,t)=>vu.createElement(Lu,{key:t,tabIndex:-1,"aria-hidden":"true"},vu.createElement(Nu,{dangerouslySetInnerHTML:{__html:e.label}})))),vu.createElement(Pu,{id:f,tabIndex:-1,"aria-hidden":"true"},m),vu.createElement(Tu,{ref:this.buttonRef,style:{...this.state.menuWidth&&{minWidth:`calc(${this.state.menuWidth}px + 8px)`},borderWidth:c?"2px":"1px",transition:"border-width 0.2s ease-in-out"},"aria-controls":c?u:void 0,"aria-haspopup":"listbox","aria-expanded":c?"true":void 0,"aria-activedescendant":this.state.highlightedOptionId,onClick:this.handleClick,className:h,disabled:n,id:d,role:"combobox","aria-label":`Select an option for ${m}`,"aria-labelledby":p},v,vu.createElement(Nu,{id:p,ref:this.previewRef,dangerouslySetInnerHTML:{__html:a||(c&&this.state.previewValue?this.getLabel(o,this.state.previewValue):this.getLabel(o,r)||"")}}),c?vu.createElement(Su,null):vu.createElement(wu,null)),vu.createElement(Du,{id:u,anchorEl:l,keepMounted:!0,open:c,onClose:this.handleClose,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},transitionDuration:{enter:225,exit:195},slotProps:{paper:this.state.menuWidth?{style:{minWidth:this.state.menuWidth,padding:"4px"}}:void 0,list:{"aria-labelledby":d,role:"listbox",disablePadding:!0}}},(o||[]).map((t,n)=>{const o=`dropdown-option-${e}-${n}`;return vu.createElement(Lu,{id:o,className:t.value===r?"selected":"",selected:t.value===r,key:`${t.label}-${n}`,value:t.value,onClick:()=>this.handleSelect(t.value,n),role:"option","aria-selected":this.state.highlightedOptionId===o?"true":void 0,onMouseOver:()=>this.handleHover(n)},vu.createElement(Nu,{ref:e=>this.elementRefs[n]=e,dangerouslySetInnerHTML:{__html:t.label}}),vu.createElement(ju,{dangerouslySetInnerHTML:{__html:t.value===r?" &check;":""}}))})))}}$u.__initStatic();const Fu=e;Pa("dropdown",e=>(t,n,r)=>{const o=t.data&&t.data.dataset||{};if("dropdown"===o.component){const{choices:i,disabled:s,feedback:a,showCorrectAnswer:l}=e,c=i&&i[o.id]&&i[o.id].find(e=>e.correct),d=l?c&&c.value:n[o.id];return Fu.createElement($u,{key:`${t.type}-dropdown-${o.id}`,correct:a&&a[o.id]&&"correct"===a[o.id],disabled:s||l,value:d,correctValue:l?c&&c.label:void 0,id:o.id,onChange:r,choices:i[o.id],showCorrectAnswer:l,singleQuery:1==Object.keys(i).length})}});const zu=e,Bu=n,{styled:Wu}=r,{translator:Hu}=ds,Uu=Wu(Io)(({alwaysShowCorrect:e})=>({color:Kr(),backgroundColor:Gr(),...e&&{"& *":{borderColor:`${Kr()} !important`}}})),Vu=Wu("div")(({theme:e})=>({marginBottom:e.spacing(2)})),Ku=Wu("div")(({theme:e})=>({marginBottom:e.spacing(2)})),qu=Wu("h2")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"});class Yu extends zu.Component{constructor(...e){super(...e),Yu.prototype.__init.call(this),Yu.prototype.__init2.call(this),Yu.prototype.__init3.call(this),Yu.prototype.__init4.call(this),Yu.prototype.__init5.call(this)}static __initStatic(){this.propTypes={alwaysShowCorrect:Bu.bool,animationsDisabled:Bu.bool,disabled:Bu.bool,displayType:Bu.string,feedback:Bu.object,language:Bu.string,markup:Bu.string,maxLengthPerChoice:Bu.array,maxLengthPerChoiceEnabled:Bu.bool,mode:Bu.string,note:Bu.string,onChange:Bu.func,playerSpellCheckEnabled:Bu.bool,prompt:Bu.string,rationale:Bu.string,role:Bu.string,showNote:Bu.bool,teacherInstructions:Bu.string,value:Bu.object,responseAreaInputConfiguration:Bu.object,model:Bu.object.isRequired}}static __initStatic2(){this.defaultProps={value:{}}}__init(){this.state={showCorrectAnswer:this.props.alwaysShowCorrect||!1}}__init2(){this.getChangeSession=e=>e&&e.every((e,t,n)=>e===n[0]&&1===e)?this.props.onChange:Gt(this.props.onChange,200,{maxWait:200})}UNSAFE_componentWillReceiveProps(e){const{maxLengthPerChoice:t,language:n}=this.props;let{note:r}=this.props;var o,i;(function(e){if(null==e)return!0;if(ie(e)&&(_(e)||"string"==typeof e||"function"==typeof e.splice||me(e)||Se(e)||pe(e)))return!e.length;var t=yt(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(ae(e))return!Te(e).length;for(var n in e)if(Xt.call(e,n))return!1;return!0})(e.feedback)&&this.setState({showCorrectAnswer:!1}),e.alwaysShowCorrect&&this.setState({showCorrectAnswer:!0}),t&&(o=t,i=e.maxLengthPerChoice,!Pt(o,i))&&(this.changeSession=this.getChangeSession(e.maxLengthPerChoice)),r&&n&&n!==e.language&&r===Hu.t("common:commonCorrectAnswerWithAlternates",{lng:n})&&(r=Hu.t("common:commonCorrectAnswerWithAlternates",{lng:e.language}))}__init3(){this.toggleShowCorrect=()=>{this.setState({showCorrectAnswer:!this.state.showCorrectAnswer})}}__init4(){this.changeSession=this.getChangeSession(this.props.maxLengthPerChoice)}__init5(){this.onChange=e=>{this.changeSession(e)}}render(){const{showCorrectAnswer:e}=this.state,{alwaysShowCorrect:t,animationsDisabled:n,mode:r,displayType:o,role:i,language:s,maxLengthPerChoice:a,maxLengthPerChoiceEnabled:l,note:c,playerSpellCheckEnabled:d,prompt:u,rationale:p,showNote:h,teacherInstructions:g,responseAreaInputConfiguration:f,model:m,value:v}=this.props,{extraCSSRules:b}=m||{},y=(e||"view"===r&&"instructor"===i)&&h&&c,x=zu.createElement(ni,{defaultClassName:"teacher-instructions",prompt:g}),E=zu.createElement(ni,{prompt:p}),C=p&&(li(p)||di(p)),w=g&&(li(g)||di(g));return zu.createElement(Uu,{extraCSSRules:b,alwaysShowCorrect:t,style:{display:`${o}`}},"gather"===r&&zu.createElement(qu,null,"Fill in the Blank Question"),w&&zu.createElement(Ku,null,n?x:zu.createElement(ko,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},x)),u&&zu.createElement(ni,{prompt:u}),!t&&"evaluate"===r&&zu.createElement(Es,{show:!0,toggled:e,onToggle:this.toggleShowCorrect,language:s}),zu.createElement(mu,{...this.props,onChange:this.onChange,showCorrectAnswer:e,value:v,maxLength:a,adjustedLimit:l,spellCheck:d,pluginProps:f}),y&&zu.createElement(Vu,{dangerouslySetInnerHTML:{__html:c}}),C&&zu.createElement(Ku,null,n?E:zu.createElement(ko,{labels:{hidden:"Show Rationale",visible:"Hide Rationale"}},E)))}}Yu.__initStatic(),Yu.__initStatic2();const Ju=e,{createRoot:Gu}=d,Xu=s,{renderMath:Qu}=u,Zu=Xu("pie-element:explicit-constructed-response:print");class ep extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=Gt(()=>{if(this._model&&this._session){const e=((e,t)=>{const n="instructor"===t.role;return e.prompt=!1!==e.promptEnabled?e.prompt:void 0,e.teacherInstructions=n&&!1!==e.teacherInstructionsEnabled?e.teacherInstructions:void 0,e.rationale=n&&!1!==e.rationaleEnabled?e.rationale:void 0,e.alwaysShowCorrect=n,e.mode=n?"evaluate":e.mode,e.disabled=!0,e.animationsDisabled=!0,e})(this._model,this._options),t=this._options&&Ju.createElement(Yu,{...e,onChange:()=>{}});this._root||(this._root=Gu(this)),this._root.render(t),queueMicrotask(()=>{Zu("render complete - render math"),Qu(this)})}else Zu("skip")},50,{leading:!1,trailing:!0})}set options(e){this._options=e}set model(e){this._model=e,this._rerender()}connectedCallback(){}disconnectedCallback(){this._root&&this._root.unmount()}}export{ep as default};