@zydon/common 1.1.63 → 1.1.64

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.
@@ -0,0 +1,271 @@
1
+ (function($,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("@mui/material"),require("@emotion/react"),require("react-dom"),require("@mui/x-date-pickers-pro"),require("@mui/lab"),require("@mui/x-data-grid-premium"),require("@emotion/styled"),require("react-hook-form")):typeof define=="function"&&define.amd?define(["exports","react","@mui/material","@emotion/react","react-dom","@mui/x-date-pickers-pro","@mui/lab","@mui/x-data-grid-premium","@emotion/styled","react-hook-form"],v):($=typeof globalThis<"u"?globalThis:$||self,v($.common={},$.React,$.material,$.react,$.reactDom,$.xDatePickersPro,$.lab,$.xDataGridPremium,$.emStyled,$.reactHookForm))})(this,function($,v,O,Fd,Zv,Aa,I6,ui,$6,Me){"use strict";function F6(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Ce=F6(v),Qv={duration:2,ease:[.43,.13,.23,.96]},L6={animate:{fillOpacity:[0,0,1],pathLength:[1,.4,0],transition:Qv}},R6=t=>{const e=(t==null?void 0:t.duration)||.32,n=(t==null?void 0:t.ease)||[.43,.13,.23,.96];return{duration:e,ease:n}},Ae=t=>{const e=(t==null?void 0:t.durationIn)||.64,n=(t==null?void 0:t.easeIn)||[.43,.13,.23,.96];return{duration:e,ease:n}},$e=t=>{const e=(t==null?void 0:t.durationOut)||.48,n=(t==null?void 0:t.easeOut)||[.43,.13,.23,.96];return{duration:e,ease:n}},Pa=t=>{const e=(t==null?void 0:t.distance)||120,n=t==null?void 0:t.durationIn,r=t==null?void 0:t.durationOut,i=t==null?void 0:t.easeIn,o=t==null?void 0:t.easeOut;return{in:{initial:{opacity:0},animate:{opacity:1,transition:Ae},exit:{opacity:0,transition:$e}},inUp:{initial:{y:e,opacity:0},animate:{y:0,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{y:e,opacity:0,transition:$e({durationOut:r,easeOut:o})}},inDown:{initial:{y:-e,opacity:0},animate:{y:0,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{y:-e,opacity:0,transition:$e({durationOut:r,easeOut:o})}},inLeft:{initial:{x:-e,opacity:0},animate:{x:0,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{x:-e,opacity:0,transition:$e({durationOut:r,easeOut:o})}},inRight:{initial:{x:e,opacity:0},animate:{x:0,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{x:e,opacity:0,transition:$e({durationOut:r,easeOut:o})}},out:{initial:{opacity:1},animate:{opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{opacity:1,transition:$e({durationOut:r,easeOut:o})}},outUp:{initial:{y:0,opacity:1},animate:{y:-e,opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{y:0,opacity:1,transition:$e({durationOut:r,easeOut:o})}},outDown:{initial:{y:0,opacity:1},animate:{y:e,opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{y:0,opacity:1,transition:$e({durationOut:r,easeOut:o})}},outLeft:{initial:{x:0,opacity:1},animate:{x:-e,opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{x:0,opacity:1,transition:$e({durationOut:r,easeOut:o})}},outRight:{initial:{x:0,opacity:1},animate:{x:e,opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{x:0,opacity:1,transition:$e({durationOut:r,easeOut:o})}}}},B6=t=>{const e=(t==null?void 0:t.distance)||720,n=t==null?void 0:t.durationIn,r=t==null?void 0:t.durationOut,i=t==null?void 0:t.easeIn,o=t==null?void 0:t.easeOut;return{in:{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,transition:$e({durationOut:r,easeOut:o})}},inUp:{initial:{scale:0,opacity:0,translateY:e},animate:{scale:1,opacity:1,translateY:0,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,translateY:e,transition:$e({durationOut:r,easeOut:o})}},inDown:{initial:{scale:0,opacity:0,translateY:-e},animate:{scale:1,opacity:1,translateY:0,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,translateY:-e,transition:$e({durationOut:r,easeOut:o})}},inLeft:{initial:{scale:0,opacity:0,translateX:-e},animate:{scale:1,opacity:1,translateX:0,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,translateX:-e,transition:$e({durationOut:r,easeOut:o})}},inRight:{initial:{scale:0,opacity:0,translateX:e},animate:{scale:1,opacity:1,translateX:0,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,translateX:e,transition:$e({durationOut:r,easeOut:o})}},out:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,transition:Ae({durationIn:n,easeIn:i})}},outUp:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,translateY:-e,transition:Ae({durationIn:n,easeIn:i})}},outDown:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,translateY:e,transition:Ae({durationIn:n,easeIn:i})}},outLeft:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,translateX:-e,transition:Ae({durationIn:n,easeIn:i})}},outRight:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,translateX:e,transition:Ae({durationIn:n,easeIn:i})}}}},N6=t=>{const e=t==null?void 0:t.durationIn,n=t==null?void 0:t.durationOut,r=t==null?void 0:t.easeIn,i=t==null?void 0:t.easeOut;return{inX:{initial:{rotateX:-180,opacity:0},animate:{rotateX:0,opacity:1,transition:Ae({durationIn:e,easeIn:r})},exit:{rotateX:-180,opacity:0,transition:$e({durationOut:n,easeOut:i})}},inY:{initial:{rotateY:-180,opacity:0},animate:{rotateY:0,opacity:1,transition:Ae({durationIn:e,easeIn:r})},exit:{rotateY:-180,opacity:0,transition:$e({durationOut:n,easeOut:i})}},outX:{initial:{rotateX:0,opacity:1},animate:{rotateX:70,opacity:0,transition:$e({durationOut:n,easeOut:i})}},outY:{initial:{rotateY:0,opacity:1},animate:{rotateY:70,opacity:0,transition:$e({durationOut:n,easeOut:i})}}}},j6=t=>{const e=(t==null?void 0:t.distance)||160,n=t==null?void 0:t.durationIn,r=t==null?void 0:t.durationOut,i=t==null?void 0:t.easeIn,o=t==null?void 0:t.easeOut;return{inUp:{initial:{y:e},animate:{y:0,transition:Ae({durationIn:n,easeIn:i})},exit:{y:e,transition:$e({durationOut:r,easeOut:o})}},inDown:{initial:{y:-e},animate:{y:0,transition:Ae({durationIn:n,easeIn:i})},exit:{y:-e,transition:$e({durationOut:r,easeOut:o})}},inLeft:{initial:{x:-e},animate:{x:0,transition:Ae({durationIn:n,easeIn:i})},exit:{x:-e,transition:$e({durationOut:r,easeOut:o})}},inRight:{initial:{x:e},animate:{x:0,transition:Ae({durationIn:n,easeIn:i})},exit:{x:e,transition:$e({durationOut:r,easeOut:o})}},outUp:{initial:{y:0},animate:{y:-e,transition:Ae({durationIn:n,easeIn:i})},exit:{y:0,transition:$e({durationOut:r,easeOut:o})}},outDown:{initial:{y:0},animate:{y:e,transition:Ae({durationIn:n,easeIn:i})},exit:{y:0,transition:$e({durationOut:r,easeOut:o})}},outLeft:{initial:{x:0},animate:{x:-e,transition:Ae({durationIn:n,easeIn:i})},exit:{x:0,transition:$e({durationOut:r,easeOut:o})}},outRight:{initial:{x:0},animate:{x:e,transition:Ae({durationIn:n,easeIn:i})},exit:{x:0,transition:$e({durationOut:r,easeOut:o})}}}},V6=t=>{const e=t==null?void 0:t.durationIn,n=t==null?void 0:t.durationOut,r=t==null?void 0:t.easeIn,i=t==null?void 0:t.easeOut;return{inX:{initial:{scaleX:0,opacity:0},animate:{scaleX:1,opacity:1,transition:Ae({durationIn:e,easeIn:r})},exit:{scaleX:0,opacity:0,transition:$e({durationOut:n,easeOut:i})}},inY:{initial:{scaleY:0,opacity:0},animate:{scaleY:1,opacity:1,transition:Ae({durationIn:e,easeIn:r})},exit:{scaleY:0,opacity:0,transition:$e({durationOut:n,easeOut:i})}},outX:{initial:{scaleX:1,opacity:1},animate:{scaleX:0,opacity:0,transition:Ae({durationIn:e,easeIn:r})}},outY:{initial:{scaleY:1,opacity:1},animate:{scaleY:0,opacity:0,transition:Ae({durationIn:e,easeIn:r})}}}},z6=t=>{const e=t==null?void 0:t.durationIn,n=t==null?void 0:t.durationOut,r=t==null?void 0:t.easeIn,i=t==null?void 0:t.easeOut;return{in:{initial:{},animate:{scale:[.3,1.1,.9,1.03,.97,1],opacity:[0,1,1,1,1,1],transition:Ae({durationIn:e,easeIn:r})},exit:{scale:[.9,1.1,.3],opacity:[1,1,0]}},inUp:{initial:{},animate:{y:[720,-24,12,-4,0],scaleY:[4,.9,.95,.985,1],opacity:[0,1,1,1,1],transition:{...Ae({durationIn:e,easeIn:r})}},exit:{y:[12,-24,720],scaleY:[.985,.9,3],opacity:[1,1,0],transition:$e({durationOut:n,easeOut:i})}},inDown:{initial:{},animate:{y:[-720,24,-12,4,0],scaleY:[4,.9,.95,.985,1],opacity:[0,1,1,1,1],transition:Ae({durationIn:e,easeIn:r})},exit:{y:[-12,24,-720],scaleY:[.985,.9,3],opacity:[1,1,0],transition:$e({durationOut:n,easeOut:i})}},inLeft:{initial:{},animate:{x:[-720,24,-12,4,0],scaleX:[3,1,.98,.995,1],opacity:[0,1,1,1,1],transition:Ae({durationIn:e,easeIn:r})},exit:{x:[0,24,-720],scaleX:[1,.9,2],opacity:[1,1,0],transition:$e({durationOut:n,easeOut:i})}},inRight:{initial:{},animate:{x:[720,-24,12,-4,0],scaleX:[3,1,.98,.995,1],opacity:[0,1,1,1,1],transition:Ae({durationIn:e,easeIn:r})},exit:{x:[0,-24,720],scaleX:[1,.9,2],opacity:[1,1,0],transition:$e({durationOut:n,easeOut:i})}},out:{animate:{scale:[.9,1.1,.3],opacity:[1,1,0]}},outUp:{animate:{y:[-12,24,-720],scaleY:[.985,.9,3],opacity:[1,1,0]}},outDown:{animate:{y:[12,-24,720],scaleY:[.985,.9,3],opacity:[1,1,0]}},outLeft:{animate:{x:[0,24,-720],scaleX:[1,.9,2],opacity:[1,1,0]}},outRight:{animate:{x:[0,-24,720],scaleX:[1,.9,2],opacity:[1,1,0]}}}},W6=t=>{const e=t==null?void 0:t.durationIn,n=t==null?void 0:t.durationOut,r=t==null?void 0:t.easeIn,i=t==null?void 0:t.easeOut;return{in:{initial:{opacity:0,rotate:-360},animate:{opacity:1,rotate:0,transition:Ae({durationIn:e,easeIn:r})},exit:{opacity:0,rotate:-360,transition:$e({durationOut:n,easeOut:i})}},out:{initial:{opacity:1,rotate:0},animate:{opacity:0,rotate:-360,transition:$e({durationOut:n,easeOut:i})}}}},H6=t=>({hover:{scale:t||1.1}}),ju=t=>{const e=(t==null?void 0:t.staggerIn)||.05,n=(t==null?void 0:t.staggerIn)||.05,r=(t==null?void 0:t.staggerIn)||.05;return{animate:{transition:{staggerChildren:e,delayChildren:n}},exit:{transition:{staggerChildren:r,staggerDirection:-1}}}},q6=t=>{const e=(t==null?void 0:t.colors)||["#19dcea","#b22cff"],n=(t==null?void 0:t.duration)||5,r=(t==null?void 0:t.ease)||"linear";return{animate:{background:e,transition:{duration:n,ease:r}}}},U6=t=>{const e=(t==null?void 0:t.duration)||5,n=(t==null?void 0:t.ease)||"easeOut";return{top:{animate:{scale:[1,1.25],y:[0,-15],transformOrigin:["50% 16%","top"],transition:{duration:e,ease:n}}},right:{animate:{scale:[1,1.25],x:[0,20],y:[0,-15],transformOrigin:["84% 50%","right"],transition:{duration:e,ease:n}}},bottom:{animate:{scale:[1,1.25],y:[0,15],transformOrigin:["50% 84%","bottom"],transition:{duration:e,ease:n}}},left:{animate:{scale:[1,1.25],x:[0,-20],y:[0,15],transformOrigin:["16% 50%","left"],transition:{duration:e,ease:n}}}}},Y6=t=>{const e=(t==null?void 0:t.colors)||["#ee7752","#e73c7e","#23a6d5","#23d5ab"],n=(t==null?void 0:t.duration)||5,r=(t==null?void 0:t.ease)||"linear",i=o=>`linear-gradient(${o}deg, ${e})`;return{top:{animate:{backgroundImage:[i(0),i(0)],backgroundPosition:["center 99%","center 1%"],backgroundSize:["100% 600%","100% 600%"],transition:{duration:n,ease:r}}},right:{animate:{backgroundPosition:["1% center","99% center"],backgroundImage:[i(270),i(270)],backgroundSize:["600% 100%","600% 100%"],transition:{duration:n,ease:r}}},bottom:{animate:{backgroundImage:[i(0),i(0)],backgroundPosition:["center 1%","center 99%"],backgroundSize:["100% 600%","100% 600%"],transition:{duration:n,ease:r}}},left:{animate:{backgroundPosition:["99% center","1% center"],backgroundImage:[i(270),i(270)],backgroundSize:["600% 100%","600% 100%"],transition:{duration:n,ease:r}}}}};var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ld={exports:{}},_a={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Jv;function G6(){if(Jv)return _a;Jv=1;var t=v,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,u){var c,h={},f=null,d=null;u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(d=l.ref);for(c in l)r.call(l,c)&&!o.hasOwnProperty(c)&&(h[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)h[c]===void 0&&(h[c]=l[c]);return{$$typeof:e,type:a,key:f,ref:d,props:h,_owner:i.current}}return _a.Fragment=n,_a.jsx=s,_a.jsxs=s,_a}var Ia={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ey;function K6(){return ey||(ey=1,process.env.NODE_ENV!=="production"&&function(){var t=v,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),p=Symbol.iterator,g="@@iterator";function m(E){if(E===null||typeof E!="object")return null;var z=p&&E[p]||E[g];return typeof z=="function"?z:null}var b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(E){{for(var z=arguments.length,ee=new Array(z>1?z-1:0),Ee=1;Ee<z;Ee++)ee[Ee-1]=arguments[Ee];C("error",E,ee)}}function C(E,z,ee){{var Ee=b.ReactDebugCurrentFrame,Ke=Ee.getStackAddendum();Ke!==""&&(z+="%s",ee=ee.concat([Ke]));var ut=ee.map(function(Ve){return String(Ve)});ut.unshift("Warning: "+z),Function.prototype.apply.call(console[E],console,ut)}}var k=!1,w=!1,T=!1,S=!1,M=!1,P;P=Symbol.for("react.module.reference");function D(E){return!!(typeof E=="string"||typeof E=="function"||E===r||E===o||M||E===i||E===u||E===c||S||E===d||k||w||T||typeof E=="object"&&E!==null&&(E.$$typeof===f||E.$$typeof===h||E.$$typeof===s||E.$$typeof===a||E.$$typeof===l||E.$$typeof===P||E.getModuleId!==void 0))}function R(E,z,ee){var Ee=E.displayName;if(Ee)return Ee;var Ke=z.displayName||z.name||"";return Ke!==""?ee+"("+Ke+")":ee}function H(E){return E.displayName||"Context"}function W(E){if(E==null)return null;if(typeof E.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case a:var z=E;return H(z)+".Consumer";case s:var ee=E;return H(ee._context)+".Provider";case l:return R(E,E.render,"ForwardRef");case h:var Ee=E.displayName||null;return Ee!==null?Ee:W(E.type)||"Memo";case f:{var Ke=E,ut=Ke._payload,Ve=Ke._init;try{return W(Ve(ut))}catch{return null}}}return null}var B=Object.assign,j=0,N,V,me,re,_,F,U;function se(){}se.__reactDisabledLog=!0;function Q(){{if(j===0){N=console.log,V=console.info,me=console.warn,re=console.error,_=console.group,F=console.groupCollapsed,U=console.groupEnd;var E={configurable:!0,enumerable:!0,value:se,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}j++}}function ve(){{if(j--,j===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},E,{value:N}),info:B({},E,{value:V}),warn:B({},E,{value:me}),error:B({},E,{value:re}),group:B({},E,{value:_}),groupCollapsed:B({},E,{value:F}),groupEnd:B({},E,{value:U})})}j<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var le=b.ReactCurrentDispatcher,ye;function ue(E,z,ee){{if(ye===void 0)try{throw Error()}catch(Ke){var Ee=Ke.stack.trim().match(/\n( *(at )?)/);ye=Ee&&Ee[1]||""}return`
18
+ `+ye+E}}var ne=!1,ce;{var _e=typeof WeakMap=="function"?WeakMap:Map;ce=new _e}function q(E,z){if(!E||ne)return"";{var ee=ce.get(E);if(ee!==void 0)return ee}var Ee;ne=!0;var Ke=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ut;ut=le.current,le.current=null,Q();try{if(z){var Ve=function(){throw Error()};if(Object.defineProperty(Ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ve,[])}catch(li){Ee=li}Reflect.construct(E,[],Ve)}else{try{Ve.call()}catch(li){Ee=li}E.call(Ve.prototype)}}else{try{throw Error()}catch(li){Ee=li}E()}}catch(li){if(li&&Ee&&typeof li.stack=="string"){for(var Le=li.stack.split(`
19
+ `),vn=Ee.stack.split(`
20
+ `),Nt=Le.length-1,Wt=vn.length-1;Nt>=1&&Wt>=0&&Le[Nt]!==vn[Wt];)Wt--;for(;Nt>=1&&Wt>=0;Nt--,Wt--)if(Le[Nt]!==vn[Wt]){if(Nt!==1||Wt!==1)do if(Nt--,Wt--,Wt<0||Le[Nt]!==vn[Wt]){var tr=`
21
+ `+Le[Nt].replace(" at new "," at ");return E.displayName&&tr.includes("<anonymous>")&&(tr=tr.replace("<anonymous>",E.displayName)),typeof E=="function"&&ce.set(E,tr),tr}while(Nt>=1&&Wt>=0);break}}}finally{ne=!1,le.current=ut,ve(),Error.prepareStackTrace=Ke}var Ma=E?E.displayName||E.name:"",_6=Ma?ue(Ma):"";return typeof E=="function"&&ce.set(E,_6),_6}function dt(E,z,ee){return q(E,!1)}function ae(E){var z=E.prototype;return!!(z&&z.isReactComponent)}function X(E,z,ee){if(E==null)return"";if(typeof E=="function")return q(E,ae(E));if(typeof E=="string")return ue(E);switch(E){case u:return ue("Suspense");case c:return ue("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case l:return dt(E.render);case h:return X(E.type,z,ee);case f:{var Ee=E,Ke=Ee._payload,ut=Ee._init;try{return X(ut(Ke),z,ee)}catch{}}}return""}var fe=Object.prototype.hasOwnProperty,xe={},lt=b.ReactDebugCurrentFrame;function tt(E){if(E){var z=E._owner,ee=X(E.type,E._source,z?z.type:null);lt.setExtraStackFrame(ee)}else lt.setExtraStackFrame(null)}function nt(E,z,ee,Ee,Ke){{var ut=Function.call.bind(fe);for(var Ve in E)if(ut(E,Ve)){var Le=void 0;try{if(typeof E[Ve]!="function"){var vn=Error((Ee||"React class")+": "+ee+" type `"+Ve+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[Ve]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw vn.name="Invariant Violation",vn}Le=E[Ve](z,Ve,Ee,ee,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Nt){Le=Nt}Le&&!(Le instanceof Error)&&(tt(Ke),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ee||"React class",ee,Ve,typeof Le),tt(null)),Le instanceof Error&&!(Le.message in xe)&&(xe[Le.message]=!0,tt(Ke),x("Failed %s type: %s",ee,Le.message),tt(null))}}}var It=Array.isArray;function $t(E){return It(E)}function si(E){{var z=typeof Symbol=="function"&&Symbol.toStringTag,ee=z&&E[Symbol.toStringTag]||E.constructor.name||"Object";return ee}}function J(E){try{return we(E),!1}catch{return!0}}function we(E){return""+E}function Et(E){if(J(E))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",si(E)),we(E)}var Ot=b.ReactCurrentOwner,mn={key:!0,ref:!0,__self:!0,__source:!0},Yi,ai,Vo;Vo={};function Iu(E){if(fe.call(E,"ref")){var z=Object.getOwnPropertyDescriptor(E,"ref").get;if(z&&z.isReactWarning)return!1}return E.ref!==void 0}function $u(E){if(fe.call(E,"key")){var z=Object.getOwnPropertyDescriptor(E,"key").get;if(z&&z.isReactWarning)return!1}return E.key!==void 0}function Ea(E,z){if(typeof E.ref=="string"&&Ot.current&&z&&Ot.current.stateNode!==z){var ee=W(Ot.current.type);Vo[ee]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(Ot.current.type),E.ref),Vo[ee]=!0)}}function Fu(E,z){{var ee=function(){Yi||(Yi=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};ee.isReactWarning=!0,Object.defineProperty(E,"key",{get:ee,configurable:!0})}}function Lu(E,z){{var ee=function(){ai||(ai=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};ee.isReactWarning=!0,Object.defineProperty(E,"ref",{get:ee,configurable:!0})}}var Ru=function(E,z,ee,Ee,Ke,ut,Ve){var Le={$$typeof:e,type:E,key:z,ref:ee,props:Ve,_owner:ut};return Le._store={},Object.defineProperty(Le._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Le,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ee}),Object.defineProperty(Le,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ke}),Object.freeze&&(Object.freeze(Le.props),Object.freeze(Le)),Le};function Bu(E,z,ee,Ee,Ke){{var ut,Ve={},Le=null,vn=null;ee!==void 0&&(Et(ee),Le=""+ee),$u(z)&&(Et(z.key),Le=""+z.key),Iu(z)&&(vn=z.ref,Ea(z,Ke));for(ut in z)fe.call(z,ut)&&!mn.hasOwnProperty(ut)&&(Ve[ut]=z[ut]);if(E&&E.defaultProps){var Nt=E.defaultProps;for(ut in Nt)Ve[ut]===void 0&&(Ve[ut]=Nt[ut])}if(Le||vn){var Wt=typeof E=="function"?E.displayName||E.name||"Unknown":E;Le&&Fu(Ve,Wt),vn&&Lu(Ve,Wt)}return Ru(E,Le,vn,Ke,Ee,Ot.current,Ve)}}var Nu=b.ReactCurrentOwner,E6=b.ReactDebugCurrentFrame;function Oa(E){if(E){var z=E._owner,ee=X(E.type,E._source,z?z.type:null);E6.setExtraStackFrame(ee)}else E6.setExtraStackFrame(null)}var Kv;Kv=!1;function Xv(E){return typeof E=="object"&&E!==null&&E.$$typeof===e}function O6(){{if(Nu.current){var E=W(Nu.current.type);if(E)return`
22
+
23
+ Check the render method of \``+E+"`."}return""}}function K1e(E){{if(E!==void 0){var z=E.fileName.replace(/^.*[\\\/]/,""),ee=E.lineNumber;return`
24
+
25
+ Check your code at `+z+":"+ee+"."}return""}}var M6={};function X1e(E){{var z=O6();if(!z){var ee=typeof E=="string"?E:E.displayName||E.name;ee&&(z=`
26
+
27
+ Check the top-level render call using <`+ee+">.")}return z}}function A6(E,z){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var ee=X1e(z);if(M6[ee])return;M6[ee]=!0;var Ee="";E&&E._owner&&E._owner!==Nu.current&&(Ee=" It was passed a child from "+W(E._owner.type)+"."),Oa(E),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ee,Ee),Oa(null)}}function P6(E,z){{if(typeof E!="object")return;if($t(E))for(var ee=0;ee<E.length;ee++){var Ee=E[ee];Xv(Ee)&&A6(Ee,z)}else if(Xv(E))E._store&&(E._store.validated=!0);else if(E){var Ke=m(E);if(typeof Ke=="function"&&Ke!==E.entries)for(var ut=Ke.call(E),Ve;!(Ve=ut.next()).done;)Xv(Ve.value)&&A6(Ve.value,z)}}}function Z1e(E){{var z=E.type;if(z==null||typeof z=="string")return;var ee;if(typeof z=="function")ee=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===l||z.$$typeof===h))ee=z.propTypes;else return;if(ee){var Ee=W(z);nt(ee,E.props,"prop",Ee,E)}else if(z.PropTypes!==void 0&&!Kv){Kv=!0;var Ke=W(z);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ke||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Q1e(E){{for(var z=Object.keys(E.props),ee=0;ee<z.length;ee++){var Ee=z[ee];if(Ee!=="children"&&Ee!=="key"){Oa(E),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ee),Oa(null);break}}E.ref!==null&&(Oa(E),x("Invalid attribute `ref` supplied to `React.Fragment`."),Oa(null))}}function D6(E,z,ee,Ee,Ke,ut){{var Ve=D(E);if(!Ve){var Le="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(Le+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var vn=K1e(Ke);vn?Le+=vn:Le+=O6();var Nt;E===null?Nt="null":$t(E)?Nt="array":E!==void 0&&E.$$typeof===e?(Nt="<"+(W(E.type)||"Unknown")+" />",Le=" Did you accidentally export a JSX literal instead of a component?"):Nt=typeof E,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Nt,Le)}var Wt=Bu(E,z,ee,Ke,ut);if(Wt==null)return Wt;if(Ve){var tr=z.children;if(tr!==void 0)if(Ee)if($t(tr)){for(var Ma=0;Ma<tr.length;Ma++)P6(tr[Ma],E);Object.freeze&&Object.freeze(tr)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else P6(tr,E)}return E===r?Q1e(Wt):Z1e(Wt),Wt}}function J1e(E,z,ee){return D6(E,z,ee,!0)}function eve(E,z,ee){return D6(E,z,ee,!1)}var tve=eve,nve=J1e;Ia.Fragment=r,Ia.jsx=tve,Ia.jsxs=nve}()),Ia}process.env.NODE_ENV==="production"?Ld.exports=G6():Ld.exports=K6();var y=Ld.exports;const ty=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Vu=v.createContext({}),zu=v.createContext(null),Wu=typeof document<"u",Rd=Wu?v.useLayoutEffect:v.useEffect,Bd=v.createContext({strict:!1});function X6(t,e,n,r){const{visualElement:i}=v.useContext(Vu),o=v.useContext(Bd),s=v.useContext(zu),a=v.useContext(ty).reducedMotion,l=v.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(t,{visualState:e,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;v.useInsertionEffect(()=>{u&&u.update(n,s)});const c=v.useRef(!!window.HandoffAppearAnimations);return Rd(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),v.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function zo(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Z6(t,e,n){return v.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):zo(n)&&(n.current=r))},[e])}function $a(t){return typeof t=="string"||Array.isArray(t)}function Hu(t){return typeof t=="object"&&typeof t.start=="function"}const Nd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jd=["initial",...Nd];function qu(t){return Hu(t.animate)||jd.some(e=>$a(t[e]))}function ny(t){return!!(qu(t)||t.variants)}function Q6(t,e){if(qu(t)){const{initial:n,animate:r}=t;return{initial:n===!1||$a(n)?n:void 0,animate:$a(r)?r:void 0}}return t.inherit!==!1?e:{}}function J6(t){const{initial:e,animate:n}=Q6(t,v.useContext(Vu));return v.useMemo(()=>({initial:e,animate:n}),[ry(e),ry(n)])}function ry(t){return Array.isArray(t)?t.join(" "):t}const iy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fa={};for(const t in iy)Fa[t]={isEnabled:e=>iy[t].some(n=>!!e[n])};function Vd(t){for(const e in t)Fa[e]={...Fa[e],...t[e]}}const zd=v.createContext({}),oy=v.createContext({}),eA=Symbol.for("motionComponentSymbol");function tA({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&Vd(t);function o(a,l){let u;const c={...v.useContext(ty),...a,layoutId:nA(a)},{isStatic:h}=c,f=J6(a),d=r(a,h);if(!h&&Wu){f.visualElement=X6(i,d,c,e);const p=v.useContext(oy),g=v.useContext(Bd).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,g,t,p))}return Ce.createElement(Vu.Provider,{value:f},u&&f.visualElement?Ce.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,a,Z6(d,f.visualElement,l),d,h,f.visualElement))}const s=v.forwardRef(o);return s[eA]=i,s}function nA({layoutId:t}){const e=v.useContext(zd).id;return e&&t!==void 0?e+"-"+t:t}function rA(t){function e(r,i={}){return tA(t(r,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const iA=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Wd(t){return typeof t!="string"||t.includes("-")?!1:!!(iA.indexOf(t)>-1||/[A-Z]/.test(t))}const Uu={};function oA(t){Object.assign(Uu,t)}const La=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ki=new Set(La);function sy(t,{layout:e,layoutId:n}){return Ki.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Uu[t]||t==="opacity")}const yn=t=>!!(t&&t.getVelocity),sA={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aA=La.length;function lA(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<aA;s++){const a=La[s];if(t[a]!==void 0){const l=sA[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,r?"":o):n&&r&&(o="none"),o}const ay=t=>e=>typeof e=="string"&&e.startsWith(t),ly=ay("--"),Hd=ay("var(--"),uA=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,cA=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ci=(t,e,n)=>Math.min(Math.max(n,t),e),Xi={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ra={...Xi,transform:t=>ci(0,1,t)},Yu={...Xi,default:1},Ba=t=>Math.round(t*1e5)/1e5,Gu=/(-)?([\d]*\.?[\d])+/g,uy=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,hA=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Na(t){return typeof t=="string"}const ja=t=>({test:e=>Na(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),hi=ja("deg"),dr=ja("%"),Se=ja("px"),fA=ja("vh"),dA=ja("vw"),cy={...dr,parse:t=>dr.parse(t)/100,transform:t=>dr.transform(t*100)},hy={...Xi,transform:Math.round},fy={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,size:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,rotate:hi,rotateX:hi,rotateY:hi,rotateZ:hi,scale:Yu,scaleX:Yu,scaleY:Yu,scaleZ:Yu,skew:hi,skewX:hi,skewY:hi,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:Ra,originX:cy,originY:cy,originZ:Se,zIndex:hy,fillOpacity:Ra,strokeOpacity:Ra,numOctaves:hy};function qd(t,e,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const h in e){const f=e[h];if(ly(h)){o[h]=f;continue}const d=fy[h],p=cA(f,d);if(Ki.has(h)){if(l=!0,s[h]=p,!c)continue;f!==(d.default||0)&&(c=!1)}else h.startsWith("origin")?(u=!0,a[h]=p):i[h]=p}if(e.transform||(l||r?i.transform=lA(t.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const Ud=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dy(t,e,n){for(const r in e)!yn(e[r])&&!sy(r,n)&&(t[r]=e[r])}function pA({transformTemplate:t},e,n){return v.useMemo(()=>{const r=Ud();return qd(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function gA(t,e,n){const r=t.style||{},i={};return dy(i,r,t),Object.assign(i,pA(t,e,n)),t.transformValues?t.transformValues(i):i}function mA(t,e,n){const r={},i=gA(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=i,r}const vA=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Ku(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||vA.has(t)}let py=t=>!Ku(t);function yA(t){t&&(py=e=>e.startsWith("on")?!Ku(e):t(e))}try{yA(require("@emotion/is-prop-valid").default)}catch{}function bA(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(py(i)||n===!0&&Ku(i)||!e&&!Ku(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function gy(t,e,n){return typeof t=="string"?t:Se.transform(e+n*t)}function xA(t,e,n){const r=gy(e,t.x,t.width),i=gy(n,t.y,t.height);return`${r} ${i}`}const wA={offset:"stroke-dashoffset",array:"stroke-dasharray"},CA={offset:"strokeDashoffset",array:"strokeDasharray"};function SA(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?wA:CA;t[o.offset]=Se.transform(-r);const s=Se.transform(e),a=Se.transform(n);t[o.array]=`${s} ${a}`}function Yd(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,h,f){if(qd(t,u,c,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:g}=t;d.transform&&(g&&(p.transform=d.transform),delete d.transform),g&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=xA(g,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&SA(d,s,a,l,!1)}const my=()=>({...Ud(),attrs:{}}),Gd=t=>typeof t=="string"&&t.toLowerCase()==="svg";function kA(t,e,n,r){const i=v.useMemo(()=>{const o=my();return Yd(o,e,{enableHardwareAcceleration:!1},Gd(r),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};dy(o,t.style,t),i.style={...o,...i.style}}return i}function TA(t=!1){return(n,r,i,{latestValues:o},s)=>{const l=(Wd(n)?kA:mA)(r,o,s,n),c={...bA(r,typeof n=="string",t),...l,ref:i},{children:h}=r,f=v.useMemo(()=>yn(h)?h.get():h,[h]);return v.createElement(n,{...c,children:f})}}const Kd=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function vy(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const yy=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function by(t,e,n,r){vy(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(yy.has(i)?i:Kd(i),e.attrs[i])}function Xd(t,e){const{style:n}=t,r={};for(const i in n)(yn(n[i])||e.style&&yn(e.style[i])||sy(i,t))&&(r[i]=n[i]);return r}function xy(t,e){const n=Xd(t,e);for(const r in t)if(yn(t[r])||yn(e[r])){const i=La.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=t[r]}return n}function Zd(t,e,n,r={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),e}function wy(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const Xu=t=>Array.isArray(t),EA=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),OA=t=>Xu(t)?t[t.length-1]||0:t;function Zu(t){const e=yn(t)?t.get():t;return EA(e)?e.toValue():e}function MA({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,i,o){const s={latestValues:AA(r,i,o,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const Cy=t=>(e,n)=>{const r=v.useContext(Vu),i=v.useContext(zu),o=()=>MA(t,e,r,i);return n?o():wy(o)};function AA(t,e,n,r){const i={},o=r(t,{});for(const f in o)i[f]=Zu(o[f]);let{initial:s,animate:a}=t;const l=qu(t),u=ny(t);e&&u&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const h=c?a:s;return h&&typeof h!="boolean"&&!Hu(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const p=Zd(t,d);if(!p)return;const{transitionEnd:g,transition:m,...b}=p;for(const x in b){let C=b[x];if(Array.isArray(C)){const k=c?C.length-1:0;C=C[k]}C!==null&&(i[x]=C)}for(const x in g)i[x]=g[x]}),i}const Mt=t=>t;class Sy{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function PA(t){let e=new Sy,n=new Sy,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const h=c&&i,f=h?e:n;return u&&s.add(l),f.add(l)&&h&&i&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let u=0;u<r;u++){const c=e.order[u];c(l),s.has(c)&&(a.schedule(c),t())}i=!1,o&&(o=!1,a.process(l))}};return a}const Qu=["prepare","read","update","preRender","render","postRender"],DA=40;function _A(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Qu.reduce((h,f)=>(h[f]=PA(()=>n=!0),h),{}),s=h=>o[h].process(i),a=()=>{const h=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(h-i.timestamp,DA),1),i.timestamp=h,i.isProcessing=!0,Qu.forEach(s),i.isProcessing=!1,n&&e&&(r=!1,t(a))},l=()=>{n=!0,r=!0,i.isProcessing||t(a)};return{schedule:Qu.reduce((h,f)=>{const d=o[f];return h[f]=(p,g=!1,m=!1)=>(n||l(),d.schedule(p,g,m)),h},{}),cancel:h=>Qu.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:ct,cancel:Nr,state:Gt,steps:Qd}=_A(typeof requestAnimationFrame<"u"?requestAnimationFrame:Mt,!0),IA={useVisualState:Cy({scrapeMotionValuesFromProps:xy,createRenderState:my,onMount:(t,e,{renderState:n,latestValues:r})=>{ct.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ct.render(()=>{Yd(n,r,{enableHardwareAcceleration:!1},Gd(e.tagName),t.transformTemplate),by(e,n)})}})},$A={useVisualState:Cy({scrapeMotionValuesFromProps:Xd,createRenderState:Ud})};function FA(t,{forwardMotionProps:e=!1},n,r){return{...Wd(t)?IA:$A,preloadedFeatures:n,useRender:TA(e),createVisualElement:r,Component:t}}function jr(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const ky=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ju(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const LA=t=>e=>ky(e)&&t(e,Ju(e));function Vr(t,e,n,r){return jr(t,e,LA(n),r)}const RA=(t,e)=>n=>e(t(n)),fi=(...t)=>t.reduce(RA);function Ty(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Ey=Ty("dragHorizontal"),Oy=Ty("dragVertical");function My(t){let e=!1;if(t==="y")e=Oy();else if(t==="x")e=Ey();else{const n=Ey(),r=Oy();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function Ay(){const t=My(!0);return t?(t(),!1):!0}class di{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Py(t,e){const n="pointer"+(e?"enter":"leave"),r="onHover"+(e?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||Ay())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[r]&&ct.update(()=>a[r](o,s))};return Vr(t.current,n,i,{passive:!t.getProps()[r]})}class BA extends di{mount(){this.unmount=fi(Py(this.node,!0),Py(this.node,!1))}unmount(){}}class NA extends di{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fi(jr(this.node.current,"focus",()=>this.onFocus()),jr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Dy=(t,e)=>e?t===e?!0:Dy(t,e.parentElement):!1;function Jd(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ju(n))}class jA extends di{constructor(){super(...arguments),this.removeStartListeners=Mt,this.removeEndListeners=Mt,this.removeAccessibleListeners=Mt,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=Vr(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();ct.update(()=>{Dy(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Vr(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=fi(o,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Jd("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&ct.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=jr(this.node.current,"keyup",s),Jd("down",(a,l)=>{this.startPress(a,l)})},n=jr(this.node.current,"keydown",e),r=()=>{this.isPressing&&Jd("cancel",(o,s)=>this.cancelPress(o,s))},i=jr(this.node.current,"blur",r);this.removeAccessibleListeners=fi(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ct.update(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ay()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ct.update(()=>r(e,n))}mount(){const e=this.node.getProps(),n=Vr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=jr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=fi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ep=new WeakMap,tp=new WeakMap,VA=t=>{const e=ep.get(t.target);e&&e(t)},zA=t=>{t.forEach(VA)};function WA({root:t,...e}){const n=t||document;tp.has(n)||tp.set(n,{});const r=tp.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(zA,{root:t,...e})),r[i]}function HA(t,e,n){const r=WA(e);return ep.set(t,n),r.observe(t),()=>{ep.delete(t),r.unobserve(t)}}const qA={some:0,all:1};class UA extends di{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:qA[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return HA(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(YA(e,n))&&this.startObserver()}unmount(){}}function YA({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const GA={inView:{Feature:UA},tap:{Feature:jA},focus:{Feature:NA},hover:{Feature:BA}};function _y(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function KA(t){const e={};return t.values.forEach((n,r)=>e[r]=n.get()),e}function XA(t){const e={};return t.values.forEach((n,r)=>e[r]=n.getVelocity()),e}function ec(t,e,n){const r=t.getProps();return Zd(r,e,n!==void 0?n:r.custom,KA(t),XA(t))}const ZA="data-"+Kd("framerAppearId");let Va=Mt,nr=Mt;process.env.NODE_ENV!=="production"&&(Va=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},nr=(t,e)=>{if(!t)throw new Error(e)});const pi=t=>t*1e3,zr=t=>t/1e3,QA={current:!1},Iy=t=>Array.isArray(t)&&typeof t[0]=="number";function $y(t){return!!(!t||typeof t=="string"&&Fy[t]||Iy(t)||Array.isArray(t)&&t.every($y))}const za=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Fy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:za([0,.65,.55,1]),circOut:za([.55,0,1,.45]),backIn:za([.31,.01,.66,-.59]),backOut:za([.33,1.53,.69,.99])};function Ly(t){if(t)return Iy(t)?za(t):Array.isArray(t)?t.map(Ly):Fy[t]}function JA(t,e,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Ly(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function e8(t,{repeat:e,repeatType:n="loop"}){const r=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[r]}const Ry=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,t8=1e-7,n8=12;function r8(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=Ry(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>t8&&++a<n8);return s}function Wa(t,e,n,r){if(t===e&&n===r)return Mt;const i=o=>r8(o,0,1,t,n);return o=>o===0||o===1?o:Ry(i(o),e,r)}const i8=Wa(.42,0,1,1),o8=Wa(0,0,.58,1),By=Wa(.42,0,.58,1),s8=t=>Array.isArray(t)&&typeof t[0]!="number",Ny=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,jy=t=>e=>1-t(1-e),Vy=t=>1-Math.sin(Math.acos(t)),np=jy(Vy),a8=Ny(np),zy=Wa(.33,1.53,.69,.99),rp=jy(zy),l8=Ny(rp),Wy={linear:Mt,easeIn:i8,easeInOut:By,easeOut:o8,circIn:Vy,circInOut:a8,circOut:np,backIn:rp,backInOut:l8,backOut:zy,anticipate:t=>(t*=2)<1?.5*rp(t):.5*(2-Math.pow(2,-10*(t-1)))},Hy=t=>{if(Array.isArray(t)){nr(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,i]=t;return Wa(e,n,r,i)}else if(typeof t=="string")return nr(Wy[t]!==void 0,`Invalid easing type '${t}'`),Wy[t];return t},ip=(t,e)=>n=>!!(Na(n)&&hA.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),qy=(t,e,n)=>r=>{if(!Na(r))return r;const[i,o,s,a]=r.match(Gu);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},u8=t=>ci(0,255,t),op={...Xi,transform:t=>Math.round(u8(t))},Zi={test:ip("rgb","red"),parse:qy("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+op.transform(t)+", "+op.transform(e)+", "+op.transform(n)+", "+Ba(Ra.transform(r))+")"};function c8(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const sp={test:ip("#"),parse:c8,transform:Zi.transform},Wo={test:ip("hsl","hue"),parse:qy("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+dr.transform(Ba(e))+", "+dr.transform(Ba(n))+", "+Ba(Ra.transform(r))+")"},fn={test:t=>Zi.test(t)||sp.test(t)||Wo.test(t),parse:t=>Zi.test(t)?Zi.parse(t):Wo.test(t)?Wo.parse(t):sp.parse(t),transform:t=>Na(t)?t:t.hasOwnProperty("red")?Zi.transform(t):Wo.transform(t)},Ct=(t,e,n)=>-n*t+n*e+t;function ap(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function h8({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ap(l,a,t+1/3),o=ap(l,a,t),s=ap(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const lp=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},f8=[sp,Zi,Wo],d8=t=>f8.find(e=>e.test(t));function Uy(t){const e=d8(t);nr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===Wo&&(n=h8(n)),n}const Yy=(t,e)=>{const n=Uy(t),r=Uy(e),i={...n};return o=>(i.red=lp(n.red,r.red,o),i.green=lp(n.green,r.green,o),i.blue=lp(n.blue,r.blue,o),i.alpha=Ct(n.alpha,r.alpha,o),Zi.transform(i))};function p8(t){var e,n;return isNaN(t)&&Na(t)&&(((e=t.match(Gu))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(uy))===null||n===void 0?void 0:n.length)||0)>0}const Gy={regex:uA,countKey:"Vars",token:"${v}",parse:Mt},Ky={regex:uy,countKey:"Colors",token:"${c}",parse:fn.parse},Xy={regex:Gu,countKey:"Numbers",token:"${n}",parse:Xi.parse};function up(t,{regex:e,countKey:n,token:r,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,r),t.values.push(...o.map(i)))}function tc(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&up(n,Gy),up(n,Ky),up(n,Xy),n}function Zy(t){return tc(t).values}function Qy(t){const{values:e,numColors:n,numVars:r,tokenised:i}=tc(t),o=e.length;return s=>{let a=i;for(let l=0;l<o;l++)l<r?a=a.replace(Gy.token,s[l]):l<r+n?a=a.replace(Ky.token,fn.transform(s[l])):a=a.replace(Xy.token,Ba(s[l]));return a}}const g8=t=>typeof t=="number"?0:t;function m8(t){const e=Zy(t);return Qy(t)(e.map(g8))}const gi={test:p8,parse:Zy,createTransformer:Qy,getAnimatableNone:m8},Jy=(t,e)=>n=>`${n>0?e:t}`;function eb(t,e){return typeof t=="number"?n=>Ct(t,e,n):fn.test(t)?Yy(t,e):t.startsWith("var(")?Jy(t,e):nb(t,e)}const tb=(t,e)=>{const n=[...t],r=n.length,i=t.map((o,s)=>eb(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},v8=(t,e)=>{const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=eb(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},nb=(t,e)=>{const n=gi.createTransformer(e),r=tc(t),i=tc(e);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?fi(tb(r.values,i.values),n):(Va(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Jy(t,e))},Ha=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},rb=(t,e)=>n=>Ct(t,e,n);function y8(t){return typeof t=="number"?rb:typeof t=="string"?fn.test(t)?Yy:nb:Array.isArray(t)?tb:typeof t=="object"?v8:rb}function b8(t,e,n){const r=[],i=n||y8(t[0]),o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||Mt:e;a=fi(l,a)}r.push(a)}return r}function ib(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(nr(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=b8(e,r,i),a=s.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=Ha(t[c],t[c+1],u);return s[c](h)};return n?u=>l(ci(t[0],t[o-1],u)):l}function x8(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Ha(0,e,r);t.push(Ct(n,1,i))}}function w8(t){const e=[0];return x8(e,t.length-1),e}function C8(t,e){return t.map(n=>n*e)}function S8(t,e){return t.map(()=>e||By).splice(0,t.length-1)}function nc({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=s8(r)?r.map(Hy):Hy(r),o={done:!1,value:e[0]},s=C8(n&&n.length===e.length?n:w8(e),t),a=ib(s,e,{ease:Array.isArray(i)?i:S8(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}function ob(t,e){return e?t*(1e3/e):0}const k8=5;function sb(t,e,n){const r=Math.max(e-k8,0);return ob(n-t(r),e-r)}const cp=.001,T8=.01,ab=10,E8=.05,O8=1;function M8({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o;Va(t<=pi(ab),"Spring duration must be 10 seconds or less");let s=1-e;s=ci(E8,O8,s),t=ci(T8,ab,zr(t)),s<1?(i=u=>{const c=u*s,h=c*t,f=c-n,d=hp(u,s),p=Math.exp(-h);return cp-f/d*p},o=u=>{const h=u*s*t,f=h*n+n,d=Math.pow(s,2)*Math.pow(u,2)*t,p=Math.exp(-h),g=hp(Math.pow(u,2),s);return(-i(u)+cp>0?-1:1)*((f-d)*p)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-cp+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=P8(i,o,a);if(t=pi(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:t}}}const A8=12;function P8(t,e,n){let r=n;for(let i=1;i<A8;i++)r=r-t(r)/e(r);return r}function hp(t,e){return t*Math.sqrt(1-e*e)}const D8=["duration","bounce"],_8=["stiffness","damping","mass"];function lb(t,e){return e.some(n=>t[n]!==void 0)}function I8(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!lb(t,_8)&&lb(t,D8)){const n=M8(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function ub({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:c,duration:h,isResolvedFromDuration:f}=I8(r),d=c?-zr(c):0,p=l/(2*Math.sqrt(a*u)),g=o-i,m=zr(Math.sqrt(a/u)),b=Math.abs(g)<5;n||(n=b?.01:2),e||(e=b?.005:.5);let x;if(p<1){const C=hp(m,p);x=k=>{const w=Math.exp(-p*m*k);return o-w*((d+p*m*g)/C*Math.sin(C*k)+g*Math.cos(C*k))}}else if(p===1)x=C=>o-Math.exp(-m*C)*(g+(d+m*g)*C);else{const C=m*Math.sqrt(p*p-1);x=k=>{const w=Math.exp(-p*m*k),T=Math.min(C*k,300);return o-w*((d+p*m*g)*Math.sinh(T)+C*g*Math.cosh(T))/C}}return{calculatedDuration:f&&h||null,next:C=>{const k=x(C);if(f)s.done=C>=h;else{let w=d;C!==0&&(p<1?w=sb(x,C,k):w=0);const T=Math.abs(w)<=n,S=Math.abs(o-k)<=e;s.done=T&&S}return s.value=s.done?o:k,s}}}function cb({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=M=>a!==void 0&&M<a||l!==void 0&&M>l,p=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let g=n*e;const m=h+g,b=s===void 0?m:s(m);b!==m&&(g=b-h);const x=M=>-g*Math.exp(-M/r),C=M=>b+x(M),k=M=>{const P=x(M),D=C(M);f.done=Math.abs(P)<=u,f.value=f.done?b:D};let w,T;const S=M=>{d(f.value)&&(w=M,T=ub({keyframes:[f.value,p(f.value)],velocity:sb(C,M,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:M=>{let P=!1;return!T&&w===void 0&&(P=!0,k(M),S(M)),w!==void 0&&M>w?T.next(M-w):(!P&&k(M),f)}}}const $8=t=>{const e=({timestamp:n})=>t(n);return{start:()=>ct.update(e,!0),stop:()=>Nr(e),now:()=>Gt.isProcessing?Gt.timestamp:performance.now()}},hb=2e4;function fb(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<hb;)e+=n,r=t.next(e);return e>=hb?1/0:e}const F8={decay:cb,inertia:cb,tween:nc,keyframes:nc,spring:ub};function rc({autoplay:t=!0,delay:e=0,driver:n=$8,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:h,...f}){let d=1,p=!1,g,m;const b=()=>{m=new Promise(F=>{g=F})};b();let x;const C=F8[i]||nc;let k;C!==nc&&typeof r[0]!="number"&&(k=ib([0,100],r,{clamp:!1}),r=[0,100]);const w=C({...f,keyframes:r});let T;a==="mirror"&&(T=C({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let S="idle",M=null,P=null,D=null;w.calculatedDuration===null&&o&&(w.calculatedDuration=fb(w));const{calculatedDuration:R}=w;let H=1/0,W=1/0;R!==null&&(H=R+s,W=H*(o+1)-s);let B=0;const j=F=>{if(P===null)return;d>0&&(P=Math.min(P,F)),d<0&&(P=Math.min(F-W/d,P)),M!==null?B=M:B=Math.round(F-P)*d;const U=B-e*(d>=0?1:-1),se=d>=0?U<0:U>W;B=Math.max(U,0),S==="finished"&&M===null&&(B=W);let Q=B,ve=w;if(o){const ne=B/H;let ce=Math.floor(ne),_e=ne%1;!_e&&ne>=1&&(_e=1),_e===1&&ce--,ce=Math.min(ce,o+1);const q=!!(ce%2);q&&(a==="reverse"?(_e=1-_e,s&&(_e-=s/H)):a==="mirror"&&(ve=T));let dt=ci(0,1,_e);B>W&&(dt=a==="reverse"&&q?1:0),Q=dt*H}const le=se?{done:!1,value:r[0]}:ve.next(Q);k&&(le.value=k(le.value));let{done:ye}=le;!se&&R!==null&&(ye=d>=0?B>=W:B<=0);const ue=M===null&&(S==="finished"||S==="running"&&ye);return h&&h(le.value),ue&&me(),le},N=()=>{x&&x.stop(),x=void 0},V=()=>{S="idle",N(),g(),b(),P=D=null},me=()=>{S="finished",c&&c(),N(),g()},re=()=>{if(p)return;x||(x=n(j));const F=x.now();l&&l(),M!==null?P=F-M:(!P||S==="finished")&&(P=F),S==="finished"&&b(),D=P,M=null,S="running",x.start()};t&&re();const _={then(F,U){return m.then(F,U)},get time(){return zr(B)},set time(F){F=pi(F),B=F,M!==null||!x||d===0?M=F:P=x.now()-F/d},get duration(){const F=w.calculatedDuration===null?fb(w):w.calculatedDuration;return zr(F)},get speed(){return d},set speed(F){F===d||!x||(d=F,_.time=zr(B))},get state(){return S},play:re,pause:()=>{S="paused",M=B},stop:()=>{p=!0,S!=="idle"&&(S="idle",u&&u(),V())},cancel:()=>{D!==null&&j(D),V()},complete:()=>{S="finished"},sample:F=>(P=0,j(F))};return _}function L8(t){let e;return()=>(e===void 0&&(e=t()),e)}const R8=L8(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),B8=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ic=10,N8=2e4,j8=(t,e)=>e.type==="spring"||t==="backgroundColor"||!$y(e.ease);function V8(t,e,{onUpdate:n,onComplete:r,...i}){if(!(R8()&&B8.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(x=>{a=x})};u();let{keyframes:c,duration:h=300,ease:f,times:d}=i;if(j8(e,i)){const x=rc({...i,repeat:0,delay:0});let C={done:!1,value:c[0]};const k=[];let w=0;for(;!C.done&&w<N8;)C=x.sample(w),k.push(C.value),w+=ic;d=void 0,c=k,h=w-ic,f="linear"}const p=JA(t.owner.current,e,c,{...i,duration:h,ease:f,times:d});i.syncStart&&(p.startTime=Gt.isProcessing?Gt.timestamp:document.timeline?document.timeline.currentTime:performance.now());const g=()=>p.cancel(),m=()=>{ct.update(g),a(),u()};return p.onfinish=()=>{t.set(e8(c,i)),r&&r(),m()},{then(x,C){return l.then(x,C)},attachTimeline(x){return p.timeline=x,p.onfinish=null,Mt},get time(){return zr(p.currentTime||0)},set time(x){p.currentTime=pi(x)},get speed(){return p.playbackRate},set speed(x){p.playbackRate=x},get duration(){return zr(h)},play:()=>{s||(p.play(),Nr(g))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:x}=p;if(x){const C=rc({...i,autoplay:!1});t.setWithVelocity(C.sample(x-ic).value,C.sample(x).value,ic)}m()},complete:()=>p.finish(),cancel:m}}function z8({keyframes:t,delay:e,onUpdate:n,onComplete:r}){const i=()=>(n&&n(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Mt,pause:Mt,stop:Mt,then:o=>(o(),Promise.resolve()),cancel:Mt,complete:Mt});return e?rc({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const W8={type:"spring",stiffness:500,damping:25,restSpeed:10},H8=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),q8={type:"keyframes",duration:.8},U8={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Y8=(t,{keyframes:e})=>e.length>2?q8:Ki.has(t)?t.startsWith("scale")?H8(e[1]):W8:U8,fp=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(gi.test(e)||e==="0")&&!e.startsWith("url(")),G8=new Set(["brightness","contrast","saturate","opacity"]);function K8(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Gu)||[];if(!r)return t;const i=n.replace(r,"");let o=G8.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const X8=/([a-z-]*)\(.*?\)/g,dp={...gi,getAnimatableNone:t=>{const e=t.match(X8);return e?e.map(K8).join(" "):t}},Z8={...fy,color:fn,backgroundColor:fn,outlineColor:fn,fill:fn,stroke:fn,borderColor:fn,borderTopColor:fn,borderRightColor:fn,borderBottomColor:fn,borderLeftColor:fn,filter:dp,WebkitFilter:dp},pp=t=>Z8[t];function db(t,e){let n=pp(t);return n!==dp&&(n=gi),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const pb=t=>/^0[^.\s]+$/.test(t);function Q8(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||pb(t)}function J8(t,e,n,r){const i=fp(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:t.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),Q8(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const c=l[u];o[c]=db(e,a)}return o}function e9({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function gb(t,e){return t[e]||t.default||t}const gp=(t,e,n,r={})=>i=>{const o=gb(r,t)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-pi(s);const l=J8(e,t,n,o),u=l[0],c=l[l.length-1],h=fp(t,u),f=fp(t,c);Va(h===f,`You are trying to animate ${t} from "${u}" to "${c}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${c} via the \`style\` property.`);let d={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{e.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(e9(o)||(d={...d,...Y8(t,d)}),d.duration&&(d.duration=pi(d.duration)),d.repeatDelay&&(d.repeatDelay=pi(d.repeatDelay)),!h||!f||QA.current||o.type===!1)return z8(d);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=V8(e,t,d);if(p)return p}return rc(d)};function oc(t){return!!(yn(t)&&t.add)}const mb=t=>/^\-?\d*\.?\d+$/.test(t);function mp(t,e){t.indexOf(e)===-1&&t.push(e)}function vp(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class yp{constructor(){this.subscriptions=[]}add(e){return mp(this.subscriptions,e),()=>vp(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vb=new Set;function bp(t,e,n){t||vb.has(e)||(console.warn(e),n&&console.warn(n),vb.add(e))}const t9=t=>!isNaN(parseFloat(t));class n9{constructor(e,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=Gt;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,ct.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ct.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=t9(this.current),this.owner=n.owner}onChange(e){return process.env.NODE_ENV!=="production"&&bp(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new yp);const r=this.events[e].add(n);return e==="change"?()=>{r(),ct.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=e,this.timeDelta=r}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ob(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ho(t,e){return new n9(t,e)}const yb=t=>e=>e.test(t),bb=[Xi,Se,dr,hi,dA,fA,{test:t=>t==="auto",parse:t=>t}],qa=t=>bb.find(yb(t)),r9=[...bb,fn,gi],i9=t=>r9.find(yb(t));function o9(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ho(n))}function s9(t,e){const n=ec(t,e);let{transitionEnd:r={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=OA(o[s]);o9(t,s,a)}}function a9(t,e,n){var r,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=e[l];let c=null;Array.isArray(u)&&(c=u[0]),c===null&&(c=(i=(r=n[l])!==null&&r!==void 0?r:t.readValue(l))!==null&&i!==void 0?i:e[l]),c!=null&&(typeof c=="string"&&(mb(c)||pb(c))?c=parseFloat(c):!i9(c)&&gi.test(u)&&(c=db(l,u)),t.addValue(l,Ho(c,{owner:t})),n[l]===void 0&&(n[l]=c),c!==null&&t.setBaseTarget(l,c))}}function l9(t,e){return e?(e[t]||e.default||e).from:void 0}function u9(t,e,n){const r={};for(const i in t){const o=l9(i,e);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function c9({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function xb(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(o=r);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in a){const f=t.getValue(h),d=a[h];if(!f||d===void 0||c&&c9(c,h))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const m=t.getProps()[ZA];m&&(p.elapsed=window.HandoffAppearAnimations(m,h,f,ct),p.syncStart=!0)}f.start(gp(h,f,d,t.shouldReduceMotion&&Ki.has(h)?{type:!1}:p));const g=f.animation;oc(l)&&(l.add(h),g.then(()=>l.remove(h))),u.push(g)}return s&&Promise.all(u).then(()=>{s&&s9(t,s)}),u}function xp(t,e,n={}){const r=ec(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(xb(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return h9(t,e,u+l,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function h9(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(t.variantChildren).sort(f9).forEach((u,c)=>{u.notify("AnimationStart",e),s.push(xp(u,e,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(s)}function f9(t,e){return t.sortNodePosition(e)}function d9(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>xp(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=xp(t,e,n);else{const i=typeof e=="function"?ec(t,e,n.custom):e;r=Promise.all(xb(t,i,n))}return r.then(()=>t.notify("AnimationComplete",e))}const p9=[...Nd].reverse(),g9=Nd.length;function m9(t){return e=>Promise.all(e.map(({animation:n,options:r})=>d9(t,n,r)))}function v9(t){let e=m9(t);const n=b9();let r=!0;const i=(l,u)=>{const c=ec(t,u);if(c){const{transition:h,transitionEnd:f,...d}=c;l={...l,...d,...f}}return l};function o(l){e=l(t)}function s(l,u){const c=t.getProps(),h=t.getVariantContext(!0)||{},f=[],d=new Set;let p={},g=1/0;for(let b=0;b<g9;b++){const x=p9[b],C=n[x],k=c[x]!==void 0?c[x]:h[x],w=$a(k),T=x===u?C.isActive:null;T===!1&&(g=b);let S=k===h[x]&&k!==c[x]&&w;if(S&&r&&t.manuallyAnimateOnMount&&(S=!1),C.protectedKeys={...p},!C.isActive&&T===null||!k&&!C.prevProp||Hu(k)||typeof k=="boolean")continue;const M=y9(C.prevProp,k);let P=M||x===u&&C.isActive&&!S&&w||b>g&&w;const D=Array.isArray(k)?k:[k];let R=D.reduce(i,{});T===!1&&(R={});const{prevResolvedValues:H={}}=C,W={...H,...R},B=j=>{P=!0,d.delete(j),C.needsAnimating[j]=!0};for(const j in W){const N=R[j],V=H[j];p.hasOwnProperty(j)||(N!==V?Xu(N)&&Xu(V)?!_y(N,V)||M?B(j):C.protectedKeys[j]=!0:N!==void 0?B(j):d.add(j):N!==void 0&&d.has(j)?B(j):C.protectedKeys[j]=!0)}C.prevProp=k,C.prevResolvedValues=R,C.isActive&&(p={...p,...R}),r&&t.blockInitialAnimation&&(P=!1),P&&!S&&f.push(...D.map(j=>({animation:j,options:{type:x,...l}})))}if(d.size){const b={};d.forEach(x=>{const C=t.getBaseTarget(x);C!==void 0&&(b[x]=C)}),f.push({animation:b})}let m=!!f.length;return r&&c.initial===!1&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,u,c){var h;if(n[l].isActive===u)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const f=s(c,l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function y9(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!_y(e,t):!1}function Qi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function b9(){return{animate:Qi(!0),whileInView:Qi(),whileHover:Qi(),whileTap:Qi(),whileDrag:Qi(),whileFocus:Qi(),exit:Qi()}}class x9 extends di{constructor(e){super(e),e.animationState||(e.animationState=v9(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Hu(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let w9=0;class C9 extends di{constructor(){super(...arguments),this.id=w9++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:r??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const S9={animation:{Feature:x9},exit:{Feature:C9}},wb=(t,e)=>Math.abs(t-e);function k9(t,e){const n=wb(t.x,e.x),r=wb(t.y,e.y);return Math.sqrt(n**2+r**2)}class Cb{constructor(e,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Cp(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,h=k9(u.offset,{x:0,y:0})>=3;if(!c&&!h)return;const{point:f}=u,{timestamp:d}=Gt;this.history.push({...f,timestamp:d});const{onStart:p,onMove:g}=this.handlers;c||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=wp(c,this.transformPagePoint),ct.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:h,onSessionEnd:f}=this.handlers,d=Cp(u.type==="pointercancel"?this.lastMoveEventInfo:wp(c,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,d),f&&f(u,d)},!ky(e))return;this.handlers=n,this.transformPagePoint=r;const i=Ju(e),o=wp(i,this.transformPagePoint),{point:s}=o,{timestamp:a}=Gt;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=n;l&&l(e,Cp(o,this.history)),this.removeListeners=fi(Vr(window,"pointermove",this.handlePointerMove),Vr(window,"pointerup",this.handlePointerUp),Vr(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Nr(this.updatePoint)}}function wp(t,e){return e?{point:e(t.point)}:t}function Sb(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Cp({point:t},e){return{point:t,delta:Sb(t,kb(e)),offset:Sb(t,T9(e)),velocity:E9(e,.1)}}function T9(t){return t[0]}function kb(t){return t[t.length-1]}function E9(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=kb(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>pi(e)));)n--;if(!r)return{x:0,y:0};const o=zr(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Mn(t){return t.max-t.min}function Sp(t,e=0,n=.01){return Math.abs(t-e)<=n}function Tb(t,e,n,r=.5){t.origin=r,t.originPoint=Ct(e.min,e.max,t.origin),t.scale=Mn(n)/Mn(e),(Sp(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ct(n.min,n.max,t.origin)-t.originPoint,(Sp(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ua(t,e,n,r){Tb(t.x,e.x,n.x,r?r.originX:void 0),Tb(t.y,e.y,n.y,r?r.originY:void 0)}function Eb(t,e,n){t.min=n.min+e.min,t.max=t.min+Mn(e)}function O9(t,e,n){Eb(t.x,e.x,n.x),Eb(t.y,e.y,n.y)}function Ob(t,e,n){t.min=e.min-n.min,t.max=t.min+Mn(e)}function Ya(t,e,n){Ob(t.x,e.x,n.x),Ob(t.y,e.y,n.y)}function M9(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Ct(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Ct(n,t,r.max):Math.min(t,n)),t}function Mb(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function A9(t,{top:e,left:n,bottom:r,right:i}){return{x:Mb(t.x,n,i),y:Mb(t.y,e,r)}}function Ab(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function P9(t,e){return{x:Ab(t.x,e.x),y:Ab(t.y,e.y)}}function D9(t,e){let n=.5;const r=Mn(t),i=Mn(e);return i>r?n=Ha(e.min,e.max-r,t.min):r>i&&(n=Ha(t.min,t.max-i,e.min)),ci(0,1,n)}function _9(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const kp=.35;function I9(t=kp){return t===!1?t=0:t===!0&&(t=kp),{x:Pb(t,"left","right"),y:Pb(t,"top","bottom")}}function Pb(t,e,n){return{min:Db(t,e),max:Db(t,n)}}function Db(t,e){return typeof t=="number"?t:t[e]||0}const _b=()=>({translate:0,scale:1,origin:0,originPoint:0}),qo=()=>({x:_b(),y:_b()}),Ib=()=>({min:0,max:0}),jt=()=>({x:Ib(),y:Ib()});function pr(t){return[t("x"),t("y")]}function $b({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function $9({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function F9(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Tp(t){return t===void 0||t===1}function Ep({scale:t,scaleX:e,scaleY:n}){return!Tp(t)||!Tp(e)||!Tp(n)}function Ji(t){return Ep(t)||Fb(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Fb(t){return Lb(t.x)||Lb(t.y)}function Lb(t){return t&&t!=="0%"}function sc(t,e,n){const r=t-n,i=e*r;return n+i}function Rb(t,e,n,r,i){return i!==void 0&&(t=sc(t,i,r)),sc(t,n,r)+e}function Op(t,e=0,n=1,r,i){t.min=Rb(t.min,e,n,r,i),t.max=Rb(t.max,e,n,r,i)}function Bb(t,{x:e,y:n}){Op(t.x,e.translate,e.scale,e.originPoint),Op(t.y,n.translate,n.scale,n.originPoint)}function L9(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Uo(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Bb(t,s)),r&&Ji(o.latestValues)&&Uo(t,o.latestValues))}e.x=Nb(e.x),e.y=Nb(e.y)}function Nb(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function mi(t,e){t.min=t.min+e,t.max=t.max+e}function jb(t,e,[n,r,i]){const o=e[i]!==void 0?e[i]:.5,s=Ct(t.min,t.max,o);Op(t,e[n],e[r],s,e.scale)}const R9=["x","scaleX","originX"],B9=["y","scaleY","originY"];function Uo(t,e){jb(t.x,e,R9),jb(t.y,e,B9)}function Vb(t,e){return $b(F9(t.getBoundingClientRect(),e))}function N9(t,e,n){const r=Vb(t,n),{scroll:i}=e;return i&&(mi(r.x,i.offset.x),mi(r.y,i.offset.y)),r}const j9=new WeakMap;class V9{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=jt(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(Ju(l,"page").point)},o=(l,u)=>{const{drag:c,dragPropagation:h,onDragStart:f}=this.getProps();if(c&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=My(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pr(p=>{let g=this.getAxisMotionValue(p).get()||0;if(dr.test(g)){const{projection:m}=this.visualElement;if(m&&m.layout){const b=m.layout.layoutBox[p];b&&(g=Mn(b)*(parseFloat(g)/100))}}this.originPoint[p]=g}),f&&ct.update(()=>f(l,u),!1,!0);const{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},s=(l,u)=>{const{dragPropagation:c,dragDirectionLock:h,onDirectionLock:f,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(h&&this.currentDirection===null){this.currentDirection=z9(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),d&&d(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new Cb(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&ct.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!ac(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=M9(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;e&&zo(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=A9(r.layoutBox,e):this.constraints=!1,this.elastic=I9(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pr(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=_9(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!zo(e))return!1;const r=e.current;nr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=N9(r,i.root,this.visualElement.getTransformPagePoint());let s=P9(i.layout.layoutBox,o);if(n){const a=n($9(s));this.hasMutatedConstraints=!!a,a&&(s=$b(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=pr(c=>{if(!ac(c,n,this.currentDirection))return;let h=l&&l[c]||{};s&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(gp(e,r,0,n))}stopAnimation(){pr(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){pr(n=>{const{drag:r}=this.getProps();if(!ac(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-Ct(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zo(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};pr(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=D9({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pr(s=>{if(!ac(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(Ct(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;j9.set(this.visualElement,this);const e=this.visualElement.current,n=Vr(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();zo(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=jr(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(pr(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=kp,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function ac(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function z9(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class W9 extends di{constructor(e){super(e),this.removeGroupControls=Mt,this.removeListeners=Mt,this.controls=new V9(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Mt}unmount(){this.removeGroupControls(),this.removeListeners()}}const zb=t=>(e,n)=>{t&&ct.update(()=>t(e,n))};class H9 extends di{constructor(){super(...arguments),this.removePointerDownListener=Mt}onPointerDown(e){this.session=new Cb(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:zb(e),onStart:zb(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&ct.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=Vr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function q9(){const t=v.useContext(zu);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=v.useId();return v.useEffect(()=>r(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const lc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wb(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ga={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Se.test(t))t=parseFloat(t);else return t;const n=Wb(t,e.target.x),r=Wb(t,e.target.y);return`${n}% ${r}%`}},U9={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=gi.parse(t);if(i.length>5)return r;const o=gi.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const u=Ct(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class Y9 extends v.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;oA(G9),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),lc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||ct.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Hb(t){const[e,n]=q9(),r=v.useContext(zd);return v.createElement(Y9,{...t,layoutGroup:r,switchLayoutGroup:v.useContext(oy),isPresent:e,safeToRemove:n})}const G9={borderRadius:{...Ga,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ga,borderTopRightRadius:Ga,borderBottomLeftRadius:Ga,borderBottomRightRadius:Ga,boxShadow:U9},qb=["TopLeft","TopRight","BottomLeft","BottomRight"],K9=qb.length,Ub=t=>typeof t=="string"?parseFloat(t):t,Yb=t=>typeof t=="number"||Se.test(t);function X9(t,e,n,r,i,o){i?(t.opacity=Ct(0,n.opacity!==void 0?n.opacity:1,Z9(r)),t.opacityExit=Ct(e.opacity!==void 0?e.opacity:1,0,Q9(r))):o&&(t.opacity=Ct(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<K9;s++){const a=`border${qb[s]}Radius`;let l=Gb(e,a),u=Gb(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Yb(l)===Yb(u)?(t[a]=Math.max(Ct(Ub(l),Ub(u),r),0),(dr.test(u)||dr.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=Ct(e.rotate||0,n.rotate||0,r))}function Gb(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Z9=Kb(0,.5,np),Q9=Kb(.5,.95,Mt);function Kb(t,e,n){return r=>r<t?0:r>e?1:n(Ha(t,e,r))}function Xb(t,e){t.min=e.min,t.max=e.max}function qn(t,e){Xb(t.x,e.x),Xb(t.y,e.y)}function Zb(t,e,n,r,i){return t-=e,t=sc(t,1/n,r),i!==void 0&&(t=sc(t,1/i,r)),t}function J9(t,e=0,n=1,r=.5,i,o=t,s=t){if(dr.test(e)&&(e=parseFloat(e),e=Ct(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Ct(o.min,o.max,r);t===o&&(a-=e),t.min=Zb(t.min,e,n,a,i),t.max=Zb(t.max,e,n,a,i)}function Qb(t,e,[n,r,i],o,s){J9(t,e[n],e[r],e[i],e.scale,o,s)}const e7=["x","scaleX","originX"],t7=["y","scaleY","originY"];function Jb(t,e,n,r){Qb(t.x,e,e7,n?n.x:void 0,r?r.x:void 0),Qb(t.y,e,t7,n?n.y:void 0,r?r.y:void 0)}function ex(t){return t.translate===0&&t.scale===1}function tx(t){return ex(t.x)&&ex(t.y)}function n7(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function nx(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function rx(t){return Mn(t.x)/Mn(t.y)}class r7{constructor(){this.members=[]}add(e){mp(this.members,e),e.scheduleRender()}remove(e){if(vp(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ix(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const s=t.x.scale*e.x,a=t.y.scale*e.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const i7=(t,e)=>t.depth-e.depth;class o7{constructor(){this.children=[],this.isDirty=!1}add(e){mp(this.children,e),this.isDirty=!0}remove(e){vp(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(i7),this.isDirty=!1,this.children.forEach(e)}}function s7(t,e){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(Nr(r),t(o-e))};return ct.read(r,!0),()=>Nr(r)}function a7(t){window.MotionDebug&&window.MotionDebug.record(t)}function l7(t){return t instanceof SVGElement&&t.tagName!=="svg"}function u7(t,e,n){const r=yn(t)?t:Ho(t);return r.start(gp("",r,e,n)),r.animation}const ox=["","X","Y","Z"],sx=1e3;let c7=0;const eo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ax({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=c7++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{eo.totalNodes=eo.resolvedTargetDeltas=eo.recalculatedProjection=0,this.nodes.forEach(d7),this.nodes.forEach(y7),this.nodes.forEach(b7),this.nodes.forEach(p7),a7(eo)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new o7)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new yp),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=l7(s),this.instance=s;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=s7(f,250),lc.hasAnimatedSinceResize&&(lc.hasAnimatedSinceResize=!1,this.nodes.forEach(ux))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||k7,{onLayoutAnimationStart:m,onLayoutAnimationComplete:b}=c.getProps(),x=!this.targetLayout||!nx(this.targetLayout,p)||d,C=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||C||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,C);const k={...gb(g,"layout"),onPlay:m,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else f||ux(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Nr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(x7),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lx);return}this.isUpdating||this.nodes.forEach(m7),this.isUpdating=!1,this.nodes.forEach(v7),this.nodes.forEach(h7),this.nodes.forEach(f7),this.clearAllSnapshots();const a=performance.now();Gt.delta=ci(0,1e3/60,a-Gt.timestamp),Gt.timestamp=a,Gt.isProcessing=!0,Qd.update.process(Gt),Qd.preRender.process(Gt),Qd.render.process(Gt),Gt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(g7),this.sharedNodes.forEach(w7)}scheduleUpdateProjection(){ct.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=jt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!tx(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&(a||Ji(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),T7(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return jt();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(mi(a.x,l.offset.x),mi(a.y,l.offset.y)),a}removeElementScroll(s){const a=jt();qn(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;if(u!==this.root&&c&&h.layoutScroll){if(c.isRoot){qn(a,s);const{scroll:f}=this.root;f&&(mi(a.x,-f.offset.x),mi(a.y,-f.offset.y))}mi(a.x,c.offset.x),mi(a.y,c.offset.y)}}return a}applyTransform(s,a=!1){const l=jt();qn(l,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Uo(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ji(c.latestValues)&&Uo(l,c.latestValues)}return Ji(this.latestValues)&&Uo(l,this.latestValues),l}removeTransform(s){const a=jt();qn(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ji(u.latestValues))continue;Ep(u.latestValues)&&u.updateSnapshot();const c=jt(),h=u.measurePageBox();qn(c,h),Jb(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ji(this.latestValues)&&Jb(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Gt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=Gt.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=jt(),this.relativeTargetOrigin=jt(),Ya(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),qn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=jt(),this.targetWithTransforms=jt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),O9(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qn(this.target,this.layout.layoutBox),Bb(this.target,this.targetDelta)):qn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=jt(),this.relativeTargetOrigin=jt(),Ya(this.relativeTargetOrigin,this.target,d.target),qn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}eo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ep(this.parent.latestValues)||Fb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Gt.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;qn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;L9(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=qo(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=qo(),this.projectionDeltaWithTransform=qo());const g=this.projectionTransform;Ua(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=ix(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),eo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=qo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=jt(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=d!==p,m=this.getStack(),b=!m||m.members.length<=1,x=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(S7));this.animationProgress=0;let C;this.mixTargetDelta=k=>{const w=k/1e3;cx(h.x,s.x,w),cx(h.y,s.y,w),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ya(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),C7(this.relativeTarget,this.relativeTargetOrigin,f,w),C&&n7(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=jt()),qn(C,this.relativeTarget)),g&&(this.animationValues=c,X9(c,u,this.latestValues,w,x,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Nr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ct.update(()=>{lc.hasAnimatedSinceResize=!0,this.currentAnimation=u7(0,sx,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&gx(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||jt();const h=Mn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+h;const f=Mn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}qn(a,l),Uo(a,c),Ua(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new r7),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let c=0;c<ox.length;c++){const h="rotate"+ox[c];l[h]&&(u[h]=l[h],s.setStaticValue(h,0))}s.render();for(const c in u)s.setStaticValue(c,u[c]);s.scheduleRender()}getProjectionStyles(s={}){var a,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Zu(s.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Zu(s.pointerEvents)||""),this.hasProjected&&!Ji(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=ix(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:p}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Uu){if(f[g]===void 0)continue;const{correct:m,applyTo:b}=Uu[g],x=u.transform==="none"?f[g]:m(f[g],h);if(b){const C=b.length;for(let k=0;k<C;k++)u[b[k]]=x}else u[g]=x}return this.options.layoutId&&(u.pointerEvents=h===this?Zu(s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(lx),this.root.sharedNodes.clear()}}}function h7(t){t.updateLayout()}function f7(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=n.source!==t.layout.source;o==="size"?pr(h=>{const f=s?n.measuredBox[h]:n.layoutBox[h],d=Mn(f);f.min=r[h].min,f.max=f.min+d}):gx(o,n.layoutBox,r)&&pr(h=>{const f=s?n.measuredBox[h]:n.layoutBox[h],d=Mn(r[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=qo();Ua(a,r,n.layoutBox);const l=qo();s?Ua(l,t.applyTransform(i,!0),n.measuredBox):Ua(l,r,n.layoutBox);const u=!tx(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=jt();Ya(p,n.layoutBox,f.layoutBox);const g=jt();Ya(g,r,d.layoutBox),nx(p,g)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function d7(t){eo.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function p7(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function g7(t){t.clearSnapshot()}function lx(t){t.clearMeasurements()}function m7(t){t.isLayoutDirty=!1}function v7(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ux(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function y7(t){t.resolveTargetDelta()}function b7(t){t.calcProjection()}function x7(t){t.resetRotation()}function w7(t){t.removeLeadSnapshot()}function cx(t,e,n){t.translate=Ct(e.translate,0,n),t.scale=Ct(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function hx(t,e,n,r){t.min=Ct(e.min,n.min,r),t.max=Ct(e.max,n.max,r)}function C7(t,e,n,r){hx(t.x,e.x,n.x,r),hx(t.y,e.y,n.y,r)}function S7(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const k7={duration:.45,ease:[.4,0,.1,1]},fx=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),dx=fx("applewebkit/")&&!fx("chrome/")?Math.round:Mt;function px(t){t.min=dx(t.min),t.max=dx(t.max)}function T7(t){px(t.x),px(t.y)}function gx(t,e,n){return t==="position"||t==="preserve-aspect"&&!Sp(rx(e),rx(n),.2)}const E7=ax({attachResizeListener:(t,e)=>jr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Mp={current:void 0},mx=ax({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Mp.current){const t=new E7({});t.mount(window),t.setOptions({layoutScroll:!0}),Mp.current=t}return Mp.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),O7={pan:{Feature:H9},drag:{Feature:W9,ProjectionNode:mx,MeasureLayout:Hb}},M7=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function A7(t){const e=M7.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}const P7=4;function Ap(t,e,n=1){nr(n<=P7,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,i]=A7(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return mb(s)?parseFloat(s):s}else return Hd(i)?Ap(i,e,n+1):i}function D7(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!Hd(o))return;const s=Ap(o,r);s&&i.set(s)});for(const i in e){const o=e[i];if(!Hd(o))continue;const s=Ap(o,r);s&&(e[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const _7=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),vx=t=>_7.has(t),I7=t=>Object.keys(t).some(vx),uc=t=>t===Xi||t===Se,yx=(t,e)=>parseFloat(t.split(", ")[e]),bx=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return yx(i[1],e);{const o=r.match(/^matrix\((.+)\)$/);return o?yx(o[1],t):0}},$7=new Set(["x","y","z"]),F7=La.filter(t=>!$7.has(t));function L7(t){const e=[];return F7.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const Yo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:bx(4,13),y:bx(5,14)};Yo.translateX=Yo.x,Yo.translateY=Yo.y;const R7=(t,e,n)=>{const r=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=Yo[u](r,o)}),e.render();const l=e.measureViewportBox();return n.forEach(u=>{const c=e.getValue(u);c&&c.jump(a[u]),t[u]=Yo[u](l,o)}),t},B7=(t,e,n={},r={})=>{e={...e},r={...r};const i=Object.keys(e).filter(vx);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=t.getValue(l);if(!t.hasValue(l))return;let c=n[l],h=qa(c);const f=e[l];let d;if(Xu(f)){const p=f.length,g=f[0]===null?1:0;c=f[g],h=qa(c);for(let m=g;m<p&&f[m]!==null;m++)d?nr(qa(f[m])===d,"All keyframes must be of the same type"):(d=qa(f[m]),nr(d===h||uc(h)&&uc(d),"Keyframes must be of the same dimension as the current value"))}else d=qa(f);if(h!==d)if(uc(h)&&uc(d)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?e[l]=parseFloat(f):Array.isArray(f)&&d===Se&&(e[l]=f.map(parseFloat))}else h!=null&&h.transform&&(d!=null&&d.transform)&&(c===0||f===0)?c===0?u.set(d.transform(c)):e[l]=h.transform(f):(s||(o=L7(t),s=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:e[l],u.jump(f))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=R7(e,t,a);return o.length&&o.forEach(([c,h])=>{t.getValue(c).set(h)}),t.render(),Wu&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:e,transitionEnd:r}};function N7(t,e,n,r){return I7(e)?B7(t,e,n,r):{target:e,transitionEnd:r}}const j7=(t,e,n,r)=>{const i=D7(t,e,r);return e=i.target,r=i.transitionEnd,N7(t,e,n,r)},Pp={current:null},xx={current:!1};function V7(){if(xx.current=!0,!!Wu)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Pp.current=t.matches;t.addListener(e),e()}else Pp.current=!1}function z7(t,e,n){const{willChange:r}=e;for(const i in e){const o=e[i],s=n[i];if(yn(o))t.addValue(i,o),oc(r)&&r.add(i),process.env.NODE_ENV==="development"&&bp(o.version==="10.16.4",`Attempting to mix Framer Motion versions ${o.version} with 10.16.4 may not work as expected.`);else if(yn(s))t.addValue(i,Ho(o,{owner:t})),oc(r)&&r.remove(i);else if(s!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Ho(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const wx=new WeakMap,Cx=Object.keys(Fa),W7=Cx.length,Sx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],H7=jd.length;class q7{constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ct.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=qu(n),this.isVariantNode=ny(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const h in c){const f=c[h];a[h]!==void 0&&yn(f)&&(f.set(a[h],!1),oc(u)&&u.add(h))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,wx.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),xx.current||V7(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pp.current,process.env.NODE_ENV!=="production"&&bp(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){wx.delete(this.current),this.projection&&this.projection.unmount(),Nr(this.notifyUpdate),Nr(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const r=Ki.has(e),i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&ct.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Va(!1,l):nr(!1,l)}for(let l=0;l<W7;l++){const u=Cx[l],{isEnabled:c,Feature:h,ProjectionNode:f,MeasureLayout:d}=Fa[u];f&&(s=f),c(n)&&(!this.features[u]&&h&&(this.features[u]=new h(this)),d&&(a=d))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:h,layoutScroll:f,layoutRoot:d}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||h&&zo(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):jt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Sx.length;r++){const i=Sx[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=e["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=z7(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<H7;r++){const i=jd[r],o=this.props[i];($a(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Ho(n,{owner:this}),this.addValue(e,r)),r}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Zd(this.props,r))===null||n===void 0?void 0:n[e]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!yn(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new yp),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class kx extends q7{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...r},{transformValues:i},o){let s=u9(r,e||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){a9(this,r,s);const a=j7(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:e,transitionEnd:n,...r}}}function U7(t){return window.getComputedStyle(t)}class Y7 extends kx{readValueFromInstance(e,n){if(Ki.has(n)){const r=pp(n);return r&&r.default||0}else{const r=U7(e),i=(ly(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Vb(e,n)}build(e,n,r,i){qd(e,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return Xd(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;yn(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,i){vy(e,n,r,i)}}class G7 extends kx{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ki.has(n)){const r=pp(n);return r&&r.default||0}return n=yy.has(n)?n:Kd(n),e.getAttribute(n)}measureInstanceViewportBox(){return jt()}scrapeMotionValuesFromProps(e,n){return xy(e,n)}build(e,n,r,i){Yd(e,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,r,i){by(e,n,r,i)}mount(e){this.isSVGTag=Gd(e.tagName),super.mount(e)}}const K7=(t,e)=>Wd(t)?new G7(e,{enableHardwareAcceleration:!1}):new Y7(e,{enableHardwareAcceleration:!0}),X7={layout:{ProjectionNode:mx,MeasureLayout:Hb}},rr=rA(FA);function Tx(){const t=v.useRef(!1);return Rd(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Z7(){const t=Tx(),[e,n]=v.useState(0),r=v.useCallback(()=>{t.current&&n(e+1)},[e]);return[v.useCallback(()=>ct.postRender(r),[r]),e]}class Q7 extends Ce.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function J7({children:t,isPresent:e}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0});return v.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(e||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
28
+ [data-motion-pop-id="${n}"] {
29
+ position: absolute !important;
30
+ width: ${o}px !important;
31
+ height: ${s}px !important;
32
+ top: ${a}px !important;
33
+ left: ${l}px !important;
34
+ }
35
+ `),()=>{document.head.removeChild(u)}},[e]),Ce.createElement(Q7,{isPresent:e,childRef:r,sizeRef:i},Ce.cloneElement(t,{ref:r}))}const Dp=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=wy(eP),l=v.useId(),u=v.useMemo(()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:c=>{a.set(c,!0);for(const h of a.values())if(!h)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),o?void 0:[n]);return v.useMemo(()=>{a.forEach((c,h)=>a.set(h,!1))},[n]),Ce.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=Ce.createElement(J7,{isPresent:n},t)),Ce.createElement(zu.Provider,{value:u},t)};function eP(){return new Map}function tP(t){return v.useEffect(()=>()=>t(),[])}const Go=t=>t.key||"";function nP(t,e){t.forEach(n=>{const r=Go(n);e.set(r,n)})}function rP(t){const e=[];return v.Children.forEach(t,n=>{v.isValidElement(n)&&e.push(n)}),e}const Ex=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{nr(!i,"Replace exitBeforeEnter with mode='wait'");const a=v.useContext(zd).forceRender||Z7()[0],l=Tx(),u=rP(t);let c=u;const h=v.useRef(new Map).current,f=v.useRef(c),d=v.useRef(new Map).current,p=v.useRef(!0);if(Rd(()=>{p.current=!1,nP(u,d),f.current=c}),tP(()=>{p.current=!0,d.clear(),h.clear()}),p.current)return Ce.createElement(Ce.Fragment,null,c.map(x=>Ce.createElement(Dp,{key:Go(x),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},x)));c=[...c];const g=f.current.map(Go),m=u.map(Go),b=g.length;for(let x=0;x<b;x++){const C=g[x];m.indexOf(C)===-1&&!h.has(C)&&h.set(C,void 0)}return s==="wait"&&h.size&&(c=[]),h.forEach((x,C)=>{if(m.indexOf(C)!==-1)return;const k=d.get(C);if(!k)return;const w=g.indexOf(C);let T=x;if(!T){const S=()=>{d.delete(C),h.delete(C);const M=f.current.findIndex(P=>P.key===C);if(f.current.splice(M,1),!h.size){if(f.current=u,l.current===!1)return;a(),r&&r()}};T=Ce.createElement(Dp,{key:Go(k),isPresent:!1,onExitComplete:S,custom:e,presenceAffectsLayout:o,mode:s},k),h.set(C,T)}c.splice(w,0,T)}),c=c.map(x=>{const C=x.key;return h.has(C)?x:Ce.createElement(Dp,{key:Go(x),isPresent:!0,presenceAffectsLayout:o,mode:s},x)}),process.env.NODE_ENV!=="production"&&s==="wait"&&c.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),Ce.createElement(Ce.Fragment,null,h.size?c:c.map(x=>v.cloneElement(x)))};function iP({children:t,features:e,strict:n=!1}){const[,r]=v.useState(!_p(e)),i=v.useRef(void 0);if(!_p(e)){const{renderer:o,...s}=e;i.current=o,Vd(s)}return v.useEffect(()=>{_p(e)&&e().then(({renderer:o,...s})=>{Vd(s),i.current=o,r(!0)})},[]),Ce.createElement(Bd.Provider,{value:{renderer:i.current,strict:n}},t)}function _p(t){return typeof t=="function"}const oP={...{renderer:K7,...S9,...GA},...O7,...X7},sP=({open:t=!1,variants:e,onClose:n,children:r,sx:i,...o})=>y.jsx(Ex,{children:t&&y.jsx(O.Dialog,{fullWidth:!0,maxWidth:"xs",open:t,onClose:n,PaperComponent:s=>y.jsxs(O.Box,{component:rr.div,...e||Pa({distance:120,durationIn:.32,durationOut:.24,easeIn:"easeInOut"}).inUp,sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:[y.jsx(O.Box,{onClick:n,sx:{width:"100%",height:"100%",position:"fixed"}}),y.jsx(O.Paper,{sx:i,...s,children:s.children})]}),...o,children:r})}),aP=({text:t,variants:e,sx:n,...r})=>y.jsx(O.Box,{component:rr.div,sx:{m:0,typography:"h1",overflow:"hidden",display:"inline-flex",...n},...r,children:t.split("").map((i,o)=>y.jsx(rr.span,{variants:e||Pa().inUp,children:i},o))}),Ox=v.forwardRef(({size:t="large",children:e,sx:n,sxWrap:r,...i},o)=>y.jsx(hP,{size:t,sxWrap:r,children:y.jsx(O.Fab,{ref:o,size:t,sx:n,...i,children:e})}));Ox.displayName="FabButtonAnimate";const lP={hover:{scale:1.07},tap:{scale:.97}},uP={hover:{scale:1.06},tap:{scale:.98}},cP={hover:{scale:1.05},tap:{scale:.99}},hP=({size:t,children:e,sxWrap:n})=>{const r=t==="small",i=t==="large";return y.jsx(O.Box,{component:rr.div,whileTap:"tap",whileHover:"hover",variants:r&&lP||i&&cP||uP,sx:{display:"inline-flex",...n},children:e})},fP={hover:{scale:1.1},tap:{scale:.95}},dP={hover:{scale:1.09},tap:{scale:.97}},pP={hover:{scale:1.08},tap:{scale:.99}},gP=({size:t,children:e})=>{const n=t==="small",r=t==="large";return y.jsx(O.Box,{component:rr.div,whileTap:"tap",whileHover:"hover",variants:n&&fP||r&&pP||dP,sx:{display:"inline-flex"},children:e})},Mx=v.forwardRef(({children:t,size:e="medium",...n},r)=>y.jsx(gP,{size:e,children:y.jsx(O.IconButton,{size:e,ref:r,...n,children:t})}));Mx.displayName="IconButtonAnimate";function Pe(){return Pe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Pe.apply(this,arguments)}function Ko(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function Ax(t){if(!Ko(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Ax(t[n])}),e}function Wr(t,e,n={clone:!0}){const r=n.clone?Pe({},t):t;return Ko(t)&&Ko(e)&&Object.keys(e).forEach(i=>{i!=="__proto__"&&(Ko(e[i])&&i in t&&Ko(t[i])?r[i]=Wr(t[i],e[i],n):n.clone?r[i]=Ko(e[i])?Ax(e[i]):e[i]:r[i]=e[i])}),r}var Ip={exports:{}},cc={exports:{}},Xe={};/** @license React v16.13.1
36
+ * react-is.production.min.js
37
+ *
38
+ * Copyright (c) Facebook, Inc. and its affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var Px;function mP(){if(Px)return Xe;Px=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function C(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case e:switch(w=w.type,w){case l:case u:case r:case o:case i:case h:return w;default:switch(w=w&&w.$$typeof,w){case a:case c:case p:case d:case s:return w;default:return T}}case n:return T}}}function k(w){return C(w)===u}return Xe.AsyncMode=l,Xe.ConcurrentMode=u,Xe.ContextConsumer=a,Xe.ContextProvider=s,Xe.Element=e,Xe.ForwardRef=c,Xe.Fragment=r,Xe.Lazy=p,Xe.Memo=d,Xe.Portal=n,Xe.Profiler=o,Xe.StrictMode=i,Xe.Suspense=h,Xe.isAsyncMode=function(w){return k(w)||C(w)===l},Xe.isConcurrentMode=k,Xe.isContextConsumer=function(w){return C(w)===a},Xe.isContextProvider=function(w){return C(w)===s},Xe.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Xe.isForwardRef=function(w){return C(w)===c},Xe.isFragment=function(w){return C(w)===r},Xe.isLazy=function(w){return C(w)===p},Xe.isMemo=function(w){return C(w)===d},Xe.isPortal=function(w){return C(w)===n},Xe.isProfiler=function(w){return C(w)===o},Xe.isStrictMode=function(w){return C(w)===i},Xe.isSuspense=function(w){return C(w)===h},Xe.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===u||w===o||w===i||w===h||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===d||w.$$typeof===s||w.$$typeof===a||w.$$typeof===c||w.$$typeof===m||w.$$typeof===b||w.$$typeof===x||w.$$typeof===g)},Xe.typeOf=C,Xe}var Ze={};/** @license React v16.13.1
43
+ * react-is.development.js
44
+ *
45
+ * Copyright (c) Facebook, Inc. and its affiliates.
46
+ *
47
+ * This source code is licensed under the MIT license found in the
48
+ * LICENSE file in the root directory of this source tree.
49
+ */var Dx;function vP(){return Dx||(Dx=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function C(q){return typeof q=="string"||typeof q=="function"||q===r||q===u||q===o||q===i||q===h||q===f||typeof q=="object"&&q!==null&&(q.$$typeof===p||q.$$typeof===d||q.$$typeof===s||q.$$typeof===a||q.$$typeof===c||q.$$typeof===m||q.$$typeof===b||q.$$typeof===x||q.$$typeof===g)}function k(q){if(typeof q=="object"&&q!==null){var dt=q.$$typeof;switch(dt){case e:var ae=q.type;switch(ae){case l:case u:case r:case o:case i:case h:return ae;default:var X=ae&&ae.$$typeof;switch(X){case a:case c:case p:case d:case s:return X;default:return dt}}case n:return dt}}}var w=l,T=u,S=a,M=s,P=e,D=c,R=r,H=p,W=d,B=n,j=o,N=i,V=h,me=!1;function re(q){return me||(me=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(q)||k(q)===l}function _(q){return k(q)===u}function F(q){return k(q)===a}function U(q){return k(q)===s}function se(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function Q(q){return k(q)===c}function ve(q){return k(q)===r}function le(q){return k(q)===p}function ye(q){return k(q)===d}function ue(q){return k(q)===n}function ne(q){return k(q)===o}function ce(q){return k(q)===i}function _e(q){return k(q)===h}Ze.AsyncMode=w,Ze.ConcurrentMode=T,Ze.ContextConsumer=S,Ze.ContextProvider=M,Ze.Element=P,Ze.ForwardRef=D,Ze.Fragment=R,Ze.Lazy=H,Ze.Memo=W,Ze.Portal=B,Ze.Profiler=j,Ze.StrictMode=N,Ze.Suspense=V,Ze.isAsyncMode=re,Ze.isConcurrentMode=_,Ze.isContextConsumer=F,Ze.isContextProvider=U,Ze.isElement=se,Ze.isForwardRef=Q,Ze.isFragment=ve,Ze.isLazy=le,Ze.isMemo=ye,Ze.isPortal=ue,Ze.isProfiler=ne,Ze.isStrictMode=ce,Ze.isSuspense=_e,Ze.isValidElementType=C,Ze.typeOf=k}()),Ze}var _x;function Ix(){return _x||(_x=1,process.env.NODE_ENV==="production"?cc.exports=mP():cc.exports=vP()),cc.exports}/*
50
+ object-assign
51
+ (c) Sindre Sorhus
52
+ @license MIT
53
+ */var $p,$x;function yP(){if($x)return $p;$x=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $p=i()?Object.assign:function(o,s){for(var a,l=r(o),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var h in a)e.call(a,h)&&(l[h]=a[h]);if(t){u=t(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l},$p}var Fp,Fx;function Lp(){if(Fx)return Fp;Fx=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fp=t,Fp}var Rp,Lx;function Rx(){return Lx||(Lx=1,Rp=Function.call.bind(Object.prototype.hasOwnProperty)),Rp}var Bp,Bx;function bP(){if(Bx)return Bp;Bx=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Lp(),n={},r=Rx();t=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(o,s,a,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var h;try{if(typeof o[c]!="function"){var f=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}h=o[c](s,c,l,a,null,e)}catch(p){h=p}if(h&&!(h instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var d=u?u():"";t("Failed "+a+" type: "+h.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Bp=i,Bp}var Np,Nx;function xP(){if(Nx)return Np;Nx=1;var t=Ix(),e=yP(),n=Lp(),r=Rx(),i=bP(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Np=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function h(_){var F=_&&(u&&_[u]||_[c]);if(typeof F=="function")return F}var f="<<anonymous>>",d={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:x(),arrayOf:C,element:k(),elementType:w(),instanceOf:T,node:D(),objectOf:M,oneOf:S,oneOfType:P,shape:H,exact:W};function p(_,F){return _===F?_!==0||1/_===1/F:_!==_&&F!==F}function g(_,F){this.message=_,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function m(_){if(process.env.NODE_ENV!=="production")var F={},U=0;function se(ve,le,ye,ue,ne,ce,_e){if(ue=ue||f,ce=ce||ye,_e!==n){if(l){var q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw q.name="Invariant Violation",q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var dt=ue+":"+ye;!F[dt]&&U<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ce+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[dt]=!0,U++)}}return le[ye]==null?ve?le[ye]===null?new g("The "+ne+" `"+ce+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new g("The "+ne+" `"+ce+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:_(le,ye,ue,ne,ce)}var Q=se.bind(null,!1);return Q.isRequired=se.bind(null,!0),Q}function b(_){function F(U,se,Q,ve,le,ye){var ue=U[se],ne=N(ue);if(ne!==_){var ce=V(ue);return new g("Invalid "+ve+" `"+le+"` of type "+("`"+ce+"` supplied to `"+Q+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return m(F)}function x(){return m(s)}function C(_){function F(U,se,Q,ve,le){if(typeof _!="function")return new g("Property `"+le+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var ye=U[se];if(!Array.isArray(ye)){var ue=N(ye);return new g("Invalid "+ve+" `"+le+"` of type "+("`"+ue+"` supplied to `"+Q+"`, expected an array."))}for(var ne=0;ne<ye.length;ne++){var ce=_(ye,ne,Q,ve,le+"["+ne+"]",n);if(ce instanceof Error)return ce}return null}return m(F)}function k(){function _(F,U,se,Q,ve){var le=F[U];if(!a(le)){var ye=N(le);return new g("Invalid "+Q+" `"+ve+"` of type "+("`"+ye+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return m(_)}function w(){function _(F,U,se,Q,ve){var le=F[U];if(!t.isValidElementType(le)){var ye=N(le);return new g("Invalid "+Q+" `"+ve+"` of type "+("`"+ye+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return m(_)}function T(_){function F(U,se,Q,ve,le){if(!(U[se]instanceof _)){var ye=_.name||f,ue=re(U[se]);return new g("Invalid "+ve+" `"+le+"` of type "+("`"+ue+"` supplied to `"+Q+"`, expected ")+("instance of `"+ye+"`."))}return null}return m(F)}function S(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function F(U,se,Q,ve,le){for(var ye=U[se],ue=0;ue<_.length;ue++)if(p(ye,_[ue]))return null;var ne=JSON.stringify(_,function(_e,q){var dt=V(q);return dt==="symbol"?String(q):q});return new g("Invalid "+ve+" `"+le+"` of value `"+String(ye)+"` "+("supplied to `"+Q+"`, expected one of "+ne+"."))}return m(F)}function M(_){function F(U,se,Q,ve,le){if(typeof _!="function")return new g("Property `"+le+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var ye=U[se],ue=N(ye);if(ue!=="object")return new g("Invalid "+ve+" `"+le+"` of type "+("`"+ue+"` supplied to `"+Q+"`, expected an object."));for(var ne in ye)if(r(ye,ne)){var ce=_(ye,ne,Q,ve,le+"."+ne,n);if(ce instanceof Error)return ce}return null}return m(F)}function P(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var F=0;F<_.length;F++){var U=_[F];if(typeof U!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+me(U)+" at index "+F+"."),s}function se(Q,ve,le,ye,ue){for(var ne=[],ce=0;ce<_.length;ce++){var _e=_[ce],q=_e(Q,ve,le,ye,ue,n);if(q==null)return null;q.data&&r(q.data,"expectedType")&&ne.push(q.data.expectedType)}var dt=ne.length>0?", expected one of type ["+ne.join(", ")+"]":"";return new g("Invalid "+ye+" `"+ue+"` supplied to "+("`"+le+"`"+dt+"."))}return m(se)}function D(){function _(F,U,se,Q,ve){return B(F[U])?null:new g("Invalid "+Q+" `"+ve+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return m(_)}function R(_,F,U,se,Q){return new g((_||"React class")+": "+F+" type `"+U+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function H(_){function F(U,se,Q,ve,le){var ye=U[se],ue=N(ye);if(ue!=="object")return new g("Invalid "+ve+" `"+le+"` of type `"+ue+"` "+("supplied to `"+Q+"`, expected `object`."));for(var ne in _){var ce=_[ne];if(typeof ce!="function")return R(Q,ve,le,ne,V(ce));var _e=ce(ye,ne,Q,ve,le+"."+ne,n);if(_e)return _e}return null}return m(F)}function W(_){function F(U,se,Q,ve,le){var ye=U[se],ue=N(ye);if(ue!=="object")return new g("Invalid "+ve+" `"+le+"` of type `"+ue+"` "+("supplied to `"+Q+"`, expected `object`."));var ne=e({},U[se],_);for(var ce in ne){var _e=_[ce];if(r(_,ce)&&typeof _e!="function")return R(Q,ve,le,ce,V(_e));if(!_e)return new g("Invalid "+ve+" `"+le+"` key `"+ce+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(U[se],null," ")+`
54
+ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var q=_e(ye,ce,Q,ve,le+"."+ce,n);if(q)return q}return null}return m(F)}function B(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(B);if(_===null||a(_))return!0;var F=h(_);if(F){var U=F.call(_),se;if(F!==_.entries){for(;!(se=U.next()).done;)if(!B(se.value))return!1}else for(;!(se=U.next()).done;){var Q=se.value;if(Q&&!B(Q[1]))return!1}}else return!1;return!0;default:return!1}}function j(_,F){return _==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function N(_){var F=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":j(F,_)?"symbol":F}function V(_){if(typeof _>"u"||_===null)return""+_;var F=N(_);if(F==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return F}function me(_){var F=V(_);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function re(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Np}var jp,jx;function wP(){if(jx)return jp;jx=1;var t=Lp();function e(){}function n(){}return n.resetWarningCache=e,jp=function(){function r(s,a,l,u,c,h){if(h!==t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},jp}if(process.env.NODE_ENV!=="production"){var CP=Ix(),SP=!0;Ip.exports=xP()(CP.isElement,SP)}else Ip.exports=wP()();var kP=Ip.exports;const A=Gi(kP),TP="exact-prop: ​";function Vx(t){return process.env.NODE_ENV==="production"?t:Pe({},t,{[TP]:e=>{const n=Object.keys(e).filter(r=>!t.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}})}function Xo(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var Vp={exports:{}},Qe={};/**
55
+ * @license React
56
+ * react-is.production.min.js
57
+ *
58
+ * Copyright (c) Facebook, Inc. and its affiliates.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */var zx;function EP(){if(zx)return Qe;zx=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),p;p=Symbol.for("react.module.reference");function g(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case n:case i:case r:case u:case c:return m;default:switch(m=m&&m.$$typeof,m){case a:case s:case l:case f:case h:case o:return m;default:return b}}case e:return b}}}return Qe.ContextConsumer=s,Qe.ContextProvider=o,Qe.Element=t,Qe.ForwardRef=l,Qe.Fragment=n,Qe.Lazy=f,Qe.Memo=h,Qe.Portal=e,Qe.Profiler=i,Qe.StrictMode=r,Qe.Suspense=u,Qe.SuspenseList=c,Qe.isAsyncMode=function(){return!1},Qe.isConcurrentMode=function(){return!1},Qe.isContextConsumer=function(m){return g(m)===s},Qe.isContextProvider=function(m){return g(m)===o},Qe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Qe.isForwardRef=function(m){return g(m)===l},Qe.isFragment=function(m){return g(m)===n},Qe.isLazy=function(m){return g(m)===f},Qe.isMemo=function(m){return g(m)===h},Qe.isPortal=function(m){return g(m)===e},Qe.isProfiler=function(m){return g(m)===i},Qe.isStrictMode=function(m){return g(m)===r},Qe.isSuspense=function(m){return g(m)===u},Qe.isSuspenseList=function(m){return g(m)===c},Qe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===i||m===r||m===u||m===c||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===h||m.$$typeof===o||m.$$typeof===s||m.$$typeof===l||m.$$typeof===p||m.getModuleId!==void 0)},Qe.typeOf=g,Qe}var Je={};/**
63
+ * @license React
64
+ * react-is.development.js
65
+ *
66
+ * Copyright (c) Facebook, Inc. and its affiliates.
67
+ *
68
+ * This source code is licensed under the MIT license found in the
69
+ * LICENSE file in the root directory of this source tree.
70
+ */var Wx;function OP(){return Wx||(Wx=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),p=!1,g=!1,m=!1,b=!1,x=!1,C;C=Symbol.for("react.module.reference");function k(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===n||ae===i||x||ae===r||ae===u||ae===c||b||ae===d||p||g||m||typeof ae=="object"&&ae!==null&&(ae.$$typeof===f||ae.$$typeof===h||ae.$$typeof===o||ae.$$typeof===s||ae.$$typeof===l||ae.$$typeof===C||ae.getModuleId!==void 0))}function w(ae){if(typeof ae=="object"&&ae!==null){var X=ae.$$typeof;switch(X){case t:var fe=ae.type;switch(fe){case n:case i:case r:case u:case c:return fe;default:var xe=fe&&fe.$$typeof;switch(xe){case a:case s:case l:case f:case h:case o:return xe;default:return X}}case e:return X}}}var T=s,S=o,M=t,P=l,D=n,R=f,H=h,W=e,B=i,j=r,N=u,V=c,me=!1,re=!1;function _(ae){return me||(me=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(ae){return re||(re=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(ae){return w(ae)===s}function se(ae){return w(ae)===o}function Q(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===t}function ve(ae){return w(ae)===l}function le(ae){return w(ae)===n}function ye(ae){return w(ae)===f}function ue(ae){return w(ae)===h}function ne(ae){return w(ae)===e}function ce(ae){return w(ae)===i}function _e(ae){return w(ae)===r}function q(ae){return w(ae)===u}function dt(ae){return w(ae)===c}Je.ContextConsumer=T,Je.ContextProvider=S,Je.Element=M,Je.ForwardRef=P,Je.Fragment=D,Je.Lazy=R,Je.Memo=H,Je.Portal=W,Je.Profiler=B,Je.StrictMode=j,Je.Suspense=N,Je.SuspenseList=V,Je.isAsyncMode=_,Je.isConcurrentMode=F,Je.isContextConsumer=U,Je.isContextProvider=se,Je.isElement=Q,Je.isForwardRef=ve,Je.isFragment=le,Je.isLazy=ye,Je.isMemo=ue,Je.isPortal=ne,Je.isProfiler=ce,Je.isStrictMode=_e,Je.isSuspense=q,Je.isSuspenseList=dt,Je.isValidElementType=k,Je.typeOf=w}()),Je}process.env.NODE_ENV==="production"?Vp.exports=EP():Vp.exports=OP();var Hx=Vp.exports;const MP=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function AP(t){const e=`${t}`.match(MP);return e&&e[1]||""}function qx(t,e=""){return t.displayName||t.name||AP(t)||e}function Ux(t,e,n){const r=qx(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function PP(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return qx(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Hx.ForwardRef:return Ux(t,t.render,"ForwardRef");case Hx.Memo:return Ux(t,t.type,"memo");default:return}}}function Zo(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Xo(7));return t.charAt(0).toUpperCase()+t.slice(1)}const DP=typeof window<"u"?Ce.useLayoutEffect:Ce.useEffect;function Yx(t,e){const n=Pe({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=Pe({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=Pe({},o),Object.keys(i).forEach(s=>{n[r][s]=Yx(i[s],o[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}const Gx=t=>t,_P=(()=>{let t=Gx;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Gx}}})(),IP={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function $P(t,e,n="Mui"){const r=IP[e];return r?`${n}-${r}`:`${_P.generate(t)}-${e}`}const hc="$$material";function Hr(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function FP(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function LP(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var RP=function(){function t(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?process.env.NODE_ENV==="production":n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(LP(this));var i=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var o=r.charCodeAt(0)===64&&r.charCodeAt(1)===105;o&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
71
+ `+r+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!o}if(this.isSpeedy){var s=FP(i);try{s.insertRule(r,s.cssRules.length)}catch(a){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(r)&&console.error('There was a problem inserting the following rule: "'+r+'"',a)}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},t}(),rn="-ms-",fc="-moz-",qe="-webkit-",zp="comm",Wp="rule",Hp="decl",BP="@import",Kx="@keyframes",NP="@layer",jP=Math.abs,dc=String.fromCharCode,VP=Object.assign;function zP(t,e){return Qt(t,0)^45?(((e<<2^Qt(t,0))<<2^Qt(t,1))<<2^Qt(t,2))<<2^Qt(t,3):0}function Xx(t){return t.trim()}function WP(t,e){return(t=e.exec(t))?t[0]:t}function Ue(t,e,n){return t.replace(e,n)}function qp(t,e){return t.indexOf(e)}function Qt(t,e){return t.charCodeAt(e)|0}function Ka(t,e,n){return t.slice(e,n)}function gr(t){return t.length}function Up(t){return t.length}function pc(t,e){return e.push(t),t}function HP(t,e){return t.map(e).join("")}var gc=1,Qo=1,Zx=0,bn=0,Vt=0,Jo="";function mc(t,e,n,r,i,o,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:gc,column:Qo,length:s,return:""}}function Xa(t,e){return VP(mc("",null,null,"",null,null,0),t,{length:-t.length},e)}function qP(){return Vt}function UP(){return Vt=bn>0?Qt(Jo,--bn):0,Qo--,Vt===10&&(Qo=1,gc--),Vt}function An(){return Vt=bn<Zx?Qt(Jo,bn++):0,Qo++,Vt===10&&(Qo=1,gc++),Vt}function mr(){return Qt(Jo,bn)}function vc(){return bn}function Za(t,e){return Ka(Jo,t,e)}function Qa(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qx(t){return gc=Qo=1,Zx=gr(Jo=t),bn=0,[]}function Jx(t){return Jo="",t}function yc(t){return Xx(Za(bn-1,Yp(t===91?t+2:t===40?t+1:t)))}function YP(t){for(;(Vt=mr())&&Vt<33;)An();return Qa(t)>2||Qa(Vt)>3?"":" "}function GP(t,e){for(;--e&&An()&&!(Vt<48||Vt>102||Vt>57&&Vt<65||Vt>70&&Vt<97););return Za(t,vc()+(e<6&&mr()==32&&An()==32))}function Yp(t){for(;An();)switch(Vt){case t:return bn;case 34:case 39:t!==34&&t!==39&&Yp(Vt);break;case 40:t===41&&Yp(t);break;case 92:An();break}return bn}function KP(t,e){for(;An()&&t+Vt!==47+10;)if(t+Vt===42+42&&mr()===47)break;return"/*"+Za(e,bn-1)+"*"+dc(t===47?t:An())}function XP(t){for(;!Qa(mr());)An();return Za(t,bn)}function ZP(t){return Jx(bc("",null,null,null,[""],t=Qx(t),0,[0],t))}function bc(t,e,n,r,i,o,s,a,l){for(var u=0,c=0,h=s,f=0,d=0,p=0,g=1,m=1,b=1,x=0,C="",k=i,w=o,T=r,S=C;m;)switch(p=x,x=An()){case 40:if(p!=108&&Qt(S,h-1)==58){qp(S+=Ue(yc(x),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:S+=yc(x);break;case 9:case 10:case 13:case 32:S+=YP(p);break;case 92:S+=GP(vc()-1,7);continue;case 47:switch(mr()){case 42:case 47:pc(QP(KP(An(),vc()),e,n),l);break;default:S+="/"}break;case 123*g:a[u++]=gr(S)*b;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+c:b==-1&&(S=Ue(S,/\f/g,"")),d>0&&gr(S)-h&&pc(d>32?t2(S+";",r,n,h-1):t2(Ue(S," ","")+";",r,n,h-2),l);break;case 59:S+=";";default:if(pc(T=e2(S,e,n,u,c,i,a,C,k=[],w=[],h),o),x===123)if(c===0)bc(S,e,T,T,k,o,h,a,w);else switch(f===99&&Qt(S,3)===110?100:f){case 100:case 108:case 109:case 115:bc(t,T,T,r&&pc(e2(t,T,T,0,0,i,a,C,i,k=[],h),w),i,w,h,a,r?k:w);break;default:bc(S,T,T,T,[""],w,0,a,w)}}u=c=d=0,g=b=1,C=S="",h=s;break;case 58:h=1+gr(S),d=p;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&UP()==125)continue}switch(S+=dc(x),x*g){case 38:b=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(gr(S)-1)*b,b=1;break;case 64:mr()===45&&(S+=yc(An())),f=mr(),c=h=gr(C=S+=XP(vc())),x++;break;case 45:p===45&&gr(S)==2&&(g=0)}}return o}function e2(t,e,n,r,i,o,s,a,l,u,c){for(var h=i-1,f=i===0?o:[""],d=Up(f),p=0,g=0,m=0;p<r;++p)for(var b=0,x=Ka(t,h+1,h=jP(g=s[p])),C=t;b<d;++b)(C=Xx(g>0?f[b]+" "+x:Ue(x,/&\f/g,f[b])))&&(l[m++]=C);return mc(t,e,n,i===0?Wp:a,l,u,c)}function QP(t,e,n){return mc(t,e,n,zp,dc(qP()),Ka(t,2,-2),0)}function t2(t,e,n,r){return mc(t,e,n,Hp,Ka(t,0,r),Ka(t,r+1,-1),r)}function es(t,e){for(var n="",r=Up(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function JP(t,e,n,r){switch(t.type){case NP:if(t.children.length)break;case BP:case Hp:return t.return=t.return||t.value;case zp:return"";case Kx:return t.return=t.value+"{"+es(t.children,r)+"}";case Wp:t.value=t.props.join(",")}return gr(n=es(t.children,r))?t.return=t.value+"{"+n+"}":""}function eD(t){var e=Up(t);return function(n,r,i,o){for(var s="",a=0;a<e;a++)s+=t[a](n,r,i,o)||"";return s}}function tD(t){return function(e){e.root||(e=e.return)&&t(e)}}var nD=function(e,n,r){for(var i=0,o=0;i=o,o=mr(),i===38&&o===12&&(n[r]=1),!Qa(o);)An();return Za(e,bn)},rD=function(e,n){var r=-1,i=44;do switch(Qa(i)){case 0:i===38&&mr()===12&&(n[r]=1),e[r]+=nD(bn-1,n,r);break;case 2:e[r]+=yc(i);break;case 4:if(i===44){e[++r]=mr()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=dc(i)}while(i=An());return e},iD=function(e,n){return Jx(rD(Qx(e),n))},n2=new WeakMap,oD=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!n2.get(r))&&!i){n2.set(e,!0);for(var o=[],s=iD(n,o),a=r.props,l=0,u=0;l<s.length;l++)for(var c=0;c<a.length;c++,u++)e.props[u]=o[l]?s[l].replace(/&\f/g,a[c]):a[c]+" "+s[l]}}},sD=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}},aD="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",lD=function(e){return e.type==="comm"&&e.children.indexOf(aD)>-1},uD=function(e){return function(n,r,i){if(!(n.type!=="rule"||e.compat)){var o=n.value.match(/(:first|:nth|:nth-last)-child/g);if(o){for(var s=!!n.parent,a=s?n.parent.children:i,l=a.length-1;l>=0;l--){var u=a[l];if(u.line<n.line)break;if(u.column<n.column){if(lD(u))return;break}}o.forEach(function(c){console.error('The pseudo class "'+c+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+c.split("-child")[0]+'-of-type".')})}}}},r2=function(e){return e.type.charCodeAt(1)===105&&e.type.charCodeAt(0)===64},cD=function(e,n){for(var r=e-1;r>=0;r--)if(!r2(n[r]))return!0;return!1},i2=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},hD=function(e,n,r){r2(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),i2(e)):cD(n,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),i2(e)))};function o2(t,e){switch(zP(t,e)){case 5103:return qe+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return qe+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return qe+t+fc+t+rn+t+t;case 6828:case 4268:return qe+t+rn+t+t;case 6165:return qe+t+rn+"flex-"+t+t;case 5187:return qe+t+Ue(t,/(\w+).+(:[^]+)/,qe+"box-$1$2"+rn+"flex-$1$2")+t;case 5443:return qe+t+rn+"flex-item-"+Ue(t,/flex-|-self/,"")+t;case 4675:return qe+t+rn+"flex-line-pack"+Ue(t,/align-content|flex-|-self/,"")+t;case 5548:return qe+t+rn+Ue(t,"shrink","negative")+t;case 5292:return qe+t+rn+Ue(t,"basis","preferred-size")+t;case 6060:return qe+"box-"+Ue(t,"-grow","")+qe+t+rn+Ue(t,"grow","positive")+t;case 4554:return qe+Ue(t,/([^-])(transform)/g,"$1"+qe+"$2")+t;case 6187:return Ue(Ue(Ue(t,/(zoom-|grab)/,qe+"$1"),/(image-set)/,qe+"$1"),t,"")+t;case 5495:case 3959:return Ue(t,/(image-set\([^]*)/,qe+"$1$`$1");case 4968:return Ue(Ue(t,/(.+:)(flex-)?(.*)/,qe+"box-pack:$3"+rn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+qe+t+t;case 4095:case 3583:case 4068:case 2532:return Ue(t,/(.+)-inline(.+)/,qe+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(gr(t)-1-e>6)switch(Qt(t,e+1)){case 109:if(Qt(t,e+4)!==45)break;case 102:return Ue(t,/(.+:)(.+)-([^]+)/,"$1"+qe+"$2-$3$1"+fc+(Qt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~qp(t,"stretch")?o2(Ue(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Qt(t,e+1)!==115)break;case 6444:switch(Qt(t,gr(t)-3-(~qp(t,"!important")&&10))){case 107:return Ue(t,":",":"+qe)+t;case 101:return Ue(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+qe+(Qt(t,14)===45?"inline-":"")+"box$3$1"+qe+"$2$3$1"+rn+"$2box$3")+t}break;case 5936:switch(Qt(t,e+11)){case 114:return qe+t+rn+Ue(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return qe+t+rn+Ue(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return qe+t+rn+Ue(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return qe+t+rn+t+t}return t}var fD=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case Hp:e.return=o2(e.value,e.length);break;case Kx:return es([Xa(e,{value:Ue(e.value,"@","@"+qe)})],i);case Wp:if(e.length)return HP(e.props,function(o){switch(WP(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return es([Xa(e,{props:[Ue(o,/:(read-\w+)/,":"+fc+"$1")]})],i);case"::placeholder":return es([Xa(e,{props:[Ue(o,/:(plac\w+)/,":"+qe+"input-$1")]}),Xa(e,{props:[Ue(o,/:(plac\w+)/,":"+fc+"$1")]}),Xa(e,{props:[Ue(o,/:(plac\w+)/,rn+"input-$1")]})],i)}return""})}},dD=[fD],pD=function(e){var n=e.key;if(process.env.NODE_ENV!=="production"&&!n)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
72
+ If multiple caches share the same key they might "fight" for each other's style elements.`);if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||dD;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(n))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+n+'" was passed');var o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),b=1;b<m.length;b++)o[m[b]]=!0;a.push(g)});var l,u=[oD,sD];process.env.NODE_ENV!=="production"&&u.push(uD({get compat(){return p.compat}}),hD);{var c,h=[JP,process.env.NODE_ENV!=="production"?function(g){g.root||(g.return?c.insert(g.return):g.value&&g.type!==zp&&c.insert(g.value+"{}"))}:tD(function(g){c.insert(g)})],f=eD(u.concat(i,h)),d=function(m){return es(ZP(m),f)};l=function(m,b,x,C){c=x,process.env.NODE_ENV!=="production"&&b.map!==void 0&&(c={insert:function(w){x.insert(w+b.map)}}),d(m?m+"{"+b.styles+"}":b.styles),C&&(p.inserted[b.name]=!0)}}var p={key:n,sheet:new RP({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(a),p};let Gp;typeof document=="object"&&(Gp=pD({key:"css",prepend:!0}));function s2(t){const{injectFirst:e,children:n}=t;return e&&Gp?y.jsx(Fd.CacheProvider,{value:Gp,children:n}):n}process.env.NODE_ENV!=="production"&&(s2.propTypes={children:A.node,injectFirst:A.bool});/**
73
+ * @mui/styled-engine v5.14.11
74
+ *
75
+ * @license MIT
76
+ * This source code is licensed under the MIT license found in the
77
+ * LICENSE file in the root directory of this source tree.
78
+ */function gD(t,e){const n=$6(t,e);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof t=="string"?`"${t}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
79
+ `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}const mD=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},vD=["values","unit","step"],yD=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>Pe({},n,{[r.key]:r.val}),{})};function bD(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=Hr(t,vD),o=yD(e),s=Object.keys(o);function a(f){return`@media (min-width:${typeof e[f]=="number"?e[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof e[f]=="number"?e[f]:f)-r/100}${n})`}function u(f,d){const p=s.indexOf(d);return`@media (min-width:${typeof e[f]=="number"?e[f]:f}${n}) and (max-width:${(p!==-1&&typeof e[s[p]]=="number"?e[s[p]]:d)-r/100}${n})`}function c(f){return s.indexOf(f)+1<s.length?u(f,s[s.indexOf(f)+1]):a(f)}function h(f){const d=s.indexOf(f);return d===0?a(s[1]):d===s.length-1?l(s[d]):u(f,s[s.indexOf(f)+1]).replace("@media","@media not all and")}return Pe({keys:s,values:o,up:a,down:l,between:u,only:c,not:h,unit:n},i)}const xD={borderRadius:4},vi=process.env.NODE_ENV!=="production"?A.oneOfType([A.number,A.string,A.object,A.array]):{};function Ja(t,e){return e?Wr(t,e,{clone:!1}):t}const Kp={xs:0,sm:600,md:900,lg:1200,xl:1536},a2={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${Kp[t]}px)`};function qr(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||a2;return e.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const o=r.breakpoints||a2;return Object.keys(e).reduce((s,a)=>{if(Object.keys(o.values||Kp).indexOf(a)!==-1){const l=o.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function wD(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function CD(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function xc(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function wc(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=xc(t,n)||r,e&&(i=e(i,r,t)),i}function et(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,u=xc(l,r)||{};return qr(s,a,h=>{let f=wc(u,i,h);return h===f&&typeof h=="string"&&(f=wc(u,i,`${e}${h==="default"?"":Zo(h)}`,h)),n===!1?f:{[n]:f}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[e]:vi}:{},o.filterProps=[e],o}function SD(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const kD={m:"margin",p:"padding"},TD={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l2={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ED=SD(t=>{if(t.length>2)if(l2[t])t=l2[t];else return[t];const[e,n]=t.split(""),r=kD[e],i=TD[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Cc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],OD=[...Cc,...Sc];function el(t,e,n,r){var i;const o=(i=xc(t,e,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),o*s):Array.isArray(o)?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
80
+ `)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
81
+ `))),o[s]):typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
82
+ `)),()=>{})}function u2(t){return el(t,"spacing",8,"spacing")}function tl(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function MD(t,e){return n=>t.reduce((r,i)=>(r[i]=tl(e,n),r),{})}function AD(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=ED(n),o=MD(i,r),s=t[n];return qr(t,s,o)}function c2(t,e){const n=u2(t.theme);return Object.keys(t).map(r=>AD(t,e,r,n)).reduce(Ja,{})}function At(t){return c2(t,Cc)}At.propTypes=process.env.NODE_ENV!=="production"?Cc.reduce((t,e)=>(t[e]=vi,t),{}):{},At.filterProps=Cc;function Pt(t){return c2(t,Sc)}Pt.propTypes=process.env.NODE_ENV!=="production"?Sc.reduce((t,e)=>(t[e]=vi,t),{}):{},Pt.filterProps=Sc,process.env.NODE_ENV!=="production"&&OD.reduce((t,e)=>(t[e]=vi,t),{});function PD(t=8){if(t.mui)return t;const e=u2({spacing:t}),n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const s=e(o);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function kc(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?Ja(i,e[o](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function vr(t){return typeof t!="number"?t:`${t}px solid`}const DD=et({prop:"border",themeKey:"borders",transform:vr}),_D=et({prop:"borderTop",themeKey:"borders",transform:vr}),ID=et({prop:"borderRight",themeKey:"borders",transform:vr}),$D=et({prop:"borderBottom",themeKey:"borders",transform:vr}),FD=et({prop:"borderLeft",themeKey:"borders",transform:vr}),LD=et({prop:"borderColor",themeKey:"palette"}),RD=et({prop:"borderTopColor",themeKey:"palette"}),BD=et({prop:"borderRightColor",themeKey:"palette"}),ND=et({prop:"borderBottomColor",themeKey:"palette"}),jD=et({prop:"borderLeftColor",themeKey:"palette"}),Tc=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=el(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:tl(e,r)});return qr(t,t.borderRadius,n)}return null};Tc.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:vi}:{},Tc.filterProps=["borderRadius"],kc(DD,_D,ID,$D,FD,LD,RD,BD,ND,jD,Tc);const Ec=t=>{if(t.gap!==void 0&&t.gap!==null){const e=el(t.theme,"spacing",8,"gap"),n=r=>({gap:tl(e,r)});return qr(t,t.gap,n)}return null};Ec.propTypes=process.env.NODE_ENV!=="production"?{gap:vi}:{},Ec.filterProps=["gap"];const Oc=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=el(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:tl(e,r)});return qr(t,t.columnGap,n)}return null};Oc.propTypes=process.env.NODE_ENV!=="production"?{columnGap:vi}:{},Oc.filterProps=["columnGap"];const Mc=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=el(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:tl(e,r)});return qr(t,t.rowGap,n)}return null};Mc.propTypes=process.env.NODE_ENV!=="production"?{rowGap:vi}:{},Mc.filterProps=["rowGap"];const VD=et({prop:"gridColumn"}),zD=et({prop:"gridRow"}),WD=et({prop:"gridAutoFlow"}),HD=et({prop:"gridAutoColumns"}),qD=et({prop:"gridAutoRows"}),UD=et({prop:"gridTemplateColumns"}),YD=et({prop:"gridTemplateRows"}),GD=et({prop:"gridTemplateAreas"}),KD=et({prop:"gridArea"});kc(Ec,Oc,Mc,VD,zD,WD,HD,qD,UD,YD,GD,KD);function ts(t,e){return e==="grey"?e:t}const XD=et({prop:"color",themeKey:"palette",transform:ts}),ZD=et({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ts}),QD=et({prop:"backgroundColor",themeKey:"palette",transform:ts});kc(XD,ZD,QD);function Pn(t){return t<=1&&t!==0?`${t*100}%`:t}const JD=et({prop:"width",transform:Pn}),Xp=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Kp[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Pn(n)}};return qr(t,t.maxWidth,e)}return null};Xp.filterProps=["maxWidth"];const e_=et({prop:"minWidth",transform:Pn}),t_=et({prop:"height",transform:Pn}),n_=et({prop:"maxHeight",transform:Pn}),r_=et({prop:"minHeight",transform:Pn});et({prop:"size",cssProperty:"width",transform:Pn}),et({prop:"size",cssProperty:"height",transform:Pn});const i_=et({prop:"boxSizing"});kc(JD,Xp,e_,t_,n_,r_,i_);const Zp={border:{themeKey:"borders",transform:vr},borderTop:{themeKey:"borders",transform:vr},borderRight:{themeKey:"borders",transform:vr},borderBottom:{themeKey:"borders",transform:vr},borderLeft:{themeKey:"borders",transform:vr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Tc},color:{themeKey:"palette",transform:ts},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ts},backgroundColor:{themeKey:"palette",transform:ts},p:{style:Pt},pt:{style:Pt},pr:{style:Pt},pb:{style:Pt},pl:{style:Pt},px:{style:Pt},py:{style:Pt},padding:{style:Pt},paddingTop:{style:Pt},paddingRight:{style:Pt},paddingBottom:{style:Pt},paddingLeft:{style:Pt},paddingX:{style:Pt},paddingY:{style:Pt},paddingInline:{style:Pt},paddingInlineStart:{style:Pt},paddingInlineEnd:{style:Pt},paddingBlock:{style:Pt},paddingBlockStart:{style:Pt},paddingBlockEnd:{style:Pt},m:{style:At},mt:{style:At},mr:{style:At},mb:{style:At},ml:{style:At},mx:{style:At},my:{style:At},margin:{style:At},marginTop:{style:At},marginRight:{style:At},marginBottom:{style:At},marginLeft:{style:At},marginX:{style:At},marginY:{style:At},marginInline:{style:At},marginInlineStart:{style:At},marginInlineEnd:{style:At},marginBlock:{style:At},marginBlockStart:{style:At},marginBlockEnd:{style:At},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ec},rowGap:{style:Mc},columnGap:{style:Oc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Pn},maxWidth:{style:Xp},minWidth:{transform:Pn},height:{transform:Pn},maxHeight:{transform:Pn},minHeight:{transform:Pn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function o_(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function s_(t,e){return typeof t=="function"?t(e):t}function a_(){function t(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:h}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=xc(i,u)||{};return h?h(s):qr(s,r,p=>{let g=wc(f,c,p);return p===g&&typeof p=="string"&&(g=wc(f,c,`${n}${p==="default"?"":Zo(p)}`,p)),l===!1?g:{[l]:g}})}function e(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:Zp;function a(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const c=wD(o.breakpoints),h=Object.keys(c);let f=c;return Object.keys(u).forEach(d=>{const p=s_(u[d],o);if(p!=null)if(typeof p=="object")if(s[d])f=Ja(f,t(d,p,o,s));else{const g=qr({theme:o},p,m=>({[d]:m}));o_(g,p)?f[d]=e({sx:p,theme:o}):f=Ja(f,g)}else f=Ja(f,t(d,p,o,s))}),CD(h,f)}return Array.isArray(i)?i.map(a):a(i)}return e}const h2=a_();h2.filterProps=["sx"];const Qp=h2,l_=["breakpoints","palette","spacing","shape"];function Jp(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,s=Hr(t,l_),a=bD(n),l=PD(i);let u=Wr({breakpoints:a,direction:"ltr",components:{},palette:Pe({mode:"light"},r),spacing:l,shape:Pe({},xD,o)},s);return u=e.reduce((c,h)=>Wr(c,h),u),u.unstable_sxConfig=Pe({},Zp,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(h){return Qp({sx:h,theme:this})},u}function u_(t){return Object.keys(t).length===0}function e0(t=null){const e=Ce.useContext(Fd.ThemeContext);return!e||u_(e)?t:e}const c_=Jp();function h_(t=c_){return e0(t)}const f_=["variant"];function f2(t){return t.length===0}function d2(t){const{variant:e}=t,n=Hr(t,f_);let r=e||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=f2(r)?t[i]:Zo(t[i]):r+=`${f2(r)?i:Zo(i)}${Zo(t[i].toString())}`}),r}const d_=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p_(t){return Object.keys(t).length===0}function g_(t){return typeof t=="string"&&t.charCodeAt(0)>96}const m_=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,v_=(t,e)=>{let n=[];e&&e.components&&e.components[t]&&e.components[t].variants&&(n=e.components[t].variants);const r={};return n.forEach(i=>{const o=d2(i.props);r[o]=i.style}),r},y_=(t,e,n,r)=>{var i;const{ownerState:o={}}=t,s=[],a=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return a&&a.forEach(l=>{let u=!0;Object.keys(l.props).forEach(c=>{o[c]!==l.props[c]&&t[c]!==l.props[c]&&(u=!1)}),u&&s.push(e[d2(l.props)])}),s};function Ac(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const b_=Jp(),p2=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function nl({defaultTheme:t,theme:e,themeId:n}){return p_(e)?t:e[n]||e}function x_(t){return t?(e,n)=>n[t]:null}function w_(t={}){const{themeId:e,defaultTheme:n=b_,rootShouldForwardProp:r=Ac,slotShouldForwardProp:i=Ac}=t,o=s=>Qp(Pe({},s,{theme:nl(Pe({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{mD(s,k=>k.filter(w=>!(w!=null&&w.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:h,overridesResolver:f=x_(p2(u))}=a,d=Hr(a,d_),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=h||!1;let m;process.env.NODE_ENV!=="production"&&l&&(m=`${l}-${p2(u||"Root")}`);let b=Ac;u==="Root"||u==="root"?b=r:u?b=i:g_(s)&&(b=void 0);const x=gD(s,Pe({shouldForwardProp:b,label:m},d)),C=(k,...w)=>{const T=w?w.map(D=>typeof D=="function"&&D.__emotion_real!==D?R=>D(Pe({},R,{theme:nl(Pe({},R,{defaultTheme:n,themeId:e}))})):D):[];let S=k;l&&f&&T.push(D=>{const R=nl(Pe({},D,{defaultTheme:n,themeId:e})),H=m_(l,R);if(H){const W={};return Object.entries(H).forEach(([B,j])=>{W[B]=typeof j=="function"?j(Pe({},D,{theme:R})):j}),f(D,W)}return null}),l&&!p&&T.push(D=>{const R=nl(Pe({},D,{defaultTheme:n,themeId:e}));return y_(D,v_(l,R),R,l)}),g||T.push(o);const M=T.length-w.length;if(Array.isArray(k)&&M>0){const D=new Array(M).fill("");S=[...k,...D],S.raw=[...k.raw,...D]}else typeof k=="function"&&k.__emotion_real!==k&&(S=D=>k(Pe({},D,{theme:nl(Pe({},D,{defaultTheme:n,themeId:e}))})));const P=x(S,...T);if(process.env.NODE_ENV!=="production"){let D;l&&(D=`${l}${Zo(u||"")}`),D===void 0&&(D=`Styled(${PP(s)})`),P.displayName=D}return s.muiName&&(P.muiName=s.muiName),P};return x.withConfig&&(C.withConfig=x.withConfig),C}}function C_(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:Yx(e.components[n].defaultProps,r)}function t0(t,e=0,n=1){return process.env.NODE_ENV!=="production"&&(t<e||t>n)&&console.error(`MUI: The value provided ${t} is out of range [${e}, ${n}].`),Math.min(Math.max(e,t),n)}function S_(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function to(t){if(t.type)return t;if(t.charAt(0)==="#")return to(S_(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
83
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Xo(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
84
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Xo(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function Pc(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function k_(t){t=to(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),s=(u,c=(u+n/30)%12)=>i-o*Math.max(Math.min(c-3,9-c,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Pc({type:a,values:l})}function g2(t){t=to(t);let e=t.type==="hsl"||t.type==="hsla"?to(k_(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function m2(t,e){const n=g2(t),r=g2(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Y(t,e){return t=to(t),e=t0(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Pc(t)}function n0(t,e){if(t=to(t),e=t0(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Pc(t)}function r0(t,e){if(t=to(t),e=t0(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Pc(t)}const v2=Ce.createContext(null);process.env.NODE_ENV!=="production"&&(v2.displayName="ThemeContext");const y2=v2;function b2(){const t=Ce.useContext(y2);return process.env.NODE_ENV!=="production"&&Ce.useDebugValue(t),t}const T_=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function E_(t,e){if(typeof e=="function"){const n=e(t);return process.env.NODE_ENV!=="production"&&(n||console.error(["MUI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join(`
85
+ `))),n}return Pe({},t,e)}function Dc(t){const{children:e,theme:n}=t,r=b2();process.env.NODE_ENV!=="production"&&r===null&&typeof n=="function"&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
86
+ `));const i=Ce.useMemo(()=>{const o=r===null?n:E_(r,n);return o!=null&&(o[T_]=r!==null),o},[n,r]);return y.jsx(y2.Provider,{value:i,children:e})}process.env.NODE_ENV!=="production"&&(Dc.propTypes={children:A.node,theme:A.oneOfType([A.object,A.func]).isRequired}),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&(Dc.propTypes=Vx(Dc.propTypes));const x2={};function w2(t,e,n,r=!1){return Ce.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const o=n(i),s=t?Pe({},e,{[t]:o}):o;return r?()=>s:s}return t?Pe({},e,{[t]:n}):Pe({},e,n)},[t,e,n,r])}function _c(t){const{children:e,theme:n,themeId:r}=t,i=e0(x2),o=b2()||x2;process.env.NODE_ENV!=="production"&&(i===null&&typeof n=="function"||r&&i&&!i[r]&&typeof n=="function")&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
87
+ `));const s=w2(r,i,n),a=w2(r,o,n,!0);return y.jsx(Dc,{theme:a,children:y.jsx(Fd.ThemeContext.Provider,{value:s,children:e})})}process.env.NODE_ENV!=="production"&&(_c.propTypes={children:A.node,theme:A.oneOfType([A.func,A.object]).isRequired,themeId:A.string}),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&(_c.propTypes=Vx(_c.propTypes));function O_(t,e){return Pe({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const rl={black:"#000",white:"#fff"},M_={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},ns={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},rs={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},il={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},is={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},os={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},ss={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},A_=["mode","contrastThreshold","tonalOffset"],C2={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:rl.white,default:rl.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},i0={text:{primary:rl.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:rl.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S2(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=r0(t.main,i):e==="dark"&&(t.dark=n0(t.main,o)))}function P_(t="light"){return t==="dark"?{main:is[200],light:is[50],dark:is[400]}:{main:is[700],light:is[400],dark:is[800]}}function D_(t="light"){return t==="dark"?{main:ns[200],light:ns[50],dark:ns[400]}:{main:ns[500],light:ns[300],dark:ns[700]}}function __(t="light"){return t==="dark"?{main:rs[500],light:rs[300],dark:rs[700]}:{main:rs[700],light:rs[400],dark:rs[800]}}function I_(t="light"){return t==="dark"?{main:os[400],light:os[300],dark:os[700]}:{main:os[700],light:os[500],dark:os[900]}}function $_(t="light"){return t==="dark"?{main:ss[400],light:ss[300],dark:ss[700]}:{main:ss[800],light:ss[500],dark:ss[900]}}function F_(t="light"){return t==="dark"?{main:il[400],light:il[300],dark:il[700]}:{main:"#ed6c02",light:il[500],dark:il[900]}}function L_(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=Hr(t,A_),o=t.primary||P_(e),s=t.secondary||D_(e),a=t.error||__(e),l=t.info||I_(e),u=t.success||$_(e),c=t.warning||F_(e);function h(g){const m=m2(g,i0.text.primary)>=n?i0.text.primary:C2.text.primary;if(process.env.NODE_ENV!=="production"){const b=m2(g,m);b<3&&console.error([`MUI: The contrast ratio of ${b}:1 for ${m} on ${g}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
88
+ `))}return m}const f=({color:g,name:m,mainShade:b=500,lightShade:x=300,darkShade:C=700})=>{if(g=Pe({},g),!g.main&&g[b]&&(g.main=g[b]),!g.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${m?` (${m})`:""} provided to augmentColor(color) is invalid.
89
+ The color object needs to have a \`main\` property or a \`${b}\` property.`:Xo(11,m?` (${m})`:"",b));if(typeof g.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${m?` (${m})`:""} provided to augmentColor(color) is invalid.
90
+ \`color.main\` should be a string, but \`${JSON.stringify(g.main)}\` was provided instead.
91
+
92
+ Did you intend to use one of the following approaches?
93
+
94
+ import { green } from "@mui/material/colors";
95
+
96
+ const theme1 = createTheme({ palette: {
97
+ primary: green,
98
+ } });
99
+
100
+ const theme2 = createTheme({ palette: {
101
+ primary: { main: green[500] },
102
+ } });`:Xo(12,m?` (${m})`:"",JSON.stringify(g.main)));return S2(g,"light",x,r),S2(g,"dark",C,r),g.contrastText||(g.contrastText=h(g.main)),g},d={dark:i0,light:C2};return process.env.NODE_ENV!=="production"&&(d[e]||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),Wr(Pe({common:Pe({},rl),mode:e,primary:f({color:o,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:u,name:"success"}),grey:M_,contrastThreshold:n,getContrastText:h,augmentColor:f,tonalOffset:r},d[e]),i)}const R_=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function B_(t){return Math.round(t*1e5)/1e5}const k2={textTransform:"uppercase"},T2='"Roboto", "Helvetica", "Arial", sans-serif';function N_(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=T2,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:h}=n,f=Hr(n,R_);process.env.NODE_ENV!=="production"&&(typeof i!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof u!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const d=i/14,p=h||(b=>`${b/u*d}rem`),g=(b,x,C,k,w)=>Pe({fontFamily:r,fontWeight:b,fontSize:p(x),lineHeight:C},r===T2?{letterSpacing:`${B_(k/x)}em`}:{},w,c),m={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,k2),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,k2),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wr(Pe({htmlFontSize:u,pxToRem:p,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},m),f,{clone:!1})}const j_=.2,V_=.14,z_=.12;function yt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${j_})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${V_})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${z_})`].join(",")}const W_=["none",yt(0,2,1,-1,0,1,1,0,0,1,3,0),yt(0,3,1,-2,0,2,2,0,0,1,5,0),yt(0,3,3,-2,0,3,4,0,0,1,8,0),yt(0,2,4,-1,0,4,5,0,0,1,10,0),yt(0,3,5,-1,0,5,8,0,0,1,14,0),yt(0,3,5,-1,0,6,10,0,0,1,18,0),yt(0,4,5,-2,0,7,10,1,0,2,16,1),yt(0,5,5,-3,0,8,10,1,0,3,14,2),yt(0,5,6,-3,0,9,12,1,0,3,16,2),yt(0,6,6,-3,0,10,14,1,0,4,18,3),yt(0,6,7,-4,0,11,15,1,0,4,20,3),yt(0,7,8,-4,0,12,17,2,0,5,22,4),yt(0,7,8,-4,0,13,19,2,0,5,24,4),yt(0,7,9,-4,0,14,21,2,0,5,26,4),yt(0,8,9,-5,0,15,22,2,0,6,28,5),yt(0,8,10,-5,0,16,24,2,0,6,30,5),yt(0,8,11,-5,0,17,26,2,0,6,32,5),yt(0,9,11,-5,0,18,28,2,0,7,34,6),yt(0,9,12,-6,0,19,29,2,0,7,36,6),yt(0,10,13,-6,0,20,31,3,0,8,38,7),yt(0,10,13,-6,0,21,33,3,0,8,40,7),yt(0,10,14,-6,0,22,35,3,0,8,42,7),yt(0,11,14,-7,0,23,36,3,0,9,44,8),yt(0,11,15,-7,0,24,38,3,0,9,46,8)],H_=["duration","easing","delay"],q_={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},U_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function E2(t){return`${Math.round(t)}ms`}function Y_(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function G_(t){const e=Pe({},q_,t.easing),n=Pe({},U_,t.duration);return Pe({getAutoHeightDuration:Y_,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0}=o,u=Hr(o,H_);if(process.env.NODE_ENV!=="production"){const c=f=>typeof f=="string",h=f=>!isNaN(parseFloat(f));!c(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(s)&&!c(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),c(a)||console.error('MUI: Argument "easing" must be a string.'),!h(l)&&!c(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
103
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:E2(s)} ${a} ${typeof l=="string"?l:E2(l)}`).join(",")}},t,{easing:e,duration:n})}const K_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},X_=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function O2(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,s=Hr(t,X_);if(t.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Xo(18));const a=L_(r),l=Jp(t);let u=Wr(l,{mixins:O_(l.breakpoints,n),palette:a,shadows:W_.slice(),typography:N_(a,o),transitions:G_(i),zIndex:Pe({},K_)});if(u=Wr(u,s),u=e.reduce((c,h)=>Wr(c,h),u),process.env.NODE_ENV!=="production"){const c=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(f,d)=>{let p;for(p in f){const g=f[p];if(c.indexOf(p)!==-1&&Object.keys(g).length>0){if(process.env.NODE_ENV!=="production"){const m=$P("",p);console.error([`MUI: The \`${d}\` component increases the CSS specificity of the \`${p}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${m}' syntax:`,JSON.stringify({root:{[`&.${m}`]:g}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
104
+ `))}f[p]={}}}};Object.keys(u.components).forEach(f=>{const d=u.components[f].styleOverrides;d&&f.indexOf("Mui")===0&&h(d,f)})}return u.unstable_sxConfig=Pe({},Zp,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(h){return Qp({sx:h,theme:this})},u}const M2=O2();function no(){const t=h_(M2);return process.env.NODE_ENV!=="production"&&Ce.useDebugValue(t),t[hc]||t}const yr=w_({themeId:hc,defaultTheme:M2,rootShouldForwardProp:t=>Ac(t)&&t!=="classes"}),Z_=["theme"];function A2(t){let{theme:e}=t,n=Hr(t,Z_);const r=e[hc];return y.jsx(_c,Pe({},n,{themeId:r?hc:void 0,theme:r||e}))}process.env.NODE_ENV!=="production"&&(A2.propTypes={children:A.node,theme:A.oneOfType([A.object,A.func]).isRequired});function Q_(t,e,n,r,i){const[o,s]=Ce.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return DP(()=>{let a=!0;if(!n)return;const l=n(t),u=()=>{a&&s(l.matches)};return u(),l.addListener(u),()=>{a=!1,l.removeListener(u)}},[t,n]),o}const P2=Ce["useSyncExternalStore"];function J_(t,e,n,r,i){const o=Ce.useCallback(()=>e,[e]),s=Ce.useMemo(()=>{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:c}=r(t);return()=>c}return o},[o,t,r,i,n]),[a,l]=Ce.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const c=n(t);return[()=>c.matches,h=>(c.addListener(h),()=>{c.removeListener(h)})]},[o,n,t]);return P2(l,a,s)}function Ic(t,e={}){const n=e0(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=C_({name:"MuiUseMediaQuery",props:e,theme:n});process.env.NODE_ENV!=="production"&&typeof t=="function"&&n===null&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join(`
105
+ `));let l=typeof t=="function"?t(n):t;l=l.replace(/^@media( ?)/m,"");const c=(P2!==void 0?J_:Q_)(l,i,o,s,a);return process.env.NODE_ENV!=="production"&&Ce.useDebugValue({query:l,match:c}),c}const D2=(t,e,n)=>{const r=no(),i=Ic(r.breakpoints.up(e)),o=Ic(r.breakpoints.down(e)),s=Ic(r.breakpoints.between(e,n)),a=Ic(r.breakpoints.only(e));return t==="up"?i:t==="down"?o:t==="between"?s:a},eI=({children:t,disableAnimatedMobile:e=!0,...n})=>D2("down","sm")&&e?y.jsx(O.Box,{...n,children:t}):y.jsx(O.Box,{component:rr.div,initial:"initial",whileInView:"animate",viewport:{once:!0,amount:.3},variants:ju(),...n,children:t}),tI=({animate:t,action:e=!1,children:n,...r})=>e?y.jsx(O.Box,{component:rr.div,initial:!1,animate:t?"animate":"exit",variants:ju(),...r,children:n}):y.jsx(O.Box,{component:rr.div,initial:"initial",animate:"animate",exit:"exit",variants:ju(),...r,children:n}),nI=()=>Promise.resolve().then(()=>G1e).then(t=>t.default),_2=({children:t})=>y.jsx(iP,{strict:!0,features:nI,children:y.jsxs(rr.div,{style:{height:"100%"},children:[" ",t," "]})});function I2(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=I2(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function ro(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=I2(t))&&(r&&(r+=" "),r+=e);return r}let rI={data:""},iI=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||rI,oI=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,sI=/\/\*[^]*?\*\/| +/g,$2=/\n+/g,io=(t,e)=>{let n="",r="",i="";for(let o in t){let s=t[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?io(s,o):o+"{"+io(s,o[1]=="k"?"":e)+"}":typeof s=="object"?r+=io(s,e?e.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=io.p?io.p(o,s):o+":"+s+";")}return n+(e&&i?e+"{"+i+"}":i)+r},Ur={},F2=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+F2(t[n]);return e}return t},aI=(t,e,n,r,i)=>{let o=F2(t),s=Ur[o]||(Ur[o]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(o));if(!Ur[s]){let l=o!==t?t:(u=>{let c,h,f=[{}];for(;c=oI.exec(u.replace(sI,""));)c[4]?f.shift():c[3]?(h=c[3].replace($2," ").trim(),f.unshift(f[0][h]=f[0][h]||{})):f[0][c[1]]=c[2].replace($2," ").trim();return f[0]})(t);Ur[s]=io(i?{["@keyframes "+s]:l}:l,n?"":"."+s)}let a=n&&Ur.g?Ur.g:null;return n&&(Ur.g=Ur[s]),((l,u,c,h)=>{h?u.data=u.data.replace(h,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(Ur[s],e,r,a),s},lI=(t,e,n)=>t.reduce((r,i,o)=>{let s=e[o];if(s&&s.call){let a=s(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=l?"."+l:a&&typeof a=="object"?a.props?"":io(a,""):a===!1?"":a}return r+i+(s??"")},"");function o0(t){let e=this||{},n=t.call?t(e.p):t;return aI(n.unshift?n.raw?lI(n,[].slice.call(arguments,1),e.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):n,iI(e.target),e.g,e.o,e.k)}o0.bind({g:1}),o0.bind({k:1});function L2(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R2(t,e,n){return e&&L2(t.prototype,e),n&&L2(t,n),t}function it(){return it=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},it.apply(this,arguments)}function B2(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function ol(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function N2(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var j2=function(){return""},V2=v.createContext({enqueueSnackbar:j2,closeSnackbar:j2}),oo={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"},z2=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},s0=function(e){return""+z2(e.vertical)+z2(e.horizontal)},$c=function(e){return!!e||e===0},Fc="unmounted",as="exited",ls="entering",sl="entered",W2="exiting",Lc=function(t){B2(e,t);function e(r){var i;i=t.call(this,r)||this;var o=r.appear,s;return i.appearStatus=null,r.in?o?(s=as,i.appearStatus=ls):s=sl:r.unmountOnExit||r.mountOnEnter?s=Fc:s=as,i.state={status:s},i.nextCallback=null,i}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Fc?{status:as}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==ls&&s!==sl&&(o=ls):(s===ls||s===sl)&&(o=W2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o=i,s=i;return i!=null&&typeof i!="number"&&typeof i!="string"&&(s=i.exit,o=i.enter),{exit:s,enter:o}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===ls?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===as&&this.setState({status:Fc})},n.performEnter=function(i){var o=this,s=this.props.enter,a=i,l=this.getTimeouts();if(!i&&!s){this.safeSetState({status:sl},function(){o.props.onEntered&&o.props.onEntered(o.node,a)});return}this.props.onEnter&&this.props.onEnter(this.node,a),this.safeSetState({status:ls},function(){o.props.onEntering&&o.props.onEntering(o.node,a),o.onTransitionEnd(l.enter,function(){o.safeSetState({status:sl},function(){o.props.onEntered&&o.props.onEntered(o.node,a)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts();if(!o){this.safeSetState({status:as},function(){i.props.onExited&&i.props.onExited(i.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:W2},function(){i.props.onExiting&&i.props.onExiting(i.node),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:as},function(){i.props.onExited&&i.props.onExited(i.node)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(){s&&(s=!1,o.nextCallback=null,i())},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=i==null&&!this.props.addEndListener;if(!this.node||s){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Fc)return null;var o=this.props,s=o.children,a=ol(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return s(i,a)},R2(e,[{key:"node",get:function(){var i,o=(i=this.props.nodeRef)===null||i===void 0?void 0:i.current;if(!o)throw new Error("notistack - Custom snackbar is not refForwarding");return o}}]),e}(v.Component);function us(){}Lc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:us,onEntering:us,onEntered:us,onExit:us,onExiting:us,onExited:us};function H2(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function a0(t,e){return v.useMemo(function(){return t==null&&e==null?null:function(n){H2(t,n),H2(e,n)}},[t,e])}function Rc(t){var e=t.timeout,n=t.style,r=n===void 0?{}:n,i=t.mode;return{duration:typeof e=="object"?e[i]||0:e,easing:r.transitionTimingFunction,delay:r.transitionDelay}}var l0={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},q2=function(e){e.scrollTop=e.scrollTop},U2=function(e){return Math.round(e)+"ms"};function cs(t,e){t===void 0&&(t=["all"]);var n=e||{},r=n.duration,i=r===void 0?300:r,o=n.easing,s=o===void 0?l0.easeInOut:o,a=n.delay,l=a===void 0?0:a,u=Array.isArray(t)?t:[t];return u.map(function(c){var h=typeof i=="string"?i:U2(i),f=typeof l=="string"?l:U2(l);return c+" "+h+" "+s+" "+f}).join(",")}function uI(t){return t&&t.ownerDocument||document}function Y2(t){var e=uI(t);return e.defaultView||window}function cI(t,e){e===void 0&&(e=166);var n;function r(){for(var i=this,o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l=function(){t.apply(i,s)};clearTimeout(n),n=setTimeout(l,e)}return r.clear=function(){clearTimeout(n)},r}function hI(t,e){var n=e.getBoundingClientRect(),r=Y2(e),i;if(e.fakeTransform)i=e.fakeTransform;else{var o=r.getComputedStyle(e);i=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var s=0,a=0;if(i&&i!=="none"&&typeof i=="string"){var l=i.split("(")[1].split(")")[0].split(",");s=parseInt(l[4],10),a=parseInt(l[5],10)}switch(t){case"left":return"translateX("+(r.innerWidth+s-n.left)+"px)";case"right":return"translateX(-"+(n.left+n.width-s)+"px)";case"up":return"translateY("+(r.innerHeight+a-n.top)+"px)";default:return"translateY(-"+(n.top+n.height-a)+"px)"}}function Bc(t,e){if(e){var n=hI(t,e);n&&(e.style.webkitTransform=n,e.style.transform=n)}}var G2=v.forwardRef(function(t,e){var n=t.children,r=t.direction,i=r===void 0?"down":r,o=t.in,s=t.style,a=t.timeout,l=a===void 0?0:a,u=t.onEnter,c=t.onEntered,h=t.onExit,f=t.onExited,d=ol(t,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),p=v.useRef(null),g=a0(n.ref,p),m=a0(g,e),b=function(S,M){Bc(i,S),q2(S),u&&u(S,M)},x=function(S){var M=(s==null?void 0:s.transitionTimingFunction)||l0.easeOut,P=Rc({timeout:l,mode:"enter",style:it({},s,{transitionTimingFunction:M})});S.style.webkitTransition=cs("-webkit-transform",P),S.style.transition=cs("transform",P),S.style.webkitTransform="none",S.style.transform="none"},C=function(S){var M=(s==null?void 0:s.transitionTimingFunction)||l0.sharp,P=Rc({timeout:l,mode:"exit",style:it({},s,{transitionTimingFunction:M})});S.style.webkitTransition=cs("-webkit-transform",P),S.style.transition=cs("transform",P),Bc(i,S),h&&h(S)},k=function(S){S.style.webkitTransition="",S.style.transition="",f&&f(S)},w=v.useCallback(function(){p.current&&Bc(i,p.current)},[i]);return v.useEffect(function(){if(!(o||i==="down"||i==="right")){var T=cI(function(){p.current&&Bc(i,p.current)}),S=Y2(p.current);return S.addEventListener("resize",T),function(){T.clear(),S.removeEventListener("resize",T)}}},[i,o]),v.useEffect(function(){o||w()},[o,w]),v.createElement(Lc,Object.assign({appear:!0,nodeRef:p,onEnter:b,onEntered:c,onEntering:x,onExit:C,onExited:k,in:o,timeout:l},d),function(T,S){return v.cloneElement(n,it({ref:m,style:it({visibility:T==="exited"&&!o?"hidden":void 0},s,{},n.props.style)},S))})});G2.displayName="Slide";var Nc=function(e){return v.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},fI=function(){return v.createElement(Nc,null,v.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
106
+ 10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},dI=function(){return v.createElement(Nc,null,v.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},pI=function(){return v.createElement(Nc,null,v.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
107
+ 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
108
+ 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},gI=function(){return v.createElement(Nc,null,v.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
109
+ 0 22,12A10,10 0 0,0 12,2Z`}))},mI={default:void 0,success:v.createElement(fI,null),warning:v.createElement(dI,null),error:v.createElement(pI,null),info:v.createElement(gI,null)},so={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:mI,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:G2,transitionDuration:{enter:225,exit:195}},vI=function(e,n){var r=function(o){return typeof o=="number"||o===null};return r(e)?e:r(n)?n:so.autoHideDuration},yI=function(e,n){var r=function(o,s){return s.some(function(a){return typeof o===a})};return r(e,["string","number"])?e:r(e,["object"])?it({},so.transitionDuration,{},r(n,["object"])&&n,{},e):r(n,["string","number"])?n:r(n,["object"])?it({},so.transitionDuration,{},n):so.transitionDuration},bI=function(e,n){return function(r,i){return i===void 0&&(i=!1),i?it({},so[r],{},n[r],{},e[r]):r==="autoHideDuration"?vI(e.autoHideDuration,n.autoHideDuration):r==="transitionDuration"?yI(e.transitionDuration,n.transitionDuration):e[r]||n[r]||so[r]}};function al(t){return Object.entries(t).reduce(function(e,n){var r,i=n[0],o=n[1];return it({},e,(r={},r[i]=o0(o),r))},{})}var hs={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(e){return"notistack-MuiContent-"+e}},K2=al({root:{height:0},entered:{height:"auto"}}),u0="0px",c0=175,X2=v.forwardRef(function(t,e){var n=t.children,r=t.in,i=t.onExited,o=v.useRef(null),s=v.useRef(null),a=a0(e,s),l=function(){return o.current?o.current.clientHeight:0},u=function(g){g.style.height=u0},c=function(g){var m=l(),b=Rc({timeout:c0,mode:"enter"}),x=b.duration,C=b.easing;g.style.transitionDuration=typeof x=="string"?x:x+"ms",g.style.height=m+"px",g.style.transitionTimingFunction=C||""},h=function(g){g.style.height="auto"},f=function(g){g.style.height=l()+"px"},d=function(g){q2(g);var m=Rc({timeout:c0,mode:"exit"}),b=m.duration,x=m.easing;g.style.transitionDuration=typeof b=="string"?b:b+"ms",g.style.height=u0,g.style.transitionTimingFunction=x||""};return v.createElement(Lc,{in:r,unmountOnExit:!0,onEnter:u,onEntered:h,onEntering:c,onExit:f,onExited:i,onExiting:d,nodeRef:s,timeout:c0},function(p,g){return v.createElement("div",Object.assign({ref:a,className:ro(K2.root,p==="entered"&&K2.entered),style:it({pointerEvents:"all",overflow:"hidden",minHeight:u0,transition:cs("height")},p==="entered"&&{overflow:"visible"},{},p==="exited"&&!r&&{visibility:"hidden"})},g),v.createElement("div",{ref:o,className:hs.CollapseWrapper,style:{display:"flex",width:"100%"}},n))})});X2.displayName="Collapse";var Z2={right:"left",left:"right",bottom:"up",top:"down"},xI=function(e){return e.horizontal!=="center"?Z2[e.horizontal]:Z2[e.vertical]},wI=function(e){return"anchorOrigin"+s0(e)},CI=function(e){e===void 0&&(e={});var n={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(r){return!n[r]}).reduce(function(r,i){var o;return it({},r,(o={},o[i]=e[i],o))},{})},SI=function(){};function ll(t,e){return t.reduce(function(n,r){return r==null?n:function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l=[].concat(s);e&&l.indexOf(e)===-1&&l.push(e),n.apply(this,l),r.apply(this,l)}},SI)}var kI=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Q2(t){var e=v.useRef(t);return kI(function(){e.current=t}),v.useCallback(function(){return e.current.apply(void 0,arguments)},[])}var J2=v.forwardRef(function(t,e){var n=t.children,r=t.className,i=t.autoHideDuration,o=t.disableWindowBlurListener,s=o===void 0?!1:o,a=t.onClose,l=t.id,u=t.open,c=t.SnackbarProps,h=c===void 0?{}:c,f=v.useRef(),d=Q2(function(){a&&a.apply(void 0,arguments)}),p=Q2(function(C){!a||C==null||(f.current&&clearTimeout(f.current),f.current=setTimeout(function(){d(null,"timeout",l)},C))});v.useEffect(function(){return u&&p(i),function(){f.current&&clearTimeout(f.current)}},[u,i,p]);var g=function(){f.current&&clearTimeout(f.current)},m=v.useCallback(function(){i!=null&&p(i*.5)},[i,p]),b=function(k){h.onMouseEnter&&h.onMouseEnter(k),g()},x=function(k){h.onMouseLeave&&h.onMouseLeave(k),m()};return v.useEffect(function(){if(!s&&u)return window.addEventListener("focus",m),window.addEventListener("blur",g),function(){window.removeEventListener("focus",m),window.removeEventListener("blur",g)}},[s,m,u]),v.createElement("div",Object.assign({ref:e},h,{className:ro(hs.Snackbar,r),onMouseEnter:b,onMouseLeave:x}),n)});J2.displayName="Snackbar";var h0,TI=al({root:(h0={display:"flex",flexWrap:"wrap",flexGrow:1},h0[oo.upSm]={flexGrow:"initial",minWidth:"288px"},h0)}),f0=v.forwardRef(function(t,e){var n=t.className,r=ol(t,["className"]);return v.createElement("div",Object.assign({ref:e,className:ro(TI.root,n)},r))});f0.displayName="SnackbarContent";var ul=al({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),ew="notistack-snackbar",tw=v.forwardRef(function(t,e){var n=t.id,r=t.message,i=t.action,o=t.iconVariant,s=t.variant,a=t.hideIconVariant,l=t.style,u=t.className,c=o[s],h=i;return typeof h=="function"&&(h=h(n)),v.createElement(f0,{ref:e,role:"alert","aria-describedby":ew,style:l,className:ro(hs.MuiContent,hs.MuiContentVariant(s),ul.root,ul[s],u,!a&&c&&ul.lessPadding)},v.createElement("div",{id:ew,className:ul.message},a?null:c,r),h&&v.createElement("div",{className:ul.action},h))});tw.displayName="MaterialDesignContent";var nw=v.memo(tw),EI=al({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),OI=function(e){var n=v.useRef(),r=v.useState(!0),i=r[0],o=r[1],s=ll([e.snack.onClose,e.onClose]),a=function(){e.snack.requestClose&&s(null,"instructed",e.snack.id)},l=v.useCallback(function(){n.current=setTimeout(function(){o(function(P){return!P})},125)},[]);v.useEffect(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var u=e.snack,c=e.classes,h=e.Component,f=h===void 0?nw:h,d=v.useMemo(function(){return CI(c)},[c]),p=u.open,g=u.SnackbarProps,m=u.TransitionComponent,b=u.TransitionProps,x=u.transitionDuration,C=u.disableWindowBlurListener,k=u.content,w=ol(u,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),T=it({direction:xI(w.anchorOrigin),timeout:x},b),S=k;typeof S=="function"&&(S=S(w.id,w.message));var M=["onEnter","onEntered","onExit","onExited"].reduce(function(P,D){var R;return it({},P,(R={},R[D]=ll([e.snack[D],e[D]],w.id),R))},{});return v.createElement(X2,{in:i,onExited:M.onExited},v.createElement(J2,{open:p,id:w.id,disableWindowBlurListener:C,autoHideDuration:w.autoHideDuration,className:ro(EI.wrappedRoot,d.root,d[wI(w.anchorOrigin)]),SnackbarProps:g,onClose:s},v.createElement(m,Object.assign({},T,{appear:!0,in:p,onExit:M.onExit,onExited:l,onEnter:M.onEnter,onEntered:ll([M.onEntered,a],w.id)}),S||v.createElement(f,Object.assign({},w)))))},cl,d0,jc,Vc,p0,Yr={view:{default:20,dense:4},snackbar:{default:6,dense:2}},rw="."+hs.CollapseWrapper,g0=16,zc=al({root:(cl={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:cs(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},cl[rw]={padding:Yr.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},cl.maxWidth="calc(100% - "+Yr.view.default*2+"px)",cl[oo.downXs]={width:"100%",maxWidth:"calc(100% - "+g0*2+"px)"},cl),rootDense:(d0={},d0[rw]={padding:Yr.snackbar.dense+"px 0px"},d0),top:{top:Yr.view.default-Yr.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:Yr.view.default-Yr.snackbar.default+"px",flexDirection:"column-reverse"},left:(jc={left:Yr.view.default+"px"},jc[oo.upSm]={alignItems:"flex-start"},jc[oo.downXs]={left:g0+"px"},jc),right:(Vc={right:Yr.view.default+"px"},Vc[oo.upSm]={alignItems:"flex-end"},Vc[oo.downXs]={right:g0+"px"},Vc),center:(p0={left:"50%",transform:"translateX(-50%)"},p0[oo.upSm]={alignItems:"center"},p0)}),MI=function(e){var n=e.classes,r=n===void 0?{}:n,i=e.anchorOrigin,o=e.dense,s=e.children,a=ro(hs.SnackbarContainer,zc[i.vertical],zc[i.horizontal],zc.root,r.containerRoot,r["containerAnchorOrigin"+s0(i)],o&&zc.rootDense);return v.createElement("div",{className:a},s)},AI=v.memo(MI),PI=process.env.NODE_ENV!=="production",DI={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},_I=function(t){if(PI){var e=DI[t];typeof console<"u"&&console.error("WARNING - notistack: "+e);try{throw new Error(e)}catch{}}},iw=function(e){var n=typeof e=="string"||v.isValidElement(e);return!n};$.enqueueSnackbar=void 0,$.closeSnackbar=void 0;var ow=function(t){B2(e,t);function e(r){var i;return i=t.call(this,r)||this,i.enqueueSnackbar=function(o,s){if(s===void 0&&(s={}),o==null)throw new Error("enqueueSnackbar called with invalid argument");var a=iw(o)?o:s,l=iw(o)?o.message:o,u=a.key,c=a.preventDuplicate,h=ol(a,["key","preventDuplicate"]),f=$c(u),d=f?u:new Date().getTime()+Math.random(),p=bI(h,i.props),g=it({id:d},h,{message:l,open:!0,entered:!1,requestClose:!1,persist:p("persist"),action:p("action"),content:p("content"),variant:p("variant"),anchorOrigin:p("anchorOrigin"),disableWindowBlurListener:p("disableWindowBlurListener"),autoHideDuration:p("autoHideDuration"),hideIconVariant:p("hideIconVariant"),TransitionComponent:p("TransitionComponent"),transitionDuration:p("transitionDuration"),TransitionProps:p("TransitionProps",!0),iconVariant:p("iconVariant",!0),style:p("style",!0),SnackbarProps:p("SnackbarProps",!0),className:ro(i.props.className,h.className)});return g.persist&&(g.autoHideDuration=void 0),i.setState(function(m){if(c===void 0&&i.props.preventDuplicate||c){var b=function(w){return f?w.id===d:w.message===l},x=m.queue.findIndex(b)>-1,C=m.snacks.findIndex(b)>-1;if(x||C)return m}return i.handleDisplaySnack(it({},m,{queue:[].concat(m.queue,[g])}))}),d},i.handleDisplaySnack=function(o){var s=o.snacks;return s.length>=i.maxSnack?i.handleDismissOldest(o):i.processQueue(o)},i.processQueue=function(o){var s=o.queue,a=o.snacks;return s.length>0?it({},o,{snacks:[].concat(a,[s[0]]),queue:s.slice(1,s.length)}):o},i.handleDismissOldest=function(o){if(o.snacks.some(function(c){return!c.open||c.requestClose}))return o;var s=!1,a=!1,l=o.snacks.reduce(function(c,h){return c+(h.open&&h.persist?1:0)},0);l===i.maxSnack&&(process.env.NODE_ENV!=="production"&&_I("NO_PERSIST_ALL"),a=!0);var u=o.snacks.map(function(c){return!s&&(!c.persist||a)?(s=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),i.props.onClose&&i.props.onClose(null,"maxsnack",c.id),it({},c,{open:!1})):it({},c,{requestClose:!0})):it({},c)});return it({},o,{snacks:u})},i.handleEnteredSnack=function(o,s,a){if(!$c(a))throw new Error("handleEnteredSnack Cannot be called with undefined key");i.setState(function(l){var u=l.snacks;return{snacks:u.map(function(c){return c.id===a?it({},c,{entered:!0}):it({},c)})}})},i.handleCloseSnack=function(o,s,a){i.props.onClose&&i.props.onClose(o,s,a);var l=a===void 0;i.setState(function(u){var c=u.snacks,h=u.queue;return{snacks:c.map(function(f){return!l&&f.id!==a?it({},f):f.entered?it({},f,{open:!1}):it({},f,{requestClose:!0})}),queue:h.filter(function(f){return f.id!==a})}})},i.closeSnackbar=function(o){var s=i.state.snacks.find(function(a){return a.id===o});$c(o)&&s&&s.onClose&&s.onClose(null,"instructed",o),i.handleCloseSnack(null,"instructed",o)},i.handleExitedSnack=function(o,s){if(!$c(s))throw new Error("handleExitedSnack Cannot be called with undefined key");i.setState(function(a){var l=i.processQueue(it({},a,{snacks:a.snacks.filter(function(u){return u.id!==s})}));return l.queue.length===0?l:i.handleDismissOldest(l)})},$.enqueueSnackbar=i.enqueueSnackbar,$.closeSnackbar=i.closeSnackbar,i.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:i.enqueueSnackbar.bind(N2(i)),closeSnackbar:i.closeSnackbar.bind(N2(i))}},i}var n=e.prototype;return n.render=function(){var i=this,o=this.state.contextValue,s=this.props,a=s.domRoot,l=s.children,u=s.dense,c=u===void 0?!1:u,h=s.Components,f=h===void 0?{}:h,d=s.classes,p=this.state.snacks.reduce(function(m,b){var x,C=s0(b.anchorOrigin),k=m[C]||[];return it({},m,(x={},x[C]=[].concat(k,[b]),x))},{}),g=Object.keys(p).map(function(m){var b=p[m],x=b[0];return v.createElement(AI,{key:m,dense:c,anchorOrigin:x.anchorOrigin,classes:d},b.map(function(C){return v.createElement(OI,{key:C.id,snack:C,classes:d,Component:f[C.variant],onClose:i.handleCloseSnack,onEnter:i.props.onEnter,onExit:i.props.onExit,onExited:ll([i.handleExitedSnack,i.props.onExited],C.id),onEntered:ll([i.handleEnteredSnack,i.props.onEntered],C.id)})}))});return v.createElement(V2.Provider,{value:o},l,a?Zv.createPortal(g,a):g)},R2(e,[{key:"maxSnack",get:function(){return this.props.maxSnack||so.maxSnack}}]),e}(v.Component),II=function(){return v.useContext(V2)};const hl=/^[a-z0-9]+(-[a-z0-9]+)*$/,Wc=(t,e,n,r="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:r,prefix:l,name:a};return e&&!Hc(u)?null:u}const o=i[0],s=o.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!Hc(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:o};return e&&!Hc(a,n)?null:a}return null},Hc=(t,e)=>t?!!((t.provider===""||t.provider.match(hl))&&(e&&t.prefix===""||t.prefix.match(hl))&&t.name.match(hl)):!1,sw=Object.freeze({left:0,top:0,width:16,height:16}),qc=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),m0=Object.freeze({...sw,...qc}),v0=Object.freeze({...m0,body:"",hidden:!1});function $I(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function aw(t,e){const n=$I(t,e);for(const r in v0)r in qc?r in t&&!(r in n)&&(n[r]=qc[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function FI(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const a=r[s]&&r[s].parent,l=a&&o(a);l&&(i[s]=[a].concat(l))}return i[s]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(o),i}function LI(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let o={};function s(a){o=aw(r[a]||i[a],o)}return s(e),n.forEach(s),aw(t,o)}function lw(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const r=FI(t);for(const i in r){const o=r[i];o&&(e(i,LI(t,i,o)),n.push(i))}return n}const RI={provider:"",aliases:{},not_found:{},...sw};function y0(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function uw(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!y0(t,RI))return null;const n=e.icons;for(const i in n){const o=n[i];if(!i.match(hl)||typeof o.body!="string"||!y0(o,v0))return null}const r=e.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i.match(hl)||typeof s!="string"||!n[s]&&!r[s]||!y0(o,v0))return null}return e}const cw=Object.create(null);function BI(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function ao(t,e){const n=cw[t]||(cw[t]=Object.create(null));return n[e]||(n[e]=BI(t,e))}function b0(t,e){return uw(e)?lw(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function NI(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let fl=!1;function hw(t){return typeof t=="boolean"&&(fl=t),fl}function jI(t){const e=typeof t=="string"?Wc(t,!0,fl):t;if(e){const n=ao(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function VI(t,e){const n=Wc(t,!0,fl);if(!n)return!1;const r=ao(n.provider,n.prefix);return NI(r,n.name,e)}function zI(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),fl&&!e&&!t.prefix){let i=!1;return uw(t)&&(t.prefix="",lw(t,(o,s)=>{s&&VI(o,s)&&(i=!0)})),i}const n=t.prefix;if(!Hc({provider:e,prefix:n,name:"a"}))return!1;const r=ao(e,n);return!!b0(r,t)}const fw=Object.freeze({width:null,height:null}),dw=Object.freeze({...fw,...qc}),WI=/(-?[0-9.]*[0-9]+[0-9.]*)/g,HI=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function pw(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(WI);if(r===null||!r.length)return t;const i=[];let o=r.shift(),s=HI.test(o);for(;;){if(s){const a=parseFloat(o);isNaN(a)?i.push(o):i.push(Math.ceil(a*e*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}const qI=t=>t==="unset"||t==="undefined"||t==="none";function UI(t,e){const n={...m0,...t},r={...dw,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(p=>{const g=[],m=p.hFlip,b=p.vFlip;let x=p.rotate;m?b?x+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):b&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let C;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:C=i.height/2+i.top,g.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,g.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}x%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const s=r.width,a=r.height,l=i.width,u=i.height;let c,h;s===null?(h=a===null?"1em":a==="auto"?u:a,c=pw(h,l/u)):(c=s==="auto"?l:s,h=a===null?pw(c,u/l):a==="auto"?u:a);const f={},d=(p,g)=>{qI(g)||(f[p]=g.toString())};return d("width",c),d("height",h),f.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:f,body:o}}const YI=/\sid="(\S+)"/g,GI="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let KI=0;function XI(t,e=GI){const n=[];let r;for(;r=YI.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const s=typeof e=="function"?e(o):e+(KI++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const x0=Object.create(null);function ZI(t,e){x0[t]=e}function w0(t){return x0[t]||x0[""]}function C0(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const S0=Object.create(null),dl=["https://api.simplesvg.com","https://api.unisvg.com"],Uc=[];for(;dl.length>0;)dl.length===1||Math.random()>.5?Uc.push(dl.shift()):Uc.push(dl.pop());S0[""]=C0({resources:["https://api.iconify.design"].concat(Uc)});function QI(t,e){const n=C0(e);return n===null?!1:(S0[t]=n,!0)}function k0(t){return S0[t]}let gw=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function JI(t,e){const n=k0(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=e+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function e$(t){return t===404}const t$=(t,e,n)=>{const r=[],i=JI(t,e),o="icons";let s={type:o,provider:t,prefix:e,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=i&&u>0&&(r.push(s),s={type:o,provider:t,prefix:e,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function n$(t){if(typeof t=="string"){const e=k0(t);if(e)return e.path}return"/"}const r$={prepare:t$,send:(t,e,n)=>{if(!gw){n("abort",424);return}let r=n$(e.provider);switch(e.type){case"icons":{const o=e.prefix,a=e.icons.join(","),l=new URLSearchParams({icons:a});r+=o+".json?"+l.toString();break}case"custom":{const o=e.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;gw(t+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(e$(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})}};function i$(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return t.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,a=i.name,l=n[o]||(n[o]=Object.create(null)),u=l[s]||(l[s]=ao(o,s));let c;a in u.icons?c=e.loaded:s===""||u.missing.has(a)?c=e.missing:c=e.pending;const h={provider:o,prefix:s,name:a};c.push(h)}),e}function mw(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==e))})}function o$(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,i=t.prefix;e.forEach(o=>{const s=o.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==i)return!0;const u=l.name;if(t.icons[u])s.loaded.push({provider:r,prefix:i,name:u});else if(t.missing.has(u))s.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||mw([t],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let s$=0;function a$(t,e,n){const r=s$++,i=mw.bind(null,n,r);if(!e.pending.length)return i;const o={id:r,icons:e,callback:t,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function l$(t,e=!0,n=!1){const r=[];return t.forEach(i=>{const o=typeof i=="string"?Wc(i,e,n):i;o&&r.push(o)}),r}var u$={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function c$(t,e,n,r){const i=t.resources.length,o=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let T=t.resources.slice(0);for(s=[];T.length>1;){const S=Math.floor(Math.random()*T.length);s.push(T[S]),T=T.slice(0,S).concat(T.slice(S+1))}s=s.concat(T)}else s=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let l="pending",u=0,c,h=null,f=[],d=[];typeof r=="function"&&d.push(r);function p(){h&&(clearTimeout(h),h=null)}function g(){l==="pending"&&(l="aborted"),p(),f.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),f=[]}function m(T,S){S&&(d=[]),typeof T=="function"&&d.push(T)}function b(){return{startTime:a,payload:e,status:l,queriesSent:u,queriesPending:f.length,subscribe:m,abort:g}}function x(){l="failed",d.forEach(T=>{T(void 0,c)})}function C(){f.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),f=[]}function k(T,S,M){const P=S!=="success";switch(f=f.filter(D=>D!==T),l){case"pending":break;case"failed":if(P||!t.dataAfterTimeout)return;break;default:return}if(S==="abort"){c=M,x();return}if(P){c=M,f.length||(s.length?w():x());return}if(p(),C(),!t.random){const D=t.resources.indexOf(T.resource);D!==-1&&D!==t.index&&(t.index=D)}l="completed",d.forEach(D=>{D(M)})}function w(){if(l!=="pending")return;p();const T=s.shift();if(T===void 0){if(f.length){h=setTimeout(()=>{p(),l==="pending"&&(C(),x())},t.timeout);return}x();return}const S={status:"pending",resource:T,callback:(M,P)=>{k(S,M,P)}};f.push(S),u++,h=setTimeout(w,t.rotate),n(T,e,S.callback)}return setTimeout(w),b}function vw(t){const e={...u$,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function i(a,l,u){const c=c$(e,a,l,(h,f)=>{r(),u&&u(h,f)});return n.push(c),c}function o(a){return n.find(l=>a(l))||null}return{query:i,find:o,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function yw(){}const T0=Object.create(null);function h$(t){if(!T0[t]){const e=k0(t);if(!e)return;const n=vw(e),r={config:e,redundancy:n};T0[t]=r}return T0[t]}function f$(t,e,n){let r,i;if(typeof t=="string"){const o=w0(t);if(!o)return n(void 0,424),yw;i=o.send;const s=h$(t);s&&(r=s.redundancy)}else{const o=C0(t);if(o){r=vw(o);const s=t.resources?t.resources[0]:"",a=w0(s);a&&(i=a.send)}}return!r||!i?(n(void 0,424),yw):r.query(e,i,n)().abort}const bw="iconify2",pl="iconify",xw=pl+"-count",ww=pl+"-version",Cw=36e5,d$=168;function E0(t,e){try{return t.getItem(e)}catch{}}function O0(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Sw(t,e){try{t.removeItem(e)}catch{}}function M0(t,e){return O0(t,xw,e.toString())}function A0(t){return parseInt(E0(t,xw))||0}const Yc={local:!0,session:!0},kw={local:new Set,session:new Set};let P0=!1;function p$(t){P0=t}let Gc=typeof window>"u"?{}:window;function Tw(t){const e=t+"Storage";try{if(Gc&&Gc[e]&&typeof Gc[e].length=="number")return Gc[e]}catch{}Yc[t]=!1}function Ew(t,e){const n=Tw(t);if(!n)return;const r=E0(n,ww);if(r!==bw){if(r){const a=A0(n);for(let l=0;l<a;l++)Sw(n,pl+l.toString())}O0(n,ww,bw),M0(n,0);return}const i=Math.floor(Date.now()/Cw)-d$,o=a=>{const l=pl+a.toString(),u=E0(n,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&e(c,a))return!0}catch{}Sw(n,l)}};let s=A0(n);for(let a=s-1;a>=0;a--)o(a)||(a===s-1?(s--,M0(n,s)):kw[t].add(a))}function Ow(){if(!P0){p$(!0);for(const t in Yc)Ew(t,e=>{const n=e.data,r=e.provider,i=n.prefix,o=ao(r,i);if(!b0(o,n).length)return!1;const s=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,s):s,!0})}}function g$(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in Yc)Ew(r,i=>{const o=i.data;return i.provider!==t.provider||o.prefix!==t.prefix||o.lastModified===e});return!0}function m$(t,e){P0||Ow();function n(r){let i;if(!Yc[r]||!(i=Tw(r)))return;const o=kw[r];let s;if(o.size)o.delete(s=Array.from(o).shift());else if(s=A0(i),!M0(i,s+1))return;const a={cached:Math.floor(Date.now()/Cw),provider:t.provider,data:e};return O0(i,pl+s.toString(),JSON.stringify(a))}e.lastModified&&!g$(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Mw(){}function v$(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,o$(t)}))}function y$(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,i=t.iconsToLoad;delete t.iconsToLoad;let o;if(!i||!(o=w0(n)))return;o.prepare(n,r,i).forEach(a=>{f$(n,a,l=>{if(typeof l!="object")a.icons.forEach(u=>{t.missing.add(u)});else try{const u=b0(t,l);if(!u.length)return;const c=t.pendingIcons;c&&u.forEach(h=>{c.delete(h)}),m$(t,l)}catch(u){console.error(u)}v$(t)})})}))}const b$=(t,e)=>{const n=l$(t,!0,hw()),r=i$(n);if(!r.pending.length){let l=!0;return e&&setTimeout(()=>{l&&e(r.loaded,r.missing,r.pending,Mw)}),()=>{l=!1}}const i=Object.create(null),o=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,o.push(ao(u,c));const h=i[u]||(i[u]=Object.create(null));h[c]||(h[c]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:c,name:h}=l,f=ao(u,c),d=f.pendingIcons||(f.pendingIcons=new Set);d.has(h)||(d.add(h),i[u][c].push(h))}),o.forEach(l=>{const{provider:u,prefix:c}=l;i[u][c].length&&y$(l,i[u][c])}),e?a$(e,r,o):Mw};function x$(t,e){const n={...t};for(const r in e){const i=e[r],o=typeof i;r in fw?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const w$=/[\s,]+/;function C$(t,e){e.split(w$).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function S$(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:r(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return e}function k$(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function T$(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function E$(t){return"data:image/svg+xml,"+T$(t)}function O$(t){return'url("'+E$(t)+'")'}let gl;function M$(){try{gl=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{gl=null}}function A$(t){return gl===void 0&&M$(),gl?gl.createHTML(t):t}const Aw={...dw,inline:!1},P$={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},D$={display:"inline-block"},D0={backgroundColor:"currentColor"},Pw={backgroundColor:"transparent"},Dw={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},_w={WebkitMask:D0,mask:D0,background:Pw};for(const t in _w){const e=_w[t];for(const n in Dw)e[t+n]=Dw[n]}const _$={...Aw,inline:!0};function Iw(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const I$=(t,e,n,r)=>{const i=n?_$:Aw,o=x$(i,e),s=e.mode||"svg",a={},l=e.style||{},u={...s==="svg"?P$:{},ref:r};for(let b in e){const x=e[b];if(x!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":o[b]=x===!0||x==="true"||x===1;break;case"flip":typeof x=="string"&&C$(o,x);break;case"color":a.color=x;break;case"rotate":typeof x=="string"?o[b]=S$(x):typeof x=="number"&&(o[b]=x);break;case"ariaHidden":case"aria-hidden":x!==!0&&x!=="true"&&delete u["aria-hidden"];break;default:i[b]===void 0&&(u[b]=x)}}const c=UI(t,o),h=c.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),s==="svg"){u.style={...a,...l},Object.assign(u,h);let b=0,x=e.id;return typeof x=="string"&&(x=x.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:A$(XI(c.body,x?()=>x+"ID"+b++:"iconifyReact"))},v.createElement("svg",u)}const{body:f,width:d,height:p}=t,g=s==="mask"||(s==="bg"?!1:f.indexOf("currentColor")!==-1),m=k$(f,{...h,width:d+"",height:p+""});return u.style={...a,"--svg":O$(m),width:Iw(h.width),height:Iw(h.height),...D$,...g?D0:Pw,...l},v.createElement("span",u)};if(hw(!0),ZI("",r$),typeof document<"u"&&typeof window<"u"){Ow();const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!zI(r))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const r="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;QI(n,i)||console.error(r)}catch{console.error(r)}}}}class $w extends v.Component{constructor(e){super(e),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(e){this.state.icon!==e&&this.setState({icon:e})}_checkIcon(e){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(e||n.icon===null)&&this._setData({data:r});return}let i;if(typeof r!="string"||(i=Wc(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const o=jI(i);if(!o){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),o!==null&&(this._loading={name:r,abort:b$([i],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const s=["iconify"];i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),this._setData({data:o,classes:s}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(e){e.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const e=this.props,n=this.state.icon;if(n===null)return e.children?e.children:v.createElement("span",{});let r=e;return n.classes&&(r={...e,className:(typeof e.className=="string"?e.className+" ":"")+n.classes.join(" ")}),I$({...m0,...n.data},r,e._inline,e._ref)}}const $$=v.forwardRef(function(e,n){const r={...e,_ref:n,_inline:!1};return v.createElement($w,r)});v.forwardRef(function(e,n){const r={...e,_ref:n,_inline:!0};return v.createElement($w,r)});const bt=v.forwardRef(({icon:t,width:e=20,sx:n,...r},i)=>y.jsx(O.Box,{ref:i,component:$$,icon:t,sx:{width:e,height:e,...n},...r}));bt.displayName="Iconify";const F$=()=>{const t=no(),e=t.palette.mode==="light";return y.jsx(O.GlobalStyles,{styles:{"#root":{".notistack-MuiContent":{width:"100%",padding:t.spacing(0,2),paddingRight:t.spacing(2),margin:t.spacing(.25,0),boxShadow:t.customShadows.z8,borderRadius:t.shape.borderRadius,color:e?t.palette.common.white:t.palette.grey[800],backgroundColor:e?t.palette.grey[900]:t.palette.common.white,"&.notistack-MuiContent-success, &.notistack-MuiContent-error, &.notistack-MuiContent-warning, &.notistack-MuiContent-info":{color:t.palette.text.primary,backgroundColor:t.palette.background.paper},[t.breakpoints.up("md")]:{minWidth:240}},"#notistack-snackbar":{fontWeight:t.typography.fontWeightMedium},".SnackbarItem-action":{marginRight:0,color:t.palette.action.active,"& svg":{width:20,height:20}}}}})},Kc=({icon:t,color:e})=>y.jsx(O.Box,{component:"span",sx:{mr:1.5,width:40,height:40,display:"flex",borderRadius:1.5,alignItems:"center",justifyContent:"center",color:`${e}.main`,bgcolor:n=>Y(n.palette[e].main,.16)},children:y.jsx(bt,{icon:t,width:24})}),L$=({children:t})=>{const e=v.useRef(null),n=r=>()=>{e.current.closeSnackbar(r)};return y.jsxs(y.Fragment,{children:[y.jsx(F$,{}),y.jsx(ow,{ref:e,dense:!0,maxSnack:5,preventDuplicate:!0,autoHideDuration:3e3,variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},iconVariant:{info:y.jsx(Kc,{icon:"eva:info-fill",color:"info"}),success:y.jsx(Kc,{icon:"eva:checkmark-circle-2-fill",color:"success"}),warning:y.jsx(Kc,{icon:"eva:alert-triangle-fill",color:"warning"}),error:y.jsx(Kc,{icon:"eva:alert-circle-fill",color:"error"})},action:r=>y.jsx(O.IconButton,{size:"small",onClick:n(r),sx:{p:.5},children:y.jsx(bt,{icon:"eva:close-fill"})}),children:t})]})};function ie(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xc(t,e){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Xc(t,e)}function R$(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xc(t,e)}var Fw=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function B$(t,e){return!!(t===e||Fw(t)&&Fw(e))}function N$(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!B$(t[n],e[n]))return!1;return!0}function _0(t,e){e===void 0&&(e=N$);var n,r=[],i,o=!1;function s(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&n===this&&e(a,r)||(i=t.apply(this,a),o=!0,n=this,r=a),i}return s}var j$=typeof performance=="object"&&typeof performance.now=="function",Lw=j$?function(){return performance.now()}:function(){return Date.now()};function Rw(t){cancelAnimationFrame(t.id)}function V$(t,e){var n=Lw();function r(){Lw()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var I0=-1;function Bw(t){if(t===void 0&&(t=!1),I0===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),I0=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return I0}var fs=null;function Nw(t){if(t===void 0&&(t=!1),fs===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?fs="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?fs="negative":fs="positive-ascending"),document.body.removeChild(e),fs}return fs}process.env.NODE_ENV;var z$=150,W$=function(e,n){return e},Zc=null,Qc=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Zc=new WeakSet,Qc=new WeakSet);function H$(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,s=t.getStartIndexForOffset,a=t.getStopIndexForStartIndex,l=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(h){R$(f,h);function f(p){var g;return g=h.call(this,p)||this,g._instanceProps=l(g.props,ie(g)),g._outerRef=void 0,g._resetIsScrollingTimeoutId=null,g.state={instance:ie(g),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof g.props.initialScrollOffset=="number"?g.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},g._callOnItemsRendered=void 0,g._callOnItemsRendered=_0(function(m,b,x,C){return g.props.onItemsRendered({overscanStartIndex:m,overscanStopIndex:b,visibleStartIndex:x,visibleStopIndex:C})}),g._callOnScroll=void 0,g._callOnScroll=_0(function(m,b,x){return g.props.onScroll({scrollDirection:m,scrollOffset:b,scrollUpdateWasRequested:x})}),g._getItemStyle=void 0,g._getItemStyle=function(m){var b=g.props,x=b.direction,C=b.itemSize,k=b.layout,w=g._getItemStyleCache(u&&C,u&&k,u&&x),T;if(w.hasOwnProperty(m))T=w[m];else{var S=n(g.props,m,g._instanceProps),M=i(g.props,m,g._instanceProps),P=x==="horizontal"||k==="horizontal",D=x==="rtl",R=P?S:0;w[m]=T={position:"absolute",left:D?void 0:R,right:D?R:void 0,top:P?0:S,height:P?"100%":M,width:P?M:"100%"}}return T},g._getItemStyleCache=void 0,g._getItemStyleCache=_0(function(m,b,x){return{}}),g._onScrollHorizontal=function(m){var b=m.currentTarget,x=b.clientWidth,C=b.scrollLeft,k=b.scrollWidth;g.setState(function(w){if(w.scrollOffset===C)return null;var T=g.props.direction,S=C;if(T==="rtl")switch(Nw()){case"negative":S=-C;break;case"positive-descending":S=k-x-C;break}return S=Math.max(0,Math.min(S,k-x)),{isScrolling:!0,scrollDirection:w.scrollOffset<C?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},g._resetIsScrollingDebounced)},g._onScrollVertical=function(m){var b=m.currentTarget,x=b.clientHeight,C=b.scrollHeight,k=b.scrollTop;g.setState(function(w){if(w.scrollOffset===k)return null;var T=Math.max(0,Math.min(k,C-x));return{isScrolling:!0,scrollDirection:w.scrollOffset<T?"forward":"backward",scrollOffset:T,scrollUpdateWasRequested:!1}},g._resetIsScrollingDebounced)},g._outerRefSetter=function(m){var b=g.props.outerRef;g._outerRef=m,typeof b=="function"?b(m):b!=null&&typeof b=="object"&&b.hasOwnProperty("current")&&(b.current=m)},g._resetIsScrollingDebounced=function(){g._resetIsScrollingTimeoutId!==null&&Rw(g._resetIsScrollingTimeoutId),g._resetIsScrollingTimeoutId=V$(g._resetIsScrolling,z$)},g._resetIsScrolling=function(){g._resetIsScrollingTimeoutId=null,g.setState({isScrolling:!1},function(){g._getItemStyleCache(-1,null)})},g}f.getDerivedStateFromProps=function(g,m){return q$(g,m),c(g),null};var d=f.prototype;return d.scrollTo=function(g){g=Math.max(0,g),this.setState(function(m){return m.scrollOffset===g?null:{scrollDirection:m.scrollOffset<g?"forward":"backward",scrollOffset:g,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(g,m){m===void 0&&(m="auto");var b=this.props,x=b.itemCount,C=b.layout,k=this.state.scrollOffset;g=Math.max(0,Math.min(g,x-1));var w=0;if(this._outerRef){var T=this._outerRef;C==="vertical"?w=T.scrollWidth>T.clientWidth?Bw():0:w=T.scrollHeight>T.clientHeight?Bw():0}this.scrollTo(o(this.props,g,m,k,this._instanceProps,w))},d.componentDidMount=function(){var g=this.props,m=g.direction,b=g.initialScrollOffset,x=g.layout;if(typeof b=="number"&&this._outerRef!=null){var C=this._outerRef;m==="horizontal"||x==="horizontal"?C.scrollLeft=b:C.scrollTop=b}this._callPropsCallbacks()},d.componentDidUpdate=function(){var g=this.props,m=g.direction,b=g.layout,x=this.state,C=x.scrollOffset,k=x.scrollUpdateWasRequested;if(k&&this._outerRef!=null){var w=this._outerRef;if(m==="horizontal"||b==="horizontal")if(m==="rtl")switch(Nw()){case"negative":w.scrollLeft=-C;break;case"positive-ascending":w.scrollLeft=C;break;default:var T=w.clientWidth,S=w.scrollWidth;w.scrollLeft=S-T-C;break}else w.scrollLeft=C;else w.scrollTop=C}this._callPropsCallbacks()},d.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Rw(this._resetIsScrollingTimeoutId)},d.render=function(){var g=this.props,m=g.children,b=g.className,x=g.direction,C=g.height,k=g.innerRef,w=g.innerElementType,T=g.innerTagName,S=g.itemCount,M=g.itemData,P=g.itemKey,D=P===void 0?W$:P,R=g.layout,H=g.outerElementType,W=g.outerTagName,B=g.style,j=g.useIsScrolling,N=g.width,V=this.state.isScrolling,me=x==="horizontal"||R==="horizontal",re=me?this._onScrollHorizontal:this._onScrollVertical,_=this._getRangeToRender(),F=_[0],U=_[1],se=[];if(S>0)for(var Q=F;Q<=U;Q++)se.push(v.createElement(m,{data:M,key:D(Q,M),index:Q,isScrolling:j?V:void 0,style:this._getItemStyle(Q)}));var ve=r(this.props,this._instanceProps);return v.createElement(H||W||"div",{className:b,onScroll:re,ref:this._outerRefSetter,style:Pe({position:"relative",height:C,width:N,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:x},B)},v.createElement(w||T||"div",{children:se,ref:k,style:{height:me?"100%":ve,pointerEvents:V?"none":void 0,width:me?ve:"100%"}}))},d._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var g=this.props.itemCount;if(g>0){var m=this._getRangeToRender(),b=m[0],x=m[1],C=m[2],k=m[3];this._callOnItemsRendered(b,x,C,k)}}if(typeof this.props.onScroll=="function"){var w=this.state,T=w.scrollDirection,S=w.scrollOffset,M=w.scrollUpdateWasRequested;this._callOnScroll(T,S,M)}},d._getRangeToRender=function(){var g=this.props,m=g.itemCount,b=g.overscanCount,x=this.state,C=x.isScrolling,k=x.scrollDirection,w=x.scrollOffset;if(m===0)return[0,0,0,0];var T=s(this.props,w,this._instanceProps),S=a(this.props,T,w,this._instanceProps),M=!C||k==="backward"?Math.max(1,b):1,P=!C||k==="forward"?Math.max(1,b):1;return[Math.max(0,T-M),Math.max(0,Math.min(m-1,S+P)),T,S]},f}(v.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var q$=function(e,n){var r=e.children,i=e.direction,o=e.height,s=e.layout,a=e.innerTagName,l=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(a!=null||l!=null)&&Qc&&!Qc.has(c)&&(Qc.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var h=i==="horizontal"||s==="horizontal";switch(i){case"horizontal":case"vertical":Zc&&!Zc.has(c)&&(Zc.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+i+'" was specified.'))}switch(s){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+s+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(h&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!h&&typeof o!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(o===null?"null":typeof o)+'" was specified.'))}},U$=50,ds=function(e,n,r){var i=e,o=i.itemSize,s=r.itemMetadataMap,a=r.lastMeasuredIndex;if(n>a){var l=0;if(a>=0){var u=s[a];l=u.offset+u.size}for(var c=a+1;c<=n;c++){var h=o(c);s[c]={offset:l,size:h},l+=h}r.lastMeasuredIndex=n}return s[n]},Y$=function(e,n,r){var i=n.itemMetadataMap,o=n.lastMeasuredIndex,s=o>0?i[o].offset:0;return s>=r?jw(e,n,o,0,r):G$(e,n,Math.max(0,o),r)},jw=function(e,n,r,i,o){for(;i<=r;){var s=i+Math.floor((r-i)/2),a=ds(e,s,n).offset;if(a===o)return s;a<o?i=s+1:a>o&&(r=s-1)}return i>0?i-1:0},G$=function(e,n,r,i){for(var o=e.itemCount,s=1;r<o&&ds(e,r,n).offset<i;)r+=s,s*=2;return jw(e,n,Math.min(r,o-1),Math.floor(r/2),i)},Vw=function(e,n){var r=e.itemCount,i=n.itemMetadataMap,o=n.estimatedItemSize,s=n.lastMeasuredIndex,a=0;if(s>=r&&(s=r-1),s>=0){var l=i[s];a=l.offset+l.size}var u=r-s-1,c=u*o;return a+c},K$=H$({getItemOffset:function(e,n,r){return ds(e,n,r).offset},getItemSize:function(e,n,r){return r.itemMetadataMap[n].size},getEstimatedTotalSize:Vw,getOffsetForIndexAndAlignment:function(e,n,r,i,o,s){var a=e.direction,l=e.height,u=e.layout,c=e.width,h=a==="horizontal"||u==="horizontal",f=h?c:l,d=ds(e,n,o),p=Vw(e,o),g=Math.max(0,Math.min(p-f,d.offset)),m=Math.max(0,d.offset-f+d.size+s);switch(r==="smart"&&(i>=m-f&&i<=g+f?r="auto":r="center"),r){case"start":return g;case"end":return m;case"center":return Math.round(m+(g-m)/2);case"auto":default:return i>=m&&i<=g?i:i<m?m:g}},getStartIndexForOffset:function(e,n,r){return Y$(e,r,n)},getStopIndexForStartIndex:function(e,n,r,i){for(var o=e.direction,s=e.height,a=e.itemCount,l=e.layout,u=e.width,c=o==="horizontal"||l==="horizontal",h=c?u:s,f=ds(e,n,i),d=r+h,p=f.offset+f.size,g=n;g<a-1&&p<d;)g++,p+=ds(e,g,i).size;return g},initInstanceProps:function(e,n){var r=e,i=r.estimatedItemSize,o={itemMetadataMap:{},estimatedItemSize:i||U$,lastMeasuredIndex:-1};return n.resetAfterIndex=function(s,a){a===void 0&&(a=!0),o.lastMeasuredIndex=Math.min(o.lastMeasuredIndex,s-1),n._getItemStyleCache(-1),a&&n.forceUpdate()},o},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){var n=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="function")throw Error('An invalid "itemSize" prop has been specified. Value should be a function. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});const zw=8,X$=t=>{const{data:e,index:n,style:r}=t,i=e[n],{showValueInLabel:o,...s}=i[0],a={...r,top:r.top+zw,paddingTop:8};return Object.prototype.hasOwnProperty.call(i,"group")?y.jsx(O.ListSubheader,{component:"div",style:a,children:i.group},i.key):y.jsx(O.Typography,{component:"li",...s,noWrap:!0,style:a,children:y.jsxs(O.Stack,{component:"div",direction:"row",flex:1,justifyContent:"space-between",children:[i[1].label,o&&y.jsxs(O.Typography,{variant:"inherit",color:"grey.400",children:["(",i[1].value,")"]})]})})},Ww=v.createContext({}),Hw=v.forwardRef((t,e)=>{const n=v.useContext(Ww);return y.jsx("div",{ref:e,...t,...n})});Hw.displayName="OuterElementType";const Z$=t=>{const e=v.useRef(null);return v.useEffect(()=>{e.current!=null&&e.current.resetAfterIndex(0,!0)},[t]),e},Q$=v.forwardRef(function(e,n){const{children:r,...i}=e,o=[];r.forEach(d=>{o.push(d),o.push(...d.children||[])});const s=O.useTheme(),a=O.useMediaQuery(s.breakpoints.up("sm")),l=o.length,u=a?36:48,c=d=>Object.prototype.hasOwnProperty.call(d,"group")?48:u,h=()=>l>8?8*u:o.map(c).reduce((d,p)=>d+p,0),f=Z$(l);return y.jsx("div",{ref:n,children:y.jsx(Ww.Provider,{value:i,children:y.jsx(K$,{itemData:o,height:h()+2*zw,width:"100%",ref:f,outerElementType:Hw,innerElementType:"ul",itemSize:d=>c(o[d]),overscanCount:5,itemCount:l,children:X$})})})}),J$=O.styled(O.Popper)({[`& .${O.autocompleteClasses.listbox}`]:{boxSizing:"border-box","& ul":{padding:0,margin:0}}}),$0=v.forwardRef(({label:t,value:e,options:n=[],loading:r,noOptionsText:i="Nenhuma opção disponível",loadingText:o="Carregando opções...",error:s,helperText:a,placeholder:l,onChange:u,groupBy:c,showValueInLabel:h,disabled:f,multiple:d,required:p,renderOption:g,tabIndex:m,...b},x)=>{const C=w=>w&&typeof w=="object"?w.value.toString():w.toString(),k=v.useMemo(()=>d?(Array.isArray(e)?e:[]).reduce((S,M)=>{const P=n.find(D=>D.value.toString()===M.toString());return P?[...S,P]:[...S]},[]):n.find(T=>T.value.toString()===(e==null?void 0:e.toString()))||null,[n,e,d]);return y.jsx(O.Autocomplete,{ref:x,value:k,onInputChange:()=>{!r&&!k&&u(d?[]:null)},options:n,loading:r,noOptionsText:i,loadingText:o,disabled:r||f,disableListWrap:!0,PopperComponent:J$,ListboxComponent:g?void 0:Q$,filterOptions:(w,T)=>w.filter(S=>`${S.value} ${S.label}`.toLocaleUpperCase().includes(T.inputValue.toLocaleUpperCase())),onChange:(w,T)=>{if(!T){u(d?[]:null);return}if(Array.isArray(T)){u(T.map(C));return}u(typeof T=="string"?T.toString():T.value.toString())},renderOption:(w,T,S,M)=>g?g(w,T,S,M):[{...w,showValueInLabel:h},T],renderGroup:w=>w,groupBy:c,multiple:d,renderInput:w=>y.jsx(O.TextField,{...w,placeholder:l,fullWidth:!0,error:!!s,helperText:a,label:t,required:p,InputProps:{...w.InputProps,endAdornment:y.jsxs(y.Fragment,{children:[r?y.jsx(O.CircularProgress,{color:"primary",size:20}):null,w.InputProps.endAdornment]})},inputProps:{...w.inputProps,tabIndex:m}}),...b})});$0.displayName="Autocomplete";var Un={},ml={},eF=typeof Da=="object"&&Da&&Da.Object===Object&&Da,qw=eF,tF=qw,nF=typeof self=="object"&&self&&self.Object===Object&&self,rF=tF||nF||Function("return this")(),br=rF,iF=br,oF=iF.Symbol,vl=oF,Uw=vl,Yw=Object.prototype,sF=Yw.hasOwnProperty,aF=Yw.toString,yl=Uw?Uw.toStringTag:void 0;function lF(t){var e=sF.call(t,yl),n=t[yl];try{t[yl]=void 0;var r=!0}catch{}var i=aF.call(t);return r&&(e?t[yl]=n:delete t[yl]),i}var uF=lF,cF=Object.prototype,hF=cF.toString;function fF(t){return hF.call(t)}var dF=fF,Gw=vl,pF=uF,gF=dF,mF="[object Null]",vF="[object Undefined]",Kw=Gw?Gw.toStringTag:void 0;function yF(t){return t==null?t===void 0?vF:mF:Kw&&Kw in Object(t)?pF(t):gF(t)}var lo=yF,bF=Array.isArray,ir=bF;function xF(t){return t!=null&&typeof t=="object"}var Gr=xF,wF=lo,CF=ir,SF=Gr,kF="[object String]";function TF(t){return typeof t=="string"||!CF(t)&&SF(t)&&wF(t)==kF}var EF=TF;function OF(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var MF=OF,AF=MF,PF=AF(),DF=PF;function _F(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var IF=_F,$F=lo,FF=Gr,LF="[object Arguments]";function RF(t){return FF(t)&&$F(t)==LF}var BF=RF,Xw=BF,NF=Gr,Zw=Object.prototype,jF=Zw.hasOwnProperty,VF=Zw.propertyIsEnumerable,zF=Xw(function(){return arguments}())?Xw:function(t){return NF(t)&&jF.call(t,"callee")&&!VF.call(t,"callee")},Qw=zF,Jc={exports:{}};function WF(){return!1}var HF=WF;Jc.exports,function(t,e){var n=br,r=HF,i=e&&!e.nodeType&&e,o=i&&!0&&t&&!t.nodeType&&t,s=o&&o.exports===i,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,u=l||r;t.exports=u}(Jc,Jc.exports);var F0=Jc.exports,qF=9007199254740991,UF=/^(?:0|[1-9]\d*)$/;function YF(t,e){var n=typeof t;return e=e??qF,!!e&&(n=="number"||n!="symbol"&&UF.test(t))&&t>-1&&t%1==0&&t<e}var Jw=YF,GF=9007199254740991;function KF(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=GF}var L0=KF,XF=lo,ZF=L0,QF=Gr,JF="[object Arguments]",eL="[object Array]",tL="[object Boolean]",nL="[object Date]",rL="[object Error]",iL="[object Function]",oL="[object Map]",sL="[object Number]",aL="[object Object]",lL="[object RegExp]",uL="[object Set]",cL="[object String]",hL="[object WeakMap]",fL="[object ArrayBuffer]",dL="[object DataView]",pL="[object Float32Array]",gL="[object Float64Array]",mL="[object Int8Array]",vL="[object Int16Array]",yL="[object Int32Array]",bL="[object Uint8Array]",xL="[object Uint8ClampedArray]",wL="[object Uint16Array]",CL="[object Uint32Array]",pt={};pt[pL]=pt[gL]=pt[mL]=pt[vL]=pt[yL]=pt[bL]=pt[xL]=pt[wL]=pt[CL]=!0,pt[JF]=pt[eL]=pt[fL]=pt[tL]=pt[dL]=pt[nL]=pt[rL]=pt[iL]=pt[oL]=pt[sL]=pt[aL]=pt[lL]=pt[uL]=pt[cL]=pt[hL]=!1;function SL(t){return QF(t)&&ZF(t.length)&&!!pt[XF(t)]}var kL=SL;function TL(t){return function(e){return t(e)}}var R0=TL,eh={exports:{}};eh.exports,function(t,e){var n=qw,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a}(eh,eh.exports);var B0=eh.exports,EL=kL,OL=R0,eC=B0,tC=eC&&eC.isTypedArray,ML=tC?OL(tC):EL,nC=ML,AL=IF,PL=Qw,DL=ir,_L=F0,IL=Jw,$L=nC,FL=Object.prototype,LL=FL.hasOwnProperty;function RL(t,e){var n=DL(t),r=!n&&PL(t),i=!n&&!r&&_L(t),o=!n&&!r&&!i&&$L(t),s=n||r||i||o,a=s?AL(t.length,String):[],l=a.length;for(var u in t)(e||LL.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||IL(u,l)))&&a.push(u);return a}var rC=RL,BL=Object.prototype;function NL(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||BL;return t===n}var N0=NL;function jL(t,e){return function(n){return t(e(n))}}var iC=jL,VL=iC,zL=VL(Object.keys,Object),WL=zL,HL=N0,qL=WL,UL=Object.prototype,YL=UL.hasOwnProperty;function GL(t){if(!HL(t))return qL(t);var e=[];for(var n in Object(t))YL.call(t,n)&&n!="constructor"&&e.push(n);return e}var KL=GL;function XL(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ps=XL,ZL=lo,QL=ps,JL="[object AsyncFunction]",eR="[object Function]",tR="[object GeneratorFunction]",nR="[object Proxy]";function rR(t){if(!QL(t))return!1;var e=ZL(t);return e==eR||e==tR||e==JL||e==nR}var oC=rR,iR=oC,oR=L0;function sR(t){return t!=null&&oR(t.length)&&!iR(t)}var th=sR,aR=rC,lR=KL,uR=th;function cR(t){return uR(t)?aR(t):lR(t)}var bl=cR,hR=DF,fR=bl;function dR(t,e){return t&&hR(t,e,fR)}var sC=dR;function pR(t){return t}var aC=pR,gR=aC;function mR(t){return typeof t=="function"?t:gR}var vR=mR,yR=sC,bR=vR;function xR(t,e){return t&&yR(t,bR(e))}var j0=xR,wR=iC,CR=wR(Object.getPrototypeOf,Object),V0=CR,SR=lo,kR=V0,TR=Gr,ER="[object Object]",OR=Function.prototype,MR=Object.prototype,lC=OR.toString,AR=MR.hasOwnProperty,PR=lC.call(Object);function DR(t){if(!TR(t)||SR(t)!=ER)return!1;var e=kR(t);if(e===null)return!0;var n=AR.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&lC.call(n)==PR}var _R=DR;function IR(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var uC=IR;function $R(){this.__data__=[],this.size=0}var FR=$R;function LR(t,e){return t===e||t!==t&&e!==e}var z0=LR,RR=z0;function BR(t,e){for(var n=t.length;n--;)if(RR(t[n][0],e))return n;return-1}var nh=BR,NR=nh,jR=Array.prototype,VR=jR.splice;function zR(t){var e=this.__data__,n=NR(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():VR.call(e,n,1),--this.size,!0}var WR=zR,HR=nh;function qR(t){var e=this.__data__,n=HR(e,t);return n<0?void 0:e[n][1]}var UR=qR,YR=nh;function GR(t){return YR(this.__data__,t)>-1}var KR=GR,XR=nh;function ZR(t,e){var n=this.__data__,r=XR(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var QR=ZR,JR=FR,eB=WR,tB=UR,nB=KR,rB=QR;function gs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}gs.prototype.clear=JR,gs.prototype.delete=eB,gs.prototype.get=tB,gs.prototype.has=nB,gs.prototype.set=rB;var rh=gs,iB=rh;function oB(){this.__data__=new iB,this.size=0}var sB=oB;function aB(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var lB=aB;function uB(t){return this.__data__.get(t)}var cB=uB;function hB(t){return this.__data__.has(t)}var fB=hB,dB=br,pB=dB["__core-js_shared__"],gB=pB,W0=gB,cC=function(){var t=/[^.]+$/.exec(W0&&W0.keys&&W0.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function mB(t){return!!cC&&cC in t}var vB=mB,yB=Function.prototype,bB=yB.toString;function xB(t){if(t!=null){try{return bB.call(t)}catch{}try{return t+""}catch{}}return""}var hC=xB,wB=oC,CB=vB,SB=ps,kB=hC,TB=/[\\^$.*+?()[\]{}|]/g,EB=/^\[object .+?Constructor\]$/,OB=Function.prototype,MB=Object.prototype,AB=OB.toString,PB=MB.hasOwnProperty,DB=RegExp("^"+AB.call(PB).replace(TB,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _B(t){if(!SB(t)||CB(t))return!1;var e=wB(t)?DB:EB;return e.test(kB(t))}var IB=_B;function $B(t,e){return t==null?void 0:t[e]}var FB=$B,LB=IB,RB=FB;function BB(t,e){var n=RB(t,e);return LB(n)?n:void 0}var uo=BB,NB=uo,jB=br,VB=NB(jB,"Map"),H0=VB,zB=uo,WB=zB(Object,"create"),ih=WB,fC=ih;function HB(){this.__data__=fC?fC(null):{},this.size=0}var qB=HB;function UB(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var YB=UB,GB=ih,KB="__lodash_hash_undefined__",XB=Object.prototype,ZB=XB.hasOwnProperty;function QB(t){var e=this.__data__;if(GB){var n=e[t];return n===KB?void 0:n}return ZB.call(e,t)?e[t]:void 0}var JB=QB,eN=ih,tN=Object.prototype,nN=tN.hasOwnProperty;function rN(t){var e=this.__data__;return eN?e[t]!==void 0:nN.call(e,t)}var iN=rN,oN=ih,sN="__lodash_hash_undefined__";function aN(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=oN&&e===void 0?sN:e,this}var lN=aN,uN=qB,cN=YB,hN=JB,fN=iN,dN=lN;function ms(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ms.prototype.clear=uN,ms.prototype.delete=cN,ms.prototype.get=hN,ms.prototype.has=fN,ms.prototype.set=dN;var pN=ms,dC=pN,gN=rh,mN=H0;function vN(){this.size=0,this.__data__={hash:new dC,map:new(mN||gN),string:new dC}}var yN=vN;function bN(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var xN=bN,wN=xN;function CN(t,e){var n=t.__data__;return wN(e)?n[typeof e=="string"?"string":"hash"]:n.map}var oh=CN,SN=oh;function kN(t){var e=SN(this,t).delete(t);return this.size-=e?1:0,e}var TN=kN,EN=oh;function ON(t){return EN(this,t).get(t)}var MN=ON,AN=oh;function PN(t){return AN(this,t).has(t)}var DN=PN,_N=oh;function IN(t,e){var n=_N(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var $N=IN,FN=yN,LN=TN,RN=MN,BN=DN,NN=$N;function vs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}vs.prototype.clear=FN,vs.prototype.delete=LN,vs.prototype.get=RN,vs.prototype.has=BN,vs.prototype.set=NN;var q0=vs,jN=rh,VN=H0,zN=q0,WN=200;function HN(t,e){var n=this.__data__;if(n instanceof jN){var r=n.__data__;if(!VN||r.length<WN-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zN(r)}return n.set(t,e),this.size=n.size,this}var qN=HN,UN=rh,YN=sB,GN=lB,KN=cB,XN=fB,ZN=qN;function ys(t){var e=this.__data__=new UN(t);this.size=e.size}ys.prototype.clear=YN,ys.prototype.delete=GN,ys.prototype.get=KN,ys.prototype.has=XN,ys.prototype.set=ZN;var U0=ys,QN="__lodash_hash_undefined__";function JN(t){return this.__data__.set(t,QN),this}var ej=JN;function tj(t){return this.__data__.has(t)}var nj=tj,rj=q0,ij=ej,oj=nj;function sh(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new rj;++e<n;)this.add(t[e])}sh.prototype.add=sh.prototype.push=ij,sh.prototype.has=oj;var sj=sh;function aj(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var lj=aj;function uj(t,e){return t.has(e)}var cj=uj,hj=sj,fj=lj,dj=cj,pj=1,gj=2;function mj(t,e,n,r,i,o){var s=n&pj,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,f=!0,d=n&gj?new hj:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var p=t[h],g=e[h];if(r)var m=s?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(m!==void 0){if(m)continue;f=!1;break}if(d){if(!fj(e,function(b,x){if(!dj(d,x)&&(p===b||i(p,b,n,r,o)))return d.push(x)})){f=!1;break}}else if(!(p===g||i(p,g,n,r,o))){f=!1;break}}return o.delete(t),o.delete(e),f}var pC=mj,vj=br,yj=vj.Uint8Array,gC=yj;function bj(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var xj=bj;function wj(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Cj=wj,mC=vl,vC=gC,Sj=z0,kj=pC,Tj=xj,Ej=Cj,Oj=1,Mj=2,Aj="[object Boolean]",Pj="[object Date]",Dj="[object Error]",_j="[object Map]",Ij="[object Number]",$j="[object RegExp]",Fj="[object Set]",Lj="[object String]",Rj="[object Symbol]",Bj="[object ArrayBuffer]",Nj="[object DataView]",yC=mC?mC.prototype:void 0,Y0=yC?yC.valueOf:void 0;function jj(t,e,n,r,i,o,s){switch(n){case Nj:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Bj:return!(t.byteLength!=e.byteLength||!o(new vC(t),new vC(e)));case Aj:case Pj:case Ij:return Sj(+t,+e);case Dj:return t.name==e.name&&t.message==e.message;case $j:case Lj:return t==e+"";case _j:var a=Tj;case Fj:var l=r&Oj;if(a||(a=Ej),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;r|=Mj,s.set(t,e);var c=kj(a(t),a(e),r,i,o,s);return s.delete(t),c;case Rj:if(Y0)return Y0.call(t)==Y0.call(e)}return!1}var Vj=jj;function zj(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var bC=zj,Wj=bC,Hj=ir;function qj(t,e,n){var r=e(t);return Hj(t)?r:Wj(r,n(t))}var xC=qj;function Uj(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}var Yj=Uj;function Gj(){return[]}var wC=Gj,Kj=Yj,Xj=wC,Zj=Object.prototype,Qj=Zj.propertyIsEnumerable,CC=Object.getOwnPropertySymbols,Jj=CC?function(t){return t==null?[]:(t=Object(t),Kj(CC(t),function(e){return Qj.call(t,e)}))}:Xj,G0=Jj,eV=xC,tV=G0,nV=bl;function rV(t){return eV(t,nV,tV)}var SC=rV,kC=SC,iV=1,oV=Object.prototype,sV=oV.hasOwnProperty;function aV(t,e,n,r,i,o){var s=n&iV,a=kC(t),l=a.length,u=kC(e),c=u.length;if(l!=c&&!s)return!1;for(var h=l;h--;){var f=a[h];if(!(s?f in e:sV.call(e,f)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var g=!0;o.set(t,e),o.set(e,t);for(var m=s;++h<l;){f=a[h];var b=t[f],x=e[f];if(r)var C=s?r(x,b,f,e,t,o):r(b,x,f,t,e,o);if(!(C===void 0?b===x||i(b,x,n,r,o):C)){g=!1;break}m||(m=f=="constructor")}if(g&&!m){var k=t.constructor,w=e.constructor;k!=w&&"constructor"in t&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof w=="function"&&w instanceof w)&&(g=!1)}return o.delete(t),o.delete(e),g}var lV=aV,uV=uo,cV=br,hV=uV(cV,"DataView"),fV=hV,dV=uo,pV=br,gV=dV(pV,"Promise"),mV=gV,vV=uo,yV=br,bV=vV(yV,"Set"),xV=bV,wV=uo,CV=br,SV=wV(CV,"WeakMap"),kV=SV,K0=fV,X0=H0,Z0=mV,Q0=xV,J0=kV,TC=lo,bs=hC,EC="[object Map]",TV="[object Object]",OC="[object Promise]",MC="[object Set]",AC="[object WeakMap]",PC="[object DataView]",EV=bs(K0),OV=bs(X0),MV=bs(Z0),AV=bs(Q0),PV=bs(J0),co=TC;(K0&&co(new K0(new ArrayBuffer(1)))!=PC||X0&&co(new X0)!=EC||Z0&&co(Z0.resolve())!=OC||Q0&&co(new Q0)!=MC||J0&&co(new J0)!=AC)&&(co=function(t){var e=TC(t),n=e==TV?t.constructor:void 0,r=n?bs(n):"";if(r)switch(r){case EV:return PC;case OV:return EC;case MV:return OC;case AV:return MC;case PV:return AC}return e});var ah=co,eg=U0,DV=pC,_V=Vj,IV=lV,DC=ah,_C=ir,IC=F0,$V=nC,FV=1,$C="[object Arguments]",FC="[object Array]",lh="[object Object]",LV=Object.prototype,LC=LV.hasOwnProperty;function RV(t,e,n,r,i,o){var s=_C(t),a=_C(e),l=s?FC:DC(t),u=a?FC:DC(e);l=l==$C?lh:l,u=u==$C?lh:u;var c=l==lh,h=u==lh,f=l==u;if(f&&IC(t)){if(!IC(e))return!1;s=!0,c=!1}if(f&&!c)return o||(o=new eg),s||$V(t)?DV(t,e,n,r,i,o):_V(t,e,l,n,r,i,o);if(!(n&FV)){var d=c&&LC.call(t,"__wrapped__"),p=h&&LC.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,m=p?e.value():e;return o||(o=new eg),i(g,m,n,r,o)}}return f?(o||(o=new eg),IV(t,e,n,r,i,o)):!1}var BV=RV,NV=BV,RC=Gr;function BC(t,e,n,r,i){return t===e?!0:t==null||e==null||!RC(t)&&!RC(e)?t!==t&&e!==e:NV(t,e,n,r,BC,i)}var tg=BC,jV=U0,VV=tg,zV=1,WV=2;function HV(t,e,n,r){var i=n.length,o=i,s=!r;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];var l=a[0],u=t[l],c=a[1];if(s&&a[2]){if(u===void 0&&!(l in t))return!1}else{var h=new jV;if(r)var f=r(u,c,l,t,e,h);if(!(f===void 0?VV(c,u,zV|WV,r,h):f))return!1}}return!0}var qV=HV,UV=ps;function YV(t){return t===t&&!UV(t)}var NC=YV,GV=NC,KV=bl;function XV(t){for(var e=KV(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,GV(i)]}return e}var ZV=XV;function QV(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var jC=QV,JV=qV,ez=ZV,tz=jC;function nz(t){var e=ez(t);return e.length==1&&e[0][2]?tz(e[0][0],e[0][1]):function(n){return n===t||JV(n,t,e)}}var rz=nz,iz=lo,oz=Gr,sz="[object Symbol]";function az(t){return typeof t=="symbol"||oz(t)&&iz(t)==sz}var ng=az,lz=ir,uz=ng,cz=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hz=/^\w*$/;function fz(t,e){if(lz(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||uz(t)?!0:hz.test(t)||!cz.test(t)||e!=null&&t in Object(e)}var rg=fz,VC=q0,dz="Expected a function";function ig(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(dz);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(ig.Cache||VC),n}ig.Cache=VC;var pz=ig,gz=pz,mz=500;function vz(t){var e=gz(t,function(r){return n.size===mz&&n.clear(),r}),n=e.cache;return e}var yz=vz,bz=yz,xz=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wz=/\\(\\)?/g,Cz=bz(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(xz,function(n,r,i,o){e.push(i?o.replace(wz,"$1"):r||n)}),e}),Sz=Cz,zC=vl,kz=uC,Tz=ir,Ez=ng,Oz=1/0,WC=zC?zC.prototype:void 0,HC=WC?WC.toString:void 0;function qC(t){if(typeof t=="string")return t;if(Tz(t))return kz(t,qC)+"";if(Ez(t))return HC?HC.call(t):"";var e=t+"";return e=="0"&&1/t==-Oz?"-0":e}var Mz=qC,Az=Mz;function Pz(t){return t==null?"":Az(t)}var Dz=Pz,_z=ir,Iz=rg,$z=Sz,Fz=Dz;function Lz(t,e){return _z(t)?t:Iz(t,e)?[t]:$z(Fz(t))}var UC=Lz,Rz=ng,Bz=1/0;function Nz(t){if(typeof t=="string"||Rz(t))return t;var e=t+"";return e=="0"&&1/t==-Bz?"-0":e}var uh=Nz,jz=UC,Vz=uh;function zz(t,e){e=jz(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Vz(e[n++])];return n&&n==r?t:void 0}var YC=zz,Wz=YC;function Hz(t,e,n){var r=t==null?void 0:Wz(t,e);return r===void 0?n:r}var qz=Hz;function Uz(t,e){return t!=null&&e in Object(t)}var Yz=Uz,Gz=UC,Kz=Qw,Xz=ir,Zz=Jw,Qz=L0,Jz=uh;function eW(t,e,n){e=Gz(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var s=Jz(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:(i=t==null?0:t.length,!!i&&Qz(i)&&Zz(s,i)&&(Xz(t)||Kz(t)))}var tW=eW,nW=Yz,rW=tW;function iW(t,e){return t!=null&&rW(t,e,nW)}var oW=iW,sW=tg,aW=qz,lW=oW,uW=rg,cW=NC,hW=jC,fW=uh,dW=1,pW=2;function gW(t,e){return uW(t)&&cW(e)?hW(fW(t),e):function(n){var r=aW(n,t);return r===void 0&&r===e?lW(n,t):sW(e,r,dW|pW)}}var mW=gW;function vW(t){return function(e){return e==null?void 0:e[t]}}var yW=vW,bW=YC;function xW(t){return function(e){return bW(e,t)}}var wW=xW,CW=yW,SW=wW,kW=rg,TW=uh;function EW(t){return kW(t)?CW(TW(t)):SW(t)}var OW=EW,MW=rz,AW=mW,PW=aC,DW=ir,_W=OW;function IW(t){return typeof t=="function"?t:t==null?PW:typeof t=="object"?DW(t)?AW(t[0],t[1]):MW(t):_W(t)}var $W=IW,FW=th;function LW(t,e){return function(n,r){if(n==null)return n;if(!FW(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var RW=LW,BW=sC,NW=RW,jW=NW(BW),VW=jW,zW=VW,WW=th;function HW(t,e){var n=-1,r=WW(t)?Array(t.length):[];return zW(t,function(i,o,s){r[++n]=e(i,o,s)}),r}var qW=HW,UW=uC,YW=$W,GW=qW,KW=ir;function XW(t,e){var n=KW(t)?UW:GW;return n(t,YW(e))}var ZW=XW;Object.defineProperty(ml,"__esModule",{value:!0}),ml.flattenNames=void 0;var QW=EF,JW=ch(QW),eH=j0,tH=ch(eH),nH=_R,rH=ch(nH),iH=ZW,oH=ch(iH);function ch(t){return t&&t.__esModule?t:{default:t}}var sH=ml.flattenNames=function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,oH.default)(e,function(r){Array.isArray(r)?t(r).map(function(i){return n.push(i)}):(0,rH.default)(r)?(0,tH.default)(r,function(i,o){i===!0&&n.push(o),n.push(o+"-"+i)}):(0,JW.default)(r)&&n.push(r)}),n};ml.default=sH;var xl={};function aH(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var lH=aH,uH=uo,cH=function(){try{var t=uH(Object,"defineProperty");return t({},"",{}),t}catch{}}(),hH=cH,GC=hH;function fH(t,e,n){e=="__proto__"&&GC?GC(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var KC=fH,dH=KC,pH=z0,gH=Object.prototype,mH=gH.hasOwnProperty;function vH(t,e,n){var r=t[e];(!(mH.call(t,e)&&pH(r,n))||n===void 0&&!(e in t))&&dH(t,e,n)}var XC=vH,yH=XC,bH=KC;function xH(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),i?bH(n,a,l):yH(n,a,l)}return n}var hh=xH,wH=hh,CH=bl;function SH(t,e){return t&&wH(e,CH(e),t)}var kH=SH;function TH(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var EH=TH,OH=ps,MH=N0,AH=EH,PH=Object.prototype,DH=PH.hasOwnProperty;function _H(t){if(!OH(t))return AH(t);var e=MH(t),n=[];for(var r in t)r=="constructor"&&(e||!DH.call(t,r))||n.push(r);return n}var IH=_H,$H=rC,FH=IH,LH=th;function RH(t){return LH(t)?$H(t,!0):FH(t)}var og=RH,BH=hh,NH=og;function jH(t,e){return t&&BH(e,NH(e),t)}var VH=jH,fh={exports:{}};fh.exports,function(t,e){var n=br,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(u,c){if(c)return u.slice();var h=u.length,f=a?a(h):new u.constructor(h);return u.copy(f),f}t.exports=l}(fh,fh.exports);var zH=fh.exports;function WH(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var HH=WH,qH=hh,UH=G0;function YH(t,e){return qH(t,UH(t),e)}var GH=YH,KH=bC,XH=V0,ZH=G0,QH=wC,JH=Object.getOwnPropertySymbols,eq=JH?function(t){for(var e=[];t;)KH(e,ZH(t)),t=XH(t);return e}:QH,ZC=eq,tq=hh,nq=ZC;function rq(t,e){return tq(t,nq(t),e)}var iq=rq,oq=xC,sq=ZC,aq=og;function lq(t){return oq(t,aq,sq)}var uq=lq,cq=Object.prototype,hq=cq.hasOwnProperty;function fq(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&hq.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var dq=fq,QC=gC;function pq(t){var e=new t.constructor(t.byteLength);return new QC(e).set(new QC(t)),e}var sg=pq,gq=sg;function mq(t,e){var n=e?gq(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var vq=mq,yq=/\w*$/;function bq(t){var e=new t.constructor(t.source,yq.exec(t));return e.lastIndex=t.lastIndex,e}var xq=bq,JC=vl,eS=JC?JC.prototype:void 0,tS=eS?eS.valueOf:void 0;function wq(t){return tS?Object(tS.call(t)):{}}var Cq=wq,Sq=sg;function kq(t,e){var n=e?Sq(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Tq=kq,Eq=sg,Oq=vq,Mq=xq,Aq=Cq,Pq=Tq,Dq="[object Boolean]",_q="[object Date]",Iq="[object Map]",$q="[object Number]",Fq="[object RegExp]",Lq="[object Set]",Rq="[object String]",Bq="[object Symbol]",Nq="[object ArrayBuffer]",jq="[object DataView]",Vq="[object Float32Array]",zq="[object Float64Array]",Wq="[object Int8Array]",Hq="[object Int16Array]",qq="[object Int32Array]",Uq="[object Uint8Array]",Yq="[object Uint8ClampedArray]",Gq="[object Uint16Array]",Kq="[object Uint32Array]";function Xq(t,e,n){var r=t.constructor;switch(e){case Nq:return Eq(t);case Dq:case _q:return new r(+t);case jq:return Oq(t,n);case Vq:case zq:case Wq:case Hq:case qq:case Uq:case Yq:case Gq:case Kq:return Pq(t,n);case Iq:return new r;case $q:case Rq:return new r(t);case Fq:return Mq(t);case Lq:return new r;case Bq:return Aq(t)}}var Zq=Xq,Qq=ps,nS=Object.create,Jq=function(){function t(){}return function(e){if(!Qq(e))return{};if(nS)return nS(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),eU=Jq,tU=eU,nU=V0,rU=N0;function iU(t){return typeof t.constructor=="function"&&!rU(t)?tU(nU(t)):{}}var oU=iU,sU=ah,aU=Gr,lU="[object Map]";function uU(t){return aU(t)&&sU(t)==lU}var cU=uU,hU=cU,fU=R0,rS=B0,iS=rS&&rS.isMap,dU=iS?fU(iS):hU,pU=dU,gU=ah,mU=Gr,vU="[object Set]";function yU(t){return mU(t)&&gU(t)==vU}var bU=yU,xU=bU,wU=R0,oS=B0,sS=oS&&oS.isSet,CU=sS?wU(sS):xU,SU=CU,kU=U0,TU=lH,EU=XC,OU=kH,MU=VH,AU=zH,PU=HH,DU=GH,_U=iq,IU=SC,$U=uq,FU=ah,LU=dq,RU=Zq,BU=oU,NU=ir,jU=F0,VU=pU,zU=ps,WU=SU,HU=bl,qU=og,UU=1,YU=2,GU=4,aS="[object Arguments]",KU="[object Array]",XU="[object Boolean]",ZU="[object Date]",QU="[object Error]",lS="[object Function]",JU="[object GeneratorFunction]",eY="[object Map]",tY="[object Number]",uS="[object Object]",nY="[object RegExp]",rY="[object Set]",iY="[object String]",oY="[object Symbol]",sY="[object WeakMap]",aY="[object ArrayBuffer]",lY="[object DataView]",uY="[object Float32Array]",cY="[object Float64Array]",hY="[object Int8Array]",fY="[object Int16Array]",dY="[object Int32Array]",pY="[object Uint8Array]",gY="[object Uint8ClampedArray]",mY="[object Uint16Array]",vY="[object Uint32Array]",ht={};ht[aS]=ht[KU]=ht[aY]=ht[lY]=ht[XU]=ht[ZU]=ht[uY]=ht[cY]=ht[hY]=ht[fY]=ht[dY]=ht[eY]=ht[tY]=ht[uS]=ht[nY]=ht[rY]=ht[iY]=ht[oY]=ht[pY]=ht[gY]=ht[mY]=ht[vY]=!0,ht[QU]=ht[lS]=ht[sY]=!1;function dh(t,e,n,r,i,o){var s,a=e&UU,l=e&YU,u=e&GU;if(n&&(s=i?n(t,r,i,o):n(t)),s!==void 0)return s;if(!zU(t))return t;var c=NU(t);if(c){if(s=LU(t),!a)return PU(t,s)}else{var h=FU(t),f=h==lS||h==JU;if(jU(t))return AU(t,a);if(h==uS||h==aS||f&&!i){if(s=l||f?{}:BU(t),!a)return l?_U(t,MU(s,t)):DU(t,OU(s,t))}else{if(!ht[h])return i?t:{};s=RU(t,h,a)}}o||(o=new kU);var d=o.get(t);if(d)return d;o.set(t,s),WU(t)?t.forEach(function(m){s.add(dh(m,e,n,m,t,o))}):VU(t)&&t.forEach(function(m,b){s.set(b,dh(m,e,n,b,t,o))});var p=u?l?$U:IU:l?qU:HU,g=c?void 0:p(t);return TU(g||t,function(m,b){g&&(b=m,m=t[b]),EU(s,b,dh(m,e,n,b,t,o))}),s}var yY=dh,bY=yY,xY=1,wY=4;function CY(t){return bY(t,xY|wY)}var SY=CY;Object.defineProperty(xl,"__esModule",{value:!0}),xl.mergeClasses=void 0;var kY=j0,TY=cS(kY),EY=SY,OY=cS(EY),MY=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function cS(t){return t&&t.__esModule?t:{default:t}}var AY=xl.mergeClasses=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.default&&(0,OY.default)(e.default)||{};return n.map(function(i){var o=e[i];return o&&(0,TY.default)(o,function(s,a){r[a]||(r[a]={}),r[a]=MY({},r[a],o[a])}),i}),r};xl.default=AY;var wl={};Object.defineProperty(wl,"__esModule",{value:!0}),wl.autoprefix=void 0;var PY=j0,hS=_Y(PY),DY=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function _Y(t){return t&&t.__esModule?t:{default:t}}var IY={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var n=e&&e.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(e,n){var r=n[e];return r||{extend:e}}},$Y=wl.autoprefix=function(e){var n={};return(0,hS.default)(e,function(r,i){var o={};(0,hS.default)(r,function(s,a){var l=IY[a];l?o=DY({},o,l(s)):o[a]=s}),n[i]=o}),n};wl.default=$Y;var Cl={};Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.hover=void 0;var FY=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},LY=v,ag=RY(LY);function RY(t){return t&&t.__esModule?t:{default:t}}function BY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fS(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function NY(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var jY=Cl.hover=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){NY(i,r);function i(){var o,s,a,l;BY(this,i);for(var u=arguments.length,c=Array(u),h=0;h<u;h++)c[h]=arguments[h];return l=(s=(a=fS(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(c))),a),a.state={hover:!1},a.handleMouseOver=function(){return a.setState({hover:!0})},a.handleMouseOut=function(){return a.setState({hover:!1})},a.render=function(){return ag.default.createElement(n,{onMouseOver:a.handleMouseOver,onMouseOut:a.handleMouseOut},ag.default.createElement(e,FY({},a.props,a.state)))},s),fS(a,l)}return i}(ag.default.Component)};Cl.default=jY;var Sl={};Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.active=void 0;var VY=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zY=v,lg=WY(zY);function WY(t){return t&&t.__esModule?t:{default:t}}function HY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dS(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function qY(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var UY=Sl.active=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){qY(i,r);function i(){var o,s,a,l;HY(this,i);for(var u=arguments.length,c=Array(u),h=0;h<u;h++)c[h]=arguments[h];return l=(s=(a=dS(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(c))),a),a.state={active:!1},a.handleMouseDown=function(){return a.setState({active:!0})},a.handleMouseUp=function(){return a.setState({active:!1})},a.render=function(){return lg.default.createElement(n,{onMouseDown:a.handleMouseDown,onMouseUp:a.handleMouseUp},lg.default.createElement(e,VY({},a.props,a.state)))},s),dS(a,l)}return i}(lg.default.Component)};Sl.default=UY;var ug={};Object.defineProperty(ug,"__esModule",{value:!0});var YY=function(e,n){var r={},i=function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[s]=a};return e===0&&i("first-child"),e===n-1&&i("last-child"),(e===0||e%2===0)&&i("even"),Math.abs(e%2)===1&&i("odd"),i("nth-child",e),r};ug.default=YY,Object.defineProperty(Un,"__esModule",{value:!0}),Un.ReactCSS=Un.loop=Un.handleActive=cg=Un.handleHover=Un.hover=void 0;var GY=ml,KY=xs(GY),XY=xl,ZY=xs(XY),QY=wl,JY=xs(QY),eG=Cl,pS=xs(eG),tG=Sl,nG=xs(tG),rG=ug,iG=xs(rG);function xs(t){return t&&t.__esModule?t:{default:t}}Un.hover=pS.default;var cg=Un.handleHover=pS.default;Un.handleActive=nG.default,Un.loop=iG.default;var oG=Un.ReactCSS=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=(0,KY.default)(r),s=(0,ZY.default)(e,o);return(0,JY.default)(s)},Te=Un.default=oG,sG=function(e,n,r,i,o){var s=o.clientWidth,a=o.clientHeight,l=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,u=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,c=l-(o.getBoundingClientRect().left+window.pageXOffset),h=u-(o.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var f=void 0;if(h<0?f=0:h>a?f=1:f=Math.round(h*100/a)/100,n.a!==f)return{h:n.h,s:n.s,l:n.l,a:f,source:"rgb"}}else{var d=void 0;if(c<0?d=0:c>s?d=1:d=Math.round(c*100/s)/100,i!==d)return{h:n.h,s:n.s,l:n.l,a:d,source:"rgb"}}return null},hg={},aG=function(e,n,r,i){if(typeof document>"u"&&!i)return null;var o=i?new i:document.createElement("canvas");o.width=r*2,o.height=r*2;var s=o.getContext("2d");return s?(s.fillStyle=e,s.fillRect(0,0,o.width,o.height),s.fillStyle=n,s.fillRect(0,0,r,r),s.translate(r,r),s.fillRect(0,0,r,r),o.toDataURL()):null},lG=function(e,n,r,i){var o=e+"-"+n+"-"+r+(i?"-server":"");if(hg[o])return hg[o];var s=aG(e,n,r,i);return hg[o]=s,s},gS=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ws=function(e){var n=e.white,r=e.grey,i=e.size,o=e.renderers,s=e.borderRadius,a=e.boxShadow,l=e.children,u=Te({default:{grid:{borderRadius:s,boxShadow:a,absolute:"0px 0px 0px 0px",background:"url("+lG(n,r,i,o.canvas)+") center left"}}});return v.isValidElement(l)?v.cloneElement(l,gS({},l.props,{style:gS({},l.props.style,u.grid)})):v.createElement("div",{style:u.grid})};ws.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var uG=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},cG=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function hG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mS(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var fg=function(t){fG(e,t);function e(){var n,r,i,o;hG(this,e);for(var s=arguments.length,a=Array(s),l=0;l<s;l++)a[l]=arguments[l];return o=(r=(i=mS(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(a))),i),i.handleChange=function(u){var c=sG(u,i.props.hsl,i.props.direction,i.props.a,i.container);c&&typeof i.props.onChange=="function"&&i.props.onChange(c,u)},i.handleMouseDown=function(u){i.handleChange(u),window.addEventListener("mousemove",i.handleChange),window.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},i.unbindEventListeners=function(){window.removeEventListener("mousemove",i.handleChange),window.removeEventListener("mouseup",i.handleMouseUp)},r),mS(i,o)}return cG(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,i=this.props.rgb,o=Te({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+i.r+","+i.g+","+i.b+`, 0) 0%,
110
+ rgba(`+i.r+","+i.g+","+i.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:i.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+i.r+","+i.g+","+i.b+`, 0) 0%,
111
+ rgba(`+i.r+","+i.g+","+i.b+", 1) 100%)"},pointer:{left:0,top:i.a*100+"%"}},overwrite:uG({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return v.createElement("div",{style:o.alpha},v.createElement("div",{style:o.checkboard},v.createElement(ws,{renderers:this.props.renderers})),v.createElement("div",{style:o.gradient}),v.createElement("div",{style:o.container,ref:function(a){return r.container=a},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},v.createElement("div",{style:o.pointer},this.props.pointer?v.createElement(this.props.pointer,this.props):v.createElement("div",{style:o.slider}))))}}]),e}(v.PureComponent||v.Component),dG=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function pG(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mG(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function vG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var yG=1,vS=38,bG=40,xG=[vS,bG],wG=function(e){return xG.indexOf(e)>-1},CG=function(e){return Number(String(e).replace(/%/g,""))},SG=1,Re=function(t){vG(e,t);function e(n){gG(this,e);var r=mG(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(i){r.setUpdatedValue(i.target.value,i)},r.handleKeyDown=function(i){var o=CG(i.target.value);if(!isNaN(o)&&wG(i.keyCode)){var s=r.getArrowOffset(),a=i.keyCode===vS?o+s:o-s;r.setUpdatedValue(a,i)}},r.handleDrag=function(i){if(r.props.dragLabel){var o=Math.round(r.props.value+i.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),i)}},r.handleMouseDown=function(i){r.props.dragLabel&&(i.preventDefault(),r.handleDrag(i),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+SG++,r}return dG(e,[{key:"componentDidUpdate",value:function(r,i){this.props.value!==this.state.value&&(r.value!==this.props.value||i.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return pG({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||yG}},{key:"setUpdatedValue",value:function(r,i){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,i),this.setState({value:r})}},{key:"render",value:function(){var r=this,i=Te({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return v.createElement("div",{style:i.wrap},v.createElement("input",{id:this.inputId,style:i.input,ref:function(s){return r.input=s},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?v.createElement("label",{htmlFor:this.inputId,style:i.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(v.PureComponent||v.Component),kG=function(e,n,r,i){var o=i.clientWidth,s=i.clientHeight,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=a-(i.getBoundingClientRect().left+window.pageXOffset),c=l-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var h=void 0;if(c<0)h=359;else if(c>s)h=0;else{var f=-(c*100/s)+100;h=360*f/100}if(r.h!==h)return{h,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var d=void 0;if(u<0)d=0;else if(u>o)d=359;else{var p=u*100/o;d=360*p/100}if(r.h!==d)return{h:d,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},TG=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function EG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yS(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function OG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Cs=function(t){OG(e,t);function e(){var n,r,i,o;EG(this,e);for(var s=arguments.length,a=Array(s),l=0;l<s;l++)a[l]=arguments[l];return o=(r=(i=yS(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(a))),i),i.handleChange=function(u){var c=kG(u,i.props.direction,i.props.hsl,i.container);c&&typeof i.props.onChange=="function"&&i.props.onChange(c,u)},i.handleMouseDown=function(u){i.handleChange(u),window.addEventListener("mousemove",i.handleChange),window.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},r),yS(i,o)}return TG(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,i=this.props.direction,o=i===void 0?"horizontal":i,s=Te({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:o==="vertical"});return v.createElement("div",{style:s.hue},v.createElement("div",{className:"hue-"+o,style:s.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},v.createElement("style",null,`
112
+ .hue-horizontal {
113
+ background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
114
+ 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
115
+ background: -webkit-linear-gradient(to right, #f00 0%, #ff0
116
+ 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
117
+ }
118
+
119
+ .hue-vertical {
120
+ background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
121
+ #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
122
+ background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
123
+ #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
124
+ }
125
+ `),v.createElement("div",{style:s.pointer},this.props.pointer?v.createElement(this.props.pointer,this.props):v.createElement("div",{style:s.slider}))))}}]),e}(v.PureComponent||v.Component);function MG(){this.__data__=[],this.size=0}function kl(t,e){return t===e||t!==t&&e!==e}function ph(t,e){for(var n=t.length;n--;)if(kl(t[n][0],e))return n;return-1}var AG=Array.prototype,PG=AG.splice;function DG(t){var e=this.__data__,n=ph(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():PG.call(e,n,1),--this.size,!0}function _G(t){var e=this.__data__,n=ph(e,t);return n<0?void 0:e[n][1]}function IG(t){return ph(this.__data__,t)>-1}function $G(t,e){var n=this.__data__,r=ph(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Kr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Kr.prototype.clear=MG,Kr.prototype.delete=DG,Kr.prototype.get=_G,Kr.prototype.has=IG,Kr.prototype.set=$G;function FG(){this.__data__=new Kr,this.size=0}function LG(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function RG(t){return this.__data__.get(t)}function BG(t){return this.__data__.has(t)}var NG=typeof global=="object"&&global&&global.Object===Object&&global;const bS=NG;var jG=typeof self=="object"&&self&&self.Object===Object&&self,VG=bS||jG||Function("return this")();const or=VG;var zG=or.Symbol;const yi=zG;var xS=Object.prototype,WG=xS.hasOwnProperty,HG=xS.toString,Tl=yi?yi.toStringTag:void 0;function qG(t){var e=WG.call(t,Tl),n=t[Tl];try{t[Tl]=void 0;var r=!0}catch{}var i=HG.call(t);return r&&(e?t[Tl]=n:delete t[Tl]),i}var UG=Object.prototype,YG=UG.toString;function GG(t){return YG.call(t)}var KG="[object Null]",XG="[object Undefined]",wS=yi?yi.toStringTag:void 0;function ho(t){return t==null?t===void 0?XG:KG:wS&&wS in Object(t)?qG(t):GG(t)}function Yn(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ZG="[object AsyncFunction]",QG="[object Function]",JG="[object GeneratorFunction]",eK="[object Proxy]";function dg(t){if(!Yn(t))return!1;var e=ho(t);return e==QG||e==JG||e==ZG||e==eK}var tK=or["__core-js_shared__"];const pg=tK;var CS=function(){var t=/[^.]+$/.exec(pg&&pg.keys&&pg.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function nK(t){return!!CS&&CS in t}var rK=Function.prototype,iK=rK.toString;function fo(t){if(t!=null){try{return iK.call(t)}catch{}try{return t+""}catch{}}return""}var oK=/[\\^$.*+?()[\]{}|]/g,sK=/^\[object .+?Constructor\]$/,aK=Function.prototype,lK=Object.prototype,uK=aK.toString,cK=lK.hasOwnProperty,hK=RegExp("^"+uK.call(cK).replace(oK,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fK(t){if(!Yn(t)||nK(t))return!1;var e=dg(t)?hK:sK;return e.test(fo(t))}function dK(t,e){return t==null?void 0:t[e]}function po(t,e){var n=dK(t,e);return fK(n)?n:void 0}var pK=po(or,"Map");const El=pK;var gK=po(Object,"create");const Ol=gK;function mK(){this.__data__=Ol?Ol(null):{},this.size=0}function vK(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var yK="__lodash_hash_undefined__",bK=Object.prototype,xK=bK.hasOwnProperty;function wK(t){var e=this.__data__;if(Ol){var n=e[t];return n===yK?void 0:n}return xK.call(e,t)?e[t]:void 0}var CK=Object.prototype,SK=CK.hasOwnProperty;function kK(t){var e=this.__data__;return Ol?e[t]!==void 0:SK.call(e,t)}var TK="__lodash_hash_undefined__";function EK(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ol&&e===void 0?TK:e,this}function go(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}go.prototype.clear=mK,go.prototype.delete=vK,go.prototype.get=wK,go.prototype.has=kK,go.prototype.set=EK;function OK(){this.size=0,this.__data__={hash:new go,map:new(El||Kr),string:new go}}function MK(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function gh(t,e){var n=t.__data__;return MK(e)?n[typeof e=="string"?"string":"hash"]:n.map}function AK(t){var e=gh(this,t).delete(t);return this.size-=e?1:0,e}function PK(t){return gh(this,t).get(t)}function DK(t){return gh(this,t).has(t)}function _K(t,e){var n=gh(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Xr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Xr.prototype.clear=OK,Xr.prototype.delete=AK,Xr.prototype.get=PK,Xr.prototype.has=DK,Xr.prototype.set=_K;var IK=200;function $K(t,e){var n=this.__data__;if(n instanceof Kr){var r=n.__data__;if(!El||r.length<IK-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Xr(r)}return n.set(t,e),this.size=n.size,this}function xr(t){var e=this.__data__=new Kr(t);this.size=e.size}xr.prototype.clear=FG,xr.prototype.delete=LG,xr.prototype.get=RG,xr.prototype.has=BG,xr.prototype.set=$K;var FK=function(){try{var t=po(Object,"defineProperty");return t({},"",{}),t}catch{}}();const mh=FK;function gg(t,e,n){e=="__proto__"&&mh?mh(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function mg(t,e,n){(n!==void 0&&!kl(t[e],n)||n===void 0&&!(e in t))&&gg(t,e,n)}function LK(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var RK=LK();const SS=RK;var kS=typeof $=="object"&&$&&!$.nodeType&&$,TS=kS&&typeof module=="object"&&module&&!module.nodeType&&module,BK=TS&&TS.exports===kS,ES=BK?or.Buffer:void 0,OS=ES?ES.allocUnsafe:void 0;function NK(t,e){if(e)return t.slice();var n=t.length,r=OS?OS(n):new t.constructor(n);return t.copy(r),r}var jK=or.Uint8Array;const vh=jK;function VK(t){var e=new t.constructor(t.byteLength);return new vh(e).set(new vh(t)),e}function zK(t,e){var n=e?VK(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function WK(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var MS=Object.create,HK=function(){function t(){}return function(e){if(!Yn(e))return{};if(MS)return MS(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const qK=HK;function AS(t,e){return function(n){return t(e(n))}}var UK=AS(Object.getPrototypeOf,Object);const PS=UK;var YK=Object.prototype;function vg(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||YK;return t===n}function GK(t){return typeof t.constructor=="function"&&!vg(t)?qK(PS(t)):{}}function bi(t){return t!=null&&typeof t=="object"}var KK="[object Arguments]";function DS(t){return bi(t)&&ho(t)==KK}var _S=Object.prototype,XK=_S.hasOwnProperty,ZK=_S.propertyIsEnumerable,QK=DS(function(){return arguments}())?DS:function(t){return bi(t)&&XK.call(t,"callee")&&!ZK.call(t,"callee")};const yh=QK;var JK=Array.isArray;const Dn=JK;var eX=9007199254740991;function yg(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=eX}function Ss(t){return t!=null&&yg(t.length)&&!dg(t)}function tX(t){return bi(t)&&Ss(t)}function nX(){return!1}var IS=typeof $=="object"&&$&&!$.nodeType&&$,$S=IS&&typeof module=="object"&&module&&!module.nodeType&&module,rX=$S&&$S.exports===IS,FS=rX?or.Buffer:void 0,iX=FS?FS.isBuffer:void 0,oX=iX||nX;const bh=oX;var sX="[object Object]",aX=Function.prototype,lX=Object.prototype,LS=aX.toString,uX=lX.hasOwnProperty,cX=LS.call(Object);function hX(t){if(!bi(t)||ho(t)!=sX)return!1;var e=PS(t);if(e===null)return!0;var n=uX.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&LS.call(n)==cX}var fX="[object Arguments]",dX="[object Array]",pX="[object Boolean]",gX="[object Date]",mX="[object Error]",vX="[object Function]",yX="[object Map]",bX="[object Number]",xX="[object Object]",wX="[object RegExp]",CX="[object Set]",SX="[object String]",kX="[object WeakMap]",TX="[object ArrayBuffer]",EX="[object DataView]",OX="[object Float32Array]",MX="[object Float64Array]",AX="[object Int8Array]",PX="[object Int16Array]",DX="[object Int32Array]",_X="[object Uint8Array]",IX="[object Uint8ClampedArray]",$X="[object Uint16Array]",FX="[object Uint32Array]",gt={};gt[OX]=gt[MX]=gt[AX]=gt[PX]=gt[DX]=gt[_X]=gt[IX]=gt[$X]=gt[FX]=!0,gt[fX]=gt[dX]=gt[TX]=gt[pX]=gt[EX]=gt[gX]=gt[mX]=gt[vX]=gt[yX]=gt[bX]=gt[xX]=gt[wX]=gt[CX]=gt[SX]=gt[kX]=!1;function LX(t){return bi(t)&&yg(t.length)&&!!gt[ho(t)]}function RX(t){return function(e){return t(e)}}var RS=typeof $=="object"&&$&&!$.nodeType&&$,Ml=RS&&typeof module=="object"&&module&&!module.nodeType&&module,BX=Ml&&Ml.exports===RS,bg=BX&&bS.process,NX=function(){try{var t=Ml&&Ml.require&&Ml.require("util").types;return t||bg&&bg.binding&&bg.binding("util")}catch{}}();const BS=NX;var NS=BS&&BS.isTypedArray,jX=NS?RX(NS):LX;const xg=jX;function wg(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var VX=Object.prototype,zX=VX.hasOwnProperty;function WX(t,e,n){var r=t[e];(!(zX.call(t,e)&&kl(r,n))||n===void 0&&!(e in t))&&gg(t,e,n)}function HX(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),i?gg(n,a,l):WX(n,a,l)}return n}function qX(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var UX=9007199254740991,YX=/^(?:0|[1-9]\d*)$/;function Cg(t,e){var n=typeof t;return e=e??UX,!!e&&(n=="number"||n!="symbol"&&YX.test(t))&&t>-1&&t%1==0&&t<e}var GX=Object.prototype,KX=GX.hasOwnProperty;function jS(t,e){var n=Dn(t),r=!n&&yh(t),i=!n&&!r&&bh(t),o=!n&&!r&&!i&&xg(t),s=n||r||i||o,a=s?qX(t.length,String):[],l=a.length;for(var u in t)(e||KX.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Cg(u,l)))&&a.push(u);return a}function XX(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var ZX=Object.prototype,QX=ZX.hasOwnProperty;function JX(t){if(!Yn(t))return XX(t);var e=vg(t),n=[];for(var r in t)r=="constructor"&&(e||!QX.call(t,r))||n.push(r);return n}function VS(t){return Ss(t)?jS(t,!0):JX(t)}function eZ(t){return HX(t,VS(t))}function tZ(t,e,n,r,i,o,s){var a=wg(t,n),l=wg(e,n),u=s.get(l);if(u){mg(t,n,u);return}var c=o?o(a,l,n+"",t,e,s):void 0,h=c===void 0;if(h){var f=Dn(l),d=!f&&bh(l),p=!f&&!d&&xg(l);c=l,f||d||p?Dn(a)?c=a:tX(a)?c=WK(a):d?(h=!1,c=NK(l,!0)):p?(h=!1,c=zK(l,!0)):c=[]:hX(l)||yh(l)?(c=a,yh(a)?c=eZ(a):(!Yn(a)||dg(a))&&(c=GK(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l)),mg(t,n,c)}function zS(t,e,n,r,i){t!==e&&SS(e,function(o,s){if(i||(i=new xr),Yn(o))tZ(t,e,s,n,zS,r,i);else{var a=r?r(wg(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),mg(t,s,a)}},VS)}function xh(t){return t}function nZ(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var WS=Math.max;function rZ(t,e,n){return e=WS(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=WS(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),nZ(t,this,a)}}function iZ(t){return function(){return t}}var oZ=mh?function(t,e){return mh(t,"toString",{configurable:!0,enumerable:!1,value:iZ(e),writable:!0})}:xh;const sZ=oZ;var aZ=800,lZ=16,uZ=Date.now;function cZ(t){var e=0,n=0;return function(){var r=uZ(),i=lZ-(r-n);if(n=r,i>0){if(++e>=aZ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var hZ=cZ(sZ);const fZ=hZ;function dZ(t,e){return fZ(rZ(t,e,xh),t+"")}function pZ(t,e,n){if(!Yn(n))return!1;var r=typeof e;return(r=="number"?Ss(n)&&Cg(e,n.length):r=="string"&&e in n)?kl(n[e],t):!1}function gZ(t){return dZ(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&pZ(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}var mZ=gZ(function(t,e,n){zS(t,e,n)});const xn=mZ;var Al=function(e){var n=e.zDepth,r=e.radius,i=e.background,o=e.children,s=e.styles,a=s===void 0?{}:s,l=Te(xn({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:i}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},a),{"zDepth-1":n===1});return v.createElement("div",{style:l.wrap},v.createElement("div",{style:l.bg}),v.createElement("div",{style:l.content},o))};Al.propTypes={background:A.string,zDepth:A.oneOf([0,1,2,3,4,5]),radius:A.number,styles:A.object},Al.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var vZ=function(){return or.Date.now()};const Sg=vZ;var yZ=/\s/;function bZ(t){for(var e=t.length;e--&&yZ.test(t.charAt(e)););return e}var xZ=/^\s+/;function wZ(t){return t&&t.slice(0,bZ(t)+1).replace(xZ,"")}var CZ="[object Symbol]";function wh(t){return typeof t=="symbol"||bi(t)&&ho(t)==CZ}var HS=0/0,SZ=/^[-+]0x[0-9a-f]+$/i,kZ=/^0b[01]+$/i,TZ=/^0o[0-7]+$/i,EZ=parseInt;function qS(t){if(typeof t=="number")return t;if(wh(t))return HS;if(Yn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Yn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=wZ(t);var n=kZ.test(t);return n||TZ.test(t)?EZ(t.slice(2),n?2:8):SZ.test(t)?HS:+t}var OZ="Expected a function",MZ=Math.max,AZ=Math.min;function Pl(t,e,n){var r,i,o,s,a,l,u=0,c=!1,h=!1,f=!0;if(typeof t!="function")throw new TypeError(OZ);e=qS(e)||0,Yn(n)&&(c=!!n.leading,h="maxWait"in n,o=h?MZ(qS(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f);function d(T){var S=r,M=i;return r=i=void 0,u=T,s=t.apply(M,S),s}function p(T){return u=T,a=setTimeout(b,e),c?d(T):s}function g(T){var S=T-l,M=T-u,P=e-S;return h?AZ(P,o-M):P}function m(T){var S=T-l,M=T-u;return l===void 0||S>=e||S<0||h&&M>=o}function b(){var T=Sg();if(m(T))return x(T);a=setTimeout(b,g(T))}function x(T){return a=void 0,f&&r?d(T):(r=i=void 0,s)}function C(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function k(){return a===void 0?s:x(Sg())}function w(){var T=Sg(),S=m(T);if(r=arguments,i=this,l=T,S){if(a===void 0)return p(l);if(h)return clearTimeout(a),a=setTimeout(b,e),d(l)}return a===void 0&&(a=setTimeout(b,e)),s}return w.cancel=C,w.flush=k,w}var PZ="Expected a function";function US(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(PZ);return Yn(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Pl(t,e,{leading:r,maxWait:e,trailing:i})}var DZ=function(e,n,r){var i=r.getBoundingClientRect(),o=i.width,s=i.height,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=a-(r.getBoundingClientRect().left+window.pageXOffset),c=l-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>o&&(u=o),c<0?c=0:c>s&&(c=s);var h=u/o,f=1-c/s;return{h:n.h,s:h,v:f,a:n.a,source:"hsv"}},_Z=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function IZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function FZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ch=function(t){FZ(e,t);function e(n){IZ(this,e);var r=$Z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n));return r.handleChange=function(i){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,DZ(i,r.props.hsl,r.container),i)},r.handleMouseDown=function(i){r.handleChange(i);var o=r.getContainerRenderWindow();o.addEventListener("mousemove",r.handleChange),o.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=US(function(i,o,s){i(o,s)},50),r}return _Z(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,i=window;!i.document.contains(r)&&i.parent!==i;)i=i.parent;return i}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,i=this.props.style||{},o=i.color,s=i.white,a=i.black,l=i.pointer,u=i.circle,c=Te({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
126
+ 0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:o,white:s,black:a,pointer:l,circle:u}},{custom:!!this.props.style});return v.createElement("div",{style:c.color,ref:function(f){return r.container=f},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},v.createElement("style",null,`
127
+ .saturation-white {
128
+ background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
129
+ background: linear-gradient(to right, #fff, rgba(255,255,255,0));
130
+ }
131
+ .saturation-black {
132
+ background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
133
+ background: linear-gradient(to top, #000, rgba(0,0,0,0));
134
+ }
135
+ `),v.createElement("div",{style:c.white,className:"saturation-white"},v.createElement("div",{style:c.black,className:"saturation-black"}),v.createElement("div",{style:c.pointer},this.props.pointer?v.createElement(this.props.pointer,this.props):v.createElement("div",{style:c.circle}))))}}]),e}(v.PureComponent||v.Component);function LZ(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var RZ=AS(Object.keys,Object);const BZ=RZ;var NZ=Object.prototype,jZ=NZ.hasOwnProperty;function VZ(t){if(!vg(t))return BZ(t);var e=[];for(var n in Object(t))jZ.call(t,n)&&n!="constructor"&&e.push(n);return e}function kg(t){return Ss(t)?jS(t):VZ(t)}function zZ(t,e){return t&&SS(t,e,kg)}function WZ(t,e){return function(n,r){if(n==null)return n;if(!Ss(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var HZ=WZ(zZ);const YS=HZ;function qZ(t){return typeof t=="function"?t:xh}function UZ(t,e){var n=Dn(t)?LZ:YS;return n(t,qZ(e))}function Sh(t){"@babel/helpers - typeof";return Sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sh(t)}var YZ=/^\s+/,GZ=/\s+$/;function ge(t,e){if(t=t||"",e=e||{},t instanceof ge)return t;if(!(this instanceof ge))return new ge(t,e);var n=KZ(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ge.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,r,i,o,s,a;return n=e.r/255,r=e.g/255,i=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=JS(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=KS(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=KS(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=GS(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=GS(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return XS(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return JZ(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(xt(this._r,255)*100)+"%",g:Math.round(xt(this._g,255)*100)+"%",b:Math.round(xt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(xt(this._r,255)*100)+"%, "+Math.round(xt(this._g,255)*100)+"%, "+Math.round(xt(this._b,255)*100)+"%)":"rgba("+Math.round(xt(this._r,255)*100)+"%, "+Math.round(xt(this._g,255)*100)+"%, "+Math.round(xt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:hQ[XS(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+ZS(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=ge(e);r="#"+ZS(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ge(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(rQ,arguments)},brighten:function(){return this._applyModification(iQ,arguments)},darken:function(){return this._applyModification(oQ,arguments)},desaturate:function(){return this._applyModification(eQ,arguments)},saturate:function(){return this._applyModification(tQ,arguments)},greyscale:function(){return this._applyModification(nQ,arguments)},spin:function(){return this._applyModification(sQ,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(uQ,arguments)},complement:function(){return this._applyCombination(aQ,arguments)},monochromatic:function(){return this._applyCombination(cQ,arguments)},splitcomplement:function(){return this._applyCombination(lQ,arguments)},triad:function(){return this._applyCombination(QS,[3])},tetrad:function(){return this._applyCombination(QS,[4])}},ge.fromRatio=function(t,e){if(Sh(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=Dl(t[r]));t=n}return ge(t,e)};function KZ(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=gQ(t)),Sh(t)=="object"&&(Zr(t.r)&&Zr(t.g)&&Zr(t.b)?(e=XZ(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Zr(t.h)&&Zr(t.s)&&Zr(t.v)?(r=Dl(t.s),i=Dl(t.v),e=QZ(t.h,r,i),s=!0,a="hsv"):Zr(t.h)&&Zr(t.s)&&Zr(t.l)&&(r=Dl(t.s),o=Dl(t.l),e=ZZ(t.h,r,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=JS(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function XZ(t,e,n){return{r:xt(t,255)*255,g:xt(e,255)*255,b:xt(n,255)*255}}function GS(t,e,n){t=xt(t,255),e=xt(e,255),n=xt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=(r+i)/2;if(r==i)o=s=0;else{var l=r-i;switch(s=a>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function ZZ(t,e,n){var r,i,o;t=xt(t,360),e=xt(e,100),n=xt(n,100);function s(u,c,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?u+(c-u)*6*h:h<1/2?c:h<2/3?u+(c-u)*(2/3-h)*6:u}if(e===0)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function KS(t,e,n){t=xt(t,255),e=xt(e,255),n=xt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=r,l=r-i;if(s=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,v:a}}function QZ(t,e,n){t=xt(t,360)*6,e=xt(e,100),n=xt(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6,u=[n,s,o,o,a,n][l],c=[a,n,n,s,o,o][l],h=[o,o,a,n,n,s][l];return{r:u*255,g:c*255,b:h*255}}function XS(t,e,n,r){var i=[sr(Math.round(t).toString(16)),sr(Math.round(e).toString(16)),sr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function JZ(t,e,n,r,i){var o=[sr(Math.round(t).toString(16)),sr(Math.round(e).toString(16)),sr(Math.round(n).toString(16)),sr(e5(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function ZS(t,e,n,r){var i=[sr(e5(r)),sr(Math.round(t).toString(16)),sr(Math.round(e).toString(16)),sr(Math.round(n).toString(16))];return i.join("")}ge.equals=function(t,e){return!t||!e?!1:ge(t).toRgbString()==ge(e).toRgbString()},ge.random=function(){return ge.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function eQ(t,e){e=e===0?0:e||10;var n=ge(t).toHsl();return n.s-=e/100,n.s=kh(n.s),ge(n)}function tQ(t,e){e=e===0?0:e||10;var n=ge(t).toHsl();return n.s+=e/100,n.s=kh(n.s),ge(n)}function nQ(t){return ge(t).desaturate(100)}function rQ(t,e){e=e===0?0:e||10;var n=ge(t).toHsl();return n.l+=e/100,n.l=kh(n.l),ge(n)}function iQ(t,e){e=e===0?0:e||10;var n=ge(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),ge(n)}function oQ(t,e){e=e===0?0:e||10;var n=ge(t).toHsl();return n.l-=e/100,n.l=kh(n.l),ge(n)}function sQ(t,e){var n=ge(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,ge(n)}function aQ(t){var e=ge(t).toHsl();return e.h=(e.h+180)%360,ge(e)}function QS(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=ge(t).toHsl(),r=[ge(t)],i=360/e,o=1;o<e;o++)r.push(ge({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function lQ(t){var e=ge(t).toHsl(),n=e.h;return[ge(t),ge({h:(n+72)%360,s:e.s,l:e.l}),ge({h:(n+216)%360,s:e.s,l:e.l})]}function uQ(t,e,n){e=e||6,n=n||30;var r=ge(t).toHsl(),i=360/n,o=[ge(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(ge(r));return o}function cQ(t,e){e=e||6;for(var n=ge(t).toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/e;e--;)s.push(ge({h:r,s:i,v:o})),o=(o+a)%1;return s}ge.mix=function(t,e,n){n=n===0?0:n||50;var r=ge(t).toRgb(),i=ge(e).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return ge(s)},ge.readability=function(t,e){var n=ge(t),r=ge(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},ge.isReadable=function(t,e,n){var r=ge.readability(t,e),i,o;switch(o=!1,i=mQ(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},ge.mostReadable=function(t,e,n){var r=null,i=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;u<e.length;u++)o=ge.readability(t,e[u]),o>i&&(i=o,r=ge(e[u]));return ge.isReadable(t,r,{level:a,size:l})||!s?r:(n.includeFallbackColors=!1,ge.mostReadable(t,["#fff","#000"],n))};var Tg=ge.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hQ=ge.hexNames=fQ(Tg);function fQ(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function JS(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function xt(t,e){dQ(t)&&(t="100%");var n=pQ(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function kh(t){return Math.min(1,Math.max(0,t))}function _n(t){return parseInt(t,16)}function dQ(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function pQ(t){return typeof t=="string"&&t.indexOf("%")!=-1}function sr(t){return t.length==1?"0"+t:""+t}function Dl(t){return t<=1&&(t=t*100+"%"),t}function e5(t){return Math.round(parseFloat(t)*255).toString(16)}function t5(t){return _n(t)/255}var ar=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Zr(t){return!!ar.CSS_UNIT.exec(t)}function gQ(t){t=t.replace(YZ,"").replace(GZ,"").toLowerCase();var e=!1;if(Tg[t])t=Tg[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ar.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ar.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ar.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ar.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ar.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ar.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ar.hex8.exec(t))?{r:_n(n[1]),g:_n(n[2]),b:_n(n[3]),a:t5(n[4]),format:e?"name":"hex8"}:(n=ar.hex6.exec(t))?{r:_n(n[1]),g:_n(n[2]),b:_n(n[3]),format:e?"name":"hex"}:(n=ar.hex4.exec(t))?{r:_n(n[1]+""+n[1]),g:_n(n[2]+""+n[2]),b:_n(n[3]+""+n[3]),a:t5(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=ar.hex3.exec(t))?{r:_n(n[1]+""+n[1]),g:_n(n[2]+""+n[2]),b:_n(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function mQ(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var n5=function(e){var n=["r","g","b","a","h","s","l","v"],r=0,i=0;return UZ(n,function(o){if(e[o]&&(r+=1,isNaN(e[o])||(i+=1),o==="s"||o==="l")){var s=/^\d+%$/;s.test(e[o])&&(i+=1)}}),r===i?e:!1},_l=function(e,n){var r=e.hex?ge(e.hex):ge(e),i=r.toHsl(),o=r.toHsv(),s=r.toRgb(),a=r.toHex();i.s===0&&(i.h=n||0,o.h=n||0);var l=a==="000000"&&s.a===0;return{hsl:i,hex:l?"transparent":"#"+a,rgb:s,hsv:o,oldHue:e.h||n||i.h,source:e.source}},xi=function(e){if(e==="transparent")return!0;var n=String(e).charAt(0)==="#"?1:0;return e.length!==4+n&&e.length<7+n&&ge(e).isValid()},Eg=function(e){if(!e)return"#fff";var n=_l(e);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},Og=function(e,n){var r=e.replace("°","");return ge(n+" ("+r+")")._ok},Il=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vQ=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function yQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bQ(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function xQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var wn=function(e){var n=function(r){xQ(i,r);function i(o){yQ(this,i);var s=bQ(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return s.handleChange=function(a,l){var u=n5(a);if(u){var c=_l(a,a.h||s.state.oldHue);s.setState(c),s.props.onChangeComplete&&s.debounce(s.props.onChangeComplete,c,l),s.props.onChange&&s.props.onChange(c,l)}},s.handleSwatchHover=function(a,l){var u=n5(a);if(u){var c=_l(a,a.h||s.state.oldHue);s.props.onSwatchHover&&s.props.onSwatchHover(c,l)}},s.state=Il({},_l(o.color,0)),s.debounce=Pl(function(a,l,u){a(l,u)},100),s}return vQ(i,[{key:"render",value:function(){var s={};return this.props.onSwatchHover&&(s.onSwatchHover=this.handleSwatchHover),v.createElement(e,Il({},this.props,this.state,{onChange:this.handleChange},s))}}],[{key:"getDerivedStateFromProps",value:function(s,a){return Il({},_l(s.color,a.oldHue))}}]),i}(v.PureComponent||v.Component);return n.propTypes=Il({},e.propTypes),n.defaultProps=Il({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},wQ=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},CQ=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function SQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r5(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function kQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var TQ=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){kQ(i,r);function i(){var o,s,a,l;SQ(this,i);for(var u=arguments.length,c=Array(u),h=0;h<u;h++)c[h]=arguments[h];return l=(s=(a=r5(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(c))),a),a.state={focus:!1},a.handleFocus=function(){return a.setState({focus:!0})},a.handleBlur=function(){return a.setState({focus:!1})},s),r5(a,l)}return CQ(i,[{key:"render",value:function(){return v.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},v.createElement(e,wQ({},this.props,this.state)))}}]),i}(v.Component)},i5=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},EQ=13,OQ=function(e){var n=e.color,r=e.style,i=e.onClick,o=i===void 0?function(){}:i,s=e.onHover,a=e.title,l=a===void 0?n:a,u=e.children,c=e.focus,h=e.focusStyle,f=h===void 0?{}:h,d=n==="transparent",p=Te({default:{swatch:i5({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,c?f:{})}}),g=function(k){return o(n,k)},m=function(k){return k.keyCode===EQ&&o(n,k)},b=function(k){return s(n,k)},x={};return s&&(x.onMouseOver=b),v.createElement("div",i5({style:p.swatch,onClick:g,title:l,tabIndex:0,onKeyDown:m},x),u,d&&v.createElement(ws,{borderRadius:p.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const mo=TQ(OQ);var MQ=function(e){var n=e.direction,r=Te({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return v.createElement("div",{style:r.picker})},AQ=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o5=function(e){var n=e.rgb,r=e.hsl,i=e.width,o=e.height,s=e.onChange,a=e.direction,l=e.style,u=e.renderers,c=e.pointer,h=e.className,f=h===void 0?"":h,d=Te({default:{picker:{position:"relative",width:i,height:o},alpha:{radius:"2px",style:l}}});return v.createElement("div",{style:d.picker,className:"alpha-picker "+f},v.createElement(fg,AQ({},d.alpha,{rgb:n,hsl:r,pointer:c,renderers:u,onChange:s,direction:a})))};o5.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:MQ},wn(o5);function s5(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var PQ="__lodash_hash_undefined__";function DQ(t){return this.__data__.set(t,PQ),this}function _Q(t){return this.__data__.has(t)}function Th(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Xr;++e<n;)this.add(t[e])}Th.prototype.add=Th.prototype.push=DQ,Th.prototype.has=_Q;function IQ(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function $Q(t,e){return t.has(e)}var FQ=1,LQ=2;function a5(t,e,n,r,i,o){var s=n&FQ,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,f=!0,d=n&LQ?new Th:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var p=t[h],g=e[h];if(r)var m=s?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(m!==void 0){if(m)continue;f=!1;break}if(d){if(!IQ(e,function(b,x){if(!$Q(d,x)&&(p===b||i(p,b,n,r,o)))return d.push(x)})){f=!1;break}}else if(!(p===g||i(p,g,n,r,o))){f=!1;break}}return o.delete(t),o.delete(e),f}function RQ(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function BQ(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var NQ=1,jQ=2,VQ="[object Boolean]",zQ="[object Date]",WQ="[object Error]",HQ="[object Map]",qQ="[object Number]",UQ="[object RegExp]",YQ="[object Set]",GQ="[object String]",KQ="[object Symbol]",XQ="[object ArrayBuffer]",ZQ="[object DataView]",l5=yi?yi.prototype:void 0,Mg=l5?l5.valueOf:void 0;function QQ(t,e,n,r,i,o,s){switch(n){case ZQ:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case XQ:return!(t.byteLength!=e.byteLength||!o(new vh(t),new vh(e)));case VQ:case zQ:case qQ:return kl(+t,+e);case WQ:return t.name==e.name&&t.message==e.message;case UQ:case GQ:return t==e+"";case HQ:var a=RQ;case YQ:var l=r&NQ;if(a||(a=BQ),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;r|=jQ,s.set(t,e);var c=a5(a(t),a(e),r,i,o,s);return s.delete(t),c;case KQ:if(Mg)return Mg.call(t)==Mg.call(e)}return!1}function JQ(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function eJ(t,e,n){var r=e(t);return Dn(t)?r:JQ(r,n(t))}function tJ(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function nJ(){return[]}var rJ=Object.prototype,iJ=rJ.propertyIsEnumerable,u5=Object.getOwnPropertySymbols,oJ=u5?function(t){return t==null?[]:(t=Object(t),tJ(u5(t),function(e){return iJ.call(t,e)}))}:nJ;const sJ=oJ;function c5(t){return eJ(t,kg,sJ)}var aJ=1,lJ=Object.prototype,uJ=lJ.hasOwnProperty;function cJ(t,e,n,r,i,o){var s=n&aJ,a=c5(t),l=a.length,u=c5(e),c=u.length;if(l!=c&&!s)return!1;for(var h=l;h--;){var f=a[h];if(!(s?f in e:uJ.call(e,f)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var g=!0;o.set(t,e),o.set(e,t);for(var m=s;++h<l;){f=a[h];var b=t[f],x=e[f];if(r)var C=s?r(x,b,f,e,t,o):r(b,x,f,t,e,o);if(!(C===void 0?b===x||i(b,x,n,r,o):C)){g=!1;break}m||(m=f=="constructor")}if(g&&!m){var k=t.constructor,w=e.constructor;k!=w&&"constructor"in t&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof w=="function"&&w instanceof w)&&(g=!1)}return o.delete(t),o.delete(e),g}var hJ=po(or,"DataView");const Ag=hJ;var fJ=po(or,"Promise");const Pg=fJ;var dJ=po(or,"Set");const Dg=dJ;var pJ=po(or,"WeakMap");const _g=pJ;var h5="[object Map]",gJ="[object Object]",f5="[object Promise]",d5="[object Set]",p5="[object WeakMap]",g5="[object DataView]",mJ=fo(Ag),vJ=fo(El),yJ=fo(Pg),bJ=fo(Dg),xJ=fo(_g),vo=ho;(Ag&&vo(new Ag(new ArrayBuffer(1)))!=g5||El&&vo(new El)!=h5||Pg&&vo(Pg.resolve())!=f5||Dg&&vo(new Dg)!=d5||_g&&vo(new _g)!=p5)&&(vo=function(t){var e=ho(t),n=e==gJ?t.constructor:void 0,r=n?fo(n):"";if(r)switch(r){case mJ:return g5;case vJ:return h5;case yJ:return f5;case bJ:return d5;case xJ:return p5}return e});const m5=vo;var wJ=1,v5="[object Arguments]",y5="[object Array]",Eh="[object Object]",CJ=Object.prototype,b5=CJ.hasOwnProperty;function SJ(t,e,n,r,i,o){var s=Dn(t),a=Dn(e),l=s?y5:m5(t),u=a?y5:m5(e);l=l==v5?Eh:l,u=u==v5?Eh:u;var c=l==Eh,h=u==Eh,f=l==u;if(f&&bh(t)){if(!bh(e))return!1;s=!0,c=!1}if(f&&!c)return o||(o=new xr),s||xg(t)?a5(t,e,n,r,i,o):QQ(t,e,l,n,r,i,o);if(!(n&wJ)){var d=c&&b5.call(t,"__wrapped__"),p=h&&b5.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,m=p?e.value():e;return o||(o=new xr),i(g,m,n,r,o)}}return f?(o||(o=new xr),cJ(t,e,n,r,i,o)):!1}function Ig(t,e,n,r,i){return t===e?!0:t==null||e==null||!bi(t)&&!bi(e)?t!==t&&e!==e:SJ(t,e,n,r,Ig,i)}var kJ=1,TJ=2;function EJ(t,e,n,r){var i=n.length,o=i,s=!r;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];var l=a[0],u=t[l],c=a[1];if(s&&a[2]){if(u===void 0&&!(l in t))return!1}else{var h=new xr;if(r)var f=r(u,c,l,t,e,h);if(!(f===void 0?Ig(c,u,kJ|TJ,r,h):f))return!1}}return!0}function x5(t){return t===t&&!Yn(t)}function OJ(t){for(var e=kg(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,x5(i)]}return e}function w5(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function MJ(t){var e=OJ(t);return e.length==1&&e[0][2]?w5(e[0][0],e[0][1]):function(n){return n===t||EJ(n,t,e)}}var AJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PJ=/^\w*$/;function $g(t,e){if(Dn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||wh(t)?!0:PJ.test(t)||!AJ.test(t)||e!=null&&t in Object(e)}var DJ="Expected a function";function Fg(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(DJ);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fg.Cache||Xr),n}Fg.Cache=Xr;var _J=500;function IJ(t){var e=Fg(t,function(r){return n.size===_J&&n.clear(),r}),n=e.cache;return e}var $J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,FJ=/\\(\\)?/g,LJ=IJ(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace($J,function(n,r,i,o){e.push(i?o.replace(FJ,"$1"):r||n)}),e});const RJ=LJ;var BJ=1/0,C5=yi?yi.prototype:void 0,S5=C5?C5.toString:void 0;function k5(t){if(typeof t=="string")return t;if(Dn(t))return s5(t,k5)+"";if(wh(t))return S5?S5.call(t):"";var e=t+"";return e=="0"&&1/t==-BJ?"-0":e}function NJ(t){return t==null?"":k5(t)}function T5(t,e){return Dn(t)?t:$g(t,e)?[t]:RJ(NJ(t))}var jJ=1/0;function Oh(t){if(typeof t=="string"||wh(t))return t;var e=t+"";return e=="0"&&1/t==-jJ?"-0":e}function E5(t,e){e=T5(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Oh(e[n++])];return n&&n==r?t:void 0}function VJ(t,e,n){var r=t==null?void 0:E5(t,e);return r===void 0?n:r}function zJ(t,e){return t!=null&&e in Object(t)}function WJ(t,e,n){e=T5(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var s=Oh(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:(i=t==null?0:t.length,!!i&&yg(i)&&Cg(s,i)&&(Dn(t)||yh(t)))}function HJ(t,e){return t!=null&&WJ(t,e,zJ)}var qJ=1,UJ=2;function YJ(t,e){return $g(t)&&x5(e)?w5(Oh(t),e):function(n){var r=VJ(n,t);return r===void 0&&r===e?HJ(n,t):Ig(e,r,qJ|UJ)}}function GJ(t){return function(e){return e==null?void 0:e[t]}}function KJ(t){return function(e){return E5(e,t)}}function XJ(t){return $g(t)?GJ(Oh(t)):KJ(t)}function ZJ(t){return typeof t=="function"?t:t==null?xh:typeof t=="object"?Dn(t)?YJ(t[0],t[1]):MJ(t):XJ(t)}function QJ(t,e){var n=-1,r=Ss(t)?Array(t.length):[];return YS(t,function(i,o,s){r[++n]=e(i,o,s)}),r}function yo(t,e){var n=Dn(t)?s5:QJ;return n(t,ZJ(e))}var JJ=function(e){var n=e.colors,r=e.onClick,i=e.onSwatchHover,o=Te({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return v.createElement("div",{style:o.swatches},yo(n,function(s){return v.createElement(mo,{key:s,color:s,style:o.swatch,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+s}})}),v.createElement("div",{style:o.clear}))},Lg=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.hex,o=e.colors,s=e.width,a=e.triangle,l=e.styles,u=l===void 0?{}:l,c=e.className,h=c===void 0?"":c,f=i==="transparent",d=function(m,b){xi(m)&&n({hex:m,source:"hex"},b)},p=Te(xn({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:i,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Eg(i),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+i+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},u),{"hide-triangle":a==="hide"});return v.createElement("div",{style:p.card,className:"block-picker "+h},v.createElement("div",{style:p.triangle}),v.createElement("div",{style:p.head},f&&v.createElement(ws,{borderRadius:"6px 6px 0 0"}),v.createElement("div",{style:p.label},i)),v.createElement("div",{style:p.body},v.createElement(JJ,{colors:o,onClick:d,onSwatchHover:r}),v.createElement(Re,{style:{input:p.input},value:i,onChange:d})))};Lg.propTypes={width:A.oneOfType([A.string,A.number]),colors:A.arrayOf(A.string),triangle:A.oneOf(["top","hide"]),styles:A.object},Lg.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},wn(Lg);var ks={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},Ts={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},Es={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},Os={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Ms={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},As={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Ps={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Ds={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},_s={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},$l={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Is={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},$s={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Fs={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Ls={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Rs={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Bs={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ns={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},js={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},O5=function(e){var n=e.color,r=e.onClick,i=e.onSwatchHover,o=e.hover,s=e.active,a=e.circleSize,l=e.circleSpacing,u=Te({default:{swatch:{width:a,height:a,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(a/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:o,active:s});return v.createElement("div",{style:u.swatch},v.createElement(mo,{style:u.Swatch,color:n,onClick:r,onHover:i,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+n}}))};O5.defaultProps={circleSize:28,circleSpacing:14};const eee=cg(O5);var Rg=function(e){var n=e.width,r=e.onChange,i=e.onSwatchHover,o=e.colors,s=e.hex,a=e.circleSize,l=e.styles,u=l===void 0?{}:l,c=e.circleSpacing,h=e.className,f=h===void 0?"":h,d=Te(xn({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-c,marginBottom:-c}}},u)),p=function(m,b){return r({hex:m,source:"hex"},b)};return v.createElement("div",{style:d.card,className:"circle-picker "+f},yo(o,function(g){return v.createElement(eee,{key:g,color:g,onClick:p,onSwatchHover:i,active:s===g.toLowerCase(),circleSize:a,circleSpacing:c})}))};Rg.propTypes={width:A.oneOfType([A.string,A.number]),circleSize:A.number,circleSpacing:A.number,styles:A.object},Rg.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[ks[500],Ts[500],Es[500],Os[500],Ms[500],As[500],Ps[500],Ds[500],_s[500],$l[500],Is[500],$s[500],Fs[500],Ls[500],Rs[500],Bs[500],Ns[500],js[500]],styles:{}},wn(Rg);function M5(t){return t===void 0}var A5={};Object.defineProperty(A5,"__esModule",{value:!0});var P5=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},tee=v,D5=nee(tee);function nee(t){return t&&t.__esModule?t:{default:t}}function ree(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var Mh=24,iee=A5.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,r=t.width,i=r===void 0?Mh:r,o=t.height,s=o===void 0?Mh:o,a=t.style,l=a===void 0?{}:a,u=ree(t,["fill","width","height","style"]);return D5.default.createElement("svg",P5({viewBox:"0 0 "+Mh+" "+Mh,style:P5({fill:n,width:i,height:s},l)},u),D5.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},oee=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function see(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aee(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function lee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _5=function(t){lee(e,t);function e(n){see(this,e);var r=aee(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(i,o){i.hex?xi(i.hex)&&r.props.onChange({hex:i.hex,source:"hex"},o):i.r||i.g||i.b?r.props.onChange({r:i.r||r.props.rgb.r,g:i.g||r.props.rgb.g,b:i.b||r.props.rgb.b,source:"rgb"},o):i.a?(i.a<0?i.a=0:i.a>1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},o)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(M5(i.s)?r.props.hsl.s:i.s),l:Number(M5(i.l)?r.props.hsl.l:i.l),source:"hsl"},o))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return oee(e,[{key:"render",value:function(){var r=this,i=Te({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=v.createElement("div",{style:i.fields,className:"flexbox-fix"},v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=v.createElement("div",{style:i.fields,className:"flexbox-fix"},v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),v.createElement("div",{style:i.alpha},v.createElement(Re,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=v.createElement("div",{style:i.fields,className:"flexbox-fix"},v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),v.createElement("div",{style:i.alpha},v.createElement(Re,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),v.createElement("div",{style:i.wrap,className:"flexbox-fix"},o,v.createElement("div",{style:i.toggle},v.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(a){return r.icon=a}},v.createElement(iee,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e}(v.Component);_5.defaultProps={view:"hex"};var I5=function(){var e=Te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return v.createElement("div",{style:e.picker})},uee=function(){var e=Te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return v.createElement("div",{style:e.picker})},Bg=function(e){var n=e.width,r=e.onChange,i=e.disableAlpha,o=e.rgb,s=e.hsl,a=e.hsv,l=e.hex,u=e.renderers,c=e.styles,h=c===void 0?{}:c,f=e.className,d=f===void 0?"":f,p=e.defaultView,g=Te(xn({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},h),{disableAlpha:i});return v.createElement("div",{style:g.picker,className:"chrome-picker "+d},v.createElement("div",{style:g.saturation},v.createElement(Ch,{style:g.Saturation,hsl:s,hsv:a,pointer:uee,onChange:r})),v.createElement("div",{style:g.body},v.createElement("div",{style:g.controls,className:"flexbox-fix"},v.createElement("div",{style:g.color},v.createElement("div",{style:g.swatch},v.createElement("div",{style:g.active}),v.createElement(ws,{renderers:u}))),v.createElement("div",{style:g.toggles},v.createElement("div",{style:g.hue},v.createElement(Cs,{style:g.Hue,hsl:s,pointer:I5,onChange:r})),v.createElement("div",{style:g.alpha},v.createElement(fg,{style:g.Alpha,rgb:o,hsl:s,pointer:I5,renderers:u,onChange:r})))),v.createElement(_5,{rgb:o,hsl:s,hex:l,view:p,onChange:r,disableAlpha:i})))};Bg.propTypes={width:A.oneOfType([A.string,A.number]),disableAlpha:A.bool,styles:A.object,defaultView:A.oneOf(["hex","rgb","hsl"])},Bg.defaultProps={width:225,disableAlpha:!1,styles:{}};const cee=wn(Bg);var hee=function(e){var n=e.color,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,s=e.active,a=Te({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Eg(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return v.createElement(mo,{style:a.color,color:n,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},v.createElement("div",{style:a.dot}))},fee=function(e){var n=e.hex,r=e.rgb,i=e.onChange,o=Te({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(l,u){l.r||l.g||l.b?i({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},u):i({hex:l.hex,source:"hex"},u)};return v.createElement("div",{style:o.fields,className:"flexbox-fix"},v.createElement("div",{style:o.active}),v.createElement(Re,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:n,onChange:s}),v.createElement(Re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:s}),v.createElement(Re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:s}),v.createElement(Re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:s}))},Ng=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.colors,o=e.hex,s=e.rgb,a=e.styles,l=a===void 0?{}:a,u=e.className,c=u===void 0?"":u,h=Te(xn({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),f=function(p,g){p.hex?xi(p.hex)&&n({hex:p.hex,source:"hex"},g):n(p,g)};return v.createElement(Al,{style:h.Compact,styles:l},v.createElement("div",{style:h.compact,className:"compact-picker "+c},v.createElement("div",null,yo(i,function(d){return v.createElement(hee,{key:d,color:d,active:d.toLowerCase()===o,onClick:f,onSwatchHover:r})}),v.createElement("div",{style:h.clear})),v.createElement(fee,{hex:o,rgb:s,onChange:f})))};Ng.propTypes={colors:A.arrayOf(A.string),styles:A.object},Ng.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},wn(Ng);var dee=function(e){var n=e.hover,r=e.color,i=e.onClick,o=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=Te({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:n});return v.createElement("div",{style:a.swatch},v.createElement(mo,{color:r,onClick:i,onHover:o,focusStyle:s}))};const pee=cg(dee);var jg=function(e){var n=e.width,r=e.colors,i=e.onChange,o=e.onSwatchHover,s=e.triangle,a=e.styles,l=a===void 0?{}:a,u=e.className,c=u===void 0?"":u,h=Te(xn({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right","bottom-left-triangle":s==="bottom-left","bottom-right-triangle":s==="bottom-right"}),f=function(p,g){return i({hex:p,source:"hex"},g)};return v.createElement("div",{style:h.card,className:"github-picker "+c},v.createElement("div",{style:h.triangleShadow}),v.createElement("div",{style:h.triangle}),yo(r,function(d){return v.createElement(pee,{color:d,key:d,onClick:f,onSwatchHover:o})}))};jg.propTypes={width:A.oneOfType([A.string,A.number]),colors:A.arrayOf(A.string),triangle:A.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:A.object},jg.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},wn(jg);var gee=function(e){var n=e.direction,r=Te({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return v.createElement("div",{style:r.picker})},mee=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vg=function(e){var n=e.width,r=e.height,i=e.onChange,o=e.hsl,s=e.direction,a=e.pointer,l=e.styles,u=l===void 0?{}:l,c=e.className,h=c===void 0?"":c,f=Te(xn({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},u)),d=function(g){return i({a:1,h:g.h,l:.5,s:1})};return v.createElement("div",{style:f.picker,className:"hue-picker "+h},v.createElement(Cs,mee({},f.hue,{hsl:o,pointer:a,onChange:d,direction:s})))};Vg.propTypes={styles:A.object},Vg.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:gee,styles:{}},wn(Vg);var vee=function(e){var n=e.onChange,r=e.hex,i=e.rgb,o=e.styles,s=o===void 0?{}:o,a=e.className,l=a===void 0?"":a,u=Te(xn({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),c=function(f,d){f.hex?xi(f.hex)&&n({hex:f.hex,source:"hex"},d):(f.r||f.g||f.b)&&n({r:f.r||i.r,g:f.g||i.g,b:f.b||i.b,source:"rgb"},d)};return v.createElement(Al,{styles:s},v.createElement("div",{style:u.material,className:"material-picker "+l},v.createElement(Re,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:r,onChange:c}),v.createElement("div",{style:u.split,className:"flexbox-fix"},v.createElement("div",{style:u.third},v.createElement(Re,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:i.r,onChange:c})),v.createElement("div",{style:u.third},v.createElement(Re,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:i.g,onChange:c})),v.createElement("div",{style:u.third},v.createElement(Re,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:i.b,onChange:c})))))};wn(vee);var yee=function(e){var n=e.onChange,r=e.rgb,i=e.hsv,o=e.hex,s=Te({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),a=function(u,c){u["#"]?xi(u["#"])&&n({hex:u["#"],source:"hex"},c):u.r||u.g||u.b?n({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,source:"rgb"},c):(u.h||u.s||u.v)&&n({h:u.h||i.h,s:u.s||i.s,v:u.v||i.v,source:"hsv"},c)};return v.createElement("div",{style:s.fields},v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(i.h),onChange:a}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(i.s*100),onChange:a}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(i.v*100),onChange:a}),v.createElement("div",{style:s.divider}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:r.r,onChange:a}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:r.g,onChange:a}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:r.b,onChange:a}),v.createElement("div",{style:s.divider}),v.createElement(Re,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:o.replace("#",""),onChange:a}),v.createElement("div",{style:s.fieldSymbols},v.createElement("div",{style:s.symbol},"°"),v.createElement("div",{style:s.symbol},"%"),v.createElement("div",{style:s.symbol},"%")))},bee=function(e){var n=e.hsl,r=Te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return v.createElement("div",{style:r.picker})},xee=function(){var e=Te({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return v.createElement("div",{style:e.pointer},v.createElement("div",{style:e.left},v.createElement("div",{style:e.leftInside})),v.createElement("div",{style:e.right},v.createElement("div",{style:e.rightInside})))},$5=function(e){var n=e.onClick,r=e.label,i=e.children,o=e.active,s=Te({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return v.createElement("div",{style:s.button,onClick:n},r||i)},wee=function(e){var n=e.rgb,r=e.currentColor,i=Te({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return v.createElement("div",null,v.createElement("div",{style:i.label},"new"),v.createElement("div",{style:i.swatches},v.createElement("div",{style:i.new}),v.createElement("div",{style:i.current})),v.createElement("div",{style:i.label},"current"))},Cee=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function See(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kee(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Tee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var zg=function(t){Tee(e,t);function e(n){See(this,e);var r=kee(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.state={currentColor:n.hex},r}return Cee(e,[{key:"render",value:function(){var r=this.props,i=r.styles,o=i===void 0?{}:i,s=r.className,a=s===void 0?"":s,l=Te(xn({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},o));return v.createElement("div",{style:l.picker,className:"photoshop-picker "+a},v.createElement("div",{style:l.head},this.props.header),v.createElement("div",{style:l.body,className:"flexbox-fix"},v.createElement("div",{style:l.saturation},v.createElement(Ch,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:bee,onChange:this.props.onChange})),v.createElement("div",{style:l.hue},v.createElement(Cs,{direction:"vertical",hsl:this.props.hsl,pointer:xee,onChange:this.props.onChange})),v.createElement("div",{style:l.controls},v.createElement("div",{style:l.top,className:"flexbox-fix"},v.createElement("div",{style:l.previews},v.createElement(wee,{rgb:this.props.rgb,currentColor:this.state.currentColor})),v.createElement("div",{style:l.actions},v.createElement($5,{label:"OK",onClick:this.props.onAccept,active:!0}),v.createElement($5,{label:"Cancel",onClick:this.props.onCancel}),v.createElement(yee,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e}(v.Component);zg.propTypes={header:A.string,styles:A.object},zg.defaultProps={header:"Color Picker",styles:{}},wn(zg);var Eee=function(e){var n=e.onChange,r=e.rgb,i=e.hsl,o=e.hex,s=e.disableAlpha,a=Te({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),l=function(c,h){c.hex?xi(c.hex)&&n({hex:c.hex,source:"hex"},h):c.r||c.g||c.b?n({r:c.r||r.r,g:c.g||r.g,b:c.b||r.b,a:r.a,source:"rgb"},h):c.a&&(c.a<0?c.a=0:c.a>100&&(c.a=100),c.a/=100,n({h:i.h,s:i.s,l:i.l,a:c.a,source:"rgb"},h))};return v.createElement("div",{style:a.fields,className:"flexbox-fix"},v.createElement("div",{style:a.double},v.createElement(Re,{style:{input:a.input,label:a.label},label:"hex",value:o.replace("#",""),onChange:l})),v.createElement("div",{style:a.single},v.createElement(Re,{style:{input:a.input,label:a.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),v.createElement("div",{style:a.single},v.createElement(Re,{style:{input:a.input,label:a.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),v.createElement("div",{style:a.single},v.createElement(Re,{style:{input:a.input,label:a.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),v.createElement("div",{style:a.alpha},v.createElement(Re,{style:{input:a.input,label:a.label},label:"a",value:Math.round(r.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},Oee=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},F5=function(e){var n=e.colors,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,s=Te({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),a=function(u,c){i({hex:u,source:"hex"},c)};return v.createElement("div",{style:s.colors,className:"flexbox-fix"},n.map(function(l){var u=typeof l=="string"?{color:l}:l,c=""+u.color+(u.title||"");return v.createElement("div",{key:c,style:s.swatchWrap},v.createElement(mo,Oee({},u,{style:s.swatch,onClick:a,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+u.color}})))}))};F5.propTypes={colors:A.arrayOf(A.oneOfType([A.string,A.shape({color:A.string,title:A.string})])).isRequired};var Mee=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wg=function(e){var n=e.width,r=e.rgb,i=e.hex,o=e.hsv,s=e.hsl,a=e.onChange,l=e.onSwatchHover,u=e.disableAlpha,c=e.presetColors,h=e.renderers,f=e.styles,d=f===void 0?{}:f,p=e.className,g=p===void 0?"":p,m=Te(xn({default:Mee({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},d),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},d),{disableAlpha:u});return v.createElement("div",{style:m.picker,className:"sketch-picker "+g},v.createElement("div",{style:m.saturation},v.createElement(Ch,{style:m.Saturation,hsl:s,hsv:o,onChange:a})),v.createElement("div",{style:m.controls,className:"flexbox-fix"},v.createElement("div",{style:m.sliders},v.createElement("div",{style:m.hue},v.createElement(Cs,{style:m.Hue,hsl:s,onChange:a})),v.createElement("div",{style:m.alpha},v.createElement(fg,{style:m.Alpha,rgb:r,hsl:s,renderers:h,onChange:a}))),v.createElement("div",{style:m.color},v.createElement(ws,null),v.createElement("div",{style:m.activeColor}))),v.createElement(Eee,{rgb:r,hsl:s,hex:i,onChange:a,disableAlpha:u}),v.createElement(F5,{colors:c,onClick:a,onSwatchHover:l}))};Wg.propTypes={disableAlpha:A.bool,width:A.oneOfType([A.string,A.number]),styles:A.object},Wg.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},wn(Wg);var Fl=function(e){var n=e.hsl,r=e.offset,i=e.onClick,o=i===void 0?function(){}:i,s=e.active,a=e.first,l=e.last,u=Te({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:a,last:l}),c=function(f){return o({h:n.h,s:.5,l:r,source:"hsl"},f)};return v.createElement("div",{style:u.swatch,onClick:c})},Aee=function(e){var n=e.onClick,r=e.hsl,i=Te({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),o=.1;return v.createElement("div",{style:i.swatches},v.createElement("div",{style:i.swatch},v.createElement(Fl,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<o&&Math.abs(r.s-.5)<o,onClick:n,first:!0})),v.createElement("div",{style:i.swatch},v.createElement(Fl,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<o&&Math.abs(r.s-.5)<o,onClick:n})),v.createElement("div",{style:i.swatch},v.createElement(Fl,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<o&&Math.abs(r.s-.5)<o,onClick:n})),v.createElement("div",{style:i.swatch},v.createElement(Fl,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<o&&Math.abs(r.s-.5)<o,onClick:n})),v.createElement("div",{style:i.swatch},v.createElement(Fl,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<o&&Math.abs(r.s-.5)<o,onClick:n,last:!0})),v.createElement("div",{style:i.clear}))},Pee=function(){var e=Te({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return v.createElement("div",{style:e.picker})},Hg=function(e){var n=e.hsl,r=e.onChange,i=e.pointer,o=e.styles,s=o===void 0?{}:o,a=e.className,l=a===void 0?"":a,u=Te(xn({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return v.createElement("div",{style:u.wrap||{},className:"slider-picker "+l},v.createElement("div",{style:u.hue},v.createElement(Cs,{style:u.Hue,hsl:n,pointer:i,onChange:r})),v.createElement("div",{style:u.swatches},v.createElement(Aee,{hsl:n,onClick:r})))};Hg.propTypes={styles:A.object},Hg.defaultProps={pointer:Pee,styles:{}},wn(Hg);var L5={};Object.defineProperty(L5,"__esModule",{value:!0});var R5=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Dee=v,B5=_ee(Dee);function _ee(t){return t&&t.__esModule?t:{default:t}}function Iee(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var Ah=24,$ee=L5.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,r=t.width,i=r===void 0?Ah:r,o=t.height,s=o===void 0?Ah:o,a=t.style,l=a===void 0?{}:a,u=Iee(t,["fill","width","height","style"]);return B5.default.createElement("svg",R5({viewBox:"0 0 "+Ah+" "+Ah,style:R5({fill:n,width:i,height:s},l)},u),B5.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},Fee=function(e){var n=e.color,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,s=e.first,a=e.last,l=e.active,u=Te({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Eg(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:a,active:l,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return v.createElement(mo,{color:n,style:u.color,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},v.createElement("div",{style:u.check},v.createElement($ee,null)))},Lee=function(e){var n=e.onClick,r=e.onSwatchHover,i=e.group,o=e.active,s=Te({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return v.createElement("div",{style:s.group},yo(i,function(a,l){return v.createElement(Fee,{key:a,color:a,active:a.toLowerCase()===o,first:l===0,last:l===i.length-1,onClick:n,onSwatchHover:r})}))},qg=function(e){var n=e.width,r=e.height,i=e.onChange,o=e.onSwatchHover,s=e.colors,a=e.hex,l=e.styles,u=l===void 0?{}:l,c=e.className,h=c===void 0?"":c,f=Te(xn({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),d=function(g,m){return i({hex:g,source:"hex"},m)};return v.createElement("div",{style:f.picker,className:"swatches-picker "+h},v.createElement(Al,null,v.createElement("div",{style:f.overflow},v.createElement("div",{style:f.body},yo(s,function(p){return v.createElement(Lee,{key:p.toString(),group:p,active:a,onClick:d,onSwatchHover:o})}),v.createElement("div",{style:f.clear})))))};qg.propTypes={width:A.oneOfType([A.string,A.number]),height:A.oneOfType([A.string,A.number]),colors:A.arrayOf(A.arrayOf(A.string)),styles:A.object},qg.defaultProps={width:320,height:240,colors:[[ks[900],ks[700],ks[500],ks[300],ks[100]],[Ts[900],Ts[700],Ts[500],Ts[300],Ts[100]],[Es[900],Es[700],Es[500],Es[300],Es[100]],[Os[900],Os[700],Os[500],Os[300],Os[100]],[Ms[900],Ms[700],Ms[500],Ms[300],Ms[100]],[As[900],As[700],As[500],As[300],As[100]],[Ps[900],Ps[700],Ps[500],Ps[300],Ps[100]],[Ds[900],Ds[700],Ds[500],Ds[300],Ds[100]],[_s[900],_s[700],_s[500],_s[300],_s[100]],["#194D33",$l[700],$l[500],$l[300],$l[100]],[Is[900],Is[700],Is[500],Is[300],Is[100]],[$s[900],$s[700],$s[500],$s[300],$s[100]],[Fs[900],Fs[700],Fs[500],Fs[300],Fs[100]],[Ls[900],Ls[700],Ls[500],Ls[300],Ls[100]],[Rs[900],Rs[700],Rs[500],Rs[300],Rs[100]],[Bs[900],Bs[700],Bs[500],Bs[300],Bs[100]],[Ns[900],Ns[700],Ns[500],Ns[300],Ns[100]],[js[900],js[700],js[500],js[300],js[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},wn(qg);var Ug=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.hex,o=e.colors,s=e.width,a=e.triangle,l=e.styles,u=l===void 0?{}:l,c=e.className,h=c===void 0?"":c,f=Te(xn({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right"}),d=function(g,m){xi(g)&&n({hex:g,source:"hex"},m)};return v.createElement("div",{style:f.card,className:"twitter-picker "+h},v.createElement("div",{style:f.triangleShadow}),v.createElement("div",{style:f.triangle}),v.createElement("div",{style:f.body},yo(o,function(p,g){return v.createElement(mo,{key:g,color:p,hex:p,style:f.swatch,onClick:d,onHover:r,focusStyle:{boxShadow:"0 0 4px "+p}})}),v.createElement("div",{style:f.hash},"#"),v.createElement(Re,{label:null,style:{input:f.input},value:i.replace("#",""),onChange:d}),v.createElement("div",{style:f.clear})))};Ug.propTypes={width:A.oneOfType([A.string,A.number]),triangle:A.oneOf(["hide","top-left","top-right"]),colors:A.arrayOf(A.string),styles:A.object},Ug.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},wn(Ug);var Yg=function(e){var n=Te({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return v.createElement("div",{style:n.picker})};Yg.propTypes={hsl:A.shape({h:A.number,s:A.number,l:A.number,a:A.number})},Yg.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Gg=function(e){var n=Te({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return v.createElement("div",{style:n.picker})};Gg.propTypes={hsl:A.shape({h:A.number,s:A.number,l:A.number,a:A.number})},Gg.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Ree=function(e){var n=e.onChange,r=e.rgb,i=e.hsl,o=e.hex,s=e.hsv,a=function(d,p){if(d.hex)xi(d.hex)&&n({hex:d.hex,source:"hex"},p);else if(d.rgb){var g=d.rgb.split(",");Og(d.rgb,"rgb")&&n({r:g[0],g:g[1],b:g[2],a:1,source:"rgb"},p)}else if(d.hsv){var m=d.hsv.split(",");Og(d.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),n({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},p))}else if(d.hsl){var b=d.hsl.split(",");Og(d.hsl,"hsl")&&(b[2]=b[2].replace("%",""),b[1]=b[1].replace("%",""),b[0]=b[0].replace("°",""),h[1]==1?h[1]=.01:h[2]==1&&(h[2]=.01),n({h:Number(b[0]),s:Number(b[1]),v:Number(b[2]),source:"hsl"},p))}},l=Te({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=r.r+", "+r.g+", "+r.b,c=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",h=Math.round(s.h)+"°, "+Math.round(s.s*100)+"%, "+Math.round(s.v*100)+"%";return v.createElement("div",{style:l.wrap,className:"flexbox-fix"},v.createElement("div",{style:l.fields},v.createElement("div",{style:l.double},v.createElement(Re,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:a})),v.createElement("div",{style:l.column},v.createElement("div",{style:l.single},v.createElement(Re,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:a})),v.createElement("div",{style:l.single},v.createElement(Re,{style:{input:l.input2,label:l.label2},label:"hsv",value:h,onChange:a})),v.createElement("div",{style:l.single},v.createElement(Re,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:a})))))},Kg=function(e){var n=e.width,r=e.onChange,i=e.rgb,o=e.hsl,s=e.hsv,a=e.hex,l=e.header,u=e.styles,c=u===void 0?{}:u,h=e.className,f=h===void 0?"":h,d=Te(xn({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+i.r+", "+i.g+", "+i.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return v.createElement("div",{style:d.picker,className:"google-picker "+f},v.createElement("div",{style:d.head},l),v.createElement("div",{style:d.swatch}),v.createElement("div",{style:d.saturation},v.createElement(Ch,{hsl:o,hsv:s,pointer:Yg,onChange:r})),v.createElement("div",{style:d.body},v.createElement("div",{style:d.controls,className:"flexbox-fix"},v.createElement("div",{style:d.hue},v.createElement(Cs,{style:d.Hue,hsl:o,radius:"4px",pointer:Gg,onChange:r}))),v.createElement(Ree,{rgb:i,hsl:o,hex:a,hsv:s,onChange:r})))};Kg.propTypes={width:A.oneOfType([A.string,A.number]),styles:A.object,header:A.string},Kg.defaultProps={width:652,styles:{},header:"Color picker"},wn(Kg);const N5=({value:t,onChangeColor:e,tabIndex:n,...r})=>{const i=t?"#"+t.replaceAll("#",""):"",[o,s]=v.useState(null),a=c=>{s(c.currentTarget)},l=()=>s(null),u=(c="")=>{(/^#[0-9a-fA-F]*$/.test(c)||c===""||c==="#")&&e("#"+c.replaceAll("#",""))};return y.jsxs(y.Fragment,{children:[y.jsx(O.TextField,{...r,value:i,onChange:c=>u(c.target.value),InputProps:{inputProps:{...r.inputProps,maxLength:7,tabIndex:n},startAdornment:y.jsx(O.InputAdornment,{position:"start",sx:{ml:2},children:y.jsx(O.IconButton,{edge:"start","aria-label":"Escolher cor",onClick:a,children:y.jsx(bt,{icon:"bi:square-fill",color:i,width:25,height:23})})})}}),y.jsx(O.Popover,{open:!!o,anchorEl:o,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"center",horizontal:"center"},slotProps:{paper:{style:{borderRadius:8}}},children:y.jsx(cee,{color:i,onChange:c=>e(c.hex),styles:{default:{picker:{fontFamily:"inherit",boxShadow:"none"}}},disableAlpha:!0})})]})};function ze(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Qr(t){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qr(t)}function G(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function K(t){G(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||Qr(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Xg(t,e){G(2,arguments);var n=K(t),r=ze(e);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function Ph(t,e){G(2,arguments);var n=K(t).getTime(),r=ze(e);return new Date(n+r)}function Bee(t,e){G(2,arguments);var n=ze(e);return Ph(t,n*1e3)}var Nee=6e4;function jee(t,e){G(2,arguments);var n=ze(e);return Ph(t,n*Nee)}var Vee=36e5;function zee(t,e){G(2,arguments);var n=ze(e);return Ph(t,n*Vee)}function Wee(t,e){G(2,arguments);var n=ze(e),r=n*7;return Xg(t,r)}function Dh(t,e){G(2,arguments);var n=K(t),r=ze(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function j5(t,e){G(2,arguments);var n=ze(e);return Dh(t,n*12)}function Hee(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getFullYear()-r.getFullYear()}function Vs(t,e){G(2,arguments);var n=K(t),r=K(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function qee(t,e){G(2,arguments);var n=K(t),r=K(e),i=Vs(n,r),o=Math.abs(Hee(n,r));n.setFullYear(1584),r.setFullYear(1584);var s=Vs(n,r)===-i,a=i*(o-Number(s));return a===0?0:a}function Uee(t,e){G(2,arguments);var n=K(t),r=K(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Zg(t){G(1,arguments);var e=K(t);return e.setHours(23,59,59,999),e}function Qg(t){G(1,arguments);var e=K(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function Yee(t){G(1,arguments);var e=K(t);return Zg(e).getTime()===Qg(e).getTime()}function Jg(t,e){G(2,arguments);var n=K(t),r=K(e),i=Vs(n,r),o=Math.abs(Uee(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=Vs(n,r)===-i;Yee(K(t))&&o===1&&Vs(t,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}var V5={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},Gee="trunc";function Ll(t){return t?V5[t]:V5[Gee]}function Kee(t,e,n){G(2,arguments);var r=Jg(t,e)/3;return Ll(n==null?void 0:n.roundingMethod)(r)}function zs(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function Ws(t){G(1,arguments);var e=K(t);return e.setHours(0,0,0,0),e}var Xee=864e5;function Zee(t,e){G(2,arguments);var n=Ws(t),r=Ws(e),i=n.getTime()-zs(n),o=r.getTime()-zs(r);return Math.round((i-o)/Xee)}function z5(t,e){var n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function W5(t,e){G(2,arguments);var n=K(t),r=K(e),i=z5(n,r),o=Math.abs(Zee(n,r));n.setDate(n.getDate()-i*o);var s=+(z5(n,r)===-i),a=i*(o-s);return a===0?0:a}function Qee(t,e,n){G(2,arguments);var r=W5(t,e)/7;return Ll(n==null?void 0:n.roundingMethod)(r)}var _h=6e4,Ih=36e5,Jee=1e3;function $h(t,e){return G(2,arguments),K(t).getTime()-K(e).getTime()}function ete(t,e,n){G(2,arguments);var r=$h(t,e)/Ih;return Ll(n==null?void 0:n.roundingMethod)(r)}function tte(t,e,n){G(2,arguments);var r=$h(t,e)/_h;return Ll(n==null?void 0:n.roundingMethod)(r)}function H5(t,e,n){G(2,arguments);var r=$h(t,e)/1e3;return Ll(n==null?void 0:n.roundingMethod)(r)}function nte(t,e){var n;G(1,arguments);var r=t||{},i=K(r.start),o=K(r.end),s=o.getTime();if(!(i.getTime()<=s))throw new RangeError("Invalid interval");var a=[],l=i;l.setHours(0,0,0,0);var u=Number((n=e==null?void 0:e.step)!==null&&n!==void 0?n:1);if(u<1||isNaN(u))throw new RangeError("`options.step` must be a number greater than 1");for(;l.getTime()<=s;)a.push(K(l)),l.setDate(l.getDate()+u),l.setHours(0,0,0,0);return a}var rte={};function lr(){return rte}function em(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=lr(),h=ze((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=K(t),d=f.getDay(),p=(d<h?-7:0)+6-(d-h);return f.setDate(f.getDate()+p),f.setHours(23,59,59,999),f}function tm(t){G(1,arguments);var e=K(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function ite(t){return G(1,arguments),t instanceof Date||Qr(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function nm(t){if(G(1,arguments),!ite(t)&&typeof t!="number")return!1;var e=K(t);return!isNaN(Number(e))}function q5(t,e){G(2,arguments);var n=ze(e);return Ph(t,-n)}var ote=864e5;function ste(t){G(1,arguments);var e=K(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/ote)+1}function Hs(t){G(1,arguments);var e=1,n=K(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function U5(t){G(1,arguments);var e=K(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Hs(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var s=Hs(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=s.getTime()?n:n-1}function ate(t){G(1,arguments);var e=U5(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Hs(n);return r}var lte=6048e5;function Y5(t){G(1,arguments);var e=K(t),n=Hs(e).getTime()-ate(e).getTime();return Math.round(n/lte)+1}function bo(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=lr(),h=ze((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=K(t),d=f.getUTCDay(),p=(d<h?7:0)+d-h;return f.setUTCDate(f.getUTCDate()-p),f.setUTCHours(0,0,0,0),f}function rm(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=K(t),h=c.getUTCFullYear(),f=lr(),d=ze((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(h+1,0,d),p.setUTCHours(0,0,0,0);var g=bo(p,e),m=new Date(0);m.setUTCFullYear(h,0,d),m.setUTCHours(0,0,0,0);var b=bo(m,e);return c.getTime()>=g.getTime()?h+1:c.getTime()>=b.getTime()?h:h-1}function ute(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=lr(),h=ze((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),f=rm(t,e),d=new Date(0);d.setUTCFullYear(f,0,h),d.setUTCHours(0,0,0,0);var p=bo(d,e);return p}var cte=6048e5;function G5(t,e){G(1,arguments);var n=K(t),r=bo(n,e).getTime()-ute(n,e).getTime();return Math.round(r/cte)+1}function Ie(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var hte={y:function(e,n){var r=e.getUTCFullYear(),i=r>0?r:1-r;return Ie(n==="yy"?i%100:i,n.length)},M:function(e,n){var r=e.getUTCMonth();return n==="M"?String(r+1):Ie(r+1,2)},d:function(e,n){return Ie(e.getUTCDate(),n.length)},a:function(e,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,n){return Ie(e.getUTCHours()%12||12,n.length)},H:function(e,n){return Ie(e.getUTCHours(),n.length)},m:function(e,n){return Ie(e.getUTCMinutes(),n.length)},s:function(e,n){return Ie(e.getUTCSeconds(),n.length)},S:function(e,n){var r=n.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return Ie(o,n.length)}};const wi=hte;var qs={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},fte={G:function(e,n,r){var i=e.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(e,n,r){if(n==="yo"){var i=e.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return wi.y(e,n)},Y:function(e,n,r,i){var o=rm(e,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return Ie(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):Ie(s,n.length)},R:function(e,n){var r=U5(e);return Ie(r,n.length)},u:function(e,n){var r=e.getUTCFullYear();return Ie(r,n.length)},Q:function(e,n,r){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return Ie(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,n,r){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return Ie(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,n,r){var i=e.getUTCMonth();switch(n){case"M":case"MM":return wi.M(e,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(e,n,r){var i=e.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return Ie(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(e,n,r,i){var o=G5(e,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):Ie(o,n.length)},I:function(e,n,r){var i=Y5(e);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):Ie(i,n.length)},d:function(e,n,r){return n==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):wi.d(e,n)},D:function(e,n,r){var i=ste(e);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):Ie(i,n.length)},E:function(e,n,r){var i=e.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(e,n,r,i){var o=e.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return Ie(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,n,r,i){var o=e.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return Ie(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,n,r){var i=e.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return Ie(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(e,n,r){var i=e.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,n,r){var i=e.getUTCHours(),o;switch(i===12?o=qs.noon:i===0?o=qs.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,n,r){var i=e.getUTCHours(),o;switch(i>=17?o=qs.evening:i>=12?o=qs.afternoon:i>=4?o=qs.morning:o=qs.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,n,r){if(n==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return wi.h(e,n)},H:function(e,n,r){return n==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):wi.H(e,n)},K:function(e,n,r){var i=e.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):Ie(i,n.length)},k:function(e,n,r){var i=e.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):Ie(i,n.length)},m:function(e,n,r){return n==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):wi.m(e,n)},s:function(e,n,r){return n==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):wi.s(e,n)},S:function(e,n){return wi.S(e,n)},X:function(e,n,r,i){var o=i._originalDate||e,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return X5(s);case"XXXX":case"XX":return xo(s);case"XXXXX":case"XXX":default:return xo(s,":")}},x:function(e,n,r,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(n){case"x":return X5(s);case"xxxx":case"xx":return xo(s);case"xxxxx":case"xxx":default:return xo(s,":")}},O:function(e,n,r,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+K5(s,":");case"OOOO":default:return"GMT"+xo(s,":")}},z:function(e,n,r,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+K5(s,":");case"zzzz":default:return"GMT"+xo(s,":")}},t:function(e,n,r,i){var o=i._originalDate||e,s=Math.floor(o.getTime()/1e3);return Ie(s,n.length)},T:function(e,n,r,i){var o=i._originalDate||e,s=o.getTime();return Ie(s,n.length)}};function K5(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=e||"";return n+String(i)+s+Ie(o,2)}function X5(t,e){if(t%60===0){var n=t>0?"-":"+";return n+Ie(Math.abs(t)/60,2)}return xo(t,e)}function xo(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t),o=Ie(Math.floor(i/60),2),s=Ie(i%60,2);return r+o+n+s}const dte=fte;var Z5=function(e,n){switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Q5=function(e,n){switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},pte=function(e,n){var r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return Z5(e,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Z5(i,n)).replace("{{time}}",Q5(o,n))},gte={p:Q5,P:pte};const im=gte;var mte=["D","DD"],vte=["YY","YYYY"];function J5(t){return mte.indexOf(t)!==-1}function ek(t){return vte.indexOf(t)!==-1}function Fh(t,e,n){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var yte={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bte=function(e,n,r){var i,o=yte[e];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const xte=bte;function Us(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var wte={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Cte={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ste={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kte={date:Us({formats:wte,defaultWidth:"full"}),time:Us({formats:Cte,defaultWidth:"full"}),dateTime:Us({formats:Ste,defaultWidth:"full"})};const Tte=kte;var Ete={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ote=function(e,n,r,i){return Ete[e]};const Mte=Ote;function wr(t){return function(e,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var a=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[a]}var u=t.argumentCallback?t.argumentCallback(e):e;return i[u]}}var Ate={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pte={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Dte={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_te={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ite={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$te={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Fte=function(e,n){var r=Number(e),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Lte={ordinalNumber:Fte,era:wr({values:Ate,defaultWidth:"wide"}),quarter:wr({values:Pte,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:wr({values:Dte,defaultWidth:"wide"}),day:wr({values:_te,defaultWidth:"wide"}),dayPeriod:wr({values:Ite,defaultWidth:"wide",formattingValues:$te,defaultFormattingWidth:"wide"})};const Rte=Lte;function Cr(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;var s=o[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?Nte(a,function(h){return h.test(s)}):Bte(a,function(h){return h.test(s)}),u;u=t.valueCallback?t.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;var c=e.slice(s.length);return{value:u,rest:c}}}function Bte(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function Nte(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}function tk(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var i=r[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=e.slice(i.length);return{value:s,rest:a}}}var jte=/^(\d+)(th|st|nd|rd)?/i,Vte=/\d+/i,zte={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Wte={any:[/^b/i,/^(a|c)/i]},Hte={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qte={any:[/1/i,/2/i,/3/i,/4/i]},Ute={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Yte={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gte={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Kte={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xte={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Zte={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Qte={ordinalNumber:tk({matchPattern:jte,parsePattern:Vte,valueCallback:function(e){return parseInt(e,10)}}),era:Cr({matchPatterns:zte,defaultMatchWidth:"wide",parsePatterns:Wte,defaultParseWidth:"any"}),quarter:Cr({matchPatterns:Hte,defaultMatchWidth:"wide",parsePatterns:qte,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Cr({matchPatterns:Ute,defaultMatchWidth:"wide",parsePatterns:Yte,defaultParseWidth:"any"}),day:Cr({matchPatterns:Gte,defaultMatchWidth:"wide",parsePatterns:Kte,defaultParseWidth:"any"}),dayPeriod:Cr({matchPatterns:Xte,defaultMatchWidth:"any",parsePatterns:Zte,defaultParseWidth:"any"})},Jte={code:"en-US",formatDistance:xte,formatLong:Tte,formatRelative:Mte,localize:Rte,match:Qte,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Lh=Jte;var ene=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tne=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nne=/^'([^]*?)'?$/,rne=/''/g,ine=/[a-zA-Z]/;function om(t,e,n){var r,i,o,s,a,l,u,c,h,f,d,p,g,m,b,x,C,k;G(2,arguments);var w=String(e),T=lr(),S=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:T.locale)!==null&&r!==void 0?r:Lh,M=ze((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:T.firstWeekContainsDate)!==null&&s!==void 0?s:(h=T.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=ze((d=(p=(g=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(b=n.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&g!==void 0?g:T.weekStartsOn)!==null&&p!==void 0?p:(C=T.locale)===null||C===void 0||(k=C.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&d!==void 0?d:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var D=K(t);if(!nm(D))throw new RangeError("Invalid time value");var R=zs(D),H=q5(D,R),W={firstWeekContainsDate:M,weekStartsOn:P,locale:S,_originalDate:D},B=w.match(tne).map(function(j){var N=j[0];if(N==="p"||N==="P"){var V=im[N];return V(j,S.formatLong)}return j}).join("").match(ene).map(function(j){if(j==="''")return"'";var N=j[0];if(N==="'")return one(j);var V=dte[N];if(V)return!(n!=null&&n.useAdditionalWeekYearTokens)&&ek(j)&&Fh(j,e,String(t)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&J5(j)&&Fh(j,e,String(t)),V(H,j,S.localize,W);if(N.match(ine))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return j}).join("");return B}function one(t){var e=t.match(nne);return e?e[1].replace(rne,"'"):t}function sne(t){G(1,arguments);var e=K(t),n=e.getDate();return n}function nk(t){G(1,arguments);var e=K(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function ane(t){G(1,arguments);var e=K(t),n=e.getHours();return n}function lne(t){G(1,arguments);var e=K(t),n=e.getMinutes();return n}function une(t){G(1,arguments);var e=K(t),n=e.getMonth();return n}function cne(t){G(1,arguments);var e=K(t),n=e.getSeconds();return n}function hne(t){G(1,arguments);var e=K(t),n=e.getMilliseconds();return n}function wo(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=lr(),h=ze((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=K(t),d=f.getDay(),p=(d<h?7:0)+d-h;return f.setDate(f.getDate()-p),f.setHours(0,0,0,0),f}function fne(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=K(t),h=c.getFullYear(),f=lr(),d=ze((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(h+1,0,d),p.setHours(0,0,0,0);var g=wo(p,e),m=new Date(0);m.setFullYear(h,0,d),m.setHours(0,0,0,0);var b=wo(m,e);return c.getTime()>=g.getTime()?h+1:c.getTime()>=b.getTime()?h:h-1}function dne(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=lr(),h=ze((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),f=fne(t,e),d=new Date(0);d.setFullYear(f,0,h),d.setHours(0,0,0,0);var p=wo(d,e);return p}var pne=6048e5;function gne(t,e){G(1,arguments);var n=K(t),r=wo(n,e).getTime()-dne(n,e).getTime();return Math.round(r/pne)+1}function mne(t){return G(1,arguments),K(t).getFullYear()}function sm(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getTime()>r.getTime()}function Rl(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getTime()<r.getTime()}function vne(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getTime()===r.getTime()}function yne(t,e){G(2,arguments);var n=Ws(t),r=Ws(e);return n.getTime()===r.getTime()}function bne(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getFullYear()===r.getFullYear()}function xne(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function rk(t){G(1,arguments);var e=K(t);return e.setMinutes(0,0,0),e}function wne(t,e){G(2,arguments);var n=rk(t),r=rk(e);return n.getTime()===r.getTime()}function ik(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Cne(t,e){if(t){if(typeof t=="string")return ik(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ik(t,e)}}function ok(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Cne(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
136
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function am(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function We(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xc(t,e)}function Rh(t){return Rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rh(t)}function Sne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kne(t,e){if(e&&(Qr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(t)}function He(t){var e=Sne();return function(){var r=Rh(t),i;if(e){var o=Rh(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return kne(this,i)}}function Be(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tne(t,e){if(Qr(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Qr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sk(t){var e=Tne(t,"string");return Qr(e)==="symbol"?e:String(e)}function ak(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,sk(r.key),r)}}function Ne(t,e,n){return e&&ak(t.prototype,e),n&&ak(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function te(t,e,n){return e=sk(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ene=10,lk=function(){function t(){Be(this,t),te(this,"priority",void 0),te(this,"subPriority",0)}return Ne(t,[{key:"validate",value:function(n,r){return!0}}]),t}(),One=function(t){We(n,t);var e=He(n);function n(r,i,o,s,a){var l;return Be(this,n),l=e.call(this),l.value=r,l.validateValue=i,l.setValue=o,l.priority=s,a&&(l.subPriority=a),l}return Ne(n,[{key:"validate",value:function(i,o){return this.validateValue(i,this.value,o)}},{key:"set",value:function(i,o,s){return this.setValue(i,o,this.value,s)}}]),n}(lk),Mne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",Ene),te(ie(r),"subPriority",-1),r}return Ne(n,[{key:"set",value:function(i,o){if(o.timestampIsSet)return i;var s=new Date(0);return s.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),s.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),s}}]),n}(lk),Ye=function(){function t(){Be(this,t),te(this,"incompatibleTokens",void 0),te(this,"priority",void 0),te(this,"subPriority",void 0)}return Ne(t,[{key:"run",value:function(n,r,i,o){var s=this.parse(n,r,i,o);return s?{setter:new One(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(n,r,i){return!0}}]),t}(),Ane=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",140),te(ie(r),"incompatibleTokens",["R","u","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"});case"GGGGG":return s.era(i,{width:"narrow"});case"GGGG":default:return s.era(i,{width:"wide"})||s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"})}}},{key:"set",value:function(i,o,s){return o.era=s,i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),Ft={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Sr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Lt(t,e){return t&&{value:e(t.value),rest:t.rest}}function St(t,e){var n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function kr(t,e){var n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};var r=n[1]==="+"?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(i*Ih+o*_h+s*Jee),rest:e.slice(n[0].length)}}function uk(t){return St(Ft.anyDigitsSigned,t)}function Dt(t,e){switch(t){case 1:return St(Ft.singleDigit,e);case 2:return St(Ft.twoDigits,e);case 3:return St(Ft.threeDigits,e);case 4:return St(Ft.fourDigits,e);default:return St(new RegExp("^\\d{1,"+t+"}"),e)}}function Bh(t,e){switch(t){case 1:return St(Ft.singleDigitSigned,e);case 2:return St(Ft.twoDigitsSigned,e);case 3:return St(Ft.threeDigitsSigned,e);case 4:return St(Ft.fourDigitsSigned,e);default:return St(new RegExp("^-?\\d{1,"+t+"}"),e)}}function lm(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ck(t,e){var n=e>0,r=n?e:1-e,i;if(r<=50)i=t||100;else{var o=r+50,s=Math.floor(o/100)*100,a=t>=o%100;i=t+s-(a?100:0)}return n?i:1-i}function hk(t){return t%400===0||t%4===0&&t%100!==0}var Pne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",130),te(ie(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return{year:u,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Lt(Dt(4,i),a);case"yo":return Lt(s.ordinalNumber(i,{unit:"year"}),a);default:return Lt(Dt(o.length,i),a)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=ck(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var u=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(u,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),Dne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",130),te(ie(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return{year:u,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Lt(Dt(4,i),a);case"Yo":return Lt(s.ordinalNumber(i,{unit:"year"}),a);default:return Lt(Dt(o.length,i),a)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,s,a){var l=rm(i,a);if(s.isTwoDigitYear){var u=ck(s.year,l);return i.setUTCFullYear(u,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),bo(i,a)}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),bo(i,a)}}]),n}(Ye),_ne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",130),te(ie(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o){return Bh(o==="R"?4:o.length,i)}},{key:"set",value:function(i,o,s){var a=new Date(0);return a.setUTCFullYear(s,0,4),a.setUTCHours(0,0,0,0),Hs(a)}}]),n}(Ye),Ine=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",130),te(ie(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o){return Bh(o==="u"?4:o.length,i)}},{key:"set",value:function(i,o,s){return i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),$ne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",120),te(ie(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"Q":case"QQ":return Dt(o.length,i);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(i,{width:"wide",context:"formatting"})||s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),Fne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",120),te(ie(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"q":case"qq":return Dt(o.length,i);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(i,{width:"wide",context:"standalone"})||s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),Lne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),te(ie(r),"priority",110),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return u-1};switch(o){case"M":return Lt(St(Ft.month,i),a);case"MM":return Lt(Dt(2,i),a);case"Mo":return Lt(s.ordinalNumber(i,{unit:"month"}),a);case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(i,{width:"wide",context:"formatting"})||s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),Rne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",110),te(ie(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return u-1};switch(o){case"L":return Lt(St(Ft.month,i),a);case"LL":return Lt(Dt(2,i),a);case"Lo":return Lt(s.ordinalNumber(i,{unit:"month"}),a);case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(i,{width:"wide",context:"standalone"})||s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(Ye);function Bne(t,e,n){G(2,arguments);var r=K(t),i=ze(e),o=G5(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var Nne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",100),te(ie(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"w":return St(Ft.week,i);case"wo":return s.ordinalNumber(i,{unit:"week"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,s,a){return bo(Bne(i,s,a),a)}}]),n}(Ye);function jne(t,e){G(2,arguments);var n=K(t),r=ze(e),i=Y5(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var Vne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",100),te(ie(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"I":return St(Ft.week,i);case"Io":return s.ordinalNumber(i,{unit:"week"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,s){return Hs(jne(i,s))}}]),n}(Ye),zne=[31,28,31,30,31,30,31,31,30,31,30,31],Wne=[31,29,31,30,31,30,31,31,30,31,30,31],Hne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"subPriority",1),te(ie(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"d":return St(Ft.date,i);case"do":return s.ordinalNumber(i,{unit:"date"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){var s=i.getUTCFullYear(),a=hk(s),l=i.getUTCMonth();return a?o>=1&&o<=Wne[l]:o>=1&&o<=zne[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),qne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"subpriority",1),te(ie(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"D":case"DD":return St(Ft.dayOfYear,i);case"Do":return s.ordinalNumber(i,{unit:"date"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){var s=i.getUTCFullYear(),a=hk(s);return a?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(Ye);function um(t,e,n){var r,i,o,s,a,l,u,c;G(2,arguments);var h=lr(),f=ze((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(u=h.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=K(t),p=ze(e),g=d.getUTCDay(),m=p%7,b=(m+7)%7,x=(b<f?7:0)+p-g;return d.setUTCDate(d.getUTCDate()+x),d}var Une=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=um(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),Yne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s,a){var l=function(c){var h=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+h};switch(o){case"e":case"ee":return Lt(Dt(o.length,i),l);case"eo":return Lt(s.ordinalNumber(i,{unit:"day"}),l);case"eee":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeeee":return s.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=um(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),Gne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s,a){var l=function(c){var h=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+h};switch(o){case"c":case"cc":return Lt(Dt(o.length,i),l);case"co":return Lt(s.ordinalNumber(i,{unit:"day"}),l);case"ccc":return s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"ccccc":return s.day(i,{width:"narrow",context:"standalone"});case"cccccc":return s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(i,{width:"wide",context:"standalone"})||s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=um(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(Ye);function Kne(t,e){G(2,arguments);var n=ze(e);n%7===0&&(n=n-7);var r=1,i=K(t),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a<r?7:0)+n-o;return i.setUTCDate(i.getUTCDate()+l),i}var Xne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return u===0?7:u};switch(o){case"i":case"ii":return Dt(o.length,i);case"io":return s.ordinalNumber(i,{unit:"day"});case"iii":return Lt(s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),a);case"iiiii":return Lt(s.day(i,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Lt(s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Lt(s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),a)}}},{key:"validate",value:function(i,o){return o>=1&&o<=7}},{key:"set",value:function(i,o,s){return i=Kne(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(Ye),Zne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",80),te(ie(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"a":case"aa":case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,s){return i.setUTCHours(lm(s),0,0,0),i}}]),n}(Ye),Qne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",80),te(ie(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"b":case"bb":case"bbb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,s){return i.setUTCHours(lm(s),0,0,0),i}}]),n}(Ye),Jne=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",80),te(ie(r),"incompatibleTokens",["a","b","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"B":case"BB":case"BBB":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,s){return i.setUTCHours(lm(s),0,0,0),i}}]),n}(Ye),ere=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",70),te(ie(r),"incompatibleTokens",["H","K","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"h":return St(Ft.hour12h,i);case"ho":return s.ordinalNumber(i,{unit:"hour"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(Ye),tre=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",70),te(ie(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"H":return St(Ft.hour23h,i);case"Ho":return s.ordinalNumber(i,{unit:"hour"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(Ye),nre=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",70),te(ie(r),"incompatibleTokens",["h","H","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"K":return St(Ft.hour11h,i);case"Ko":return s.ordinalNumber(i,{unit:"hour"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(Ye),rre=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",70),te(ie(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"k":return St(Ft.hour24h,i);case"ko":return s.ordinalNumber(i,{unit:"hour"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(Ye),ire=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",60),te(ie(r),"incompatibleTokens",["t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"m":return St(Ft.minute,i);case"mo":return s.ordinalNumber(i,{unit:"minute"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(Ye),ore=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",50),te(ie(r),"incompatibleTokens",["t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"s":return St(Ft.second,i);case"so":return s.ordinalNumber(i,{unit:"second"});default:return Dt(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(Ye),sre=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",30),te(ie(r),"incompatibleTokens",["t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o){var s=function(l){return Math.floor(l*Math.pow(10,-o.length+3))};return Lt(Dt(o.length,i),s)}},{key:"set",value:function(i,o,s){return i.setUTCMilliseconds(s),i}}]),n}(Ye),are=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",10),te(ie(r),"incompatibleTokens",["t","T","x"]),r}return Ne(n,[{key:"parse",value:function(i,o){switch(o){case"X":return kr(Sr.basicOptionalMinutes,i);case"XX":return kr(Sr.basic,i);case"XXXX":return kr(Sr.basicOptionalSeconds,i);case"XXXXX":return kr(Sr.extendedOptionalSeconds,i);case"XXX":default:return kr(Sr.extended,i)}}},{key:"set",value:function(i,o,s){return o.timestampIsSet?i:new Date(i.getTime()-s)}}]),n}(Ye),lre=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",10),te(ie(r),"incompatibleTokens",["t","T","X"]),r}return Ne(n,[{key:"parse",value:function(i,o){switch(o){case"x":return kr(Sr.basicOptionalMinutes,i);case"xx":return kr(Sr.basic,i);case"xxxx":return kr(Sr.basicOptionalSeconds,i);case"xxxxx":return kr(Sr.extendedOptionalSeconds,i);case"xxx":default:return kr(Sr.extended,i)}}},{key:"set",value:function(i,o,s){return o.timestampIsSet?i:new Date(i.getTime()-s)}}]),n}(Ye),ure=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",40),te(ie(r),"incompatibleTokens","*"),r}return Ne(n,[{key:"parse",value:function(i){return uk(i)}},{key:"set",value:function(i,o,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),n}(Ye),cre=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",20),te(ie(r),"incompatibleTokens","*"),r}return Ne(n,[{key:"parse",value:function(i){return uk(i)}},{key:"set",value:function(i,o,s){return[new Date(s),{timestampIsSet:!0}]}}]),n}(Ye),hre={G:new Ane,y:new Pne,Y:new Dne,R:new _ne,u:new Ine,Q:new $ne,q:new Fne,M:new Lne,L:new Rne,w:new Nne,I:new Vne,d:new Hne,D:new qne,E:new Une,e:new Yne,c:new Gne,i:new Xne,a:new Zne,b:new Qne,B:new Jne,h:new ere,H:new tre,K:new nre,k:new rre,m:new ire,s:new ore,S:new sre,X:new are,x:new lre,t:new ure,T:new cre},fre=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dre=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pre=/^'([^]*?)'?$/,gre=/''/g,mre=/\S/,vre=/[a-zA-Z]/;function fk(t,e,n,r){var i,o,s,a,l,u,c,h,f,d,p,g,m,b,x,C,k,w;G(3,arguments);var T=String(t),S=String(e),M=lr(),P=(i=(o=r==null?void 0:r.locale)!==null&&o!==void 0?o:M.locale)!==null&&i!==void 0?i:Lh;if(!P.match)throw new RangeError("locale must contain match property");var D=ze((s=(a=(l=(u=r==null?void 0:r.firstWeekContainsDate)!==null&&u!==void 0?u:r==null||(c=r.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&l!==void 0?l:M.firstWeekContainsDate)!==null&&a!==void 0?a:(f=M.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var R=ze((p=(g=(m=(b=r==null?void 0:r.weekStartsOn)!==null&&b!==void 0?b:r==null||(x=r.locale)===null||x===void 0||(C=x.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&m!==void 0?m:M.weekStartsOn)!==null&&g!==void 0?g:(k=M.locale)===null||k===void 0||(w=k.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(R>=0&&R<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(S==="")return T===""?K(n):new Date(NaN);var H={firstWeekContainsDate:D,weekStartsOn:R,locale:P},W=[new Mne],B=S.match(dre).map(function(ue){var ne=ue[0];if(ne in im){var ce=im[ne];return ce(ue,P.formatLong)}return ue}).join("").match(fre),j=[],N=ok(B),V;try{var me=function(){var ne=V.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&ek(ne)&&Fh(ne,S,t),!(r!=null&&r.useAdditionalDayOfYearTokens)&&J5(ne)&&Fh(ne,S,t);var ce=ne[0],_e=hre[ce];if(_e){var q=_e.incompatibleTokens;if(Array.isArray(q)){var dt=j.find(function(X){return q.includes(X.token)||X.token===ce});if(dt)throw new RangeError("The format string mustn't contain `".concat(dt.fullToken,"` and `").concat(ne,"` at the same time"))}else if(_e.incompatibleTokens==="*"&&j.length>0)throw new RangeError("The format string mustn't contain `".concat(ne,"` and any other token at the same time"));j.push({token:ce,fullToken:ne});var ae=_e.run(T,ne,P.match,H);if(!ae)return{v:new Date(NaN)};W.push(ae.setter),T=ae.rest}else{if(ce.match(vre))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ce+"`");if(ne==="''"?ne="'":ce==="'"&&(ne=yre(ne)),T.indexOf(ne)===0)T=T.slice(ne.length);else return{v:new Date(NaN)}}};for(N.s();!(V=N.n()).done;){var re=me();if(Qr(re)==="object")return re.v}}catch(ue){N.e(ue)}finally{N.f()}if(T.length>0&&mre.test(T))return new Date(NaN);var _=W.map(function(ue){return ue.priority}).sort(function(ue,ne){return ne-ue}).filter(function(ue,ne,ce){return ce.indexOf(ue)===ne}).map(function(ue){return W.filter(function(ne){return ne.priority===ue}).sort(function(ne,ce){return ce.subPriority-ne.subPriority})}).map(function(ue){return ue[0]}),F=K(n);if(isNaN(F.getTime()))return new Date(NaN);var U=q5(F,zs(F)),se={},Q=ok(_),ve;try{for(Q.s();!(ve=Q.n()).done;){var le=ve.value;if(!le.validate(U,H))return new Date(NaN);var ye=le.set(U,se,H);Array.isArray(ye)?(U=ye[0],am(se,ye[1])):U=ye}}catch(ue){Q.e(ue)}finally{Q.f()}return U}function yre(t){return t.match(pre)[1].replace(gre,"'")}function bre(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setDate(r),n}function xre(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setHours(r),n}function wre(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setMinutes(r),n}function Cre(t,e){G(2,arguments);var n=K(t),r=ze(e),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=nk(s);return n.setMonth(r,Math.min(o,a)),n}function Sre(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setSeconds(r),n}function kre(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setMilliseconds(r),n}function Tre(t,e){G(2,arguments);var n=K(t),r=ze(e);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function dk(t){G(1,arguments);var e=K(t);return e.setDate(1),e.setHours(0,0,0,0),e}function Nh(t){G(1,arguments);var e=K(t),n=new Date(0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ere(t,e){var n;G(1,arguments);var r=ze((n=e==null?void 0:e.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=Pre(t),o;if(i.date){var s=Dre(i.date,r);o=_re(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,u;if(i.time&&(l=Ire(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(u=$re(i.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(a+l),h=new Date(0);return h.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),h.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),h}return new Date(a+l+u)}var jh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ore=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Mre=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Are=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Pre(t){var e={},n=t.split(jh.dateTimeDelimiter),r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],jh.timeZoneDelimiter.test(e.date)&&(e.date=t.split(jh.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){var i=jh.timezone.exec(r);i?(e.time=r.replace(i[1],""),e.timezone=i[1]):e.time=r}return e}function Dre(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:t.slice((r[1]||r[2]).length)}}function _re(t,e){if(e===null)return new Date(NaN);var n=t.match(Ore);if(!n)return new Date(NaN);var r=!!n[4],i=Bl(n[1]),o=Bl(n[2])-1,s=Bl(n[3]),a=Bl(n[4]),l=Bl(n[5])-1;if(r)return Nre(e,a,l)?Fre(e,a,l):new Date(NaN);var u=new Date(0);return!Rre(e,o,s)||!Bre(e,i)?new Date(NaN):(u.setUTCFullYear(e,o,Math.max(i,s)),u)}function Bl(t){return t?parseInt(t):1}function Ire(t){var e=t.match(Mre);if(!e)return NaN;var n=cm(e[1]),r=cm(e[2]),i=cm(e[3]);return jre(n,r,i)?n*Ih+r*_h+i*1e3:NaN}function cm(t){return t&&parseFloat(t.replace(",","."))||0}function $re(t){if(t==="Z")return 0;var e=t.match(Are);if(!e)return 0;var n=e[1]==="+"?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return Vre(r,i)?n*(r*Ih+i*_h):NaN}function Fre(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=r.getUTCDay()||7,o=(e-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var Lre=[31,null,31,30,31,30,31,31,30,31,30,31];function pk(t){return t%400===0||t%4===0&&t%100!==0}function Rre(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(Lre[e]||(pk(t)?29:28))}function Bre(t,e){return e>=1&&e<=(pk(t)?366:365)}function Nre(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function jre(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function Vre(t,e){return e>=0&&e<=59}function zre(t,e){var n,r;G(1,arguments);var i=K(t);if(isNaN(i.getTime()))throw new RangeError("Invalid time value");var o=String((n=e==null?void 0:e.format)!==null&&n!==void 0?n:"extended"),s=String((r=e==null?void 0:e.representation)!==null&&r!==void 0?r:"complete");if(o!=="extended"&&o!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(s!=="date"&&s!=="time"&&s!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var a="",l="",u=o==="extended"?"-":"",c=o==="extended"?":":"";if(s!=="time"){var h=Ie(i.getDate(),2),f=Ie(i.getMonth()+1,2),d=Ie(i.getFullYear(),4);a="".concat(d).concat(u).concat(f).concat(u).concat(h)}if(s!=="date"){var p=i.getTimezoneOffset();if(p!==0){var g=Math.abs(p),m=Ie(Math.floor(g/60),2),b=Ie(g%60,2),x=p<0?"+":"-";l="".concat(x).concat(m,":").concat(b)}else l="Z";var C=Ie(i.getHours(),2),k=Ie(i.getMinutes(),2),w=Ie(i.getSeconds(),2),T=a===""?"":"T",S=[C,k,w].join(c);a="".concat(a).concat(T).concat(S).concat(l)}return a}function Wre(t,e){G(2,arguments);var n=K(t).getTime(),r=K(e.start).getTime(),i=K(e.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}var hm={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(l,u){switch(l){case"P":return u.date({width:"short"});case"PP":return u.date({width:"medium"});case"PPP":return u.date({width:"long"});case"PPPP":default:return u.date({width:"full"})}},r=function(l,u){switch(l){case"p":return u.time({width:"short"});case"pp":return u.time({width:"medium"});case"ppp":return u.time({width:"long"});case"pppp":default:return u.time({width:"full"})}},i=function(l,u){var c=l.match(/(P+)(p+)?/)||[],h=c[1],f=c[2];if(!f)return n(l,u);var d;switch(h){case"P":d=u.dateTime({width:"short"});break;case"PP":d=u.dateTime({width:"medium"});break;case"PPP":d=u.dateTime({width:"long"});break;case"PPPP":default:d=u.dateTime({width:"full"});break}return d.replace("{{date}}",n(h,u)).replace("{{time}}",r(f,u))},o={p:r,P:i},s=o;e.default=s,t.exports=e.default})(hm,hm.exports);var Hre=hm.exports;const qre=Gi(Hre),Ure={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Yre={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",weekday:"EEEE",weekdayShort:"EEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",fullDateWithWeekday:"PPPP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",monthAndYear:"LLLL yyyy",monthAndDate:"MMMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",fullDateTime:"PP p",fullDateTime12h:"PP hh:mm aa",fullDateTime24h:"PP HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class Gre{constructor({locale:e,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib="date-fns",this.locale=void 0,this.formats=void 0,this.formatTokenMap=Ure,this.escapedCharacters={start:"'",end:"'"},this.date=r=>typeof r>"u"?new Date:r===null?null:new Date(r),this.dateWithTimezone=r=>this.date(r),this.getTimezone=()=>"default",this.setTimezone=r=>r,this.toJsDate=r=>r,this.parseISO=r=>Ere(r),this.toISO=r=>zre(r,{format:"extended"}),this.parse=(r,i)=>r===""?null:fk(r,i,new Date,{locale:this.locale}),this.getCurrentLocaleCode=()=>{var r;return((r=this.locale)==null?void 0:r.code)||"en-US"},this.is12HourCycleInCurrentLocale=()=>this.locale?/a/.test(this.locale.formatLong.time()):!0,this.expandFormat=r=>{const i=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;return r.match(i).map(o=>{const s=o[0];if(s==="p"||s==="P"){const a=qre[s],l=this.locale||Lh;return a(o,l.formatLong,{})}return o}).join("")},this.getFormatHelperText=r=>this.expandFormat(r).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase(),this.isNull=r=>r===null,this.isValid=r=>nm(this.date(r)),this.format=(r,i)=>this.formatByString(r,this.formats[i]),this.formatByString=(r,i)=>om(r,i,{locale:this.locale}),this.formatNumber=r=>r,this.getDiff=(r,i,o)=>{switch(o){case"years":return qee(r,this.date(i));case"quarters":return Kee(r,this.date(i));case"months":return Jg(r,this.date(i));case"weeks":return Qee(r,this.date(i));case"days":return W5(r,this.date(i));case"hours":return ete(r,this.date(i));case"minutes":return tte(r,this.date(i));case"seconds":return H5(r,this.date(i));default:return $h(r,this.date(i))}},this.isEqual=(r,i)=>r===null&&i===null?!0:vne(r,i),this.isSameYear=(r,i)=>bne(r,i),this.isSameMonth=(r,i)=>xne(r,i),this.isSameDay=(r,i)=>yne(r,i),this.isSameHour=(r,i)=>wne(r,i),this.isAfter=(r,i)=>sm(r,i),this.isAfterYear=(r,i)=>sm(r,tm(i)),this.isAfterDay=(r,i)=>sm(r,Zg(i)),this.isBefore=(r,i)=>Rl(r,i),this.isBeforeYear=(r,i)=>Rl(r,Nh(i)),this.isBeforeDay=(r,i)=>Rl(r,Ws(i)),this.isWithinRange=(r,[i,o])=>Wre(r,{start:i,end:o}),this.startOfYear=r=>Nh(r),this.startOfMonth=r=>dk(r),this.startOfWeek=r=>wo(r,{locale:this.locale}),this.startOfDay=r=>Ws(r),this.endOfYear=r=>tm(r),this.endOfMonth=r=>Qg(r),this.endOfWeek=r=>em(r,{locale:this.locale}),this.endOfDay=r=>Zg(r),this.addYears=(r,i)=>j5(r,i),this.addMonths=(r,i)=>Dh(r,i),this.addWeeks=(r,i)=>Wee(r,i),this.addDays=(r,i)=>Xg(r,i),this.addHours=(r,i)=>zee(r,i),this.addMinutes=(r,i)=>jee(r,i),this.addSeconds=(r,i)=>Bee(r,i),this.getYear=r=>mne(r),this.getMonth=r=>une(r),this.getDate=r=>sne(r),this.getHours=r=>ane(r),this.getMinutes=r=>lne(r),this.getSeconds=r=>cne(r),this.getMilliseconds=r=>hne(r),this.setYear=(r,i)=>Tre(r,i),this.setMonth=(r,i)=>Cre(r,i),this.setDate=(r,i)=>bre(r,i),this.setHours=(r,i)=>xre(r,i),this.setMinutes=(r,i)=>wre(r,i),this.setSeconds=(r,i)=>Sre(r,i),this.setMilliseconds=(r,i)=>kre(r,i),this.getDaysInMonth=r=>nk(r),this.getNextMonth=r=>Dh(r,1),this.getPreviousMonth=r=>Dh(r,-1),this.getMonthArray=r=>{const o=[Nh(r)];for(;o.length<12;){const s=o[o.length-1];o.push(this.getNextMonth(s))}return o},this.mergeDateAndTime=(r,i)=>this.setSeconds(this.setMinutes(this.setHours(r,this.getHours(i)),this.getMinutes(i)),this.getSeconds(i)),this.getWeekdays=()=>{const r=new Date;return nte({start:wo(r,{locale:this.locale}),end:em(r,{locale:this.locale})}).map(i=>this.formatByString(i,"EEEEEE"))},this.getWeekArray=r=>{const i=wo(dk(r),{locale:this.locale}),o=em(Qg(r),{locale:this.locale});let s=0,a=i;const l=[];for(;Rl(a,o);){const u=Math.floor(s/7);l[u]=l[u]||[],l[u].push(a),a=Xg(a,1),s+=1}return l},this.getWeekNumber=r=>gne(r,{locale:this.locale}),this.getYearRange=(r,i)=>{const o=Nh(r),s=tm(i),a=[];let l=o;for(;Rl(l,s);)a.push(l),l=j5(l,1);return a},this.getMeridiemText=r=>r==="am"?"AM":"PM",this.locale=e,this.formats=Pe({},Yre,n)}}var Kre={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},Xre=function(e,n,r){var i,o=Kre[e];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",String(n)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"em "+i:"há "+i:i};const Zre=Xre;var Qre={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Jre={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},eie={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tie={date:Us({formats:Qre,defaultWidth:"full"}),time:Us({formats:Jre,defaultWidth:"full"}),dateTime:Us({formats:eie,defaultWidth:"full"})};const nie=tie;var rie={lastWeek:function(e){var n=e.getUTCDay(),r=n===0||n===6?"último":"última";return"'"+r+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},iie=function(e,n,r,i){var o=rie[e];return typeof o=="function"?o(n):o};const oie=iie;var sie={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},aie={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},lie={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},uie={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},cie={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},hie={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},fie=function(e,n){var r=Number(e);return(n==null?void 0:n.unit)==="week"?r+"ª":r+"º"},die={ordinalNumber:fie,era:wr({values:sie,defaultWidth:"wide"}),quarter:wr({values:aie,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:wr({values:lie,defaultWidth:"wide"}),day:wr({values:uie,defaultWidth:"wide"}),dayPeriod:wr({values:cie,defaultWidth:"wide",formattingValues:hie,defaultFormattingWidth:"wide"})};const pie=die;var gie=/^(\d+)[ºªo]?/i,mie=/\d+/i,vie={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},yie={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},bie={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},xie={any:[/1/i,/2/i,/3/i,/4/i]},wie={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Cie={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},Sie={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},kie={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},Tie={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},Eie={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},Oie={ordinalNumber:tk({matchPattern:gie,parsePattern:mie,valueCallback:function(e){return parseInt(e,10)}}),era:Cr({matchPatterns:vie,defaultMatchWidth:"wide",parsePatterns:yie,defaultParseWidth:"any"}),quarter:Cr({matchPatterns:bie,defaultMatchWidth:"wide",parsePatterns:xie,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Cr({matchPatterns:wie,defaultMatchWidth:"wide",parsePatterns:Cie,defaultParseWidth:"any"}),day:Cr({matchPatterns:Sie,defaultMatchWidth:"wide",parsePatterns:kie,defaultParseWidth:"any"}),dayPeriod:Cr({matchPatterns:Tie,defaultMatchWidth:"any",parsePatterns:Eie,defaultParseWidth:"any"})},Mie={code:"pt-BR",formatDistance:Zre,formatLong:nie,formatRelative:oie,localize:pie,match:Oie,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Aie=Mie;var gk={exports:{}},mk={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},vk={exports:{}},Pie=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},Die=Pie,_ie=Array.prototype.concat,Iie=Array.prototype.slice,yk=vk.exports=function(e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];Die(o)?n=_ie.call(n,Iie.call(o)):n.push(o)}return n};yk.wrap=function(t){return function(){return t(yk(arguments))}};var $ie=vk.exports,Nl=mk,jl=$ie,bk=Object.hasOwnProperty,xk=Object.create(null);for(var fm in Nl)bk.call(Nl,fm)&&(xk[Nl[fm]]=fm);var In=gk.exports={to:{},get:{}};In.get=function(t){var e=t.substring(0,3).toLowerCase(),n,r;switch(e){case"hsl":n=In.get.hsl(t),r="hsl";break;case"hwb":n=In.get.hwb(t),r="hwb";break;default:n=In.get.rgb(t),r="rgb";break}return n?{model:r,value:n}:null},In.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,l,u;if(a=t.match(n)){for(u=a[2],a=a[1],l=0;l<3;l++){var c=l*2;s[l]=parseInt(a.slice(c,c+2),16)}u&&(s[3]=parseInt(u,16)/255)}else if(a=t.match(e)){for(a=a[1],u=a[3],l=0;l<3;l++)s[l]=parseInt(a[l]+a[l],16);u&&(s[3]=parseInt(u+u,16)/255)}else if(a=t.match(r)){for(l=0;l<3;l++)s[l]=parseInt(a[l+1],0);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else if(a=t.match(i)){for(l=0;l<3;l++)s[l]=Math.round(parseFloat(a[l+1])*2.55);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else return(a=t.match(o))?a[1]==="transparent"?[0,0,0,0]:bk.call(Nl,a[1])?(s=Nl[a[1]],s[3]=1,s):null:null;for(l=0;l<3;l++)s[l]=Ci(s[l],0,255);return s[3]=Ci(s[3],0,1),s},In.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(e);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=Ci(parseFloat(n[2]),0,100),s=Ci(parseFloat(n[3]),0,100),a=Ci(isNaN(r)?1:r,0,1);return[i,o,s,a]}return null},In.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(e);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=Ci(parseFloat(n[2]),0,100),s=Ci(parseFloat(n[3]),0,100),a=Ci(isNaN(r)?1:r,0,1);return[i,o,s,a]}return null},In.to.hex=function(){var t=jl(arguments);return"#"+Vh(t[0])+Vh(t[1])+Vh(t[2])+(t[3]<1?Vh(Math.round(t[3]*255)):"")},In.to.rgb=function(){var t=jl(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},In.to.rgb.percent=function(){var t=jl(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},In.to.hsl=function(){var t=jl(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},In.to.hwb=function(){var t=jl(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},In.to.keyword=function(t){return xk[t.slice(0,3)]};function Ci(t,e,n){return Math.min(Math.max(e,t),n)}function Vh(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var Fie=gk.exports;const Vl=mk,wk={};for(const t of Object.keys(Vl))wk[Vl[t]]=t;const de={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Ck=de;for(const t of Object.keys(de)){if(!("channels"in de[t]))throw new Error("missing channels property: "+t);if(!("labels"in de[t]))throw new Error("missing channel labels property: "+t);if(de[t].labels.length!==de[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=de[t];delete de[t].channels,delete de[t].labels,Object.defineProperty(de[t],"channels",{value:e}),Object.defineProperty(de[t],"labels",{value:n})}de.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=o-i;let a,l;o===i?a=0:e===o?a=(n-r)/s:n===o?a=2+(r-e)/s:r===o&&(a=4+(e-n)/s),a=Math.min(a*60,360),a<0&&(a+=360);const u=(i+o)/2;return o===i?l=0:u<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,u*100]},de.rgb.hsv=function(t){let e,n,r,i,o;const s=t[0]/255,a=t[1]/255,l=t[2]/255,u=Math.max(s,a,l),c=u-Math.min(s,a,l),h=function(f){return(u-f)/6/c+1/2};return c===0?(i=0,o=0):(o=c/u,e=h(s),n=h(a),r=h(l),s===u?i=r-n:a===u?i=1/3+e-r:l===u&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,u*100]},de.rgb.hwb=function(t){const e=t[0],n=t[1];let r=t[2];const i=de.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,o*100,r*100]},de.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r),o=(1-e-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function Lie(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}de.rgb.keyword=function(t){const e=wk[t];if(e)return e;let n=1/0,r;for(const i of Object.keys(Vl)){const o=Vl[i],s=Lie(t,o);s<n&&(n=s,r=i)}return r},de.keyword.rgb=function(t){return Vl[t]},de.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=e*.4124+n*.3576+r*.1805,o=e*.2126+n*.7152+r*.0722,s=e*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]},de.rgb.lab=function(t){const e=de.rgb.xyz(t);let n=e[0],r=e[1],i=e[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),a=200*(r-i);return[o,s,a]},de.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,l=[0,0,0];for(let u=0;u<3;u++)o=e+1/3*-(u-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[u]=s*255;return l},de.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,r=t[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,a=r===0?2*i/(o+i):2*n/(r+n);return[e,a*100,s*100]},de.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let r=t[2]/100;const i=Math.floor(e)%6,o=e-Math.floor(e),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}},de.hsv.hsl=function(t){const e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]},de.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,r=t[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*e),a=1-r;o=6*e-s,s&1&&(o=1-o);const l=n+o*(a-n);let u,c,h;switch(s){default:case 6:case 0:u=a,c=l,h=n;break;case 1:u=l,c=a,h=n;break;case 2:u=n,c=a,h=l;break;case 3:u=n,c=l,h=a;break;case 4:u=l,c=n,h=a;break;case 5:u=a,c=n,h=l;break}return[u*255,c*255,h*255]},de.cmyk.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,a*255]},de.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100;let i,o,s;return i=e*3.2406+n*-1.5372+r*-.4986,o=e*-.9689+n*1.8758+r*.0415,s=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]},de.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(e-n),s=200*(n-r);return[i,o,s]},de.lab.xyz=function(t){const e=t[0],n=t[1],r=t[2];let i,o,s;o=(e+16)/116,i=n/500+o,s=o-r/200;const a=o**3,l=i**3,u=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=u>.008856?u:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]},de.lab.lch=function(t){const e=t[0],n=t[1],r=t[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[e,s,i]},de.lch.lab=function(t){const e=t[0],n=t[1],i=t[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[e,o,s]},de.rgb.ansi16=function(t,e=null){const[n,r,i]=t;let o=e===null?de.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},de.hsv.ansi16=function(t){return de.rgb.ansi16(de.hsv.rgb(t),t[2])},de.rgb.ansi256=function(t){const e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},de.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,o=(e>>2&1)*n*255;return[r,i,o]},de.ansi256.rgb=function(t){if(t>=232){const o=(t-232)*10+8;return[o,o,o]}t-=16;let e;const n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[n,r,i]},de.rgb.hex=function(t){const n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n},de.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]},de.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),o=Math.min(Math.min(e,n),r),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===e?l=(n-r)/s%6:i===n?l=2+(r-e)/s:l=4+(e-n)/s,l/=6,l%=1,[l*360,s*100,a*100]},de.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]},de.hsv.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=e*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]},de.hcg.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=e%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]},de.hcg.hsv=function(t){const e=t[1]/100,n=t[2]/100,r=e+n*(1-e);let i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]},de.hcg.hsl=function(t){const e=t[1]/100,r=t[2]/100*(1-e)+.5*e;let i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]},de.hcg.hwb=function(t){const e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]},de.hwb.hcg=function(t){const e=t[1]/100,r=1-t[2]/100,i=r-e;let o=0;return i<1&&(o=(r-i)/(1-i)),[t[0],i*100,o*100]},de.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},de.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},de.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},de.gray.hsl=function(t){return[0,0,t[0]]},de.gray.hsv=de.gray.hsl,de.gray.hwb=function(t){return[0,100,t[0]]},de.gray.cmyk=function(t){return[0,0,0,t[0]]},de.gray.lab=function(t){return[t[0],0,0]},de.gray.hex=function(t){const e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r},de.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const zh=Ck;function Rie(){const t={},e=Object.keys(zh);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function Bie(t){const e=Rie(),n=[t];for(e[t].distance=0;n.length;){const r=n.pop(),i=Object.keys(zh[r]);for(let o=i.length,s=0;s<o;s++){const a=i[s],l=e[a];l.distance===-1&&(l.distance=e[r].distance+1,l.parent=r,n.unshift(a))}}return e}function Nie(t,e){return function(n){return e(t(n))}}function jie(t,e){const n=[e[t].parent,t];let r=zh[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),r=Nie(zh[e[i].parent][i],r),i=e[i].parent;return r.conversion=n,r}var Vie=function(t){const e=Bie(t),n={},r=Object.keys(e);for(let i=r.length,o=0;o<i;o++){const s=r[o];e[s].parent!==null&&(n[s]=jie(s,e))}return n};const dm=Ck,zie=Vie,Ys={},Wie=Object.keys(dm);function Hie(t){const e=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function qie(t){const e=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=t(n);if(typeof i=="object")for(let o=i.length,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Wie.forEach(t=>{Ys[t]={},Object.defineProperty(Ys[t],"channels",{value:dm[t].channels}),Object.defineProperty(Ys[t],"labels",{value:dm[t].labels});const e=zie(t);Object.keys(e).forEach(r=>{const i=e[r];Ys[t][r]=qie(i),Ys[t][r].raw=Hie(i)})});var Uie=Ys;const Gs=Fie,$n=Uie,Sk=["keyword","gray","hex"],pm={};for(const t of Object.keys($n))pm[[...$n[t].labels].sort().join("")]=t;const Wh={};function Kt(t,e){if(!(this instanceof Kt))return new Kt(t,e);if(e&&e in Sk&&(e=null),e&&!(e in $n))throw new Error("Unknown model: "+e);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof Kt)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){const i=Gs.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,r=$n[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=$n[this.model].channels;const i=Array.prototype.slice.call(t,0,r);this.color=gm(i,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(t);"alpha"in t&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);const o=i.sort().join("");if(!(o in pm))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=pm[o];const{labels:s}=$n[this.model],a=[];for(n=0;n<s.length;n++)a.push(t[s[n]]);this.color=gm(a)}if(Wh[this.model])for(r=$n[this.model].channels,n=0;n<r;n++){const i=Wh[this.model][n];i&&(this.color[n]=i(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Kt.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in Gs.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);const n=e.valpha===1?e.color:[...e.color,this.valpha];return Gs.to[e.model](n)},percentString(t){const e=this.rgb().round(typeof t=="number"?t:1),n=e.valpha===1?e.color:[...e.color,this.valpha];return Gs.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=$n[this.model],{labels:n}=$n[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new Kt([...this.color.map(Gie(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new Kt([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:_t("rgb",0,Ht(255)),green:_t("rgb",1,Ht(255)),blue:_t("rgb",2,Ht(255)),hue:_t(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:_t("hsl",1,Ht(100)),lightness:_t("hsl",2,Ht(100)),saturationv:_t("hsv",1,Ht(100)),value:_t("hsv",2,Ht(100)),chroma:_t("hcg",1,Ht(100)),gray:_t("hcg",2,Ht(100)),white:_t("hwb",1,Ht(100)),wblack:_t("hwb",2,Ht(100)),cyan:_t("cmyk",0,Ht(100)),magenta:_t("cmyk",1,Ht(100)),yellow:_t("cmyk",2,Ht(100)),black:_t("cmyk",3,Ht(100)),x:_t("xyz",0,Ht(95.047)),y:_t("xyz",1,Ht(100)),z:_t("xyz",2,Ht(108.833)),l:_t("lab",0,Ht(100)),a:_t("lab",1),b:_t("lab",2),keyword(t){return t!==void 0?new Kt(t):$n[this.model].keyword(this.color)},hex(t){return t!==void 0?new Kt(t):Gs.to.hex(this.rgb().round().color)},hexa(t){if(t!==void 0)return new Kt(t);const e=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),Gs.to.hex(e)+n},rgbNumber(){const t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){const t=this.rgb().color,e=[];for(const[n,r]of t.entries()){const i=r/255;e[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return Kt.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const n=t.rgb(),r=this.rgb(),i=e===void 0?.5:e,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return Kt.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const t of Object.keys($n)){if(Sk.includes(t))continue;const{channels:e}=$n[t];Kt.prototype[t]=function(...n){return this.model===t?new Kt(this):n.length>0?new Kt(n,t):new Kt([...Kie($n[this.model][t].raw(this.color)),this.valpha],t)},Kt[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=gm(n,e)),new Kt(r,t)}}function Yie(t,e){return Number(t.toFixed(e))}function Gie(t){return function(e){return Yie(e,t)}}function _t(t,e,n){t=Array.isArray(t)?t:[t];for(const r of t)(Wh[r]||(Wh[r]=[]))[e]=n;return t=t[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[t](),i.color[e]=r,i):(i=this[t]().color[e],n&&(i=n(i)),i)}}function Ht(t){return function(e){return Math.max(0,Math.min(t,e))}}function Kie(t){return Array.isArray(t)?t:[t]}function gm(t,e){for(let n=0;n<e;n++)typeof t[n]!="number"&&(t[n]=0);return t}var Xie=Kt;const Zie=Gi(Xie),st={0:"#FFFFFF",100:"#F9FAFB",200:"#F4F6F8",300:"#DFE3E8",400:"#C4CDD5",500:"#919EAB",600:"#637381",700:"#454F5B",800:"#212B36",900:"#161C24"},mm={lighter:"#3aa4f2",light:"#7bc2f6",main:"#0E82D8",dark:"#0b61a2",darker:"#07416c",contrastText:"#fff"},Qie={lighter:"#D6E4FF",light:"#84A9FF",main:"#3366FF",dark:"#1939B7",darker:"#091A7A",contrastText:"#fff"},Jie={lighter:"#CAFDF5",light:"#61F3F3",main:"#00B8D9",dark:"#006C9C",darker:"#003768",contrastText:"#fff"},eoe={lighter:"#D8FBDE",light:"#86E8AB",main:"#36B37E",dark:"#1B806A",darker:"#0A5554",contrastText:"#fff"},toe={lighter:"#FFF5CC",light:"#FFD666",main:"#FFAB00",dark:"#B76E00",darker:"#7A4100",contrastText:st[800]},Ks={common:{black:"#000",white:"#fff"},primary:mm,secondary:Qie,info:Jie,success:eoe,warning:toe,error:{lighter:"#FFE9D5",light:"#FFAC82",main:"#FF5630",dark:"#B71D18",darker:"#7A0916",contrastText:"#fff"},grey:st,divider:Y(st[500],.24),action:{hover:Y(st[500],.08),selected:Y(st[500],.16),disabled:Y(st[500],.8),disabledBackground:Y(st[500],.24),focus:Y(st[500],.24),hoverOpacity:.08,disabledOpacity:.48}},Si=t=>{const e={...Ks,mode:"light",text:{primary:st[800],secondary:st[600],disabled:st[500]},background:{paper:"#fff",default:st[100],neutral:st[200]},action:{...Ks.action,active:st[600]}},n={...Ks,mode:"dark",text:{primary:"#fff",secondary:st[500],disabled:st[600]},background:{paper:st[800],default:st[900],neutral:Y(st[500],.16)},action:{...Ks.action,active:st[500]}};return t==="light"?e:n},noe=t=>({lighter:r0(t,.815),light:r0(t,.225),main:t,dark:n0(t,.15),darker:n0(t,.35)}),roe=t=>Zie(t).luminosity()<=.55?"#fff":st[900],ioe=t=>{const e=noe(t);return{...Ks,primary:{...e,contrastText:roe(e.main)},mode:"light",text:{primary:st[800],secondary:st[600],disabled:st[500]},background:{paper:"#fff",default:st[100],neutral:st[200]},action:{active:st[600],...Ks.action}}},kk=Si("light"),ooe=kk.grey[500],soe=kk.common.black;function Tk(t,e){const n=Y(t,.16);return{z1:`0 1px 2px 0 ${n}`,z4:`0 4px 8px 0 ${n}`,z8:`0 8px 16px 0 ${n}`,z12:`0 12px 24px -4px ${n}`,z16:`0 16px 32px -4px ${n}`,z20:`0 20px 40px -4px ${n}`,z24:`0 24px 48px 0 ${n}`,primary:`0 8px 16px 0 ${Y(e||Si("light").primary.main,.24)}`,info:`0 8px 16px 0 ${Y(Si("light").info.main,.24)}`,secondary:`0 8px 16px 0 ${Y(Si("light").secondary.main,.24)}`,success:`0 8px 16px 0 ${Y(Si("light").success.main,.24)}`,warning:`0 8px 16px 0 ${Y(Si("light").warning.main,.24)}`,error:`0 8px 16px 0 ${Y(Si("light").error.main,.24)}`,card:`0 0 2px 0 ${Y(t,.2)}, 0 12px 24px -4px ${Y(t,.12)}`,dialog:`-40px 40px 80px -8px ${Y(t,.24)}`,dropdown:`0 0 2px 0 ${Y(t,.24)}, -20px 20px 40px -4px ${Y(t,.24)}`}}const aoe=(t,e)=>Tk(t==="light"?ooe:soe,e),loe=()=>y.jsx(O.GlobalStyles,{styles:{"*":{boxSizing:"border-box"},html:{margin:0,padding:0,width:"100%",height:"100%",WebkitOverflowScrolling:"touch"},body:{margin:0,padding:0,width:"100%",height:"100%",backgroundColor:"#fff"},"#root":{width:"100%",height:"100%"},input:{"&[type=number]":{MozAppearance:"textfield","&::-webkit-outer-spin-button":{margin:0,WebkitAppearance:"none"},"&::-webkit-inner-spin-button":{margin:0,WebkitAppearance:"none"}},"&[type=search]":{"&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{WebkitAppearance:"none"}}},img:{display:"block",maxWidth:"100%"},ul:{margin:0,padding:0},".SnackbarContainer-root":{transform:"scale(1)",zIndex:"9999 !important",maxHeight:"0 !important","& .MuiCollapse-wrapper":{maxHeight:"0 !important"}}}}),uoe=["primary","secondary","info","success","warning","error"];function coe(t){const e=t.palette.mode==="light",n=r=>{const i=r.color==="default",o=r.color==="inherit",s=r.variant==="circular",a=r.variant==="extended",l=r.variant==="outlined",u=r.variant==="outlinedExtended",c=r.variant==="soft",h=r.variant==="softExtended",f={"&:hover, &:active":{boxShadow:"none"},...(s||a)&&{...(i||o)&&{color:t.palette.grey[800],boxShadow:t.customShadows.z8,"&:hover":{backgroundColor:t.palette.grey[400]}},...o&&{...!e&&{color:"inherit",backgroundColor:t.palette.grey[800],"&:hover":{backgroundColor:t.palette.grey[700]}}}},...(l||u)&&{boxShadow:"none",backgroundColor:"transparent",...(i||o)&&{border:`solid 1px ${Y(t.palette.grey[500],.32)}`,"&:hover":{backgroundColor:t.palette.action.hover}},...i&&{...!e&&{color:t.palette.text.secondary}}},...(c||h)&&{boxShadow:"none",...i&&{color:t.palette.grey[800],backgroundColor:t.palette.grey[300],"&:hover":{backgroundColor:t.palette.grey[400]}},...o&&{backgroundColor:Y(t.palette.grey[500],.08),"&:hover":{backgroundColor:Y(t.palette.grey[500],.24)}}}},d=uoe.map(m=>({...r.color===m&&{...(s||a)&&{boxShadow:t.customShadows[m],"&:hover":{backgroundColor:t.palette[m].dark}},...(l||u)&&{color:t.palette[m].main,border:`solid 1px ${Y(t.palette[m].main,.48)}`,"&:hover":{backgroundColor:Y(t.palette[m].main,.08),border:`solid 1px ${t.palette[m].main}`}},...(c||h)&&{color:t.palette[m][e?"dark":"light"],backgroundColor:Y(t.palette[m].main,.16),"&:hover":{backgroundColor:Y(t.palette[m].main,.32)}}}})),p={"&.Mui-disabled":{...(l||u)&&{backgroundColor:"transparent",border:`solid 1px ${t.palette.action.disabledBackground}`}}},g={...(a||u||h)&&{width:"auto","& svg":{marginRight:t.spacing(1)},...r.size==="small"&&{height:34,minHeight:34,borderRadius:17,padding:t.spacing(0,1)},...r.size==="medium"&&{height:40,minHeight:40,borderRadius:20,padding:t.spacing(0,2)},...r.size==="large"&&{height:48,minHeight:48,borderRadius:24,padding:t.spacing(0,2)}}};return[...d,f,p,g]};return{MuiFab:{defaultProps:{color:"primary"},styleOverrides:{root:({ownerState:r})=>n(r)}}}}function hoe(t){return{MuiCard:{styleOverrides:{root:{position:"relative",boxShadow:t.customShadows.card,borderRadius:Number(t.shape.borderRadius)*2,zIndex:0}}},MuiCardHeader:{defaultProps:{titleTypographyProps:{variant:"h6"},subheaderTypographyProps:{variant:"body2",marginTop:t.spacing(.5)}},styleOverrides:{root:{padding:t.spacing(3,3,0)}}},MuiCardContent:{styleOverrides:{root:{padding:t.spacing(3)}}}}}function foe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L12,10.59 L13.29,9.29 C13.6821222,8.89787783 14.3178778,8.89787783 14.71,9.29 C15.1021222,9.68212217 15.1021222,10.3178778 14.71,10.71 L13.41,12 L14.71,13.29 Z"})})}function Ek(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M17.56,21 C17.4000767,21.0006435 17.2423316,20.9629218 17.1,20.89 L12,18.22 L6.9,20.89 C6.56213339,21.067663 6.15259539,21.0374771 5.8444287,20.8121966 C5.53626201,20.5869161 5.38323252,20.2058459 5.45,19.83 L6.45,14.2 L2.33,10.2 C2.06805623,9.93860108 1.9718844,9.55391377 2.08,9.2 C2.19824414,8.83742187 2.51242293,8.57366684 2.89,8.52 L8.59,7.69 L11.1,2.56 C11.2670864,2.21500967 11.6166774,1.99588989 12,1.99588989 C12.3833226,1.99588989 12.7329136,2.21500967 12.9,2.56 L15.44,7.68 L21.14,8.51 C21.5175771,8.56366684 21.8317559,8.82742187 21.95,9.19 C22.0581156,9.54391377 21.9619438,9.92860108 21.7,10.19 L17.58,14.19 L18.58,19.82 C18.652893,20.2027971 18.4967826,20.5930731 18.18,20.82 C17.9989179,20.9468967 17.7808835,21.010197 17.56,21 L17.56,21 Z"})})}function doe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M13,16 C13,16.5522847 12.5522847,17 12,17 C11.4477153,17 11,16.5522847 11,16 L11,11 C11,10.4477153 11.4477153,10 12,10 C12.5522847,10 13,10.4477153 13,11 L13,16 Z M12,9 C11.4477153,9 11,8.55228475 11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 C13,8.55228475 12.5522847,9 12,9 Z"})})}function poe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M22.56,16.3 L14.89,3.58 C14.2597186,2.59400001 13.1702353,1.99737652 12,1.99737652 C10.8297647,1.99737652 9.74028139,2.59400001 9.11,3.58 L1.44,16.3 C0.888546003,17.2192471 0.869485343,18.3628867 1.39,19.3 C1.99197363,20.3551378 3.11522982,21.0046397 4.33,21 L19.67,21 C20.8765042,21.0128744 21.9978314,20.3797441 22.61,19.34 C23.146086,18.3926382 23.1269508,17.2292197 22.56,16.3 L22.56,16.3 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,9 C11,8.44771525 11.4477153,8 12,8 C12.5522847,8 13,8.44771525 13,9 L13,13 Z"})})}function goe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M16.3,9.61 L11.73,15.61 C11.5412074,15.855247 11.2494966,15.9992561 10.94,16.0000145 C10.6322197,16.001658 10.3408221,15.861492 10.15,15.62 L7.71,12.51 C7.49028166,12.2277602 7.43782669,11.8497415 7.57239438,11.5183399 C7.70696206,11.1869384 8.00810836,10.9525017 8.36239438,10.9033399 C8.7166804,10.8541782 9.07028166,10.9977602 9.29,11.28 L10.92,13.36 L14.7,8.36 C14.917932,8.07418751 15.2717886,7.92635122 15.6282755,7.97217964 C15.9847624,8.01800806 16.2897207,8.25053875 16.4282755,8.58217966 C16.5668304,8.91382056 16.517932,9.29418753 16.3,9.58 L16.3,9.61 Z"})})}function moe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 L13,13 Z"})})}function voe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M17.9 2.318A5 5 0 0 1 22.895 7.1l.005.217v10a5 5 0 0 1-4.783 4.995l-.217.005h-10a5 5 0 0 1-4.995-4.783l-.005-.217v-10a5 5 0 0 1 4.783-4.996l.217-.004h10Zm-.5 1.5h-9a4 4 0 0 0-4 4v9a4 4 0 0 0 4 4h9a4 4 0 0 0 4-4v-9a4 4 0 0 0-4-4Z"})})}function yoe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5Zm-1.625 7.255-4.13 4.13-1.75-1.75a.881.881 0 0 0-1.24 0c-.34.34-.34.89 0 1.24l2.38 2.37c.17.17.39.25.61.25.23 0 .45-.08.62-.25l4.75-4.75c.34-.34.34-.89 0-1.24a.881.881 0 0 0-1.24 0Z"})})}function boe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M17,2 C19.7614,2 22,4.23858 22,7 L22,7 L22,17 C22,19.7614 19.7614,22 17,22 L17,22 L7,22 C4.23858,22 2,19.7614 2,17 L2,17 L2,7 C2,4.23858 4.23858,2 7,2 L7,2 Z M15,11 L9,11 C8.44772,11 8,11.4477 8,12 C8,12.5523 8.44772,13 9,13 L15,13 C15.5523,13 16,12.5523 16,12 C16,11.4477 15.5523,11 15,11 Z"})})}function xoe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M12 2A10 10 0 1 1 2 12C2 6.477 6.477 2 12 2Zm0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Z"})})}function woe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M12 2A10 10 0 1 1 2 12C2 6.477 6.477 2 12 2Zm0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17ZM12 7a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z"})})}function Coe(t){return y.jsx(O.SvgIcon,{...t,sx:{right:12,fontSize:16,position:"absolute",pointerEvents:"none"},children:y.jsx("path",{d:"M12,16 C11.7663478,16.0004565 11.5399121,15.9190812 11.36,15.77 L5.36,10.77 C4.93474074,10.4165378 4.87653776,9.78525926 5.23,9.36 C5.58346224,8.93474074 6.21474074,8.87653776 6.64,9.23 L12,13.71 L17.36,9.39 C17.5665934,9.2222295 17.8315409,9.14373108 18.0961825,9.17188444 C18.3608241,9.2000378 18.6033268,9.33252029 18.77,9.54 C18.9551341,9.74785947 19.0452548,10.0234772 19.0186853,10.3005589 C18.9921158,10.5776405 18.8512608,10.8311099 18.63,11 L12.63,15.83 C12.444916,15.955516 12.2231011,16.0153708 12,16 Z"})})}function Soe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M12,8 C12.5522847,8 13,8.44771525 13,9 L13,9 L13,11 L15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L13,13 L13,15 C13,15.5522847 12.5522847,16 12,16 C11.4477153,16 11,15.5522847 11,15 L11,15 L11,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 L11,11 L11,9 C11,8.44771525 11.4477153,8 12,8 Z"})})}function koe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 Z"})})}function Toe(t){return y.jsx(O.SvgIcon,{...t,children:y.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M14,8.99420168 C14.2666375,8.99420168 14.5222334,9.10068735 14.71,9.29 C14.8993127,9.4777666 15.0057983,9.73336246 15.0057983,10 C15.0057983,10.2666375 14.8993127,10.5222334 14.71,10.71 L14.71,10.71 L13.41,12 L14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L10.71,9.29 L12,10.59 L13.29,9.29 C13.4777666,9.10068735 13.7333625,8.99420168 14,8.99420168 Z"})})}const Eoe=["primary","secondary","info","success","warning","error"];function Ooe(t){const e=t.palette.mode==="light",n=r=>{const i=r.color==="default",o=r.variant==="filled",s=r.variant==="outlined",a=r.variant==="soft",l={...i&&{"& .MuiChip-avatar":{color:t.palette.text[e?"secondary":"primary"],backgroundColor:Y(t.palette.grey[500],.48)},...s&&{border:`solid 1px ${Y(t.palette.grey[500],.32)}`},...a&&{color:t.palette.text.primary,backgroundColor:Y(t.palette.grey[500],.16),"&:hover":{backgroundColor:Y(t.palette.grey[500],.32)}}}};return[...Eoe.map(c=>({...r.color===c&&{"& .MuiChip-avatar":{color:t.palette[c].lighter,backgroundColor:t.palette[c].dark},...o&&{"& .MuiChip-deleteIcon":{color:Y(t.palette[c].contrastText,.56),"&:hover":{color:t.palette[c].contrastText}}},...a&&{color:t.palette[c][e?"dark":"light"],backgroundColor:Y(t.palette[c].main,.16),"&:hover":{backgroundColor:Y(t.palette[c].main,.32)},"& .MuiChip-deleteIcon":{color:Y(t.palette[c][e?"dark":"light"],.48),"&:hover":{color:t.palette[c].dark}}}}})),l]};return{MuiChip:{defaultProps:{deleteIcon:y.jsx(foe,{})},styleOverrides:{root:({ownerState:r})=>n(r)}}}}function Moe(t){return{MuiTabs:{defaultProps:{textColor:"inherit",allowScrollButtonsMobile:!0,variant:"scrollable"},styleOverrides:{scrollButtons:{width:48,borderRadius:"50%"}}},MuiTab:{defaultProps:{disableRipple:!0,iconPosition:"start"},styleOverrides:{root:({ownerState:e})=>({padding:0,opacity:1,minWidth:48,fontWeight:t.typography.fontWeightMedium,textTransform:"none","&:not(:last-of-type)":{marginRight:t.spacing(3),[t.breakpoints.up("sm")]:{marginRight:t.spacing(5)}},"&:not(.Mui-selected)":{color:t.palette.text.secondary},...(e.iconPosition==="start"||e.iconPosition==="end")&&{minHeight:48}})}}}}function Aoe(t){return{MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:t.palette.action.selected,"&:hover":{backgroundColor:t.palette.action.hover}}}}}}}function Poe(t){return{MuiLink:{defaultProps:{underline:"hover"}}}}function Doe(t){return{MuiListItemIcon:{styleOverrides:{root:{color:"inherit",minWidth:"auto",marginRight:t.spacing(2)}}},MuiListItemAvatar:{styleOverrides:{root:{minWidth:"auto",marginRight:t.spacing(2)}}},MuiListItemText:{styleOverrides:{root:{marginTop:0,marginBottom:0},multiline:{marginTop:0,marginBottom:0}}}}}function _oe(t){return{MuiTableContainer:{styleOverrides:{root:{position:"relative"}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:t.palette.action.selected,"&:hover":{backgroundColor:t.palette.action.hover}}}}},MuiTableCell:{styleOverrides:{root:{borderBottom:"none"},head:{color:t.palette.text.secondary,backgroundColor:t.palette.background.neutral},stickyHeader:{backgroundColor:t.palette.background.paper,backgroundImage:`linear-gradient(to bottom, ${t.palette.background.neutral} 0%, ${t.palette.background.neutral} 100%)`},paddingCheckbox:{paddingLeft:t.spacing(1)}}},MuiTablePagination:{defaultProps:{backIconButtonProps:{size:"small"},nextIconButtonProps:{size:"small"},SelectProps:{MenuProps:{MenuListProps:{sx:{"& .MuiMenuItem-root":{...t.typography.body2}}}}}},styleOverrides:{root:{borderTop:`solid 1px ${t.palette.divider}`},toolbar:{height:64},actions:{marginRight:t.spacing(1)},select:{"&:focus":{borderRadius:t.shape.borderRadius}}}}}}const Ioe=["info","success","warning","error"];function $oe(t){const e=t.palette.mode==="light",n=r=>{const i=r.variant==="standard",o=r.variant==="filled",s=r.variant==="outlined";return[...Ioe.map(l=>({...r.severity===l&&{...i&&{color:t.palette[l][e?"darker":"lighter"],backgroundColor:t.palette[l][e?"lighter":"darker"],"& .MuiAlert-icon":{color:t.palette[l][e?"main":"light"]}},...o&&{color:t.palette[l].contrastText,backgroundColor:t.palette[l].main},...s&&{color:t.palette[l][e?"dark":"light"],border:`solid 1px ${t.palette[l].main}`,"& .MuiAlert-icon":{color:t.palette[l].main}}}}))]};return{MuiAlert:{defaultProps:{iconMapping:{info:y.jsx(doe,{}),success:y.jsx(goe,{}),warning:y.jsx(poe,{}),error:y.jsx(moe,{})}},styleOverrides:{root:({ownerState:r})=>n(r),icon:{opacity:1}}},MuiAlertTitle:{styleOverrides:{root:{marginBottom:t.spacing(.5)}}}}}function Foe(t){return{MuiBadge:{styleOverrides:{dot:{width:10,height:10,borderRadius:"50%"}}}}}function Loe(t){return{MuiPaper:{defaultProps:{elevation:0},styleOverrides:{root:{backgroundImage:"none"}}}}}function Roe(t){return{MuiInputBase:{styleOverrides:{root:{"&.Mui-disabled":{"& svg":{color:t.palette.text.disabled}}},input:{"&::placeholder":{opacity:1,color:t.palette.text.disabled}}}},MuiInput:{styleOverrides:{underline:{"&:before":{borderBottomColor:Y(t.palette.grey[500],.56)},"&:after":{borderBottomColor:t.palette.text.primary}}}},MuiTextField:{styleOverrides:{root:{"& .MuiInputLabel-root.Mui-focused":{color:t.palette.text.primary}}}},MuiFilledInput:{styleOverrides:{root:{borderRadius:t.shape.borderRadius,backgroundColor:Y(t.palette.grey[500],.08),"&:hover":{backgroundColor:Y(t.palette.grey[500],.16)},"&.Mui-focused":{backgroundColor:Y(t.palette.grey[500],.16)},"&.Mui-disabled":{backgroundColor:t.palette.action.disabledBackground}},underline:{"&:before, :after":{display:"none"}}}},MuiOutlinedInput:{styleOverrides:{root:{"& .MuiOutlinedInput-notchedOutline":{borderColor:Y(t.palette.grey[500],.32)},"&.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderWidth:1,borderColor:t.palette.text.primary}},"&.Mui-disabled":{"& .MuiOutlinedInput-notchedOutline":{borderColor:t.palette.action.disabledBackground}}}}}}}function Boe(t){return{MuiRadio:{defaultProps:{icon:y.jsx(xoe,{}),checkedIcon:y.jsx(woe,{})},styleOverrides:{root:({ownerState:e})=>({padding:t.spacing(1),...e.size==="small"&&{"& svg":{width:20,height:20}},...e.size==="medium"&&{"& svg":{width:24,height:24}}})}}}}function Noe(t){const e=t.palette.mode==="light";return{MuiDrawer:{styleOverrides:{root:({ownerState:n})=>({...n.variant==="temporary"&&{"& .MuiDrawer-paper":{boxShadow:`-40px 40px 80px -8px ${Y(e?t.palette.grey[500]:t.palette.common.black,.24)}`}}})}}}}function joe(t){return{MuiDialog:{styleOverrides:{paper:{boxShadow:t.customShadows.dialog,"&.MuiPaper-rounded":{borderRadius:Number(t.shape.borderRadius)*2},"&.MuiDialog-paperFullScreen":{borderRadius:0},"&.MuiDialog-paper .MuiDialogActions-root":{padding:t.spacing(3)},"@media (max-width: 600px)":{margin:t.spacing(2)},"@media (max-width: 663.95px)":{"&.MuiDialog-paperWidthSm.MuiDialog-paperScrollBody":{maxWidth:"100%"}}},paperFullWidth:{width:"100%"}}},MuiDialogTitle:{styleOverrides:{root:{padding:t.spacing(3)}}},MuiDialogContent:{styleOverrides:{root:{padding:t.spacing(0,3)},dividers:{borderTop:0,borderBottomStyle:"dashed",paddingBottom:t.spacing(3)}}},MuiDialogActions:{styleOverrides:{root:{"& > :not(:first-of-type)":{marginLeft:t.spacing(1.5)}}}}}}function Voe(t){return{MuiAvatar:{styleOverrides:{colorDefault:{color:t.palette.text.secondary,backgroundColor:Y(t.palette.grey[500],.24)}}},MuiAvatarGroup:{defaultProps:{max:4},styleOverrides:{root:{justifyContent:"flex-end"},avatar:{fontSize:16,fontWeight:t.typography.fontWeightMedium,"&:first-of-type":{fontSize:12,color:t.palette.primary.main,backgroundColor:t.palette.primary.lighter}}}}}}function zoe(t){return{MuiRating:{defaultProps:{emptyIcon:y.jsx(Ek,{}),icon:y.jsx(Ek,{})},styleOverrides:{root:{"&.Mui-disabled":{opacity:.48}},iconEmpty:{color:Y(t.palette.grey[500],.48)},sizeSmall:{"& svg":{width:20,height:20}},sizeLarge:{"& svg":{width:28,height:28}}}}}}function Woe(t){const e=t.palette.mode==="light";return{MuiSlider:{defaultProps:{size:"small"},styleOverrides:{root:{"&.Mui-disabled":{color:t.palette.action.disabled}},rail:{opacity:.32},markLabel:{fontSize:13,color:t.palette.text.disabled},valueLabel:{borderRadius:8,backgroundColor:t.palette.grey[e?800:700]}}}}}const Hoe=["primary","secondary","info","success","warning","error"];function qoe(t){const e=t.palette.mode==="light",n=r=>{const i=r.color==="inherit",o=r.variant==="contained",s=r.variant==="outlined",a=r.variant==="text",l=r.variant==="soft",u=r.size==="small",c=r.size==="large",h={textTransform:"none",...i&&{...o&&{color:t.palette.grey[800],"&:hover":{boxShadow:t.customShadows.z8,backgroundColor:t.palette.grey[400]}},...s&&{borderColor:Y(t.palette.grey[500],.32),"&:hover":{borderColor:t.palette.text.primary,backgroundColor:t.palette.action.hover}},...a&&{"&:hover":{backgroundColor:t.palette.action.hover}},...l&&{color:t.palette.text.primary,backgroundColor:Y(t.palette.grey[500],.08),"&:hover":{backgroundColor:Y(t.palette.grey[500],.24)}}}},f=Hoe.map(g=>({...r.color===g&&{...o&&{"&:hover":{boxShadow:t.customShadows[g]}},...l&&{color:t.palette[g][e?"dark":"light"],backgroundColor:Y(t.palette[g].main,.16),"&:hover":{backgroundColor:Y(t.palette[g].main,.32)}}}})),d={"&.Mui-disabled":{...l&&{backgroundColor:t.palette.action.disabledBackground}}},p={...u&&{height:30,fontSize:13,...l&&{padding:"4px 10px"}},...c&&{height:48,fontSize:15,...l&&{padding:"8px 22px"}}};return[...f,h,d,p]};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:({ownerState:r})=>n(r)}}}}function Uoe(t){const e=t.palette.mode==="light",n=r=>({padding:"9px 13px 9px 12px",width:58,height:38,...r.size==="small"&&{padding:"4px 8px 4px 7px",width:40,height:24},"& .MuiSwitch-thumb":{width:14,height:14,boxShadow:"none",color:`${t.palette.common.white} !important`,...r.size==="small"&&{width:10,height:10}},"& .MuiSwitch-track":{opacity:1,borderRadius:14,backgroundColor:Y(t.palette.grey[500],.48)},"& .MuiSwitch-switchBase":{left:3,padding:12,...r.size==="small"&&{padding:7},"&.Mui-checked":{transform:"translateX(13px)","&+.MuiSwitch-track":{opacity:1},...r.size==="small"&&{transform:"translateX(9px)"}},"&.Mui-disabled":{"& .MuiSwitch-thumb":{opacity:e?1:.48},"&+.MuiSwitch-track":{opacity:.48}}}});return{MuiSwitch:{styleOverrides:{root:({ownerState:r})=>n(r)}}}}function Yoe(t){return{MuiSelect:{defaultProps:{IconComponent:Coe}}}}function Goe(t){return{MuiSvgIcon:{styleOverrides:{fontSizeLarge:{width:32,height:32,fontSize:"inherit"}}}}}function Koe(t){const e=t.palette.mode==="light";return{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:t.palette.grey[e?800:700]},arrow:{color:t.palette.grey[e?800:700]}}}}}function Xoe(t){return{MuiPopover:{styleOverrides:{paper:{boxShadow:t.customShadows.dropdown,borderRadius:Number(t.shape.borderRadius)*1.5}}}}}function Zoe(t){return{MuiStepConnector:{styleOverrides:{line:{borderColor:t.palette.divider}}}}}function Qoe(t){return{MuiDataGrid:{styleOverrides:{root:{border:0,padding:8,"& .MuiTablePagination-root":{borderTop:0},"& .MuiDataGrid-columnHeader:focus, .MuiDataGrid-cell:focus, .MuiDataGrid-columnHeader:focus-within, .MuiDataGrid-cell:focus-within":{outline:"none"}},main:{backgroundColor:"#F5F5F5",borderRadius:8,outline:"8px solid #F5F5F5"},columnHeader:{fontSize:13,fontWeight:600,color:t.palette.grey[600],padding:"0 16px",borderColor:"transparent"},row:{borderRadius:8,backgroundColor:"#FFFFFF",color:t.palette.grey[800]},rowReorderCell:{color:t.palette.grey[400]},cell:{borderBottom:0,padding:"0 16px"},columnSeparator:{color:t.palette.divider,"&:hover":{color:t.palette.primary.main}},toolbarContainer:{padding:t.spacing(2),backgroundColor:t.palette.background.paper,borderTop:`solid 1px ${t.palette.divider}`,"& .MuiButton-root":{marginRight:t.spacing(1.5),color:t.palette.text.secondary,"&:hover":{backgroundColor:t.palette.action.hover}}},paper:{boxShadow:t.customShadows.dropdown},menu:{"& .MuiPaper-root":{boxShadow:t.customShadows.dropdown,padding:8,borderRadius:12},"& .MuiMenuItem-root":{borderRadius:8,...t.typography.body2,"& .MuiListItemIcon-root":{minWidth:"auto",color:t.palette.primary.main},"& .MuiListItemText-primary":{fontSize:14}}},panelFooter:{padding:t.spacing(2),justifyContent:"flex-end",borderTop:`1px solid ${t.palette.divider}`,"& .MuiButton-root":{"&:first-of-type":{marginRight:t.spacing(1.5),color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.action.hover}},"&:last-of-type":{color:t.palette.common.white,backgroundColor:t.palette.primary.main,"&:hover":{backgroundColor:t.palette.primary.dark}}}},filterForm:{padding:t.spacing(1.5,0),"& .MuiFormControl-root":{margin:t.spacing(0,.5)},"& .MuiInput-root":{marginTop:t.spacing(3),"&::before, &::after":{display:"none"},"& .MuiNativeSelect-select, .MuiInput-input":{...t.typography.body2,padding:t.spacing(.75,1),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.neutral},"& .MuiSvgIcon-root":{right:4}}},overlayWrapper:{height:"100% !important"},overlayWrapperInner:{height:"100% !important"}}}}}function Joe(t){return{MuiSkeleton:{defaultProps:{animation:"wave"},styleOverrides:{root:{backgroundColor:t.palette.background.neutral}}}}}function ese(t){return{MuiBackdrop:{styleOverrides:{root:{backgroundColor:Y(t.palette.grey[800],.8)},invisible:{background:"transparent"}}}}}const tse=["primary","secondary","info","success","warning","error"];function nse(t){const e=n=>{const r=n.variant==="buffer",i={borderRadius:4,"& .MuiLinearProgress-bar":{borderRadius:4},...r&&{backgroundColor:"transparent"}};return[...tse.map(s=>({...n.color===s&&{backgroundColor:O.alpha(t.palette[s].main,.24)}})),i]};return{MuiLinearProgress:{styleOverrides:{root:({ownerState:n})=>e(n)}}}}function rse(t){return{MuiTimelineDot:{styleOverrides:{root:{boxShadow:"none"}}},MuiTimelineConnector:{styleOverrides:{root:{backgroundColor:t.palette.divider}}}}}function ise(t){return{MuiTreeView:{defaultProps:{defaultCollapseIcon:y.jsx(Soe,{sx:{width:20,height:20}}),defaultExpandIcon:y.jsx(koe,{sx:{width:20,height:20}}),defaultEndIcon:y.jsx(Toe,{sx:{color:"text.secondary",width:20,height:20}})}},MuiTreeItem:{styleOverrides:{label:{...t.typography.body2},iconContainer:{width:"auto"}}}}}function ose(t){return{MuiCheckbox:{defaultProps:{icon:y.jsx(voe,{}),checkedIcon:y.jsx(yoe,{}),indeterminateIcon:y.jsx(boe,{})},styleOverrides:{root:({ownerState:e})=>({padding:t.spacing(1),...e.size==="small"&&{"& svg":{width:20,height:20}},...e.size==="medium"&&{"& svg":{width:24,height:24}}})}}}}function sse(t){return{MuiAccordion:{styleOverrides:{root:{backgroundColor:"transparent","&.Mui-expanded":{boxShadow:t.customShadows.z8,borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.paper},"&.Mui-disabled":{backgroundColor:"transparent"}}}},MuiAccordionSummary:{styleOverrides:{root:{paddingLeft:t.spacing(2),paddingRight:t.spacing(1),"&.Mui-disabled":{opacity:1,color:t.palette.action.disabled,"& .MuiTypography-root":{color:"inherit"}}},expandIconWrapper:{color:"inherit"}}}}}function ase(t){return{MuiTypography:{styleOverrides:{paragraph:{marginBottom:t.spacing(2)},gutterBottom:{marginBottom:t.spacing(1)}}}}}const lse=["primary","secondary","info","success","warning","error"];function use(t){const e=t.palette.mode==="light",n=r=>{const i=r.variant==="outlined",o=r.variant==="soft",s={"& .MuiPaginationItem-root":{...i&&{borderColor:Y(t.palette.grey[500],.32)},"&.Mui-selected":{fontWeight:t.typography.fontWeightMedium}}};return[...lse.map(l=>({...r.color===l&&{...o&&{"& .MuiPaginationItem-root":{"&.Mui-selected":{color:t.palette[l][e?"dark":"light"],backgroundColor:Y(t.palette[l].main,.16),"&:hover":{backgroundColor:Y(t.palette[l].main,.32)}}}}}})),s]};return{MuiPagination:{defaultProps:{color:"primary"},styleOverrides:{root:({ownerState:r})=>n(r)}}}}function cse(t){return{MuiBreadcrumbs:{styleOverrides:{separator:{marginLeft:t.spacing(2),marginRight:t.spacing(2)},li:{display:"inline-flex",margin:t.spacing(.25,0),"& > *":{...t.typography.body2}}}}}}const hse=["primary","secondary","info","success","warning","error"];function fse(t){const e=n=>{const r=n.color==="inherit",i=n.variant==="contained",o=n.variant==="outlined",s=n.variant==="text",a=n.variant==="soft",l=n.orientation==="horizontal",u=n.orientation==="vertical",c={"& .MuiButtonGroup-grouped":{"&:not(:last-of-type)":{...!o&&{borderStyle:"solid",...r&&{borderColor:Y(t.palette.grey[500],.32)},...l&&{borderWidth:"0px 1px 0px 0px"},...u&&{borderWidth:"0px 0px 1px 0px"}}}}},h=hse.map(d=>({"& .MuiButtonGroup-grouped":{"&:not(:last-of-type)":{...!o&&{...n.color===d&&{...i&&{borderColor:Y(t.palette[d].dark,.48)},...s&&{borderColor:Y(t.palette[d].main,.48)},...a&&{borderColor:Y(t.palette[d].dark,.24)}}}}}})),f={"& .MuiButtonGroup-grouped.Mui-disabled":{"&:not(:last-of-type)":{borderColor:t.palette.action.disabledBackground}}};return[...h,c,f]};return{MuiButtonGroup:{defaultProps:{disableElevation:!0},styleOverrides:{root:({ownerState:n})=>e(n)}}}}function dse(t){return{MuiAutocomplete:{styleOverrides:{root:{"& span.MuiAutocomplete-tag":{...t.typography.body2,width:24,height:24,lineHeight:"24px",textAlign:"center",borderRadius:t.shape.borderRadius,backgroundColor:Y(t.palette.grey[500],.16)}},paper:{boxShadow:t.customShadows.dropdown},listbox:{padding:t.spacing(0,1)},option:{...t.typography.body2,padding:t.spacing(1),margin:t.spacing(.75,0),borderRadius:t.shape.borderRadius}}}}}const pse=["primary","secondary","info","success","warning","error"];function gse(t){const e=n=>{const i={...n.color==="standard"&&{"&.Mui-selected":{borderColor:"inherit"}}},o=pse.map(a=>({...n.color===a&&{"&:hover":{borderColor:Y(t.palette[a].main,.48),backgroundColor:Y(t.palette[a].main,t.palette.action.hoverOpacity)},"&.Mui-selected":{borderColor:t.palette[a].main}}})),s={"&.Mui-disabled":{"&.Mui-selected":{color:t.palette.action.disabled,backgroundColor:t.palette.action.selected,borderColor:t.palette.action.disabledBackground}}};return[...o,i,s]};return{MuiToggleButton:{styleOverrides:{root:({ownerState:n})=>e(n)}},MuiToggleButtonGroup:{styleOverrides:{root:{borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.paper,border:`solid 1px ${Y(t.palette.grey[500],.16)}`},grouped:{margin:4,borderColor:"transparent !important",borderRadius:`${t.shape.borderRadius}px !important`}}}}}function mse(t){return{MuiFormControlLabel:{styleOverrides:{label:{...t.typography.body2}}},MuiFormHelperText:{defaultProps:{component:"div"},styleOverrides:{root:{marginTop:t.spacing(1)}}},MuiFormLabel:{styleOverrides:{root:{color:t.palette.text.disabled}}}}}function vse(t){return{MuiLoadingButton:{variants:[{props:{loading:!0,loadingPosition:"start",size:"small"},style:{"& .MuiLoadingButton-loadingIndicatorStart":{left:10}}},{props:{loading:!0,loadingPosition:"end",size:"small"},style:{"& .MuiLoadingButton-loadingIndicatorEnd":{right:10}}}],styleOverrides:{loadingIndicatorStart:{left:14},loadingIndicatorEnd:{right:14}}}}}function yse(t){return Object.assign(coe(t),Moe(t),Ooe(t),hoe(t),Aoe(t),Poe(),Roe(t),Boe(t),Foe(),Doe(t),_oe(t),Loe(),$oe(t),Uoe(t),Yoe(),qoe(t),zoe(t),joe(t),Voe(t),Woe(t),Noe(t),Zoe(t),Koe(t),Xoe(t),Goe(),ose(t),Qoe(t),Joe(t),rse(t),ise(t),ese(t),nse(t),sse(t),ase(t),use(t),fse(t),cse(t),dse(t),mse(t),gse(t),vse())}const Ok=Si("light"),bse=Ok.grey[500],xse=Ok.common.black;function Mk(t){const e=Y(t,.2),n=Y(t,.14),r=Y(t,.12);return["none",`0px 2px 1px -1px ${e},0px 1px 1px 0px ${n},0px 1px 3px 0px ${r}`,`0px 3px 1px -2px ${e},0px 2px 2px 0px ${n},0px 1px 5px 0px ${r}`,`0px 3px 3px -2px ${e},0px 3px 4px 0px ${n},0px 1px 8px 0px ${r}`,`0px 2px 4px -1px ${e},0px 4px 5px 0px ${n},0px 1px 10px 0px ${r}`,`0px 3px 5px -1px ${e},0px 5px 8px 0px ${n},0px 1px 14px 0px ${r}`,`0px 3px 5px -1px ${e},0px 6px 10px 0px ${n},0px 1px 18px 0px ${r}`,`0px 4px 5px -2px ${e},0px 7px 10px 1px ${n},0px 2px 16px 1px ${r}`,`0px 5px 5px -3px ${e},0px 8px 10px 1px ${n},0px 3px 14px 2px ${r}`,`0px 5px 6px -3px ${e},0px 9px 12px 1px ${n},0px 3px 16px 2px ${r}`,`0px 6px 6px -3px ${e},0px 10px 14px 1px ${n},0px 4px 18px 3px ${r}`,`0px 6px 7px -4px ${e},0px 11px 15px 1px ${n},0px 4px 20px 3px ${r}`,`0px 7px 8px -4px ${e},0px 12px 17px 2px ${n},0px 5px 22px 4px ${r}`,`0px 7px 8px -4px ${e},0px 13px 19px 2px ${n},0px 5px 24px 4px ${r}`,`0px 7px 9px -4px ${e},0px 14px 21px 2px ${n},0px 5px 26px 4px ${r}`,`0px 8px 9px -5px ${e},0px 15px 22px 2px ${n},0px 6px 28px 5px ${r}`,`0px 8px 10px -5px ${e},0px 16px 24px 2px ${n},0px 6px 30px 5px ${r}`,`0px 8px 11px -5px ${e},0px 17px 26px 2px ${n},0px 6px 32px 5px ${r}`,`0px 9px 11px -5px ${e},0px 18px 28px 2px ${n},0px 7px 34px 6px ${r}`,`0px 9px 12px -6px ${e},0px 19px 29px 2px ${n},0px 7px 36px 6px ${r}`,`0px 10px 13px -6px ${e},0px 20px 31px 3px ${n},0px 8px 38px 7px ${r}`,`0px 10px 13px -6px ${e},0px 21px 33px 3px ${n},0px 8px 40px 7px ${r}`,`0px 10px 14px -6px ${e},0px 22px 35px 3px ${n},0px 8px 42px 7px ${r}`,`0px 11px 14px -7px ${e},0px 23px 36px 3px ${n},0px 9px 44px 8px ${r}`,`0px 11px 15px -7px ${e},0px 24px 38px 3px ${n},0px 9px 46px 8px ${r}`]}const wse=t=>Mk(t==="light"?bse:xse);function on(t){return`${t/16}rem`}function Xs({sm:t,md:e,lg:n}){return{"@media (min-width:600px)":{fontSize:on(t)},"@media (min-width:900px)":{fontSize:on(e)},"@media (min-width:1200px)":{fontSize:on(n)}}}const Cse={fontFamily:"Public Sans, sans-serif",fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:{fontWeight:800,lineHeight:80/64,fontSize:on(40),...Xs({sm:52,md:58,lg:64})},h2:{fontWeight:800,lineHeight:64/48,fontSize:on(32),...Xs({sm:40,md:44,lg:48})},h3:{fontWeight:700,lineHeight:1.5,fontSize:on(24),...Xs({sm:26,md:30,lg:32})},h4:{fontWeight:700,lineHeight:1.5,fontSize:on(20),...Xs({sm:20,md:24,lg:24})},h5:{fontWeight:700,lineHeight:1.5,fontSize:on(18),...Xs({sm:19,md:20,lg:20})},h6:{fontWeight:700,lineHeight:28/18,fontSize:on(17),...Xs({sm:18,md:18,lg:18})},subtitle1:{fontWeight:600,lineHeight:1.5,fontSize:on(16)},subtitle2:{fontWeight:600,lineHeight:22/14,fontSize:on(14)},body1:{lineHeight:1.5,fontSize:on(16)},body2:{lineHeight:22/14,fontSize:on(14)},caption:{lineHeight:1.5,fontSize:on(12)},overline:{fontWeight:700,lineHeight:1.5,fontSize:on(12),textTransform:"uppercase"},button:{fontWeight:700,lineHeight:24/14,fontSize:on(14),textTransform:"capitalize"}},Ak=({children:t,color:e,direction:n="ltr",themeMode:r="light"})=>{const i=v.useMemo(()=>({palette:ioe(e),typography:Cse,shape:{borderRadius:8},direction:n,shadows:wse(r),customShadows:aoe(r,e)}),[e,n,r]),o=O2(i);return o.components=yse(o),y.jsx(s2,{injectFirst:!0,children:y.jsxs(A2,{theme:o,children:[y.jsx(O.CssBaseline,{}),y.jsx(loe,{}),t]})})},Ive="",$ve="",Sse=({themeColor:t,children:e})=>y.jsx(Aa.LocalizationProvider,{dateAdapter:Gre,adapterLocale:Aie,children:y.jsx(_2,{children:y.jsx(Ak,{color:t,children:y.jsx(L$,{children:e})})})}),kse=({modalTitle:t="Tem certeza que deseja excluir?",message:e="Essa ação não poderá ser desfeita.",cancelButtonText:n="Cancelar",confirmButtonText:r="Sim, excluir registro",onClose:i,onConfirm:o,confirming:s,...a})=>y.jsxs(O.Dialog,{fullWidth:!0,maxWidth:"xs",...a,onClose:i,children:[y.jsx(O.DialogTitle,{children:t}),y.jsx(O.DialogContent,{children:e}),y.jsxs(O.DialogActions,{children:[y.jsx(O.Button,{variant:"outlined",color:"inherit",onClick:i,size:"large",children:n}),y.jsx(I6.LoadingButton,{variant:"contained",onClick:o,size:"large",loading:s,children:r})]})]}),Zs=t=>t&&t.charAt(0).toUpperCase(),Tse=t=>["A","N","H","L","Q"].includes(Zs(t))?"primary":["F","G","T","I","J"].includes(Zs(t))?"info":["K","D","Y","B","O"].includes(Zs(t))?"success":["P","E","R","S","U"].includes(Zs(t))?"warning":["V","W","X","M","Z"].includes(Zs(t))?"error":"default",Pk=v.forwardRef(({color:t,name:e="",BadgeProps:n,children:r,sx:i,...o},s)=>{var f,d;const a=no(),l=Zs(e),u=Tse(e),c=t||u,h=c==="default"?y.jsxs(O.Avatar,{ref:s,sx:i,...o,children:[e&&l,r]}):y.jsxs(O.Avatar,{ref:s,sx:{color:(f=a.palette[c])==null?void 0:f.contrastText,backgroundColor:(d=a.palette[c])==null?void 0:d.main,fontWeight:a.typography.fontWeightMedium,...i},...o,children:[e&&l,r]});return n?y.jsx(O.Badge,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},...n,children:h}):h});Pk.displayName="CustomAvatar";const ki={tiny:24,small:32,medium:40,large:56},Dk=v.forwardRef(({size:t="small",compact:e,max:n,children:r,sx:i,...o},s)=>{const a=t==="tiny",l=t==="small",u=t==="medium",c=t==="large",h={width:40,height:40,position:"relative","& .MuiAvatarGroup-avatar":{m:0,width:28,height:28,position:"absolute","&:first-of-type":{left:0,bottom:0,zIndex:9},"&:last-of-type":{top:0,right:0}}};return y.jsx(O.AvatarGroup,{ref:s,max:e?3:n,spacing:(a||l)&&"medium"||"small",sx:{"& .MuiAvatar-root":{...c&&{width:ki.large,height:ki.large,"&:first-of-type":{fontSize:16}},...u&&{width:ki.medium,height:ki.medium},...l&&{width:ki.small,height:ki.small},...a&&{width:ki.tiny,height:ki.tiny}},...e&&{...h},...i},...o,children:r})});Dk.displayName="CustomAvatarGroup";const Hh=({sx:t})=>y.jsx(O.LinearProgress,{sx:{position:"absolute",top:0,left:0,width:1,zIndex:9999,...t}}),_k=O.styled(O.Box)({display:"flex",flexDirection:"row",alignItems:"center",padding:"0 16px"}),Ese=()=>{var c,h;const t=ui.useGridApiContext(),{rowHeight:e,paginationModel:n,initialState:r}=ui.useGridRootProps(),i=(n==null?void 0:n.pageSize)||((h=(c=r==null?void 0:r.pagination)==null?void 0:c.paginationModel)==null?void 0:h.pageSize)||10,o=ui.gridColumnsTotalWidthSelector(t),s=ui.gridColumnPositionsSelector(t),a=v.useMemo(()=>s.filter(f=>f<=o).length,[o,s]),l=t.current.getVisibleColumns().slice(0,a),u=v.useMemo(()=>{const f=[];for(let d=0;d<i;d+=1){for(const p of l)f.push(y.jsx(_k,{sx:{justifyContent:p.align},children:y.jsx(O.Skeleton,{width:"100%"})},`column-${d}-${p.field}`));f.push(y.jsx(_k,{},`fill-${d}`))}return f},[i,l]);return y.jsx(O.Stack,{display:"grid",sx:{display:"grid",gridTemplateColumns:`${l.map(({computedWidth:f})=>`${f}px`).join(" ")} 1fr`,gridAutoRows:e,backgroundColor:"grey.0",borderRadius:1,overflow:"hidden"},children:u})},Ose=()=>{const e=no().palette.primary.main;return y.jsxs(y.Fragment,{children:[y.jsx("defs",{children:y.jsxs("linearGradient",{id:"BG",x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[y.jsx("stop",{offset:"0%",stopColor:e}),y.jsx("stop",{offset:"100%",stopColor:e,stopOpacity:"0"})]})}),y.jsx("path",{fill:"url(#BG)",fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})},Mse=v.memo(Ose),Ase=({...t})=>{const e=no(),n=e.palette.primary.main,r=e.palette.primary.dark,i=e.palette.primary.darker;return y.jsx(O.Box,{...t,children:y.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx(Mse,{}),y.jsx("defs",{children:y.jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[y.jsx("stop",{offset:"0%",stopOpacity:"0"}),y.jsx("stop",{offset:"100%"})]})}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),y.jsx("path",{fill:i,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),y.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),y.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),y.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),y.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),y.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),y.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),y.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),y.jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),y.jsx("ellipse",{cx:"380.363",cy:"298.487",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),y.jsx("ellipse",{cx:"390.052",cy:"264.383",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),y.jsx("ellipse",{cx:"346.97",cy:"270.022",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),y.jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),y.jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:n,fillRule:"nonzero",opacity:"0.2"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),y.jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),y.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),y.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),y.jsx("path",{fill:r,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),y.jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),y.jsx("ellipse",{cx:"119.593",cy:"258.664",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),y.jsx("ellipse",{cx:"101.03",cy:"260.545",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),y.jsx("ellipse",{cx:"108.459",cy:"265.905",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),y.jsx("ellipse",{cx:"89.193",cy:"265.433",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),y.jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:n,fillRule:"nonzero",opacity:"0.1"}),y.jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:n,fillRule:"nonzero",opacity:"0.1"}),y.jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:n,fillRule:"nonzero",opacity:"0.1"}),y.jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:n,fillRule:"nonzero",opacity:"0.1"}),y.jsx("path",{fill:r,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),y.jsx("path",{fill:r,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})})},Pse=v.memo(Ase),Dse=()=>y.jsxs("svg",{width:"480",height:"360",viewBox:"0 0 480 360",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsxs("g",{id:"illustrations/illustration_empty_content",children:[y.jsxs("g",{id:"Illustration/Background",children:[y.jsx("path",{id:"BG",opacity:"0.16",fillRule:"evenodd",clipRule:"evenodd",d:"M0 198.781C0 240.238 14.9454 278.016 39.539 306.566C67.7534 339.331 108.667 359.931 154.273 360C174.204 360.029 193.262 356.113 210.768 348.964C219.819 345.265 229.95 345.69 238.716 350.071C248.999 355.204 260.514 358.082 272.673 358.082C277.696 358.082 282.615 357.587 287.373 356.648C300.954 353.978 313.313 347.658 323.462 338.708C329.841 333.081 338.01 330.252 346.36 330.262H346.502C374.091 330.262 399.717 321.53 420.994 306.566C440.015 293.206 455.548 274.87 465.898 253.341C474.92 234.581 480 213.388 480 190.958C480 114.027 420.226 51.6534 346.502 51.6534C338.986 51.6534 331.622 52.3158 324.439 53.5518C305.418 21.4201 271.355 0 232.498 0C216.093 0 200.54 3.81769 186.619 10.6612C173.379 17.1483 161.608 26.3663 151.978 37.6C119.281 38.144 89.048 49.2899 64.303 67.8914C25.3514 97.1552 0 144.882 0 198.781Z",fill:"url(#paint0_linear_0_9560)"}),y.jsxs("g",{id:"Vector",opacity:"0.2",children:[y.jsx("path",{d:"M271.929 75.6377C269.408 75.6377 266.889 74.6804 264.971 72.7652C261.134 68.9346 261.134 62.7023 264.971 58.8724C268.806 55.0432 275.05 55.0419 278.886 58.8724C282.723 62.703 282.723 68.9353 278.886 72.7652C276.968 74.6804 274.448 75.6377 271.929 75.6377ZM271.929 62.7714C271.147 62.7714 270.364 63.0681 269.769 63.663C268.578 64.8513 268.578 66.7856 269.769 67.9746C270.96 69.1629 272.896 69.1636 274.087 67.9746C275.278 66.7862 275.278 64.852 274.087 63.663C273.492 63.0688 272.71 62.7714 271.929 62.7714Z",fill:"#919EAB"}),y.jsx("path",{d:"M194.574 305C192.054 305 189.534 304.042 187.616 302.127C183.779 298.297 183.779 292.065 187.616 288.235C191.451 284.405 197.696 284.405 201.532 288.235C205.368 292.065 205.368 298.298 201.532 302.127C199.614 304.043 197.093 305 194.574 305ZM194.574 292.134C193.792 292.134 193.01 292.43 192.414 293.025C191.223 294.214 191.223 296.148 192.414 297.337C193.605 298.526 195.541 298.526 196.733 297.337C197.923 296.148 197.923 294.214 196.733 293.025C196.138 292.431 195.355 292.134 194.574 292.134Z",fill:"#919EAB"})]}),y.jsxs("g",{id:"Vector_2",opacity:"0.2",children:[y.jsx("path",{d:"M366.607 258.732C365.739 258.732 364.87 258.401 364.208 257.74L360.16 253.699L356.112 257.74C354.788 259.062 352.639 259.062 351.315 257.74C349.989 256.417 349.989 254.272 351.315 252.949L357.761 246.513C359.085 245.19 361.235 245.19 362.559 246.513L369.006 252.949C370.331 254.272 370.331 256.417 369.006 257.74C368.344 258.4 367.475 258.732 366.607 258.732Z",fill:"#919EAB"}),y.jsx("path",{d:"M127.287 245.825C126.419 245.825 125.549 245.495 124.888 244.833L120.84 240.793L116.792 244.833C115.468 246.156 113.318 246.156 111.994 244.833C110.669 243.51 110.669 241.365 111.994 240.043L118.441 233.607C119.765 232.284 121.915 232.284 123.239 233.607L129.685 240.043C131.011 241.366 131.011 243.511 129.685 244.833C129.023 245.494 128.154 245.825 127.287 245.825Z",fill:"#919EAB"})]})]}),y.jsx("path",{id:"Subtract",opacity:"0.16",fillRule:"evenodd",clipRule:"evenodd",d:"M172.018 173.478H195.091C198.279 173.478 200.859 170.902 200.859 167.719C200.859 164.536 198.279 161.96 195.091 161.96H172.018C168.829 161.96 166.25 164.536 166.25 167.719C166.25 170.902 168.829 173.478 172.018 173.478ZM310.455 161.96H252.773C249.584 161.96 247.004 164.536 247.004 167.719V236.824C247.004 240.007 249.584 242.582 252.773 242.582H310.455C313.643 242.582 316.223 240.007 316.223 236.824V167.719C316.223 164.536 313.643 161.96 310.455 161.96ZM166.25 190.754C166.25 187.571 168.829 184.995 172.018 184.995H229.7C232.888 184.995 235.468 187.571 235.468 190.754C235.468 193.937 232.888 196.513 229.7 196.513H172.018C168.829 196.513 166.25 193.937 166.25 190.754ZM172.018 208.03C168.829 208.03 166.25 210.606 166.25 213.789C166.25 216.972 168.829 219.548 172.018 219.548H229.7C232.888 219.548 235.468 216.972 235.468 213.789C235.468 210.606 232.888 208.03 229.7 208.03H172.018ZM166.25 236.824C166.25 233.641 168.829 231.065 172.018 231.065H229.7C232.888 231.065 235.468 233.641 235.468 236.824C235.468 240.007 232.888 242.582 229.7 242.582H172.018C168.829 242.582 166.25 240.007 166.25 236.824Z",fill:"#919EAB"}),y.jsx("path",{id:"Subtract_2",fillRule:"evenodd",clipRule:"evenodd",d:"M142.023 145.836V247.185C142.023 254.821 148.213 261.01 155.848 261.01H326.624C334.259 261.01 340.449 254.821 340.449 247.185V145.836H142.023ZM195.09 173.478H172.017C168.829 173.478 166.249 170.902 166.249 167.719C166.249 164.536 168.829 161.961 172.017 161.961H195.09C198.278 161.961 200.858 164.536 200.858 167.719C200.858 170.902 198.278 173.478 195.09 173.478ZM252.772 161.961H310.454C313.642 161.961 316.222 164.536 316.222 167.719V236.824C316.222 240.007 313.642 242.583 310.454 242.583H252.772C249.584 242.583 247.004 240.007 247.004 236.824V167.719C247.004 164.536 249.584 161.961 252.772 161.961ZM172.017 184.995C168.829 184.995 166.249 187.571 166.249 190.754C166.249 193.937 168.829 196.513 172.017 196.513H229.699C232.888 196.513 235.467 193.937 235.467 190.754C235.467 187.571 232.888 184.995 229.699 184.995H172.017ZM166.249 213.789C166.249 210.606 168.829 208.03 172.017 208.03H229.699C232.888 208.03 235.467 210.606 235.467 213.789C235.467 216.972 232.888 219.548 229.699 219.548H172.017C168.829 219.548 166.249 216.972 166.249 213.789ZM172.017 231.065C168.829 231.065 166.249 233.641 166.249 236.824C166.249 240.007 168.829 242.583 172.017 242.583H229.699C232.888 242.583 235.467 240.007 235.467 236.824C235.467 233.641 232.888 231.065 229.699 231.065H172.017Z",fill:"#919EAB",fillOpacity:"0.48"}),y.jsx("path",{id:"Intersect",opacity:"0.16",fillRule:"evenodd",clipRule:"evenodd",d:"M340.45 113.591C340.45 105.956 334.26 99.7661 326.625 99.7661H155.848C148.213 99.7661 142.023 105.956 142.023 113.591V145.836H340.45V113.591ZM172.018 117.042C168.788 117.042 166.25 119.576 166.25 122.801C166.25 126.025 168.788 128.56 172.018 128.56C175.249 128.56 177.786 126.025 177.786 122.801C177.786 119.576 175.249 117.042 172.018 117.042ZM195.091 117.042C191.86 117.042 189.323 119.576 189.323 122.801C189.323 126.025 191.86 128.56 195.091 128.56C198.321 128.56 200.859 126.025 200.859 122.801C200.859 119.576 198.321 117.042 195.091 117.042ZM218.164 117.042C214.933 117.042 212.395 119.576 212.395 122.801C212.395 126.025 214.933 128.56 218.164 128.56C221.394 128.56 223.932 126.025 223.932 122.801C223.932 119.576 221.394 117.042 218.164 117.042Z",fill:"#919EAB"}),y.jsx("path",{id:"Intersect_2",opacity:"0.8",fillRule:"evenodd",clipRule:"evenodd",d:"M172.018 117.042C168.787 117.042 166.25 119.576 166.25 122.801C166.25 126.026 168.787 128.56 172.018 128.56C175.248 128.56 177.786 126.026 177.786 122.801C177.786 119.576 175.248 117.042 172.018 117.042ZM195.091 117.042C191.86 117.042 189.322 119.576 189.322 122.801C189.322 126.026 191.86 128.56 195.091 128.56C198.321 128.56 200.859 126.026 200.859 122.801C200.859 119.576 198.321 117.042 195.091 117.042ZM218.163 117.042C214.933 117.042 212.395 119.576 212.395 122.801C212.395 126.026 214.933 128.56 218.163 128.56C221.394 128.56 223.932 126.026 223.932 122.801C223.932 119.576 221.394 117.042 218.163 117.042Z",fill:"#919EAB"})]}),y.jsx("defs",{children:y.jsxs("linearGradient",{id:"paint0_linear_0_9560",x1:"328.81",y1:"424.032",x2:"505.393",y2:"26.0479",gradientUnits:"userSpaceOnUse",children:[y.jsx("stop",{stopColor:"#919EAB"}),y.jsx("stop",{offset:"1",stopColor:"#919EAB",stopOpacity:"0.01"})]})})]}),Ik=({text:t,sx:e})=>y.jsxs(O.Stack,{alignItems:"center",justifyContent:"center",gap:3.75,sx:{textAlign:"center",height:1,backgroundColor:"grey.0",padding:2,borderRadius:2,"& svg":{width:"100%"},...e},children:[y.jsx(Dse,{}),y.jsx(O.Typography,{variant:"body1",sx:{color:"text.secondary"},children:t})]}),$k=()=>{const{localeText:{noRowsLabel:t}}=ui.useGridRootProps();return y.jsx(Ik,{text:t,sx:{"& svg":{height:200}}})},_se=({columns:t,rows:e,loading:n,fetching:r,localeText:i,paginationModel:o={page:0,pageSize:10},rowHeight:s=72,sx:a,...l})=>{const u=[{...ui.GRID_CHECKBOX_SELECTION_COL_DEF,width:71},...t],c=v.useCallback(h=>({bottom:h.isLastVisible?0:8}),[]);return y.jsxs(O.Stack,{position:"relative",borderRadius:2,overflow:"hidden",children:[r&&y.jsx(Hh,{sx:{zIndex:1}}),y.jsx(ui.DataGridPremium,{columns:u,rows:e,loading:n,autoHeight:!0,rowHeight:s,getRowSpacing:c,slots:{loadingOverlay:Ese,noRowsOverlay:$k,noResultsOverlay:$k},localeText:{actionsCellMore:"Ações",aggregationFunctionLabelAvg:"Média",aggregationFunctionLabelMax:"Máx",aggregationFunctionLabelMin:"Mín",aggregationFunctionLabelSize:"Quantidade",aggregationFunctionLabelSum:"Soma",aggregationMenuItemHeader:"Agregação",booleanCellFalseLabel:"Ativos",booleanCellTrueLabel:"Inativos",checkboxSelectionHeaderName:"Coluna se Seleção",columnHeaderFiltersLabel:"Filtro",columnMenuFilter:"Filtrar",columnMenuHideColumn:"Ocultar coluna",columnMenuLabel:"Colunas",columnMenuManageColumns:"Gerenciar colunas",columnsPanelHideAllButton:"Ocultar todas",columnsPanelShowAllButton:"Mostar todas",columnsPanelTextFieldLabel:"Buscar coluna",columnsPanelTextFieldPlaceholder:"Digite o nome da coluna",filterPanelAddFilter:"Adicionar filtro",filterPanelColumns:"Colunas",filterPanelDeleteIconLabel:"Remover",filterPanelInputLabel:"Filtro",filterPanelInputPlaceholder:"Valor do filtro",filterPanelLogicOperator:"Condição",filterPanelOperator:"Condição",filterPanelOperatorAnd:"e",filterPanelOperatorOr:"ou",filterPanelRemoveAll:"Remover todos",groupColumn:h=>`Agrupar por ${h}`,groupingColumnHeaderName:"Grupo",pinToLeft:"Fixar na esquerda",pinToRight:"Fixar na direita",toolbarColumns:"Colunas",toolbarDensity:"Densidade",toolbarDensityComfortable:"Confortável",toolbarDensityCompact:"Compacto",toolbarDensityStandard:"Padrão",toolbarExport:"Exportar",toolbarExportCSV:"Exportar como CSV",toolbarExportExcel:"Exportar como Excel",toolbarExportLabel:"Exportar",toolbarExportPrint:"Imprimir",toolbarFilters:"Filtros",unGroupColumn:h=>`Parar de agrupar por ${h}`,unpin:"Desafixar",footerRowSelected:h=>`${h} ${h===1?"linha selecionada":"linhas selecionadas"}`,MuiTablePagination:{labelRowsPerPage:"Itens por página",labelDisplayedRows:h=>`${h.from}-${h.to} de ${h.count}`},noRowsLabel:"Nenhum registro para ser apresentado",...i},sx:{...a,"& .MuiDataGrid-virtualScroller, & .MuiDataGrid-virtualScrollerContent":{minHeight:n?s*o.pageSize:s*e.length,...e.length===0&&{height:400}}},...l})]})},Ise=({children:t,waitBeforeShow:e=500})=>{const[n,r]=v.useState(!1);return v.useEffect(()=>{const i=setTimeout(()=>r(!0),e);return()=>clearTimeout(i)},[e]),n?t:null};var $se=!!(typeof window<"u"&&window.document&&window.document.createElement),Fse=$se;const Fk=Gi(Fse);var Qs=function(){return Qs=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Qs.apply(this,arguments)},Js=null,Lk=null;Fk&&window.addEventListener("resize",function(){Lk!==window.devicePixelRatio&&(Lk=window.devicePixelRatio,Js=null)});function Rk(){if(Js===null){if(typeof document>"u")return Js=0,Js;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),Js=n}return Js}function Bk(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function Nk(t){return!t||!t.ownerDocument?document:t.ownerDocument}var jk=function(t){var e={},n=Array.prototype.reduce.call(t,function(r,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var s=o[1].replace(/\W+(.)/g,function(a,l){return l.toUpperCase()});switch(i.value){case"true":r[s]=!0;break;case"false":r[s]=!1;break;case void 0:r[s]=!0;break;default:r[s]=i.value}}return r},e);return n};function Vk(t,e){var n;t&&(n=t.classList).add.apply(n,e.split(" "))}function zk(t,e){t&&e.split(" ").forEach(function(n){t.classList.remove(n)})}function Wk(t){return".".concat(t.split(" ").join("."))}var Lse=Object.freeze({__proto__:null,getElementWindow:Bk,getElementDocument:Nk,getOptions:jk,addClasses:Vk,removeClasses:zk,classNamesToQuery:Wk}),Ti=Bk,vm=Nk,Rse=jk,Ei=Vk,Oi=zk,Cn=Wk,qh=function(){function t(e,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var i=Ti(r.el);r.scrollXTicking||(i.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(i.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,Ei(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){Oi(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(Ei(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){Oi(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(i){r.mouseX=i.clientX,r.mouseY=i.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(i){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var o,s;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(o=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(s=r.isWithinBounds(r.axis.y.track.rect)),(o||s)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(o&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(i,"x"):r.onTrackClick(i,"x")),s&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(i,"y"):r.onTrackClick(i,"y"))))}},this.drag=function(i){var o,s,a,l,u,c,h,f,d,p,g;if(!(!r.draggedAxis||!r.contentWrapperEl)){var m,b=r.axis[r.draggedAxis].track,x=(s=(o=b.rect)===null||o===void 0?void 0:o[r.axis[r.draggedAxis].sizeAttr])!==null&&s!==void 0?s:0,C=r.axis[r.draggedAxis].scrollbar,k=(l=(a=r.contentWrapperEl)===null||a===void 0?void 0:a[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&l!==void 0?l:0,w=parseInt((c=(u=r.elStyles)===null||u===void 0?void 0:u[r.axis[r.draggedAxis].sizeAttr])!==null&&c!==void 0?c:"0px",10);i.preventDefault(),i.stopPropagation(),r.draggedAxis==="y"?m=i.pageY:m=i.pageX;var T=m-((f=(h=b.rect)===null||h===void 0?void 0:h[r.axis[r.draggedAxis].offsetAttr])!==null&&f!==void 0?f:0)-r.axis[r.draggedAxis].dragOffset;T=r.draggedAxis==="x"&&r.isRtl?((p=(d=b.rect)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&p!==void 0?p:0)-C.size-T:T;var S=T/(x-C.size),M=S*(k-w);r.draggedAxis==="x"&&r.isRtl&&(M=!((g=t.getRtlHelpers())===null||g===void 0)&&g.isScrollingToNegative?-M:M),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=M}},this.onEndDrag=function(i){var o=vm(r.el),s=Ti(r.el);i.preventDefault(),i.stopPropagation(),Oi(r.el,r.classNames.dragging),o.removeEventListener("mousemove",r.drag,!0),o.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=s.setTimeout(function(){o.removeEventListener("click",r.preventClick,!0),o.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=e,this.options=Qs(Qs({},t.defaultOptions),n),this.classNames=Qs(Qs({},t.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=US(this._onMouseMove,64),this.onWindowResize=Pl(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Pl(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Pl(this._onMouseEntered,this.stopScrollDelay),this.init()}return t.getRtlHelpers=function(){if(t.rtlHelpers)return t.rtlHelpers;var e=document.createElement("div");e.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=e.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var i=t.getOffset(n),o=t.getOffset(r);n.scrollLeft=-999;var s=t.getOffset(r);return document.body.removeChild(n),t.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.left!==s.left},t.rtlHelpers},t.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Rk()}catch{return Rk()}},t.getOffset=function(e){var n=e.getBoundingClientRect(),r=vm(e),i=Ti(e);return{top:n.top+(i.pageYOffset||r.documentElement.scrollTop),left:n.left+(i.pageXOffset||r.documentElement.scrollLeft)}},t.prototype.init=function(){Fk&&(this.initDOM(),this.rtlHelpers=t.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.prototype.initDOM=function(){var e,n;this.wrapperEl=this.el.querySelector(Cn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Cn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Cn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Cn(this.classNames.offset)),this.maskEl=this.el.querySelector(Cn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Cn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Cn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Cn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Cn(this.classNames.track)).concat(Cn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Cn(this.classNames.track)).concat(Cn(this.classNames.vertical))),this.axis.x.scrollbar.el=((e=this.axis.x.track.el)===null||e===void 0?void 0:e.querySelector(Cn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(Cn(this.classNames.scrollbar)))||null,this.options.autoHide||(Ei(this.axis.x.scrollbar.el,this.classNames.visible),Ei(this.axis.y.scrollbar.el,this.classNames.visible))},t.prototype.initListeners=function(){var e=this,n,r=Ti(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var i=!1,o=r.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){i&&r.requestAnimationFrame(function(){e.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){i=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){e.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},t.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var e=Ti(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||n>0,o=this.contentWrapperEl.offsetWidth,s=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var l=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=i?"".concat(n||u,"px"):"auto",this.placeholderEl.style.height="".concat(l,"px");var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&u>n,this.axis.y.isOverflowing=l>c,this.axis.x.isOverflowing=s==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=a==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var h=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>o-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>c-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},t.prototype.getScrollbarSize=function(e){var n,r;if(e===void 0&&(e="y"),!this.axis[e].isOverflowing||!this.contentEl)return 0;var i=this.contentEl[this.axis[e].scrollSizeAttr],o=(r=(n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])!==null&&r!==void 0?r:0,s=o/i,a;return a=Math.max(~~(s*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.prototype.positionScrollbar=function(e){var n,r,i;e===void 0&&(e="y");var o=this.axis[e].scrollbar;if(!(!this.axis[e].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var s=this.contentWrapperEl[this.axis[e].scrollSizeAttr],a=((n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])||0,l=parseInt(this.elStyles[this.axis[e].sizeAttr],10),u=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];u=e==="x"&&this.isRtl&&(!((r=t.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-u:u,e==="x"&&this.isRtl&&(u=!((i=t.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?u:-u);var c=u/(s-l),h=~~((a-o.size)*c);h=e==="x"&&this.isRtl?-h+(a-o.size):h,o.el.style.transform=e==="x"?"translate3d(".concat(h,"px, 0, 0)"):"translate3d(0, ".concat(h,"px, 0)")}},t.prototype.toggleTrackVisibility=function(e){e===void 0&&(e="y");var n=this.axis[e].track.el,r=this.axis[e].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[e].isOverflowing||this.axis[e].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(e))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(e))),this.axis[e].isOverflowing?r.style.display="block":r.style.display="none")},t.prototype.showScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&!this.axis[e].scrollbar.isVisible&&(Ei(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!0)},t.prototype.hideScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&this.axis[e].scrollbar.isVisible&&(Oi(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!1)},t.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},t.prototype.onMouseMoveForAxis=function(e){e===void 0&&(e="y");var n=this.axis[e];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(e),Ei(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?Ei(n.scrollbar.el,this.classNames.hover):Oi(n.scrollbar.el,this.classNames.hover)):(Oi(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)))},t.prototype.onMouseLeaveForAxis=function(e){e===void 0&&(e="y"),Oi(this.axis[e].track.el,this.classNames.hover),Oi(this.axis[e].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)},t.prototype.onDragStart=function(e,n){var r;n===void 0&&(n="y");var i=vm(this.el),o=Ti(this.el),s=this.axis[n].scrollbar,a=n==="y"?e.pageY:e.pageX;this.axis[n].dragOffset=a-(((r=s.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,Ei(this.el,this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.prototype.onTrackClick=function(e,n){var r=this,i,o,s,a;n===void 0&&(n="y");var l=this.axis[n];if(!(!this.options.clickOnTrack||!l.scrollbar.el||!this.contentWrapperEl)){e.preventDefault();var u=Ti(this.el);this.axis[n].scrollbar.rect=l.scrollbar.el.getBoundingClientRect();var c=this.axis[n].scrollbar,h=(o=(i=c.rect)===null||i===void 0?void 0:i[this.axis[n].offsetAttr])!==null&&o!==void 0?o:0,f=parseInt((a=(s=this.elStyles)===null||s===void 0?void 0:s[this.axis[n].sizeAttr])!==null&&a!==void 0?a:"0px",10),d=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],p=n==="y"?this.mouseY-h:this.mouseX-h,g=p<0?-1:1,m=g===-1?d-f:d+f,b=40,x=function(){r.contentWrapperEl&&(g===-1?d>m&&(d-=b,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=d,u.requestAnimationFrame(x)):d<m&&(d+=b,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=d,u.requestAnimationFrame(x)))};x()}},t.prototype.getContentElement=function(){return this.contentEl},t.prototype.getScrollElement=function(){return this.contentWrapperEl},t.prototype.removeListeners=function(){var e=Ti(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},t.prototype.unMount=function(){this.removeListeners()},t.prototype.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.prototype.findChild=function(e,n){var r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(i){return r.call(i,n)})[0]},t.rtlHelpers=null,t.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},t.getOptions=Rse,t.helpers=Lse,t}(),Fn=function(){return Fn=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Fn.apply(this,arguments)};function Bse(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}var Hk=Ce.forwardRef(function(t,e){var n=t.children,r=t.scrollableNodeProps,i=r===void 0?{}:r,o=Bse(t,["children","scrollableNodeProps"]),s=Ce.useRef(),a=Ce.useRef(),l=Ce.useRef(),u={},c={};Object.keys(o).forEach(function(d){Object.prototype.hasOwnProperty.call(qh.defaultOptions,d)?u[d]=o[d]:c[d]=o[d]});var h=Fn(Fn({},qh.defaultOptions.classNames),u.classNames),f=Fn(Fn({},i),{className:"".concat(h.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:0,role:"region","aria-label":u.ariaLabel||qh.defaultOptions.ariaLabel});return Ce.useEffect(function(){var d;return a.current=f.ref?f.ref.current:a.current,s.current&&(d=new qh(s.current,Fn(Fn(Fn({},u),a.current&&{scrollableNode:a.current}),l.current&&{contentNode:l.current})),typeof e=="function"?e(d):e&&(e.current=d)),function(){d==null||d.unMount(),d=null,typeof e=="function"&&e(null)}},[]),Ce.createElement("div",Fn({"data-simplebar":"init",ref:s},c),Ce.createElement("div",{className:h.wrapper},Ce.createElement("div",{className:h.heightAutoObserverWrapperEl},Ce.createElement("div",{className:h.heightAutoObserverEl})),Ce.createElement("div",{className:h.mask},Ce.createElement("div",{className:h.offset},typeof n=="function"?n({scrollableNodeRef:a,scrollableNodeProps:Fn(Fn({},f),{ref:a}),contentNodeRef:l,contentNodeProps:{className:h.contentEl,ref:l}}):Ce.createElement("div",Fn({},f),Ce.createElement("div",{className:h.contentEl},n)))),Ce.createElement("div",{className:h.placeholder})),Ce.createElement("div",{className:"".concat(h.track," simplebar-horizontal")},Ce.createElement("div",{className:h.scrollbar})),Ce.createElement("div",{className:"".concat(h.track," simplebar-vertical")},Ce.createElement("div",{className:h.scrollbar})))});Hk.displayName="SimpleBar";const Nse=yr("div")(()=>({flexGrow:1,height:"100%",overflow:"hidden"})),jse=yr(Hk)(({theme:t})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:Y(t.palette.grey[600],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-mask":{zIndex:"inherit"}})),Vse=({children:t,sx:e,...n})=>{const r=typeof navigator>"u"?"SSR":navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(r)?y.jsx(O.Box,{sx:{overflowX:"auto",...e},...n,children:t}):y.jsx(Nse,{children:y.jsx(jse,{clickOnTrack:!1,sx:e,...n,children:t})})},qk=v.memo(Vse),zse=O.styled(O.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,padding:"22px 20px"})),Wse=O.styled(O.Stack)({padding:32}),Hse=({headerTitle:t,onClose:e,children:n,contentProps:r,...i})=>y.jsxs(O.Drawer,{anchor:"right",PaperProps:{sx:{width:1,maxWidth:684}},onClose:e,...i,children:[y.jsxs(zse,{children:[y.jsx(O.Typography,{variant:"subtitle1",children:t}),y.jsx(O.IconButton,{onClick:e,children:y.jsx(bt,{icon:"ic:round-close"})})]}),y.jsx(qk,{children:y.jsx(Wse,{...r,children:n})})]}),qse=yr(O.Box)(({theme:t})=>({overflow:"hidden",position:"relative",borderRadius:t.shape.borderRadius,border:`solid 1px ${Y(t.palette.grey[500],.32)}`,"& .ql-container.ql-snow":{borderColor:"transparent",...t.typography.body1,fontFamily:t.typography.fontFamily},"& .ql-editor":{minHeight:200,maxHeight:640,"&.ql-blank::before":{fontStyle:"normal",color:t.palette.text.disabled},"& pre.ql-syntax":{...t.typography.body2,padding:t.spacing(2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.grey[900]}}})),Use=yr("div")(({theme:t})=>{const e=t.direction==="rtl";return{"& .ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button:focus .ql-fill, .ql-snow .ql-toolbar button:focus .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill":{fill:t.palette.primary.main},"& .ql-snow.ql-toolbar button:hover, .ql-snow .ql-toolbar button:hover, .ql-snow.ql-toolbar button:focus, .ql-snow .ql-toolbar button:focus, .ql-snow.ql-toolbar button.ql-active, .ql-snow .ql-toolbar button.ql-active, .ql-snow.ql-toolbar .ql-picker-label:hover, .ql-snow .ql-toolbar .ql-picker-label:hover, .ql-snow.ql-toolbar .ql-picker-label.ql-active, .ql-snow .ql-toolbar .ql-picker-label.ql-active, .ql-snow.ql-toolbar .ql-picker-item:hover, .ql-snow .ql-toolbar .ql-picker-item:hover, .ql-snow.ql-toolbar .ql-picker-item.ql-selected, .ql-snow .ql-toolbar .ql-picker-item.ql-selected":{color:t.palette.primary.main},"& .ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button:focus .ql-stroke, .ql-snow .ql-toolbar button:focus .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke, .ql-snow .ql-toolbar button.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow.ql-toolbar button:hover .ql-stroke-miter, .ql-snow .ql-toolbar button:hover .ql-stroke-miter, .ql-snow.ql-toolbar button:focus .ql-stroke-miter, .ql-snow .ql-toolbar button:focus .ql-stroke-miter, .ql-snow.ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter":{stroke:t.palette.primary.main},"& .ql-stroke":{stroke:t.palette.text.primary},"& .ql-fill, .ql-stroke.ql-fill":{fill:t.palette.text.primary},"& .ql-picker, .ql-picker-options, .ql-picker-item, .ql-picker-label, button":{"&:focus":{outline:"none"}},"& .ql-toolbar.ql-snow":{border:"none",borderBottom:`solid 1px ${Y(t.palette.grey[500],.32)}`,"& .ql-formats":{"&:not(:last-of-type)":{marginRight:t.spacing(2)}},"& button":{padding:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,color:t.palette.text.primary},"& button svg, span svg":{width:20,height:20},"& .ql-picker-label":{...t.typography.subtitle2,color:t.palette.text.primary,"& .ql-stroke":{stroke:t.palette.text.primary}},"& .ql-picker-label svg":{...e&&{right:"0 !important",left:"auto !important"}},"& .ql-color,& .ql-background,& .ql-align ":{"& .ql-picker-label":{padding:0,display:"flex",alignItems:"center",justifyContent:"center"}},"& .ql-expanded":{"& .ql-picker-label":{borderRadius:4,color:t.palette.text.disabled,borderColor:"transparent !important",backgroundColor:t.palette.action.focus,"& .ql-stroke":{stroke:t.palette.text.disabled}},"& .ql-picker-options":{padding:0,marginTop:4,border:"none",maxHeight:200,overflow:"auto",boxShadow:t.customShadows.z20,borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.paper},"& .ql-picker-item":{color:t.palette.text.primary},"&.ql-align":{"& .ql-picker-options":{padding:0,display:"flex"},"& .ql-picker-item":{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"}},"&.ql-color, &.ql-background":{"& .ql-picker-options":{padding:8},"& .ql-picker-item":{margin:3,borderRadius:4,"&.ql-selected":{border:"solid 1px black"}}},"&.ql-font, &.ql-size, &.ql-header":{"& .ql-picker-options":{padding:t.spacing(1,0)},"& .ql-picker-item":{padding:t.spacing(.5,1.5)}}}}}}),Yse=["Título 1","Título 2","Título 3","Título 4","Título 5","Título 6"],Gse=({id:t,isSimple:e,...n})=>y.jsx(Use,{...n,children:y.jsxs("div",{id:t,children:[y.jsx("div",{className:"ql-formats",children:y.jsxs("select",{className:"ql-header",defaultValue:"",children:[Yse.map((r,i)=>y.jsx("option",{value:i+1,children:r},r)),y.jsx("option",{value:"",children:"Normal"})]})}),y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-bold"}),y.jsx("button",{type:"button",className:"ql-italic"}),y.jsx("button",{type:"button",className:"ql-underline"}),y.jsx("button",{type:"button",className:"ql-strike"})]}),!e&&y.jsxs("div",{className:"ql-formats",children:[y.jsx("select",{className:"ql-color"}),y.jsx("select",{className:"ql-background"})]}),y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-list",value:"ordered"}),y.jsx("button",{type:"button",className:"ql-list",value:"bullet"}),!e&&y.jsx("button",{type:"button",className:"ql-indent",value:"-1"}),!e&&y.jsx("button",{type:"button",className:"ql-indent",value:"+1"})]}),!e&&y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-script",value:"super"}),y.jsx("button",{type:"button",className:"ql-script",value:"sub"})]}),!e&&y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-code-block"}),y.jsx("button",{type:"button",className:"ql-blockquote"})]}),y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-direction",value:"rtl"}),y.jsx("select",{className:"ql-align"})]}),y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-link"}),y.jsx("button",{type:"button",className:"ql-image"}),y.jsx("button",{type:"button",className:"ql-video"})]}),y.jsxs("div",{className:"ql-formats",children:[!e&&y.jsx("button",{type:"button",className:"ql-formula"}),y.jsx("button",{type:"button",className:"ql-clean"})]})]})}),Uk=({id:t="minimal-quill",error:e,simple:n=!1,helperText:r,sx:i})=>y.jsxs(O.Stack,{children:[y.jsxs(qse,{sx:{...e&&{border:o=>`solid 1px ${o.palette.error.main}`},...i},children:[y.jsx(Gse,{id:t,isSimple:n}),"<ReactQuill"]}),r&&y.jsx(O.FormHelperText,{error:!!e,sx:{px:2},children:r})]});/*! *****************************************************************************
137
+ Copyright (c) Microsoft Corporation.
138
+
139
+ Permission to use, copy, modify, and/or distribute this software for any
140
+ purpose with or without fee is hereby granted.
141
+
142
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
143
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
144
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
145
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
146
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
147
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
148
+ PERFORMANCE OF THIS SOFTWARE.
149
+ ***************************************************************************** */var ym=function(t,e){return ym=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ym(t,e)};function Kse(t,e){ym(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var sn=function(){return sn=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},sn.apply(this,arguments)},Yk=!1,Co,bm,xm,Uh,Yh,Gk,Gh,wm,Cm,Sm,Kk,km,Tm,Xk,Zk;function Sn(){if(!Yk){Yk=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(km=/\b(iPhone|iP[ao]d)/.exec(t),Tm=/\b(iP[ao]d)/.exec(t),Sm=/Android/i.exec(t),Xk=/FBAN\/\w+;/i.exec(t),Zk=/Mobile/i.exec(t),Kk=!!/Win64/.exec(t),e){Co=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Co&&document&&document.documentMode&&(Co=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);Gk=r?parseFloat(r[1])+4:Co,bm=e[2]?parseFloat(e[2]):NaN,xm=e[3]?parseFloat(e[3]):NaN,Uh=e[4]?parseFloat(e[4]):NaN,Uh?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),Yh=e&&e[1]?parseFloat(e[1]):NaN):Yh=NaN}else Co=bm=xm=Yh=Uh=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);Gh=i?parseFloat(i[1].replace("_",".")):!0}else Gh=!1;wm=!!n[2],Cm=!!n[3]}else Gh=wm=Cm=!1}}var Em={ie:function(){return Sn()||Co},ieCompatibilityMode:function(){return Sn()||Gk>Co},ie64:function(){return Em.ie()&&Kk},firefox:function(){return Sn()||bm},opera:function(){return Sn()||xm},webkit:function(){return Sn()||Uh},safari:function(){return Em.webkit()},chrome:function(){return Sn()||Yh},windows:function(){return Sn()||wm},osx:function(){return Sn()||Gh},linux:function(){return Sn()||Cm},iphone:function(){return Sn()||km},mobile:function(){return Sn()||km||Tm||Sm||Zk},nativeApp:function(){return Sn()||Xk},android:function(){return Sn()||Sm},ipad:function(){return Sn()||Tm}},Xse=Em,Kh=!!(typeof window<"u"&&window.document&&window.document.createElement),Zse={canUseDOM:Kh,canUseWorkers:typeof Worker<"u",canUseEventListeners:Kh&&!!(window.addEventListener||window.attachEvent),canUseViewport:Kh&&!!window.screen,isInWorker:!Kh},Qse=Zse,Qk=Qse,Jk;Qk.canUseDOM&&(Jk=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
150
+ * Checks if an event is supported in the current execution environment.
151
+ *
152
+ * NOTE: This will not work correctly for non-generic events such as `change`,
153
+ * `reset`, `load`, `error`, and `select`.
154
+ *
155
+ * Borrows from Modernizr.
156
+ *
157
+ * @param {string} eventNameSuffix Event name, e.g. "click".
158
+ * @param {?boolean} capture Check if the capture phase is supported.
159
+ * @return {boolean} True if the event is supported.
160
+ * @internal
161
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
162
+ */function Jse(t,e){if(!Qk.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&Jk&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var eae=Jse,tae=Xse,nae=eae,e3=10,t3=40,n3=800;function r3(t){var e=0,n=0,r=0,i=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=e*e3,i=n*e3,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||i)&&t.deltaMode&&(t.deltaMode==1?(r*=t3,i*=t3):(r*=n3,i*=n3)),r&&!e&&(e=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:i}}r3.getEventType=function(){return tae.firefox()?"DOMMouseScroll":nae("wheel")?"wheel":"mousewheel"};var rae=r3,iae=rae;const oae=Gi(iae);function sae(t,e,n,r,i,o){o===void 0&&(o=0);var s=ea(t,e,o),a=s.width,l=s.height,u=Math.min(a,n),c=Math.min(l,r);return u>c*i?{width:c*i,height:c}:{width:u,height:u/i}}function aae(t){return t.width>t.height?t.width/t.naturalWidth:t.height/t.naturalHeight}function Xh(t,e,n,r,i){i===void 0&&(i=0);var o=ea(e.width,e.height,i),s=o.width,a=o.height;return{x:i3(t.x,s,n.width,r),y:i3(t.y,a,n.height,r)}}function i3(t,e,n,r){var i=e*r/2-n/2;return Zh(t,-i,i)}function o3(t,e){return Math.sqrt(Math.pow(t.y-e.y,2)+Math.pow(t.x-e.x,2))}function s3(t,e){return Math.atan2(e.y-t.y,e.x-t.x)*180/Math.PI}function lae(t,e,n,r,i,o,s){o===void 0&&(o=0),s===void 0&&(s=!0);var a=s?uae:cae,l=ea(e.width,e.height,o),u=ea(e.naturalWidth,e.naturalHeight,o),c={x:a(100,((l.width-n.width/i)/2-t.x/i)/l.width*100),y:a(100,((l.height-n.height/i)/2-t.y/i)/l.height*100),width:a(100,n.width/l.width*100/i),height:a(100,n.height/l.height*100/i)},h=Math.round(a(u.width,c.width*u.width/100)),f=Math.round(a(u.height,c.height*u.height/100)),d=u.width>=u.height*r,p=d?{width:Math.round(f*r),height:f}:{width:h,height:Math.round(h/r)},g=sn(sn({},p),{x:Math.round(a(u.width-p.width,c.x*u.width/100)),y:Math.round(a(u.height-p.height,c.y*u.height/100))});return{croppedAreaPercentages:c,croppedAreaPixels:g}}function uae(t,e){return Math.min(t,Math.max(0,e))}function cae(t,e){return e}function hae(t,e,n,r,i,o){var s=ea(e.width,e.height,n),a=Zh(r.width/s.width*(100/t.width),i,o),l={x:a*s.width/2-r.width/2-s.width*a*(t.x/100),y:a*s.height/2-r.height/2-s.height*a*(t.y/100)};return{crop:l,zoom:a}}function fae(t,e,n){var r=aae(e);return n.height>n.width?n.height/(t.height*r):n.width/(t.width*r)}function dae(t,e,n,r,i,o){n===void 0&&(n=0);var s=ea(e.naturalWidth,e.naturalHeight,n),a=Zh(fae(t,e,r),i,o),l=r.height>r.width?r.height/t.height:r.width/t.width,u={x:((s.width-t.width)/2-t.x)*l,y:((s.height-t.height)/2-t.y)*l};return{crop:u,zoom:a}}function a3(t,e){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function pae(t){return t*Math.PI/180}function ea(t,e,n){var r=pae(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}function Zh(t,e,n){return Math.min(Math.max(t,e),n)}function Qh(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter(function(n){return typeof n=="string"&&n.length>0}).join(" ").trim()}var gae=`.reactEasyCrop_Container {
163
+ position: absolute;
164
+ top: 0;
165
+ left: 0;
166
+ right: 0;
167
+ bottom: 0;
168
+ overflow: hidden;
169
+ user-select: none;
170
+ touch-action: none;
171
+ cursor: move;
172
+ display: flex;
173
+ justify-content: center;
174
+ align-items: center;
175
+ }
176
+
177
+ .reactEasyCrop_Image,
178
+ .reactEasyCrop_Video {
179
+ will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
180
+ }
181
+
182
+ .reactEasyCrop_Contain {
183
+ max-width: 100%;
184
+ max-height: 100%;
185
+ margin: auto;
186
+ position: absolute;
187
+ top: 0;
188
+ bottom: 0;
189
+ left: 0;
190
+ right: 0;
191
+ }
192
+ .reactEasyCrop_Cover_Horizontal {
193
+ width: 100%;
194
+ height: auto;
195
+ }
196
+ .reactEasyCrop_Cover_Vertical {
197
+ width: auto;
198
+ height: 100%;
199
+ }
200
+
201
+ .reactEasyCrop_CropArea {
202
+ position: absolute;
203
+ left: 50%;
204
+ top: 50%;
205
+ transform: translate(-50%, -50%);
206
+ border: 1px solid rgba(255, 255, 255, 0.5);
207
+ box-sizing: border-box;
208
+ box-shadow: 0 0 0 9999em;
209
+ color: rgba(0, 0, 0, 0.5);
210
+ overflow: hidden;
211
+ }
212
+
213
+ .reactEasyCrop_CropAreaRound {
214
+ border-radius: 50%;
215
+ }
216
+
217
+ .reactEasyCrop_CropAreaGrid::before {
218
+ content: ' ';
219
+ box-sizing: border-box;
220
+ position: absolute;
221
+ border: 1px solid rgba(255, 255, 255, 0.5);
222
+ top: 0;
223
+ bottom: 0;
224
+ left: 33.33%;
225
+ right: 33.33%;
226
+ border-top: 0;
227
+ border-bottom: 0;
228
+ }
229
+
230
+ .reactEasyCrop_CropAreaGrid::after {
231
+ content: ' ';
232
+ box-sizing: border-box;
233
+ position: absolute;
234
+ border: 1px solid rgba(255, 255, 255, 0.5);
235
+ top: 33.33%;
236
+ bottom: 33.33%;
237
+ left: 0;
238
+ right: 0;
239
+ border-left: 0;
240
+ border-right: 0;
241
+ }
242
+ `,mae=1,vae=3,yae=function(t){Kse(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.imageRef=v.createRef(),n.videoRef=v.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<"u"?document:null,n.currentWindow=typeof window<"u"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=hae(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,s=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(s)}else if(n.props.initialCroppedAreaPixels){var a=dae(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=a.crop,s=a.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(s)}},n.computeSizes=function(){var r,i,o,s,a,l,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var c=n.containerRect.width/n.containerRect.height,h=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,f=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((s=n.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,d=u.offsetWidth<h||u.offsetHeight<f,p=h/f,g=void 0;if(d){var m=n.getObjectFit();switch(m){default:case"contain":g=c>p?{width:n.containerRect.height*p,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/p};break;case"horizontal-cover":g={width:n.containerRect.width,height:n.containerRect.width/p};break;case"vertical-cover":g={width:n.containerRect.height*p,height:n.containerRect.height};break}}else g={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=sn(sn({},g),{naturalWidth:h,naturalHeight:f}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:sae(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((a=n.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(e.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(e.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(e.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(e.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=e.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var s=n.gestureRotationStart+r.rotation;n.props.onRotationChange(s)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,s=r.x,a=r.y;n.dragStartPosition={x:s,y:a},n.dragStartCrop=sn({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||o===void 0)){var s=i-n.dragStartPosition.x,a=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+s,y:n.dragStartCrop.y+a},u=n.props.restrictPosition?Xh(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=e.getMousePoint(r),o=oae(r).pixelY,s=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(s,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var a,l;return(l=(a=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(a)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var a,l;return(l=(a=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(a)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,s=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(s-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,s=n.props,a=s.crop,l=s.zoom;return{x:(i+a.x)/l,y:(o+a.y)/l}},n.setNewZoom=function(r,i,o){var s=o===void 0?{}:o,a=s.shouldUpdatePosition,l=a===void 0?!0:a;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=Zh(r,n.props.minZoom,n.props.maxZoom);if(l){var c=n.getPointOnContainer(i,n.containerPosition),h=n.getPointOnMedia(c),f={x:h.x*u-c.x,y:h.y*u-c.y},d=n.props.restrictPosition?Xh(f,n.mediaSize,n.state.cropSize,u,n.props.rotation):f;n.props.onCropChange(d)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?Xh(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return lae(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?Xh(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return e.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=gae,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},e.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},e.prototype.componentDidUpdate=function(n){var r,i,o,s,a,l,u,c,h;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=n.crop)===null||a===void 0?void 0:a.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((c=this.props.crop)===null||c===void 0?void 0:c.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((h=this.videoRef.current)===null||h===void 0||h.load())},e.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},e.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,c=l/u;return c<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},e.prototype.onPinchStart=function(n){var r=e.getTouchPoint(n.touches[0]),i=e.getTouchPoint(n.touches[1]);this.lastPinchDistance=o3(r,i),this.lastPinchRotation=s3(r,i),this.onDragStart(a3(r,i))},e.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=e.getTouchPoint(n.touches[0]),o=e.getTouchPoint(n.touches[1]),s=a3(i,o);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=o3(i,o),l=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(l,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=s3(i,o),c=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(c),r.lastPinchRotation=u})}},e.prototype.render=function(){var n=this,r=this.props,i=r.image,o=r.video,s=r.mediaProps,a=r.transform,l=r.crop,u=l.x,c=l.y,h=r.rotation,f=r.zoom,d=r.cropShape,p=r.showGrid,g=r.style,m=g.containerStyle,b=g.cropAreaStyle,x=g.mediaStyle,C=r.classes,k=C.containerClassName,w=C.cropAreaClassName,T=C.mediaClassName,S=this.getObjectFit();return v.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(P){return n.containerRef=P},"data-testid":"container",style:m,className:Qh("reactEasyCrop_Container",k)},i?v.createElement("img",sn({alt:"",className:Qh("reactEasyCrop_Image",S==="contain"&&"reactEasyCrop_Contain",S==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",S==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",T)},s,{src:i,ref:this.imageRef,style:sn(sn({},x),{transform:a||"translate(".concat(u,"px, ").concat(c,"px) rotate(").concat(h,"deg) scale(").concat(f,")")}),onLoad:this.onMediaLoad})):o&&v.createElement("video",sn({autoPlay:!0,loop:!0,muted:!0,className:Qh("reactEasyCrop_Video",S==="contain"&&"reactEasyCrop_Contain",S==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",S==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",T)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:sn(sn({},x),{transform:a||"translate(".concat(u,"px, ").concat(c,"px) rotate(").concat(h,"deg) scale(").concat(f,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map(function(M){return v.createElement("source",sn({key:M.src},M))})),this.state.cropSize&&v.createElement("div",{style:sn(sn({},b),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Qh("reactEasyCrop_CropArea",d==="round"&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",w)}))},e.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:vae,minZoom:mae,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},e.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e}(v.Component);const l3=({crop:t,zoom:e,onCropChange:n,onZoomChange:r,onCropComplete:i,image:{width:o,height:s,aspect:a,imgSrc:l=""}})=>y.jsx(O.Stack,{position:"relative",alignItems:"center",justifyContent:"center",style:{position:"relative",width:o*1.1,height:s*1.1,margin:"auto"},children:y.jsx(yae,{image:l,crop:t,zoom:e,minZoom:1,maxZoom:5,cropSize:{width:o,height:s},aspect:a,onCropChange:n,onZoomChange:r,onCropComplete:i,objectFit:"horizontal-cover"})});function u3(t,e,n=0){return Math.round(10**(n||0)*t)%Math.round(10**(n||0)*e)===0}function bae(t=0){return Math.round(t*100)/100}const xae=Object.freeze(Object.defineProperty({__proto__:null,isMultiple:u3,roundIfNecessary:bae},Symbol.toStringTag,{value:"Module"}));var c3={exports:{}};/*! @preserve
243
+ * numeral.js
244
+ * version : 2.0.6
245
+ * author : Adam Draper
246
+ * license : MIT
247
+ * http://adamwdraper.github.com/Numeral-js/
248
+ */(function(t){(function(e,n){t.exports?t.exports=n():e.numeral=n()})(Da,function(){var e,n,r="2.0.6",i={},o={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},a={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function l(u,c){this._input=u,this._value=c}return e=function(u){var c,h,f,d;if(e.isNumeral(u))c=u.value();else if(u===0||typeof u>"u")c=0;else if(u===null||n.isNaN(u))c=null;else if(typeof u=="string")if(a.zeroFormat&&u===a.zeroFormat)c=0;else if(a.nullFormat&&u===a.nullFormat||!u.replace(/[^0-9]+/g,"").length)c=null;else{for(h in i)if(d=typeof i[h].regexps.unformat=="function"?i[h].regexps.unformat():i[h].regexps.unformat,d&&u.match(d)){f=i[h].unformat;break}f=f||e._.stringToNumber,c=f(u)}else c=Number(u)||null;return new l(u,c)},e.version=r,e.isNumeral=function(u){return u instanceof l},e._=n={numberToFormat:function(u,c,h){var f=o[e.options.currentLocale],d=!1,p=!1,g=0,m="",b=1e12,x=1e9,C=1e6,k=1e3,w="",T=!1,S,M,P,D,R,H,W;if(u=u||0,M=Math.abs(u),e._.includes(c,"(")?(d=!0,c=c.replace(/[\(|\)]/g,"")):(e._.includes(c,"+")||e._.includes(c,"-"))&&(R=e._.includes(c,"+")?c.indexOf("+"):u<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),e._.includes(c,"a")&&(S=c.match(/a(k|m|b|t)?/),S=S?S[1]:!1,e._.includes(c," a")&&(m=" "),c=c.replace(new RegExp(m+"a[kmbt]?"),""),M>=b&&!S||S==="t"?(m+=f.abbreviations.trillion,u=u/b):M<b&&M>=x&&!S||S==="b"?(m+=f.abbreviations.billion,u=u/x):M<x&&M>=C&&!S||S==="m"?(m+=f.abbreviations.million,u=u/C):(M<C&&M>=k&&!S||S==="k")&&(m+=f.abbreviations.thousand,u=u/k)),e._.includes(c,"[.]")&&(p=!0,c=c.replace("[.]",".")),P=u.toString().split(".")[0],D=c.split(".")[1],H=c.indexOf(","),g=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,D?(e._.includes(D,"[")?(D=D.replace("]",""),D=D.split("["),w=e._.toFixed(u,D[0].length+D[1].length,h,D[1].length)):w=e._.toFixed(u,D.length,h),P=w.split(".")[0],e._.includes(w,".")?w=f.delimiters.decimal+w.split(".")[1]:w="",p&&Number(w.slice(1))===0&&(w="")):P=e._.toFixed(u,0,h),m&&!S&&Number(P)>=1e3&&m!==f.abbreviations.trillion)switch(P=String(Number(P)/1e3),m){case f.abbreviations.thousand:m=f.abbreviations.million;break;case f.abbreviations.million:m=f.abbreviations.billion;break;case f.abbreviations.billion:m=f.abbreviations.trillion;break}if(e._.includes(P,"-")&&(P=P.slice(1),T=!0),P.length<g)for(var B=g-P.length;B>0;B--)P="0"+P;return H>-1&&(P=P.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f.delimiters.thousands)),c.indexOf(".")===0&&(P=""),W=P+w+(m||""),d?W=(d&&T?"(":"")+W+(d&&T?")":""):R>=0?W=R===0?(T?"-":"+")+W:W+(T?"-":"+"):T&&(W="-"+W),W},stringToNumber:function(u){var c=o[a.currentLocale],h=u,f={thousand:3,million:6,billion:9,trillion:12},d,p,g;if(a.zeroFormat&&u===a.zeroFormat)p=0;else if(a.nullFormat&&u===a.nullFormat||!u.replace(/[^0-9]+/g,"").length)p=null;else{p=1,c.delimiters.decimal!=="."&&(u=u.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(d in f)if(g=new RegExp("[^a-zA-Z]"+c.abbreviations[d]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),h.match(g)){p*=Math.pow(10,f[d]);break}p*=(u.split("-").length+Math.min(u.split("(").length-1,u.split(")").length-1))%2?1:-1,u=u.replace(/[^0-9\.]+/g,""),p*=Number(u)}return p},isNaN:function(u){return typeof u=="number"&&isNaN(u)},includes:function(u,c){return u.indexOf(c)!==-1},insert:function(u,c,h){return u.slice(0,h)+c+u.slice(h)},reduce:function(u,c){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof c!="function")throw new TypeError(c+" is not a function");var h=Object(u),f=h.length>>>0,d=0,p;if(arguments.length===3)p=arguments[2];else{for(;d<f&&!(d in h);)d++;if(d>=f)throw new TypeError("Reduce of empty array with no initial value");p=h[d++]}for(;d<f;d++)d in h&&(p=c(p,h[d],d,h));return p},multiplier:function(u){var c=u.toString().split(".");return c.length<2?1:Math.pow(10,c[1].length)},correctionFactor:function(){var u=Array.prototype.slice.call(arguments);return u.reduce(function(c,h){var f=n.multiplier(h);return c>f?c:f},1)},toFixed:function(u,c,h,f){var d=u.toString().split("."),p=c-(f||0),g,m,b,x;return d.length===2?g=Math.min(Math.max(d[1].length,p),c):g=p,b=Math.pow(10,g),x=(h(u+"e+"+g)/b).toFixed(g),f>c-g&&(m=new RegExp("\\.?0{1,"+(f-(c-g))+"}$"),x=x.replace(m,"")),x}},e.options=a,e.formats=i,e.locales=o,e.locale=function(u){return u&&(a.currentLocale=u.toLowerCase()),a.currentLocale},e.localeData=function(u){if(!u)return o[a.currentLocale];if(u=u.toLowerCase(),!o[u])throw new Error("Unknown locale : "+u);return o[u]},e.reset=function(){for(var u in s)a[u]=s[u]},e.zeroFormat=function(u){a.zeroFormat=typeof u=="string"?u:null},e.nullFormat=function(u){a.nullFormat=typeof u=="string"?u:null},e.defaultFormat=function(u){a.defaultFormat=typeof u=="string"?u:"0.0"},e.register=function(u,c,h){if(c=c.toLowerCase(),this[u+"s"][c])throw new TypeError(c+" "+u+" already registered.");return this[u+"s"][c]=h,h},e.validate=function(u,c){var h,f,d,p,g,m,b,x;if(typeof u!="string"&&(u+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",u)),u=u.trim(),u.match(/^\d+$/))return!0;if(u==="")return!1;try{b=e.localeData(c)}catch{b=e.localeData(e.locale())}return d=b.currency.symbol,g=b.abbreviations,h=b.delimiters.decimal,b.delimiters.thousands==="."?f="\\.":f=b.delimiters.thousands,x=u.match(/^[^\d]+/),x!==null&&(u=u.substr(1),x[0]!==d)||(x=u.match(/[^\d]+$/),x!==null&&(u=u.slice(0,-1),x[0]!==g.thousand&&x[0]!==g.million&&x[0]!==g.billion&&x[0]!==g.trillion))?!1:(m=new RegExp(f+"{2}"),u.match(/[^\d.,]/g)?!1:(p=u.split(h),p.length>2?!1:p.length<2?!!p[0].match(/^\d+.*\d$/)&&!p[0].match(m):p[0].length===1?!!p[0].match(/^\d+$/)&&!p[0].match(m)&&!!p[1].match(/^\d+$/):!!p[0].match(/^\d+.*\d$/)&&!p[0].match(m)&&!!p[1].match(/^\d+$/)))},e.fn=l.prototype={clone:function(){return e(this)},format:function(u,c){var h=this._value,f=u||a.defaultFormat,d,p,g;if(c=c||Math.round,h===0&&a.zeroFormat!==null)p=a.zeroFormat;else if(h===null&&a.nullFormat!==null)p=a.nullFormat;else{for(d in i)if(f.match(i[d].regexps.format)){g=i[d].format;break}g=g||e._.numberToFormat,p=g(h,f,c)}return p},value:function(){return this._value},input:function(){return this._input},set:function(u){return this._value=Number(u),this},add:function(u){var c=n.correctionFactor.call(null,this._value,u);function h(f,d,p,g){return f+Math.round(c*d)}return this._value=n.reduce([this._value,u],h,0)/c,this},subtract:function(u){var c=n.correctionFactor.call(null,this._value,u);function h(f,d,p,g){return f-Math.round(c*d)}return this._value=n.reduce([u],h,Math.round(this._value*c))/c,this},multiply:function(u){function c(h,f,d,p){var g=n.correctionFactor(h,f);return Math.round(h*g)*Math.round(f*g)/Math.round(g*g)}return this._value=n.reduce([this._value,u],c,1),this},divide:function(u){function c(h,f,d,p){var g=n.correctionFactor(h,f);return Math.round(h*g)/Math.round(f*g)}return this._value=n.reduce([this._value,u],c),this},difference:function(u){return Math.abs(e(this._value).subtract(u).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(u){var c=u%10;return~~(u%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th"},currency:{symbol:"$"}}),function(){e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(u,c,h){var f=e._.includes(c," BPS")?" ":"",d;return u=u*1e4,c=c.replace(/\s?BPS/,""),d=e._.numberToFormat(u,c,h),e._.includes(d,")")?(d=d.split(""),d.splice(-1,0,f+"BPS"),d=d.join("")):d=d+f+"BPS",d},unformat:function(u){return+(e._.stringToNumber(u)*1e-4).toFixed(15)}})}(),function(){var u={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=u.suffixes.concat(c.suffixes.filter(function(d){return u.suffixes.indexOf(d)<0})),f=h.join("|");f="("+f.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(f)},format:function(d,p,g){var m,b=e._.includes(p,"ib")?c:u,x=e._.includes(p," b")||e._.includes(p," ib")?" ":"",C,k,w;for(p=p.replace(/\s?i?b/,""),C=0;C<=b.suffixes.length;C++)if(k=Math.pow(b.base,C),w=Math.pow(b.base,C+1),d===null||d===0||d>=k&&d<w){x+=b.suffixes[C],k>0&&(d=d/k);break}return m=e._.numberToFormat(d,p,g),m+x},unformat:function(d){var p=e._.stringToNumber(d),g,m;if(p){for(g=u.suffixes.length-1;g>=0;g--){if(e._.includes(d,u.suffixes[g])){m=Math.pow(u.base,g);break}if(e._.includes(d,c.suffixes[g])){m=Math.pow(c.base,g);break}}p*=m||1}return p}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(u,c,h){var f=e.locales[e.options.currentLocale],d={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},p,g,m;for(c=c.replace(/\s?\$\s?/,""),p=e._.numberToFormat(u,c,h),u>=0?(d.before=d.before.replace(/[\-\(]/,""),d.after=d.after.replace(/[\-\)]/,"")):u<0&&!e._.includes(d.before,"-")&&!e._.includes(d.before,"(")&&(d.before="-"+d.before),m=0;m<d.before.length;m++)switch(g=d.before[m],g){case"$":p=e._.insert(p,f.currency.symbol,m);break;case" ":p=e._.insert(p," ",m+f.currency.symbol.length-1);break}for(m=d.after.length-1;m>=0;m--)switch(g=d.after[m],g){case"$":p=m===d.after.length-1?p+f.currency.symbol:e._.insert(p,f.currency.symbol,-(d.after.length-(1+m)));break;case" ":p=m===d.after.length-1?p+" ":e._.insert(p," ",-(d.after.length-(1+m)+f.currency.symbol.length-1));break}return p}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(u,c,h){var f,d=typeof u=="number"&&!e._.isNaN(u)?u.toExponential():"0e+0",p=d.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),f=e._.numberToFormat(Number(p[0]),c,h),f+"e"+p[1]},unformat:function(u){var c=e._.includes(u,"e+")?u.split("e+"):u.split("e-"),h=Number(c[0]),f=Number(c[1]);f=e._.includes(u,"e-")?f*=-1:f;function d(p,g,m,b){var x=e._.correctionFactor(p,g),C=p*x*(g*x)/(x*x);return C}return e._.reduce([h,Math.pow(10,f)],d,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(u,c,h){var f=e.locales[e.options.currentLocale],d,p=e._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),p+=f.ordinal(u),d=e._.numberToFormat(u,c,h),d+p}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(u,c,h){var f=e._.includes(c," %")?" ":"",d;return e.options.scalePercentBy100&&(u=u*100),c=c.replace(/\s?\%/,""),d=e._.numberToFormat(u,c,h),e._.includes(d,")")?(d=d.split(""),d.splice(-1,0,f+"%"),d=d.join("")):d=d+f+"%",d},unformat:function(u){var c=e._.stringToNumber(u);return e.options.scalePercentBy100?c*.01:c}})}(),function(){e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(u,c,h){var f=Math.floor(u/60/60),d=Math.floor((u-f*60*60)/60),p=Math.round(u-f*60*60-d*60);return f+":"+(d<10?"0"+d:d)+":"+(p<10?"0"+p:p)},unformat:function(u){var c=u.split(":"),h=0;return c.length===3?(h=h+Number(c[0])*60*60,h=h+Number(c[1])*60,h=h+Number(c[2])):c.length===2&&(h=h+Number(c[0])*60,h=h+Number(c[1])),Number(h)}})}(),e})})(c3);var wae=c3.exports;const zl=Gi(wae);function Cae(t){return zl(t).format()}function Sae(t){const e=t?zl(t).format("$0,0.00"):"";return Jh(e,".00")}function kae(t){const e=t?zl(Number(t)/100).format("0.0%"):"";return Jh(e,".0")}function Tae(t){const e=t?zl(t).format("0.00a"):"";return Jh(e,".00")}function Om(t){const e=t?zl(t).format("0.0 b"):"";return Jh(e,".0")}function Jh(t,e=".00"){return t.includes(e)?t.replace(e,""):t}const Mm=t=>+Number(t).toFixed(12),Eae=Object.freeze(Object.defineProperty({__proto__:null,fCurrency:Sae,fData:Om,fNumber:Cae,fPercent:kae,fShortenNumber:Tae,fWithDecimalPlacesOrNot:Mm},Symbol.toStringTag,{value:"Module"}));function h3(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}var Wl;(function(t){t.event="event",t.props="prop"})(Wl||(Wl={}));function Mi(){}function Oae(t){var e,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e&&r.length===e.length&&r.every(function(o,s){return o===e[s]})||(e=r,n=t.apply(void 0,r)),n}}function Hl(t){return!!(t||"").match(/\d/)}function ta(t){return t==null}function Mae(t){return typeof t=="number"&&isNaN(t)}function f3(t){return ta(t)||Mae(t)||typeof t=="number"&&!isFinite(t)}function d3(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Aae(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Pae(t,e,n){var r=Aae(n),i=t.search(/[1-9]/);return i=i===-1?t.length:i,t.substring(0,i)+t.substring(i,t.length).replace(r,"$1"+e)}function Dae(t){var e=v.useRef(t);e.current=t;var n=v.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e.current.apply(e,r)});return n.current}function Am(t,e){e===void 0&&(e=!0);var n=t[0]==="-",r=n&&e;t=t.replace("-","");var i=t.split("."),o=i[0],s=i[1]||"";return{beforeDecimal:o,afterDecimal:s,hasNegation:n,addNegation:r}}function _ae(t){if(!t)return t;var e=t[0]==="-";e&&(t=t.substring(1,t.length));var n=t.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(e?"-":"")+r+(i?"."+i:"")}function p3(t,e,n){for(var r="",i=n?"0":"",o=0;o<=e-1;o++)r+=t[o]||i;return r}function g3(t,e){return Array(e+1).join(t)}function m3(t){var e=t+"",n=e[0]==="-"?"-":"";n&&(e=e.substring(1));var r=e.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var s=1+o,a=i.length;return s<0?i="0."+g3("0",Math.abs(s))+i:s>=a?i=i+g3("0",s-a):i=(i.substring(0,s)||"0")+"."+i.substring(s),n+i}function v3(t,e,n){if(["","-"].indexOf(t)!==-1)return t;var r=(t.indexOf(".")!==-1||n)&&e,i=Am(t),o=i.beforeDecimal,s=i.afterDecimal,a=i.hasNegation,l=parseFloat("0."+(s||"0")),u=s.length<=e?"0."+s:l.toFixed(e),c=u.split("."),h=o.split("").reverse().reduce(function(g,m,b){return g.length>b?(Number(g[0])+Number(m)).toString()+g.substring(1,g.length):m+g},c[0]),f=p3(c[1]||"",e,n),d=a?"-":"",p=r?".":"";return""+d+h+p+f}function So(t,e){if(t.value=t.value,t!==null){if(t.createTextRange){var n=t.createTextRange();return n.move("character",e),n.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}var y3=Oae(function(t,e){for(var n=0,r=0,i=t.length,o=e.length;t[n]===e[n]&&n<i;)n++;for(;t[i-1-r]===e[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}});function Iae(t,e,n){return Math.min(Math.max(t,e),n)}function Pm(t){return Math.max(t.selectionStart,t.selectionEnd)}function $ae(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Fae(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function Lae(t){var e=t.currentValue,n=t.formattedValue,r=t.currentValueIndex,i=t.formattedValueIndex;return e[r]===n[i]}function Rae(t,e,n,r,i,o,s){s===void 0&&(s=Lae);var a=i.findIndex(function(k){return k}),l=t.slice(0,a);!e&&!n.startsWith(l)&&(e=l,n=l+n,r=r+l.length);for(var u=n.length,c=t.length,h={},f=new Array(u),d=0;d<u;d++){f[d]=-1;for(var p=0,g=c;p<g;p++){var m=s({currentValue:n,lastValue:e,formattedValue:t,currentValueIndex:d,formattedValueIndex:p});if(m&&h[p]!==!0){f[d]=p,h[p]=!0;break}}}for(var b=r;b<u&&(f[b]===-1||!o(n[b]));)b++;var x=b===u||f[b]===-1?c:f[b];for(b=r-1;b>0&&f[b]===-1;)b--;var C=b===-1||f[b]===-1?0:f[b]+1;return C>x?x:r-C<x-r?C:x}function b3(t,e,n,r){var i=t.length;if(e=Iae(e,0,i),r==="left"){for(;e>=0&&!n[e];)e--;e===-1&&(e=n.indexOf(!0))}else{for(;e<=i&&!n[e];)e++;e>i&&(e=n.lastIndexOf(!0))}return e===-1&&(e=i),e}function Bae(t){for(var e=Array.from({length:t.length+1}).map(function(){return!0}),n=0,r=e.length;n<r;n++)e[n]=!!(Hl(t[n])||Hl(t[n-1]));return e}function x3(t,e,n,r,i,o){o===void 0&&(o=Mi);var s=Dae(function(p,g){var m,b;return f3(p)?(b="",m=""):typeof p=="number"||g?(b=typeof p=="number"?m3(p):p,m=r(b)):(b=i(p,void 0),m=r(b)),{formattedValue:m,numAsString:b}}),a=v.useState(function(){return s(ta(t)?e:t,n)}),l=a[0],u=a[1],c=function(p,g){p.formattedValue!==l.formattedValue&&u({formattedValue:p.formattedValue,numAsString:p.value}),o(p,g)},h=t,f=n;ta(t)&&(h=l.numAsString,f=!0);var d=s(h,f);return v.useMemo(function(){u(d)},[d.formattedValue]),[l,c]}function Nae(t){return t.replace(/[^0-9]/g,"")}function jae(t){return t}function Vae(t){var e=t.type;e===void 0&&(e="text");var n=t.displayType;n===void 0&&(n="input");var r=t.customInput,i=t.renderText,o=t.getInputRef,s=t.format;s===void 0&&(s=jae);var a=t.removeFormatting;a===void 0&&(a=Nae);var l=t.defaultValue,u=t.valueIsNumericString,c=t.onValueChange,h=t.isAllowed,f=t.onChange;f===void 0&&(f=Mi);var d=t.onKeyDown;d===void 0&&(d=Mi);var p=t.onMouseUp;p===void 0&&(p=Mi);var g=t.onFocus;g===void 0&&(g=Mi);var m=t.onBlur;m===void 0&&(m=Mi);var b=t.value,x=t.getCaretBoundary;x===void 0&&(x=Bae);var C=t.isValidInputCharacter;C===void 0&&(C=Hl);var k=t.isCharacterSame,w=h3(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),T=x3(b,l,!!u,s,a,c),S=T[0],M=S.formattedValue,P=S.numAsString,D=T[1],R=v.useRef({formattedValue:M,numAsString:P}),H=function(X,fe){R.current={formattedValue:X.formattedValue,numAsString:X.value},D(X,fe)},W=v.useState(!1),B=W[0],j=W[1],N=v.useRef(null),V=v.useRef({setCaretTimeout:null,focusTimeout:null});v.useEffect(function(){return j(!0),function(){clearTimeout(V.current.setCaretTimeout),clearTimeout(V.current.focusTimeout)}},[]);var me=s,re=function(X,fe){var xe=parseFloat(fe);return{formattedValue:X,value:fe,floatValue:isNaN(xe)?void 0:xe}},_=function(X,fe,xe){X.selectionStart===0&&X.selectionEnd===X.value.length||(So(X,fe),V.current.setCaretTimeout=setTimeout(function(){X.value===xe&&X.selectionStart!==X.selectionEnd&&So(X,fe)},0))},F=function(X,fe,xe){return b3(X,fe,x(X),xe)},U=function(X,fe,xe){var lt=x(fe),tt=Rae(fe,M,X,xe,lt,C,k);return tt=b3(fe,tt,lt),tt},se=function(X){var fe=X.formattedValue;fe===void 0&&(fe="");var xe=X.input,lt=X.setCaretPosition;lt===void 0&&(lt=!0);var tt=X.source,nt=X.event,It=X.numAsString,$t=X.caretPos;if(xe){if($t===void 0&&lt){var si=X.inputValue||xe.value,J=Pm(xe);xe.value=fe,$t=U(si,fe,J)}xe.value=fe,lt&&$t!==void 0&&_(xe,$t,fe)}fe!==M&&H(re(fe,It),{event:nt,source:tt})};v.useEffect(function(){var X=R.current,fe=X.formattedValue,xe=X.numAsString;M!==fe&&(M!==P||fe!==xe)&&H(re(M,P),{event:void 0,source:Wl.props})},[M,P]);var Q=N.current?Pm(N.current):void 0,ve=typeof window<"u"?v.useLayoutEffect:v.useEffect;ve(function(){var X=N.current;if(M!==R.current.formattedValue&&X){var fe=U(R.current.formattedValue,M,Q);X.value=M,_(X,fe,M)}},[M]);var le=function(X,fe,xe){var lt=y3(M,X),tt=Object.assign(Object.assign({},lt),{lastValue:M}),nt=a(X,tt),It=me(nt);if(nt=a(It,void 0),h&&!h(re(It,nt))){var $t=fe.target,si=Pm($t),J=U(X,M,si);return $t.value=M,_($t,J,M),!1}return se({formattedValue:It,numAsString:nt,inputValue:X,event:fe,source:xe,setCaretPosition:!0,input:fe.target}),!0},ye=function(X){var fe=X.target,xe=fe.value,lt=le(xe,X,Wl.event);lt&&f(X)},ue=function(X){var fe=X.target,xe=X.key,lt=fe.selectionStart,tt=fe.selectionEnd,nt=fe.value;nt===void 0&&(nt="");var It;if(xe==="ArrowLeft"||xe==="Backspace"?It=Math.max(lt-1,0):xe==="ArrowRight"?It=Math.min(lt+1,nt.length):xe==="Delete"&&(It=lt),It===void 0||lt!==tt){d(X);return}var $t=It;if(xe==="ArrowLeft"||xe==="ArrowRight"){var si=xe==="ArrowLeft"?"left":"right";$t=F(nt,It,si),$t!==It&&X.preventDefault()}else xe==="Delete"&&!C(nt[It])?$t=F(nt,It,"right"):xe==="Backspace"&&!C(nt[It])&&($t=F(nt,It,"left"));$t!==It&&_(fe,$t,nt),X.isUnitTestRun&&_(fe,$t,nt),d(X)},ne=function(X){var fe=X.target,xe=fe.selectionStart,lt=fe.selectionEnd,tt=fe.value;if(tt===void 0&&(tt=""),xe===lt){var nt=F(tt,xe);nt!==xe&&_(fe,nt,tt)}p(X)},ce=function(X){X.persist&&X.persist();var fe=X.target;N.current=fe,V.current.focusTimeout=setTimeout(function(){var xe=fe.selectionStart,lt=fe.selectionEnd,tt=fe.value;tt===void 0&&(tt="");var nt=F(tt,xe);nt!==xe&&!(xe===0&&lt===tt.length)&&_(fe,nt,tt),g(X)},0)},_e=function(X){N.current=null,clearTimeout(V.current.focusTimeout),clearTimeout(V.current.setCaretTimeout),m(X)},q=B&&$ae()?"numeric":void 0,dt=Object.assign({inputMode:q},w,{type:e,value:M,onChange:ye,onKeyDown:ue,onMouseUp:ne,onFocus:ce,onBlur:_e});if(n==="text")return i?v.createElement(v.Fragment,null,i(M,w)||null):v.createElement("span",Object.assign({},w,{ref:o}),M);if(r){var ae=r;return v.createElement(ae,Object.assign({},dt,{ref:o}))}return v.createElement("input",Object.assign({},dt,{ref:o}))}function w3(t,e){var n=e.decimalScale,r=e.fixedDecimalScale,i=e.prefix;i===void 0&&(i="");var o=e.suffix;o===void 0&&(o="");var s=e.allowNegative,a=e.thousandsGroupStyle;if(a===void 0&&(a="thousand"),t===""||t==="-")return t;var l=ef(e),u=l.thousandSeparator,c=l.decimalSeparator,h=n!==0&&t.indexOf(".")!==-1||n&&r,f=Am(t,s),d=f.beforeDecimal,p=f.afterDecimal,g=f.addNegation;return n!==void 0&&(p=p3(p,n,!!r)),u&&(d=Pae(d,u,a)),i&&(d=i+d),o&&(p=p+o),g&&(d="-"+d),t=d+(h&&c||"")+p,t}function ef(t){var e=t.decimalSeparator;e===void 0&&(e=".");var n=t.thousandSeparator,r=t.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}function zae(t,e){t===void 0&&(t="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(t),o=r.test(t);return t=t.replace(/-/g,""),i&&!o&&e&&(t="-"+t),t}function Wae(t,e){return new RegExp("(^-)|[0-9]|"+d3(t),e?"g":void 0)}function Hae(t,e,n){return t===""?!0:!(e!=null&&e.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function qae(t,e,n){var r;e===void 0&&(e=Fae(t));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var s=n.suffix;s===void 0&&(s="");var a=n.decimalScale,l=e.from,u=e.to,c=u.start,h=u.end,f=ef(n),d=f.allowedDecimalSeparators,p=f.decimalSeparator,g=t[h]===p;if(Hl(t)&&(t===o||t===s)&&e.lastValue==="")return t;if(h-c===1&&d.indexOf(t[c])!==-1){var m=a===0?"":p;t=t.substring(0,c)+m+t.substring(c+1,t.length)}var b=function(V,me,re){var _=!1,F=!1;o.startsWith("-")?_=!1:V.startsWith("--")?(_=!1,F=!0):s.startsWith("-")&&V.length===s.length?_=!1:V[0]==="-"&&(_=!0);var U=_?1:0;return F&&(U=2),U&&(V=V.substring(U),me-=U,re-=U),{value:V,start:me,end:re,hasNegation:_}},x=b(t,c,h),C=x.hasNegation;r=x,t=r.value,c=r.start,h=r.end;var k=b(e.lastValue,l.start,l.end),w=k.start,T=k.end,S=k.value,M=t.substring(c,h);t.length&&S.length&&(w>S.length-s.length||T<o.length)&&!(M&&s.startsWith(M))&&(t=S);var P=0;t.startsWith(o)?P+=o.length:c<o.length&&(P=c),t=t.substring(P),h-=P;var D=t.length,R=t.length-s.length;t.endsWith(s)?D=R:(h>R||h>t.length-s.length)&&(D=h),t=t.substring(0,D),t=zae(C?"-"+t:t,i),t=(t.match(Wae(p,!0))||[]).join("");var H=t.indexOf(p);t=t.replace(new RegExp(d3(p),"g"),function(V,me){return me===H?".":""});var W=Am(t,i),B=W.beforeDecimal,j=W.afterDecimal,N=W.addNegation;return u.end-u.start<l.end-l.start&&B===""&&g&&!parseFloat(j)&&(t=N?"-":""),t}function Uae(t,e){var n=e.prefix;n===void 0&&(n="");var r=e.suffix;r===void 0&&(r="");var i=Array.from({length:t.length+1}).map(function(){return!0}),o=t[0]==="-";i.fill(!1,0,n.length+(o?1:0));var s=t.length;return i.fill(!1,s-r.length+1,s+1),i}function Yae(t){var e=ef(t),n=e.thousandSeparator,r=e.decimalSeparator,i=t.prefix;i===void 0&&(i="");var o=t.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
249
+ Decimal separator can't be same as thousand separator.
250
+ thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
251
+ decimalSeparator: `+r+` (default value for decimalSeparator is .)
252
+ `);return i.startsWith("-")&&o&&(console.error(`
253
+ Prefix can't start with '-' when allowNegative is true.
254
+ prefix: `+i+`
255
+ allowNegative: `+o+`
256
+ `),o=!1),Object.assign(Object.assign({},t),{allowNegative:o})}function Gae(t){t=Yae(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,r=t.allowLeadingZeros,i=t.onKeyDown;i===void 0&&(i=Mi);var o=t.onBlur;o===void 0&&(o=Mi);var s=t.thousandSeparator,a=t.decimalScale,l=t.fixedDecimalScale,u=t.prefix;u===void 0&&(u="");var c=t.defaultValue,h=t.value,f=t.valueIsNumericString,d=t.onValueChange,p=h3(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=ef(t),m=g.decimalSeparator,b=g.allowedDecimalSeparators,x=function(N){return w3(N,t)},C=function(N,V){return qae(N,V,t)},k=ta(h)?c:h,w=f??Hae(k,u,e);ta(h)?ta(c)||(w=w||typeof c=="number"):w=w||typeof h=="number";var T=function(N){return f3(N)?N:(typeof N=="number"&&(N=m3(N)),w&&typeof a=="number"?v3(N,a,!!l):N)},S=x3(T(h),T(c),!!w,x,C,d),M=S[0],P=M.numAsString,D=M.formattedValue,R=S[1],H=function(N){var V=N.target,me=N.key,re=V.selectionStart,_=V.selectionEnd,F=V.value;if(F===void 0&&(F=""),re!==_){i(N);return}me==="Backspace"&&F[0]==="-"&&re===u.length+1&&n&&So(V,1),a&&l&&(me==="Backspace"&&F[re-1]===m?(So(V,re-1),N.preventDefault()):me==="Delete"&&F[re]===m&&N.preventDefault()),b!=null&&b.includes(me)&&F[re]===m&&So(V,re+1);var U=s===!0?",":s;me==="Backspace"&&F[re-1]===U&&So(V,re-1),me==="Delete"&&F[re]===U&&So(V,re+1),i(N)},W=function(N){var V=P;if(V.match(/\d/g)||(V=""),r||(V=_ae(V)),l&&a&&(V=v3(V,a,l)),V!==P){var me=w3(V,t);R({formattedValue:me,value:V,floatValue:parseFloat(V)},{event:N,source:Wl.event})}o(N)},B=function(N){return N===m?!0:Hl(N)},j=function(N){var V=N.currentValue,me=N.lastValue,re=N.formattedValue,_=N.currentValueIndex,F=N.formattedValueIndex,U=V[_],se=re[F],Q=y3(me,V),ve=Q.to;return _>=ve.start&&_<ve.end&&b&&b.includes(U)&&se===m?!0:U===se};return Object.assign(Object.assign({},p),{value:D,valueIsNumericString:!1,isValidInputCharacter:B,isCharacterSame:j,onValueChange:R,format:x,removeFormatting:C,getCaretBoundary:function(N){return Uae(N,t)},onKeyDown:H,onBlur:W})}function Kae(t){var e=Gae(t);return v.createElement(Vae,Object.assign({},e))}const tf=v.forwardRef(({decimalScale:t=0,fixedDecimalScale:e=!0,prefix:n,allowNegative:r,minValue:i,maxValue:o=1/0,maxLength:s,value:a,inputProps:l,InputProps:u,size:c,disabled:h,name:f,helperText:d,error:p,fullWidth:g,label:m,required:b,onChange:x,tabIndex:C},k)=>{const w=v.useRef(null),T=S=>{x&&(w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{const{floatValue:M}=S,P=M||0;if(i!==void 0&&i>P){x({target:{name:f,value:i}});return}if(M!==void 0&&o<P){x({target:{name:f,value:o}});return}x({target:{name:f,value:M}})},600))};return v.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),y.jsx(Kae,{getInputRef:k,value:a,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:t,fixedDecimalScale:e,autoComplete:"off",allowNegative:r,maxLength:s,onValueChange:T,customInput:O.TextField,InputProps:{...u},inputProps:{...l,tabIndex:C},disabled:h,size:c,helperText:d,error:p,fullWidth:g,label:m,required:b})});tf.displayName="NumberInput";const Dm=v.forwardRef(({name:t,increment:e=1,updadteForMultiple:n,allowNegative:r=!1,value:i=0,onChange:o,minValue:s,maxValue:a,decimalScale:l,disabled:u,tabIndex:c,...h},f)=>{const d=u3(i,e,l),p=()=>{if(!r&&i-e<0)return;const b=i-e,x=Math.floor(i/e)*e,C=!d&&n?x:b;s!==void 0&&b<s?o(s):o(Mm(C))},g=()=>{const b=Number(i)+e,x=Math.ceil(i/e)*e,k=Mm(!d&&n?x:b);a!==void 0&&b>=a?o(a):o(s!==void 0&&k<=s?s:k)},m=b=>{const x=Number(b.target.value),C=Math.ceil(x/e)*e,k=n?C:x;if(s!==void 0&&x<=s){o(s);return}if(a!==void 0&&x>=a){o(a);return}o(k)};return y.jsx(tf,{ref:f,name:t,value:i,minValue:s,maxValue:a,allowNegative:r,decimalScale:l,InputProps:{startAdornment:y.jsx(O.InputAdornment,{position:"start",children:y.jsx(O.IconButton,{size:"medium",disabled:u||(r?!1:!i),onClick:p,children:y.jsx(bt,{icon:"eva:minus-fill",width:14,height:14,color:"primary.main"})})}),endAdornment:y.jsx(O.InputAdornment,{position:"end",children:y.jsx(O.IconButton,{size:"medium",onClick:g,disabled:u,children:y.jsx(bt,{icon:"eva:plus-fill",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:c},onChange:m,disabled:u,...h})});Dm.displayName="Incrementer";const Xae=yr(O.Box)(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=e.variant==="filled",i=e.variant==="outlined",o=e.variant==="soft",s={...e.color==="default"&&{...i&&{backgroundColor:"transparent",color:t.palette.text.primary,border:`1px solid ${Y(t.palette.grey[500],.32)}`},...o&&{color:n?t.palette.text.primary:t.palette.common.white,backgroundColor:Y(t.palette.grey[500],.16)}}},a={...e.color!=="default"&&{...r&&{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main},...i&&{backgroundColor:"transparent",color:t.palette[e.color].main,border:`1px solid ${t.palette[e.color].main}`},...o&&{color:t.palette[e.color][n?"dark":"light"],backgroundColor:Y(t.palette[e.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"none",padding:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...a,...s}}),C3=v.forwardRef(({children:t,color:e="default",variant:n="soft",startIcon:r,endIcon:i,sx:o,...s},a)=>{const l=no(),u={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return y.jsxs(Xae,{ref:a,component:"span",ownerState:{color:e,variant:n},sx:{...r&&{pl:.75},...i&&{pr:.75},...o},theme:l,...s,children:[r&&y.jsxs(O.Box,{sx:{mr:.75,...u},children:[" ",r," "]}),t,i&&y.jsxs(O.Box,{sx:{ml:.75,...u},children:[" ",i," "]})]})});C3.displayName="Label";function Ai(t){return typeof t=="string"||t instanceof String}function S3(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function k3(t,e){return Array.isArray(e)?k3(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,o]=r;return e(o,i)&&(n[i]=o),n},{})}const be={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Zae(t){switch(t){case be.LEFT:return be.FORCE_LEFT;case be.RIGHT:return be.FORCE_RIGHT;default:return t}}function _m(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function nf(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!nf(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const o=e instanceof Date,s=t instanceof Date;if(o&&s)return e.getTime()==t.getTime();if(o!=s)return!1;const a=e instanceof RegExp,l=t instanceof RegExp;if(a&&l)return e.toString()==t.toString();if(a!=l)return!1;const u=Object.keys(e);for(i=0;i<u.length;i++)if(!Object.prototype.hasOwnProperty.call(t,u[i]))return!1;for(i=0;i<u.length;i++)if(!nf(t[u[i]],e[u[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Qae{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?be.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?be.RIGHT:be.LEFT}}function Oe(t,e){return new Oe.InputMask(t,e)}function T3(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?Oe.MaskedRegExp:Ai(t)?Oe.MaskedPattern:t===Date?Oe.MaskedDate:t===Number?Oe.MaskedNumber:Array.isArray(t)||t===Array?Oe.MaskedDynamic:Oe.Masked&&t.prototype instanceof Oe.Masked?t:Oe.Masked&&t instanceof Oe.Masked?t.constructor:t instanceof Function?Oe.MaskedFunction:(console.warn("Mask not found for mask",t),Oe.Masked)}function rf(t){if(!t)throw new Error("Options in not defined");if(Oe.Masked){if(t.prototype instanceof Oe.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof Oe.Masked?{mask:t}:S3(t)&&t.mask instanceof Oe.Masked?t:{};if(e){const r=e.mask;return{...k3(e,(i,o)=>!o.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return S3(t)?{...t}:{mask:t}}function ko(t){if(Oe.Masked&&t instanceof Oe.Masked)return t;const e=rf(t),n=T3(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}Oe.createMask=ko;class Im{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}Oe.MaskElement=Im;class To extends Im{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(To.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}To.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Oe.HTMLMaskElement=To;class Jae extends To{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}Oe.HTMLMaskElement=To;class E3 extends To{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,o=i.getSelection&&i.getSelection();o&&(o.removeAllRanges(),o.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}Oe.HTMLContenteditableMaskElement=E3;class ele{constructor(e,n){this.el=e instanceof Im?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new E3(e):new Jae(e),this.masked=ko(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Oe.Masked)&&this.masked.constructor===T3(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof Oe.Masked?e:ko({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.displayValue,i=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==r&&(this.el.value=r),i&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),o=!nf(this.masked,r);i&&(this.mask=n),o&&this.masked.updateOptions(r),(i||o)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,be.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new Qae({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,o=r===this.masked.rawInputValue?n.removeDirection:be.NONE;let s=this.masked.nearestInputPos(n.startChangePos+i,o);o!==be.NONE&&(s=this.masked.nearestInputPos(s,be.NONE)),this.updateControl(),this.updateCursor(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Oe.InputMask=ele;class ot{static normalize(e){return Array.isArray(e)?e:[e,new ot]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}Oe.ChangeDetails=ot;class Jr{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Ln{constructor(e){this._value="",this._update({...Ln.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new Jr(this.extractInput(e,n),e)}appendTail(e){return Ai(e)&&(e=new Jr(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new ot({inserted:e,rawInserted:e})):new ot}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let o;if([e,o]=this.doPrepareChar(e,n),o=o.aggregate(this._appendCharRaw(e,n)),o.inserted){let s,a=this.doValidate(n)!==!1;if(a&&r!=null){const l=this.state;this.overwrite===!0&&(s=r.state,r.unshift(this.displayValue.length-o.tailShift));let u=this.appendTail(r);a=u.rawInserted===r.toString(),!(a&&u.inserted)&&this.overwrite==="shift"&&(this.state=l,s=r.state,r.shift(),u=this.appendTail(r),a=u.rawInserted===r.toString()),a&&u.inserted&&(this.state=l)}a||(o=new ot,this.state=i,r&&s&&(r.state=s))}return o}_appendPlaceholder(){return new ot}_appendEager(){return new ot}append(e,n,r){if(!Ai(e))throw new Error("value should be string");const i=Ai(r)?new Jr(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let o;[e,o]=this.doPrepare(e,n);for(let s=0;s<e.length;++s){const a=this._appendChar(e[s],n,i);if(!a.rawInserted&&!this.doSkipInvalid(e[s],n,i))break;o.aggregate(a)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&o.aggregate(this._appendEager()),i!=null&&(o.tailShift+=this.appendTail(i).tailShift),o}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new ot}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&this.append(r.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),ot.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),ot.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,o){i===void 0&&(i=be.NONE),o===void 0&&(o={input:!0});const s=e+n,a=this.extractTail(s),l=this.eager===!0||this.eager==="remove";let u;l&&(i=Zae(i),u=this.extractInput(0,s,{raw:!0}));let c=e;const h=new ot;if(i!==be.NONE&&(c=this.nearestInputPos(e,n>1&&e!==0&&!l?be.NONE:i),h.tailShift=c-e),h.aggregate(this.remove(c)),l&&i!==be.NONE&&u===this.rawInputValue)if(i===be.FORCE_LEFT){let f;for(;u===this.rawInputValue&&(f=this.displayValue.length);)h.aggregate(new ot({tailShift:-1})).aggregate(this.remove(f-1))}else i===be.FORCE_RIGHT&&a.unshift();return h.aggregate(this.append(r,o,a))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||Ln.EMPTY_VALUES.includes(e)&&Ln.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}Ln.DEFAULTS={skipInvalid:!0},Ln.EMPTY_VALUES=[void 0,null,""],Oe.Masked=Ln;class Eo{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ai(e)?new Jr(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof Jr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof Eo){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof Oe.MaskedPattern))return new Jr(this.toString()).appendTo(e);const n=new ot;for(let r=0;r<this.chunks.length&&!n.skip;++r){const i=this.chunks[r],o=e._mapPosToBlock(e.displayValue.length),s=i.stop;let a;if(s!=null&&(!o||o.index<=s)){if(i instanceof Eo||e._stops.indexOf(s)>=0){const l=e._appendPlaceholder(s);n.aggregate(l)}a=i instanceof Eo&&e._blocks[s]}if(a){const l=a.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;const u=i.toString().slice(l.rawInserted.length);u&&n.aggregate(e.append(u,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const o="chunks"in i?new Eo:new Jr;return o.state=i,o})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],o=i.unshift(n);if(i.toString()){if(!o)break;++r}else this.chunks.splice(r,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class tle{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,be.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,be.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,be.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,be.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,be.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,be.NONE),!0})}}class O3{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new ot}nearestInputPos(e,n){n===void 0&&(n=be.NONE);const r=0,i=this._value.length;switch(n){case be.LEFT:case be.FORCE_LEFT:return r;case be.NONE:case be.RIGHT:case be.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const r=new ot;if(this.isFilled)return r;const i=this.eager===!0||this.eager==="append",s=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail;return s&&(r.rawInserted=this.char),this._value=r.inserted=this.char,this._isRawInput=s&&(n.raw||n.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ot;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Jr("")}appendTail(e){return Ai(e)&&(e=new Jr(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class of{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:o,lazy:s,eager:a,...l}=e;this.masked=ko(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:o,lazy:s,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new ot}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new ot;const r=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i.inserted=i.rawInserted="",this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){const e=new ot;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new ot}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=be.NONE);const r=0,i=this.value.length,o=Math.min(Math.max(e,r),i);switch(n){case be.LEFT:case be.FORCE_LEFT:return this.isComplete?o:r;case be.RIGHT:case be.FORCE_RIGHT:return this.isComplete?o:i;case be.NONE:default:return o}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||(e==null?void 0:e._beforeTailState)}}}of.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class nle extends Ln{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}Oe.MaskedRegExp=nle;class Rn extends Ln{constructor(e){super({...Rn.DEFAULTS,...e,definitions:Object.assign({},of.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let o=0;o<n.length;++o){if(this.blocks){const u=n.slice(o),c=Object.keys(this.blocks).filter(f=>u.indexOf(f)===0);c.sort((f,d)=>d.length-f.length);const h=c[0];if(h){const{expose:f,...d}=rf(this.blocks[h]),p=ko({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...d,parent:this});p&&(this._blocks.push(p),f&&(this.exposeBlock=p),this._maskedBlocks[h]||(this._maskedBlocks[h]=[]),this._maskedBlocks[h].push(this._blocks.length-1)),o+=h.length-1;continue}}let s=n[o],a=s in e;if(s===Rn.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){r=!r;continue}if(s==="["||s==="]"){i=!i;continue}if(s===Rn.ESCAPE_CHAR){if(++o,s=n[o],!s)break;a=!1}const l=a?new of({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...rf(e[s]),parent:this}):new O3({char:s,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...r}=e;this._blocks.forEach((i,o)=>i.state=n[o]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new ot;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const o=this._blocks[i]._appendEager();if(!o.inserted)break;n.aggregate(o)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new ot;if(!r)return i;for(let s=r.index;;++s){var o;const a=this._blocks[s];if(!a)break;const l=a._appendChar(e,{...n,_beforeTailState:(o=n._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]}),u=l.skip;if(i.aggregate(l),u||l.rawInserted)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new Eo;return e===n||this._forEachBlocksInRange(e,n,(i,o,s,a)=>{const l=i.extractTail(s,a);l.stop=this._findStopBefore(o),l.from=this._blockStartPos(o),l instanceof Eo&&(l.blockIndex=o),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(o,s,a,l)=>{i+=o.extractInput(a,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new ot;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,o=e??this._blocks.length;return this._blocks.slice(i,o).forEach(s=>{if(!s.lazy||e!=null){var a;const l=s._appendPlaceholder((a=s._blocks)==null?void 0:a.length);this._value+=l.inserted,n.aggregate(l)}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],o=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-o}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const o=this._mapPosToBlock(n),s=o&&i.index===o.index,a=i.offset,l=o&&s?o.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,a,l),o&&!s){for(let u=i.index+1;u<o.index;++u)r(this._blocks[u],u,0,this._blocks[u].displayValue.length);r(this._blocks[o.index],o.index,0,o.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,o,s,a)=>{r.aggregate(i.remove(s,a))}),r}nearestInputPos(e,n){if(n===void 0&&(n=be.NONE),!this._blocks.length)return 0;const r=new tle(this,e);if(n===be.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===be.LEFT||n===be.FORCE_LEFT){if(n===be.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===be.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===be.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===be.RIGHT||n===be.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===be.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,be.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,o,s,a)=>{r+=i.totalInputPositions(s,a)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}}Rn.DEFAULTS={lazy:!0,placeholderChar:"_"},Rn.STOP_CHAR="`",Rn.ESCAPE_CHAR="\\",Rn.InputDefinition=of,Rn.FixedDefinition=O3,Oe.MaskedPattern=Rn;class sf extends Rn{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:o=this.autofix,...s}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=o;const a=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<l.length&&l[u]===a[u];)++u;s.mask=l.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,o]=e.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(n="0".repeat(i.length)+o,r="9".repeat(i.length)+o),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;if([e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,r];const i=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0"),s=this.value+e;if(s.length>this.maxLength)return["",r];const[a,l]=this.boundaries(s);return Number(l)<this.from?[i[s.length-1],r]:Number(a)>this.to?this.autofix==="pad"&&s.length<this.maxLength?["",r.aggregate(this.append(i[s.length-1]+e,n))]:[o[s.length-1],r]:[e,r]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,o]=this.boundaries(n);return this.from<=Number(o)&&Number(i)<=this.to&&super.doValidate(e)}}Oe.MaskedRange=sf;class Oo extends Rn{constructor(e){const{mask:n,pattern:r,...i}={...Oo.DEFAULTS,...e};super({...i,mask:Ai(n)?n:r})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...o}={...Oo.DEFAULTS,...e},s=Object.assign({},Oo.GET_DEFAULT_BLOCKS());e.min&&(s.Y.from=e.min.getFullYear()),e.max&&(s.Y.to=e.max.getFullYear()),e.min&&e.max&&s.Y.from===s.Y.to&&(s.m.from=e.min.getMonth()+1,s.m.to=e.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=e.min.getDate(),s.d.to=e.max.getDate())),Object.assign(s,this.blocks,i),Object.keys(s).forEach(a=>{const l=s[a];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update({...o,mask:Ai(n)?n:r,blocks:s})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}Oo.GET_DEFAULT_BLOCKS=()=>({d:{mask:sf,from:1,to:31,maxLength:2},m:{mask:sf,from:1,to:12,maxLength:2},Y:{mask:sf,from:1900,to:9999}}),Oo.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}},Oe.MaskedDate=Oo;class ql extends Ln{constructor(e){super({...ql.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=rf(n),o=ko({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=o),o}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,o=this.rawInputValue,s=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:o,a=o.slice(s.length),l=this.currentMask,u=new ot,c=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(e,{...n},r),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),s){const h=this.currentMask.append(s,{raw:!0});u.tailShift=h.inserted.length-i.length}a&&(u.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)}else c&&(this.currentMask.state=c);return u}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new ot;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let o;[r,o]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(o)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let o;[r,o]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(o)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new ot;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...o}=e;n&&this.compiledMasks.forEach((s,a)=>s.state=n[a]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=o}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...o}=e[r];return nf(n,o)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}ql.DEFAULTS=void 0,ql.DEFAULTS={dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,o=e.compiledMasks.map((s,a)=>{const l=e.currentMask===s,u=l?s.displayValue.length:s.nearestInputPos(s.displayValue.length,be.FORCE_LEFT);return s.rawInputValue!==i?(s.reset(),s.append(i,{raw:!0})):l||s.remove(u),s.append(t,e.currentMaskFlags(n)),s.appendTail(r),{index:a,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,be.FORCE_LEFT)))}});return o.sort((s,a)=>a.weight-s.weight||a.totalInputPositions-s.totalInputPositions),e.compiledMasks[o[0].index]}},Oe.MaskedDynamic=ql;class rle extends Rn{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(a=>a.length),o=Math.min(...i),s=Math.max(...i)-o;r.mask="*".repeat(o),s&&(r.mask+="["+"*".repeat(s)+"]"),this.enum=n}super._update(r)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}Oe.MaskedEnum=rle;class ile extends Ln{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}Oe.MaskedFunction=ile;class Gn extends Ln{constructor(e){super({...Gn.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+_m(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(_m).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(_m(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const o=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const s=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(s);return o.tailShift+=(a-i)*this.thousandsSeparator.length,o.skip=!o.rawInserted&&e===this.thousandsSeparator,o}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),o=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const s=this._separatorsCountFromSlice(r);return new ot({tailShift:(s-o)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case be.NONE:case be.LEFT:case be.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===be.FORCE_LEFT)return r}break}case be.RIGHT:case be.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const r=this.number;n=n&&!isNaN(r)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,o,s)=>i+s),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Gn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Gn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Gn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Gn.EMPTY_VALUES.includes(e)&&Gn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Gn.UNMASKED_RADIX=".",Gn.EMPTY_VALUES=[...Ln.EMPTY_VALUES,0],Gn.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Gn.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Oe.MaskedNumber=Gn;const $m={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function M3(t,e,n){e===void 0&&(e=$m.MASKED),n===void 0&&(n=$m.MASKED);const r=ko(t);return i=>r.runIsolated(o=>(o[e]=i,o[n]))}function ole(t,e,n,r){return M3(e,n,r)(t)}Oe.PIPE_TYPE=$m,Oe.createPipe=M3,Oe.pipe=ole;try{globalThis.IMask=Oe}catch{}const A3={mask:A.oneOfType([A.array,A.func,A.string,A.instanceOf(RegExp),A.oneOf([Date,Number,Oe.Masked]),A.instanceOf(Oe.Masked)]),value:A.any,unmask:A.oneOfType([A.bool,A.oneOf(["typed"])]),prepare:A.func,prepareChar:A.func,validate:A.func,commit:A.func,overwrite:A.oneOfType([A.bool,A.oneOf(["shift"])]),eager:A.oneOfType([A.bool,A.oneOf(["append","remove"])]),skipInvalid:A.bool,onAccept:A.func,onComplete:A.func,placeholderChar:A.string,displayChar:A.string,lazy:A.bool,definitions:A.object,blocks:A.object,enum:A.arrayOf(A.string),maxLength:A.number,from:A.number,to:A.number,pattern:A.string,format:A.func,parse:A.func,autofix:A.oneOfType([A.bool,A.oneOf(["pad"])]),radix:A.string,thousandsSeparator:A.string,mapToRadix:A.arrayOf(A.string),scale:A.number,normalizeZeros:A.bool,padFractionalZeros:A.bool,min:A.oneOfType([A.number,A.instanceOf(Date)]),max:A.oneOfType([A.number,A.instanceOf(Date)]),dispatch:A.func,inputRef:A.oneOfType([A.func,A.shape({current:A.object})])},P3=Object.keys(A3).filter(t=>t!=="value"),sle=["value","unmask","onAccept","onComplete","inputRef"],ale=P3.filter(t=>sle.indexOf(t)<0);function D3(t){var e;const n=(e=class extends v.Component{constructor(o){super(o),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const o=this.props,s=this._extractMaskOptionsFromProps(o);if(s.mask)this.maskRef?(this.maskRef.updateOptions(s),"value"in o&&o.value!==void 0&&(this.maskValue=o.value)):this.initMask(s);else if(this.destroyMask(),"value"in o&&o.value!==void 0){var a;(a=this.element)!=null&&a.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=o.value:this.element.value=o.value}}componentWillUnmount(){this.destroyMask()}_inputRef(o){this.element=o,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=o:this.props.inputRef(o))}initMask(o){o===void 0&&(o=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Oe(this.element,o).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(o){const{...s}=o;return Object.keys(s).filter(a=>ale.indexOf(a)<0).forEach(a=>{delete s[a]}),s}_extractNonMaskProps(o){const{...s}=o;return P3.forEach(a=>{delete s[a]}),"defaultValue"in s||(s.defaultValue=o.mask?"":s.value),delete s.value,s}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(o){this.maskRef&&(o=o==null&&this.props.unmask!=="typed"?"":o,this.props.unmask==="typed"?this.maskRef.typedValue=o:this.props.unmask?this.maskRef.unmaskedValue=o:this.maskRef.value=o)}_onAccept(o){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,o)}_onComplete(o){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,o)}render(){return v.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=t.displayName||t.name||"Component";return n.displayName="IMask("+r+")",n.propTypes=A3,v.forwardRef((i,o)=>v.createElement(n,{...i,ref:o}))}const lle=D3(t=>{let{inputRef:e,...n}=t;return v.createElement("input",{...n,ref:e})}),ule=(t,e)=>v.createElement(lle,{...t,ref:e});v.forwardRef(ule);const cle=D3(t=>{const{inputRef:e,"data-value":n,defaultValue:r,tabIndex:i,...o}=t;return y.jsx(O.TextField,{inputRef:e,fullWidth:!0,...o,inputProps:{...o.inputProps,tabIndex:i},value:n})}),Fm=v.forwardRef(({onChange:t,name:e,...n},r)=>{const[i,o]=v.useState("");return y.jsx(cle,{inputRef:r,name:e,"data-value":i,...n,onAccept:(s,a)=>{o(s),t({target:{name:e,value:a._unmaskedValue}})}})});Fm.displayName="MaskedInput";function hle(t){let e;switch(t){case"top-left":e={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":e={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":e={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":e={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":e={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":e={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":e={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return e}const fle=yr("span")(({arrow:t,theme:e})=>{const i=`solid 1px ${Y(e.palette.grey[500],.12)}`,o={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},s={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},a={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[e.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:e.palette.background.paper},...t==="top-left"&&{...o,left:20},...t==="top-center"&&{...o,left:0,right:0,margin:"auto"},...t==="top-right"&&{...o,right:20},...t==="bottom-left"&&{...s,left:20},...t==="bottom-center"&&{...s,left:0,right:0,margin:"auto"},...t==="bottom-right"&&{...s,right:20},...t==="left-top"&&{...a,top:20},...t==="left-center"&&{...a,top:0,bottom:0,margin:"auto"},...t==="left-bottom"&&{...a,bottom:20},...t==="right-top"&&{...l,top:20},...t==="right-center"&&{...l,top:0,bottom:0,margin:"auto"},...t==="right-bottom"&&{...l,bottom:20}}}),dle=({open:t,children:e,arrow:n="top-right",disabledArrow:r,sx:i,...o})=>{const{style:s,anchorOrigin:a,transformOrigin:l}=hle(n);return y.jsxs(O.Popover,{open:!!t,anchorEl:t,anchorOrigin:a,transformOrigin:l,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...s,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...o,children:[!r&&y.jsx(fle,{arrow:n}),e]})},ple=O.styled(O.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginRight:24}})),gle=O.styled(O.DialogContent)({padding:"24px !important"}),mle=O.styled(O.DialogActions)(({theme:t})=>({borderTop:`1px solid ${t.palette.grey[300]}`,backgroundColor:t.palette.grey[50]})),vle=({children:t,actionsProps:e})=>y.jsx(mle,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...e,children:t}),_3=({actions:t,actionsProps:e,children:n,dialogContentProps:r,dialogTitle:i,dialogTitleProps:o,onClose:s,id:a,...l})=>{const u=a||"modal-actions";return y.jsxs(O.Dialog,{id:a,scroll:"body",...l,onClose:s,children:[y.jsxs(ple,{children:[i&&y.jsx(O.DialogTitle,{variant:"subtitle1",...o,children:i}),y.jsx(O.IconButton,{onClick:s,children:y.jsx(bt,{icon:"ic:round-close"})})]}),y.jsx(gle,{...r,children:n}),t&&y.jsx(vle,{actionsProps:{...e,id:u},children:t})]})},I3=({children:t,container:e,waitBeforeShow:n=50})=>{const[r,i]=v.useState(!1);return v.useEffect(()=>{const o=setTimeout(()=>i(!0),n);return()=>clearTimeout(o)},[n]),r?Zv.createPortal(t,document.getElementById(e)||document.body):null},yle=({children:t,id:e="modal-actions"})=>y.jsx(I3,{container:e,children:t}),ble=t=>{if(!t||(t=t==null?void 0:t.replace(/[^\d]+/g,""),t.length!==11||t==="00000000000"||t==="11111111111"||t==="22222222222"||t==="33333333333"||t==="44444444444"||t==="55555555555"||t==="66666666666"||t==="77777777777"||t==="88888888888"||t==="99999999999"))return!1;let e=0;for(let r=0;r<9;r++)e+=parseInt(t.charAt(r))*(10-r);let n=11-e%11;if((n===10||n===11)&&(n=0),n!==parseInt(t.charAt(9)))return!1;e=0;for(let r=0;r<10;r++)e+=parseInt(t.charAt(r))*(11-r);return n=11-e%11,(n===10||n===11)&&(n=0),n===parseInt(t.charAt(10))},xle=t=>{if(!t||(t=t.replace(/[^\d]+/g,""),t.length!==14)||t==="00000000000000"||t==="11111111111111"||t==="22222222222222"||t==="33333333333333"||t==="44444444444444"||t==="55555555555555"||t==="66666666666666"||t==="77777777777777"||t==="88888888888888"||t==="99999999999999")return!1;let e=t.length-2,n=t.substring(0,e);const r=t.substring(e);let i=0,o=e-7;for(let a=e;a>=1;a--)i+=parseInt(n.charAt(e-a))*o--,o<2&&(o=9);let s=i%11<2?0:11-i%11;if(s!==parseInt(r.charAt(0)))return!1;e+=1,n=t.substring(0,e),i=0,o=e-7;for(let a=e;a>=1;a--)i+=parseInt(n.charAt(e-a))*o--,o<2&&(o=9);return s=i%11<2?0:11-i%11,s===parseInt(r.charAt(1))},af=(t="",e=[8,20],n=!1,r=!1,i=!1)=>{const o=t.length>=e[0]&&t.length<=e[1],s=!i||/[A-Z]/.test(t),a=!r||/[!@#$%^&*(),.?":{}|<>]/.test(t),l=!n||/\d/.test(t);return{isLengthValid:o,hasUpperCaseChar:s,hasSpecialCharacter:a,hasNumberChar:l}},wle=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:xle,cpfIsValid:ble,validatePassword:af},Symbol.toStringTag,{value:"Module"})),Cle=O.styled(O.Stack)(({theme:t})=>({width:"100%",border:`solid 1px ${O.alpha(t.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),Sle=O.styled(O.Stack)(()=>({gap:4})),lf=O.styled(O.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",gap:8,color:t.palette.text.secondary,div:{fontSize:12},strong:{fontWeight:700,color:t.palette.text.primary}})),uf=({passed:t})=>t?y.jsx(bt,{icon:"ic:round-check",color:"success.main"}):y.jsx(bt,{icon:"ic:outline-warning",color:"warning.main"}),kle=({password:t,passwordSize:e,numberChar:n=!1,specialCharacter:r=!1,upperCaseChar:i=!1})=>{const{hasSpecialCharacter:o,hasUpperCaseChar:s,isLengthValid:a,hasNumberChar:l}=af(t,e,n,r,i);return y.jsxs(Cle,{children:[y.jsx(O.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),y.jsxs(Sle,{children:[y.jsxs(lf,{children:[y.jsx(uf,{passed:a}),y.jsxs(O.Typography,{component:"div",children:[y.jsxs("strong",{children:[e[0],"-",e[1]]})," ","caracteres"]})]}),i&&y.jsxs(lf,{children:[y.jsx(uf,{passed:s}),y.jsxs(O.Typography,{component:"div",children:["Pelo menos uma ",y.jsx("strong",{children:"letra maiúscula"})]})]}),n&&y.jsxs(lf,{children:[y.jsx(uf,{passed:l}),y.jsxs(O.Typography,{component:"div",children:["Pelo menos ",y.jsx("strong",{children:"um número"})]})]}),r&&y.jsxs(lf,{children:[y.jsx(uf,{passed:o}),y.jsxs(O.Typography,{component:"div",children:["Pelo menos um ",y.jsx("strong",{children:"caracter especial"})," ",y.jsx("span",{children:"(#,@,!,?)"})]})]})]})]})},$3=1024;let Tle=0,Lm=class{constructor(e,n){this.from=e,this.to=n}};class Fe{constructor(e={}){this.id=Tle++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=kn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Fe.closedBy=new Fe({deserialize:t=>t.split(" ")}),Fe.openedBy=new Fe({deserialize:t=>t.split(" ")}),Fe.group=new Fe({deserialize:t=>t.split(" ")}),Fe.contextHash=new Fe({perNode:!0}),Fe.lookAhead=new Fe({perNode:!0}),Fe.mounted=new Fe({perNode:!0});class cf{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Fe.mounted.id]}}const Ele=Object.create(null);class kn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):Ele,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new kn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Fe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Fe.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}kn.none=new kn("",Object.create(null),0,8);class Rm{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new kn(r.name,i,r.id,r.flags):r)}return new Rm(n)}}const hf=new WeakMap,F3=new WeakMap;var Xt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Xt||(Xt={}));class zt{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=cf.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new jm(this.topNode,e)}cursorAt(e,n=0,r=0){let i=hf.get(this)||this.topNode,o=new jm(i);return o.moveTo(e,n),hf.set(this,o._tree),o}get topNode(){return new Kn(this,0,0,null)}resolve(e,n=0){let r=Ul(hf.get(this)||this.topNode,e,n,!1);return hf.set(this,r),r}resolveInner(e,n=0){let r=Ul(F3.get(this)||this.topNode,e,n,!0);return F3.set(this,r),r}resolveStack(e,n=0){return Ale(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&Xt.IncludeAnonymous)>0;for(let l=this.cursor(s|Xt.IncludeAnonymous);;){let u=!1;if(l.from<=o&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:zm(kn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new zt(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new zt(kn.none,n,r,i)))}static build(e){return Ple(e)}}zt.empty=new zt(kn.none,[],[],0);class Bm{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Bm(this.buffer,this.index)}}class Pi{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return kn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let l=e;l!=n&&!(L3(o,i,s[l+1],s[l+2])&&(a=l,r>0));l=s[l+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a<n;){o[l++]=i[a++],o[l++]=i[a++]-r;let u=o[l++]=i[a++]-r;o[l++]=i[a++]-e,s=Math.max(s,u)}return new Pi(o,s,this.set)}}function L3(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Ul(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Kn&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Xt.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Kn&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class R3{cursor(e=0){return new jm(this,e)}getChild(e,n=null,r=null){let i=B3(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return B3(this,e,n,r)}resolve(e,n=0){return Ul(this,e,n,!1)}resolveInner(e,n=0){return Ul(this,e,n,!0)}matchContext(e){return Nm(this,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Kn extends R3{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,u=n>0?a.length:-1;e!=u;e+=n){let c=a[e],h=l[e]+s.from;if(L3(i,r,h,h+c.length)){if(c instanceof Pi){if(o&Xt.ExcludeBuffers)continue;let f=c.findChild(0,c.buffer.length,n,r-h,i);if(f>-1)return new Di(new Ole(s,c,e,h),null,f)}else if(o&Xt.IncludeAnonymous||!c.type.isAnonymous||Vm(c)){let f;if(!(o&Xt.IgnoreMounts)&&(f=cf.get(c))&&!f.overlay)return new Kn(f.tree,h,e,s);let d=new Kn(c,h,e,s);return o&Xt.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(o&Xt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Xt.IgnoreOverlays)&&(i=cf.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new Kn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function B3(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(;!i.type.is(n);)if(!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function Nm(t,e,n=e.length-1){for(let r=t.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class Ole{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Di extends R3{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Di(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Xt.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Di(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Di(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Di(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new zt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function N3(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Kn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Mle(i,n)}class Mle{constructor(e,n){this.heads=e,this.node=n}get next(){return N3(this.heads)}}function Ale(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Kn?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=cf.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Kn(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Ul(a,e,n,!1))}}return i?N3(i):r}class jm{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Kn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Kn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Xt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Xt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Xt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&Xt.IncludeAnonymous||a instanceof Pi||!a.type.isAnonymous||Vm(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new Di(this.buffer,n,this.stack[i]);return this.bufferNode=new Di(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;i&&n&&n(this),i=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return Nm(this.node,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return Nm(this.node,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function Vm(t){return t.children.some(e=>e instanceof Pi||!e.type.isAnonymous||Vm(e))}function Ple(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=$3,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new Bm(n,n.length):n,l=r.types,u=0,c=0;function h(w,T,S,M,P,D){let{id:R,start:H,end:W,size:B}=a,j=c;for(;B<0;)if(a.next(),B==-1){let _=o[R];S.push(_),M.push(H-w);return}else if(B==-3){u=R;return}else if(B==-4){c=R;return}else throw new RangeError(`Unrecognized record size: ${B}`);let N=l[R],V,me,re=H-w;if(W-H<=i&&(me=m(a.pos-T,P))){let _=new Uint16Array(me.size-me.skip),F=a.pos-me.size,U=_.length;for(;a.pos>F;)U=b(me.start,_,U);V=new Pi(_,W-me.start,r),re=me.start-w}else{let _=a.pos-B;a.next();let F=[],U=[],se=R>=s?R:-1,Q=0,ve=W;for(;a.pos>_;)se>=0&&a.id==se&&a.size>=0?(a.end<=ve-i&&(p(F,U,H,Q,a.end,ve,se,j),Q=F.length,ve=a.end),a.next()):D>2500?f(H,_,F,U):h(H,_,F,U,se,D+1);if(se>=0&&Q>0&&Q<F.length&&p(F,U,H,Q,H,ve,se,j),F.reverse(),U.reverse(),se>-1&&Q>0){let le=d(N);V=zm(N,F,U,0,F.length,0,W-H,le,le)}else V=g(N,F,U,W-H,j-W)}S.push(V),M.push(re)}function f(w,T,S,M){let P=[],D=0,R=-1;for(;a.pos>T;){let{id:H,start:W,end:B,size:j}=a;if(j>4)a.next();else{if(R>-1&&W<R)break;R<0&&(R=B-i),P.push(H,W,B),D++,a.next()}}if(D){let H=new Uint16Array(D*4),W=P[P.length-2];for(let B=P.length-3,j=0;B>=0;B-=3)H[j++]=P[B],H[j++]=P[B+1]-W,H[j++]=P[B+2]-W,H[j++]=j;S.push(new Pi(H,P[2]-W,r)),M.push(W-w)}}function d(w){return(T,S,M)=>{let P=0,D=T.length-1,R,H;if(D>=0&&(R=T[D])instanceof zt){if(!D&&R.type==w&&R.length==M)return R;(H=R.prop(Fe.lookAhead))&&(P=S[D]+R.length+H)}return g(w,T,S,M,P)}}function p(w,T,S,M,P,D,R,H){let W=[],B=[];for(;w.length>M;)W.push(w.pop()),B.push(T.pop()+S-P);w.push(g(r.types[R],W,B,D-P,H-D)),T.push(P-S)}function g(w,T,S,M,P=0,D){if(u){let R=[Fe.contextHash,u];D=D?[R].concat(D):[R]}if(P>25){let R=[Fe.lookAhead,P];D=D?[R].concat(D):[R]}return new zt(w,T,S,M,D)}function m(w,T){let S=a.fork(),M=0,P=0,D=0,R=S.end-i,H={size:0,start:0,skip:0};e:for(let W=S.pos-w;S.pos>W;){let B=S.size;if(S.id==T&&B>=0){H.size=M,H.start=P,H.skip=D,D+=4,M+=4,S.next();continue}let j=S.pos-B;if(B<0||j<W||S.start<R)break;let N=S.id>=s?4:0,V=S.start;for(S.next();S.pos>j;){if(S.size<0)if(S.size==-3)N+=4;else break e;else S.id>=s&&(N+=4);S.next()}P=V,M+=B,D+=N}return(T<0||M==w)&&(H.size=M,H.start=P,H.skip=D),H.size>4?H:void 0}function b(w,T,S){let{id:M,start:P,end:D,size:R}=a;if(a.next(),R>=0&&M<s){let H=S;if(R>4){let W=a.pos-(R-4);for(;a.pos>W;)S=b(w,T,S)}T[--S]=H,T[--S]=D-w,T[--S]=P-w,T[--S]=M}else R==-3?u=M:R==-4&&(c=M);return S}let x=[],C=[];for(;a.pos>0;)h(t.start||0,t.bufferStart||0,x,C,-1,0);let k=(e=t.length)!==null&&e!==void 0?e:x.length?C[0]+x[0].length:0;return new zt(l[t.topID],x.reverse(),C.reverse(),k)}const j3=new WeakMap;function ff(t,e){if(!t.isAnonymous||e instanceof Pi||e.type!=t)return 1;let n=j3.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof zt)){n=1;break}n+=ff(t,r)}j3.set(e,n)}return n}function zm(t,e,n,r,i,o,s,a,l){let u=0;for(let p=r;p<i;p++)u+=ff(t,e[p]);let c=Math.ceil(u*1.5/8),h=[],f=[];function d(p,g,m,b,x){for(let C=m;C<b;){let k=C,w=g[C],T=ff(t,p[C]);for(C++;C<b;C++){let S=ff(t,p[C]);if(T+S>=c)break;T+=S}if(C==k+1){if(T>c){let S=p[k];d(S.children,S.positions,0,S.children.length,g[k]+x);continue}h.push(p[k])}else{let S=g[C-1]+p[C-1].length-w;h.push(zm(t,p,g,k,C,w,S,null,l))}f.push(w+x-o)}}return d(e,n,r,i,0),(a||l)(h,f,s)}class Mo{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Mo(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let c=a<n.length?n[a]:null,h=c?c.fromA:1e9;if(h-l>=r)for(;s&&s.from<h;){let f=s;if(l>=f.from||h<=f.to||u){let d=Math.max(f.from,l)-u,p=Math.min(f.to,h)-u;f=d>=p?null:new Mo(d,p,f.tree,f.offset+u,a>0,!!c)}if(f&&i.push(f),s.to>h)break;s=o<e.length?e[o++]:null}if(!c)break;l=c.toA,u=c.toA-c.toB}return i}}class V3{startParse(e,n,r){return typeof e=="string"&&(e=new Dle(e)),r=r?r.length?r.map(i=>new Lm(i.from,i.to)):[new Lm(0,0)]:[new Lm(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class Dle{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Fe({perNode:!0});class Ge{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Tr.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let r=[];return this.decompose(e,n,r,0),Tr.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Yl(this),o=new Yl(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Yl(this,e)}iterRange(e,n=this.length){return new W3(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new H3(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ge.empty:e.length<=32?new Rt(e):Tr.from(Rt.split(e,[]))}}class Rt extends Ge{constructor(e,n=_le(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new Ile(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Rt(z3(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=df(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new Rt(a,s.length+o.length));else{let l=a.length>>1;r.push(new Rt(a.slice(0,l)),new Rt(a.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Rt))return super.replace(e,n,r);let i=df(this.text,df(r.text,z3(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Rt(i,o):Tr.from(Rt.split(i,[]),o)}sliceString(e,n=this.length,r=`
257
+ `){let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let a=this.text[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new Rt(r,i)),r=[],i=-1);return i>-1&&n.push(new Rt(r,i)),n}}class Tr extends Ge{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.children[o],a=i+s.length,l=r+s.lines-1;if((n?l:a)>=e)return s.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let a=this.children[o],l=s+a.length;if(e<=l&&n>=s){let u=i&((s<=e?1:0)|(l>=n?2:0));s>=e&&l<=n&&!u?r.push(a):a.decompose(e-s,n-s,r,u)}s=l+1}}replace(e,n,r){if(r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e>=o&&n<=a){let l=s.replace(e-o,n-o,r),u=this.lines-s.lines+l.lines;if(l.lines<u>>5-1&&l.lines>u>>5+1){let c=this.children.slice();return c[i]=l,new Tr(c,this.length-(n-e)+r.length)}return super.replace(o,a,l)}o=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
258
+ `){let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let a=this.children[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.sliceString(e-s,n-s,r)),s=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Tr))return 0;let r=0,[i,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==a)return r;let l=this.children[i],u=e.children[o];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new Rt(d,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,a=[],l=0,u=-1,c=[];function h(d){let p;if(d.lines>o&&d instanceof Tr)for(let g of d.children)h(g);else d.lines>s&&(l>s||!l)?(f(),a.push(d)):d instanceof Rt&&l&&(p=c[c.length-1])instanceof Rt&&d.lines+p.lines<=32?(l+=d.lines,u+=d.length+1,c[c.length-1]=new Rt(p.text.concat(d.text),p.length+1+d.length)):(l+d.lines>i&&f(),l+=d.lines,u+=d.length+1,c.push(d))}function f(){l!=0&&(a.push(c.length==1?c[0]:Tr.from(c,u)),u=-1,l=c.length=0)}for(let d of e)h(d);return f(),a.length==1?a[0]:new Tr(a,n)}}Ge.empty=new Rt([""],0);function _le(t){let e=-1;for(let n of t)e+=n.length+1;return e}function df(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let a=t[o],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(e[e.length-1]+=a,s=!1):e.push(a)),i=l+1}return e}function z3(t,e,n){return df(t,[""],e,n)}class Yl{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Rt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],s=o>>1,a=i instanceof Rt?i.text.length:i.children.length;if(s==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
259
+ `,this;e--}else if(i instanceof Rt){let l=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Rt?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class W3{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Yl(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class H3{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ge.prototype[Symbol.iterator]=function(){return this.iter()},Yl.prototype[Symbol.iterator]=W3.prototype[Symbol.iterator]=H3.prototype[Symbol.iterator]=function(){return this});class Ile{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}let na="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;t<na.length;t++)na[t]+=na[t-1];function $le(t){for(let e=1;e<na.length;e+=2)if(na[e]>t)return na[e-1]<=t;return!1}function q3(t){return t>=127462&&t<=127487}const U3=8205;function an(t,e,n=!0,r=!0){return(n?Y3:Fle)(t,e,r)}function Y3(t,e,n){if(e==t.length)return e;e&&G3(t.charCodeAt(e))&&K3(t.charCodeAt(e-1))&&e--;let r=Jt(t,e);for(e+=Xn(r);e<t.length;){let i=Jt(t,e);if(r==U3||i==U3||n&&$le(i))e+=Xn(i),r=i;else if(q3(i)){let o=0,s=e-2;for(;s>=0&&q3(Jt(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function Fle(t,e,n){for(;e>0;){let r=Y3(t,e-2,n);if(r<e)return r;e--}return 0}function G3(t){return t>=56320&&t<57344}function K3(t){return t>=55296&&t<56320}function Jt(t,e){let n=t.charCodeAt(e);if(!K3(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return G3(r)?(n-55296<<10)+(r-56320)+65536:n}function Wm(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Xn(t){return t<65536?1:2}const Hm=/\r\n?|\n/;var dn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(dn||(dn={}));class Er{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){qm(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Er(e)}composeDesc(e){return this.empty?e:e.empty?this:X3(this,e)}mapDesc(e,n=!1){return e.empty?this:Um(this,e,n)}mapPos(e,n=-1,r=dn.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],l=this.sections[s++],u=i+a;if(l<0){if(u>e)return o+(e-i);o+=a}else{if(r!=dn.Simple&&u>=e&&(r==dn.TrackDel&&i<e&&u>e||r==dn.TrackBefore&&i<e||r==dn.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!a)return e==i||n<0?o:o+l;o+=l}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Er(e)}static create(e){return new Er(e)}}class qt extends Er{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return qm(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return Um(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let l=i>>1;for(;r.length<l;)r.push(Ge.empty);r.push(s?e.slice(o,o+s):Ge.empty)}o+=s}return new qt(n,r)}compose(e){return this.empty?e:e.empty?this:X3(this,e,!0)}map(e,n=!1){return e.empty?this:Um(this,e,n,!0)}iterChanges(e,n=!1){qm(this,e,n)}get desc(){return Er.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new Gl(this);e:for(let s=0,a=0;;){let l=s==e.length?1e9:e[s++];for(;a<l||a==l&&o.len==0;){if(o.done)break e;let c=Math.min(o.len,l-a);ln(i,c,-1);let h=o.ins==-1?-1:o.off==0?o.ins:0;ln(n,c,h),h>0&&_i(r,n,o.text),o.forward(c),a+=c}let u=e[s++];for(;a<u;){if(o.done)break e;let c=Math.min(o.len,u-a);ln(n,c,-1),ln(i,c,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(c),a+=c}}return{changes:new qt(n,r),filtered:Er.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function l(c=!1){if(!c&&!i.length)return;s<n&&ln(i,n-s,-1);let h=new qt(i,o);a=a?a.compose(h.map(a)):h,i=[],o=[],s=0}function u(c){if(Array.isArray(c))for(let h of c)u(h);else if(c instanceof qt){if(c.length!=n)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);l(),a=a?a.compose(c.map(a)):c}else{let{from:h,to:f=h,insert:d}=c;if(h>f||h<0||f>n)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${n})`);let p=d?typeof d=="string"?Ge.of(d.split(r||Hm)):d:Ge.empty,g=p.length;if(h==f&&g==0)return;h<s&&l(),h>s&&ln(i,h-s,-1),ln(i,f-h,g),_i(o,i,p),s=f}}return u(e),l(!a),a}static empty(e){return new qt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(Ge.empty);r[i]=Ge.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new qt(n,r)}static createSet(e,n){return new qt(e,n)}}function ln(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function _i(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Ge.empty);t.push(n)}}function qm(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)i+=a,o+=a;else{let u=i,c=o,h=Ge.empty;for(;u+=a,c+=l,l&&r&&(h=h.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(i,u,o,c,h),i=u,o=c}}}function Um(t,e,n,r=!1){let i=[],o=r?[]:null,s=new Gl(t),a=new Gl(e);for(let l=-1;;)if(s.ins==-1&&a.ins==-1){let u=Math.min(s.len,a.len);ln(i,u,-1),s.forward(u),a.forward(u)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let u=a.len;for(ln(i,a.ins,-1);u;){let c=Math.min(s.len,u);s.ins>=0&&l<s.i&&s.len<=c&&(ln(i,0,s.ins),o&&_i(o,i,s.text),l=s.i),s.forward(c),u-=c}a.next()}else if(s.ins>=0){let u=0,c=s.len;for(;c;)if(a.ins==-1){let h=Math.min(c,a.len);u+=h,c-=h,a.forward(h)}else if(a.ins==0&&a.len<c)c-=a.len,a.next();else break;ln(i,u,l<s.i?s.ins:0),o&&l<s.i&&_i(o,i,s.text),l=s.i,s.forward(s.len-c)}else{if(s.done&&a.done)return o?qt.createSet(i,o):Er.create(i);throw new Error("Mismatched change set lengths")}}function X3(t,e,n=!1){let r=[],i=n?[]:null,o=new Gl(t),s=new Gl(e);for(let a=!1;;){if(o.done&&s.done)return i?qt.createSet(r,i):Er.create(r);if(o.ins==0)ln(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)ln(r,0,s.ins,a),i&&_i(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,s.len),u=r.length;if(o.ins==-1){let c=s.ins==-1?-1:s.off?0:s.ins;ln(r,l,c,a),i&&c&&_i(i,r,s.text)}else s.ins==-1?(ln(r,o.off?0:o.len,l,a),i&&_i(i,r,o.textBit(l))):(ln(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&_i(i,r,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||r.length>u),o.forward2(l),s.forward(l)}}}}class Gl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ge.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ge.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Ao{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Ao(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return L.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return L.range(this.anchor,r)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return L.range(e.anchor,e.head)}static create(e,n,r){return new Ao(e,n,r)}}class L{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:L.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new L([this.main],0)}addRange(e,n=!0){return L.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,L.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new L(e.ranges.map(n=>Ao.fromJSON(n)),e.main)}static single(e,n=e){return new L([L.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return L.normalized(e.slice(),n);r=o.to}return new L(e,n)}static cursor(e,n=0,r,i){return Ao.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?Ao.create(n,e,48|o):Ao.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,l=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?L.range(l,a):L.range(a,l))}}return new L(e,n)}}function Z3(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Ym=0;class he{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=Ym++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new he(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:Gm),!!e.static,e.enables)}of(e){return new pf([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new pf(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new pf(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function Gm(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class pf{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=Ym++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,u=!1,c=[];for(let h of this.dependencies)h=="doc"?l=!0:h=="selection"?u=!0:((n=e[h.id])!==null&&n!==void 0?n:1)&1||c.push(e[h.id]);return{create(h){return h.values[s]=r(h),1},update(h,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||Km(h,c)){let d=r(h);if(a?!Q3(d,h.values[s],i):!i(d,h.values[s]))return h.values[s]=d,1}return 0},reconfigure:(h,f)=>{let d,p=f.config.address[o];if(p!=null){let g=vf(f,p);if(this.dependencies.every(m=>m instanceof he?f.facet(m)===h.facet(m):m instanceof en?f.field(m,!1)==h.field(m,!1):!0)||(a?Q3(d=r(h),g,i):i(d=r(h),g)))return h.values[s]=g,0}else d=r(h);return h.values[s]=d,1}}}}function Q3(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function Km(t,e){let n=!1;for(let r of e)Xl(t,r)&1&&(n=!0);return n}function Lle(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let u=[];for(let c=0;c<r.length;c++){let h=vf(l,r[c]);if(i[c]==2)for(let f of h)u.push(f);else u.push(h)}return e.combine(u)}return{create(l){for(let u of r)Xl(l,u);return l.values[s]=a(l),1},update(l,u){if(!Km(l,o))return 0;let c=a(l);return e.compare(c,l.values[s])?0:(l.values[s]=c,1)},reconfigure(l,u){let c=Km(l,r),h=u.config.facets[e.id],f=u.facet(e);if(h&&!c&&Gm(n,h))return l.values[s]=f,0;let d=a(l);return e.compare(d,f)?(l.values[s]=f,0):(l.values[s]=d,1)}}}const J3=he.define({static:!0});class en{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new en(Ym++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(J3).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,J3.of({field:this,create:e})]}get extension(){return this}}const Po={lowest:4,low:3,default:2,high:1,highest:0};function Kl(t){return e=>new e4(e,t)}const ra={highest:Kl(Po.highest),high:Kl(Po.high),default:Kl(Po.default),low:Kl(Po.low),lowest:Kl(Po.lowest)};class e4{constructor(e,n){this.inner=e,this.prec=n}}class gf{of(e){return new Xm(this,e)}reconfigure(e){return gf.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Xm{constructor(e,n){this.compartment=e,this.inner=n}}class mf{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let f of Rle(e,n,s))f instanceof en?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let a=Object.create(null),l=[],u=[];for(let f of i)a[f.id]=u.length<<1,u.push(d=>f.slot(d));let c=r==null?void 0:r.config.facets;for(let f in o){let d=o[f],p=d[0].facet,g=c&&c[f]||[];if(d.every(m=>m.type==0))if(a[p.id]=l.length<<1|1,Gm(g,d))l.push(r.facet(p));else{let m=p.combine(d.map(b=>b.value));l.push(r&&p.compare(m,r.facet(p))?r.facet(p):m)}else{for(let m of d)m.type==0?(a[m.id]=l.length<<1|1,l.push(m.value)):(a[m.id]=u.length<<1,u.push(b=>m.dynamicSlot(b)));a[p.id]=u.length<<1,u.push(m=>Lle(m,p,d))}}let h=u.map(f=>f(a));return new mf(e,s,h,a,l,o)}}function Rle(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let l=i.get(s);if(l!=null){if(l<=a)return;let u=r[l].indexOf(s);u>-1&&r[l].splice(u,1),s instanceof Xm&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let u of s)o(u,a);else if(s instanceof Xm){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),o(u,a)}else if(s instanceof e4)o(s.inner,s.prec);else if(s instanceof en)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof pf)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,Po.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,a)}}return o(t,Po.default),r.reduce((s,a)=>s.concat(a))}function Xl(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function vf(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const t4=he.define(),n4=he.define({combine:t=>t.some(e=>e),static:!0}),r4=he.define({combine:t=>t.length?t[0]:void 0,static:!0}),i4=he.define(),o4=he.define(),s4=he.define(),a4=he.define({combine:t=>t.length?t[0]:!1});class Or{constructor(e,n){this.type=e,this.value=n}static define(){return new Ble}}class Ble{of(e){return new Or(this,e)}}class Nle{constructor(e){this.map=e}of(e){return new De(this,e)}}class De{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new De(this.type,n)}is(e){return this.type==e}static define(e={}){return new Nle(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}De.reconfigure=De.define(),De.appendConfig=De.define();class Ut{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&Z3(r,n.newLength),o.some(a=>a.type==Ut.time)||(this.annotations=o.concat(Ut.time.of(Date.now())))}static create(e,n,r,i,o,s){return new Ut(e,n,r,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Ut.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Ut.time=Or.define(),Ut.userEvent=Or.define(),Ut.addToHistory=Or.define(),Ut.remote=Or.define();function jle(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function l4(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=qt.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:De.mapEffects(t.effects,i).concat(De.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Zm(t,e,n){let r=e.selection,i=ia(e.annotations);return e.userEvent&&(i=i.concat(Ut.userEvent.of(e.userEvent))),{changes:e.changes instanceof qt?e.changes:qt.of(e.changes||[],n,t.facet(r4)),selection:r&&(r instanceof L?r:L.single(r.anchor,r.head)),effects:ia(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function u4(t,e,n){let r=Zm(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=l4(r,Zm(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=Ut.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return zle(n?Vle(i):i)}function Vle(t){let e=t.startState,n=!0;for(let i of e.facet(i4)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:jle(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=qt.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=Ut.create(e,i,t.selection&&t.selection.map(o),De.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(o4);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof Ut?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Ut?t=o[0]:t=u4(e,ia(o),!1)}return t}function zle(t){let e=t.startState,n=e.facet(s4),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=l4(r,Zm(e,o,t.changes.newLength),!0))}return r==t?t:Ut.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const Wle=[];function ia(t){return t==null?Wle:Array.isArray(t)?t:[t]}var wt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(wt||(wt={}));const Hle=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Qm;try{Qm=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function qle(t){if(Qm)return Qm.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||Hle.test(n)))return!0}return!1}function Ule(t){return e=>{if(!/\S/.test(e))return wt.Space;if(qle(e))return wt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return wt.Word;return wt.Other}}class je{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Xl(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Xl(this,r),vf(this,r)}update(...e){return u4(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let s of e.effects)s.is(gf.reconfigure)?(n&&(i=new Map,n.compartments.forEach((a,l)=>i.set(l,a)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(De.reconfigure)?(n=null,r=s.value):s.is(De.appendConfig)&&(n=null,r=ia(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=mf.resolve(r,i,this),o=new je(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(a,l)=>l.reconfigure(a,this),null).values),new je(n,e.newDoc,e.newSelection,o,(s,a)=>a.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:L.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=ia(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),u=this.changes(l.changes),c=u.map(i);for(let f=0;f<a;f++)o[f]=o[f].map(c);let h=i.mapDesc(u,!0);o.push(l.range.map(h)),i=i.compose(c),s=De.mapEffects(s,c).concat(De.mapEffects(ia(l.effects),h))}return{changes:i,selection:L.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof qt?e:qt.of(e,this.doc.length,this.facet(je.lineSeparator))}toText(e){return Ge.of(e.split(this.facet(je.lineSeparator)||Hm))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Xl(this,n),vf(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof en&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(l=>s.spec.fromJSON(a,l)))}}return je.create({doc:e.doc,selection:L.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=mf.resolve(e.extensions||[],new Map),r=e.doc instanceof Ge?e.doc:Ge.of((e.doc||"").split(n.staticFacet(je.lineSeparator)||Hm)),i=e.selection?e.selection instanceof L?e.selection:L.single(e.selection.anchor,e.selection.head):L.single(0);return Z3(i,r.length),n.staticFacet(n4)||(i=i.asSingle()),new je(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(je.tabSize)}get lineBreak(){return this.facet(je.lineSeparator)||`
260
+ `}get readOnly(){return this.facet(a4)}phrase(e,...n){for(let r of this.facet(je.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(t4))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return Ule(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let l=an(n,s,!1);if(o(n.slice(l,s))!=wt.Word)break;s=l}for(;a<i;){let l=an(n,a);if(o(n.slice(a,l))!=wt.Word)break;a=l}return s==a?null:L.range(s+r,a+r)}}je.allowMultipleSelections=n4,je.tabSize=he.define({combine:t=>t.length?t[0]:4}),je.lineSeparator=r4,je.readOnly=a4,je.phrases=he.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}}),je.languageData=t4,je.changeFilter=i4,je.transactionFilter=o4,je.transactionExtender=s4,gf.reconfigure=De.define();function Mr(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=r[o];if(a===void 0)r[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Do{eq(e){return this==e}range(e,n=e){return Zl.create(e,n,this)}}Do.prototype.startSide=Do.prototype.endSide=0,Do.prototype.point=!1,Do.prototype.mapMode=dn.TrackDel;class Zl{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new Zl(e,n,r)}}function Jm(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class e1{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let l=s+a>>1,u=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return u>=0?s:a;u>=0?a=l:s=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,a=-1;for(let l=0;l<this.value.length;l++){let u=this.value[l],c=this.from[l]+e,h=this.to[l]+e,f,d;if(c==h){let p=n.mapPos(c,u.startSide,u.mapMode);if(p==null||(f=d=p,u.startSide!=u.endSide&&(d=n.mapPos(c,u.endSide),d<f)))continue}else if(f=n.mapPos(c,u.startSide),d=n.mapPos(h,u.endSide),f>d||f==d&&u.startSide>0&&u.endSide<=0)continue;(d-f||u.endSide-u.startSide)<0||(s<0&&(s=f),u.point&&(a=Math.max(a,d-f)),r.push(u),i.push(f-s),o.push(d-s))}return{mapped:r.length?new e1(i,o,r,a):null,pos:s}}}class rt{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new rt(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(Jm)),this.isEmpty)return n.length?rt.of(n):this;let a=new h4(this,null,-1).goto(0),l=0,u=[],c=new Ii;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let h=n[l++];c.addInner(h.from,h.to,h.value)||u.push(h)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||u.push(Zl.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?rt.empty:this.nextLayer.update({add:u,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],l=this.chunk[s],u=e.touchesRange(a,a+l.length);if(u===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(u===!0){let{mapped:c,pos:h}=l.map(a,e);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(h))}}let o=this.nextLayer.map(e);return n.length==0?o:new rt(r,n,o||rt.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Ql.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Ql.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=o),a=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=o),l=c4(s,a,r),u=new Jl(s,l,o),c=new Jl(a,l,o);r.iterGaps((h,f,d)=>f4(u,h,c,f,d,i)),r.empty&&r.length==0&&f4(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=1e9-1);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),s=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=c4(o,s),l=new Jl(o,a,0).goto(r),u=new Jl(s,a,0).goto(r);for(;;){if(l.to!=u.to||!n1(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>i)return!0;l.next(),u.next()}}static spans(e,n,r,i,o=-1){let s=new Jl(e,null,o).goto(n),a=n,l=s.openStart;for(;;){let u=Math.min(s.to,r);if(s.point){let c=s.activeForPoint(s.to),h=s.pointFrom<n?c.length+1:Math.min(c.length,l);i.point(a,u,s.point,c,h,s.pointRank),l=Math.min(s.openEnd(u),c.length)}else u>a&&(i.span(a,u,s.active,l),l=s.openEnd(u));if(s.to>r)return l+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new Ii;for(let i of e instanceof Zl?[e]:n?Yle(e):e)r.add(i.from,i.to,i.value);return r.finish()}}rt.empty=new rt([],[],null,-1);function Yle(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(Jm(e,r)>0)return t.slice().sort(Jm);e=r}return t}rt.empty.nextLayer=rt.empty;class Ii{finishChunk(e){this.chunks.push(new e1(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new Ii)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(rt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=rt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function c4(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=r.get(o.chunk[s]);a!=null&&(n?n.mapPos(a):a)==o.chunkPos[s]&&!(n!=null&&n.touchesRange(a,a+o.chunk[s].length))&&i.add(o.chunk[s])}return i}class h4{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Ql{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new h4(s,n,r,o));return i.length==1?i[0]:new Ql(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)t1(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)t1(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),t1(this.heap,0)}}}function t1(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Jl{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ql.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){yf(this.active,e),yf(this.activeTo,e),yf(this.activeRank,e),this.minActive=d4(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&this.activeRank[n]<=o;)n++;bf(this.active,n,r),bf(this.activeTo,n,i),bf(this.activeRank,n,o),e&&bf(e,n,this.cursor.from),this.minActive=d4(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&yf(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function f4(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,a=r,l=r-e;for(;;){let u=t.to+l-n.to||t.endSide-n.endSide,c=u<0?t.to+l:n.to,h=Math.min(c,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&n1(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,h,t.point,n.point):h>a&&!n1(t.active,n.active)&&o.compareRange(a,h,t.active,n.active),c>s)break;a=c,u<=0&&t.next(),u>=0&&n.next()}}function n1(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function yf(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function bf(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function d4(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function oa(t,e,n=t.length){let r=0;for(let i=0;i<n;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=an(t,i));return r}function r1(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=an(t,i)}return r===!0?-1:t.length}const i1="ͼ",p4=typeof Symbol>"u"?"__"+i1:Symbol.for(i1),o1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),g4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class $i{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,l,u){let c=[],h=/^@(\w+)\b/.exec(s[0]),f=h&&h[1]=="keyframes";if(h&&a==null)return l.push(s[0]+";");for(let d in a){let p=a[d];if(/&/.test(d))o(d.split(/,\s*/).map(g=>s.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,l);else if(p&&typeof p=="object"){if(!h)throw new RangeError("The value of a property ("+d+") should be a primitive value.");o(i(d),p,c,f)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||f)&&l.push((r&&!h&&!u?s.map(r):s).join(", ")+" {"+c.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
261
+ `)}static newName(){let e=g4[p4]||1;return g4[p4]=e+1,i1+e.toString(36)}static mount(e,n,r){let i=e[o1],o=r&&r.nonce;i?o&&i.setNonce(o):i=new Gle(e,o),i.mount(Array.isArray(n)?n:[n])}}let m4=new Map;class Gle{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=m4.get(r);if(o)return e.adoptedStyleSheets=[o.sheet,...e.adoptedStyleSheets],e[o1]=o;this.sheet=new i.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],m4.set(r,this)}else{this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let o=e.head||e;o.insertBefore(this.styleTag,o.firstChild)}this.modules=[],e[o1]=this}mount(e){let n=this.sheet,r=0,i=0;for(let o=0;o<e.length;o++){let s=e[o],a=this.modules.indexOf(s);if(a<i&&a>-1&&(this.modules.splice(a,1),i--,a=-1),a==-1){if(this.modules.splice(i++,0,s),n)for(let l=0;l<s.rules.length;l++)n.insertRule(s.rules[l],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(!n){let o="";for(let s=0;s<this.modules.length;s++)o+=this.modules[s].getRules()+`
262
+ `;this.styleTag.textContent=o}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var Fi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},eu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Kle=typeof navigator<"u"&&/Mac/.test(navigator.platform),Xle=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),tn=0;tn<10;tn++)Fi[48+tn]=Fi[96+tn]=String(tn);for(var tn=1;tn<=24;tn++)Fi[tn+111]="F"+tn;for(var tn=65;tn<=90;tn++)Fi[tn]=String.fromCharCode(tn+32),eu[tn]=String.fromCharCode(tn);for(var s1 in Fi)eu.hasOwnProperty(s1)||(eu[s1]=Fi[s1]);function Zle(t){var e=Kle&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Xle&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?eu:Fi)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function xf(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function a1(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Qle(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function wf(t,e){if(!e.anchorNode)return!1;try{return a1(t,e.anchorNode)}catch{return!1}}function sa(t){return t.nodeType==3?_o(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Cf(t,e,n,r){return n?v4(t,e,n,r,-1)||v4(t,e,n,r,1):!1}function tu(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function v4(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:ei(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=tu(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?ei(t):0}else return!1}}function ei(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Sf(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function Jle(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function eue(t,e,n,r,i,o,s,a){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(c.nodeType==1){let f,d=c==l.body,p=1,g=1;if(d)f=Jle(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let x=c.getBoundingClientRect();p=x.width/c.offsetWidth,g=x.height/c.offsetHeight,f={left:x.left,right:x.left+c.clientWidth*p,top:x.top,bottom:x.top+c.clientHeight*g}}let m=0,b=0;if(i=="nearest")e.top<f.top?(b=-(f.top-e.top+s),n>0&&e.bottom>f.bottom+b&&(b=e.bottom-f.bottom+b+s)):e.bottom>f.bottom&&(b=e.bottom-f.bottom+s,n<0&&e.top-b<f.top&&(b=-(f.top+b-e.top+s)));else{let x=e.bottom-e.top,C=f.bottom-f.top;b=(i=="center"&&x<=C?e.top+x/2-C/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-C+s)-f.top}if(r=="nearest"?e.left<f.left?(m=-(f.left-e.left+o),n>0&&e.right>f.right+m&&(m=e.right-f.right+m+o)):e.right>f.right&&(m=e.right-f.right+o,n<0&&e.left<f.left+m&&(m=-(f.left+m-e.left+o))):m=(r=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:r=="start"==a?e.left-o:e.right-(f.right-f.left)+o)-f.left,m||b)if(d)u.scrollBy(m,b);else{let x=0,C=0;if(b){let k=c.scrollTop;c.scrollTop+=b/g,C=(c.scrollTop-k)*g}if(m){let k=c.scrollLeft;c.scrollLeft+=m/p,x=(c.scrollLeft-k)*p}e={left:e.left-x,top:e.top-C,right:e.right-x,bottom:e.bottom-C},x&&Math.abs(x-m)<1&&(r="nearest"),C&&Math.abs(C-b)<1&&(i="nearest")}if(d)break;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function tue(t){let e=t.ownerDocument;for(let n=t.parentNode;n&&n!=e.body;)if(n.nodeType==1){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class nue{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?ei(n):0),r,Math.min(e.focusOffset,r?ei(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let aa=null;function y4(t){if(t.setActive)return t.setActive();if(aa)return t.focus(aa);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(aa==null?{get preventScroll(){return aa={preventScroll:!0},!0}}:void 0),!aa){aa=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let b4;function _o(t,e,n=e){let r=b4||(b4=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function la(t,e,n){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,t.dispatchEvent(i);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,t.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function rue(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function x4(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function iue(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,ei(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=ei(n))}else{if(n==t)return!0;r=tu(n),n=n.parentNode}}function w4(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}class un{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new un(e.parentNode,tu(e),n)}static after(e,n){return new un(e.parentNode,tu(e)+1,n)}}const l1=[];class mt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let a=mt.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=C4(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=C4(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=ei(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!mt.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,a=-1;for(let l=0,u=r,c=r;l<this.children.length;l++){let h=this.children[l],f=u+h.length;if(u<e&&f>n)return h.domBoundsAround(e,n,u);if(f>=e&&i==-1&&(i=l,o=u),u>n&&h.dom.parentNode==this.dom){s=l,a=c;break}c=f,u=f+h.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=l1){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&o.destroy()}this.children.splice(e,n-e,...r);for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new S4(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){this.parent=null}}mt.prototype.breakAfter=0;function C4(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class S4{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function k4(t,e,n,r,i,o,s,a,l){let{children:u}=t,c=u.length?u[e]:null,h=o.length?o[o.length-1]:null,f=h?h.breakAfter:s;if(!(e==r&&c&&!s&&!f&&o.length<2&&c.merge(n,i,o.length?h:null,n==0,a,l))){if(r<u.length){let d=u[r];d&&(i<d.length||d.breakAfter&&(h!=null&&h.breakAfter))?(e==r&&(d=d.split(i),i=0),!f&&h&&d.merge(0,i,h,!0,0,l)?o[o.length-1]=d:((i||d.children.length&&!d.children[0].length)&&d.merge(0,i,null,!1,0,l),o.push(d))):d!=null&&d.breakAfter&&(h?h.breakAfter=1:s=1),r++}for(c&&(c.breakAfter=s,n>0&&(!s&&o.length&&c.merge(n,c.length,o[0],!1,a,0)?c.breakAfter=o.shift().breakAfter:(n<c.length||c.children.length&&c.children[c.children.length-1].length==0)&&c.merge(n,c.length,null,!1,a,0),e++));e<r&&o.length;)if(u[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else if(u[e].become(o[0]))e++,o.shift(),a=o.length?0:l;else break;!o.length&&e&&r<u.length&&!u[e-1].breakAfter&&u[r].merge(0,0,u[e-1],!1,a,l)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function T4(t,e,n,r,i,o){let s=t.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:u,off:c}=s.findPos(e,-1),h=e-n;for(let f of r)h+=f.length;t.length+=h,k4(t,u,c,a,l,r,0,i,o)}let Bn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},u1=typeof document<"u"?document:{documentElement:{style:{}}};const c1=/Edge\/(\d+)/.exec(Bn.userAgent),E4=/MSIE \d/.test(Bn.userAgent),h1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bn.userAgent),kf=!!(E4||h1||c1),O4=!kf&&/gecko\/(\d+)/i.test(Bn.userAgent),f1=!kf&&/Chrome\/(\d+)/.exec(Bn.userAgent),M4="webkitFontSmoothing"in u1.documentElement.style,A4=!kf&&/Apple Computer/.test(Bn.vendor),P4=A4&&(/Mobile\/\w+/.test(Bn.userAgent)||Bn.maxTouchPoints>2);var pe={mac:P4||/Mac/.test(Bn.platform),windows:/Win/.test(Bn.platform),linux:/Linux|X11/.test(Bn.platform),ie:kf,ie_version:E4?u1.documentMode||6:h1?+h1[1]:c1?+c1[1]:0,gecko:O4,gecko_version:O4?+(/Firefox\/(\d+)/.exec(Bn.userAgent)||[0,0])[1]:0,chrome:!!f1,chrome_version:f1?+f1[1]:0,ios:P4,android:/Android\b/.test(Bn.userAgent),webkit:M4,safari:A4,webkit_version:M4?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:u1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const oue=256;class ti extends mt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof ti)||this.length-(n-e)+r.length>oue||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new ti(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new un(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return sue(this.dom,e,n)}}class ni extends mt{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(x4(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,s){return r&&(!(r instanceof ni&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(T4(this,e,n,r?r.children:[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let a of this.children){let l=r+a.length;l>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=o),r=l,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ni(this.mark,n,s)}domAtPos(e){return D4(this,e)}coordsAt(e,n){return I4(this,e,n)}}function sue(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?pe.chrome||pe.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=_o(t,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];return pe.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,u=>u.width)||l),s?Sf(l,s<0):l||null}class Li extends mt{static create(e,n,r){return new Li(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Li.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,r,i,o,s){return r&&(!(r instanceof Li)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Li&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ge.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):Ge.empty}domAtPos(e){return(this.length?e==0:this.side>0)?un.before(this.dom):un.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return Sf(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ua extends mt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof ua&&e.side==this.side}split(){return new ua(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?un.before(this.dom):un.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ge.empty}get isHidden(){return!0}}ti.prototype.children=Li.prototype.children=ua.prototype.children=l1;function D4(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new un(n,0)}function _4(t,e,n){let r,{children:i}=t;n>0&&e instanceof ni&&i.length&&(r=i[i.length-1])instanceof ni&&r.mark.eq(e.mark)?_4(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function I4(t,e,n){let r=null,i=-1,o=null,s=-1;function a(u,c){for(let h=0,f=0;h<u.children.length&&f<=c;h++){let d=u.children[h],p=f+d.length;p>=c&&(d.children.length?a(d,c-f):(!o||o.isHidden&&n>0)&&(p>c||f==p&&d.getSide()>0)?(o=d,s=c-f):(f<c||f==p&&d.getSide()<0&&!d.isHidden)&&(r=d,i=c-f)),f=p}}a(t,e);let l=(n<0?r:o)||r||o;return l?l.coordsAt(Math.max(0,l==r?i:s),n):aue(t)}function aue(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=sa(e);return n[n.length-1]||null}function d1(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const $4=Object.create(null);function p1(t,e,n){if(t==e)return!0;t||(t=$4),e||(e=$4);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function g1(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function lue(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class Yt extends mt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof Yt))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),T4(this,e,n,r?r.children:[],o,s),!0}split(e){let n=new Yt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){p1(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){_4(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=d1(n,this.attrs||{})),r&&(this.attrs=d1({class:r},this.attrs||{}))}domAtPos(e){return D4(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(x4(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(g1(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&mt.get(i)instanceof ni;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=mt.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!pe.ios||!this.children.some(o=>o instanceof ti))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof ti)||/[^ -~]/.test(r.text))return null;let i=sa(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=I4(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return!1}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof Yt)return o;if(s>n)break}i=s+o.breakAfter}return null}}class Ri extends mt{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof Ri)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?un.before(this.dom):un.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new Ri(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return l1}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ge.empty}domBoundsAround(){return null}become(e){return e instanceof Ri&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){return this.widget.coordsAt(this.dom,e,n)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class ri{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}destroy(e){}}var pn=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(pn||(pn={}));class ke extends Do{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new nu(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Bi(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=F4(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new Bi(e,r,i,n,e.widget||null,!0)}static line(e){return new ru(e)}static set(e,n=!1){return rt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}ke.none=rt.empty;class nu extends ke{constructor(e){let{start:n,end:r}=F4(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof nu&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&p1(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}nu.prototype.point=!1;class ru extends ke{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ru&&this.spec.class==e.spec.class&&p1(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}ru.prototype.mapMode=dn.TrackBefore,ru.prototype.point=!0;class Bi extends ke{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?dn.TrackBefore:dn.TrackAfter:dn.TrackDel}get type(){return this.startSide!=this.endSide?pn.WidgetRange:this.startSide<=0?pn.WidgetBefore:pn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Bi&&uue(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Bi.prototype.point=!0;function F4(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function uue(t,e){return t==e||!!(t&&e&&t.compare(e))}function m1(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class iu{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Ri&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Yt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Tf(new ua(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Ri)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(Tf(new ti(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Bi){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof Bi)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ri(r.widget||new L4("div"),a,r));else{let l=Li.create(r.widget||new L4("span"),a,a?0:r.startSide),u=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e<n||r.startSide>0),c=!l.isEditable&&(e<n||o>i.length||r.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(h.append(Tf(new ua(1),i),o),o=i.length+Math.max(0,o-i.length)),h.append(Tf(l,i),o),this.atCursorPos=c,this.pendingBuffer=c?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let s=new iu(e,n,r,o);return s.openEnd=rt.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function Tf(t,e){for(let n of e)t=new ni(n,[t],t.length);return t}class L4 extends ri{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const R4=he.define(),B4=he.define(),N4=he.define(),j4=he.define(),v1=he.define(),V4=he.define(),z4=he.define(),W4=he.define({combine:t=>t.some(e=>e)}),H4=he.define({combine:t=>t.some(e=>e)});class ca{constructor(e,n="nearest",r="nearest",i=5,o=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new ca(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ca(L.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Ef=De.define({map:(t,e)=>t.map(e)});function Zn(t,e,n){let r=t.facet(j4);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Of=he.define({combine:t=>t.length?t[0]:!0});let cue=0;const ou=he.define();class Bt{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:s}=n||{};return new Bt(cue++,e,r,i,a=>{let l=[ou.of(a)];return s&&l.push(su.of(u=>{let c=u.plugin(a);return c?s(c):ke.none})),o&&l.push(o(a)),l})}static fromClass(e,n){return Bt.define(r=>new e(r),n)}}class y1{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Zn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Zn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Zn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const q4=he.define(),b1=he.define(),su=he.define(),x1=he.define(),U4=he.define();function Y4(t,e,n){let r=t.state.facet(U4);if(!r.length)return r;let i=r.map(s=>s instanceof Function?s(t):s),o=[];return rt.spans(i,e,n,{point(){},span(s,a,l,u){let c=o;for(let h=l.length-1;h>=0;h--,u--){let f=l[h].spec.bidiIsolate,d;if(f!=null)if(u>0&&c.length&&(d=c[c.length-1]).to==s&&d.direction==f)d.to=a,c=d.inner;else{let p={from:s,to:a,direction:f,inner:[]};c.push(p),c=p.inner}}}}),o}const G4=he.define();function K4(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(G4)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const au=he.define();class Qn{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Qn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,a=0;;i++){let l=i==e.length?null:e[i],u=s-a,c=l?l.fromB:1e9;for(;o<n.length&&n[o]<c;){let h=n[o],f=n[o+1],d=Math.max(a,h),p=Math.min(c,f);if(d<=p&&new Qn(d+u,p+u,d,p).addToSet(r),f>c)break;o+=2}if(!l)return r;new Qn(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),s=l.toA,a=l.toB}}}class Mf{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=qt.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,l)=>i.push(new Qn(o,s,a,l))),this.changedRanges=i}static create(e,n,r){return new Mf(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var kt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(kt||(kt={}));const lu=kt.LTR,X4=kt.RTL;function Z4(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const hue=Z4("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),fue=Z4("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),w1=Object.create(null),Ar=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);w1[e]=n,w1[n]=-e}function due(t){return t<=247?hue[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?fue[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8203?256:64336<=t&&t<=65023?4:t==8204?256:1}const pue=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ni{get dir(){return this.level%2?X4:lu}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==r)return s;(o<0||(i!=0?i<0?a.from<n:a.to>n:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function Q4(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!Q4(r.inner,i.inner))return!1}return!0}const at=[];function gue(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:n,l=o?256:i;for(let u=s,c=l,h=l;u<a;u++){let f=due(t.charCodeAt(u));f==512?f=c:f==8&&h==4&&(f=16),at[u]=f==4?2:f,f&7&&(h=f),c=f}for(let u=s,c=l,h=l;u<a;u++){let f=at[u];if(f==128)u<a-1&&c==at[u+1]&&c&24?f=at[u]=c:at[u]=256;else if(f==64){let d=u+1;for(;d<a&&at[d]==64;)d++;let p=u&&c==8||d<n&&at[d]==8?h==1?1:8:256;for(let g=u;g<d;g++)at[g]=p;u=d-1}else f==8&&h==1&&(at[u]=1);c=f,f&7&&(h=f)}}}function mue(t,e,n,r,i){let o=i==1?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let u=s?r[s-1].to:e,c=s<r.length?r[s].from:n;for(let h=u,f,d,p;h<c;h++)if(d=w1[f=t.charCodeAt(h)])if(d<0){for(let g=a-3;g>=0;g-=3)if(Ar[g+1]==-d){let m=Ar[g+2],b=m&2?i:m&4?m&1?o:i:0;b&&(at[h]=at[Ar[g]]=b),a=g;break}}else{if(Ar.length==189)break;Ar[a++]=h,Ar[a++]=f,Ar[a++]=l}else if((p=at[h])==2||p==1){let g=p==i;l=g?0:1;for(let m=a-3;m>=0;m-=3){let b=Ar[m+2];if(b&2)break;if(g)Ar[m+2]|=2;else{if(b&4)break;Ar[m+2]|=4}}}}}function vue(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=s;l<a;){let u=at[l];if(u==256){let c=l+1;for(;;)if(c==a){if(i==n.length)break;c=n[i++].to,a=i<n.length?n[i].from:e}else if(at[c]==256)c++;else break;let h=o==1,f=(c<e?at[c]:r)==1,d=h==f?h?1:2:r;for(let p=c,g=i,m=g?n[g-1].to:t;p>l;)p==m&&(p=n[--g].from,m=g?n[g-1].to:t),at[--p]=d;l=c}else o=u,l++}}}function C1(t,e,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let l=e,u=0;l<n;){let c=!0,h=!1;if(u==o.length||l<o[u].from){let g=at[l];g!=a&&(c=!1,h=g==16)}let f=!c&&a==1?[]:null,d=c?r:r+1,p=l;e:for(;;)if(u<o.length&&p==o[u].from){if(h)break e;let g=o[u];if(!c)for(let m=g.to,b=u+1;;){if(m==n)break e;if(b<o.length&&o[b].from==m)m=o[b++].to;else{if(at[m]==a)break e;break}}if(u++,f)f.push(g);else{g.from>l&&s.push(new Ni(l,g.from,d));let m=g.direction==lu!=!(d%2);S1(t,m?r+1:r,i,g.inner,g.from,g.to,s),l=g.to}p=g.to}else{if(p==n||(c?at[p]!=a:at[p]==a))break;p++}f?C1(t,l,p,r+1,i,f,s):l<p&&s.push(new Ni(l,p,d)),l=p}else for(let l=n,u=o.length;l>e;){let c=!0,h=!1;if(!u||l>o[u-1].to){let g=at[l-1];g!=a&&(c=!1,h=g==16)}let f=!c&&a==1?[]:null,d=c?r:r+1,p=l;e:for(;;)if(u&&p==o[u-1].to){if(h)break e;let g=o[--u];if(!c)for(let m=g.from,b=u;;){if(m==e)break e;if(b&&o[b-1].to==m)m=o[--b].from;else{if(at[m-1]==a)break e;break}}if(f)f.push(g);else{g.to<l&&s.push(new Ni(g.to,l,d));let m=g.direction==lu!=!(d%2);S1(t,m?r+1:r,i,g.inner,g.from,g.to,s),l=g.from}p=g.from}else{if(p==e||(c?at[p-1]!=a:at[p-1]==a))break;p--}f?C1(t,p,l,r+1,i,f,s):p<l&&s.push(new Ni(p,l,d)),l=p}}function S1(t,e,n,r,i,o,s){let a=e%2?2:1;gue(t,i,o,r,a),mue(t,i,o,r,a),vue(i,o,r,a),C1(t,i,o,e,n,r,s)}function yue(t,e,n){if(!t)return[new Ni(0,0,e==X4?1:0)];if(e==lu&&!n.length&&!pue.test(t))return J4(t.length);if(n.length)for(;t.length>at.length;)at[at.length]=256;let r=[],i=e==lu?0:1;return S1(t,i,i,n,0,t.length,r),r}function J4(t){return[new Ni(0,t,0)]}let eT="";function bue(t,e,n,r,i){var o;let s=r.head-t.from,a=-1;if(s==0){if(!i||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),a=0)}else if(s==t.length){if(i)return null;let f=e[e.length-1];f.level!=n&&(s=f.side(!0,n),a=e.length-1)}a<0&&(a=Ni.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc));let l=e[a];s==l.side(i,n)&&(l=e[a+=i?1:-1],s=l.side(!i,n));let u=i==(l.dir==n),c=an(t.text,s,u);if(eT=t.text.slice(Math.min(s,c),Math.max(s,c)),c!=l.side(i,n))return L.cursor(c+t.from,u?-1:1,l.level);let h=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return!h&&l.level!=n?L.cursor(i?t.to:t.from,i?-1:1,n):h&&h.level<l.level?L.cursor(h.side(!i,n)+t.from,i?1:-1,h.level):L.cursor(c+t.from,i?-1:1,l.level)}class tT extends mt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Yt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Qn(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:c})=>c<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let i=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!Eue(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?wue(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;r=new Qn(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(pe.ie||pe.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=kue(s,a,e.changes);return r=Qn.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=pe.chrome||pe.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof Ri&&s.widget instanceof nT&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:l,toA:u,fromB:c,toB:h}=a,f,d,p,g;if(r&&r.range.fromB<h&&r.range.toB>c){let k=iu.build(this.view.state.doc,c,r.range.fromB,this.decorations,this.dynamicDecorationMap),w=iu.build(this.view.state.doc,r.range.toB,h,this.decorations,this.dynamicDecorationMap);d=k.breakAtStart,p=k.openStart,g=w.openEnd;let T=this.compositionView(r);w.breakAtStart?T.breakAfter=1:w.content.length&&T.merge(T.length,T.length,w.content[0],!1,w.openStart,0)&&(T.breakAfter=w.content[0].breakAfter,w.content.shift()),k.content.length&&T.merge(0,0,k.content[k.content.length-1],!0,0,k.openEnd)&&k.content.pop(),f=k.content.concat(T).concat(w.content)}else({content:f,breakAtStart:d,openStart:p,openEnd:g}=iu.build(this.view.state.doc,c,h,this.decorations,this.dynamicDecorationMap));let{i:m,off:b}=o.findPos(u,1),{i:x,off:C}=o.findPos(l,-1);k4(this,x,C,m,b,f,d,p,g)}r&&this.fixCompositionDOM(r)}compositionView(e){let n=new ti(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new ni(i,[n],n.length);let r=new Yt;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=mt.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&wf(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),u=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(pe.gecko&&a.empty&&!this.hasComposition&&xue(l)){let h=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(h,l.node.childNodes[l.offset]||null)),l=u=new un(h,0),s=!0}let c=this.view.observer.selectionRange;(s||!c.focusNode||!Cf(l.node,l.offset,c.anchorNode,c.anchorOffset)||!Cf(u.node,u.offset,c.focusNode,c.focusOffset))&&(this.view.observer.ignore(()=>{pe.android&&pe.chrome&&this.dom.contains(c.focusNode)&&Tue(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=xf(this.view.root);if(h)if(a.empty){if(pe.gecko){let f=Cue(l.node,l.offset);if(f&&f!=3){let d=iT(l.node,l.offset,f==1?1:-1);d&&(l=new un(d.node,d.offset))}}h.collapse(l.node,l.offset),a.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=a.bidiLevel)}else if(h.extend){h.collapse(l.node,l.offset);try{h.extend(u.node,u.offset)}catch{}}else{let f=document.createRange();a.anchor>a.head&&([l,u]=[u,l]),f.setEnd(u.node,u.offset),f.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new un(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new un(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=xf(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=Yt.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=mt.get(n.childNodes[i]);o instanceof Yt&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=mt.get(n.childNodes[i]);o instanceof Yt&&(r=o.domAtPos(o.length))}return r?new un(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=mt.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof Yt)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],l=o-a.breakAfter,u=l-a.length;if(l<e)break;u<=e&&(u<e||a.covers(-1))&&(l>e||a.covers(1))&&(!r||a instanceof Yt&&!(r instanceof Yt&&n>=0))&&(r=a,i=u),o=u}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof Yt))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=l}if(!(i instanceof ti))return null;let o=an(i.text,r);if(o==r)return null;let s=_o(i.dom,r,o).getClientRects();for(let a=0;a<s.length;a++){let l=s[a];if(a==s.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==kt.LTR;for(let u=0,c=0;c<this.children.length;c++){let h=this.children[c],f=u+h.length;if(f>i)break;if(u>=r){let d=h.dom.getBoundingClientRect();if(n.push(d.height),s){let p=h.dom.lastChild,g=p?sa(p):[];if(g.length){let m=g[g.length-1],b=l?m.right-d.left:d.right-m.left;b>a&&(a=b,this.minWidth=o,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+h.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?kt.RTL:kt.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Yt){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=sa(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new S4(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(ke.replace({widget:new nT(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return ke.set(e)}updateDeco(){let e=this.view.state.facet(su).map((n,r)=>(this.dynamicDecorationMap[r]=typeof n=="function")?n(this.view):n);for(let n=e.length;n<e.length+3;n++)this.dynamicDecorationMap[n]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let u=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=u.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=K4(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;eue(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==kt.LTR)}}function xue(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}class nT extends ri{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function rT(t,e){let n=t.observer.selectionRange,r=n.focusNode&&iT(n.focusNode,n.focusOffset,0);if(!r)return null;let i=e-r.offset;return{from:i,to:i+r.node.nodeValue.length,node:r.node}}function wue(t,e,n){let r=rT(t,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,u=new Qn(l.mapPos(o),l.mapPos(s),o,s),c=[];for(let h=i.parentNode;;h=h.parentNode){let f=mt.get(h);if(f instanceof ni)c.push({node:h,deco:f.mark});else{if(f instanceof Yt||h.nodeName=="DIV"&&h.parentNode==t.contentDOM)return{range:u,text:i,marks:c,line:h};if(h!=t.contentDOM)c.push({node:h,deco:new nu({inclusive:!0,attributes:lue(h),tagName:h.tagName.toLowerCase()})});else return null}}}function iT(t,e,n){if(n<=0)for(let r=t,i=e;;){if(r.nodeType==3)return{node:r,offset:i};if(r.nodeType==1&&i>0)r=r.childNodes[i-1],i=ei(r);else break}if(n>=0)for(let r=t,i=e;;){if(r.nodeType==3)return{node:r,offset:i};if(r.nodeType==1&&i<r.childNodes.length&&n>=0)r=r.childNodes[i],i=0;else break}return null}function Cue(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let Sue=class{constructor(){this.changes=[]}compareRange(e,n){m1(e,n,this.changes)}comparePoint(e,n){m1(e,n,this.changes)}};function kue(t,e,n){let r=new Sue;return rt.compare(t,e,n,r),r.changes}function Tue(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function Eue(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function Oue(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return L.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=an(i.text,o,!1):a=an(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let u=an(i.text,s,!1);if(r(i.text.slice(u,s))!=l)break;s=u}for(;a<i.length;){let u=an(i.text,a);if(r(i.text.slice(a,u))!=l)break;a=u}return L.range(s+i.from,a+i.from)}function Mue(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function Aue(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function k1(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function oT(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function sT(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function T1(t,e,n){let r,i,o,s,a=!1,l,u,c,h;for(let p=t.firstChild;p;p=p.nextSibling){let g=sa(p);for(let m=0;m<g.length;m++){let b=g[m];i&&k1(i,b)&&(b=oT(sT(b,i.bottom),i.top));let x=Mue(e,b),C=Aue(n,b);if(x==0&&C==0)return p.nodeType==3?aT(p,e,n):T1(p,e,n);if(!r||s>C||s==C&&o>x){r=p,i=b,o=x,s=C;let k=C?n<b.top?-1:1:x?e<b.left?-1:1:0;a=!k||(k>0?m<g.length-1:m>0)}x==0?n>b.bottom&&(!c||c.bottom<b.bottom)?(l=p,c=b):n<b.top&&(!h||h.top>b.top)&&(u=p,h=b):c&&k1(c,b)?c=sT(c,b.bottom):h&&k1(h,b)&&(h=oT(h,b.top))}}if(c&&c.bottom>=n?(r=l,i=c):h&&h.top<=n&&(r=u,i=h),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return aT(r,f,n);if(a&&r.contentEditable!="false")return T1(r,f,n);let d=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:d}}function aT(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let l=_o(t,a,a+1).getClientRects();for(let u=0;u<l.length;u++){let c=l[u];if(c.top==c.bottom)continue;s||(s=e-c.left);let h=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&h<o){let f=e>=(c.left+c.right)/2,d=f;if((pe.chrome||pe.gecko)&&_o(t,a).getBoundingClientRect().left==c.right&&(d=!f),h<=0)return{node:t,offset:a+(d?1:0)};i=a+(d?1:0),o=h}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function lT(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:h}=e,f=h-a;if(f<0)return 0;if(f>u)return t.state.doc.length;for(let k=t.viewState.heightOracle.textHeight/2,w=!1;l=t.elementAtHeight(f),l.type!=pn.Text;)for(;f=r>0?l.bottom+k:l.top-k,!(f>=0&&f<=u);){if(w)return n?null:0;w=!0,r=-r}h=a+f;let d=l.from;if(d<t.viewport.from)return t.viewport.from==0?0:n?null:uT(t,s,l,c,h);if(d>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:uT(t,s,l,c,h);let p=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:p,m=g.elementFromPoint(c,h);m&&!t.contentDOM.contains(m)&&(m=null),m||(c=Math.max(s.left+1,Math.min(s.right-1,c)),m=g.elementFromPoint(c,h),m&&!t.contentDOM.contains(m)&&(m=null));let b,x=-1;if(m&&((i=t.docView.nearest(m))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let k=p.caretPositionFromPoint(c,h);k&&({offsetNode:b,offset:x}=k)}else if(p.caretRangeFromPoint){let k=p.caretRangeFromPoint(c,h);k&&({startContainer:b,startOffset:x}=k,(!t.contentDOM.contains(b)||pe.safari&&Pue(b,x,c)||pe.chrome&&Due(b,x,c))&&(b=void 0))}}if(!b||!t.docView.dom.contains(b)){let k=Yt.find(t.docView,d);if(!k)return f>l.top+l.height/2?l.to:l.from;({node:b,offset:x}=T1(k.dom,c,h))}let C=t.docView.nearest(b);if(!C)return null;if(C.isWidget&&((o=C.dom)===null||o===void 0?void 0:o.nodeType)==1){let k=C.dom.getBoundingClientRect();return e.y<k.top||e.y<=k.bottom&&e.x<=(k.left+k.right)/2?C.posAtStart:C.posAtEnd}else return C.localPosFromDOM(b,x)+C.posAtStart}function uT(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);o+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+r1(s,o,t.state.tabSize)}function Pue(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return _o(t,r-1,r).getBoundingClientRect().left>n}function Due(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():_o(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function E1(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==pn.Text))return r}return n}function _ue(t,e,n,r){let i=E1(t,e.head),o=!r||i.type!=pn.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(a==kt.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(l!=null)return L.cursor(l,n?-1:1)}return L.cursor(n?i.to:i.from,n?-1:1)}function cT(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,l=null;;){let u=bue(i,o,s,a,n),c=eT;if(!u){if(i.number==(n?t.state.doc.lines:1))return a;c=`
263
+ `,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),u=L.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!r)return u;l=r(c)}a=u}}function Iue(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==wt.Space&&(i=s),i==s}}function $ue(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return L.cursor(i,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(u)s==null&&(s=u.left-l.left),a=o<0?u.top:u.bottom;else{let d=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-d.from))),a=(o<0?d.top:d.bottom)+c}let h=l.left+s,f=r??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=a+(f+d)*o,g=lT(t,{x:h,y:p},!1,o);if(p<l.top||p>l.bottom||(o<0?g<i:g>i)){let m=t.docView.coordsForChar(g),b=!m||p<m.top?-1:1;return L.cursor(g,b,void 0,s)}}}function Af(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let l=r||n||(e-o<s-e?-1:1);e=l<0?o:s,r=l}});if(!r)return e}}function O1(t,e,n){let r=Af(t.state.facet(x1).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:L.cursor(r,r<n.from?1:-1)}class Fue{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,pe.safari&&e.contentDOM.addEventListener("input",()=>null),pe.gecko&&Zue(e.contentDOM.ownerDocument)}handleEvent(e){!Wue(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=Lue(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=r[o];a&&s!=!a.handlers.length&&(i.removeEventListener(o,this.handleEvent),a=null),a||i.addEventListener(o,this.handleEvent,{passive:s})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&dT.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),pe.android&&pe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return pe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=fT.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||Rue.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,la(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:pe.safari&&!pe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function hT(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Zn(n.state,i)}}}function Lue(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let s=i.domEventHandlers[o];s&&n(o).handlers.push(hT(r.value,s))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let s=i.domEventObservers[o];s&&n(o).observers.push(hT(r.value,s))}}for(let r in ur)n(r).handlers.push(ur[r]);for(let r in cr)n(r).observers.push(cr[r]);return e}const fT=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Rue="dthko",dT=[16,17,18,20,91,92,224,225],Pf=6;function Df(t){return Math.max(0,t)*.7+8}function Bue(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class Nue{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=tue(e.contentDOM),this.atoms=e.state.facet(x1).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(je.allowMultipleSelections)&&jue(e,n),this.dragging=zue(e,n)&&ST(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Bue(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,i=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=K4(this.view);e.clientX-s.left<=o.left+Pf?r=-Df(o.left-e.clientX):e.clientX+s.right>=o.right-Pf&&(r=Df(e.clientX-o.right)),e.clientY-s.top<=o.top+Pf?i=-Df(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-Pf&&(i=Df(e.clientY-o.bottom)),this.setScrollSpeed(r,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let s=Af(this.atoms,i.from,0);s!=i.from&&(o=L.cursor(s,-1))}else{let s=Af(this.atoms,i.from,-1),a=Af(this.atoms,i.to,1);(s!=i.from||a!=i.to)&&(o=L.range(i.from==i.anchor?s:a,i.from==i.head?s:a))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?L.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection)||r.main.assoc!=n.state.selection.main.assoc&&this.dragging===!1)&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function jue(t,e){let n=t.state.facet(R4);return n.length?n[0](e):pe.mac?e.metaKey:e.ctrlKey}function Vue(t,e){let n=t.state.facet(B4);return n.length?n[0](e):pe.mac?!e.altKey:!e.ctrlKey}function zue(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=xf(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function Wue(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=mt.get(n))&&r.ignoreEvent(e))return!1;return!0}const ur=Object.create(null),cr=Object.create(null),pT=pe.ie&&pe.ie_version<15||pe.ios&&pe.webkit_version<604;function Hue(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),gT(t,n.value)},50)}function gT(t,e){let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(M1!=null&&n.selection.ranges.every(l=>l.empty)&&M1==o.toString()){let l=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let h=n.toText((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:h},range:L.cursor(u.from+h.length)}})}else s?r=n.changeByRange(l=>{let u=o.line(i++);return{changes:{from:l.from,to:l.to,insert:u.text},range:L.cursor(l.from+u.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}cr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},ur.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1),cr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},cr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},ur.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(N4))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=Yue(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new Nue(t,e,n,r)),r&&t.observer.ignore(()=>y4(t.contentDOM));let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function mT(t,e,n,r){if(r==1)return L.cursor(e,n);if(r==2)return Oue(t.state,e,n);{let i=Yt.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<t.state.doc.length&&a==o.to&&a++,L.range(s,a)}}let vT=(t,e)=>t>=e.top&&t<=e.bottom,yT=(t,e,n)=>vT(e,n)&&t>=n.left&&t<=n.right;function que(t,e,n,r){let i=Yt.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&yT(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&yT(n,r,a)?1:s&&vT(r,s)?-1:1}function bT(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:que(t,n,e.clientX,e.clientY)}}const Uue=pe.ie&&pe.ie_version<=11;let xT=null,wT=0,CT=0;function ST(t){if(!Uue)return t.detail;let e=xT,n=CT;return xT=t,CT=Date.now(),wT=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(wT+1)%3:1}function Yue(t,e){let n=bT(t,e),r=ST(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,a){let l=bT(t,o),u,c=mT(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!s){let h=mT(t,n.pos,n.bias,r),f=Math.min(h.from,c.from),d=Math.max(h.to,c.to);c=f<c.from?L.range(f,d):L.range(d,f)}return s?i.replaceRange(i.main.extend(c.from,c.to)):a&&r==1&&i.ranges.length>1&&(u=Gue(i,l.pos))?u:a?i.addRange(c):L.create([c])}}}function Gue(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return L.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}ur.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,s=o+i.length;(o>=n.to||s<=n.from)&&(n=L.range(o,s))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1},ur.dragend=t=>(t.inputState.draggedContent=null,!1);function kT(t,e,n,r){if(!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=r&&o&&Vue(t,e)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}ur.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&kT(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return kT(t,e,r,!0),!0}return!1},ur.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=pT?null:e.clipboardData;return n?(gT(t,n.getData("text/plain")||n.getData("text/uri-text")),!0):(Hue(t),!1)};function Kue(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function Xue(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:r}}let M1=null;ur.copy=ur.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=Xue(t.state);if(!n&&!i)return!1;M1=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=pT?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(Kue(t,n),!1)};const TT=Or.define();function ET(t,e){let n=[];for(let r of t.facet(z4)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:TT.of(!0)}):null}function OT(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=ET(t.state,e);n?t.dispatch(n):t.update([])}},10)}cr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),OT(t)},cr.blur=t=>{t.observer.clearSelectionRange(),OT(t)},cr.compositionstart=cr.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},cr.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,pe.chrome&&pe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)},cr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},ur.beforeinput=(t,e)=>{var n;let r;if(pe.chrome&&pe.android&&(r=fT.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let i=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return!1};const MT=new Set;function Zue(t){MT.has(t)||(MT.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const AT=["pre-wrap","normal","pre-line","break-spaces"];class Que{constructor(e){this.lineWrapping=e,this.doc=Ge.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return AT.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,s){let a=AT.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let u=0;u<s.length;u++){let c=s[u];c<0?u++:this.heightSamples[Math.floor(c*10)]=!0}}return l}}class Jue{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Pr{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?pn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Bi?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Pr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var vt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(vt||(vt={}));const _f=.001;class gn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>_f&&(e.heightChanged=!0),this.height=n)}replace(e,n,r){return gn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:c,toB:h}=i[a],f=o.lineAt(l,vt.ByPosNoHeight,r.setDoc(n),0,0),d=f.to>=u?f:o.lineAt(u,vt.ByPosNoHeight,r,0,0);for(h+=d.to-u,u=d.to;a>0&&f.from<=i[a-1].toA;)l=i[a-1].fromA,c=i[a-1].fromB,a--,l<f.from&&(f=o.lineAt(l,vt.ByPosNoHeight,r,0,0));c+=f.from-l,l=f.from;let p=A1.build(r.setDoc(s),e,c,h);o=o.replace(l,u,p)}return o.updateHeight(r,0)}static empty(){return new Nn(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(o>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,o-=a.size}else break;else if(i<o){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(o+=a.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new ece(gn.of(e.slice(0,n)),s,gn.of(e.slice(r)))}}gn.prototype.size=1;class PT extends gn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new Pr(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(e,i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Nn extends PT{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new Pr(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Nn||i instanceof nn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof nn?i=new Nn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):gn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(e,i.heights[i.index++]):(r||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class nn extends gn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,s,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);s=l/o,this.length>o+1&&(a=(this.height-l)/(this.length-o-1))}else s=this.height/o;return{firstLine:r,lastLine:i,perLine:s,perChar:a}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let u=i+Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length),c=n.doc.lineAt(u),h=a+c.length*l,f=Math.max(r,e-h/2);return new Pr(c.from,c.length,f,h,0)}else{let u=Math.max(0,Math.min(s-o,Math.floor((e-r)/a))),{from:c,length:h}=n.doc.line(o+u);return new Pr(c,h,r+a*u,a,0)}}lineAt(e,n,r,i,o){if(n==vt.ByHeight)return this.blockAt(e,r,i,o);if(n==vt.ByPosNoHeight){let{from:d,to:p}=r.doc.lineAt(e);return new Pr(d,p-d,0,0,0)}let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(r,o),u=r.doc.lineAt(e),c=a+u.length*l,h=u.number-s,f=i+a*h+l*(u.from-o-h);return new Pr(u.from,u.length,Math.max(i,Math.min(f,i+this.height-c)),c,0)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:a,perLine:l,perChar:u}=this.heightMetrics(r,o);for(let c=e,h=i;c<=n;){let f=r.doc.lineAt(c);if(c==e){let p=f.number-a;h+=l*p+u*(e-o-p)}let d=l+u*f.length;s(new Pr(f.from,f.length,h,d,0)),h+=d,c=f.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof nn?r[r.length-1]=new nn(o.length+i):r.push(null,new nn(i-1))}if(e>0){let o=r[0];o instanceof nn?r[0]=new nn(e+o.length):r.unshift(new nn(e-1),null)}return gn.of(r)}decomposeLeft(e,n){n.push(new nn(e-1),null)}decomposeRight(e,n){n.push(null,new nn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&s.push(new nn(i.from-n-1).updateHeight(e,n));a<=o&&i.more;){let c=e.doc.lineAt(a).length;s.length&&s.push(null);let h=i.heights[i.index++];l==-1?l=h:Math.abs(h-l)>=_f&&(l=-2);let f=new Nn(c,h);f.outdated=!1,s.push(f),a+=c+1}a<=o&&s.push(null,new nn(o-a).updateHeight(e,a));let u=gn.of(s);return(l<0||Math.abs(u.height-this.height)>=_f||Math.abs(l-this.heightMetrics(e,n).perLine)>=_f)&&(e.heightChanged=!0),u}else(r||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class ece extends gn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,a=o+this.left.length+this.break,l=n==vt.ByHeight?e<s:e<a,u=l?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,a);if(this.break||(l?u.to<a:u.from>a))return u;let c=n==vt.ByPosNoHeight?vt.ByPosNoHeight:vt.ByPos;return l?u.join(this.right.lineAt(a,c,r,s,a)):this.left.lineAt(a,c,r,i,o).join(u)}forEachLine(e,n,r,i,o,s){let a=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,o,s),n>=l&&this.right.forEachLine(e,n,r,a,l,s);else{let u=this.lineAt(l,vt.ByPos,r,i,o);e<u.from&&this.left.forEachLine(e,u.from-1,r,i,o,s),u.to>=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,a,l,s)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of r)o.push(a);if(e>0&&DT(o,s-1),n<this.length){let a=o.length;this.decomposeRight(n,o),DT(o,a)}return gn.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?gn.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:s}=this,a=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=a+s.length&&i.more?l=s=s.updateHeight(e,a,r,i):s.updateHeight(e,a,r),l?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function DT(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof nn&&(r=t[e+1])instanceof nn&&t.splice(e-1,3,new nn(n.length+1+r.length))}const tce=5;class A1{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Nn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Nn(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new PT(s,i,r)):(s||o||i>=tce)&&this.addLineDeco(i,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Nn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new nn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Nn)return e;let n=new Nn(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Nn)&&!this.isCovered?this.nodes.push(new Nn(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Nn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new A1(r,e);return rt.spans(n,r,i,o,0),o.finish(r)}}function nce(t,e,n){let r=new rce;return rt.compare(t,e,n,r,0),r.changes}class rce{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&m1(e,n,this.changes,5)}}function ice(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let u=t.parentNode;u&&u!=r.body;)if(u.nodeType==1){let c=u,h=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&h.overflow!="visible"){let f=c.getBoundingClientRect();o=Math.max(o,f.left),s=Math.min(s,f.right),a=Math.max(a,f.top),l=u==t.parentNode?f.bottom:Math.min(l,f.bottom)}u=h.position=="absolute"||h.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function oce(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class P1{constructor(e,n,r){this.from=e,this.to=n,this.size=r}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return ke.replace({widget:new sce(this.size*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class sce extends ri{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class _T{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=IT,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=kt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(b1).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new Que(n),this.stateDeco=e.facet(su).filter(r=>typeof r!="function"),this.heightMap=gn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle.setDoc(e.doc),[new Qn(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ke.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new If(o,s))}}this.viewports=e.sort((r,i)=>r.from-i.from),this.scaler=this.heightMap.height<=7e6?IT:new uce(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:uu(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(su).filter(c=>typeof c!="function");let i=e.changedRanges,o=Qn.extendWithRanges(i,nce(r,this.stateDeco,e?e.changes:qt.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(H4)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?kt.RTL:kt.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=n.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,c=0;if(a.width&&a.height){let k=a.width/n.offsetWidth,w=a.height/n.offsetHeight;(k>.995&&k<1.005||!isFinite(k)||Math.abs(a.width-n.offsetWidth)<1)&&(k=1),(w>.995&&w<1.005||!isFinite(w)||Math.abs(a.height-n.offsetHeight)<1)&&(w=1),(this.scaleX!=k||this.scaleY!=w)&&(this.scaleX=k,this.scaleY=w,u|=8,s=l=!0)}let h=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=w4(e.scrollDOM);let p=(this.printing?oce:ice)(n,this.paddingTop),g=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let x=a.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let k=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(k)&&(s=!0),s||i.lineWrapping&&Math.abs(x-this.contentDOMWidth)>i.charWidth){let{lineHeight:w,charWidth:T,textHeight:S}=e.docView.measureTextSize();s=w>0&&i.refresh(o,w,T,S,x/T,k),s&&(e.docView.minWidth=0,u|=8)}g>0&&m>0?c=Math.max(g,m):g<0&&m<0&&(c=Math.min(g,m)),i.heightChanged=!1;for(let w of this.viewports){let T=w.from==this.viewport.from?k:e.docView.measureVisibleLineHeights(w);this.heightMap=(s?gn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle,[new Qn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new Jue(w.from,T))}i.heightChanged&&(u|=2)}let C=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return C&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||C)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new If(i.lineAt(s-r*1e3,vt.ByHeight,o,0,0).from,i.lineAt(a+(1-r)*1e3,vt.ByHeight,o,0,0).to);if(n){let{head:u}=n.range;if(u<l.from||u>l.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=i.lineAt(u,vt.ByPos,o,0,0),f;n.y=="center"?f=(h.top+h.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u<l.from?f=h.top:f=h.bottom-c,l=new If(i.lineAt(f-1e3/2,vt.ByHeight,o,0,0).from,i.lineAt(f+c+1e3/2,vt.ByHeight,o,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new If(this.heightMap.lineAt(r,vt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,vt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,vt.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,vt.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new P1(n.mapPos(i.from),n.mapPos(i.to),i.size));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=kt.LTR&&!r)return[];let a=[],l=(u,c,h,f)=>{if(c-u<o)return;let d=this.state.selection.main,p=[d.from];d.empty||p.push(d.to);for(let m of p)if(m>u&&m<c){l(u,m-10,h,f),l(m+10,c,h,f);return}let g=lce(e,m=>m.from>=h.from&&m.to<=h.to&&Math.abs(m.from-u)<o&&Math.abs(m.to-c)<o&&!p.some(b=>m.from<b&&m.to>b));if(!g){if(c<h.to&&n&&r&&n.visibleRanges.some(m=>m.from<=c&&m.to>=c)){let m=n.moveToLineBoundary(L.cursor(c),!1,!0).head;m>u&&(c=m)}g=new P1(u,c,this.gapSize(h,u,c,f))}a.push(g)};for(let u of this.viewportLines){if(u.length<s)continue;let c=ace(u.from,u.to,this.stateDeco);if(c.total<s)continue;let h=this.scrollTarget?this.scrollTarget.range.head:null,f,d;if(r){let p=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,m;if(h!=null){let b=Ff(c,h),x=((this.visibleBottom-this.visibleTop)/2+p)/u.height;g=b-x,m=b+x}else g=(this.visibleTop-u.top-p)/u.height,m=(this.visibleBottom-u.top+p)/u.height;f=$f(c,g),d=$f(c,m)}else{let p=c.total*this.heightOracle.charWidth,g=i*this.heightOracle.charWidth,m,b;if(h!=null){let x=Ff(c,h),C=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/p;m=x-C,b=x+C}else m=(this.pixelViewport.left-g)/p,b=(this.pixelViewport.right+g)/p;f=$f(c,m),d=$f(c,b)}f>u.from&&l(u.from,f,u,c),d<u.to&&l(d,u.to,u,c)}return a}gapSize(e,n,r,i){let o=Ff(i,r)-Ff(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){P1.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ke.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];rt.spans(e,this.viewport.from,this.viewport.to,{span(i,o){n.push({from:i,to:o})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=n[o].from||i.to!=n[o].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||uu(this.heightMap.lineAt(e,vt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return uu(this.heightMap.lineAt(this.scaler.fromDOM(e),vt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return uu(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class If{constructor(e,n){this.from=e,this.to=n}}function ace(t,e,n){let r=[],i=t,o=0;return rt.spans(n,t,e,{span(){},point(s,a){s>i&&(r.push({from:i,to:s}),o+=s-i),i=a}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function $f({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:s}=e[i],a=s-o;if(r<=a)return o+r;r-=a}}function Ff(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function lce(t,e){for(let n of t)if(e(n))return n}const IT={toDOM(t){return t},fromDOM(t){return t},scale:1};class uce{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:a,to:l})=>{let u=n.lineAt(a,vt.ByPos,e,0,0).top,c=n.lineAt(l,vt.ByPos,e,0,0).bottom;return i+=c-u,{from:a,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}}function uu(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Pr(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>uu(i,e)):t._content)}const Lf=he.define({combine:t=>t.join(" ")}),D1=he.define({combine:t=>t.indexOf(!0)>-1}),_1=$i.newName(),$T=$i.newName(),FT=$i.newName(),LT={"&light":"."+$T,"&dark":"."+FT};function I1(t,e,n){return new $i(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const cce=I1("."+_1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},LT),cu="￿";class hce{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(je.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=cu}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==n)break;let a=mt.get(i),l=mt.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:RT(i))||RT(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(a=i.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=s-1);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=mt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(fce(e,r.node,r.offset)?n:0))}}function fce(t,e,n){for(;;){if(!e||n<ei(e))return!1;if(e==t)return!0;n=tu(e)+1,e=e.parentNode}}function RT(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class BT{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class dce{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=o||s?[]:mce(e),l=new hce(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=vce(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!a1(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),u=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!a1(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset);this.newSel=L.single(u,l)}}}function NT(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=i.from,u=null;(o===8||pe.android&&e.text.length<a-s)&&(l=i.to,u="end");let c=gce(t.state.doc.sliceString(s,a,cu),e.text,l-s,u);c&&(pe.chrome&&o==13&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==cu+cu&&c.toB--,n={from:s+c.from,to:s+c.toA,insert:Ge.of(e.text.slice(c.from,c.toB).split(cu))})}else r&&(!t.hasFocus&&t.state.facet(Of)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(pe.mac||pe.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=L.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ge.of([" "])}):pe.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
264
+ `&&t.lineWrapping&&(r&&(r=L.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ge.of([" "])}),n){if(pe.ios&&t.inputState.flushIOSKey()||pe.android&&(n.from==i.from&&n.to==i.to&&n.insert.length==1&&n.insert.lines==2&&la(t.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&n.insert.length==0||o==8&&n.insert.length<n.to-n.from&&n.to>i.head)&&la(t.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&n.insert.length==0&&la(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,l=()=>a||(a=pce(t,n,r));return t.state.facet(V4).some(u=>u(t,n.from,n.to,s,l))||t.dispatch(l()),!0}else if(r&&!r.main.eq(i)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:s,userEvent:a}),!0}else return!1}function pce(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=o.from<e.from?i.sliceDoc(o.from,e.from):"",l=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=i.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),c,h=n&&rT(t,n.main.head);if(h){let p=e.insert.length-(e.to-e.from);c={from:h.from,to:h.to-p}}else c=t.state.doc.lineAt(o.head);let f=o.to-e.to,d=o.to-o.from;r=i.changeByRange(p=>{if(p.from==o.from&&p.to==o.to)return{changes:a,range:l||p.map(a)};let g=p.to-f,m=g-u.length;if(p.to-p.from!=d||t.state.sliceDoc(m,g)!=u||p.to>=c.from&&p.from<=c.to)return{range:p};let b=i.changes({from:m,to:g,insert:e.insert}),x=p.to-o.to;return{changes:b,range:l?L.range(Math.max(0,l.anchor+x),Math.max(0,l.head+x)):p.map(b)}})}else r={changes:a,selection:l&&i.selection.replaceRange(l)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function gce(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(r=="end"){let l=Math.max(0,o-Math.min(s,a));n-=s+l-o}if(s<o&&t.length<e.length){let l=n<=o&&n>=s?o-n:0;o-=l,a=o+(a-s),s=o}else if(a<o){let l=n<=o&&n>=a?o-n:0;o-=l,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function mce(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new BT(n,r)),(i!=n||o!=r)&&e.push(new BT(i,o))),e}function vce(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?L.single(n+e,r+e):null}const yce={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},$1=pe.ie&&pe.ie_version<=11;class bce{constructor(e){this.view=e,this.active=!1,this.selectionRange=new nue,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(pe.ie&&pe.ie_version<=11||pe.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),$1&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Of)?r.root.activeElement!=this.dom:!wf(r.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(pe.ie&&pe.ie_version<=11||pe.android&&pe.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Cf(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=pe.safari&&e.root.nodeType==11&&Qle(this.dom.ownerDocument)==this.dom&&xce(this.view)||xf(e.root);if(!n||this.selectionRange.eq(n))return!1;let r=wf(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&iue(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,yce),$1&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),$1&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&la(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&wf(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new dce(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=NT(this.view,n);return this.view.state==r&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=jT(n,e.previousSibling||e.target.previousSibling,-1),i=jT(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function jT(t,e,n){for(;e;){let r=mt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function xce(t){let e=null;function n(l){l.preventDefault(),l.stopImmediatePropagation(),e=l.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let r=e.startContainer,i=e.startOffset,o=e.endContainer,s=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Cf(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}class oe{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(r=>r.forEach(i=>n(i,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||rue(e.parent)||document,this.viewState=new _T(e.state||je.create(e)),e.scrollTo&&e.scrollTo.is(Ef)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ou).map(r=>new y1(r));for(let r of this.plugins)r.update(this);this.observer=new bce(this),this.inputState=new Fue(this),this.inputState.ensureHandlers(this.plugins),this.docView=new tT(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let n=e.length==1&&e[0]instanceof Ut?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,l=null;e.some(f=>f.annotation(TT))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=ET(o,s),l||(a=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(je.phrases)!=this.state.facet(je.phrases))return this.setState(o);i=Mf.create(this,o,e),i.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;h=new ca(d.empty?d:L.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(Ef)&&(h=d.value.clip(this.state))}this.viewState.update(i,h),this.bidiCache=Rf.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(au)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Lf)!=i.state.facet(Lf)&&(this.viewState.mustMeasureContent=!0),(n||r||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty)for(let f of this.state.facet(v1))try{f(i)}catch(d){Zn(this.state,d,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!NT(this,c)&&u.force&&la(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new _T(e),this.plugins=e.facet(ou).map(r=>new y1(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView=new tT(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(ou),r=e.state.facet(ou);if(n!=r){let i=[];for(let o of r){let s=n.indexOf(o);if(s<0)i.push(new y1(o));else{let a=this.plugins[s];a.mustUpdate=e,i.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(w4(r))o=-1,s=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(i);o=d.from,s=d.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(d=>{try{return d.read(this)}catch(p){return Zn(this.state,p),VT}}),h=Mf.create(this,this.state,[]),f=!1;h.flags|=l,n?n.flags|=l:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h));for(let d=0;d<u.length;d++)if(c[d]!=VT)try{let p=u[d];p.write&&p.write(c[d],this)}catch(p){Zn(this.state,p)}if(f&&this.docView.updateSelection(!0),!h.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}else{let p=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(p>1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(v1))a(n)}get themeClasses(){return _1+" "+(this.state.facet(D1)?FT:$T)+" "+this.state.facet(Lf)}updateAttrs(){let e=zT(this,q4,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Of)?"true":"false",class:"cm-content",style:`${pe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),zT(this,b1,n);let r=this.observer.ignore(()=>{let i=g1(this.contentDOM,this.contentAttrs,n),o=g1(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(oe.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(au);let e=this.state.facet(oe.cspNonce);$i.mount(this.root,this.styleModules.concat(cce).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return O1(this,e,cT(this,e,n,r))}moveByGroup(e,n){return O1(this,e,cT(this,e,n,r=>Iue(this,e.head,r)))}moveToLineBoundary(e,n,r=!0){return _ue(this,e,n,r)}moveVertically(e,n,r){return O1(this,e,$ue(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),lT(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),s=o[Ni.find(o,e-i.from,-1,n)];return Sf(r,s.dir==kt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(W4)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>wce)return J4(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||Q4(o.isolates,r=Y4(this,e.from,e.to))))return o.order;r||(r=Y4(this,e.from,e.to));let i=yue(e.text,n,r);return this.bidiCache.push(new Rf(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||pe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{y4(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Ef.of(new ca(typeof e=="number"?L.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Ef.of(new ca(L.cursor(r.from),"start","start",r.top-e,n,!0))}static domEventHandlers(e){return Bt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Bt.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=$i.newName(),i=[Lf.of(r),au.of(I1(`.${r}`,e))];return n&&n.dark&&i.push(D1.of(!0)),i}static baseTheme(e){return ra.lowest(au.of(I1("."+_1,e,LT)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&mt.get(r)||mt.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}oe.styleModule=au,oe.inputHandler=V4,oe.focusChangeEffect=z4,oe.perLineTextDirection=W4,oe.exceptionSink=j4,oe.updateListener=v1,oe.editable=Of,oe.mouseSelectionStyle=N4,oe.dragMovesSelection=B4,oe.clickAddsSelectionRange=R4,oe.decorations=su,oe.atomicRanges=x1,oe.bidiIsolatedRanges=U4,oe.scrollMargins=G4,oe.darkTheme=D1,oe.cspNonce=he.define({combine:t=>t.length?t[0]:""}),oe.contentAttributes=b1,oe.editorAttributes=q4,oe.lineWrapping=oe.contentAttributes.of({class:"cm-lineWrapping"}),oe.announce=De.define();const wce=4096,VT={};class Rf{constructor(e,n,r,i,o,s){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:kt.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new Rf(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}}function zT(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],s=typeof o=="function"?o(t):o;s&&d1(s,n)}return n}const Cce=pe.mac?"mac":pe.windows?"win":pe.linux?"linux":"key";function Sce(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,s,a;for(let l=0;l<n.length-1;++l){const u=n[l];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))s=!0;else if(/^mod$/i.test(u))e=="mac"?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),a&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function Bf(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const kce=ra.default(oe.domEventHandlers({keydown(t,e){return qT(HT(e.state),t,e,"editor")}})),Nf=he.define({enables:kce}),WT=new WeakMap;function HT(t){let e=t.facet(Nf),n=WT.get(e);return n||WT.set(e,n=Oce(e.reduce((r,i)=>r.concat(i),[]))),n}function Tce(t,e,n){return qT(HT(t.state),e,t,n)}let ji=null;const Ece=4e3;function Oce(t,e=Cce){let n=Object.create(null),r=Object.create(null),i=(s,a)=>{let l=r[s];if(l==null)r[s]=a;else if(l!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,l,u,c)=>{var h,f;let d=n[s]||(n[s]=Object.create(null)),p=a.split(/ (?!$)/).map(b=>Sce(b,e));for(let b=1;b<p.length;b++){let x=p.slice(0,b).join(" ");i(x,!0),d[x]||(d[x]={preventDefault:!0,stopPropagation:!1,run:[C=>{let k=ji={view:C,prefix:x,scope:s};return setTimeout(()=>{ji==k&&(ji=null)},Ece),!0}]})}let g=p.join(" ");i(g,!1);let m=d[g]||(d[g]={preventDefault:!1,stopPropagation:!1,run:((f=(h=d._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});l&&m.run.push(l),u&&(m.preventDefault=!0),c&&(m.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let u of a){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let h in c)c[h].run.push(s.any)}let l=s[e]||s.key;if(l)for(let u of a)o(u,l,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(u,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return n}function qT(t,e,n,r){let i=Zle(e),o=Jt(i,0),s=Xn(o)==i.length&&i!=" ",a="",l=!1,u=!1,c=!1;ji&&ji.view==n&&ji.scope==r&&(a=ji.prefix+" ",dT.indexOf(e.keyCode)<0&&(u=!0,ji=null));let h=new Set,f=m=>{if(m){for(let b of m.run)if(!h.has(b)&&(h.add(b),b(n,e)))return m.stopPropagation&&(c=!0),!0;m.preventDefault&&(m.stopPropagation&&(c=!0),u=!0)}return!1},d=t[r],p,g;return d&&(f(d[a+Bf(i,e,!s)])?l=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(pe.windows&&e.ctrlKey&&e.altKey)&&(p=Fi[e.keyCode])&&p!=i?(f(d[a+Bf(p,e,!0)])||e.shiftKey&&(g=eu[e.keyCode])!=i&&g!=p&&f(d[a+Bf(g,e,!1)]))&&(l=!0):s&&e.shiftKey&&f(d[a+Bf(i,e,!0)])&&(l=!0),!l&&f(d._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),l}class hu{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=UT(e);return[new hu(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return Mce(e,n,r)}}function UT(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==kt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function YT(t,e,n){let r=L.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(r,!0,!0).from),type:pn.Text}}function Mce(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==kt.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=UT(t),u=s.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),h=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=a.right-(c?parseInt(c.paddingRight):0),d=E1(t,r),p=E1(t,i),g=d.type==pn.Text?d:null,m=p.type==pn.Text?p:null;if(g&&(t.lineWrapping||d.widgetLineBreaks)&&(g=YT(t,r,g)),m&&(t.lineWrapping||p.widgetLineBreaks)&&(m=YT(t,i,m)),g&&m&&g.from==m.from)return x(C(n.from,n.to,g));{let w=g?C(n.from,null,g):k(d,!1),T=m?C(null,n.to,m):k(p,!0),S=[];return(g||d).to<(m||p).from-(g&&m?1:0)||d.widgetLineBreaks>1&&w.bottom+t.defaultLineHeight/2<T.top?S.push(b(h,w.bottom,f,T.top)):w.bottom<T.top&&t.elementAtHeight((w.bottom+T.top)/2).type==pn.Text&&(w.bottom=T.top=(w.bottom+T.top)/2),x(w).concat(S).concat(x(T))}function b(w,T,S,M){return new hu(e,w-l.left,T-l.top-.01,S-w,M-T+.01)}function x({top:w,bottom:T,horizontal:S}){let M=[];for(let P=0;P<S.length;P+=2)M.push(b(S[P],w,S[P+1],T));return M}function C(w,T,S){let M=1e9,P=-1e9,D=[];function R(B,j,N,V,me){let re=t.coordsAtPos(B,B==S.to?-2:2),_=t.coordsAtPos(N,N==S.from?2:-2);!re||!_||(M=Math.min(re.top,_.top,M),P=Math.max(re.bottom,_.bottom,P),me==kt.LTR?D.push(o&&j?h:re.left,o&&V?f:_.right):D.push(!o&&V?h:_.left,!o&&j?f:re.right))}let H=w??S.from,W=T??S.to;for(let B of t.visibleRanges)if(B.to>H&&B.from<W)for(let j=Math.max(B.from,H),N=Math.min(B.to,W);;){let V=t.state.doc.lineAt(j);for(let me of t.bidiSpans(V)){let re=me.from+V.from,_=me.to+V.from;if(re>=N)break;_>j&&R(Math.max(re,j),w==null&&re<=H,Math.min(_,N),T==null&&_>=W,me.dir)}if(j=V.to+1,j>=N)break}return D.length==0&&R(H,w==null,W,T==null,t.textDirection),{top:M,bottom:P,horizontal:D}}function k(w,T){let S=a.top+(T?w.top:w.bottom);return{top:S,bottom:S,horizontal:[]}}}function Ace(t,e){return t.constructor==e.constructor&&t.eq(e)}class Pce{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(jf)!=e.state.facet(jf)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let n=0,r=e.facet(jf);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!Ace(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const jf=he.define();function GT(t){return[Bt.define(e=>new Pce(e,t)),jf.of(t)]}const KT=!pe.ios,fu=he.define({combine(t){return Mr(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Dce(t={}){return[fu.of(t),_ce,Ice,$ce,H4.of(!0)]}function XT(t){return t.startState.facet(fu)!=t.state.facet(fu)}const _ce=GT({above:!0,markers(t){let{state:e}=t,n=e.facet(fu),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||KT:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:L.cursor(i.head,i.head>i.anchor?-1:1);for(let l of hu.forRange(t,s,a))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=XT(t);return n&&ZT(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){ZT(e.state,t)},class:"cm-cursorLayer"});function ZT(t,e){e.style.animationDuration=t.facet(fu).cursorBlinkRate+"ms"}const Ice=GT({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:hu.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||XT(t)},class:"cm-selectionLayer"}),QT={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};KT&&(QT[".cm-line"].caretColor="transparent !important");const $ce=ra.highest(oe.theme(QT)),JT=De.define({map(t,e){return t==null?null:e.mapPos(t)}}),du=en.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(JT)?r.value:n,t)}}),Fce=Bt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(du);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(du)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(du),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(du)!=t&&this.view.dispatch({effects:JT.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Lce(){return[du,Fce]}function eE(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)i(s+a.index,a)}function Rce(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class Bce{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(a,l,u,c)=>i(c,u,u+a[0].length,a,l);else if(typeof r=="function")this.addMatch=(a,l,u,c)=>{let h=r(a,l,u);h&&c(u,u+a[0].length,h)};else if(r)this.addMatch=(a,l,u,c)=>c(u,u+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new Ii,r=n.add.bind(n);for(let{from:i,to:o}of Rce(e,this.maxLength))eE(e.state.doc,this.regexp,i,o,(s,a)=>this.addMatch(a,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,l)=>{l>e.view.viewport.from&&a<e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(l,i))}),e.viewportChanged||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let s=Math.max(o.from,r),a=Math.min(o.to,i);if(a>s){let l=e.state.doc.lineAt(s),u=l.to<a?e.state.doc.lineAt(a):l,c=Math.max(o.from,l.from),h=Math.min(o.to,u.to);if(this.boundary){for(;s>l.from;s--)if(this.boundary.test(l.text[s-1-l.from])){c=s;break}for(;a<u.to;a++)if(this.boundary.test(u.text[a-u.from])){h=a;break}}let f=[],d,p=(g,m,b)=>f.push(b.range(g,m));if(l==u)for(this.regexp.lastIndex=c-l.from;(d=this.regexp.exec(l.text))&&d.index<h-l.from;)this.addMatch(d,e,d.index+l.from,p);else eE(e.state.doc,this.regexp,c,h,(g,m)=>this.addMatch(m,e,g,p));n=n.update({filterFrom:c,filterTo:h,filter:(g,m)=>g<c||m>h,add:f})}}return n}}const F1=/x/.unicode!=null?"gu":"g",Nce=new RegExp(`[\0-\b
265
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,F1),jce={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let L1=null;function Vce(){var t;if(L1==null&&typeof document<"u"&&document.body){let e=document.body.style;L1=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return L1||!1}const Vf=he.define({combine(t){let e=Mr(t,{render:null,specialChars:Nce,addSpecialChars:null});return(e.replaceTabs=!Vce())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,F1)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,F1)),e}});function zce(t={}){return[Vf.of(t),Wce()]}let tE=null;function Wce(){return tE||(tE=Bt.fromClass(class{constructor(t){this.view=t,this.decorations=ke.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Vf)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Bce({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Jt(e[0],0);if(o==9){let s=i.lineAt(r),a=n.state.tabSize,l=oa(s.text,a,r-s.from);return ke.replace({widget:new Yce((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=ke.replace({widget:new Uce(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Vf);t.startState.facet(Vf)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Hce="•";function qce(t){return t>=32?Hce:t==10?"␤":String.fromCharCode(9216+t)}class Uce extends ri{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=qce(this.code),r=e.state.phrase("Control character")+" "+(jce[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class Yce extends ri{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Gce(){return Xce}const Kce=ke.line({class:"cm-activeLine"}),Xce=Bt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(Kce.range(i.from)),e=i.from)}return ke.set(n)}},{decorations:t=>t.decorations});let Zce=class extends ri{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?sa(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Sf(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}};function Qce(t){return Bt.fromClass(class{constructor(e){this.view=e,this.placeholder=t?ke.set([ke.widget({widget:new Zce(t),side:1}).range(0)]):ke.none}get decorations(){return this.view.state.doc.length?ke.none:this.placeholder}},{decorations:e=>e.decorations})}const R1=2e3;function Jce(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>R1||n.off>R1||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let u=t.doc.line(l);u.length<=a&&o.push(L.range(u.from+s,u.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let u=t.doc.line(l),c=r1(u.text,s,t.tabSize,!0);if(c<0)o.push(L.cursor(u.to));else{let h=r1(u.text,a,t.tabSize);o.push(L.range(u.from+c,u.from+h))}}}return o}function ehe(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function nE(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>R1?-1:i==r.length?ehe(t,e.clientX):oa(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function the(t,e){let n=nE(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let a=nE(t,i);if(!a)return r;let l=Jce(t.state,n,a);return l.length?s?L.create(l.concat(r.ranges)):L.create(l):r}}:null}function nhe(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return oe.mouseSelectionStyle.of((n,r)=>e(r)?the(n,r):null)}const rhe={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},ihe={style:"cursor: crosshair"};function ohe(t={}){let[e,n]=rhe[t.key||"Alt"],r=Bt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,oe.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?ihe:null})]}const pu="-10000px";class rE{constructor(e,n,r){this.facet=n,this.createTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(i=>i),this.tooltipViews=this.tooltips.map(r)}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[],a=n?[]:null;for(let l=0;l<o.length;l++){let u=o[l],c=-1;if(u){for(let h=0;h<this.tooltips.length;h++){let f=this.tooltips[h];f&&f.create==u.create&&(c=h)}if(c<0)s[l]=this.createTooltipView(u),a&&(a[l]=!!u.above);else{let h=s[l]=this.tooltipViews[c];a&&(a[l]=n[c]),h.update&&h.update(e)}}}for(let l of this.tooltipViews)s.indexOf(l)<0&&(l.dom.remove(),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(a.forEach((l,u)=>n[u]=l),n.length=a.length),this.input=i,this.tooltips=o,this.tooltipViews=s,!0}}function she(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const B1=he.define({combine:t=>{var e,n,r;return{position:pe.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||she}}}),iE=new WeakMap,oE=Bt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(B1);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new rE(t,N1,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(B1);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=pu,e.dom.style.left="0px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);this.parent&&this.container.remove(),(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(pe.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(this.view.scaleX!=1||this.view.scaleY!=1)r=!0;else if(i.style.top==pu&&i.style.left=="0px"){let o=i.getBoundingClientRect();r=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,n=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((i,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(B1).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:r}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{editor:n,space:r,scaleX:i,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],u=this.manager.tooltipViews[a],{dom:c}=u,h=t.pos[a],f=t.size[a];if(!h||h.bottom<=Math.max(n.top,r.top)||h.top>=Math.min(n.bottom,r.bottom)||h.right<Math.max(n.left,r.left)-.1||h.left>Math.min(n.right,r.right)+.1){c.style.top=pu;continue}let d=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=f.right-f.left,m=(e=iE.get(u))!==null&&e!==void 0?e:f.bottom-f.top,b=u.offset||lhe,x=this.view.textDirection==kt.LTR,C=f.width>r.right-r.left?x?r.left:r.right-f.width:x?Math.min(h.left-(d?14:0)+b.x,r.right-g):Math.max(r.left,h.left-g+(d?14:0)-b.x),k=this.above[a];!l.strictSide&&(k?h.top-(f.bottom-f.top)-b.y<r.top:h.bottom+(f.bottom-f.top)+b.y>r.bottom)&&k==r.bottom-h.bottom>h.top-r.top&&(k=this.above[a]=!k);let w=(k?h.top-r.top:r.bottom-h.bottom)-p;if(w<m&&u.resize!==!1){if(w<this.view.defaultLineHeight){c.style.top=pu;continue}iE.set(u,m),c.style.height=(m=w)/o+"px"}else c.style.height&&(c.style.height="");let T=k?h.top-m-p-b.y:h.bottom+p+b.y,S=C+g;if(u.overlap!==!0)for(let M of s)M.left<S&&M.right>C&&M.top<T+m&&M.bottom>T&&(T=k?M.top-m-2-p:M.bottom+p+2);if(this.position=="absolute"?(c.style.top=(T-t.parent.top)/o+"px",c.style.left=(C-t.parent.left)/i+"px"):(c.style.top=T/o+"px",c.style.left=C/i+"px"),d){let M=h.left+(x?b.x:-b.x)-(C+14-7);d.style.left=M/i+"px"}u.overlap!==!0&&s.push({left:C,top:T,right:S,bottom:T+m}),c.classList.toggle("cm-tooltip-above",k),c.classList.toggle("cm-tooltip-below",!k),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=pu}},{eventObservers:{scroll(){this.maybeMeasure()}}}),ahe=oe.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),lhe={x:0,y:0},N1=he.define({enables:[oE,ahe]}),zf=he.define();class j1{static create(e){return new j1(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new rE(e,zf,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const uhe=N1.compute([zf],t=>{let e=t.facet(zf).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:j1.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class che{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Li)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=l&&l.dir==kt.RTL?-1:1;o=n.x<a.left?-u:u}let s=this.source(e,i,o);if(s!=null&&s.then){let a=this.pending={pos:i};s.then(l=>{this.pending==a&&(this.pending=null,l&&e.dispatch({effects:this.setHover.of(l)}))},l=>Zn(e.state,l,"hover tooltip"))}else s&&e.dispatch({effects:this.setHover.of(s)})}mousemove(e){var n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let r=this.active;if(r&&!sE(this.lastMove.target)||this.pending){let{pos:i}=r||this.pending,o=(n=r==null?void 0:r.end)!==null&&n!==void 0?n:i;(i==o?this.view.posAtCoords(this.lastMove)!=i:!hhe(this.view,i,o,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!sE(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function sE(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function hhe(t,e,n,r,i,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,a)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function fhe(t,e={}){let n=De.define(),r=en.define({create(){return null},update(i,o){if(i&&(e.hideOnChange&&(o.docChanged||o.selection)||e.hideOn&&e.hideOn(o,i)))return null;if(i&&o.docChanged){let s=o.changes.mapPos(i.pos,-1,dn.TrackDel);if(s==null)return null;let a=Object.assign(Object.create(null),i);a.pos=s,i.end!=null&&(a.end=o.changes.mapPos(i.end)),i=a}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(dhe)&&(i=null);return i},provide:i=>zf.from(i)});return[r,Bt.define(i=>new che(i,t,r,n,e.hoverTime||300)),uhe]}function aE(t,e){let n=t.plugin(oE);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const dhe=De.define(),lE=he.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function gu(t,e){let n=t.plugin(uE),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const uE=Bt.fromClass(class{constructor(t){this.input=t.state.facet(mu),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(lE);this.top=new Wf(t,!0,e.topContainer),this.bottom=new Wf(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(lE);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Wf(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Wf(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(mu);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],s=[],a=[];for(let l of r){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),a.push(c)):(c=this.panels[u],c.update&&c.update(t)),i.push(c),(c.top?o:s).push(c)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(s);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>oe.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Wf{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=cE(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=cE(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function cE(t){let e=t.nextSibling;return t.remove(),e}const mu=he.define({enables:uE});class ii extends Do{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ii.prototype.elementClass="",ii.prototype.toDOM=void 0,ii.prototype.mapMode=dn.TrackBefore,ii.prototype.startSide=ii.prototype.endSide=-1,ii.prototype.point=!0;const Hf=he.define(),phe={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>rt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},vu=he.define();function ghe(t){return[hE(),vu.of(Object.assign(Object.assign({},phe),t))]}const V1=he.define({combine:t=>t.some(e=>e)});function hE(t){let e=[mhe];return t&&t.fixed===!1&&e.push(V1.of(!0)),e}const mhe=Bt.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(vu).map(e=>new dE(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(V1),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(V1)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=rt.iter(this.view.state.facet(Hf),this.view.viewport.from),r=[],i=this.gutters.map(o=>new vhe(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==pn.Text&&s){z1(n,r,a.from);for(let l of i)l.line(this.view,a,r);s=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(o.type==pn.Text){z1(n,r,o.from);for(let s of i)s.line(this.view,o,r)}else if(o.widget)for(let s of i)s.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(vu),n=t.state.facet(vu),r=t.docChanged||t.heightChanged||t.viewportChanged||!rt.eq(t.startState.facet(Hf),t.state.facet(Hf),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let s=e.indexOf(o);s<0?i.push(new dE(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>oe.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==kt.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function fE(t){return Array.isArray(t)?t:[t]}function z1(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class vhe{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=rt.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==i.elements.length){let a=new pE(e,s,o,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,s,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];z1(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n);r&&this.addElement(e,n,[r])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class dE{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();s=(l.top+l.bottom)/2}else s=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=fE(n.markers(e)),n.initialSpacer&&(this.spacer=new pE(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=fE(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!rt.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class pE{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),yhe(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let a=s,l=o<n.length?n[o++]:null,u=!1;if(l){let c=l.elementClass;c&&(r+=" "+c);for(let h=s;h<this.markers.length;h++)if(this.markers[h].compare(l)){a=h,u=!0;break}}else a=this.markers.length;for(;s<a;){let c=this.markers[s++];if(c.toDOM){c.destroy(i);let h=i.nextSibling;i.remove(),i=h}}if(!l)break;l.toDOM&&(u?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),u&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function yhe(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const bhe=he.define(),ha=he.define({combine(t){return Mr(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(a,l,u)=>o(a,l,u)||s(a,l,u):s}return r}})}});class W1 extends ii{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function H1(t,e){return t.state.facet(ha).formatNumber(e,t.state)}const xhe=vu.compute([ha],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(bhe)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new W1(H1(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(ha)!=e.state.facet(ha),initialSpacer(e){return new W1(H1(e,gE(e.state.doc.lines)))},updateSpacer(e,n){let r=H1(n.view,gE(n.view.state.doc.lines));return r==e.number?e:new W1(r)},domEventHandlers:t.facet(ha).domEventHandlers}));function whe(t={}){return[ha.of(t),hE(),xhe]}function gE(t){let e=9;for(;e<t;)e=e*10+9;return e}const Che=new class extends ii{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},She=Hf.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(Che.range(i)))}return rt.of(e)});function khe(){return She}let The=0;class Dr{constructor(e,n,r){this.set=e,this.base=n,this.modified=r,this.id=The++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Dr([],null,[]);if(n.set.push(n),e)for(let r of e.set)n.set.push(r);return n}static defineModifier(){let e=new qf;return n=>n.modified.indexOf(e)>-1?n:qf.get(n.base||n,n.modified.concat(e).sort((r,i)=>r.id-i.id))}}let Ehe=0;class qf{constructor(){this.instances=[],this.id=Ehe++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&Ohe(n,a.modified));if(r)return r;let i=[],o=new Dr(i,e,n);for(let a of n)a.instances.push(o);let s=Mhe(n);for(let a of e.set)if(!a.modified.length)for(let l of s)i.push(qf.get(a,l));return o}}function Ohe(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function Mhe(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function mE(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let h=0;;){if(a=="..."&&h>0&&h+3==i.length){s=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==i.length)break;let d=i[h++];if(h==i.length&&d=="!"){s=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);a=i.slice(h)}let l=o.length-1,u=o[l];if(!u)throw new RangeError("Invalid path: "+i);let c=new Uf(r,s,l>0?o.slice(0,l):null);e[u]=c.sort(e[u])}}return vE.add(e)}const vE=new Fe;class Uf{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Uf.empty=new Uf([],2,null);function yE(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let l of a.set){let u=n[l.id];if(u){s=s?s+" "+u:u;break}}return s},scope:r}}function Ahe(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function Phe(t,e,n,r=0,i=t.length){let o=new Dhe(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class Dhe{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:a,to:l}=e;if(a>=r||l<=n)return;s.isTop&&(o=this.highlighters.filter(d=>!d.scope||d.scope(s)));let u=i,c=_he(e)||Uf.empty,h=Ahe(o,c.tags);if(h&&(u&&(u+=" "),u+=h,c.mode==1&&(i+=(i?" ":"")+h)),this.startSpan(Math.max(n,a),u),c.opaque)return;let f=e.tree&&e.tree.prop(Fe.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+a,1),p=this.highlighters.filter(m=>!m.scope||m.scope(f.tree.type)),g=e.firstChild();for(let m=0,b=a;;m++){let x=m<f.overlay.length?f.overlay[m]:null,C=x?x.from+a:l,k=Math.max(n,b),w=Math.min(r,C);if(k<w&&g)for(;e.from<w&&(this.highlightRange(e,k,w,i,o),this.startSpan(Math.min(w,e.to),u),!(e.to>=C||!e.nextSibling())););if(!x||C>r)break;b=x.to+a,b>n&&(this.highlightRange(d.cursor(),Math.max(n,x.from+a),Math.min(r,b),"",p),this.startSpan(Math.min(r,b),u))}g&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function _he(t){let e=t.type.prop(vE);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Z=Dr.define,Yf=Z(),Vi=Z(),bE=Z(Vi),xE=Z(Vi),zi=Z(),Gf=Z(zi),q1=Z(zi),_r=Z(),Io=Z(_r),Ir=Z(),$r=Z(),U1=Z(),yu=Z(U1),Kf=Z(),I={comment:Yf,lineComment:Z(Yf),blockComment:Z(Yf),docComment:Z(Yf),name:Vi,variableName:Z(Vi),typeName:bE,tagName:Z(bE),propertyName:xE,attributeName:Z(xE),className:Z(Vi),labelName:Z(Vi),namespace:Z(Vi),macroName:Z(Vi),literal:zi,string:Gf,docString:Z(Gf),character:Z(Gf),attributeValue:Z(Gf),number:q1,integer:Z(q1),float:Z(q1),bool:Z(zi),regexp:Z(zi),escape:Z(zi),color:Z(zi),url:Z(zi),keyword:Ir,self:Z(Ir),null:Z(Ir),atom:Z(Ir),unit:Z(Ir),modifier:Z(Ir),operatorKeyword:Z(Ir),controlKeyword:Z(Ir),definitionKeyword:Z(Ir),moduleKeyword:Z(Ir),operator:$r,derefOperator:Z($r),arithmeticOperator:Z($r),logicOperator:Z($r),bitwiseOperator:Z($r),compareOperator:Z($r),updateOperator:Z($r),definitionOperator:Z($r),typeOperator:Z($r),controlOperator:Z($r),punctuation:U1,separator:Z(U1),bracket:yu,angleBracket:Z(yu),squareBracket:Z(yu),paren:Z(yu),brace:Z(yu),content:_r,heading:Io,heading1:Z(Io),heading2:Z(Io),heading3:Z(Io),heading4:Z(Io),heading5:Z(Io),heading6:Z(Io),contentSeparator:Z(_r),list:Z(_r),quote:Z(_r),emphasis:Z(_r),strong:Z(_r),link:Z(_r),monospace:Z(_r),strikethrough:Z(_r),inserted:Z(),deleted:Z(),changed:Z(),invalid:Z(),meta:Kf,documentMeta:Z(Kf),annotation:Z(Kf),processingInstruction:Z(Kf),definition:Dr.defineModifier(),constant:Dr.defineModifier(),function:Dr.defineModifier(),standard:Dr.defineModifier(),local:Dr.defineModifier(),special:Dr.defineModifier()};yE([{tag:I.link,class:"tok-link"},{tag:I.heading,class:"tok-heading"},{tag:I.emphasis,class:"tok-emphasis"},{tag:I.strong,class:"tok-strong"},{tag:I.keyword,class:"tok-keyword"},{tag:I.atom,class:"tok-atom"},{tag:I.bool,class:"tok-bool"},{tag:I.url,class:"tok-url"},{tag:I.labelName,class:"tok-labelName"},{tag:I.inserted,class:"tok-inserted"},{tag:I.deleted,class:"tok-deleted"},{tag:I.literal,class:"tok-literal"},{tag:I.string,class:"tok-string"},{tag:I.number,class:"tok-number"},{tag:[I.regexp,I.escape,I.special(I.string)],class:"tok-string2"},{tag:I.variableName,class:"tok-variableName"},{tag:I.local(I.variableName),class:"tok-variableName tok-local"},{tag:I.definition(I.variableName),class:"tok-variableName tok-definition"},{tag:I.special(I.variableName),class:"tok-variableName2"},{tag:I.definition(I.propertyName),class:"tok-propertyName tok-definition"},{tag:I.typeName,class:"tok-typeName"},{tag:I.namespace,class:"tok-namespace"},{tag:I.className,class:"tok-className"},{tag:I.macroName,class:"tok-macroName"},{tag:I.propertyName,class:"tok-propertyName"},{tag:I.operator,class:"tok-operator"},{tag:I.comment,class:"tok-comment"},{tag:I.meta,class:"tok-meta"},{tag:I.invalid,class:"tok-invalid"},{tag:I.punctuation,class:"tok-punctuation"}]);var Y1;const fa=new Fe;function Ihe(t){return he.define({combine:t?e=>e.concat(t):void 0})}const $he=new Fe;class hr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,je.prototype.hasOwnProperty("tree")||Object.defineProperty(je.prototype,"tree",{get(){return Zt(this)}}),this.parser=n,this.extension=[Wi.of(this),je.languageData.of((o,s,a)=>{let l=wE(o,s,a),u=l.type.prop(fa);if(!u)return[];let c=o.facet(u),h=l.type.prop($he);if(h){let f=l.resolve(s-l.from,a);for(let d of h)if(d.test(f,o)){let p=o.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return wE(e,n,r).type.prop(fa)==this.data}findRegions(e){let n=e.facet(Wi);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(fa)==this.data){r.push({from:s,to:s+o.length});return}let a=o.prop(Fe.mounted);if(a){if(a.tree.prop(fa)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+s,to:l.to+s});else r.push({from:s,to:s+o.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+s),r.length>l)return}}for(let l=0;l<o.children.length;l++){let u=o.children[l];u instanceof zt&&i(u,o.positions[l]+s)}};return i(Zt(e),0),r}get allowsNesting(){return!0}}hr.setState=De.define();function wE(t,e,n){let r=t.facet(Wi),i=Zt(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,Xt.ExcludeBuffers))o.type.isTop&&(i=o);return i}class Xf extends hr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=Ihe(e.languageData);return new Xf(n,e.parser.configure({props:[fa.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Xf(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Zt(t){let e=t.field(hr.state,!1);return e?e.tree:zt.empty}class Fhe{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let bu=null;class Zf{constructor(e,n,r=[],i,o,s,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Zf(e,n,[],zt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Fhe(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=zt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Mo.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Mo.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=bu;bu=this;try{return e()}finally{bu=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=CE(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,h,f)=>l.push({fromA:u,toA:c,fromB:h,toB:f})),r=Mo.applyChanges(r,l),i=zt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),h=e.mapPos(u.to,-1);c<h&&a.push({from:c,to:h})}}}return new Zf(this.parser,n,r,i,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=CE(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends V3{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let l=bu;if(l){for(let u of i)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new zt(kn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return bu}}function CE(t,e,n){return Mo.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class da{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new da(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Zf.create(e.facet(Wi).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new da(r)}}hr.state=en.define({create:da.init,update(t,e){for(let n of e.effects)if(n.is(hr.setState))return n.value;return e.startState.facet(Wi)!=e.state.facet(Wi)?da.init(e.state):t.apply(e)}});let SE=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(SE=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const G1=typeof navigator<"u"&&(!((Y1=navigator.scheduling)===null||Y1===void 0)&&Y1.isInputPending)?()=>navigator.scheduling.isInputPending():null,Lhe=Bt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(hr.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(hr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=SE(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(hr.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!G1?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<i&&r.doc.length>i+1e3,l=o.context.work(()=>G1&&G1()||Date.now()>s,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:hr.setState.of(new da(o.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Zn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Wi=he.define({combine(t){return t.length?t[0]:null},enables:t=>[hr.state,Lhe,oe.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Rhe{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const Bhe=he.define(),Qf=he.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Jf(t){let e=t.facet(Qf);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function xu(t,e){let n="",r=t.tabSize,i=t.facet(Qf)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function K1(t,e){t instanceof je&&(t=new ed(t));for(let r of t.state.facet(Bhe)){let i=r(t,e);if(i!==void 0)return i}let n=Zt(t.state);return n.length>=e?Nhe(t,n,e):null}class ed{constructor(e,n={}){this.state=e,this.options=n,this.unit=Jf(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return oa(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const kE=new Fe;function Nhe(t,e,n){let r=e.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let s=i;s!=r.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)r={node:o[s],next:r}}return TE(r,t,n)}function TE(t,e,n){for(let r=t;r;r=r.next){let i=Vhe(r.node);if(i)return i(X1.create(e,n,r))}return 0}function jhe(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Vhe(t){let e=t.type.prop(kE);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Fe.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>qhe(s,!0,1,void 0,o&&!jhe(s)?i.from:void 0)}return t.parent==null?zhe:null}function zhe(){return 0}class X1 extends ed{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new X1(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(Whe(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return TE(this.context.next,this.base,this.pos)}}function Whe(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Hhe(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped)return l.from<s?n:null;a=l.to}}function qhe(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==t.pos+s,l=e?Hhe(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}function Uhe({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const Yhe=200;function Ghe(){return je.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+Yhe)return t;let o=n.sliceString(i.from,r);if(!e.some(u=>u.test(o)))return t;let{state:s}=t,a=-1,l=[];for(let{head:u}of s.selection.ranges){let c=s.doc.lineAt(u);if(c.from==a)continue;a=c.from;let h=K1(s,c.from);if(h==null)continue;let f=/^\s*/.exec(c.text)[0],d=xu(s,h);f!=d&&l.push({from:c.from,to:c.from+f.length,insert:d})}return l.length?[t,{changes:l,sequential:!0}]:t})}const Khe=he.define(),EE=new Fe;function Xhe(t,e,n){let r=Zt(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let s=i;s;s=s.next){let a=s.node;if(a.to<=n||a.from>n)continue;if(o&&a.from<e)break;let l=a.type.prop(EE);if(l&&(a.to<r.length-50||r.length==t.doc.length||!Zhe(a))){let u=l(a,t);u&&u.from<=n&&u.from>=e&&u.to>n&&(o=u)}}return o}function Zhe(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function td(t,e,n){for(let r of t.facet(Khe)){let i=r(t,e,n);if(i)return i}return Xhe(t,e,n)}function OE(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const nd=De.define({map:OE}),wu=De.define({map:OE});function ME(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const $o=en.define({create(){return ke.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(nd)&&!Qhe(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(Z1),i=r?ke.replace({widget:new rfe(r(e.state,n.value))}):IE;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(wu)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>oe.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(IE.range(r,i))}return ke.set(e,!0)}});function rd(t,e,n){var r;let i=null;return(r=t.field($o,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function Qhe(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function AE(t,e){return t.field($o,!1)?e:e.concat(De.appendConfig.of(DE()))}const Jhe=t=>{for(let e of ME(t)){let n=td(t.state,e.from,e.to);if(n)return t.dispatch({effects:AE(t.state,[nd.of(n),PE(t,n)])}),!0}return!1},efe=t=>{if(!t.state.field($o,!1))return!1;let e=[];for(let n of ME(t)){let r=rd(t.state,n.from,n.to);r&&e.push(wu.of(r),PE(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function PE(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return oe.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const tfe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Jhe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:efe},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=td(e,i.from,i.to);o&&n.push(nd.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:AE(t.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field($o,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(wu.of({from:r,to:i}))}),t.dispatch({effects:n}),!0}}],nfe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Z1=he.define({combine(t){return Mr(t,nfe)}});function DE(t){let e=[$o,sfe];return t&&e.push(Z1.of(t)),e}function _E(t,e){let{state:n}=t,r=n.facet(Z1),i=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),l=rd(t.state,a.from,a.to);l&&t.dispatch({effects:wu.of(l)}),s.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const IE=ke.replace({widget:new class extends ri{toDOM(t){return _E(t,null)}}});class rfe extends ri{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return _E(e,this.value)}}const ife={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Q1 extends ii{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function ofe(t={}){let e=Object.assign(Object.assign({},ife),t),n=new Q1(e,!0),r=new Q1(e,!1),i=Bt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Wi)!=s.state.facet(Wi)||s.startState.field($o,!1)!=s.state.field($o,!1)||Zt(s.startState)!=Zt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new Ii;for(let l of s.viewportLineBlocks){let u=rd(s.state,l.from,l.to)?r:td(s.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:o}=e;return[i,ghe({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(i))===null||a===void 0?void 0:a.markers)||rt.empty},initialSpacer(){return new Q1(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,a,l)=>{if(o.click&&o.click(s,a,l))return!0;let u=rd(s.state,a.from,a.to);if(u)return s.dispatch({effects:wu.of(u)}),!0;let c=td(s.state,a.from,a.to);return c?(s.dispatch({effects:nd.of(c)}),!0):!1}})}),DE()]}const sfe=oe.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Cu{constructor(e,n){this.specs=e;let r;function i(a){let l=$i.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof hr?a=>a.prop(fa)==s.data:s?a=>a==s:void 0,this.style=yE(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=r?new $i(r):null,this.themeType=n.themeType}static define(e,n){return new Cu(e,n||{})}}const J1=he.define(),$E=he.define({combine(t){return t.length?[t[0]]:null}});function ev(t){let e=t.facet(J1);return e.length?e:t.facet($E)}function FE(t,e){let n=[lfe],r;return t instanceof Cu&&(t.module&&n.push(oe.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push($E.of(t)):r?n.push(J1.computeN([oe.darkTheme],i=>i.facet(oe.darkTheme)==(r=="dark")?[t]:[])):n.push(J1.of(t)),n}class afe{constructor(e){this.markCache=Object.create(null),this.tree=Zt(e.state),this.decorations=this.buildDeco(e,ev(e.state))}update(e){let n=Zt(e.state),r=ev(e.state),i=r!=ev(e.startState);n.length<e.view.viewport.to&&!i&&n.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r))}buildDeco(e,n){if(!n||!this.tree.length)return ke.none;let r=new Ii;for(let{from:i,to:o}of e.visibleRanges)Phe(this.tree,n,(s,a,l)=>{r.add(s,a,this.markCache[l]||(this.markCache[l]=ke.mark({class:l})))},i,o);return r.finish()}}const lfe=ra.high(Bt.fromClass(afe,{decorations:t=>t.decorations})),ufe=Cu.define([{tag:I.meta,color:"#404740"},{tag:I.link,textDecoration:"underline"},{tag:I.heading,textDecoration:"underline",fontWeight:"bold"},{tag:I.emphasis,fontStyle:"italic"},{tag:I.strong,fontWeight:"bold"},{tag:I.strikethrough,textDecoration:"line-through"},{tag:I.keyword,color:"#708"},{tag:[I.atom,I.bool,I.url,I.contentSeparator,I.labelName],color:"#219"},{tag:[I.literal,I.inserted],color:"#164"},{tag:[I.string,I.deleted],color:"#a11"},{tag:[I.regexp,I.escape,I.special(I.string)],color:"#e40"},{tag:I.definition(I.variableName),color:"#00f"},{tag:I.local(I.variableName),color:"#30a"},{tag:[I.typeName,I.namespace],color:"#085"},{tag:I.className,color:"#167"},{tag:[I.special(I.variableName),I.macroName],color:"#256"},{tag:I.definition(I.propertyName),color:"#00c"},{tag:I.comment,color:"#940"},{tag:I.invalid,color:"#f00"}]),cfe=oe.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),LE=1e4,RE="()[]{}",BE=he.define({combine(t){return Mr(t,{afterCursor:!0,brackets:RE,maxScanDistance:LE,renderMatch:dfe})}}),hfe=ke.mark({class:"cm-matchingBracket"}),ffe=ke.mark({class:"cm-nonmatchingBracket"});function dfe(t){let e=[],n=t.matched?hfe:ffe;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const pfe=[en.define({create(){return ke.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(BE);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=Fr(e.state,i.head,-1,r)||i.head>0&&Fr(e.state,i.head-1,1,r)||r.afterCursor&&(Fr(e.state,i.head,1,r)||i.head<e.state.doc.length&&Fr(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return ke.set(n,!0)},provide:t=>oe.decorations.from(t)}),cfe];function gfe(t={}){return[BE.of(t),pfe]}const mfe=new Fe;function tv(t,e,n){let r=t.prop(e<0?Fe.openedBy:Fe.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function nv(t){let e=t.type.prop(mfe);return e?e(t.node):t}function Fr(t,e,n,r={}){let i=r.maxScanDistance||LE,o=r.brackets||RE,s=Zt(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=tv(l.type,n,o);if(u&&l.from<l.to){let c=nv(l);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return vfe(t,e,n,l,c,u,o)}}return yfe(t,e,n,s,a.type,i,o)}function vfe(t,e,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},u=0,c=a==null?void 0:a.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&o.indexOf(c.type.name)>-1&&c.from<c.to){let h=nv(c);return{start:l,end:h?{from:h.from,to:h.to}:void 0,matched:!0}}else if(tv(c.type,n,s))u++;else if(tv(c.type,-n,s)){if(u==0){let h=nv(c);return{start:l,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}function yfe(t,e,n,r,i,o,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let f=0;!c.next().done&&f<=o;){let d=c.value;n<0&&(f+=d.length);let p=e+f*n;for(let g=n>0?0:d.length-1,m=n>0?d.length:-1;g!=m;g+=n){let b=s.indexOf(d[g]);if(!(b<0||r.resolveInner(p+g,1).type!=i))if(b%2==0==n>0)h++;else{if(h==1)return{start:u,end:{from:p+g,to:p+g+1},matched:b>>1==l>>1};h--}}n>0&&(f+=d.length)}return c.done?{start:u,matched:!1}:null}const bfe=Object.create(null),NE=[kn.none],jE=[],xfe=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])xfe[t]=wfe(bfe,e);function rv(t,e){jE.indexOf(t)>-1||(jE.push(t),console.warn(e))}function wfe(t,e){let n=[];for(let o of e.split(" ")){let s=[];for(let a of o.split(".")){let l=t[a]||I[a];l?typeof l=="function"?s.length?s=s.map(l):rv(a,`Modifier ${a} used at start of tag`):s.length?rv(a,`Tag ${a} used as modifier`):s=Array.isArray(l)?l:[l]:rv(a,`Unknown highlighting tag ${a}`)}for(let a of s)n.push(a)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=kn.define({id:NE.length,name:r,props:[mE({[r]:n})]});return NE.push(i),i.id}class id{constructor(e,n,r,i,o,s,a,l,u,c=0,h){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=h}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new id(e,[],n,r,r,0,[],0,i?new VE(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=o.dynamicPrecedence(i);if(s&&(this.score+=s),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,4,!0),this.reduceContext(i,this.reducePos);return}let a=this.stack.length-(r-1)*3-(e&262144?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from,u=this.reducePos-l;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=u));let c=a?this.stack[a-1]:0,h=this.bufferBase+this.buffer.length-c;if(i<o.minRepeatTerm||e&131072){let f=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,l,f,h+4,!0)}if(e&262144)this.state=this.stack[a];else{let f=this.stack[a-3];this.state=o.getGoto(f,i,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(i,l)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new id(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Cfe(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((a,l)=>l&1&&a==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let l=s&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=r(s,o+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new VE(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class VE{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Cfe{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class od{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new od(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new od(this.stack,this.pos,this.index)}}function sd(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class ad{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const zE=new ad;class Sfe{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=zE,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=zE,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class pa{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;Tfe(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}pa.prototype.contextual=pa.prototype.fallback=pa.prototype.extend=!1,pa.prototype.fallback=pa.prototype.extend=!1;class kfe{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Tfe(t,e,n,r,i,o){let s=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;a&t[s];){let u=t[s+1];for(let d=s+3;d<u;d+=2)if((t[d+1]&a)>0){let p=t[d];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||Efe(p,e.token.value,i,o))){e.acceptToken(p);break}}let c=e.next,h=0,f=t[s+2];if(e.next<0&&f>h&&t[u+f*3-3]==65535){s=t[u+f*3-1];continue e}for(;h<f;){let d=h+f>>1,p=u+d+(d<<1),g=t[p],m=t[p+1]||65536;if(c<g)f=d;else if(c>=m)h=d+1;else{s=t[p+2],e.advance();continue e}}break}}function WE(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Efe(t,e,n,r){let i=WE(n,r,e);return i<0||WE(n,r,t)<i}const jn=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let iv=null;function HE(t,e,n){let r=t.cursor(Xt.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class Ofe{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?HE(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?HE(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof zt){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let l=o.prop(Fe.lookAhead);if(!l||a+l<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}}class Mfe{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new ad)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;u<o.length;u++){if(!(1<<u&s))continue;let c=o[u],h=this.tokens[u];if(!(r&&!c.fallback)&&((c.contextual||h.start!=e.pos||h.mask!=s||h.context!=a)&&(this.updateCachedToken(h,c,e),h.mask=s,h.context=a),h.lookAhead>h.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let f=n;if(h.extended>-1&&(n=this.addActions(e,h.extended,h.end,n)),n=this.addActions(e,h.value,h.end,n),!c.extend&&(r=h,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new ad,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new ad,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let l=0;l<2;l++)for(let u=s.stateSlot(o,l?2:1);;u+=3){if(a[u]==65535)if(a[u+1]==1)u=oi(a,u+2);else{i==0&&a[u+1]==2&&(i=this.putAction(oi(a,u+2),n,r,i));break}a[u]==n&&(i=this.putAction(oi(a,u+1),n,r,i))}return i}}class Afe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Sfe(n,i),this.tokens=new Mfe(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[id.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new Ofe(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],o=[]),i.push(a);let l=this.tokens.getMainToken(a);o.push(l.value,l.end)}}break}}if(!r.length){let s=i&&Dfe(i);if(s)return jn&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw jn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return jn&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,l)=>l.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let a=r[s];for(let l=s+1;l<r.length;l++){let u=r[l];if(a.sameState(u)||a.buffer.length>500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)r.splice(l--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=jn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let h=this.fragments.nodeAt(i);h;){let f=this.parser.nodeSet.types[h.type.id]==h.type?o.getGoto(e.state,h.type.id):-1;if(f>-1&&h.length&&(!u||(h.prop(Fe.contextHash)||0)==c))return e.useNode(h,f),jn&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(h.type.id)})`),!0;if(!(h instanceof zt)||h.children.length==0||h.positions[0]>0)break;let d=h.children[0];if(d instanceof zt&&h.positions[0]==0)h=d;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),jn&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;u<l.length;){let c=l[u++],h=l[u++],f=l[u++],d=u==l.length||!r,p=d?e:e.split(),g=this.tokens.mainToken;if(p.apply(c,h,g?g.start:p.pos,f),jn&&console.log(s+this.stackID(p)+` (via ${c&65536?`reduce of ${o.getName(c&65535)}`:"shift"} for ${o.getName(h)} @ ${i}${p==e?"":", split"})`),d)return!0;p.pos>i?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return qE(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],l=n[s<<1],u=n[(s<<1)+1],c=jn?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),jn&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let h=a.split(),f=c;for(let d=0;h.forceReduce()&&d<10&&(jn&&console.log(f+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,r));d++)jn&&(f=this.stackID(h)+" -> ");for(let d of a.recoverByInsert(l))jn&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,r);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),jn&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),qE(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),zt.build({buffer:od.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(iv||(iv=new WeakMap)).get(e);return n||iv.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function qE(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Pfe{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}class ld extends V3{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function o(a,l,u){i[a].push([l,l.deserialize(String(u))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Fe[l]);for(let u=1;u<a.length;){let c=a[u++];if(c>=0)o(c,l,a[u++]);else{let h=a[u+-c];for(let f=-c;f>0;f--)o(a[u++],l,h);u++}}}this.nodeSet=new Rm(n.map((a,l)=>kn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=$3;let s=sd(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(UE),this.states=sd(e.states,Uint32Array),this.data=sd(e.stateData),this.goto=sd(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new pa(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new Afe(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],a=s&1,l=i[o++];if(a&&r)return l;for(let u=o+(s>>1);o<u;o++)if(i[o]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=oi(r,o+2)];else{if(r[o+1]==2)return oi(r,o+2);break}if(s==n||s==0)return oi(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=oi(this.data,o+2);else break;i=n(oi(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=oi(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(ld.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(a=>a.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=UE(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new Pfe(e,r,i)}static deserialize(e){return new ld(e)}}function oi(t,e){return t[e]|t[e+1]<<16}function Dfe(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function UE(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}class YE{constructor(e,n,r){this.state=e,this.pos=n,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let n=Zt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(ZE(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function GE(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function _fe(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=GE(e)+GE(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function KE(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:_fe(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function Ife(t,e){return n=>{for(let r=Zt(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class XE{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function Hi(t){return t.selection.main.from}function ZE(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const $fe=Or.define();function Ffe(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(a=>a!=i&&n!=r&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:e},range:L.cursor(a.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const QE=new WeakMap;function Lfe(t){if(!Array.isArray(t))return t;let e=QE.get(t);return e||QE.set(t,e=KE(t)),e}const ov=De.define(),Su=De.define();class Rfe{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=Jt(e,n),i=Xn(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(Jt(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,!0}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return!1;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let x=Jt(e,0),C=Xn(x),k=C==e.length?0:-100;if(x!=n[0])if(x==r[0])k+=-200;else return!1;return this.ret(k,[0,C])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,u=0;if(a<0){for(let x=0,C=Math.min(e.length,200);x<C&&u<l;){let k=Jt(e,x);(k==n[u]||k==r[u])&&(i[u++]=x),x+=Xn(k)}if(u<l)return!1}let c=0,h=0,f=!1,d=0,p=-1,g=-1,m=/[a-z]/.test(e),b=!0;for(let x=0,C=Math.min(e.length,200),k=0;x<C&&h<l;){let w=Jt(e,x);a<0&&(c<l&&w==n[c]&&(o[c++]=x),d<l&&(w==n[d]||w==r[d]?(d==0&&(p=x),g=x+1,d++):d=0));let T,S=w<255?w>=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(T=Wm(w))!=T.toLowerCase()?1:T!=T.toUpperCase()?2:0;(!x||S==1&&m||k==0&&S!=0)&&(n[h]==w||r[h]==w&&(f=!0)?s[h++]=x:s.length&&(b=!1)),k=S,x+=Xn(w)}return h==l&&s[0]==0&&b?this.result(-100+(f?-200:0),s,e):d==l&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):d==l?this.ret(-200+-700-e.length,[p,g]):h==l?this.result(-100+(f?-200:0)+-700+(b?0:-1100),s,e):n.length==2?!1:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let a=s+(this.astral?Xn(Jt(r,s)):1);o&&i[o-1]==s?i[o-1]=a:(i[o++]=s,i[o++]=a)}return this.ret(e-r.length,i)}}const cn=he.define({combine(t){return Mr(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Bfe,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>JE(e(r),n(r)),optionClass:(e,n)=>r=>JE(e(r),n(r)),addToOptions:(e,n)=>e.concat(n)})}});function JE(t,e){return t?e?t+" "+e:t:e}function Bfe(t,e,n,r,i,o){let s=t.textDirection==kt.RTL,a=s,l=!1,u="top",c,h,f=e.left-i.left,d=i.right-e.right,p=r.right-r.left,g=r.bottom-r.top;if(a&&f<Math.min(p,d)?a=!1:!a&&d<Math.min(p,f)&&(a=!0),p<=(a?f:d))c=Math.max(i.top,Math.min(n.top,i.bottom-g))-e.top,h=Math.min(400,a?f:d);else{l=!0,h=Math.min(400,(s?e.right:i.right-e.left)-30);let x=i.bottom-e.bottom;x>=g||x>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let m=(e.bottom-e.top)/o.offsetHeight,b=(e.right-e.left)/o.offsetWidth;return{style:`${u}: ${c/m}px; max-width: ${h/b}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}function Nfe(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;u<o.length;){let c=o[u++],h=o[u++];c>l&&s.appendChild(document.createTextNode(a.slice(l,c)));let f=s.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(a.slice(c,h))),f.className="cm-completionMatchedText",l=h}return l<a.length&&s.appendChild(document.createTextNode(a.slice(l))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function sv(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class jfe{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,a=e.state.facet(cn);this.optionContent=Nfe(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=sv(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,h;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(h=/-(\d+)$/.exec(c.id))&&+h[1]<u.length){this.applyCompletion(e,u[+h[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(cn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Su.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:s,disabled:a}=r.open;(!i.open||i.open.options!=o)&&(this.range=sv(o.length,s,e.state.facet(cn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=sv(n.options.length,n.selected,this.view.state.facet(cn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>Zn(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&zfe(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(cn).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let s=r.from;s<r.to;s++){let{completion:a,match:l}=e[s],{section:u}=a;if(u){let f=typeof u=="string"?u:u.name;if(f!=o&&(s>r.from||r.from==0))if(o=f,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=f}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+s,c.setAttribute("role","option");let h=this.optionClass(a);h&&(c.className=h);for(let f of this.optionContent){let d=f(a,this.view.state,this.view,l);d&&c.appendChild(d)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Vfe(t,e){return n=>new jfe(n,t,e)}function zfe(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function eO(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Wfe(t,e){let n=[],r=null,i=l=>{n.push(l);let{section:u}=l.completion;if(u){r||(r=[]);let c=typeof u=="string"?u:u.name;r.some(h=>h.name==c)||r.push(typeof u=="string"?{name:c}:u)}};for(let l of t)if(l.hasResult()){let u=l.result.getMatch;if(l.result.filter===!1)for(let c of l.result.options)i(new XE(c,l.source,u?u(c):[],1e9-n.length));else{let c=new Rfe(e.sliceDoc(l.from,l.to));for(let h of l.result.options)if(c.match(h.label)){let f=h.displayLabel?u?u(h,c.matched):[]:c.matched;i(new XE(h,l.source,f,c.score+(h.boost||0)))}}}if(r){let l=Object.create(null),u=0,c=(h,f)=>{var d,p;return((d=h.rank)!==null&&d!==void 0?d:1e9)-((p=f.rank)!==null&&p!==void 0?p:1e9)||(h.name<f.name?-1:1)};for(let h of r.sort(c))u-=1e5,l[h.name]=u;for(let h of n){let{section:f}=h.completion;f&&(h.score+=l[typeof f=="string"?f:f.name])}}let o=[],s=null,a=e.facet(cn).compareCompletions;for(let l of n.sort((u,c)=>c.score-u.score||a(u.completion,c.completion))){let u=l.completion;!s||s.label!=u.label||s.detail!=u.detail||s.type!=null&&u.type!=null&&s.type!=u.type||s.apply!=u.apply||s.boost!=u.boost?o.push(l):eO(l.completion)>eO(s)&&(o[o.length-1]=l),s=l.completion}return o}class ga{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new ga(this.options,tO(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o){let s=Wfe(e,n);if(!s.length)return i&&e.some(l=>l.state==1)?new ga(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let a=n.facet(cn).selectOnOpen?0:-1;if(i&&i.selected!=a&&i.selected!=-1){let l=i.options[i.selected].completion;for(let u=0;u<s.length;u++)if(s[u].completion==l){a=u;break}}return new ga(s,tO(r,a),{pos:e.reduce((l,u)=>u.hasResult()?Math.min(l,u.from):l,1e8),create:Gfe,above:o.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(e){return new ga(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class ud{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new ud(Ufe,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(cn),o=(r.override||n.languageDataAt("autocomplete",Hi(n)).map(Lfe)).map(a=>(this.active.find(u=>u.source==a)||new Tn(a,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((a,l)=>a==this.active[l])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!Hfe(o,this.active)?s=ga.build(o,n,this.id,s,r):s&&s.disabled&&!o.some(a=>a.state==1)&&(s=null),!s&&o.every(a=>a.state!=1)&&o.some(a=>a.hasResult())&&(o=o.map(a=>a.hasResult()?new Tn(a.source,0):a));for(let a of e.effects)a.is(rO)&&(s=s&&s.setSelected(a.value,this.id));return o==this.active&&s==this.open?this:new ud(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:qfe}}function Hfe(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult;)n++;for(;r<e.length&&!e[r].hasResult;)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const qfe={"aria-autocomplete":"list"};function tO(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Ufe=[];function av(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Tn{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=av(e),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&i.state!=0&&(i=new Tn(i.source,0));for(let o of e.effects)if(o.is(ov))i=new Tn(i.source,1,o.value?Hi(e.state):-1);else if(o.is(Su))i=new Tn(i.source,0);else if(o.is(nO))for(let s of o.value)s.source==i.source&&(i=s);return i}handleUserEvent(e,n,r){return n=="delete"||!r.activateOnTyping?this.map(e.changes):new Tn(this.source,1)}handleChange(e){return e.changes.touchesRange(Hi(e.startState))?new Tn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Tn(this.source,this.state,e.mapPos(this.explicitPos))}}class ma extends Tn{constructor(e,n,r,i,o){super(e,2,n),this.result=r,this.from=i,this.to=o}hasResult(){return!0}handleUserEvent(e,n,r){var i;let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),a=Hi(e.state);if((this.explicitPos<0?a<=o:a<this.from)||a>s||n=="delete"&&Hi(e.startState)==this.from)return new Tn(this.source,n=="input"&&r.activateOnTyping?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return Yfe(this.result.validFor,e.state,o,s)?new ma(this.source,l,this.result,o,s):this.result.update&&(u=this.result.update(this.result,o,s,new YE(e.state,a,l>=0)))?new ma(this.source,l,u,u.from,(i=u.to)!==null&&i!==void 0?i:Hi(e.state)):new Tn(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Tn(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new ma(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function Yfe(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):ZE(t,!0).test(i)}const nO=De.define({map(t,e){return t.map(n=>n.map(e))}}),rO=De.define(),Vn=en.define({create(){return ud.start()},update(t,e){return t.update(e)},provide:t=>[N1.from(t,e=>e.tooltip),oe.contentAttributes.from(t,e=>e.attrs)]});function iO(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Vn).active.find(i=>i.source==e.source);return r instanceof ma?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},Ffe(t.state,n,r.from,r.to)),{annotations:$fe.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const Gfe=Vfe(Vn,iO);function cd(t,e="option"){return n=>{let r=n.state.field(Vn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(cn).interactionDelay)return!1;let i=1,o;e=="page"&&(o=aE(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),n.dispatch({effects:rO.of(a)}),!0}}const Kfe=t=>{let e=t.state.field(Vn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(cn).interactionDelay?!1:iO(t,e.open.options[e.open.selected])},Xfe=t=>t.state.field(Vn,!1)?(t.dispatch({effects:ov.of(!0)}),!0):!1,Zfe=t=>{let e=t.state.field(Vn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Su.of(null)}),!0)};class Qfe{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Jfe=50,ede=1e3,tde=Bt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(Vn).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Vn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Vn)==e)return;let n=t.transactions.some(r=>(r.selection||r.docChanged)&&!av(r));for(let r=0;r<this.running.length;r++){let i=this.running[r];if(n||i.updates.length+t.transactions.length>Jfe&&Date.now()-i.time>ede){for(let o of i.context.abortListeners)try{o()}catch(s){Zn(this.view.state,s)}i.context.abortListeners=null,this.running.splice(r--,1)}else i.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(i=>i.active.source==r.source))?setTimeout(()=>this.startUpdate(),50):-1,this.composing!=0)for(let r of t.transactions)av(r)=="input"?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(Vn);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=Hi(e),r=new YE(e,n,t.explicitPos==n),i=new Qfe(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:Su.of(null)}),Zn(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(cn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(cn);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let s=new ma(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:Hi(i.updates.length?i.updates[0].startState:this.view.state));for(let a of i.updates)s=s.update(a,n);if(s.hasResult()){e.push(s);continue}}let o=this.view.state.field(Vn).active.find(s=>s.source==i.active.source);if(o&&o.state==1)if(i.done==null){let s=new Tn(i.active.source,0);for(let a of i.updates)s=s.update(a,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:nO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Vn,!1);if(e&&e.tooltip&&this.view.state.facet(cn).closeOnBlur){let n=e.open&&aE(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:Su.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:ov.of(!1)}),20),this.composing=0}}}),nde=oe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),ku={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Fo=De.define({map(t,e){let n=e.mapPos(t,-1,dn.TrackAfter);return n??void 0}}),lv=new class extends Do{};lv.startSide=1,lv.endSide=-1;const oO=en.define({create(){return rt.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}t=t.map(e.changes);for(let n of e.effects)n.is(Fo)&&(t=t.update({add:[lv.range(n.value,n.value+1)]}));return t}});function rde(){return[ode,oO]}const uv="()[]{}<>";function sO(t){for(let e=0;e<uv.length;e+=2)if(uv.charCodeAt(e)==t)return uv.charAt(e+1);return Wm(t<128?t:t+1)}function aO(t,e){return t.languageDataAt("closeBrackets",e)[0]||ku}const ide=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),ode=oe.inputHandler.of((t,e,n,r)=>{if((ide?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Xn(Jt(r,0))==1||e!=i.from||n!=i.to)return!1;let o=ade(t.state,r);return o?(t.dispatch(o),!0):!1}),sde=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=aO(t,t.selection.main.head).brackets||ku.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let a=lde(t.doc,s.head);for(let l of r)if(l==a&&hd(t.doc,s.head)==sO(Jt(l,0)))return{changes:{from:s.head-l.length,to:s.head+l.length},range:L.cursor(s.head-l.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function ade(t,e){let n=aO(t,t.selection.main.head),r=n.brackets||ku.brackets;for(let i of r){let o=sO(Jt(i,0));if(e==i)return o==i?hde(t,i,r.indexOf(i+i+i)>-1,n):ude(t,i,o,n.before||ku.before);if(e==o&&lO(t,t.selection.main.from))return cde(t,i,o)}return null}function lO(t,e){let n=!1;return t.field(oO).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function hd(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Xn(Jt(n,0)))}function lde(t,e){let n=t.sliceString(e-2,e);return Xn(Jt(n,0))==n.length?n:n.slice(1)}function ude(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Fo.of(s.to+e.length),range:L.range(s.anchor+e.length,s.head+e.length)};let a=hd(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:Fo.of(s.head+e.length),range:L.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function cde(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&hd(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:L.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function hde(t,e,n,r){let i=r.stringPrefixes||ku.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Fo.of(a.to+e.length),range:L.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=hd(t.doc,l),c;if(u==e){if(uO(t,l))return{changes:{insert:e+e,from:l},effects:Fo.of(l+e.length),range:L.cursor(l+e.length)};if(lO(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:L.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=cO(t,l-2*e.length,i))>-1&&uO(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Fo.of(l+e.length),range:L.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=wt.Word&&cO(t,l,i)>-1&&!fde(t,l,e,i))return{changes:{insert:e+e,from:l},effects:Fo.of(l+e.length),range:L.cursor(l+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function uO(t,e){let n=Zt(t).resolveInner(e+1);return n.parent&&n.from==e}function fde(t,e,n,r){let i=Zt(t).resolveInner(e,-1),o=r.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=a.indexOf(n);if(!l||l>-1&&r.indexOf(a.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function cO(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=wt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=wt.Word)return o}return-1}function dde(t={}){return[Vn,cn.of(t),tde,pde,nde]}const hO=[{key:"Ctrl-Space",run:Xfe},{key:"Escape",run:Zfe},{key:"ArrowDown",run:cd(!0)},{key:"ArrowUp",run:cd(!1)},{key:"PageDown",run:cd(!0,"page")},{key:"PageUp",run:cd(!1,"page")},{key:"Enter",run:Kfe}],pde=ra.highest(Nf.computeN([cn],t=>t.facet(cn).defaultKeymap?[hO]:[])),gde=36,fO=1,mde=2,Tu=3,cv=4,vde=5,yde=6,bde=7,xde=8,wde=9,Cde=10,Sde=11,kde=12,Tde=13,Ede=14,Ode=15,Mde=16,Ade=17,dO=18,Pde=19,pO=20,gO=21,mO=22,Dde=23,_de=24;function hv(t){return t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57}function Ide(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function Lo(t,e,n){for(let r=!1;;){if(t.next<0)return;if(t.next==e&&!r){t.advance();return}r=n&&!r&&t.next==92,t.advance()}}function $de(t){for(;;){if(t.next<0||t.peek(1)<0)return;if(t.next==36&&t.peek(1)==36){t.advance(2);return}t.advance()}}function Fde(t,e){let n="[{<(".indexOf(String.fromCharCode(e)),r=n<0?e:"]}>)".charCodeAt(n);for(;;){if(t.next<0)return;if(t.next==r&&t.peek(1)==39){t.advance(2);return}t.advance()}}function vO(t,e){for(;!(t.next!=95&&!hv(t.next));)e!=null&&(e+=String.fromCharCode(t.next)),t.advance();return e}function Lde(t){if(t.next==39||t.next==34||t.next==96){let e=t.next;t.advance(),Lo(t,e,!1)}else vO(t)}function yO(t,e){for(;t.next==48||t.next==49;)t.advance();e&&t.next==e&&t.advance()}function bO(t,e){for(;;){if(t.next==46){if(e)break;e=!0}else if(t.next<48||t.next>57)break;t.advance()}if(t.next==69||t.next==101)for(t.advance(),(t.next==43||t.next==45)&&t.advance();t.next>=48&&t.next<=57;)t.advance()}function xO(t){for(;!(t.next<0||t.next==10);)t.advance()}function Ro(t,e){for(let n=0;n<e.length;n++)if(e.charCodeAt(n)==t)return!0;return!1}const fv=` \r
266
+ `;function wO(t,e,n){let r=Object.create(null);r.true=r.false=vde,r.null=r.unknown=yde;for(let i of t.split(" "))i&&(r[i]=pO);for(let i of e.split(" "))i&&(r[i]=gO);for(let i of(n||"").split(" "))i&&(r[i]=_de);return r}const dv={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',words:wO("absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ","array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ")};function Rde(t,e,n,r){let i={};for(let o in dv)i[o]=(t.hasOwnProperty(o)?t:dv)[o];return e&&(i.words=wO(e,n||"",r)),i}function CO(t){return new kfe(e=>{var n;let{next:r}=e;if(e.advance(),Ro(r,fv)){for(;Ro(e.next,fv);)e.advance();e.acceptToken(gde)}else if(r==36&&e.next==36&&t.doubleDollarQuotedStrings)$de(e),e.acceptToken(Tu);else if(r==39||r==34&&t.doubleQuotedStrings)Lo(e,r,t.backslashEscapes),e.acceptToken(Tu);else if(r==35&&t.hashComments||r==47&&e.next==47&&t.slashComments)xO(e),e.acceptToken(fO);else if(r==45&&e.next==45&&(!t.spaceAfterDashes||e.peek(1)==32))xO(e),e.acceptToken(fO);else if(r==47&&e.next==42){e.advance();for(let i=1;;){let o=e.next;if(e.next<0)break;if(e.advance(),o==42&&e.next==47){if(i--,e.advance(),!i)break}else o==47&&e.next==42&&(i++,e.advance())}e.acceptToken(mde)}else if((r==101||r==69)&&e.next==39)e.advance(),Lo(e,39,!0);else if((r==110||r==78)&&e.next==39&&t.charSetCasts)e.advance(),Lo(e,39,t.backslashEscapes),e.acceptToken(Tu);else if(r==95&&t.charSetCasts)for(let i=0;;i++){if(e.next==39&&i>1){e.advance(),Lo(e,39,t.backslashEscapes),e.acceptToken(Tu);break}if(!hv(e.next))break;e.advance()}else if(t.plsqlQuotingMechanism&&(r==113||r==81)&&e.next==39&&e.peek(1)>0&&!Ro(e.peek(1),fv)){let i=e.peek(1);e.advance(2),Fde(e,i),e.acceptToken(Tu)}else if(r==40)e.acceptToken(bde);else if(r==41)e.acceptToken(xde);else if(r==123)e.acceptToken(wde);else if(r==125)e.acceptToken(Cde);else if(r==91)e.acceptToken(Sde);else if(r==93)e.acceptToken(kde);else if(r==59)e.acceptToken(Tde);else if(t.unquotedBitLiterals&&r==48&&e.next==98)e.advance(),yO(e),e.acceptToken(mO);else if((r==98||r==66)&&(e.next==39||e.next==34)){const i=e.next;e.advance(),t.treatBitsAsBytes?(Lo(e,i,t.backslashEscapes),e.acceptToken(Dde)):(yO(e,i),e.acceptToken(mO))}else if(r==48&&(e.next==120||e.next==88)||(r==120||r==88)&&e.next==39){let i=e.next==39;for(e.advance();Ide(e.next);)e.advance();i&&e.next==39&&e.advance(),e.acceptToken(cv)}else if(r==46&&e.next>=48&&e.next<=57)bO(e,!0),e.acceptToken(cv);else if(r==46)e.acceptToken(Ede);else if(r>=48&&r<=57)bO(e,!1),e.acceptToken(cv);else if(Ro(r,t.operatorChars)){for(;Ro(e.next,t.operatorChars);)e.advance();e.acceptToken(Ode)}else if(Ro(r,t.specialVar))e.next==r&&e.advance(),Lde(e),e.acceptToken(Ade);else if(Ro(r,t.identifierQuotes))Lo(e,r,!1),e.acceptToken(Pde);else if(r==58||r==44)e.acceptToken(Mde);else if(hv(r)){let i=vO(e,String.fromCharCode(r));e.acceptToken(e.next==46?dO:(n=t.words[i.toLowerCase()])!==null&&n!==void 0?n:dO)}})}const SO=CO(dv),Bde=ld.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,SO],topRules:{Script:[0,25]},tokenPrec:0});function pv(t){let e=t.cursor().moveTo(t.from,-1);for(;/Comment/.test(e.name);)e.moveTo(e.from,-1);return e.node}function Eu(t,e){let n=t.sliceString(e.from,e.to),r=/^([`'"])(.*)\1$/.exec(n);return r?r[2]:n}function fd(t){return t&&(t.name=="Identifier"||t.name=="QuotedIdentifier")}function Nde(t,e){if(e.name=="CompositeIdentifier"){let n=[];for(let r=e.firstChild;r;r=r.nextSibling)fd(r)&&n.push(Eu(t,r));return n}return[Eu(t,e)]}function kO(t,e){for(let n=[];;){if(!e||e.name!=".")return n;let r=pv(e);if(!fd(r))return n;n.unshift(Eu(t,r)),e=pv(r)}}function jde(t,e){let n=Zt(t).resolveInner(e,-1),r=zde(t.doc,n);return n.name=="Identifier"||n.name=="QuotedIdentifier"||n.name=="Keyword"?{from:n.from,quoted:n.name=="QuotedIdentifier"?t.doc.sliceString(n.from,n.from+1):null,parents:kO(t.doc,pv(n)),aliases:r}:n.name=="."?{from:e,quoted:null,parents:kO(t.doc,n),aliases:r}:{from:e,quoted:null,parents:[],empty:!0,aliases:r}}const Vde=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function zde(t,e){let n;for(let i=e;!n;i=i.parent){if(!i)return null;i.name=="Statement"&&(n=i)}let r=null;for(let i=n.firstChild,o=!1,s=null;i;i=i.nextSibling){let a=i.name=="Keyword"?t.sliceString(i.from,i.to).toLowerCase():null,l=null;if(!o)o=a=="from";else if(a=="as"&&s&&fd(i.nextSibling))l=Eu(t,i.nextSibling);else{if(a&&Vde.has(a))break;s&&fd(i)&&(l=Eu(t,i))}l&&(r||(r=Object.create(null)),r[l]=Nde(t,s)),s=/Identifier$/.test(i.name)?i:null}return r}function Wde(t,e){return t?e.map(n=>Object.assign(Object.assign({},n),{label:t+n.label+t,apply:void 0})):e}const Hde=/^\w*$/,qde=/^[`'"]?\w*[`'"]?$/;class gv{constructor(){this.list=[],this.children=void 0}child(e,n){let r=this.children||(this.children=Object.create(null)),i=r[e];return i||(e&&this.list.push(TO(e,"type",n)),r[e]=new gv)}addCompletions(e){for(let n of e){let r=this.list.findIndex(i=>i.label==n.label);r>-1?this.list[r]=n:this.list.push(n)}}}function TO(t,e,n){return/[^\w\xb5-\uffff]/.test(t)?{label:t,type:e,apply:n+t+n}:{label:t,type:e}}function Ude(t,e,n,r,i,o){var s;let a=new gv,l=((s=o==null?void 0:o.spec.identifierQuotes)===null||s===void 0?void 0:s[0])||'"',u=a.child(i||"",l);for(let c in t){let h=c.replace(/\\?\./g,d=>d=="."?"\0":d).split("\0"),f=h.length==1?u:a;for(let d of h)f=f.child(d.replace(/\\\./g,"."),l);for(let d of t[c])d&&f.list.push(typeof d=="string"?TO(d,"property",l):d)}return e&&u.addCompletions(e),n&&a.addCompletions(n),a.addCompletions(u.list),r&&a.addCompletions(u.child(r,l).list),c=>{let{parents:h,from:f,quoted:d,empty:p,aliases:g}=jde(c.state,c.pos);if(p&&!c.explicit)return null;g&&h.length==1&&(h=g[h[0]]||h);let m=a;for(let C of h){for(;!m.children||!m.children[C];)if(m==a)m=u;else if(m==u&&r)m=m.child(r,l);else return null;m=m.child(C,l)}let b=d&&c.state.sliceDoc(c.pos,c.pos+1)==d,x=m.list;return m==a&&g&&(x=x.concat(Object.keys(g).map(C=>({label:C,type:"constant"})))),{from:f,to:b?c.pos+1:void 0,options:Wde(d,x),validFor:d?qde:Hde}}}function Yde(t,e){let n=Object.keys(t).map(r=>({label:e?r.toUpperCase():r,type:t[r]==gO?"type":t[r]==pO?"keyword":"variable",boost:-1}));return Ife(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],KE(n))}let Gde=Bde.configure({props:[kE.add({Statement:Uhe()}),EE.add({Statement(t){return{from:t.firstChild.to,to:t.to}},BlockComment(t){return{from:t.from+2,to:t.to-2}}}),mE({Keyword:I.keyword,Type:I.typeName,Builtin:I.standard(I.name),Bits:I.number,Bytes:I.string,Bool:I.bool,Null:I.null,Number:I.number,String:I.string,Identifier:I.name,QuotedIdentifier:I.special(I.string),SpecialVar:I.special(I.name),LineComment:I.lineComment,BlockComment:I.blockComment,Operator:I.operator,"Semi Punctuation":I.punctuation,"( )":I.paren,"{ }":I.brace,"[ ]":I.squareBracket})]});class mv{constructor(e,n,r){this.dialect=e,this.language=n,this.spec=r}get extension(){return this.language.extension}static define(e){let n=Rde(e,e.keywords,e.types,e.builtin),r=Xf.define({name:"sql",parser:Gde.configure({tokenizers:[{from:SO,to:CO(n)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new mv(n,r,e)}}function Kde(t,e=!1){return Yde(t.dialect.words,e)}function Xde(t,e=!1){return t.language.data.of({autocomplete:Kde(t,e)})}function Zde(t){return t.schema?Ude(t.schema,t.tables,t.schemas,t.defaultTable,t.defaultSchema,t.dialect||vv):()=>null}function Qde(t){return t.schema?(t.dialect||vv).language.data.of({autocomplete:Zde(t)}):[]}function Jde(t={}){let e=t.dialect||vv;return new Rhe(e.language,[Qde(t),Xde(e,!!t.upperCaseKeywords)])}const vv=mv.define({});function yv(){return yv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yv.apply(this,arguments)}function epe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const tpe=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=xv(t.state,n.from);return r.line?npe(t):r.block?ipe(t):!1};function bv(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const npe=bv(ape,0),rpe=bv(EO,0),ipe=bv((t,e)=>EO(t,e,spe(e)),0);function xv(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Ou=50;function ope(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-Ou,r),s=t.sliceDoc(i,i+Ou),a=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(s)[0].length,u=o.length-a;if(o.slice(u-e.length,u)==e&&s.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let c,h;i-r<=2*Ou?c=h=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+Ou),h=t.sliceDoc(i-Ou,i));let f=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(h)[0].length,p=h.length-d-n.length;return c.slice(f,f+e.length)==e&&h.slice(p,p+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(c.charAt(f+e.length))?1:0},close:{pos:i-d-n.length,margin:/\s/.test(h.charAt(p-1))?1:0}}:null}function spe(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function EO(t,e,n=e.selection.ranges){let r=n.map(o=>xv(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>ope(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,a;s<i.length;s++)if(a=i[s]){let l=r[s],{open:u,close:c}=a;o.push({from:u.pos-l.open.length,to:u.pos+u.margin},{from:c.pos-c.margin,to:c.pos+l.close.length})}return{changes:o}}return null}function ape(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let a=r.length,l=1e9,u=xv(e,o).line;if(u){for(let c=o;c<=s;){let h=e.doc.lineAt(c);if(h.from>i&&(o==s||s>h.from)){i=h.from;let f=/^\s*/.exec(h.text)[0].length,d=f==h.length,p=h.text.slice(f,f+u.length)==u?f:-1;f<h.text.length&&f<l&&(l=f),r.push({line:h,comment:p,token:u,indent:f,empty:d,single:!1})}c=h.to+1}if(l<1e9)for(let c=a;c<r.length;c++)r[c].indent<r[c].line.text.length&&(r[c].indent=l);r.length==a+1&&(r[a].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:l,indent:u,empty:c,single:h}of r)(h||!c)&&o.push({from:a.from+u,insert:l+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:l}of r)if(a>=0){let u=s.from+a,c=u+l.length;s.text[c-s.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const wv=Or.define(),lpe=Or.define(),upe=he.define(),OO=he.define({combine(t){return Mr(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}});function cpe(t){let e=0;return t.iterChangedRanges((n,r)=>e=r),e}const MO=en.define({create(){return Lr.empty},update(t,e){let n=e.state.facet(OO),r=e.annotation(wv);if(r){let l=e.docChanged?L.single(cpe(e.changes)):void 0,u=En.fromTransaction(e,l),c=r.side,h=c==0?t.undone:t.done;return u?h=pd(h,h.length,n.minDepth,u):h=DO(h,e.startState.selection),new Lr(c==0?r.rest:h,c==0?h:r.rest)}let i=e.annotation(lpe);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Ut.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=En.fromTransaction(e),s=e.annotation(Ut.time),a=e.annotation(Ut.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Lr(t.done.map(En.fromJSON),t.undone.map(En.fromJSON))}});function hpe(t={}){return[MO,OO.of(t),oe.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?AO:e.inputType=="historyRedo"?Cv:null;return r?(e.preventDefault(),r(n)):!1}})]}function dd(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(MO,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const AO=dd(0,!1),Cv=dd(1,!1),fpe=dd(0,!0),dpe=dd(1,!0);class En{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new En(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new En(e.changes&&qt.fromJSON(e.changes),[],e.mapped&&Er.fromJSON(e.mapped),e.startSelection&&L.fromJSON(e.startSelection),e.selectionsAfter.map(L.fromJSON))}static fromTransaction(e,n){let r=Jn;for(let i of e.startState.facet(upe)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new En(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Jn)}static selection(e){return new En(void 0,Jn,void 0,void 0,e)}}function pd(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function ppe(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,a)=>{for(let l=0;l<n.length;){let u=n[l++],c=n[l++];a>=u&&s<=c&&(r=!0)}}),r}function gpe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function PO(t,e){return t.length?e.length?t.concat(e):t:e}const Jn=[],mpe=200;function DO(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-mpe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),pd(t,t.length-1,1e9,n.setSelAfter(r)))}else return[En.selection([e])]}function vpe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Sv(t,e){if(!t.length)return t;let n=t.length,r=Jn;for(;n;){let i=ype(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[En.selection(r)]:Jn}function ype(t,e,n){let r=PO(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Jn,n);if(!t.changes)return En.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new En(i,De.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const bpe=/^(input\.type|delete)($|\.)/;class Lr{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Lr(this.done,this.undone):this}addChanges(e,n,r,i,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||bpe.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,ppe(a.changes,e.changes))||r=="input.type.compose")?s=pd(s,s.length-1,i.minDepth,new En(e.changes.compose(a.changes),PO(e.effects,a.effects),a.mapped,a.startSelection,Jn)):s=pd(s,s.length,i.minDepth,e),new Lr(s,Jn,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Jn;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&gpe(o[o.length-1],e)?this:new Lr(DO(this.done,e),this.undone,n,r)}addMapping(e){return new Lr(Sv(this.done,e),Sv(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1];if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:wv.of({side:e,rest:vpe(i)}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let s=i.length==1?Jn:i.slice(0,i.length-1);return o.mapped&&(s=Sv(s,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:wv.of({side:e,rest:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Lr.empty=new Lr(Jn,Jn);const xpe=[{key:"Mod-z",run:AO,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Cv,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Cv,preventDefault:!0},{key:"Mod-u",run:fpe,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:dpe,preventDefault:!0}];function va(t,e){return L.create(t.ranges.map(e),t.mainIndex)}function Rr(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function fr({state:t,dispatch:e},n){let r=va(t.selection,n);return r.eq(t.selection)?!1:(e(Rr(t,r)),!0)}function gd(t,e){return L.cursor(e?t.to:t.from)}function _O(t,e){return fr(t,n=>n.empty?t.moveByChar(n,e):gd(n,e))}function hn(t){return t.textDirectionAt(t.state.selection.main.head)==kt.LTR}const IO=t=>_O(t,!hn(t)),$O=t=>_O(t,hn(t));function FO(t,e){return fr(t,n=>n.empty?t.moveByGroup(n,e):gd(n,e))}const wpe=t=>FO(t,!hn(t)),Cpe=t=>FO(t,hn(t));function Spe(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function md(t,e,n){let r=Zt(t).resolveInner(e.head),i=n?Fe.closedBy:Fe.openedBy;for(let l=e.head;;){let u=n?r.childAfter(l):r.childBefore(l);if(!u)break;Spe(t,u,i)?r=u:l=n?u.to:u.from}let o=r.type.prop(i),s,a;return o&&(s=n?Fr(t,r.from,1):Fr(t,r.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?r.to:r.from,L.cursor(a,n?-1:1)}const kpe=t=>fr(t,e=>md(t.state,e,!hn(t))),Tpe=t=>fr(t,e=>md(t.state,e,hn(t)));function LO(t,e){return fr(t,n=>{if(!n.empty)return gd(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const RO=t=>LO(t,!1),BO=t=>LO(t,!0);function NO(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(oe.scrollMargins)){let s=o(t);s!=null&&s.top&&(n=Math.max(s==null?void 0:s.top,n)),s!=null&&s.bottom&&(r=Math.max(s==null?void 0:s.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function jO(t,e){let n=NO(t),{state:r}=t,i=va(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):gd(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;s&&s.top>l&&s.bottom<u&&(o=oe.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-l}))}return t.dispatch(Rr(r,i),{effects:o}),!0}const VO=t=>jO(t,!1),kv=t=>jO(t,!0);function qi(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=L.cursor(r.from+o))}return i}const Epe=t=>fr(t,e=>qi(t,e,!0)),Ope=t=>fr(t,e=>qi(t,e,!1)),Mpe=t=>fr(t,e=>qi(t,e,!hn(t))),Ape=t=>fr(t,e=>qi(t,e,hn(t))),Ppe=t=>fr(t,e=>L.cursor(t.lineBlockAt(e.head).from,1)),Dpe=t=>fr(t,e=>L.cursor(t.lineBlockAt(e.head).to,-1));function _pe(t,e,n){let r=!1,i=va(t.selection,o=>{let s=Fr(t,o.head,-1)||Fr(t,o.head,1)||o.head>0&&Fr(t,o.head-1,1)||o.head<t.doc.length&&Fr(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return n?L.range(o.anchor,a):L.cursor(a)});return r?(e(Rr(t,i)),!0):!1}const Ipe=({state:t,dispatch:e})=>_pe(t,e,!1);function er(t,e){let n=va(t.state.selection,r=>{let i=e(r);return L.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Rr(t.state,n)),!0)}function zO(t,e){return er(t,n=>t.moveByChar(n,e))}const WO=t=>zO(t,!hn(t)),HO=t=>zO(t,hn(t));function qO(t,e){return er(t,n=>t.moveByGroup(n,e))}const $pe=t=>qO(t,!hn(t)),Fpe=t=>qO(t,hn(t)),Lpe=t=>er(t,e=>md(t.state,e,!hn(t))),Rpe=t=>er(t,e=>md(t.state,e,hn(t)));function UO(t,e){return er(t,n=>t.moveVertically(n,e))}const YO=t=>UO(t,!1),GO=t=>UO(t,!0);function KO(t,e){return er(t,n=>t.moveVertically(n,e,NO(t).height))}const XO=t=>KO(t,!1),ZO=t=>KO(t,!0),Bpe=t=>er(t,e=>qi(t,e,!0)),Npe=t=>er(t,e=>qi(t,e,!1)),jpe=t=>er(t,e=>qi(t,e,!hn(t))),Vpe=t=>er(t,e=>qi(t,e,hn(t))),zpe=t=>er(t,e=>L.cursor(t.lineBlockAt(e.head).from)),Wpe=t=>er(t,e=>L.cursor(t.lineBlockAt(e.head).to)),QO=({state:t,dispatch:e})=>(e(Rr(t,{anchor:0})),!0),JO=({state:t,dispatch:e})=>(e(Rr(t,{anchor:t.doc.length})),!0),eM=({state:t,dispatch:e})=>(e(Rr(t,{anchor:t.selection.main.anchor,head:0})),!0),tM=({state:t,dispatch:e})=>(e(Rr(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Hpe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),qpe=({state:t,dispatch:e})=>{let n=yd(t).map(({from:r,to:i})=>L.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:L.create(n),userEvent:"select"})),!0},Upe=({state:t,dispatch:e})=>{let n=va(t.selection,r=>{var i;let o=Zt(t).resolveStack(r.from,1);for(let s=o;s;s=s.next){let{node:a}=s;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&(!((i=a.parent)===null||i===void 0)&&i.parent))return L.range(a.to,a.from)}return r});return e(Rr(t,n)),!0},Ype=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=L.create([n.main]):n.main.empty||(r=L.create([L.cursor(n.main.head)])),r?(e(Rr(t,r)),!0):!1};function Mu(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let l=e(o);l<s?(n="delete.backward",l=vd(t,l,!1)):l>s&&(n="delete.forward",l=vd(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=vd(t,s,!1),a=vd(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:L.cursor(s,s<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?oe.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function vd(t,e,n){if(t instanceof oe)for(let r of t.state.facet(oe.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const nM=(t,e)=>Mu(t,n=>{let r=n.from,{state:i}=t,o=i.doc.lineAt(r),s,a;if(!e&&r>o.from&&r<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,r-o.from))){if(s[s.length-1]==" ")return r-1;let l=oa(s,i.tabSize),u=l%Jf(i)||Jf(i);for(let c=0;c<u&&s[s.length-1-c]==" ";c++)r--;a=r}else a=an(o.text,r-o.from,e,e)+o.from,a==r&&o.number!=(e?i.doc.lines:1)&&(a+=e?1:-1);return a}),Tv=t=>nM(t,!1),rM=t=>nM(t,!0),iM=(t,e)=>Mu(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let a=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=an(o.text,r-o.from,e)+o.from,u=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),c=s(u);if(a!=null&&c!=a)break;(u!=" "||r!=n.head)&&(a=c),r=l}return r}),oM=t=>iM(t,!1),Gpe=t=>iM(t,!0),Kpe=t=>Mu(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Xpe=t=>Mu(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Zpe=t=>Mu(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Qpe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ge.of(["",""])},range:L.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Jpe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),s=i==o.from?i-1:an(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:an(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(s,i))},range:L.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function yd(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function sM(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of yd(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),a=s.length+1;if(n){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let l of o.ranges)i.push(L.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let l of o.ranges)i.push(L.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:L.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const e0e=({state:t,dispatch:e})=>sM(t,e,!1),t0e=({state:t,dispatch:e})=>sM(t,e,!0);function aM(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of yd(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const n0e=({state:t,dispatch:e})=>aM(t,e,!1),r0e=({state:t,dispatch:e})=>aM(t,e,!0),i0e=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(yd(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=va(e.selection,i=>t.moveVertically(i,!0)).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function o0e(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Zt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(Fe.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const s0e=lM(!1),a0e=lM(!0);function lM(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,a=e.doc.lineAt(o),l=!t&&o==s&&o0e(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let u=new ed(e,{simulateBreak:o,simulateDoubleBreak:!!l}),c=K1(u,o);for(c==null&&(c=oa(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;l?{from:o,to:s}=l:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let h=["",xu(e,c)];return l&&h.push(xu(e,u.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:Ge.of(h)},range:L.cursor(o+1+h[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Ev(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let a=t.doc.lineAt(s);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),s=a.to+1}let o=t.changes(i);return{changes:i,range:L.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const l0e=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new ed(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=Ev(t,(o,s,a)=>{let l=K1(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let u=/^\s*/.exec(o.text)[0],c=xu(t,l);(u!=c||a.from<o.from+u.length)&&(n[o.from]=l,s.push({from:o.from,to:o.from+u.length,insert:c}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},uM=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Ev(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Qf)})}),{userEvent:"input.indent"})),!0),cM=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Ev(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=oa(i,t.tabSize),s=0,a=xu(t,Math.max(0,o-Jf(t)));for(;s<i.length&&s<a.length&&i.charCodeAt(s)==a.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),u0e=[{key:"Ctrl-b",run:IO,shift:WO,preventDefault:!0},{key:"Ctrl-f",run:$O,shift:HO},{key:"Ctrl-p",run:RO,shift:YO},{key:"Ctrl-n",run:BO,shift:GO},{key:"Ctrl-a",run:Ppe,shift:zpe},{key:"Ctrl-e",run:Dpe,shift:Wpe},{key:"Ctrl-d",run:rM},{key:"Ctrl-h",run:Tv},{key:"Ctrl-k",run:Kpe},{key:"Ctrl-Alt-h",run:oM},{key:"Ctrl-o",run:Qpe},{key:"Ctrl-t",run:Jpe},{key:"Ctrl-v",run:kv}],c0e=[{key:"ArrowLeft",run:IO,shift:WO,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:wpe,shift:$pe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Mpe,shift:jpe,preventDefault:!0},{key:"ArrowRight",run:$O,shift:HO,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Cpe,shift:Fpe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Ape,shift:Vpe,preventDefault:!0},{key:"ArrowUp",run:RO,shift:YO,preventDefault:!0},{mac:"Cmd-ArrowUp",run:QO,shift:eM},{mac:"Ctrl-ArrowUp",run:VO,shift:XO},{key:"ArrowDown",run:BO,shift:GO,preventDefault:!0},{mac:"Cmd-ArrowDown",run:JO,shift:tM},{mac:"Ctrl-ArrowDown",run:kv,shift:ZO},{key:"PageUp",run:VO,shift:XO},{key:"PageDown",run:kv,shift:ZO},{key:"Home",run:Ope,shift:Npe,preventDefault:!0},{key:"Mod-Home",run:QO,shift:eM},{key:"End",run:Epe,shift:Bpe,preventDefault:!0},{key:"Mod-End",run:JO,shift:tM},{key:"Enter",run:s0e},{key:"Mod-a",run:Hpe},{key:"Backspace",run:Tv,shift:Tv},{key:"Delete",run:rM},{key:"Mod-Backspace",mac:"Alt-Backspace",run:oM},{key:"Mod-Delete",mac:"Alt-Delete",run:Gpe},{mac:"Mod-Backspace",run:Xpe},{mac:"Mod-Delete",run:Zpe}].concat(u0e.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),h0e=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:kpe,shift:Lpe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Tpe,shift:Rpe},{key:"Alt-ArrowUp",run:e0e},{key:"Shift-Alt-ArrowUp",run:n0e},{key:"Alt-ArrowDown",run:t0e},{key:"Shift-Alt-ArrowDown",run:r0e},{key:"Escape",run:Ype},{key:"Mod-Enter",run:a0e},{key:"Alt-l",mac:"Ctrl-l",run:qpe},{key:"Mod-i",run:Upe,preventDefault:!0},{key:"Mod-[",run:cM},{key:"Mod-]",run:uM},{key:"Mod-Alt-\\",run:l0e},{key:"Shift-Mod-k",run:i0e},{key:"Shift-Mod-\\",run:Ipe},{key:"Mod-/",run:tpe},{key:"Alt-A",run:rpe}].concat(c0e),f0e={key:"Tab",run:uM,shift:cM};function ft(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)hM(t,arguments[e]);return t}function hM(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)hM(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const fM=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ya{constructor(e,n,r=0,i=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?a=>o(fM(a)):fM,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Jt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Wm(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Xn(e);let i=this.normalize(n);for(let o=0,s=r;;o++){let a=i.charCodeAt(o),l=this.match(a,s);if(o==i.length-1){if(l)return this.value=l,this;break}s==r&&o<n.length&&n.charCodeAt(o)==a&&s++}}}match(e,n){let r=null;for(let i=0;i<this.matches.length;i+=2){let o=this.matches[i],s=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[i+1],to:n+1}:(this.matches[i]++,s=!0)),s||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:n,to:n+1}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}typeof Symbol<"u"&&(ya.prototype[Symbol.iterator]=function(){return this});const dM={from:-1,to:-1,match:/.*/.exec("")},Ov="gm"+(/x/.unicode==null?"":"u");class pM{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=dM,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new gM(e,n,r,i,o);this.re=new RegExp(n,Ov+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=bd(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=bd(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Mv=new WeakMap;class ba{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=Mv.get(e);if(!i||i.from>=r||i.to<=n){let a=new ba(n,e.sliceString(n,r));return Mv.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),Mv.set(e,new ba(s,o)),new ba(n,o.slice(n-s,r-s))}}class gM{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=dM,this.matchPos=bd(e,i),this.re=new RegExp(n,Ov+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=ba.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=bd(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ba.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(pM.prototype[Symbol.iterator]=gM.prototype[Symbol.iterator]=function(){return this});function d0e(t){try{return new RegExp(t,Ov),!0}catch{return!1}}function bd(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function Av(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=ft("input",{class:"cm-textfield",name:"line",value:e}),r=ft("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:xd.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},ft("label",t.state.phrase("Go to line"),": ",n)," ",ft("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,l,u,c,h]=o,f=c?+c.slice(1):0,d=u?+u:a.number;if(u&&h){let m=d/100;l&&(m=m*(l=="-"?-1:1)+a.number/s.doc.lines),d=Math.round(s.doc.lines*m)}else u&&l&&(d=d*(l=="-"?-1:1)+a.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,d))),g=L.cursor(p.from+Math.max(0,Math.min(f,p.length)));t.dispatch({effects:[xd.of(!1),oe.scrollIntoView(g.from,{y:"center"})],selection:g}),t.focus()}return{dom:r}}const xd=De.define(),mM=en.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(xd)&&(t=n.value);return t},provide:t=>mu.from(t,e=>e?Av:null)}),p0e=t=>{let e=gu(t,Av);if(!e){let n=[xd.of(!0)];t.state.field(mM,!1)==null&&n.push(De.appendConfig.of([mM,g0e])),t.dispatch({effects:n}),e=gu(t,Av)}return e&&e.dom.querySelector("input").select(),!0},g0e=oe.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),m0e={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},vM=he.define({combine(t){return Mr(t,m0e,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function v0e(t){let e=[C0e,w0e];return t&&e.push(vM.of(t)),e}const y0e=ke.mark({class:"cm-selectionMatch"}),b0e=ke.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yM(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=wt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=wt.Word)}function x0e(t,e,n,r){return t(e.sliceDoc(n,n+1))==wt.Word&&t(e.sliceDoc(r-1,r))==wt.Word}const w0e=Bt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(vM),{state:n}=t,r=n.selection;if(r.ranges.length>1)return ke.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return ke.none;let l=n.wordAt(i.head);if(!l)return ke.none;s=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return ke.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(yM(s,n,i.from,i.to)&&x0e(s,n,i.from,i.to)))return ke.none}else if(o=n.sliceDoc(i.from,i.to).trim(),!o)return ke.none}let a=[];for(let l of t.visibleRanges){let u=new ya(n.doc,o,l.from,l.to);for(;!u.next().done;){let{from:c,to:h}=u.value;if((!s||yM(s,n,c,h))&&(i.empty&&c<=i.from&&h>=i.to?a.push(b0e.range(c,h)):(c>=i.to||h<=i.from)&&a.push(y0e.range(c,h)),a.length>e.maxMatches))return ke.none}}return ke.set(a)}},{decorations:t=>t.decorations}),C0e=oe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),S0e=({state:t,dispatch:e})=>{let{selection:n}=t,r=L.create(n.ranges.map(i=>t.wordAt(i.head)||L.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function k0e(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,a=new ya(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new ya(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.some(l=>l.from==a.value.from))continue;if(o){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const T0e=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return S0e({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=k0e(t,r);return i?(e(t.update({selection:t.selection.addRange(L.range(i.from,i.to),!1),effects:oe.scrollIntoView(i.to)})),!0):!1},xa=he.define({combine(t){return Mr(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new R0e(e),scrollToMatch:e=>oe.scrollIntoView(e)})}});class bM{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||d0e(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
267
+ `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new A0e(this):new O0e(this)}getCursor(e,n=0,r){let i=e.doc?e:je.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Ca(this,i,n,r):wa(this,i,n,r)}}class xM{constructor(e){this.spec=e}}function wa(t,e,n,r){return new ya(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?E0e(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function E0e(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(wd(i,n-o))!=wt.Word||e(Cd(i,n-o))!=wt.Word)&&(e(Cd(i,r-o))!=wt.Word||e(wd(i,r-o))!=wt.Word))}class O0e extends xM{constructor(e){super(e)}nextMatch(e,n,r){let i=wa(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=wa(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=wa(this.spec,e,o,i),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=wa(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=wa(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function Ca(t,e,n,r){return new pM(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?M0e(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function wd(t,e){return t.slice(an(t,e,!1),e)}function Cd(t,e){return t.slice(e,an(t,e))}function M0e(t){return(e,n,r)=>!r[0].length||(t(wd(r.input,r.index))!=wt.Word||t(Cd(r.input,r.index))!=wt.Word)&&(t(Cd(r.input,r.index+r[0].length))!=wt.Word||t(wd(r.input,r.index+r[0].length))!=wt.Word)}class A0e extends xM{nextMatch(e,n,r){let i=Ca(this.spec,e,r,e.doc.length).next();return i.done&&(i=Ca(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=Ca(this.spec,e,o,r),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==n||a.from>o+10))return a;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n))}matchAll(e,n){let r=Ca(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Ca(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const Au=De.define(),Pv=De.define(),Ui=en.define({create(t){return new Dv(Iv(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Au)?t=new Dv(n.value.create(),t.panel):n.is(Pv)&&(t=new Dv(t.query,n.value?_v:null));return t},provide:t=>mu.from(t,e=>e.panel)});class Dv{constructor(e,n){this.query=e,this.panel=n}}const P0e=ke.mark({class:"cm-searchMatch"}),D0e=ke.mark({class:"cm-searchMatch cm-searchMatch-selected"}),_0e=Bt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ui))}update(t){let e=t.state.field(Ui);(e!=t.startState.field(Ui)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ke.none;let{view:n}=this,r=new Ii;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:a,to:l}=o[i];for(;i<s-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,a,l,(u,c)=>{let h=n.state.selection.ranges.some(f=>f.from==u&&f.to==c);r.add(u,c,h?D0e:P0e)})}return r.finish()}},{decorations:t=>t.decorations});function Pu(t){return e=>{let n=e.state.field(Ui,!1);return n&&n.query.spec.valid?t(e,n):kM(e)}}const Sd=Pu((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=L.single(r.from,r.to),o=t.state.facet(xa);return t.dispatch({selection:i,effects:[$v(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),SM(t),!0}),kd=Pu((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=L.single(i.from,i.to),s=t.state.facet(xa);return t.dispatch({selection:o,effects:[$v(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),SM(t),!0}),I0e=Pu((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:L.create(n.map(r=>L.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),$0e=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let a=new ya(t.doc,t.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(s=o.length),o.push(L.range(a.value.from,a.value.to))}return e(t.update({selection:L.create(o,s),userEvent:"select.search.matches"})),!0},wM=Pu((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=[],a,l,u=[];if(o.from==r&&o.to==i&&(l=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),u.push(oe.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let c=s.length==0||s[0].from>=o.to?0:o.to-o.from-l.length;a=L.single(o.from-c,o.to-c),u.push($v(t,o)),u.push(n.facet(xa).scrollToMatch(a.main,t))}return t.dispatch({changes:s,selection:a,effects:u,userEvent:"input.replace"}),!0}),F0e=Pu((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:oe.announce.of(r),userEvent:"input.replace.all"}),!0});function _v(t){return t.state.facet(xa).createPanel(t)}function Iv(t,e){var n,r,i,o,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(xa);return new bM({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:u.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:u.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:u.wholeWord})}function CM(t){let e=gu(t,_v);return e&&e.dom.querySelector("[main-field]")}function SM(t){let e=CM(t);e&&e==t.root.activeElement&&e.select()}const kM=t=>{let e=t.state.field(Ui,!1);if(e&&e.panel){let n=CM(t);if(n&&n!=t.root.activeElement){let r=Iv(t.state,e.query.spec);r.valid&&t.dispatch({effects:Au.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[Pv.of(!0),e?Au.of(Iv(t.state,e.query.spec)):De.appendConfig.of(N0e)]});return!0},TM=t=>{let e=t.state.field(Ui,!1);if(!e||!e.panel)return!1;let n=gu(t,_v);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Pv.of(!1)}),!0},L0e=[{key:"Mod-f",run:kM,scope:"editor search-panel"},{key:"F3",run:Sd,shift:kd,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Sd,shift:kd,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:TM,scope:"editor search-panel"},{key:"Mod-Shift-l",run:$0e},{key:"Alt-g",run:p0e},{key:"Mod-d",run:T0e,preventDefault:!0}];class R0e{constructor(e){this.view=e;let n=this.query=e.state.field(Ui).query.spec;this.commit=this.commit.bind(this),this.searchField=ft("input",{value:n.search,placeholder:zn(e,"Find"),"aria-label":zn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ft("input",{value:n.replace,placeholder:zn(e,"Replace"),"aria-label":zn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ft("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=ft("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=ft("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return ft("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=ft("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Sd(e),[zn(e,"next")]),r("prev",()=>kd(e),[zn(e,"previous")]),r("select",()=>I0e(e),[zn(e,"all")]),ft("label",null,[this.caseField,zn(e,"match case")]),ft("label",null,[this.reField,zn(e,"regexp")]),ft("label",null,[this.wordField,zn(e,"by word")]),...e.state.readOnly?[]:[ft("br"),this.replaceField,r("replace",()=>wM(e),[zn(e,"replace")]),r("replaceAll",()=>F0e(e),[zn(e,"replace all")])],ft("button",{name:"close",onclick:()=>TM(e),"aria-label":zn(e,"close"),type:"button"},["×"])])}commit(){let e=new bM({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Au.of(e)}))}keydown(e){Tce(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?kd:Sd)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),wM(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Au)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(xa).top}}function zn(t,e){return t.state.phrase(e)}const Td=30,Ed=/[\s\.,:;?!]/;function $v(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-Td),s=Math.min(i,n+Td),a=t.state.sliceDoc(o,s);if(o!=r.from){for(let l=0;l<Td;l++)if(!Ed.test(a[l+1])&&Ed.test(a[l])){a=a.slice(l);break}}if(s!=i){for(let l=a.length-1;l>a.length-Td;l--)if(!Ed.test(a[l-1])&&Ed.test(a[l])){a=a.slice(0,l);break}}return oe.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const B0e=oe.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),N0e=[Ui,ra.low(_0e),B0e];class j0e{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Bo{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(AM).markerFilter;o&&(i=o(i));let s=ke.set(i.map(a=>a.from==a.to||a.from==a.to-1&&r.doc.lineAt(a.from).to==a.from?ke.widget({widget:new G0e(a),diagnostic:a}).range(a.from):ke.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity+(a.markClass?" "+a.markClass:"")},diagnostic:a}).range(a.from,a.to)),!0);return new Bo(s,n,Sa(s))}}function Sa(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new j0e(i,o,s.diagnostic),!1}),r}function V0e(t,e){let n=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(r=>r.is(EM))||t.changes.touchesRange(n.from,n.to))}function z0e(t,e){return t.field(Wn,!1)?e:e.concat(De.appendConfig.of(Z0e))}const EM=De.define(),Fv=De.define(),OM=De.define(),Wn=en.define({create(){return new Bo(ke.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),r=null;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=Sa(n,t.selected.diagnostic,i)||Sa(n,null,i)}t=new Bo(n,t.panel,r)}for(let n of e.effects)n.is(EM)?t=Bo.init(n.value,t.panel,e.state):n.is(Fv)?t=new Bo(t.diagnostics,n.value?Od.open:null,t.selected):n.is(OM)&&(t=new Bo(t.diagnostics,t.panel,n.value));return t},provide:t=>[mu.from(t,e=>e.panel),oe.decorations.from(t,e=>e.diagnostics)]}),W0e=ke.mark({class:"cm-lintRange cm-lintRange-active"});function H0e(t,e,n){let{diagnostics:r}=t.state.field(Wn),i=[],o=2e8,s=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(e<u||n<0))&&(i.push(c.diagnostic),o=Math.min(l,o),s=Math.max(u,s))});let a=t.state.facet(AM).tooltipFilter;return a&&(i=a(i)),i.length?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:q0e(t,i)}}}:null}function q0e(t,e){return ft("ul",{class:"cm-tooltip-lint"},e.map(n=>DM(t,n,!1)))}const U0e=t=>{let e=t.state.field(Wn,!1);(!e||!e.panel)&&t.dispatch({effects:z0e(t.state,[Fv.of(!0)])});let n=gu(t,Od.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},MM=t=>{let e=t.state.field(Wn,!1);return!e||!e.panel?!1:(t.dispatch({effects:Fv.of(!1)}),!0)},Y0e=[{key:"Mod-Shift-m",run:U0e,preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Wn,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],AM=he.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},Mr(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function PM(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function DM(t,e,n){var r;let i=n?PM(e.actions):[];return ft("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ft("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let a=!1,l=f=>{if(f.preventDefault(),a)return;a=!0;let d=Sa(t.state.field(Wn).diagnostics,e);d&&o.apply(t,d.from,d.to)},{name:u}=o,c=i[s]?u.indexOf(i[s]):-1,h=c<0?u:[u.slice(0,c),ft("u",u.slice(c,c+1)),u.slice(c+1)];return ft("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[s]})"`}.`},h)}),e.source&&ft("div",{class:"cm-diagnosticSource"},e.source))}class G0e extends ri{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return ft("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class _M{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=DM(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Od{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)MM(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=PM(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==i.keyCode){let l=Sa(this.view.state.field(Wn).diagnostics,o);l&&o.actions[a].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=ft("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=ft("div",{class:"cm-panel-lint"},this.list,ft("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>MM(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Wn).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Wn),r=0,i=!1,o=null;for(e.between(0,this.view.state.doc.length,(s,a,{spec:l})=>{let u=-1,c;for(let h=r;h<this.items.length;h++)if(this.items[h].diagnostic==l.diagnostic){u=h;break}u<0?(c=new _M(this.view,l.diagnostic),this.items.splice(r,0,c),i=!0):(c=this.items[u],u>r&&(this.items.splice(r,u-r),i=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),o=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),r++});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new _M(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:a})=>{let l=a.height/this.list.offsetHeight;s.top<a.top?this.list.scrollTop-=(a.top-s.top)/l:s.bottom>a.bottom&&(this.list.scrollTop+=(s.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Wn),r=Sa(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:OM.of(r)})}static open(e){return new Od(e)}}function K0e(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function Md(t){return K0e(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const X0e=oe.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Md("#d11")},".cm-lintRange-warning":{backgroundImage:Md("orange")},".cm-lintRange-info":{backgroundImage:Md("#999")},".cm-lintRange-hint":{backgroundImage:Md("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Z0e=[Wn,oe.decorations.compute([Wn],t=>{let{selected:e,panel:n}=t.field(Wn);return!e||!n||e.from==e.to?ke.none:ke.set([W0e.range(e.from,e.to)])}),fhe(H0e,{hideOn:V0e}),X0e];var IM=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(sde)),e.defaultKeymap!==!1&&(r=r.concat(h0e)),e.searchKeymap!==!1&&(r=r.concat(L0e)),e.historyKeymap!==!1&&(r=r.concat(xpe)),e.foldKeymap!==!1&&(r=r.concat(tfe)),e.completionKeymap!==!1&&(r=r.concat(hO)),e.lintKeymap!==!1&&(r=r.concat(Y0e));var i=[];return e.lineNumbers!==!1&&i.push(whe()),e.highlightActiveLineGutter!==!1&&i.push(khe()),e.highlightSpecialChars!==!1&&i.push(zce()),e.history!==!1&&i.push(hpe()),e.foldGutter!==!1&&i.push(ofe()),e.drawSelection!==!1&&i.push(Dce()),e.dropCursor!==!1&&i.push(Lce()),e.allowMultipleSelections!==!1&&i.push(je.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(Ghe()),e.syntaxHighlighting!==!1&&i.push(FE(ufe,{fallback:!0})),e.bracketMatching!==!1&&i.push(gfe()),e.closeBrackets!==!1&&i.push(rde()),e.autocompletion!==!1&&i.push(dde()),e.rectangularSelection!==!1&&i.push(nhe()),n!==!1&&i.push(ohe()),e.highlightActiveLine!==!1&&i.push(Gce()),e.highlightSelectionMatches!==!1&&i.push(v0e()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Qf.of(" ".repeat(e.tabSize))),i.concat([Nf.of(r.flat())]).filter(Boolean)};const Q0e="#e5c07b",$M="#e06c75",J0e="#56b6c2",ege="#ffffff",Ad="#abb2bf",Lv="#7d8799",tge="#61afef",nge="#98c379",FM="#d19a66",rge="#c678dd",ige="#21252b",LM="#2c313a",RM="#282c34",Rv="#353a42",oge="#3E4451",BM="#528bff",sge=oe.theme({"&":{color:Ad,backgroundColor:RM},".cm-content":{caretColor:BM},".cm-cursor, .cm-dropCursor":{borderLeftColor:BM},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:oge},".cm-panels":{backgroundColor:ige,color:Ad},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:RM,color:Lv,border:"none"},".cm-activeLineGutter":{backgroundColor:LM},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Rv},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Rv,borderBottomColor:Rv},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:LM,color:Ad}}},{dark:!0}),age=Cu.define([{tag:I.keyword,color:rge},{tag:[I.name,I.deleted,I.character,I.propertyName,I.macroName],color:$M},{tag:[I.function(I.variableName),I.labelName],color:tge},{tag:[I.color,I.constant(I.name),I.standard(I.name)],color:FM},{tag:[I.definition(I.name),I.separator],color:Ad},{tag:[I.typeName,I.className,I.number,I.changed,I.annotation,I.modifier,I.self,I.namespace],color:Q0e},{tag:[I.operator,I.operatorKeyword,I.url,I.escape,I.regexp,I.link,I.special(I.string)],color:J0e},{tag:[I.meta,I.comment],color:Lv},{tag:I.strong,fontWeight:"bold"},{tag:I.emphasis,fontStyle:"italic"},{tag:I.strikethrough,textDecoration:"line-through"},{tag:I.link,color:Lv,textDecoration:"underline"},{tag:I.heading,fontWeight:"bold",color:$M},{tag:[I.atom,I.bool,I.special(I.variableName)],color:FM},{tag:[I.processingInstruction,I.string,I.inserted],color:nge},{tag:I.invalid,color:ege}]),lge=[sge,FE(age)];var uge=oe.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),cge=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:s="",basicSetup:a=!0}=e,l=[];switch(n&&l.unshift(Nf.of([f0e])),a&&(typeof a=="boolean"?l.unshift(IM()):l.unshift(IM(a))),s&&l.unshift(Qce(s)),o){case"light":l.push(uge);break;case"dark":l.push(lge);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(oe.editable.of(!1)),i&&l.push(je.readOnly.of(!0)),[...l]},hge=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),NM=Or.define(),fge=[];function dge(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:a=fge,autoFocus:l,theme:u="light",height:c=null,minHeight:h=null,maxHeight:f=null,width:d=null,minWidth:p=null,maxWidth:g=null,placeholder:m="",editable:b=!0,readOnly:x=!1,indentWithTab:C=!0,basicSetup:k=!0,root:w,initialState:T}=t,[S,M]=v.useState(),[P,D]=v.useState(),[R,H]=v.useState(),W=oe.theme({"&":{height:c,minHeight:h,maxHeight:f,width:d,minWidth:p,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),B=oe.updateListener.of(V=>{if(V.docChanged&&typeof r=="function"&&!V.transactions.some(_=>_.annotation(NM))){var me=V.state.doc,re=me.toString();r(re,V)}i&&i(hge(V))}),j=cge({theme:u,editable:b,readOnly:x,placeholder:m,indentWithTab:C,basicSetup:k}),N=[B,W,...j];return s&&typeof s=="function"&&N.push(oe.updateListener.of(s)),N=N.concat(a),v.useEffect(()=>{if(S&&!R){var V={doc:e,selection:n,extensions:N},me=T?je.fromJSON(T.json,V,T.fields):je.create(V);if(H(me),!P){var re=new oe({state:me,parent:S,root:w});D(re),o&&o(re,me)}}return()=>{P&&(H(void 0),D(void 0))}},[S,R]),v.useEffect(()=>M(t.container),[t.container]),v.useEffect(()=>()=>{P&&(P.destroy(),D(void 0))},[P]),v.useEffect(()=>{l&&P&&P.focus()},[l,P]),v.useEffect(()=>{P&&P.dispatch({effects:De.reconfigure.of(N)})},[u,a,c,h,f,d,p,g,m,b,x,C,k,r,s]),v.useEffect(()=>{if(e!==void 0){var V=P?P.state.doc.toString():"";P&&e!==V&&P.dispatch({changes:{from:0,to:V.length,insert:e||""},annotations:[NM.of(!0)]})}},[e,P]),{state:R,setState:H,view:P,setView:D,container:S,setContainer:M}}var pge=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],jM=v.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:u,autoFocus:c,theme:h="light",height:f,minHeight:d,maxHeight:p,width:g,minWidth:m,maxWidth:b,basicSetup:x,placeholder:C,indentWithTab:k,editable:w,readOnly:T,root:S,initialState:M}=t,P=epe(t,pge),D=v.useRef(null),{state:R,view:H,container:W}=dge({container:D.current,root:S,value:r,autoFocus:c,theme:h,height:f,minHeight:d,maxHeight:p,width:g,minWidth:m,maxWidth:b,basicSetup:x,placeholder:C,indentWithTab:k,editable:w,readOnly:T,selection:i,onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:u,extensions:o,initialState:M});if(v.useImperativeHandle(e,()=>({editor:D.current,state:R,view:H}),[D,W,R,H]),typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var B=typeof h=="string"?"cm-theme-"+h:"cm-theme";return y.jsx("div",yv({ref:D,className:""+B+(n?" "+n:"")},P))});jM.displayName="CodeMirror";const gge=O.styled(O.Stack,{shouldForwardProp:t=>t!=="error"})(({theme:t,error:e})=>({width:"100%",borderRadius:8,overflow:"hidden","& .cm-theme-light":{border:`solid 1px ${O.alpha(t.palette.grey[500],.32)}`,padding:t.spacing(2),borderRadius:8,...e&&{borderColor:t.palette.error.main},"&:hover":{borderColor:t.palette.text.primary}},"& .cm-focused":{outline:"none"},"& .cm-scroller":{fontFamily:"inherit",lineHeight:"22px",fontSize:12}})),VM=({sx:t,error:e,helperText:n,...r})=>y.jsxs(gge,{sx:t,error:e,children:[y.jsx(jM,{extensions:[Jde()],minHeight:"200px",basicSetup:{foldGutter:!1,lineNumbers:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1},...r}),n&&y.jsx(O.FormHelperText,{error:e,sx:{px:2},children:n})]}),mge=({onSearch:t,onChange:e,trigger:n="click",iconPosition:r="end",tabIndex:i,...o})=>{const s=v.useRef(null),a=y.jsx(O.InputAdornment,{position:r,children:y.jsx(O.IconButton,{color:"inherit",onClick:()=>{var l;t((l=s.current)==null?void 0:l.value)},children:y.jsx(bt,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return y.jsx(O.TextField,{inputRef:s,InputProps:{onKeyDown:l=>{var u;l.key==="Enter"&&t((u=s.current)==null?void 0:u.value)},...r==="start"?{startAdornment:a}:{endAdornment:a}},inputProps:{tabIndex:i,...o.inputProps},onChange:l=>{if(n==="change"){t(l.target.value);return}l.target.value===""&&t(""),e&&e(l)},...o})},vge=O.styled(O.StepConnector)(({theme:t})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:t.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:t.palette.primary.main}}})),yge=({active:t,completed:e})=>y.jsx(O.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...t&&{color:"primary.main"}},children:e?y.jsx(bt,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):y.jsx(O.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),bge=({steps:t,activeStep:e,showLabels:n=!0,sx:r,...i})=>y.jsx(O.Stepper,{alternativeLabel:!0,activeStep:e,connector:y.jsx(vge,{}),sx:r,...i,children:t.map(o=>y.jsx(O.Step,{children:y.jsx(O.StepLabel,{StepIconComponent:yge,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&o})},o))}),xge=({children:t,value:e,index:n,sx:r})=>y.jsx(O.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...e.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...r},children:t});function ka(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(h){s(h)}}function l(c){try{u(r.throw(c))}catch(h){s(h)}}function u(c){c.done?o(c.value):i(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}function Ta(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function zM(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function WM(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var wge=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Du(t,e){var n=Cge(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Cge(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=wge.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var Sge=[".DS_Store","Thumbs.db"];function kge(t){return ka(this,void 0,void 0,function(){return Ta(this,function(e){return Pd(t)&&Tge(t.dataTransfer)?[2,Age(t.dataTransfer,t.type)]:Ege(t)?[2,Oge(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Mge(t)]:[2,[]]})})}function Tge(t){return Pd(t)}function Ege(t){return Pd(t)&&Pd(t.target)}function Pd(t){return typeof t=="object"&&t!==null}function Oge(t){return Bv(t.target.files).map(function(e){return Du(e)})}function Mge(t){return ka(this,void 0,void 0,function(){var e;return Ta(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Du(r)})]}})})}function Age(t,e){return ka(this,void 0,void 0,function(){var n,r;return Ta(this,function(i){switch(i.label){case 0:return t.items?(n=Bv(t.items).filter(function(o){return o.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(Pge))]):[3,2];case 1:return r=i.sent(),[2,HM(qM(r))];case 2:return[2,HM(Bv(t.files).map(function(o){return Du(o)}))]}})})}function HM(t){return t.filter(function(e){return Sge.indexOf(e.name)===-1})}function Bv(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function Pge(t){if(typeof t.webkitGetAsEntry!="function")return UM(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?YM(e):UM(t)}function qM(t){return t.reduce(function(e,n){return WM(WM([],zM(e),!1),zM(Array.isArray(n)?qM(n):[n]),!1)},[])}function UM(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Du(e);return Promise.resolve(n)}function Dge(t){return ka(this,void 0,void 0,function(){return Ta(this,function(e){return[2,t.isDirectory?YM(t):_ge(t)]})})}function YM(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function o(){var s=this;e.readEntries(function(a){return ka(s,void 0,void 0,function(){var l,u,c;return Ta(this,function(h){switch(h.label){case 0:if(a.length)return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=h.sent(),n(l),[3,4];case 3:return u=h.sent(),r(u),[3,4];case 4:return[3,6];case 5:c=Promise.all(a.map(Dge)),i.push(c),o(),h.label=6;case 6:return[2]}})})},function(a){r(a)})}o()})}function _ge(t){return ka(this,void 0,void 0,function(){return Ta(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var o=Du(i,t.fullPath);n(o)},function(i){r(i)})})]})})}var Ige=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=(t.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?o===a.replace(/\/.*$/,""):i===a})}return!0};function GM(t){return Lge(t)||Fge(t)||QM(t)||$ge()}function $ge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
268
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fge(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Lge(t){if(Array.isArray(t))return Nv(t)}function KM(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function XM(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?KM(Object(n),!0).forEach(function(r){ZM(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):KM(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ZM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _u(t,e){return Nge(t)||Bge(t,e)||QM(t,e)||Rge()}function Rge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
269
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QM(t,e){if(t){if(typeof t=="string")return Nv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nv(t,e)}}function Nv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bge(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function Nge(t){if(Array.isArray(t))return t}var jge="file-invalid-type",Vge="file-too-large",zge="file-too-small",Wge="too-many-files",Hge=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:jge,message:"File type must be ".concat(n)}},JM=function(e){return{code:Vge,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},e6=function(e){return{code:zge,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},qge={code:Wge,message:"Too many files"};function t6(t,e){var n=t.type==="application/x-moz-file"||Ige(t,e);return[n,n?null:Hge(e)]}function n6(t,e,n){if(No(t.size))if(No(e)&&No(n)){if(t.size>n)return[!1,JM(n)];if(t.size<e)return[!1,e6(e)]}else{if(No(e)&&t.size<e)return[!1,e6(e)];if(No(n)&&t.size>n)return[!1,JM(n)]}return[!0,null]}function No(t){return t!=null}function Uge(t){var e=t.files,n=t.accept,r=t.minSize,i=t.maxSize,o=t.multiple,s=t.maxFiles,a=t.validator;return!o&&e.length>1||o&&s>=1&&e.length>s?!1:e.every(function(l){var u=t6(l,n),c=_u(u,1),h=c[0],f=n6(l,r,i),d=_u(f,1),p=d[0],g=a?a(l):null;return h&&p&&!g})}function Dd(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function _d(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function r6(t){t.preventDefault()}function Yge(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function Gge(t){return t.indexOf("Edge/")!==-1}function Kge(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Yge(t)||Gge(t)}function Br(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return e.some(function(a){return!Dd(r)&&a&&a.apply(void 0,[r].concat(o)),Dd(r)})}}function Xge(){return"showOpenFilePicker"in window}function Zge(t){if(No(t)){var e=Object.entries(t).filter(function(n){var r=_u(n,2),i=r[0],o=r[1],s=!0;return i6(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(o)||!o.every(o6))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var i=_u(r,2),o=i[0],s=i[1];return XM(XM({},n),{},ZM({},o,s))},{});return[{description:"Files",accept:e}]}return t}function Qge(t){if(No(t))return Object.entries(t).reduce(function(e,n){var r=_u(n,2),i=r[0],o=r[1];return[].concat(GM(e),[i],GM(o))},[]).filter(function(e){return i6(e)||o6(e)}).join(",")}function Jge(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function eme(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function i6(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function o6(t){return/^.*\.[\w]+$/.test(t)}var tme=["children"],nme=["open"],rme=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ime=["refKey","onChange","onClick"];function ome(t){return lme(t)||ame(t)||s6(t)||sme()}function sme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
270
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ame(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function lme(t){if(Array.isArray(t))return Vv(t)}function jv(t,e){return hme(t)||cme(t,e)||s6(t,e)||ume()}function ume(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
271
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s6(t,e){if(t){if(typeof t=="string")return Vv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vv(t,e)}}function Vv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cme(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function hme(t){if(Array.isArray(t))return t}function a6(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Tt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?a6(Object(n),!0).forEach(function(r){zv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a6(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Id(t,e){if(t==null)return{};var n=fme(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function fme(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Wv=v.forwardRef(function(t,e){var n=t.children,r=Id(t,tme),i=$d(r),o=i.open,s=Id(i,nme);return v.useImperativeHandle(e,function(){return{open:o}},[o]),v.createElement(v.Fragment,null,n(Tt(Tt({},s),{},{open:o})))});Wv.displayName="Dropzone";var l6={disabled:!1,getFilesFromEvent:kge,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Wv.defaultProps=l6,Wv.propTypes={children:A.func,accept:A.objectOf(A.arrayOf(A.string)),multiple:A.bool,preventDropOnDocument:A.bool,noClick:A.bool,noKeyboard:A.bool,noDrag:A.bool,noDragEventsBubbling:A.bool,minSize:A.number,maxSize:A.number,maxFiles:A.number,disabled:A.bool,getFilesFromEvent:A.func,onFileDialogCancel:A.func,onFileDialogOpen:A.func,useFsAccessApi:A.bool,autoFocus:A.bool,onDragEnter:A.func,onDragLeave:A.func,onDragOver:A.func,onDrop:A.func,onDropAccepted:A.func,onDropRejected:A.func,onError:A.func,validator:A.func};var Hv={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function $d(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Tt(Tt({},l6),t),n=e.accept,r=e.disabled,i=e.getFilesFromEvent,o=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,u=e.onDragEnter,c=e.onDragLeave,h=e.onDragOver,f=e.onDrop,d=e.onDropAccepted,p=e.onDropRejected,g=e.onFileDialogCancel,m=e.onFileDialogOpen,b=e.useFsAccessApi,x=e.autoFocus,C=e.preventDropOnDocument,k=e.noClick,w=e.noKeyboard,T=e.noDrag,S=e.noDragEventsBubbling,M=e.onError,P=e.validator,D=v.useMemo(function(){return Qge(n)},[n]),R=v.useMemo(function(){return Zge(n)},[n]),H=v.useMemo(function(){return typeof m=="function"?m:u6},[m]),W=v.useMemo(function(){return typeof g=="function"?g:u6},[g]),B=v.useRef(null),j=v.useRef(null),N=v.useReducer(dme,Hv),V=jv(N,2),me=V[0],re=V[1],_=me.isFocused,F=me.isFileDialogActive,U=v.useRef(typeof window<"u"&&window.isSecureContext&&b&&Xge()),se=function(){!U.current&&F&&setTimeout(function(){if(j.current){var we=j.current.files;we.length||(re({type:"closeDialog"}),W())}},300)};v.useEffect(function(){return window.addEventListener("focus",se,!1),function(){window.removeEventListener("focus",se,!1)}},[j,F,W,U]);var Q=v.useRef([]),ve=function(we){B.current&&B.current.contains(we.target)||(we.preventDefault(),Q.current=[])};v.useEffect(function(){return C&&(document.addEventListener("dragover",r6,!1),document.addEventListener("drop",ve,!1)),function(){C&&(document.removeEventListener("dragover",r6),document.removeEventListener("drop",ve))}},[B,C]),v.useEffect(function(){return!r&&x&&B.current&&B.current.focus(),function(){}},[B,x,r]);var le=v.useCallback(function(J){M?M(J):console.error(J)},[M]),ye=v.useCallback(function(J){J.preventDefault(),J.persist(),nt(J),Q.current=[].concat(ome(Q.current),[J.target]),_d(J)&&Promise.resolve(i(J)).then(function(we){if(!(Dd(J)&&!S)){var Et=we.length,Ot=Et>0&&Uge({files:we,accept:D,minSize:s,maxSize:o,multiple:a,maxFiles:l,validator:P}),mn=Et>0&&!Ot;re({isDragAccept:Ot,isDragReject:mn,isDragActive:!0,type:"setDraggedFiles"}),u&&u(J)}}).catch(function(we){return le(we)})},[i,u,le,S,D,s,o,a,l,P]),ue=v.useCallback(function(J){J.preventDefault(),J.persist(),nt(J);var we=_d(J);if(we&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return we&&h&&h(J),!1},[h,S]),ne=v.useCallback(function(J){J.preventDefault(),J.persist(),nt(J);var we=Q.current.filter(function(Ot){return B.current&&B.current.contains(Ot)}),Et=we.indexOf(J.target);Et!==-1&&we.splice(Et,1),Q.current=we,!(we.length>0)&&(re({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),_d(J)&&c&&c(J))},[B,c,S]),ce=v.useCallback(function(J,we){var Et=[],Ot=[];J.forEach(function(mn){var Yi=t6(mn,D),ai=jv(Yi,2),Vo=ai[0],Iu=ai[1],$u=n6(mn,s,o),Ea=jv($u,2),Fu=Ea[0],Lu=Ea[1],Ru=P?P(mn):null;if(Vo&&Fu&&!Ru)Et.push(mn);else{var Bu=[Iu,Lu];Ru&&(Bu=Bu.concat(Ru)),Ot.push({file:mn,errors:Bu.filter(function(Nu){return Nu})})}}),(!a&&Et.length>1||a&&l>=1&&Et.length>l)&&(Et.forEach(function(mn){Ot.push({file:mn,errors:[qge]})}),Et.splice(0)),re({acceptedFiles:Et,fileRejections:Ot,type:"setFiles"}),f&&f(Et,Ot,we),Ot.length>0&&p&&p(Ot,we),Et.length>0&&d&&d(Et,we)},[re,a,D,s,o,l,f,d,p,P]),_e=v.useCallback(function(J){J.preventDefault(),J.persist(),nt(J),Q.current=[],_d(J)&&Promise.resolve(i(J)).then(function(we){Dd(J)&&!S||ce(we,J)}).catch(function(we){return le(we)}),re({type:"reset"})},[i,ce,le,S]),q=v.useCallback(function(){if(U.current){re({type:"openDialog"}),H();var J={multiple:a,types:R};window.showOpenFilePicker(J).then(function(we){return i(we)}).then(function(we){ce(we,null),re({type:"closeDialog"})}).catch(function(we){Jge(we)?(W(we),re({type:"closeDialog"})):eme(we)?(U.current=!1,j.current?(j.current.value=null,j.current.click()):le(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):le(we)});return}j.current&&(re({type:"openDialog"}),H(),j.current.value=null,j.current.click())},[re,H,W,b,ce,le,R,a]),dt=v.useCallback(function(J){!B.current||!B.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),q())},[B,q]),ae=v.useCallback(function(){re({type:"focus"})},[]),X=v.useCallback(function(){re({type:"blur"})},[]),fe=v.useCallback(function(){k||(Kge()?setTimeout(q,0):q())},[k,q]),xe=function(we){return r?null:we},lt=function(we){return w?null:xe(we)},tt=function(we){return T?null:xe(we)},nt=function(we){S&&we.stopPropagation()},It=v.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},we=J.refKey,Et=we===void 0?"ref":we,Ot=J.role,mn=J.onKeyDown,Yi=J.onFocus,ai=J.onBlur,Vo=J.onClick,Iu=J.onDragEnter,$u=J.onDragOver,Ea=J.onDragLeave,Fu=J.onDrop,Lu=Id(J,rme);return Tt(Tt(zv({onKeyDown:lt(Br(mn,dt)),onFocus:lt(Br(Yi,ae)),onBlur:lt(Br(ai,X)),onClick:xe(Br(Vo,fe)),onDragEnter:tt(Br(Iu,ye)),onDragOver:tt(Br($u,ue)),onDragLeave:tt(Br(Ea,ne)),onDrop:tt(Br(Fu,_e)),role:typeof Ot=="string"&&Ot!==""?Ot:"presentation"},Et,B),!r&&!w?{tabIndex:0}:{}),Lu)}},[B,dt,ae,X,fe,ye,ue,ne,_e,w,T,r]),$t=v.useCallback(function(J){J.stopPropagation()},[]),si=v.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},we=J.refKey,Et=we===void 0?"ref":we,Ot=J.onChange,mn=J.onClick,Yi=Id(J,ime),ai=zv({accept:D,multiple:a,type:"file",style:{display:"none"},onChange:xe(Br(Ot,_e)),onClick:xe(Br(mn,$t)),tabIndex:-1},Et,j);return Tt(Tt({},ai),Yi)}},[j,n,a,_e,r]);return Tt(Tt({},me),{},{isFocused:_&&!r,getRootProps:It,getInputProps:si,rootRef:B,inputRef:j,open:xe(q)})}function dme(t,e){switch(e.type){case"focus":return Tt(Tt({},t),{},{isFocused:!0});case"blur":return Tt(Tt({},t),{},{isFocused:!1});case"openDialog":return Tt(Tt({},Hv),{},{isFileDialogActive:!0});case"closeDialog":return Tt(Tt({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Tt(Tt({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Tt(Tt({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Tt({},Hv);default:return t}}function u6(){}const pme=["pdf"],gme=["txt"],mme=["psd"],vme=["doc","docx"],yme=["xls","xlsx"],bme=["zip","rar","iso"],xme=["ai","esp"],wme=["ppt","pptx"],Cme=["wav","aif","mp3","aac"],Sme=["jpg","jpeg","gif","bmp","png","svg"],kme=["m4v","avi","mpg","mp4","webm"],Hn=t=>`/assets/icons/files/${t}.svg`;function c6(t){let e;switch(t==null?void 0:t.includes(On(t))){case gme.includes(On(t)):e="txt";break;case bme.includes(On(t)):e="zip";break;case Cme.includes(On(t)):e="audio";break;case Sme.includes(On(t)):e="image";break;case kme.includes(On(t)):e="video";break;case vme.includes(On(t)):e="word";break;case yme.includes(On(t)):e="excel";break;case wme.includes(On(t)):e="powerpoint";break;case pme.includes(On(t)):e="pdf";break;case mme.includes(On(t)):e="photoshop";break;case xme.includes(On(t)):e="illustrator";break;default:e=On(t)}return e}function Tme(t){let e;switch(c6(t)){case"folder":e=Hn("ic_folder");break;case"txt":e=Hn("ic_txt");break;case"zip":e=Hn("ic_zip");break;case"audio":e=Hn("ic_audio");break;case"video":e=Hn("ic_video");break;case"word":e=Hn("ic_word");break;case"excel":e=Hn("ic_excel");break;case"powerpoint":e=Hn("ic_power_point");break;case"pdf":e=Hn("ic_pdf");break;case"photoshop":e=Hn("ic_pts");break;case"illustrator":e=Hn("ic_ai");break;case"image":e=Hn("ic_img");break;default:e=Hn("ic_file")}return e}function On(t=""){return t&&t.split(".").pop()||""}function Eme(t){return t.split("/").pop()}function qv(t){return typeof t=="string"?{key:t,preview:t,name:Eme(t),type:On(t)}:{key:t.preview,name:t.name,size:t.size,path:t.path,type:t.type,preview:t.preview,lastModified:t.lastModified,lastModifiedDate:t.lastModifiedDate}}function h6(t){const e=(t==null?void 0:t.color)||"#000000",n=(t==null?void 0:t.blur)||6,r=(t==null?void 0:t.opacity)||.8,i=t==null?void 0:t.imgUrl;return i?{position:"relative",backgroundImage:`url(${i})`,"&:before":{position:"absolute",top:0,left:0,zIndex:9,content:'""',width:"100%",height:"100%",backdropFilter:`blur(${n}px)`,WebkitBackdropFilter:`blur(${n}px)`,backgroundColor:Y(e,r)}}:{backdropFilter:`blur(${n}px)`,WebkitBackdropFilter:`blur(${n}px)`,backgroundColor:Y(e,r)}}function Ome(t){const e=(t==null?void 0:t.direction)||"to bottom",n=t==null?void 0:t.startColor,r=t==null?void 0:t.endColor,i=t==null?void 0:t.imgUrl,o=t==null?void 0:t.color;return i?{background:`linear-gradient(${e}, ${n||o}, ${r||o}), url(${i})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center"}:{background:`linear-gradient(${e}, ${n}, ${r})`}}function Mme(t){return{background:`-webkit-linear-gradient(${t})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}function Ame(t){return{filter:t,WebkitFilter:t,MozFilter:t}}const Pme=Object.freeze(Object.defineProperty({__proto__:null,bgBlur:h6,bgGradient:Ome,filterStyles:Ame,hideScrollbarX:{msOverflowStyle:"none",scrollbarWidth:"none",overflowX:"scroll","&::-webkit-scrollbar":{display:"none"}},hideScrollbarY:{msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}},textGradient:Mme},Symbol.toStringTag,{value:"Module"})),f6=({onDownload:t})=>{const e=no();return y.jsx(O.IconButton,{onClick:t,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:e.transitions.create("opacity"),"&:hover":{opacity:1,...h6({opacity:.64,color:e.palette.grey[900]})}},children:y.jsx(bt,{icon:"eva:arrow-circle-down-fill",width:24})})},d6=({file:t,tooltip:e,imageView:n,onDownload:r,sx:i,imgSx:o})=>{const{name:s="",path:a="",preview:l=""}=qv(t),u=c6(a||l),c=u==="image"&&n?y.jsx(O.Box,{component:"img",src:l,sx:{width:1,height:1,flexShrink:0,objectFit:"cover",...o}}):y.jsx(O.Box,{component:"img",src:Tme(u),sx:{width:32,height:32,flexShrink:0,...i}});return e?y.jsx(O.Tooltip,{title:s,children:y.jsxs(O.Stack,{flexShrink:0,component:"span",alignItems:"center",justifyContent:"center",sx:{width:"fit-content",height:"inherit"},children:[c,r&&y.jsx(f6,{onDownload:r})]})}):y.jsxs(y.Fragment,{children:[c,r&&y.jsx(f6,{onDownload:r})]})},p6=({fileRejections:t})=>t.length?y.jsx(O.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:e=>Y(e.palette.error.main,.08),borderColor:e=>Y(e.palette.error.main,.24)},children:t.map(({file:e,errors:n})=>{const{path:r,size:i}=qv(e);return y.jsxs(O.Box,{sx:{my:1},children:[y.jsxs(O.Typography,{variant:"subtitle2",noWrap:!0,children:[r," - ",i?Om(i):""]}),n.map(o=>y.jsxs(O.Box,{component:"span",sx:{typography:"caption"},children:["- ",o.message]},o.code))]},r)})}):null,Dme=({thumbnail:t,files:e,onRemove:n,sx:r})=>e!=null&&e.length?y.jsx(Ex,{initial:!1,children:e.map(i=>{const{key:o,name:s="",size:a=0}=qv(i),l=typeof i=="string";return t?y.jsxs(O.Stack,{component:rr.div,...Pa().inUp,alignItems:"center",display:"inline-flex",justifyContent:"center",sx:{m:.5,width:80,height:80,borderRadius:1.25,overflow:"hidden",position:"relative",border:u=>`solid 1px ${u.palette.divider}`,...r},children:[y.jsx(d6,{tooltip:!0,imageView:!0,file:i,sx:{position:"absolute"},imgSx:{position:"absolute"}}),n&&y.jsx(O.IconButton,{size:"small",onClick:()=>n(i),sx:{top:4,right:4,p:"1px",position:"absolute",color:u=>Y(u.palette.common.white,.72),bgcolor:u=>Y(u.palette.grey[900],.48),"&:hover":{bgcolor:u=>Y(u.palette.grey[900],.72)}},children:y.jsx(bt,{icon:"eva:close-fill",width:16})})]},o):y.jsxs(O.Stack,{component:rr.div,...Pa().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:u=>`solid 1px ${u.palette.divider}`,...r},children:[y.jsx(d6,{file:i}),y.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[y.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:l?i:s}),y.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:l?"":Om(a)})]}),n&&y.jsx(O.IconButton,{edge:"end",size:"small",onClick:()=>n(i),children:y.jsx(bt,{icon:"eva:close-fill"})})]},o)})}):null,_me=({file:t})=>{if(!t)return null;const e=typeof t=="string"?t:t.preview;return y.jsx(O.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:y.jsx("img",{alt:"file preview",src:e,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},Ime=yr("div")(({theme:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:t.spacing(5),borderRadius:t.shape.borderRadius,transition:t.transitions.create("padding"),backgroundColor:t.palette.background.neutral,border:`1px dashed ${Y(t.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),$me=({header:t,description:e,sx:n,...r})=>y.jsxs(O.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...r,children:[y.jsx(Pse,{sx:{width:220}}),y.jsxs("div",{children:[y.jsx(O.Typography,{gutterBottom:!0,variant:"h5",children:t||"Soltar ou selecionar arquivos"}),y.jsx(O.Typography,{variant:"body2",sx:{color:"text.secondary"},children:e||y.jsxs(y.Fragment,{children:["Solte os arquivos aqui ou clique",y.jsx(O.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),g6=({id:t,disabled:e,multiple:n=!1,error:r,helperText:i,file:o,onDelete:s,files:a,thumbnail:l,onUpload:u,onRemove:c,onRemoveAll:h,sx:f,dropZoneProps:d,placeholderProps:p,placeholderAlt:g,image:m,tabIndex:b,...x})=>{const{getRootProps:C,getInputProps:k,isDragActive:w,isDragReject:T,fileRejections:S}=$d({multiple:n,disabled:e,...x}),M=!!o&&!n||m,P=a&&n&&a.length>0,D=T||!!r;return y.jsxs(O.Box,{sx:{width:1,position:"relative",...f},children:[y.jsxs(Ime,{...C(),sx:{...w&&{opacity:.72},...D&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...e&&{opacity:.48,pointerEvents:"none"},...d},children:[y.jsx("input",{...k(),id:t,tabIndex:b}),g?y.jsx(O.Stack,{sx:{...M&&{opacity:0}},children:g}):y.jsx($me,{sx:{...M&&{opacity:0}},header:p==null?void 0:p.title,description:p==null?void 0:p.description}),M&&y.jsx(_me,{file:o||m||""})]}),i&&y.jsx(O.FormHelperText,{error:!!r,sx:R=>({mx:"14px",color:e?R.palette.grey[500]:void 0}),children:i}),y.jsx(p6,{fileRejections:S}),M&&s&&y.jsx(O.IconButton,{size:"small",onClick:s,sx:{top:16,right:16,zIndex:9,position:"absolute",color:R=>Y(R.palette.common.white,.8),bgcolor:R=>Y(R.palette.grey[900],.72),"&:hover":{bgcolor:R=>Y(R.palette.grey[900],.48)}},children:y.jsx(bt,{icon:"eva:close-fill",width:18})}),P&&y.jsxs(y.Fragment,{children:[y.jsx(O.Box,{sx:{my:3},children:y.jsx(Dme,{files:a,thumbnail:l,onRemove:c})}),y.jsxs(O.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[h&&y.jsx(O.Button,{color:"inherit",variant:"outlined",size:"small",onClick:h,children:"Remove all"}),u&&y.jsx(O.Button,{size:"small",variant:"contained",onClick:u,children:"Upload files"})]})]})]})},Fme=({file:t})=>{if(!t)return null;const e=typeof t=="string"?t:t.preview;return y.jsx("img",{alt:"avatar",src:e,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},Lme=yr("div")(({theme:t})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${Y(t.palette.grey[500],.32)}`})),Rme=yr("div")(({theme:t})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:t.palette.text.disabled,backgroundColor:t.palette.background.neutral,transition:t.transitions.create("opacity",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.shorter})})),m6=({error:t,file:e,image:n,disabled:r,helperText:i,sx:o,tabIndex:s,...a})=>{const{getRootProps:l,getInputProps:u,isDragActive:c,isDragReject:h,fileRejections:f}=$d({multiple:!1,disabled:r,...a}),d=!!e||n,p=h||!!t;return y.jsxs(y.Fragment,{children:[y.jsxs(Lme,{...l(),sx:{...c&&{opacity:.72},...p&&{borderColor:"error.light",...d&&{bgcolor:"error.lighter"}},...r&&{opacity:.48,pointerEvents:"none"},...d&&{"&:hover":{"& .placeholder":{opacity:1}}},...o},children:[y.jsx("input",{...u(),tabIndex:s}),d&&y.jsx(Fme,{file:e||n||""}),y.jsxs(Rme,{className:"placeholder",sx:{"&:hover":{opacity:.72},...d&&{zIndex:9,opacity:0,color:"common.white",bgcolor:g=>Y(g.palette.grey[900],.64)},...p&&{color:"error.main",bgcolor:"error.lighter"}},children:[y.jsx(bt,{icon:"ic:round-add-a-photo",width:24,sx:{mb:1}}),y.jsx(O.Typography,{variant:"caption",children:e?"Update photo":"Upload photo"})]})]}),i&&i,y.jsx(p6,{fileRejections:f})]})},Bme=yr("div")(({theme:t})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:t.spacing(.5),color:t.palette.text.disabled,borderRadius:t.shape.borderRadius,border:`dashed 1px ${t.palette.divider}`,backgroundColor:Y(t.palette.grey[500],.08),"&:hover":{opacity:.72}})),Nme=({placeholderAlt:t,error:e,disabled:n,sx:r,tabIndex:i,...o})=>{const{getRootProps:s,getInputProps:a,isDragActive:l,isDragReject:u}=$d({disabled:n,...o}),c=u||e;return y.jsxs(Bme,{...s(),sx:{...l&&{opacity:.72},...c&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...r},children:[y.jsx("input",{...a(),tabIndex:i}),t||y.jsx(bt,{icon:"eva:cloud-upload-fill",width:28})]})},jme=t=>new Promise((e,n)=>{const r=new Image;r.addEventListener("load",()=>e(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=t});function v6(t){return t*Math.PI/180}function Vme(t,e,n){const r=v6(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}async function zme(t,e,n=0,r={horizontal:!1,vertical:!1}){const i=await jme(t),o=document.createElement("canvas"),s=o.getContext("2d");if(!s)return null;const a=v6(n),{width:l,height:u}=Vme(i.width,i.height,n);o.width=l,o.height=u,s.translate(l/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-i.width/2,-i.height/2),s.drawImage(i,0,0);const c=s.getImageData(e.x,e.y,e.width,e.height);return o.width=e.width,o.height=e.height,s.putImageData(c,0,0),new Promise((h,f)=>{o.toBlob(d=>{h(d)},"image/png")})}const y6=(t=!1)=>{const[e,n]=v.useState(t),r=v.useCallback(()=>n(i=>!i),[]);return[e,r,n]},b6=({onFileCropped:t,onImageUploaded:e,onCancel:n,image:r})=>{const i=v.useId(),[o,s,a]=y6(),[l,u]=v.useState({x:0,y:0}),[c,h]=v.useState(1),f=v.useRef();return{id:i,crop:l,setCrop:u,zoom:c,setZoom:h,fileRef:f,onCropComplete:async(b,x)=>{try{const C=await zme(r,x,0);f.current=new File([C],"image.png",{type:C.type})}catch{t(void 0)}},saveChanges:()=>{t(f.current),s()},cancelChanges:()=>{n&&n(),a(!1)},handleRemove:()=>{t(void 0),e(void 0),u({x:0,y:0}),h(1),a(!1)},cropModalOpen:o,toggleCropModalOpen:s,setCropModalOpen:a}},x6=({id:t,open:e,onClose:n,label:r,onSave:i,onRemove:o,imgSrc:s,aspect:a,size:{height:l,width:u},crop:c,zoom:h,onCropComplete:f,onCropChange:d,onZoomChange:p})=>y.jsx(_3,{open:e,onClose:n,dialogTitle:r,actions:y.jsxs(y.Fragment,{children:[y.jsx(O.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),y.jsx(O.Button,{variant:"contained",size:"medium",onClick:i,children:"Salvar"})]}),children:y.jsxs(O.Stack,{gap:2,children:[y.jsx(l3,{image:{width:u,height:l,aspect:a,imgSrc:s},crop:c,zoom:h,onCropComplete:f,onCropChange:d,onZoomChange:p}),y.jsxs(O.Stack,{gap:1.5,children:[y.jsxs(O.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",mr:"auto",children:[y.jsx(O.Typography,{variant:"body1",children:"Zoom"}),y.jsx(O.Slider,{value:h,onChange:(g,m)=>p(Array.isArray(m)?m[0]:m),min:1,max:5,size:"medium",step:.5})]}),y.jsxs(O.Stack,{direction:"row",gap:2,children:[y.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:y.jsx(bt,{icon:"eva:trash-2-outline",color:"error.main"}),onClick:o,children:"Remover"}),y.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:y.jsx(bt,{icon:"ic:outline-image-search",color:mm.main}),component:"label",htmlFor:t,children:"Alterar"})]})]})]})}),Wme=O.styled(O.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Hme=O.styled(O.Stack)(({theme:t})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:O.alpha(t.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),qme=O.styled(O.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),w6=({onFileCropped:t,onImageUploaded:e,onCancel:n,aspect:r,size:i,label:o,image:s="",uploading:a,file:l,tabIndex:u,...c})=>{const{id:h,crop:f,cropModalOpen:d,zoom:p,cancelChanges:g,handleRemove:m,onCropComplete:b,saveChanges:x,setCrop:C,setCropModalOpen:k,setZoom:w,toggleCropModalOpen:T}=b6({image:s,onFileCropped:t,onImageUploaded:e,onCancel:n});return y.jsxs(y.Fragment,{children:[y.jsxs(Wme,{children:[a&&y.jsx(Hh,{}),y.jsx(g6,{...c,id:h,file:l,onDrop:S=>{if(S.length>0){k(!0),w(1),C({x:0,y:0});const M=new FileReader;M.addEventListener("load",()=>{var D;const P=((D=M.result)==null?void 0:D.toString())||"";e(P),t(void 0)}),M.readAsDataURL(S[0])}},image:s,tabIndex:u}),(l||s)&&y.jsxs(Hme,{className:"actions",children:[y.jsx(O.Button,{color:"inherit",startIcon:y.jsx(bt,{icon:"eva:trash-2-outline",color:"error.main"}),onClick:m,children:"Remover"}),y.jsx(O.Button,{color:"inherit",startIcon:y.jsx(bt,{icon:"ic:outline-image",color:mm.main}),onClick:T,children:"Editar"})]})]}),y.jsx(x6,{id:h,open:d,onClose:g,label:o,aspect:r,crop:f,zoom:p,onCropComplete:b,onCropChange:C,onZoomChange:w,imgSrc:s,onRemove:m,onSave:x,size:i})]})},C6=({name:t,helperText:e,rules:n,onSelectOption:r,...i})=>{const{control:o}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:o,rules:n,render:({field:s,fieldState:{error:a}})=>y.jsx($0,{...s,...i,onChange:l=>{r&&r(l),s.onChange(l)},error:!!a,helperText:(a==null?void 0:a.message)||e})})},jo=({name:t,helperText:e,rules:n,onChange:r,tabIndex:i,...o})=>{const{control:s}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:s,rules:n,render:({field:{ref:a,...l},fieldState:{error:u}})=>y.jsx(O.TextField,{...l,onChange:c=>{l.onChange(c),r&&r(c)},inputRef:a,fullWidth:!0,error:!!u,helperText:(u==null?void 0:u.message)||e,...o,inputProps:{...o.inputProps,tabIndex:i}})})},S6=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:i,rules:n,render:({field:{name:o,onChange:s,value:a,ref:l},fieldState:{error:u}})=>y.jsx(Fm,{ref:l,...r,name:o,value:a,error:!!u,helperText:(u==null?void 0:u.message)||e,onChange:({target:{value:c}})=>s(c)})})},Ume=({name:t,containerProps:e,required:n,rules:r,tabIndex:i})=>{const o=`${t}.zipCode`,s=`${t}.publicPlace`,a=`${t}.number`,l=`${t}.district`,u=`${t}.complement`,c=`${t}.state`,h=`${t}.city`,f=d=>{d.key==="Enter"&&d.preventDefault()};return y.jsxs(O.Stack,{gap:1.5,...e,children:[y.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[y.jsx(S6,{name:o,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:y.jsx(O.InputAdornment,{position:"end",children:y.jsx(O.CircularProgress,{size:24})})},rules:r,onKeyDown:f,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:i}),y.jsxs(O.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[y.jsx(jo,{name:s,label:"Logradouro",onKeyDown:f,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:i}),y.jsx(jo,{name:a,label:"Número",onKeyDown:f,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:i})]})]}),y.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[y.jsx(jo,{name:l,label:"Bairro",onKeyDown:f,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:i}),y.jsx(jo,{name:u,label:"Complemento",onKeyDown:f,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:i})]}),y.jsxs(O.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[y.jsx(C6,{name:c,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:i}),y.jsx(jo,{name:h,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:i})]})]})},Yme=({name:t,rules:e,helperText:n,tabIndex:r,...i})=>{const{control:o}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:o,rules:e,render:({field:s,fieldState:{error:a}})=>y.jsxs("div",{children:[y.jsx(O.FormControlLabel,{control:y.jsx(O.Checkbox,{...s,checked:s.value,tabIndex:r}),...i}),(!!a||n)&&y.jsx(O.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:n})]})})},Gme=({row:t,name:e,rules:n,label:r,options:i,spacing:o,helperText:s,required:a,...l})=>{const{control:u}=Me.useFormContext(),c=(h,f)=>h.includes(f)?h.filter(d=>d!==f):[...h,f];return y.jsx(Me.Controller,{name:e,control:u,rules:n,render:({field:{value:h=[],...f},fieldState:{error:d}})=>y.jsxs(O.FormControl,{component:"fieldset",children:[r&&y.jsx(O.FormLabel,{component:"legend",sx:{typography:"body2"},required:a,children:r}),y.jsx(O.FormGroup,{sx:{...t&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:o||0},...t&&{mr:0,"&:not(:last-of-type)":{mr:o||2}}}},children:i.map(p=>y.jsx(O.FormControlLabel,{control:y.jsx(O.Checkbox,{checked:h.includes(p.value),onChange:()=>f.onChange(c(h,p.value))}),label:p.label,...l},p.value))}),(!!d||s)&&y.jsx(O.FormHelperText,{error:!!d,sx:p=>({color:l.disabled?p.palette.grey[500]:void 0}),children:d?d==null?void 0:d.message:s})]})})},Kme=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Uv(t,e,n,r){const i=v.useRef(e);Kme(()=>{i.current=e},[e]),v.useEffect(()=>{const o=(n==null?void 0:n.current)||window;if(!(o&&o.addEventListener))return;const s=a=>i.current(a);return o.addEventListener(t,s,r),()=>{o.removeEventListener(t,s)}},[t,n,r])}const Xme=({keyName:t,inputs:e=[],rules:n,tabIndex:r,...i})=>{const o=v.useRef(null),{control:s,setValue:a,formState:{errors:l}}=Me.useFormContext(),u=f=>{const d=f.clipboardData.getData("text").split("");e.map((p,g)=>a(p,d[g])),f.preventDefault()},c=(f,d)=>{const{maxLength:p,value:g,name:m}=f.target,b=m.replace(t,""),x=Number(b),C=document.querySelector(`input[name=${t}${x+1}]`);g.length>p&&(f.target.value=g[0]),g.length>=p&&x<6&&C!==null&&C.focus(),d(f)};Uv("paste",u,o);const h=e.some(f=>l[f]);return y.jsxs(O.Stack,{children:[y.jsx(O.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:o,children:e.map((f,d)=>y.jsx(Me.Controller,{name:`${t}${d+1}`,control:s,rules:n,render:({field:p,fieldState:{error:g}})=>y.jsx(O.TextField,{...i,...p,autoComplete:"none",error:!!g,autoFocus:d===0,placeholder:"-",onChange:m=>{c(m,p.onChange)},onFocus:m=>m.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:r}})},f))}),h&&y.jsx(O.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Zme=({name:t,rules:e,helperText:n,...r})=>{const{control:i}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:i,rules:{...e,validate:{...e==null?void 0:e.validate,validation:o=>{const s="#"+o.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(s)?!0:"Cor inválida"}}},render:({field:{ref:o,onChange:s,...a},fieldState:{error:l}})=>y.jsx(N5,{...a,onChangeColor:s,inputRef:o,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||n,...r})})},Qme=({name:t,rules:e,tabIndex:n,helperText:r,required:i,...o})=>{const{control:s}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:s,rules:e,render:({field:{ref:a,...l},fieldState:{error:u}})=>{var c;return y.jsx(Aa.DatePicker,{inputRef:a,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...o.localeText},...l,...o,value:l.value?new Date(l.value):null,slotProps:{textField:{...(c=o.slotProps)==null?void 0:c.textField,required:i,error:!!u,helperText:(u==null?void 0:u.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Jme=({name:t,label:e,rules:n,tabIndex:r,helperText:i,required:o,...s})=>{const{control:a,setError:l}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:a,rules:n,render:({field:{value:u,onChange:c},fieldState:{error:h}})=>y.jsx(Aa.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...s.localeText},value:[(u==null?void 0:u.startDate)||null,(u==null?void 0:u.endDate)||null],onChange:f=>c({startDate:f[0],endDate:f[1]}),onError:f=>{l(t,{message:f[0]||f[1]||void 0})},...s,slotProps:{textField:({position:f})=>{var d;return{...(d=s.slotProps)==null?void 0:d.textField,required:o,error:!!h,helperText:(h==null?void 0:h.message)||i,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:f==="start"?`${e} (Dt. Início)`:`${e} (Dt. Fim)`,inputProps:{tabIndex:r}}}},sx:{width:1}})})},e1e=({name:t,rules:e,tabIndex:n,helperText:r,required:i,...o})=>{const{control:s}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:s,rules:e,render:({field:{ref:a,...l},fieldState:{error:u}})=>{var c;return y.jsx(Aa.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:a,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...o.localeText},...l,...o,value:l.value?new Date(l.value):null,slotProps:{textField:{...(c=o.slotProps)==null?void 0:c.textField,required:i,error:!!u,helperText:(u==null?void 0:u.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},t1e=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:i,rules:n,render:({field:{name:o,onBlur:s,onChange:a,value:l},fieldState:{error:u}})=>y.jsx(Uk,{id:`quill${o}`,onBlur:s,onChange:(c,h,f,d)=>a(d.getLength()===1?"":c),value:l,error:!!u,helperText:(u==null?void 0:u.message)||e,...r})})},n1e=({id:t,children:e,onSubmit:n,methods:r,...i})=>y.jsx(Me.FormProvider,{...r,children:y.jsx(O.Stack,{component:"form",id:t,onSubmit:n,flex:1,width:1,noValidate:!0,...i,children:e})}),r1e=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:i,rules:n,render:({field:{ref:o,value:s,...a},fieldState:{error:l}})=>y.jsx(Dm,{value:s,inputRef:o,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||e,...r,...a,name:t})})},i1e=({name:t,helperText:e,rules:n,onChange:r,...i})=>{const{control:o}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:o,rules:n,render:({field:s,fieldState:{error:a}})=>y.jsx(tf,{...s,onChange:l=>{s.onChange(l),r&&r(l)},fullWidth:!0,error:!!a,helperText:(a==null?void 0:a.message)||e,...i})})},o1e=({name:t,sx:e,rules:n,passwordSize:r,specialCharacter:i,upperCaseChar:o,numberChar:s,...a})=>{const{watch:l}=Me.useFormContext(),u=l(t),[c,h]=v.useState(!1),{hasNumberChar:f,hasSpecialCharacter:d,hasUpperCaseChar:p,isLengthValid:g}=af(u,r,s,i,o);return y.jsx(jo,{...a,name:t,type:c?"text":"password",InputProps:{endAdornment:y.jsx(O.InputAdornment,{position:"end",children:y.jsx(O.IconButton,{onClick:()=>h(!c),edge:"end","aria-label":"Mostrar/Ocultar senha",children:y.jsx(bt,{icon:c?"eva:eye-off-fill":"eva:eye-fill"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:m=>{const b=af(m,r,s,i,o);return!b.hasNumberChar||!b.hasSpecialCharacter||!b.hasUpperCaseChar||!b.isLengthValid?"Senha inválida":!0}}},sx:{...e,"& .MuiFormHelperText-root":{display:!d||!p||!g||!f?"none":void 0}}})},s1e=({name:t,rules:e,row:n,label:r,options:i,spacing:o,helperText:s,decorated:a,onChange:l,tabIndex:u,required:c,disabled:h,...f})=>{const{control:d}=Me.useFormContext(),p=r?`${t}-${r}`:"";return y.jsx(Me.Controller,{name:t,control:d,rules:e,render:({field:g,fieldState:{error:m}})=>y.jsxs(O.FormControl,{component:"fieldset",sx:{...a&&{paddingLeft:1.5}},children:[r&&y.jsx(O.FormLabel,{component:"legend",id:p,sx:{typography:"body2"},required:c,children:r}),y.jsx(O.RadioGroup,{...f,...g,onChange:(b,x)=>{g.onChange(b),l&&l(b,x)},"aria-labelledby":p,row:n,children:i.map(b=>y.jsx(O.FormControlLabel,{value:b.value,control:y.jsx(O.Radio,{inputProps:{tabIndex:u},disabled:h,checked:b.value===g.value}),label:b.label,sx:({palette:x})=>({"&:not(:last-of-type)":{mb:o||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:o||2}},...a&&{border:`1px solid ${O.alpha(x.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(o||0)/2||1,...g.value===b.value&&{borderColor:"primary.main",backgroundColor:O.alpha(x.primary.main,.05)}}})},b.value))}),(!!m||s)&&y.jsx(O.FormHelperText,{error:!!m,sx:b=>({color:h?b.palette.grey[500]:void 0}),children:m?m==null?void 0:m.message:s})]})})},a1e=({name:t,rules:e,...n})=>{const{control:r}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:r,rules:e,render:({field:{onChange:i,onBlur:o,value:s},fieldState:{error:a}})=>y.jsx(VM,{onChange:i,onBlur:o,value:s,...n,error:!!a,helperText:a==null?void 0:a.message})})},l1e=({name:t,helperText:e,onChange:n,tabIndex:r,...i})=>{const{control:o}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:o,render:({field:s,fieldState:{error:a}})=>y.jsxs("div",{children:[y.jsx(O.FormControlLabel,{control:y.jsx(O.Switch,{...s,checked:s.value,onChange:(l,u)=>{s.onChange(l),n&&n(l,u)},inputProps:{tabIndex:r}}),...i}),(!!a||e)&&y.jsx(O.FormHelperText,{error:!!a,sx:l=>({mx:"14px",color:i.disabled?l.palette.grey[500]:void 0}),children:a?a==null?void 0:a.message:e})]})})},u1e=({name:t,rules:e,tabIndex:n,helperText:r,required:i,...o})=>{const{control:s}=Me.useFormContext();return y.jsx(Me.Controller,{name:t,control:s,rules:e,render:({field:{ref:a,...l},fieldState:{error:u}})=>{var c;return y.jsx(Aa.TimePicker,{ampm:!1,format:"HH:mm",inputRef:a,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...o.localeText},...l,...o,value:l.value?new Date(l.value):null,slotProps:{textField:{...(c=o.slotProps)==null?void 0:c.textField,error:!!u,required:i,helperText:(u==null?void 0:u.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})};function k6(t,e){const{watch:n,setValue:r}=Me.useFormContext(),[i,o]=v.useState(e),s=n(t)||[];return{uploadFile:async f=>{if(!f){r(t,void 0),o(void 0);return}r(t,f),o(Object.assign(f,{preview:URL.createObjectURL(f)}))},uploadFiles:async f=>{r(t,[...s,...f.map(d=>Object.assign(d,{preview:URL.createObjectURL(d)}))])},handleDeleteFile:()=>{r(t,void 0),o(void 0)},handleRemoveAll:()=>{r(t,void 0)},handleRemove:f=>{const d=s.filter(p=>p!==f);r(t,d)},file:i,setFileValue:o}}const c1e=({name:t,rules:e,helperText:n,aspect:r,label:i,size:o,image:s,onFileCropped:a,onImageUploaded:l,onCancel:u,...c})=>{const{control:h}=Me.useFormContext(),{uploadFile:f,file:d,setFileValue:p}=k6(t);return y.jsx(Me.Controller,{name:t,control:h,rules:e,render:({field:{value:g},fieldState:{error:m}})=>y.jsx(w6,{accept:{"image/*":[]},file:g?d:void 0,onFileCropped:b=>{f(b),a&&a(b)},onImageUploaded:l,onCancel:()=>{p(void 0),u&&u()},error:!!m,disableMultiple:!0,helperText:(!!m||n)&&y.jsx(O.FormHelperText,{error:!!m,sx:{px:2},children:m?m==null?void 0:m.message:n}),aspect:r,label:i,size:o,image:s,...c})})},h1e=({onFileCropped:t,onImageUploaded:e,onCancel:n,aspect:r,size:i,label:o,image:s="",uploading:a,file:l,tabIndex:u,...c})=>{const{id:h,crop:f,cropModalOpen:d,zoom:p,cancelChanges:g,handleRemove:m,onCropComplete:b,saveChanges:x,setCrop:C,setCropModalOpen:k,setZoom:w}=b6({image:s,onFileCropped:t,onImageUploaded:e,onCancel:n});return y.jsxs(y.Fragment,{children:[y.jsxs(O.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[a&&y.jsx(qme,{}),y.jsx(m6,{...c,id:h,file:l,onDrop:T=>{if(T.length>0){k(!0),w(1),C({x:0,y:0});const S=new FileReader;S.addEventListener("load",()=>{var P;const M=((P=S.result)==null?void 0:P.toString())||"";e(M),t(void 0)}),S.readAsDataURL(T[0])}},image:s,tabIndex:u})]}),y.jsx(x6,{id:h,open:d,onClose:g,label:o,aspect:r,crop:f,zoom:p,onCropComplete:b,onCropChange:C,onZoomChange:w,imgSrc:s,onRemove:m,onSave:x,size:i})]})},f1e=({name:t,rules:e,helperText:n,aspect:r,label:i,size:o,image:s,onFileCropped:a,onImageUploaded:l,onCancel:u,...c})=>{const{control:h}=Me.useFormContext(),{uploadFile:f,file:d,setFileValue:p}=k6(t);return y.jsx(Me.Controller,{name:t,control:h,rules:e,render:({field:{value:g},fieldState:{error:m}})=>y.jsx(h1e,{accept:{"image/*":[]},file:g?d:void 0,onFileCropped:b=>{f(b),a&&a(b)},onImageUploaded:l,onCancel:()=>{p(void 0),u&&u()},error:!!m,disableMultiple:!0,helperText:(!!m||n)&&y.jsx(O.FormHelperText,{error:!!m,sx:{px:2},children:m?m==null?void 0:m.message:n}),aspect:r,label:i,size:o,image:s,...c})})},d1e=()=>{const[t,e]=v.useState(!1),[n,r]=v.useState(document.activeElement);return v.useEffect(()=>{const i=s=>r(s.target),o=()=>r(null);return window.addEventListener("focus",i,!0),window.addEventListener("blur",o,!0),e(!0),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",o)}},[]),{activeElement:n,listenersReady:t}};function p1e(){const[t,e]=v.useState(null);return{copiedText:t,copy:async r=>{if(!(navigator!=null&&navigator.clipboard))return!1;try{return await navigator.clipboard.writeText(r),e(r),!0}catch{return e(null),!1}}}}const g1e=({page:t,perPage:e,dir:n,search:r,searchValue:i,sort:o}={page:0,perPage:25})=>{const s=ui.useGridApiRef(),[a,l]=v.useState({page:t,perPage:e,dir:n,search:r,searchValue:i,sort:o}),u=({pageSize:g=25,page:m=0})=>{l(b=>({...b,page:m,perPage:g}))},c=g=>l(m=>({...m,page:0,search:g})),h=g=>l(m=>({...m,searchValue:g})),f=()=>l(g=>({...g,page:0,search:g.searchValue})),d=(g,m)=>l(b=>({...b,sort:g,dir:m})),p=()=>{s.current.setPage(0),u({page:0})};return{...a,apiRef:s,page:a.page||0,perPage:a.perPage||25,handlePaginationModelChange:u,handleSearch:c,handleSort:d,handleSearchValue:h,applySearchValue:f,goToPageFirstPage:p}};var m1e=tg;function v1e(t,e){return m1e(t,e)}var y1e=v1e;const b1e=Gi(y1e),x1e=(t,e)=>b1e(t,e),w1e=t=>{const e=v.useRef();return x1e(t,e.current)||(e.current=t),e.current},C1e=(t,e)=>{v.useEffect(t,e.map(w1e))},S1e=()=>{const t=v.useRef(!0);return t.current?(t.current=!1,!0):t.current};function k1e(t=""){const[e,n]=v.useState(t);return{currentTab:e,onChangeTab:(r,i)=>{n(i)},setCurrentTab:n}}function T1e({items:t,itemsPerPage:e}){const[n,r]=v.useState(1),i=Math.ceil(t.length/e),o=t.slice((n-1)*e,n*e);return{currentPage:n,totalPages:i,currentItems:o,goToPage:u=>{u>0&&u<=i&&r(u)},nextPage:()=>{n<i&&r(u=>u+1)},prevPage:()=>{n>1&&r(u=>u-1)}}}const E1e=(t,e,n="mousedown")=>{Uv(n,r=>{const i=t==null?void 0:t.current;!i||i.contains(r.target)||e(r)})},O1e=Object.freeze(Object.defineProperty({__proto__:null,downloadFile:(t,e,n)=>{const r=`data:application/octet-stream;base64,${n}`,i=document.createElement("a"),o=`${t.replace(e,"")}.${e}`;i.href=r,i.download=o,i.click()}},Symbol.toStringTag,{value:"Module"}));function M1e(t){return am({},t)}var T6=1440,A1e=2520,Yv=43200,P1e=86400;function D1e(t,e,n){var r,i;G(2,arguments);var o=lr(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:Lh;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=Vs(t,e);if(isNaN(a))throw new RangeError("Invalid time value");var l=am(M1e(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),u,c;a>0?(u=K(e),c=K(t)):(u=K(t),c=K(e));var h=H5(c,u),f=(zs(c)-zs(u))/1e3,d=Math.round((h-f)/60),p;if(d<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):d===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",d,l);if(d<45)return s.formatDistance("xMinutes",d,l);if(d<90)return s.formatDistance("aboutXHours",1,l);if(d<T6){var g=Math.round(d/60);return s.formatDistance("aboutXHours",g,l)}else{if(d<A1e)return s.formatDistance("xDays",1,l);if(d<Yv){var m=Math.round(d/T6);return s.formatDistance("xDays",m,l)}else if(d<P1e)return p=Math.round(d/Yv),s.formatDistance("aboutXMonths",p,l)}if(p=Jg(c,u),p<12){var b=Math.round(d/Yv);return s.formatDistance("xMonths",b,l)}else{var x=p%12,C=Math.floor(p/12);return x<3?s.formatDistance("aboutXYears",C,l):x<9?s.formatDistance("overXYears",C,l):s.formatDistance("almostXYears",C+1,l)}}function _1e(t,e){return G(1,arguments),D1e(t,Date.now(),e)}function I1e(t){G(1,arguments);var e=K(t),n=e.getTime();return n}function $1e(t,e){const n=e||"dd/MM/yyyy";return t?om(new Date(t),n):null}function F1e(t,e){const n=e||"dd/MM/yyyy HH:mm:ss";return t?om(new Date(t),n):null}function L1e(t){return t?I1e(new Date(t)):null}function R1e(t){return t?_1e(new Date(t),{addSuffix:!0}):null}function B1e(t,e="dd/MM/yyyy hh:mm:ss"){if(!t)return null;const n=fk(t,e,new Date);return nm(n)?n:null}const N1e=Object.freeze(Object.defineProperty({__proto__:null,fDate:$1e,fDateTime:F1e,fTimestamp:L1e,fToNow:R1e,stringToDate:B1e},Symbol.toStringTag,{value:"Module"}));function j1e(t){const e=t.match(/\/([^/]+)/);return e?e[0]:t}const V1e=Object.freeze(Object.defineProperty({__proto__:null,getRoot:j1e},Symbol.toStringTag,{value:"Module"}));function z1e(t,e,n="asc"){return t.slice().sort((r,i)=>{const o=r[e],s=i[e];return o<s?n==="asc"?-1:1:o>s?n==="asc"?1:-1:0})}function W1e(t,e,n){const r=[...n],i=r.splice(t,1)[0];return r.splice(e,0,i),r}const H1e=Object.freeze(Object.defineProperty({__proto__:null,sort:z1e,updatePosition:W1e},Symbol.toStringTag,{value:"Module"})),Gv=(t="",e)=>{let n="",r=0;return[...e].forEach(i=>{n+=i==="#"?t[r++]||"_":i}),n},q1e=Object.freeze(Object.defineProperty({__proto__:null,applyMask:Gv,cnpjMask:t=>Gv(t.replace(/\D/g,""),"##.###.###/####-##"),cpfMask:t=>Gv(t.replace(/\D/g,""),"###.###.###-##")},Symbol.toStringTag,{value:"Module"}));function U1e(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}const Y1e=t=>function(n){return y.jsx(v.Suspense,{fallback:y.jsx(Hh,{}),children:y.jsx(t,{...n})})},G1e=Object.freeze(Object.defineProperty({__proto__:null,default:oP},Symbol.toStringTag,{value:"Module"}));$.Address=Ume,$.Autocomplete=$0,$.AutocompleteField=C6,$.Checkbox=Yme,$.Codes=Xme,$.ColorPickerField=Zme,$.ColorPickerInput=N5,$.Common=Sse,$.Confirm=kse,$.CustomAvatar=Pk,$.CustomAvatarGroup=Dk,$.DataGrid=_se,$.DatePicker=Qme,$.DateRangePicker=Jme,$.DateTimePicker=e1e,$.Delayed=Ise,$.DialogAnimate=sP,$.Drawer=Hse,$.Editor=Uk,$.EditorField=t1e,$.EmptyView=Ik,$.FabButtonAnimate=Ox,$.Field=jo,$.FixedProgressBar=Hh,$.Form=n1e,$.IconButtonAnimate=Mx,$.Iconify=bt,$.ImageCrop=l3,$.Incrementer=Dm,$.IncrementerField=r1e,$.Label=C3,$.MaskedInput=Fm,$.MaskedInputField=S6,$.MaterialDesignContent=nw,$.MenuPopover=dle,$.Modal=_3,$.ModalActions=yle,$.MotionContainer=tI,$.MotionLazyContainer=_2,$.MotionViewport=eI,$.MultiCheckbox=Gme,$.NumberInput=tf,$.NumberInputField=i1e,$.PasswordField=o1e,$.PasswordRules=kle,$.Portal=I3,$.RadioGroupField=s1e,$.SQLEditor=VM,$.SQLEditorEditorField=a1e,$.Scrollbar=qk,$.SearchInput=mge,$.SnackbarContent=f0,$.SnackbarProvider=ow,$.Steps=bge,$.Switch=l1e,$.TRANSITION=Qv,$.TabPanel=xge,$.TextAnimate=aP,$.ThemeProvider=Ak,$.TimePicker=u1e,$.Transition=Lc,$.Upload=g6,$.UploadAvatar=m6,$.UploadAvatarWithCropField=f1e,$.UploadBox=Nme,$.UploadWithCrop=w6,$.UploadWithCropField=c1e,$.cssStyles=Pme,$.file=O1e,$.formatNumber=Eae,$.formatTime=N1e,$.loadable=Y1e,$.mask=q1e,$.number=xae,$.routes=V1e,$.sort=H1e,$.useActiveElement=d1e,$.useCopyToClipboard=p1e,$.useDatagrid=g1e,$.useDeepCompareEffect=C1e,$.useEventListener=Uv,$.useIsMounting=S1e,$.useOnClickOutside=E1e,$.usePagination=T1e,$.useResponsive=D2,$.useSnackbar=II,$.useTabs=k1e,$.useToggle=y6,$.uuidv4=U1e,$.validators=wle,$.varBgColor=q6,$.varBgKenburns=U6,$.varBgPan=Y6,$.varBounce=z6,$.varContainer=ju,$.varFade=Pa,$.varFlip=N6,$.varHover=H6,$.varPath=L6,$.varRotate=W6,$.varScale=V6,$.varSlide=j6,$.varTranEnter=Ae,$.varTranExit=$e,$.varTranHover=R6,$.varZoom=B6,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});