@ceed/cds 0.0.158 → 0.0.159-icons

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/framer/index.js CHANGED
@@ -124,7 +124,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
124
124
  Prefix can't start with '-' when allowNegative is true.
125
125
  prefix: `+n+`
126
126
  allowNegative: `+a+`
127
- `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function iW(e){e=aW(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,o=e.thousandsGroupStyle,n=e.suffix,a=e.allowNegative,i=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=ai);var l=e.onBlur;l===void 0&&(l=ai);var p=e.thousandSeparator,c=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var d=e.defaultValue,y=e.value,h=e.valueIsNumericString,g=e.onValueChange,b=GI(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=eh(e),v=x.decimalSeparator,S=x.allowedDecimalSeparators,T=function(z){return UI(z,e)},P=function(z,k){return oW(z,k,e)},C=jl(y)?d:y,R=h!=null?h:rW(C,f,n);jl(y)?jl(d)||(R=R||typeof d=="number"):R=R||typeof y=="number";var _=function(z){return YI(z)?z:(typeof z=="number"&&(z=KI(z)),R&&typeof c=="number"?jI(z,c,!!u):z)},O=ZI(_(y),_(d),!!R,T,P,g),N=O[0],A=N.numAsString,I=N.formattedValue,F=O[1],L=function(z){var k=z.target,q=z.key,re=k.selectionStart,D=k.selectionEnd,pe=k.value;if(pe===void 0&&(pe=""),re!==D){s(z);return}q==="Backspace"&&pe[0]==="-"&&re===f.length+1&&a&&fs(k,1),c&&u&&(q==="Backspace"&&pe[re-1]===v?(fs(k,re-1),z.preventDefault()):q==="Delete"&&pe[re]===v&&z.preventDefault()),S!=null&&S.includes(q)&&pe[re]===v&&fs(k,re+1);var me=p===!0?",":p;q==="Backspace"&&pe[re-1]===me&&fs(k,re-1),q==="Delete"&&pe[re]===me&&fs(k,re+1),s(z)},w=function(z){var k=A;if(k.match(/\d/g)||(k=""),i||(k=U4(k)),u&&c&&(k=jI(k,c,u)),k!==A){var q=UI(k,e);F({formattedValue:q,value:k,floatValue:parseFloat(k)},{event:z,source:qc.event})}l(z)},B=function(z){return z===v?!0:Kc(z)},U=function(z){var k=z.currentValue,q=z.lastValue,re=z.formattedValue,D=z.currentValueIndex,pe=z.formattedValueIndex,me=k[D],De=re[pe],ae=XI(q,k),W=ae.to;return D>=W.start&&D<W.end&&S&&S.includes(me)&&De===v?!0:me===De};return Object.assign(Object.assign({},b),{value:I,valueIsNumericString:!1,isValidInputCharacter:B,isCharacterSame:U,onValueChange:F,format:T,removeFormatting:P,getCaretBoundary:function(z){return nW(z,e)},onKeyDown:L,onBlur:w})}function QI(e){var t=iW(e);return Vl.createElement(Q4,Object.assign({},t))}import sW,{useCallback as lW}from"react";import{motion as pW}from"framer-motion";var cW=pW(Pl),Xc=sW.forwardRef((e,t)=>{var P;let T=e,{label:r,helperText:o,error:n,style:a,size:i,color:s,disabled:l,required:p,onChange:c,name:u,sx:f,className:d,enableClearable:y}=T,h=ve(T,["label","helperText","error","style","size","color","disabled","required","onChange","name","sx","className","enableClearable"]),[g,b]=Rr(e.value,e.defaultValue,lW(C=>{c==null||c({target:{value:(C==null?void 0:C.toString())||"",name:u||""}})},[c,u])),x=C=>{b(C.target.value)},v=()=>{b(e.defaultValue||"")},S=M(cW,oe(V({value:g,name:u,onChange:x,required:p,color:n?"danger":s,disabled:l,slotProps:V({input:V({ref:t},(P=h.slotProps)==null?void 0:P.input)},h.slotProps)},h),{endDecorator:y?Pe(Lt,{gap:1,direction:"row",children:[h.endDecorator,g&&M(Wt,{onMouseDown:C=>C.preventDefault(),onClick:v,"aria-label":"Clear",children:M(_m,{})})]}):h.endDecorator}));return Pe(Sn,{required:p,color:s,size:i,error:n,disabled:l,sx:f,className:d,children:[r&&M(kn,{children:r}),S,o&&M(Rn,{children:o})]})});Xc.displayName="Input";var po=Xc;var uW={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},e1=(e="USD")=>{let[t,r,o,...n]=new $I(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=uW[e];return{symbol:`${t} `,thousandSeparator:r,decimalSeparator:o,placeholder:o?`${t} 0${o}${Array.from(Array(a)).map(()=>0).join("")}`:`${t} 0`,fixedDecimalScale:!!o,decimalScale:a}};var fW=o1.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=ve(a,["onChange"]);return M(QI,oe(V({},n),{onValueChange:({value:i})=>{o==null||o({target:{name:t.name,value:i}})},valueIsNumericString:!0,getInputRef:r,allowNegative:!1}))}),mW=E(po,{name:"CurrencyInput",slot:"root"})({}),th=o1.forwardRef(function(t,r){let o=Y({props:t,name:"CurrencyInput"}),I=o,{currency:n="USD",name:a,onChange:i,label:s,error:l,helperText:p,required:c,disabled:u,useMinorUnit:f,sx:d,className:y}=I,h=ve(I,["currency","name","onChange","label","error","helperText","required","disabled","useMinorUnit","sx","className"]),{symbol:g,thousandSeparator:b,decimalSeparator:x,placeholder:v,fixedDecimalScale:S,decimalScale:T}=e1(n),[P,C]=Rr(o.value,o.defaultValue,t1(F=>i==null?void 0:i({target:{name:a,value:F}}),[i,a])),R=r1(()=>P&&f?P/Math.pow(10,T):P,[P,f,T]),_=r1(()=>o.max&&f?o.max/Math.pow(10,T):o.max,[o.max,f,T]),[O,N]=dW(!!_&&!!R&&R>_),A=t1(F=>{var w;if(F.target.value===""){C(void 0);return}let L=Number(f?(w=F.target.value)==null?void 0:w.replace(x,""):F.target.value);_&&Number(F.target.value)>_?N(!0):N(!1),C(L)},[x,_,f,C]);return M(mW,oe(V({},h),{ref:r,value:R,placeholder:v,onChange:A,error:l||O,disabled:u,required:c,color:l||O?"danger":o.color,label:s,helperText:O?new Qm(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:_}):p,slotProps:{input:{component:fW,decimalSeparator:x,thousandSeparator:b,prefix:g,fixedDecimalScale:S,decimalScale:T,"aria-label":h["aria-label"]}},sx:V({},d),className:y}))});var n1=th;import GW,{useCallback as da,useEffect as mh,useMemo as nr,useRef as xb,useState as y1,useId as YW}from"react";import{jsx as hW}from"react/jsx-runtime";var a1=Nt(hW("path",{d:"M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.41l-6.59-6.59a.9959.9959 0 0 0-1.41 0l-6.6 6.58c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1"}),"ArrowUpwardRounded");import{motion as yW}from"framer-motion";var gW=yW(nm),Zc=gW;Zc.displayName="Sheet";var Fo=Zc;var Qc=e=>{let o=e,{children:t}=o,r=ve(o,["children"]);return M(dm,oe(V({},r),{children:t}))};Qc.displayName="Table";function cb(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=jc}={},slotProps:{checkbox:a={}}={}}=e;return M("thead",{children:Pe("tr",{children:[r&&M("th",{style:{width:"40px",textAlign:"center"},children:M(n,V({onChange:o},a))}),t.map(i=>M("th",{style:{width:i.width,minWidth:i.minWidth,maxWidth:i.maxWidth,textAlign:i.numeric?"right":"left"},children:i.label},i.label))]})})}cb.displayName="TableHead";function ub(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:a,slots:{checkbox:i=jc}={},slotProps:{checkbox:s={}}={}}=e;return M("tbody",{children:t.map((l,p)=>Pe("tr",{children:[n&&M("td",{style:{textAlign:"center"},children:M(i,V({onChange:c=>a==null?void 0:a(c,p)},s))}),r.map(c=>{var u;return M("td",{style:{textAlign:(u=o==null?void 0:o[c])!=null&&u.numeric?"right":"left"},children:l[c]},c)})]},p))})}ub.displayName="TableBody";import EW,{forwardRef as IW,useCallback as bb,useEffect as OW,useImperativeHandle as _W,useRef as DW,useState as wW}from"react";function co(e){return typeof e=="string"||e instanceof String}function db(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function fb(e,t){return Array.isArray(t)?fb(e,(r,o)=>t.includes(o)):Object.entries(e).reduce((r,o)=>{let[n,a]=o;return t(a,n)&&(r[n]=a),r},{})}var _e={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function mb(e){switch(e){case _e.LEFT:return _e.FORCE_LEFT;case _e.RIGHT:return _e.FORCE_RIGHT;default:return e}}function rh(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Hl(e,t){if(t===e)return!0;let r=Array.isArray(t),o=Array.isArray(e),n;if(r&&o){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!Hl(t[n],e[n]))return!1;return!0}if(r!=o)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){let a=t instanceof Date,i=e instanceof Date;if(a&&i)return t.getTime()==e.getTime();if(a!=i)return!1;let s=t instanceof RegExp,l=e instanceof RegExp;if(s&&l)return t.toString()==e.toString();if(s!=l)return!1;let p=Object.keys(t);for(n=0;n<p.length;n++)if(!Object.prototype.hasOwnProperty.call(e,p[n]))return!1;for(n=0;n<p.length;n++)if(!Hl(e[p[n]],t[p[n]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}var oh=class{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}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?_e.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?_e.RIGHT:_e.LEFT}};function Te(e,t){return new Te.InputMask(e,t)}function hb(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Te.MaskedRegExp:co(e)?Te.MaskedPattern:e===Date?Te.MaskedDate:e===Number?Te.MaskedNumber:Array.isArray(e)||e===Array?Te.MaskedDynamic:Te.Masked&&e.prototype instanceof Te.Masked?e:Te.Masked&&e instanceof Te.Masked?e.constructor:e instanceof Function?Te.MaskedFunction:(console.warn("Mask not found for mask",e),Te.Masked)}function pa(e){if(!e)throw new Error("Options in not defined");if(Te.Masked){if(e.prototype instanceof Te.Masked)return{mask:e};let t=e instanceof Te.Masked?{mask:e}:db(e)&&e.mask instanceof Te.Masked?e:{},{mask:r=void 0}=t,o=ve(t,["mask"]);if(r){let n=r.mask;return V(oe(V({},fb(r,(a,i)=>!i.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return db(e)?V({},e):{mask:e}}function Ir(e){if(Te.Masked&&e instanceof Te.Masked)return e;let t=pa(e),r=hb(t.mask);if(!r)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===r&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new r(t)}Te.createMask=Ir;var ii=class{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch(r){}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch(r){}return t!=null?t:this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch(o){}}get isActive(){return!1}};Te.MaskElement=ii;var i1=90,vW=89,ca=class extends ii{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,r,o;return(t=(r=(o=this.input).getRootNode)==null?void 0:r.call(o))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===i1&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===vW&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===i1&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};Te.HTMLMaskElement=ca;var eu=class extends ca{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,r){this.input.setSelectionRange(t,r)}get value(){return this.input.value}set value(t){this.input.value=t}};Te.HTMLMaskElement=ca;var Ul=class extends ca{get _unsafeSelectionStart(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o<n?o:n}get _unsafeSelectionEnd(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o>n?o:n}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;let o=this.rootElement.createRange();o.setStart(this.input.firstChild||this.input,t),o.setEnd(this.input.lastChild||this.input,r);let n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(o))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}};Te.HTMLContenteditableMaskElement=Ul;var tu=class e{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>e.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};tu.MAX_LENGTH=100;var nh=class{constructor(t,r){this.el=t instanceof ii?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new Ul(t):new eu(t),this.masked=Ir(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new tu,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._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var r;return t==null||((r=this.masked)==null?void 0:r.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Te.Masked)&&this.masked.constructor===hb(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Te.Masked?t:Ir({mask:t});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}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,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){let o=this._listeners[t];o&&o.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),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(t){let r=this.masked.unmaskedValue,o=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==o||this._rawInputValue!==n;this._unmaskedValue=r,this._value=o,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){let i=t,{mask:r}=i,o=ve(i,["mask"]),n=!this.maskEquals(r),a=this.masked.optionsIsChanged(o);n&&(this.mask=r),a&&this.masked.updateOptions(o),(n||a)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,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,_e.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,r){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r),this}off(t,r){if(!this._listeners[t])return this;if(!r)return delete this._listeners[t],this;let o=this._listeners[t].indexOf(r);return o>=0&&this._listeners[t].splice(o,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();let r=new oh({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),o=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=o===this.masked.rawInputValue?r.removeDirection:_e.NONE,i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==_e.NONE&&(i=this.masked.nearestInputPos(i,_e.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};Te.InputMask=nh;var Fe=class e{static normalize(t){return Array.isArray(t)?t:[t,new e]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}};Te.ChangeDetails=Fe;var Or=class{constructor(t,r,o){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=o}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";let r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";let t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}};var Gt=class e{constructor(t){this._value="",this._update(V(V({},e.DEFAULTS),t)),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,r){r===void 0&&(r={input:!0}),this.reset(),this.append(t,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,r){return t}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(t,r)}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or(this.extractInput(t,r),t)}appendTail(t){return co(t)&&(t=new Or(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new Fe({inserted:t,rawInserted:t})):new Fe}_appendChar(t,r,o){r===void 0&&(r={});let n=this.state,a;if([t,a]=this.doPrepareChar(t,r),t&&(a=a.aggregate(this._appendCharRaw(t,r)),!a.rawInserted&&this.autofix==="pad")){let i=this.state;this.state=n;let s=this.pad(r),l=this._appendCharRaw(t,r);s=s.aggregate(l),l.rawInserted||s.equals(a)?a=s:this.state=i}if(a.inserted){let i,s=this.doValidate(r)!==!1;if(s&&o!=null){let l=this.state;if(this.overwrite===!0){i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.unshift(this.displayValue.length-a.tailShift)}let p=this.appendTail(o);if(s=p.rawInserted.length===o.toString().length,!(s&&p.inserted)&&this.overwrite==="shift"){this.state=l,i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.shift();p=this.appendTail(o),s=p.rawInserted.length===o.toString().length}s&&p.inserted&&(this.state=l)}s||(a=new Fe,this.state=n,o&&i&&(o.state=i))}return a}_appendPlaceholder(){return new Fe}_appendEager(){return new Fe}append(t,r,o){if(!co(t))throw new Error("value should be string");let n=co(o)?new Or(String(o)):o;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,r);for(let i=0;i<t.length;++i){let s=this._appendChar(t[i],r,n);if(!s.rawInserted&&!this.doSkipInvalid(t[i],r,n))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(r),new Fe}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;let r=this.rawInputValue,o=this.value,n=t();return this.rawInputValue=r,this.value&&this.value!==o&&o.indexOf(this.value)===0&&(this.append(o.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;let r=this.state,o=t(this);return this.state=r,delete this._isolated,o}doSkipInvalid(t,r,o){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),Fe.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),Fe.normalize(this.prepareChar?this.prepareChar(t,this,r):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,r,o,n,a){o===void 0&&(o=""),n===void 0&&(n=_e.NONE),a===void 0&&(a={input:!0});let i=t+r,s=this.extractTail(i),l=this.eager===!0||this.eager==="remove",p;l&&(n=mb(n),p=this.extractInput(0,i,{raw:!0}));let c=t,u=new Fe;if(n!==_e.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?_e.NONE:n),u.tailShift=c-t),u.aggregate(this.remove(c)),l&&n!==_e.NONE&&p===this.rawInputValue)if(n===_e.FORCE_LEFT){let f;for(;p===this.rawInputValue&&(f=this.displayValue.length);)u.aggregate(new Fe({tailShift:-1})).aggregate(this.remove(f-1))}else n===_e.FORCE_RIGHT&&s.unshift();return u.aggregate(this.append(o,a,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Hl(this,t)}typedValueEquals(t){let r=this.typedValue;return t===r||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new Fe}};Gt.DEFAULTS={skipInvalid:!0};Gt.EMPTY_VALUES=[void 0,null,""];Te.Masked=Gt;var Wl=class e{constructor(t,r){t===void 0&&(t=[]),r===void 0&&(r=0),this.chunks=t,this.from=r}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=co(t)?new Or(String(t)):t;let r=this.chunks[this.chunks.length-1],o=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof Or)o?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof e){if(t.stop==null){let n;for(;t.chunks.length&&t.chunks[0].stop==null;)n=t.chunks.shift(),n.from+=t.from,this.extend(n)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Te.MaskedPattern))return new Or(this.toString()).appendTo(t);let r=new Fe;for(let o=0;o<this.chunks.length;++o){let n=this.chunks[o],a=t._mapPosToBlock(t.displayValue.length),i=n.stop,s;if(i!=null&&(!a||a.index<=i)&&((n instanceof e||t._stops.indexOf(i)>=0)&&r.aggregate(t._appendPlaceholder(i)),s=n instanceof e&&t._blocks[i]),s){let l=s.appendTail(n);r.aggregate(l);let p=n.toString().slice(l.rawInserted.length);p&&r.aggregate(t.append(p,{tail:!0}))}else r.aggregate(t.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){let n=t,{chunks:r}=n,o=ve(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(a=>{let i="chunks"in a?new e:new Or;return i.state=a,i})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";let r=t!=null?t-this.from:t,o=0;for(;o<this.chunks.length;){let n=this.chunks[o],a=n.unshift(r);if(n.toString()){if(!a)break;++o}else this.chunks.splice(o,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){let r=this.chunks[t],o=r.shift();if(r.toString()){if(!o)break;--t}else this.chunks.splice(t,1);if(o)return o}return""}};var ah=class{constructor(t,r){this.masked=t,this._log=[];let{offset:o,index:n}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=o,this.index=n,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(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){let t=this._log.pop();return t&&(this.state=t),t}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(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())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,_e.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,_e.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,_e.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,_e.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,_e.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,_e.NONE),!0})}};var Gl=class{constructor(t){Object.assign(this,t),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(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(r),this._value||(this._isRawInput=!1),new Fe}nearestInputPos(t,r){r===void 0&&(r=_e.NONE);let o=0,n=this._value.length;switch(r){case _e.LEFT:case _e.FORCE_LEFT:return o;case _e.NONE:case _e.RIGHT:case _e.FORCE_RIGHT:default:return n}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),o===void 0&&(o={}),o.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new Fe;let o=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!o)&&!r.tail,i=new Fe({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let t=new Fe;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Or("")}appendTail(t){return co(t)&&(t=new Or(String(t))),t.appendTo(this)}append(t,r,o){let n=this._appendChar(t[0],r);return o!=null&&(n.tailShift+=this.appendTail(o).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}};var si=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s}=p,l=ve(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Ir(l),Object.assign(this,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),t===0&&r>=1?(this.isFilled=!1,this.masked.remove(t,r)):new Fe}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(t,r){if(r===void 0&&(r={}),this.isFilled)return new Fe;let o=this.masked.state,n=this.masked._appendChar(t,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new Fe,this.masked.state=o),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(t,r,o){return this.masked.append(t,this.currentMaskFlags(r),o)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Fe:(this.isFilled=!0,new Fe({inserted:this.placeholderChar}))}_appendEager(){return new Fe}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,o)}nearestInputPos(t,r){r===void 0&&(r=_e.NONE);let o=0,n=this.value.length,a=Math.min(Math.max(t,o),n);switch(r){case _e.LEFT:case _e.FORCE_LEFT:return this.isComplete?a:o;case _e.RIGHT:case _e.FORCE_RIGHT:return this.isComplete?a:n;case _e.NONE:default:return a}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.value.slice(t,r).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var r;return oe(V({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new Fe}};si.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]/,"*":/./};var ih=class extends Gt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Te.MaskedRegExp=ih;var Zt=class e extends Gt{constructor(t){super(oe(V(V({},e.DEFAULTS),t),{definitions:Object.assign({},si.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)}))}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){let t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let r=this.mask;if(!r||!t)return;let o=!1,n=!1;for(let i=0;i<r.length;++i){if(this.blocks){let c=r.slice(i),u=Object.keys(this.blocks).filter(d=>c.indexOf(d)===0);u.sort((d,y)=>y.length-d.length);let f=u[0];if(f){let a=pa(this.blocks[f]),{expose:d,repeat:y}=a,h=ve(a,["expose","repeat"]),g=oe(V({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix},h),{repeat:y,parent:this}),b=y!=null?new Te.RepeatBlock(g):Ir(g);b&&(this._blocks.push(b),d&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),i+=f.length-1;continue}}let s=r[i],l=s in t;if(s===e.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){o=!o;continue}if(s==="["||s==="]"){n=!n;continue}if(s===e.ESCAPE_CHAR){if(++i,s=r[i],!s)break;l=!1}let p=l?new si(oe(V({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},pa(t[s])),{parent:this})):new Gl({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return oe(V({},super.state),{_blocks:this._blocks.map(t=>t.state)})}set state(t){if(!t){this.reset();return}let n=t,{_blocks:r}=n,o=ve(n,["_blocks"]);this._blocks.forEach((a,i)=>a.state=r[i]),super.state=o}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,r)=>t+=r.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(r),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,r)=>t+=r.value,"")}set value(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(r),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(r),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,r)=>t+=r.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;let r=new Fe,o=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(o==null)return r;this._blocks[o].isFilled&&++o;for(let n=o;n<this._blocks.length;++n){let a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._mapPosToBlock(this.displayValue.length),n=new Fe;if(!o)return n;for(let i=o.index,s;s=this._blocks[i];++i){var a;let l=s._appendChar(t,oe(V({},r),{_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]}));if(n.aggregate(l),l.consumed)break}return n}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=new Wl;return t===r||this._forEachBlocksInRange(t,r,(n,a,i,s)=>{let l=n.extractTail(i,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Wl&&(l.blockIndex=a),o.extend(l)}),o}extractInput(t,r,o){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),o===void 0&&(o={}),t===r)return"";let n="";return this._forEachBlocksInRange(t,r,(a,i,s,l)=>{n+=a.extractInput(s,l,o)}),n}_findStopBefore(t){let r;for(let o=0;o<this._stops.length;++o){let n=this._stops[o];if(n<=t)r=n;else break}return r}_appendPlaceholder(t){let r=new Fe;if(this.lazy&&t==null)return r;let o=this._mapPosToBlock(this.displayValue.length);if(!o)return r;let n=o.index,a=t!=null?t:this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||t!=null){var s;r.aggregate(i._appendPlaceholder((s=i._blocks)==null?void 0:s.length))}}),r}_mapPosToBlock(t){let r="";for(let o=0;o<this._blocks.length;++o){let n=this._blocks[o],a=r.length;if(r+=n.displayValue,t<=r.length)return{index:o,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,o)=>r+=o.displayValue.length,0)}_forEachBlocksInRange(t,r,o){r===void 0&&(r=this.displayValue.length);let n=this._mapPosToBlock(t);if(n){let a=this._mapPosToBlock(r),i=a&&n.index===a.index,s=n.offset,l=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(o(this._blocks[n.index],n.index,s,l),a&&!i){for(let p=n.index+1;p<a.index;++p)o(this._blocks[p],p,0,this._blocks[p].displayValue.length);o(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o.aggregate(n.remove(i,s))}),o}nearestInputPos(t,r){if(r===void 0&&(r=_e.NONE),!this._blocks.length)return 0;let o=new ah(this,t);if(r===_e.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===_e.LEFT||r===_e.FORCE_LEFT){if(r===_e.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===_e.LEFT){if(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.ok&&o.pos<=t||(o.popState(),o.ok&&o.pos<=t))return o.pos;o.popState()}return o.ok?o.pos:r===_e.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===_e.RIGHT||r===_e.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===_e.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,_e.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=0;return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o+=n.totalInputPositions(i,s)}),o}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){let r=this._maskedBlocks[t];return r?r.map(o=>this._blocks[o]):[]}pad(t){let r=new Fe;return this._forEachBlocksInRange(0,this.displayValue.length,o=>r.aggregate(o.pad(t))),r}};Zt.DEFAULTS=oe(V({},Gt.DEFAULTS),{lazy:!0,placeholderChar:"_"});Zt.STOP_CHAR="`";Zt.ESCAPE_CHAR="\\";Zt.InputDefinition=si;Zt.FixedDefinition=Gl;Te.MaskedPattern=Zt;var li=class extends Zt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){let c=t,{to:r=this.to||0,from:o=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix}=c,i=ve(c,["to","from","maxLength","autofix"]);this.to=r,this.from=o,this.maxLength=Math.max(String(r).length,n),this.autofix=a;let s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0"),p=0;for(;p<l.length&&l[p]===s[p];)++p;i.mask=l.slice(0,p).replace(/0/g,"\\0")+"0".repeat(this.maxLength-p),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",o="",[,n,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,o="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),o=o.padEnd(this.maxLength,"9"),[r,o]}doPrepareChar(t,r){r===void 0&&(r={});let o;return[t,o]=super.doPrepareChar(t.replace(/\D/g,""),r),t||(o.skip=!this.isComplete),[t,o]}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,r);let o=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+t);return Number(i)<this.from?super._appendCharRaw(o[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(o[this.value.length],r).aggregate(this._appendCharRaw(t,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(t,r)}doValidate(t){let r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;let[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){let r=new Fe;if(this.value.length===this.maxLength)return r;let o=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",t));o.split("").forEach(a=>this._appendCharRaw(a))}return r}};Te.MaskedRange=li;var Yl=class e extends Zt{static extractPatternOptions(t){let a=t,{mask:r,pattern:o}=a,n=ve(a,["mask","pattern"]);return oe(V({},n),{mask:co(r)?r:o})}constructor(t){super(e.extractPatternOptions(V(V({},e.DEFAULTS),t)))}updateOptions(t){super.updateOptions(t)}_update(t){let s=V(V({},e.DEFAULTS),t),{mask:r,pattern:o,blocks:n}=s,a=ve(s,["mask","pattern","blocks"]),i=Object.assign({},e.GET_DEFAULT_BLOCKS());t.min&&(i.Y.from=t.min.getFullYear()),t.max&&(i.Y.to=t.max.getFullYear()),t.min&&t.max&&i.Y.from===i.Y.to&&(i.m.from=t.min.getMonth()+1,i.m.to=t.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=t.min.getDate(),i.d.to=t.max.getDate())),Object.assign(i,this.blocks,n),super._update(oe(V({},a),{mask:co(r)?r:o,blocks:i}))}doValidate(t){let r=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(e.extractPatternOptions(t))}};Yl.GET_DEFAULT_BLOCKS=()=>({d:{mask:li,from:1,to:31,maxLength:2},m:{mask:li,from:1,to:12,maxLength:2},Y:{mask:li,from:1900,to:9999}});Yl.DEFAULTS=oe(V({},Zt.DEFAULTS),{mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=e.getFullYear();return[r,o,n].join(".")},parse:(e,t)=>{let[r,o,n]=e.split(".").map(Number);return new Date(n,o-1,r)}});Te.MaskedDate=Yl;var ru=class e extends Gt{constructor(t){super(V(V({},e.DEFAULTS),t)),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(r=>{let i=pa(r),{expose:o}=i,n=ve(i,["expose"]),a=Ir(V({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid},n));return o&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._applyDispatch(t,r);return this.currentMask&&o.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),o}_applyDispatch(t,r,o){t===void 0&&(t=""),r===void 0&&(r={}),o===void 0&&(o="");let n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,s=a.slice(i.length),l=this.currentMask,p=new Fe,c=l==null?void 0:l.state;return this.currentMask=this.doDispatch(t,V({},r),o),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),p.tailShift=this.currentMask.value.length-n.length),s&&(p.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),p}_appendPlaceholder(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){let r=new Fe;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,o;return oe(V({},t),{_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((o=t._beforeTailState)==null?void 0:o.currentMask)||t._beforeTailState})}doDispatch(t,r,o){return r===void 0&&(r={}),o===void 0&&(o=""),this.dispatch(t,this,r,o)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[o,n]=super.doPrepare(t,r);if(this.currentMask){let a;[o,a]=super.doPrepare(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(t,r);if(this.currentMask){let a;[o,a]=super.doPrepareChar(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(t);this.currentMask&&(this.currentMask.typedValue=t,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,r){let o=new Fe;return this.currentMask&&o.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),o}get state(){var t;return oe(V({},super.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state})}set state(t){let i=t,{compiledMasks:r,currentMaskRef:o,currentMask:n}=i,a=ve(i,["compiledMasks","currentMaskRef","currentMask"]);r&&this.compiledMasks.forEach((s,l)=>s.state=r[l]),o!=null&&(this.currentMask=o,this.currentMask.state=n),super.state=a}extractInput(t,r,o){return this.currentMask?this.currentMask.extractInput(t,r,o):""}extractTail(t,r){return this.currentMask?this.currentMask.extractTail(t,r):super.extractTail(t,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,r){return this.currentMask?this.currentMask.nearestInputPos(t,r):super.nearestInputPos(t,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,o)=>{if(!t[o])return;let i=t[o],{mask:n}=i,a=ve(i,["mask"]);return Hl(r,a)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};ru.DEFAULTS=oe(V({},Gt.DEFAULTS),{dispatch:(e,t,r,o)=>{if(!t.compiledMasks.length)return;let n=t.rawInputValue,a=t.compiledMasks.map((i,s)=>{let l=t.currentMask===i,p=l?i.displayValue.length:i.nearestInputPos(i.displayValue.length,_e.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):l||i.remove(p),i.append(e,t.currentMaskFlags(r)),i.appendTail(o),{index:s,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(p,i.nearestInputPos(i.displayValue.length,_e.FORCE_LEFT)))}});return a.sort((i,s)=>s.weight-i.weight||s.totalInputPositions-i.totalInputPositions),t.compiledMasks[a[0].index]}});Te.MaskedDynamic=ru;var ou=class e extends Zt{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=ve(n,["enum"]);if(r){let a=r.map(l=>l.length),i=Math.min(...a),s=Math.max(...a)-i;o.mask="*".repeat(i),s&&(o.mask+="["+"*".repeat(s)+"]"),this.enum=r}super._update(o)}_appendCharRaw(t,r){r===void 0&&(r={});let o=Math.min(this.nearestInputPos(0,_e.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+t,o));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,s)=>{let l=n[0][s];s>=this.value.length||l===i.value||(i.reset(),i._appendChar(l,r))});let a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new Fe}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or("",t)}remove(t,r){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),t===r)return new Fe;let o=Math.min(super.nearestInputPos(0,_e.FORCE_RIGHT),this.value.length),n;for(n=t;n>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(o,n),o)).length>1);--n);let a=super.remove(n,r);return a.tailShift+=n-t,a}};ou.DEFAULTS=oe(V({},Zt.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Te.MaskedEnum=ou;var sh=class extends Gt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(oe(V({},t),{validate:t.mask}))}};Te.MaskedFunction=sh;var s1,pi=class e extends Gt{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){let t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",o=(this.scale?"("+rh(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(rh).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(rh(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){let r=t.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),r);return t&&!o&&(n.skip=!0),o&&!this.allowPositive&&!this.value&&o!=="-"&&n.aggregate(this._appendChar("-")),[o,n]}_separatorsCount(t,r){r===void 0&&(r=!1);let o=0;for(let n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++o,r&&(t+=this.thousandsSeparator.length));return o}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r),this._removeThousandsSeparators(super.extractInput(t,r,o))}_appendCharRaw(t,r){r===void 0&&(r={});let o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(o);this._value=this._removeThousandsSeparators(this.value);let a=this._value;this._value+=t;let i=this.number,s=!isNaN(i),l=!1;if(s){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(e.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!r.tail)):s=!1),s&&(s=!!this._value.match(this._numberRegExp))}let p;s?p=new Fe({inserted:this._value.slice(a.length),rawInserted:l?"":t,skip:l}):(this._value=a,p=new Fe),this._value=this._insertThousandsSeparators(this._value);let c=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,u=this._separatorsCountFromSlice(c);return p.tailShift+=(u-n)*this.thousandsSeparator.length,p}_findSeparatorAround(t){if(this.thousandsSeparator){let r=t-this.thousandsSeparator.length+1,o=this.value.indexOf(this.thousandsSeparator,r);if(o<=t)return o}return-1}_adjustRangeWithSeparators(t,r){let o=this._findSeparatorAround(t);o>=0&&(t=o);let n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[t,r]}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r);let o=this.value.slice(0,t),n=this.value.slice(r),a=this._separatorsCount(o.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(o+n));let i=this._separatorsCountFromSlice(o);return new Fe({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case _e.NONE:case _e.LEFT:case _e.FORCE_LEFT:{let o=this._findSeparatorAround(t-1);if(o>=0){let n=o+this.thousandsSeparator.length;if(t<n||this.value.length<=n||r===_e.FORCE_LEFT)return o}break}case _e.RIGHT:case _e.FORCE_RIGHT:{let o=this._findSeparatorAround(t);if(o>=0)return o+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){let t=this.number,r=t;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==t&&(this.unmaskedValue=this.format(r,this));let o=this.value;this.normalizeZeros&&(o=this._normalizeZeros(o)),this.padFractionalZeros&&this.scale>0&&(o=this._padFractionalZeros(o)),this._value=o}super.doCommit()}_normalizeZeros(t){let r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(o,n,a,i)=>n+i),t.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(t){if(!t)return t;let r=t.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(t,r,o){r===void 0&&(r={});let n=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===e.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,o)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}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(t){return(super.typedValueEquals(t)||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}};s1=pi;pi.UNMASKED_RADIX=".";pi.EMPTY_VALUES=[...Gt.EMPTY_VALUES,0];pi.DEFAULTS=oe(V({},Gt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[s1.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})});Te.MaskedNumber=pi;var lh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function yb(e,t,r){t===void 0&&(t=lh.MASKED),r===void 0&&(r=lh.MASKED);let o=Ir(e);return n=>o.runIsolated(a=>(a[t]=n,a[r]))}function l1(e,t,r,o){return yb(t,r,o)(e)}Te.PIPE_TYPE=lh;Te.createPipe=yb;Te.pipe=l1;var ph=class extends Zt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var r,o,n;let l=pa(t),{repeat:a}=l,i=ve(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,i);let s=Ir(this._blockOpts);this.repeat=(r=(o=a!=null?a:s.repeat)!=null?o:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ir(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,r){r===void 0&&(r={});let o=new Fe;for(let l=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),p,c;p=(i=this._blocks[l])!=null?i:c=!c&&this._allocateBlock(l);++l){var n,a,i,s;let u=p._appendChar(t,oe(V({},r),{_beforeTailState:(s=r._beforeTailState)==null||(s=s._blocks)==null?void 0:s[l]}));if(u.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(o.aggregate(u),u.consumed)break}return o}_trimEmptyTail(t,r){var o,n;t===void 0&&(t=0);let a=Math.max(((o=this._mapPosToBlock(t))==null?void 0:o.index)||0,this.repeatFrom,0),i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let s=0;for(let l=i;a<=l&&!this._blocks[l].unmaskedValue;--l,++s);s&&(this._blocks.splice(i-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._trimEmptyTail(t,r),o}totalInputPositions(t,r){return t===void 0&&(t=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,r)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};Te.RepeatBlock=ph;try{globalThis.IMask=Te}catch(e){}import vb from"react";var Ne=An(k0(),1);import ch from"react";var p1={mask:Ne.default.oneOfType([Ne.default.array,Ne.default.func,Ne.default.string,Ne.default.instanceOf(RegExp),Ne.default.oneOf([Date,Number,Te.Masked]),Ne.default.instanceOf(Te.Masked)]),value:Ne.default.any,unmask:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["typed"])]),prepare:Ne.default.func,prepareChar:Ne.default.func,validate:Ne.default.func,commit:Ne.default.func,overwrite:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["shift"])]),eager:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["append","remove"])]),skipInvalid:Ne.default.bool,onAccept:Ne.default.func,onComplete:Ne.default.func,placeholderChar:Ne.default.string,displayChar:Ne.default.string,lazy:Ne.default.bool,definitions:Ne.default.object,blocks:Ne.default.object,enum:Ne.default.arrayOf(Ne.default.string),maxLength:Ne.default.number,from:Ne.default.number,to:Ne.default.number,pattern:Ne.default.string,format:Ne.default.func,parse:Ne.default.func,autofix:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["pad"])]),radix:Ne.default.string,thousandsSeparator:Ne.default.string,mapToRadix:Ne.default.arrayOf(Ne.default.string),scale:Ne.default.number,normalizeZeros:Ne.default.bool,padFractionalZeros:Ne.default.bool,min:Ne.default.oneOfType([Ne.default.number,Ne.default.instanceOf(Date)]),max:Ne.default.oneOfType([Ne.default.number,Ne.default.instanceOf(Date)]),dispatch:Ne.default.func,inputRef:Ne.default.oneOfType([Ne.default.func,Ne.default.shape({current:Ne.default.object})])},c1=Object.keys(p1).filter(e=>e!=="value"),bW=["value","unmask","onAccept","onComplete","inputRef"],xW=c1.filter(e=>bW.indexOf(e)<0);function gb(e){var t;let r=(t=class extends ch.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){let a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Te(this.element,a).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(a){let i=ve(a,[]);return Object.keys(i).filter(s=>xW.indexOf(s)<0).forEach(s=>{delete i[s]}),i}_extractNonMaskProps(a){let i=ve(a,[]);return c1.forEach(s=>{s!=="maxLength"&&delete i[s]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return ch.createElement(e,oe(V({},this._extractNonMaskProps(this.props)),{inputRef:this._inputRef}))}},t.displayName=void 0,t.propTypes=void 0,t),o=e.displayName||e.name||"Component";return r.displayName="IMask("+o+")",r.propTypes=p1,ch.forwardRef((n,a)=>ch.createElement(r,oe(V({},n),{ref:a})))}var TW=gb(e=>{let o=e,{inputRef:t}=o,r=ve(o,["inputRef"]);return vb.createElement("input",oe(V({},r),{ref:t}))}),PW=(e,t)=>vb.createElement(TW,oe(V({},e),{ref:t})),ua=vb.forwardRef(PW);import{useRef as YGe,useState as JGe,useCallback as qGe,useEffect as KGe}from"react";import"react";import{jsx as CW}from"react/jsx-runtime";var ci=Nt(CW("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");import{motion as SW}from"framer-motion";var kW=SW(Of),RW=E(kW)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),nu=RW;nu.displayName="DialogActions";var En=nu;var AW=E(Ut,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),MW=E(Fo,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),NW=E("div",{name:"DatePicker",slot:"root"})({width:"100%"}),u1=(e,t)=>{let r=`${e.getDate()}`,o=`${e.getMonth()+1}`,n=e.getFullYear();return Number(r)<10&&(r="0"+r),Number(o)<10&&(o="0"+o),t.replace(/YYYY/g,n.toString()).replace(/MM/g,o).replace(/DD/g,r)};function LW(e,t){let r=t.split(/[-./\s]/),o=e.split(/[-./\s]/);if(r.length!==o.length)throw new Error("Invalid date string or format");let n,a,i;for(let l=0;l<r.length;l++){let p=parseInt(o[l],10);switch(r[l]){case"DD":n=p;break;case"MM":a=p-1;break;case"YYYY":i=p;break}}return new Date(i,a,n)}var BW=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,t=>`${t}\``),zW=EW.forwardRef(function(t,r){let i=t,{onChange:o,format:n}=i,a=ve(i,["onChange","format"]);return M(ua,oe(V({},a),{inputRef:r,onAccept:s=>o({target:{name:t.name,value:s}}),mask:Date,pattern:BW(n),blocks:{D:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},M:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999,maxLength:4}},format:s=>u1(s,n),parse:s=>LW(s,n),autofix:"pad",overwrite:!0}))}),uh=IW((e,t)=>{let r=Y({props:e,name:"DatePicker"}),O=r,{onChange:o,disabled:n,label:a,error:i,helperText:s,minDate:l,maxDate:p,disableFuture:c,disablePast:u,required:f,sx:d,className:y,format:h="YYYY/MM/DD",size:g}=O,b=ve(O,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className","format","size"]),x=DW(null),[v,S]=Rr(r.value,r.defaultValue||"",bb(N=>o==null?void 0:o({target:{name:r.name,value:N}}),[r.name,o]),{disableStrict:!0}),[T,P]=wW(null),C=!!T;OW(()=>{var N;T||(N=x.current)==null||N.blur()},[T,x]),_W(t,()=>x.current,[x]);let R=bb(N=>{S(N.target.value)},[S]),_=bb(N=>{P(T?null:N.currentTarget),setTimeout(()=>{var A;(A=x.current)==null||A.focus()},0)},[T,P,x]);return M(NW,{children:M(Wr,{open:!0,children:Pe(Bo,{children:[M(po,oe(V({},b),{color:i?"danger":b.color,ref:x,size:g,value:v,onChange:R,placeholder:h,disabled:n,required:f,error:i,slotProps:{input:{component:zW,ref:x,format:h}},className:y,sx:d,endDecorator:M(Wt,{variant:"plain",onClick:_,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:M(ci,{})}),label:a,helperText:s})),C&&M($n,{onClickAway:()=>P(null),children:M(AW,{id:"date-picker-popper",open:!0,anchorEl:T,placement:"bottom-end",onMouseDown:N=>N.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(MW,{tabIndex:-1,role:"presentation",children:[M(ni,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([N])=>{R({target:{name:r.name,value:u1(N,h)}}),P(null)},minDate:l?new Date(l):void 0,maxDate:p?new Date(p):void 0,disableFuture:c,disablePast:u}),M(En,{sx:{p:1},children:M(It,{size:g,variant:"plain",color:"neutral",onClick:()=>{R({target:{name:r.name,value:""}}),P(null)},children:"Clear"})})]})})})]})})})});var d1=uh;import{motion as FW}from"framer-motion";var $W=FW(vm),au=e=>{let y=e,{label:t,error:r,helperText:o,color:n,size:a,disabled:i,required:s,minRows:l=2,maxRows:p=4,sx:c,className:u}=y,f=ve(y,["label","error","helperText","color","size","disabled","required","minRows","maxRows","sx","className"]),d=M($W,V({required:s,disabled:i,color:r?"danger":n,size:a,minRows:l,maxRows:p},f));return Pe(Sn,{required:s,disabled:i,color:n,size:a,error:r,sx:c,className:u,children:[t&&M(kn,{children:t}),d,o&&M(Rn,{children:o})]})};au.displayName="Textarea";var f1=au;import{useMemo as VW}from"react";import{motion as jW}from"framer-motion";var HW=jW(em),dh=HW;dh.displayName="Option";function iu(e){let h=e,{label:t,helperText:r,error:o,size:n,color:a,disabled:i,required:s,onChange:l,sx:p,className:c}=h,u=ve(h,["label","helperText","error","size","color","disabled","required","onChange","sx","className"]),f=VW(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),d=(g,b)=>{var S;let x=g||{target:{}},v=oe(V({},x),{target:{name:((S=x.target)==null?void 0:S.name)||e.name,value:b||void 0}});l==null||l(v)},y=M(om,oe(V({},u),{required:s,disabled:i,size:n,color:o?"danger":a,onChange:d,children:f.map(g=>M(dh,{value:g.value,children:g.label},g.value))}));return Pe(Sn,{required:s,disabled:i,size:n,color:a,error:o,sx:p,className:c,children:[t&&M(kn,{children:t}),y,r&&M(Rn,{children:r})]})}iu.displayName="Select";var m1=iu;import{motion as UW}from"framer-motion";var WW=UW(xm),su=e=>M(WW,V({},e));su.displayName="Tooltip";var h1=su;import{motion as g1}from"framer-motion";function v1(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var JW=E("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),fh=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function qW(e){let{paginationModel:{page:t,pageSize:r},rowCount:o,onPageChange:n}=e,a=1,i=Math.ceil(o/r),s=[t-2,t-1].filter(u=>u>1),l=[t+1,t+2].filter(u=>u<=i-1),p=i>1&&t<i-3,c=i>1&&t>4;return M(Lt,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:Pe(Lt,{direction:"row",spacing:.5,alignItems:"center",children:[M(Wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===a,"aria-label":"Previous page",children:M(Bm,{})}),t!==a&&M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),c&&M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(u=>M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),M(It,{variant:"soft",size:"sm",children:t}),l.map(u=>M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),p&&M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==i&&M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),M(Wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===i,"aria-label":"Next page",children:M(zm,{})})]})})}var KW=e=>M(Lm,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:t=>t.stopPropagation(),onMouseDown:t=>{var i;let r=t.clientX,o=(i=e.current)==null?void 0:i.getBoundingClientRect().width,n=s=>{o&&r&&(e.current.style.width=`${o+(s.clientX-r)}px`)},a=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)}}),XW=E("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"100%"}}),ZW=E("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>oe(V({},e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"}),{"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),QW=E("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),e9=g1(a1),t9=e=>{let{width:t,maxWidth:r,minWidth:o,stickyHeader:n,resizable:a,field:i,tableId:s,headerName:l,required:p,editMode:c,sort:u,onSortChange:f,sortable:d=!0,sortOrder:y}=e,h=xb(null),g=nr(()=>`${s}_header_${l!=null?l:i}`.trim(),[s,l,i]),b=a==null||a?KW(h):null,x={width:t,minWidth:o!=null?o:"50px",maxWidth:r,position:n?void 0:"relative",cursor:d?"pointer":"default",userSelect:"none"},v=v1(e),S=y[0],T=d&&M(e9,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":g,"aria-description":(u!=null?u:S)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:u?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(u!=null?u:S)==="desc"?180:0,opacity:u?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}});return Pe(g1.th,{id:g,"aria-label":l!=null?l:i,"aria-sort":u?{asc:"ascending",desc:"descending"}[u]:"none",ref:h,style:x,onClick:P=>d&&(f==null?void 0:f({field:i,currentSort:u,multiple:P.shiftKey})),whileHover:"hover",initial:"initial",children:[Pe(Lt,{gap:1,direction:"row",justifyContent:v,children:[v==="end"&&T,Pe("div",{children:[l!=null?l:i,c&&p&&M(QW,{children:"*"})]}),v==="start"&&T]}),b]},i)},r9=e=>{var T;let{tableId:t,field:r,type:o,renderCell:n,renderEditCell:a,isCellEditable:i,noWrap:s,row:l,rowId:p}=e,[c,u]=y1(l[r]),f=xb(null),d=nr(()=>({row:l,value:c,id:p}),[l,p,c]),y=nr(()=>!!(e.editMode&&(typeof i=="function"?i(d):i==null||i)),[e.editMode,i,d]),h=nr(()=>oe(V({},typeof e.componentProps=="function"?e.componentProps(d):e.componentProps||{}),{size:"sm"}),[e,d]),g=nr(()=>V(oe(V({},h),{onChange:P=>{var C,R;(C=h.onChange)==null||C.call(h,P),u(P.target.value),o==="select"&&((R=e.onCellEditStop)==null||R.call(e,oe(V({},d),{originalRow:l,row:oe(V({},d.row),{[r]:P.target.value}),value:P.target.value})))},onFocus:P=>{var C,R;(C=h.onFocus)==null||C.call(h,P),(R=e.onCellEditStart)==null||R.call(e,oe(V({},d),{originalRow:l,row:oe(V({},d.row),{value:c}),value:c}))},onBlur:P=>{var C,R;(C=h.onBlur)==null||C.call(h,P),o&&["number","text","longText","currency","date"].includes(o)&&((R=e.onCellEditStop)==null||R.call(e,oe(V({},d),{originalRow:l,row:oe(V({},d.row),{[r]:c}),value:c})))}}),o==="autocomplete"&&{onChangeComplete:P=>{var C,R;(C=h.onChangeComplete)==null||C.call(h,P),u(P.target.value),(R=e.onCellEditStop)==null||R.call(e,oe(V({},d),{originalRow:l,row:oe(V({},d.row),{[r]:P.target.value}),value:P.target.value}))}}),[d,l,r,c,h,o,e]),b=nr(()=>a?a(d):{date:M(d1,V({value:c},g)),currency:M(n1,V({value:c},g)),number:M(po,V({value:c,type:"number"},g)),text:M(po,V({value:c,type:"text"},g)),longText:M(f1,V({value:c},g)),autocomplete:M(ZE,V({value:c,options:g.options||[c]},g)),select:M(m1,V({value:c,options:g.options||[c]},g))}[o||"text"],[c,g,o]),x=nr(()=>{if(n)return n(d);let P=c;return{link:GW.createElement(e.component||oa,V({children:P},h))}[o||"text"]||P},[c,n,d,o,h,e]),v=nr(()=>y&&b?b:x,[y,b,x]),S=nr(()=>s&&e.type==="longText",[s,e.type]);return mh(()=>{u(l[r])},[l,r]),M("td",{ref:f,headers:`${t}_header_${(T=e.headerName)!=null?T:r}`,style:{textAlign:v1({type:o}),verticalAlign:y?"top":"middle"},children:S?M(h1,{title:c,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500,children:M("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:v})}):v},r)},o9=e=>{let{tableId:t,columns:r,rowId:o,editMode:n,noWrap:a,row:i}=e;return M(Bo,{children:r.map((s,l)=>f0(r9,oe(V({},s),{tableId:t,key:`${o}_${s.field.toString()}_${l}`,row:i,rowId:o,editMode:n,noWrap:a})))})};function n9({rows:e,columns:t,rowCount:r,pagination:o,paginationMode:n,paginationModel:a,onPaginationModelChange:i,sortModel:s,sortOrder:l=["asc","desc",null],selectionModel:p=[],onSortModelChange:c,onSelectionModelChange:u,editMode:f,getId:d,isTotalSelected:y}){let[h,g]=Rr(s,[],da(B=>c==null?void 0:c(B),[c])),b=nr(()=>t.reduce((B,U)=>oe(V({},B),{[U.field]:U}),{}),[t]),x=da((B,U)=>{for(let z of h){let{field:k,sort:q}=z,re=B[k],D=U[k],pe=b[k],me=0;if(pe.sortComparator?me=pe.sortComparator({rowA:B,rowB:U}):typeof re=="string"&&typeof D=="string"?me=re.localeCompare(D):typeof re=="number"&&typeof D=="number"?me=re-D:re instanceof Date&&D instanceof Date&&(me=re.getTime()-D.getTime()),me!==0)return q==="asc"?me:-me}return 0},[h,b]),v=nr(()=>h.length?[...e].sort(x):e,[e,h,x]),S=nr(()=>Array.from(new Set(l)),[l]),[T,P]=y1((a==null?void 0:a.page)||1),C=(a==null?void 0:a.pageSize)||20,R=da((B,U)=>{var z,k;return(k=(z=d==null?void 0:d(B))!=null?z:B.id)!=null?k:`${(U||0)+(T-1)*C}`},[d,T,C]),_=nr(()=>new Set(p),[p]),O=nr(()=>!o||n==="server"?v:v.slice((T-1)*C,(T-1)*C+C),[v,T,C,n,o]),N=nr(()=>O.length>0&&O.every((B,U)=>_.has(R(B,U))),[O,_,R]),A=r||v.length,I=nr(()=>y!=null?y:A>0&&p.length===A,[y,p,A]),F=nr(()=>(t||Object.keys(v[0]||{}).map(U=>({field:U}))).map(U=>{var z,k,q;return oe(V({},U),{isCellEditable:f&&(typeof U.isCellEditable=="function"?U.isCellEditable:(z=U.isCellEditable)!=null?z:!0),sort:(k=h.find(re=>re.field===U.field))==null?void 0:k.sort,sortOrder:((q=b[U.field])==null?void 0:q.sortOrder)||S})}),[v,t,f,h,b,S]),L=da(B=>{P(B),i==null||i({page:B,pageSize:C})},[i,C]),w=da(B=>{let{field:U,currentSort:z,multiple:k}=B,re=b[U].sortOrder||S;if(z!==void 0){let pe=(re.indexOf(z)+1)%re.length,me=re[pe];if(!me){let ae=k?h.filter(W=>W.field!==U):[];g(ae);return}let De=k?h.map(ae=>ae.field===U?{field:U,sort:me}:ae):[{field:U,sort:me}];g(De)}else{let D=k?[...h,{field:U,sort:re[0]}]:[{field:U,sort:re[0]}];g(D)}},[S,b,h,g]);return mh(()=>{a||L(1)},[A,L,a]),mh(()=>{let B=Math.max(1,Math.ceil(A/C));T>B&&L(B)},[T,A,C,L]),mh(()=>{u==null||u([])},[T]),{rowCount:A,page:T,pageSize:C,onPaginationModelChange:L,getId:R,HeadCell:t9,BodyRow:o9,dataInPage:O,handleSortChange:w,isAllSelected:N,isTotalSelected:I,isSelectedRow:da(B=>_.has(B),[_]),onAllCheckboxChange:da(()=>{u==null||u(N?[]:O.map(R))},[N,O,u,R]),onCheckboxChange:da((B,U)=>{if(_.has(U)){let z=p.filter(k=>k!==U);u==null||u(z)}else{let z=[...p,U];u==null||u(z)}},[p,u,_]),columns:F,onTotalSelect:da(()=>{u==null||u(I?[]:v.map(R),!I)},[I,v,u,R])}}function Tb(e){let Le=e,{rows:t,checkboxSelection:r,editMode:o,selectionModel:n,onSelectionModelChange:a,disableSelectionOnClick:i,onRowClick:s,rowCount:l,columns:p,onPaginationModelChange:c,pagination:u,paginationMode:f,paginationModel:d,sortModel:y,sortOrder:h,onSortModelChange:g,loading:b,slots:{checkbox:x=jc,toolbar:v,footer:S,loadingOverlay:T=()=>M(hc,{value:8,variant:"plain"})}={},slotProps:{checkbox:P={},toolbar:C,background:R={}}={},stripe:_}=Le,O=ve(Le,["rows","checkboxSelection","editMode","selectionModel","onSelectionModelChange","disableSelectionOnClick","onRowClick","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","sortModel","sortOrder","onSortModelChange","loading","slots","slotProps","stripe"]),N=YW(),A=xb(null),{columns:I,isAllSelected:F,isSelectedRow:L,onAllCheckboxChange:w,onCheckboxChange:B,getId:U,rowCount:z,page:k,pageSize:q,onPaginationModelChange:re,handleSortChange:D,dataInPage:pe,isTotalSelected:me,onTotalSelect:De,HeadCell:ae,BodyRow:W}=n9(e),de=Am({count:pe.length,getScrollElement:()=>A.current,estimateSize:()=>32,measureElement:Ve=>Ve.clientHeight,overscan:20}),fe=nr(()=>({page:k,pageSize:q}),[k,q]),Ce=de.getTotalSize(),be=de.getVirtualItems();return Pe(Lm,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"},children:[(!!r||!!v)&&Pe(Lt,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&Pe(Lt,{direction:"row",spacing:1,children:[!F&&Pe(qr,{level:"body-xs",children:[fh((n==null?void 0:n.length)||0)," items selected"]}),F&&!me&&Pe(Lt,{direction:"row",spacing:1,alignItems:"center",children:[Pe(qr,{level:"body-xs",children:["All ",fh((n==null?void 0:n.length)||0)," items on this page are selected."]}),Pe(It,{size:"sm",variant:"plain",onClick:De,children:["Select all ",fh(z!=null?z:t.length)," items"]})]}),me&&Pe(Lt,{direction:"row",spacing:1,alignItems:"center",children:[Pe(qr,{level:"body-xs",children:["All ",fh(z!=null?z:t.length)," items are selected."]}),M(It,{size:"sm",variant:"plain",color:"danger",onClick:De,children:"Cancel"})]})]}),v&&M(v,V({},C||{}))]}),M(Fo,oe(V({variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:A},R),{children:Pe(Qc,oe(V({},O),{children:[M("thead",{children:Pe("tr",{children:[r&&M("th",{style:{width:"40px",textAlign:"center"},children:M(x,V({onChange:w,checked:F,indeterminate:(n||[]).length>0&&!F},P))}),I.map((Ve,te)=>M(ae,V({tableId:N,stickyHeader:e.stickyHeader,editMode:!!Ve.isCellEditable,onSortChange:D},Ve),`${Ve.field.toString()}_${te}`))]})}),Pe(XW,{style:{height:`${Ce}px`},children:[!!b&&M(JW,{children:M("td",{children:M(Lm,{sx:{position:"absolute",top:0,left:0,right:0},children:M(T,{})})})}),be.map((Ve,te)=>{let X=Ve.index,ye=pe[X],ge=U(ye,X),$e=_&&(_==="even"&&(X+1)%2===0||_==="odd"&&(X+1)%2===1);return Pe(ZW,{role:r&&!i?"checkbox":void 0,tabIndex:r&&!i?-1:void 0,onClick:Re=>{s==null||s({row:ye,rowId:ge},Re),r&&!i&&B(Re,ge)},"aria-checked":r&&!i?L(ge):void 0,striped:$e,style:{height:`${Ve.size}px`,transform:`translateY(${Ve.start-te*Ve.size}px)`},children:[r&&M("th",{scope:"row",style:{textAlign:"center"},children:M(x,V({onClick:Re=>Re.stopPropagation(),onChange:Re=>B(Re,ge),checked:L(ge)},P))}),M(W,{tableId:N,columns:I,row:ye,rowId:ge,editMode:o,noWrap:e.noWrap})]},ge)})]}),S&&M(S,{})]}))})),u&&M(qW,{paginationModel:fe,rowCount:z,onPageChange:re})]})}Tb.displayName="DataTable";import a9,{forwardRef as i9,useCallback as hh,useEffect as s9,useImperativeHandle as l9,useMemo as p9,useRef as c9,useState as u9}from"react";var d9=E(Ut,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),f9=E(Fo,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),m9=E("div",{name:"DateRangePicker",slot:"root"})({width:"100%"}),x1=([e,t],r)=>{let o=n=>{let a=`${n.getDate()}`,i=`${n.getMonth()+1}`,s=n.getFullYear();return Number(a)<10&&(a="0"+a),Number(i)<10&&(i="0"+i),r.replace(/YYYY/g,s.toString()).replace(/MM/g,i).replace(/DD/g,a)};return[o(e),t?o(t):""].join(" - ")};function b1(e,t){let r=t.split(/[-./\s]/),o=e.split(/[-./\s]/),n,a,i;for(let l=0;l<r.length;l++){let p=parseInt(o[l],10);switch(r[l]){case"DD":n=p;break;case"MM":a=p-1;break;case"YYYY":i=p;break}}return new Date(i,a,n)}var T1=(e,t)=>{let r=e.split(" - ")[0]||"",o=e.split(" - ")[1]||"";return[b1(r,t),b1(o,t)]},h9=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,t=>`${t}\``),y9=a9.forwardRef(function(t,r){let i=t,{onChange:o,format:n}=i,a=ve(i,["onChange","format"]);return M(ua,oe(V({},a),{inputRef:r,onAccept:s=>o({target:{name:t.name,value:s}}),mask:Date,pattern:h9(n),blocks:{D:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},M:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:s=>x1(s,n),parse:s=>T1(s,n),autofix:"pad",overwrite:!0}))}),Pb=i9((e,t)=>{let r=Y({props:e,name:"DateRangePicker"}),A=r,{onChange:o,disabled:n,label:a,error:i,helperText:s,minDate:l,maxDate:p,disableFuture:c,disablePast:u,required:f,sx:d,className:y,format:h="YYYY/MM/DD",size:g}=A,b=ve(A,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className","format","size"]),x=c9(null),[v,S]=Rr(r.value,r.defaultValue||"",hh(I=>o==null?void 0:o({target:{name:r.name,value:I}}),[r.name,o]),{disableStrict:!0}),[T,P]=u9(null),C=!!T,R=p9(()=>v?T1(v,h):void 0,[v,h]);s9(()=>{var I;T||(I=x.current)==null||I.blur()},[T,x]),l9(t,()=>x.current,[x]);let _=hh(I=>{S(I.target.value)},[S]),O=hh(I=>{var F;P(T?null:I.currentTarget),(F=x.current)==null||F.focus()},[T,P,x]),N=hh(([I,F])=>{!I||!F||(S(x1([I,F],h)),P(null))},[S,P,h]);return M(m9,{children:M(Wr,{open:!0,children:Pe(Bo,{children:[M(po,oe(V({},b),{color:i?"danger":b.color,ref:t,size:g,value:v,onChange:_,disabled:n,required:f,placeholder:`${h} - ${h}`,slotProps:{input:{component:y9,ref:x,format:h}},error:i,className:y,sx:d,endDecorator:M(Wt,{variant:"plain",onClick:O,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:M(ci,{})}),label:a,helperText:s})),C&&M($n,{onClickAway:()=>P(null),children:M(d9,{id:"date-range-picker-popper",open:!0,anchorEl:T,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(f9,{tabIndex:-1,role:"presentation",children:[M(ni,{rangeSelection:!0,defaultValue:R,onChange:N,minDate:l?new Date(l):void 0,maxDate:p?new Date(p):void 0,disableFuture:c,disablePast:u}),M(En,{sx:{p:1},children:M(It,{size:g,variant:"plain",color:"neutral",onClick:()=>{S(""),P(null)},children:"Clear"})})]})})})]})})})});Pb.displayName="DateRangePicker";import{motion as g9}from"framer-motion";var v9=g9(Il),Cb=e=>{var i;let a=e,{children:t,size:r}=a,o=ve(a,["children","size"]),n=Mp();return M(v9,oe(V({},o),{slotProps:oe(V({},o.slotProps),{content:oe(V({},(i=o.slotProps)==null?void 0:i.content),{sx:{bgcolor:"transparent",boxShadow:"none",[n.breakpoints.down("md")]:{width:"100%"}}})}),sx:oe(V({},e.sx),{"--Drawer-horizontalSize":{sm:"360px",md:"600px",lg:"900px"}[r||"md"]}),children:t}))};Cb.displayName="Drawer";import{motion as b9}from"framer-motion";var x9=b9(Df),T9=E(x9)(({theme:e})=>({padding:e.spacing(0,6,5)})),lu=T9;lu.displayName="DialogContent";var yh=lu;import{motion as P9}from"framer-motion";var C9=P9(wf),S9=E(C9)(({theme:e})=>({padding:e.spacing(4,6)})),pu=S9;pu.displayName="DialogTitle";var gh=pu;import I9 from"react";import{motion as Sb}from"framer-motion";var k9=Sb(Nf),kb=k9;kb.displayName="Modal";var P1=E(Kf)({padding:0}),cu=P1;cu.displayName="ModalDialog";var R9=E(Sb(qf))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),vh=R9;vh.displayName="ModalClose";var E9=Sb(Zf),Rb=E9;Rb.displayName="ModalOverflow";function Eb(e){let n=e,{title:t,children:r}=n,o=ve(n,["title","children"]);return Pe(P1,oe(V({},o),{children:[M(vh,{}),M(gh,{children:t}),M(yh,{children:r})]}))}Eb.displayName="ModalFrame";var O9=E(cu,{name:"Dialog",slot:"Root"})({padding:0}),Ib=I9.forwardRef((e,t)=>{let s=e,{title:r,children:o,actions:n,fullscreen:a}=s,i=ve(s,["title","children","actions","fullscreen"]);return Pe(O9,oe(V({layout:a?"fullscreen":"center",ref:t},i),{children:[M(gh,{children:r}),M(yh,{children:o}),M(En,{children:n})]}))});Ib.displayName="DialogFrame";import{motion as _9}from"framer-motion";var D9=_9(Af),uu=e=>M(D9,V({},e));uu.displayName="Divider";import{motion as w9}from"framer-motion";var A9=w9(Il),Ob=e=>{var n;let o=e,{children:t}=o,r=ve(o,["children"]);return M(A9,oe(V({},r),{slotProps:oe(V({},r.slotProps),{content:oe(V({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};Ob.displayName="InsetDrawer";import{motion as M9}from"framer-motion";var N9=M9(Vf),_b=N9;_b.displayName="Grid";function C1(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var L9=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,B9=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,z9={};function bh(e,t){return((t||z9).jsx?B9:L9).test(e)}var F9=/[ \t\n\f\r]/g;function Db(e){return typeof e=="object"?e.type==="text"?S1(e.value):!1:S1(e)}function S1(e){return e.replace(F9,"")===""}var fa=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};fa.prototype.property={};fa.prototype.normal={};fa.prototype.space=null;function wb(e,t){let r={},o={},n=-1;for(;++n<e.length;)Object.assign(r,e[n].property),Object.assign(o,e[n].normal);return new fa(r,o,t)}function du(e){return e.toLowerCase()}var _r=class{constructor(t,r){this.property=t,this.attribute=r}};_r.prototype.space=null;_r.prototype.boolean=!1;_r.prototype.booleanish=!1;_r.prototype.overloadedBoolean=!1;_r.prototype.number=!1;_r.prototype.commaSeparated=!1;_r.prototype.spaceSeparated=!1;_r.prototype.commaOrSpaceSeparated=!1;_r.prototype.mustUseProperty=!1;_r.prototype.defined=!1;var fu={};RT(fu,{boolean:()=>je,booleanish:()=>Ot,commaOrSpaceSeparated:()=>Kr,commaSeparated:()=>ui,number:()=>he,overloadedBoolean:()=>Ab,spaceSeparated:()=>pt});var $9=0,je=ms(),Ot=ms(),Ab=ms(),he=ms(),pt=ms(),ui=ms(),Kr=ms();function ms(){return 2**++$9}var Mb=Object.keys(fu),hs=class extends _r{constructor(t,r,o,n){let a=-1;if(super(t,r),k1(this,"space",n),typeof o=="number")for(;++a<Mb.length;){let i=Mb[a];k1(this,Mb[a],(o&fu[i])===fu[i])}}};hs.prototype.defined=!0;function k1(e,t,r){r&&(e[t]=r)}var V9={}.hasOwnProperty;function $o(e){let t={},r={},o;for(o in e.properties)if(V9.call(e.properties,o)){let n=e.properties[o],a=new hs(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,r[du(o)]=o,r[du(a.attribute)]=o}return new fa(t,r,e.space)}var Nb=$o({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Lb=$o({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function xh(e,t){return t in e?e[t]:t}function Th(e,t){return xh(e,t.toLowerCase())}var Bb=$o({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Th,properties:{xmlns:null,xmlnsXLink:null}});var zb=$o({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:pt,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:he,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:pt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Ot,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null}});var R1=$o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Th,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ui,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:pt,autoFocus:je,autoPlay:je,blocking:pt,capture:null,charSet:null,checked:je,cite:null,className:pt,cols:he,colSpan:null,content:null,contentEditable:Ot,controls:je,controlsList:pt,coords:he|ui,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Ab,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:pt,height:he,hidden:je,high:he,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:pt,itemRef:pt,itemScope:je,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:he,pattern:null,ping:pt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:pt,required:je,reversed:je,rows:he,rowSpan:he,sandbox:pt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Ot,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:he,security:null,unselectable:null}});var E1=$o({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:xh,properties:{about:Kr,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ui,g2:ui,glyphName:ui,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kr,rev:Kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kr,requiredFeatures:Kr,requiredFonts:Kr,requiredFormats:Kr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kr,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var j9=/^data[-\w.:]+$/i,I1=/-[a-z]/g,H9=/[A-Z]/g;function Fb(e,t){let r=du(t),o=t,n=_r;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&j9.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(I1,W9);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!I1.test(a)){let i=a.replace(H9,U9);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=hs}return new n(o,t)}function U9(e){return"-"+e.toLowerCase()}function W9(e){return e.charAt(1).toUpperCase()}var $b={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var O1=wb([Lb,Nb,Bb,zb,R1],"html"),Ph=wb([Lb,Nb,Bb,zb,E1],"svg");function _1(e){return e.join(" ").trim()}var Vb=An(B1(),1),z1=Vb.default.default||Vb.default;var Ch=F1("end"),Jl=F1("start");function F1(e){return t;function t(r){let o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function jb(e){let t=Jl(e),r=Ch(e);if(t&&r)return{start:t,end:r}}function di(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?$1(e.position):"start"in e||"end"in e?$1(e):"line"in e||"column"in e?Hb(e):""}function Hb(e){return V1(e&&e.line)+":"+V1(e&&e.column)}function $1(e){return Hb(e&&e.start)+"-"+Hb(e&&e.end)}function V1(e){return e&&typeof e=="number"?e:1}var Bt=class extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let n="",a={},i=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a=V({},r)),typeof t=="string"?n=t:!a.cause&&t&&(i=!0,n=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){let l=o.indexOf(":");l===-1?a.ruleId=o:(a.source=o.slice(0,l),a.ruleId=o.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){let l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}let s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=s?s.line:void 0,this.name=di(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}};Bt.prototype.file="";Bt.prototype.name="";Bt.prototype.reason="";Bt.prototype.message="";Bt.prototype.stack="";Bt.prototype.column=void 0;Bt.prototype.line=void 0;Bt.prototype.ancestors=void 0;Bt.prototype.cause=void 0;Bt.prototype.fatal=void 0;Bt.prototype.place=void 0;Bt.prototype.ruleId=void 0;Bt.prototype.source=void 0;var Ub={}.hasOwnProperty,a6=new Map,i6=/[A-Z]/g,s6=/-([a-z])/g,l6=new Set(["table","tbody","thead","tfoot","tr"]),p6=new Set(["td","th"]),j1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Wb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let r=t.filePath||void 0,o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=g6(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=y6(r,t.jsx,t.jsxs)}let n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ph:O1,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=H1(n,e,void 0);return a&&typeof a!="string"?a:n.create(e,n.Fragment,{children:a||void 0},void 0)}function H1(e,t,r){if(t.type==="element")return c6(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return u6(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return f6(e,t,r);if(t.type==="mdxjsEsm")return d6(e,t);if(t.type==="root")return m6(e,t,r);if(t.type==="text")return h6(e,t)}function c6(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=Ph,e.schema=n),e.ancestors.push(t);let a=W1(e,t.tagName,!1),i=v6(e,t),s=Yb(e,t);return l6.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Db(l):!0})),U1(e,i,a,t),Gb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function u6(e,t){if(t.data&&t.data.estree&&e.evaluater){let o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}hu(e,t.position)}function d6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hu(e,t.position)}function f6(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=Ph,e.schema=n),e.ancestors.push(t);let a=t.name===null?e.Fragment:W1(e,t.name,!0),i=b6(e,t),s=Yb(e,t);return U1(e,i,a,t),Gb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function m6(e,t,r){let o={};return Gb(o,Yb(e,t)),e.create(t,e.Fragment,o,r)}function h6(e,t){return t.value}function U1(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function Gb(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function y6(e,t,r){return o;function o(n,a,i,s){let p=Array.isArray(i.children)?r:t;return s?p(a,i,s):p(a,i)}}function g6(e,t){return r;function r(o,n,a,i){let s=Array.isArray(a.children),l=Jl(o);return t(n,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function v6(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&Ub.call(t.properties,n)){let a=x6(e,n,t.properties[n]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&p6.has(t.tagName)?o=s:r[i]=s}}if(o){let a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function b6(e,t){let r={};for(let o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){let a=o.data.estree.body[0];a.type;let i=a.expression;i.type;let s=i.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else hu(e,t.position);else{let n=o.name,a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){let s=o.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else hu(e,t.position);else a=o.value===null?!0:o.value;r[n]=a}return r}function Yb(e,t){let r=[],o=-1,n=e.passKeys?new Map:a6;for(;++o<t.children.length;){let a=t.children[o],i;if(e.passKeys){let l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){let p=n.get(l)||0;i=l+"-"+p,n.set(l,p+1)}}let s=H1(e,a,i);s!==void 0&&r.push(s)}return r}function x6(e,t,r){let o=Fb(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?C1(r):_1(r)),o.property==="style"){let n=typeof r=="object"?r:T6(e,String(r));return e.stylePropertyNameCase==="css"&&(n=P6(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?$b[o.property]||o.property:o.attribute,r]}}function T6(e,t){let r={};try{z1(t,o)}catch(n){if(!e.ignoreInvalidStyle){let a=n,i=new Bt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=j1+"#cannot-parse-style-attribute",i}}return r;function o(n,a){let i=n;i.slice(0,2)!=="--"&&(i.slice(0,4)==="-ms-"&&(i="ms-"+i.slice(4)),i=i.replace(s6,S6)),r[i]=a}}function W1(e,t,r){let o;if(!r)o={type:"Literal",value:t};else if(t.includes(".")){let n=t.split("."),a=-1,i;for(;++a<n.length;){let s=bh(n[a])?{type:"Identifier",name:n[a]}:{type:"Literal",value:n[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}o=i}else o=bh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return Ub.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);hu(e)}function hu(e,t){let r=new Bt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=j1+"#cannot-handle-mdx-estrees-without-createevaluater",r}function P6(e){let t={},r;for(r in e)Ub.call(e,r)&&(t[C6(r)]=e[r]);return t}function C6(e){let t=e.replace(i6,k6);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function S6(e,t){return t.toUpperCase()}function k6(e){return"-"+e.toLowerCase()}var yu={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};import{Fragment as _G,jsx as DG,jsxs as wG}from"react/jsx-runtime";var R6={};function Jb(e,t){let r=t||R6,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Y1(e,o,n)}function Y1(e,t,r){if(E6(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return G1(e.children,t,r)}return Array.isArray(e)?G1(e,t,r):""}function G1(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=Y1(e[n],t,r);return o.join("")}function E6(e){return!!(e&&typeof e=="object")}var J1=document.createElement("i");function ql(e){let t="&"+e+";";J1.innerHTML=t;let r=J1.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Dr(e,t,r,o){let n=e.length,a=0,i;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,o.length<1e4)i=Array.from(o),i.unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);a<o.length;)i=o.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Fr(e,t){return e.length>0?(Dr(e,e.length,0,t),e):t}var q1={}.hasOwnProperty;function K1(e){let t={},r=-1;for(;++r<e.length;)I6(t,e[r]);return t}function I6(e,t){let r;for(r in t){let n=(q1.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){q1.call(n,i)||(n[i]=[]);let s=a[i];O6(n[i],Array.isArray(s)?s:s?[s]:[])}}}function O6(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);Dr(e,0,0,o)}function Sh(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function ma(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var uo=fi(/[A-Za-z]/),ar=fi(/[\dA-Za-z]/),X1=fi(/[#-'*+\--9=?A-Z^-~]/);function gu(e){return e!==null&&(e<32||e===127)}var vu=fi(/\d/),Z1=fi(/[\dA-Fa-f]/),Q1=fi(/[!-/:-@[-`{-~]/);function we(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}var eO=fi(new RegExp("\\p{P}|\\p{S}","u")),tO=fi(/\s/);function fi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Vo(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&ar(e.charCodeAt(r+1))&&ar(e.charCodeAt(r+2)))n=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){let s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),n=1):i="\uFFFD"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,r),encodeURIComponent(i)),o=r+n+1,i=""),n&&(r+=n,n=0)}return t.join("")+e.slice(o)}function We(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return He(l)?(e.enter(r),s(l)):t(l)}function s(l){return He(l)&&a++<n?(e.consume(l),s):(e.exit(r),t(l))}}var rO={tokenize:_6};function _6(e){let t=e.attempt(this.parser.constructs.contentInitial,o,n),r;return t;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),We(e,t,"linePrefix")}function n(s){return e.enter("paragraph"),a(s)}function a(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return we(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var nO={tokenize:D6},oO={tokenize:w6};function D6(e){let t=this,r=[],o=0,n,a,i;return s;function s(v){if(o<r.length){let S=r[o];return t.containerState=S[1],e.attempt(S[0].continuation,l,p)(v)}return p(v)}function l(v){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let S=t.events.length,T=S,P;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){P=t.events[T][1].end;break}b(o);let C=S;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},P),C++;return Dr(t.events,T+1,0,t.events.slice(S)),t.events.length=C,p(v)}return s(v)}function p(v){if(o===r.length){if(!n)return f(v);if(n.currentConstruct&&n.currentConstruct.concrete)return y(v);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(oO,c,u)(v)}function c(v){return n&&x(),b(o),f(v)}function u(v){return t.parser.lazy[t.now().line]=o!==r.length,i=t.now().offset,y(v)}function f(v){return t.containerState={},e.attempt(oO,d,y)(v)}function d(v){return o++,r.push([t.currentConstruct,t.containerState]),f(v)}function y(v){if(v===null){n&&x(),b(0),e.consume(v);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:n}),h(v)}function h(v){if(v===null){g(e.exit("chunkFlow"),!0),b(0),e.consume(v);return}return we(v)?(e.consume(v),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(v),h)}function g(v,S){let T=t.sliceStream(v);if(S&&T.push(null),v.previous=a,a&&(a.next=v),a=v,n.defineSkip(v.start),n.write(T),t.parser.lazy[v.start.line]){let P=n.events.length;for(;P--;)if(n.events[P][1].start.offset<i&&(!n.events[P][1].end||n.events[P][1].end.offset>i))return;let C=t.events.length,R=C,_,O;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(_){O=t.events[R][1].end;break}_=!0}for(b(o),P=C;P<t.events.length;)t.events[P][1].end=Object.assign({},O),P++;Dr(t.events,R+1,0,t.events.slice(C)),t.events.length=P}}function b(v){let S=r.length;for(;S-- >v;){let T=r[S];t.containerState=T[1],T[0].exit.call(t,e)}r.length=v}function x(){n.write([null]),a=void 0,n=void 0,t.containerState._closeFlow=void 0}}function w6(e,t,r){return We(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qb(e){if(e===null||zt(e)||tO(e))return 1;if(eO(e))return 2}function Kl(e,t,r){let o=[],n=-1;for(;++n<e.length;){let a=e[n].resolveAll;a&&!o.includes(a)&&(t=a(t,r),o.push(a))}return t}var bu={name:"attention",tokenize:M6,resolveAll:A6};function A6(e,t){let r=-1,o,n,a,i,s,l,p,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(o=r;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[o][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[o][1].end.offset-e[o][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let u=Object.assign({},e[o][1].end),f=Object.assign({},e[r][1].start);aO(u,-l),aO(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[o][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[r][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[o][1].end=Object.assign({},i.start),e[r][1].start=Object.assign({},s.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=Fr(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=Fr(p,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),p=Fr(p,Kl(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=Fr(p,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,p=Fr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Dr(e,o-1,r-o+3,p),r=o+p.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function M6(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=qb(o),a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;let p=e.exit("attentionSequence"),c=qb(l),u=!c||c===2&&n||r.includes(l),f=!n||n===2&&c||r.includes(o);return p._open=!!(a===42?u:u&&(n||!f)),p._close=!!(a===42?f:f&&(c||!u)),t(l)}}function aO(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Kb={name:"autolink",tokenize:N6};function N6(e,t,r){let o=0;return n;function n(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return uo(d)?(e.consume(d),i):p(d)}function i(d){return d===43||d===45||d===46||ar(d)?(o=1,s(d)):p(d)}function s(d){return d===58?(e.consume(d),o=0,l):(d===43||d===45||d===46||ar(d))&&o++<32?(e.consume(d),s):(o=0,p(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||gu(d)?r(d):(e.consume(d),l)}function p(d){return d===64?(e.consume(d),c):X1(d)?(e.consume(d),p):r(d)}function c(d){return ar(d)?u(d):r(d)}function u(d){return d===46?(e.consume(d),o=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||ar(d))&&o++<63){let y=d===45?f:u;return e.consume(d),y}return r(d)}}var mi={tokenize:L6,partial:!0};function L6(e,t,r){return o;function o(a){return He(a)?We(e,n,"linePrefix")(a):n(a)}function n(a){return a===null||we(a)?t(a):r(a)}}var kh={name:"blockQuote",tokenize:B6,continuation:{tokenize:z6},exit:F6};function B6(e,t,r){let o=this;return n;function n(i){if(i===62){let s=o.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return r(i)}function a(i){return He(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function z6(e,t,r){let o=this;return n;function n(i){return He(i)?We(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(kh,t,r)(i)}}function F6(e){e.exit("blockQuote")}var Rh={name:"characterEscape",tokenize:$6};function $6(e,t,r){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),n}function n(a){return Q1(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var Eh={name:"characterReference",tokenize:V6};function V6(e,t,r){let o=this,n=0,a,i;return s;function s(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,i=ar,c(u))}function p(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=Z1,c):(e.enter("characterReferenceValue"),a=7,i=vu,c(u))}function c(u){if(u===59&&n){let f=e.exit("characterReferenceValue");return i===ar&&!ql(o.sliceSerialize(f))?r(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(u)&&n++<a?(e.consume(u),c):r(u)}}var iO={tokenize:H6,partial:!0},Ih={name:"codeFenced",tokenize:j6,concrete:!0};function j6(e,t,r){let o=this,n={tokenize:T,partial:!0},a=0,i=0,s;return l;function l(P){return p(P)}function p(P){let C=o.events[o.events.length-1];return a=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(P)}function c(P){return P===s?(i++,e.consume(P),c):i<3?r(P):(e.exit("codeFencedFenceSequence"),He(P)?We(e,u,"whitespace")(P):u(P))}function u(P){return P===null||we(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(iO,h,S)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(P))}function f(P){return P===null||we(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(P)):He(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),We(e,d,"whitespace")(P)):P===96&&P===s?r(P):(e.consume(P),f)}function d(P){return P===null||we(P)?u(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(P))}function y(P){return P===null||we(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(P)):P===96&&P===s?r(P):(e.consume(P),y)}function h(P){return e.attempt(n,S,g)(P)}function g(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b}function b(P){return a>0&&He(P)?We(e,x,"linePrefix",a+1)(P):x(P)}function x(P){return P===null||we(P)?e.check(iO,h,S)(P):(e.enter("codeFlowValue"),v(P))}function v(P){return P===null||we(P)?(e.exit("codeFlowValue"),x(P)):(e.consume(P),v)}function S(P){return e.exit("codeFenced"),t(P)}function T(P,C,R){let _=0;return O;function O(L){return P.enter("lineEnding"),P.consume(L),P.exit("lineEnding"),N}function N(L){return P.enter("codeFencedFence"),He(L)?We(P,A,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):A(L)}function A(L){return L===s?(P.enter("codeFencedFenceSequence"),I(L)):R(L)}function I(L){return L===s?(_++,P.consume(L),I):_>=i?(P.exit("codeFencedFenceSequence"),He(L)?We(P,F,"whitespace")(L):F(L)):R(L)}function F(L){return L===null||we(L)?(P.exit("codeFencedFence"),C(L)):R(L)}}}function H6(e,t,r){let o=this;return n;function n(i){return i===null?r(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}var xu={name:"codeIndented",tokenize:W6},U6={tokenize:G6,partial:!0};function W6(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),We(e,a,"linePrefix",5)(p)}function a(p){let c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(p):r(p)}function i(p){return p===null?l(p):we(p)?e.attempt(U6,i,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||we(p)?(e.exit("codeFlowValue"),i(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function G6(e,t,r){let o=this;return n;function n(i){return o.parser.lazy[o.now().line]?r(i):we(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):We(e,a,"linePrefix",5)(i)}function a(i){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):we(i)?n(i):r(i)}}var Xb={name:"codeText",tokenize:q6,resolve:Y6,previous:J6};function Y6(e){let t=e.length-4,r=3,o,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o<t;)if(e[o][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(o=r-1,t++;++o<=t;)n===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(n=o):(o===t||e[o][1].type==="lineEnding")&&(e[n][1].type="codeTextData",o!==n+2&&(e[n][1].end=e[o-1][1].end,e.splice(n+2,o-n-2),t-=o-n-2,o=n+2),n=void 0);return e}function J6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function q6(e,t,r){let o=this,n=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),p(f))}function p(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),p):f===96?(i=e.enter("codeTextSequence"),a=0,u(f)):we(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),p):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||we(f)?(e.exit("codeTextData"),p(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),a++,u):a===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}var Oh=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let o=r==null?Number.POSITIVE_INFINITY:r;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){let n=r||0;this.setCursor(Math.trunc(t));let a=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return o&&Tu(this.left,o),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Tu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Tu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);Tu(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Tu(this.left,r.reverse())}}};function Tu(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function _h(e){let t={},r=-1,o,n,a,i,s,l,p,c=new Oh(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(o=c.get(r),r&&o[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=o[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,K6(c,r)),r=t[r],p=!0);else if(o[1]._container){for(a=r,n=void 0;a--&&(i=c.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=a);n&&(o[1].end=Object.assign({},c.get(n)[1].start),s=c.slice(n,r),s.unshift(o),c.splice(n,r-n+1,s))}}return Dr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function K6(e,t){let r=e.get(t)[1],o=e.get(t)[2],n=t-1,a=[],i=r._tokenizer||o.parser[r.contentType](r.start),s=i.events,l=[],p={},c,u,f=-1,d=r,y=0,h=0,g=[h];for(;d;){for(;e.get(++n)[1]!==d;);a.push(n),d._tokenizer||(c=o.sliceStream(d),d.next||c.push(null),u&&i.defineSkip(d.start),d._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),d._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(i.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),f=g.length;f--;){let b=s.slice(g[f],g[f+1]),x=a.pop();l.push([x,x+b.length-1]),e.splice(x,2,b)}for(l.reverse(),f=-1;++f<l.length;)p[y+l[f][0]]=y+l[f][1],y+=l[f][1]-l[f][0]-1;return p}var Zb={tokenize:Q6,resolve:Z6},X6={tokenize:e7,partial:!0};function Z6(e){return _h(e),e}function Q6(e,t){let r;return o;function o(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?a(s):we(s)?e.check(X6,i,a)(s):(e.consume(s),n)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function e7(e,t,r){let o=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),We(e,a,"linePrefix")}function a(i){if(i===null||we(i))return r(i);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(o.parser.constructs.flow,r,t)(i)}}function Dh(e,t,r,o,n,a,i,s,l){let p=l||Number.POSITIVE_INFINITY,c=0;return u;function u(b){return b===60?(e.enter(o),e.enter(n),e.enter(a),e.consume(b),e.exit(a),f):b===null||b===32||b===41||gu(b)?r(b):(e.enter(o),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function f(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(n),e.exit(o),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(e.exit("chunkString"),e.exit(s),f(b)):b===null||b===60||we(b)?r(b):(e.consume(b),b===92?y:d)}function y(b){return b===60||b===62||b===92?(e.consume(b),d):d(b)}function h(b){return!c&&(b===null||b===41||zt(b))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(o),t(b)):c<p&&b===40?(e.consume(b),c++,h):b===41?(e.consume(b),c--,h):b===null||b===32||b===40||gu(b)?r(b):(e.consume(b),b===92?g:h)}function g(b){return b===40||b===41||b===92?(e.consume(b),h):h(b)}}function wh(e,t,r,o,n,a){let i=this,s=0,l;return p;function p(d){return e.enter(o),e.enter(n),e.consume(d),e.exit(n),e.enter(a),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):d===93?(e.exit(a),e.enter(n),e.consume(d),e.exit(n),e.exit(o),t):we(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||we(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!He(d)),d===92?f:u)}function f(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function Ah(e,t,r,o,n,a){let i;return s;function s(f){return f===34||f===39||f===40?(e.enter(o),e.enter(n),e.consume(f),e.exit(n),i=f===40?41:f,l):r(f)}function l(f){return f===i?(e.enter(n),e.consume(f),e.exit(n),e.exit(o),t):(e.enter(a),p(f))}function p(f){return f===i?(e.exit(a),l(i)):f===null?r(f):we(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),We(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||we(f)?(e.exit("chunkString"),p(f)):(e.consume(f),f===92?u:c)}function u(f){return f===i||f===92?(e.consume(f),c):c(f)}}function gs(e,t){let r;return o;function o(n){return we(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):He(n)?We(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var Qb={name:"definition",tokenize:r7},t7={tokenize:o7,partial:!0};function r7(e,t,r){let o=this,n;return a;function a(d){return e.enter("definition"),i(d)}function i(d){return wh.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return n=ma(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):r(d)}function l(d){return zt(d)?gs(e,p)(d):p(d)}function p(d){return Dh(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(t7,u,u)(d)}function u(d){return He(d)?We(e,f,"whitespace")(d):f(d)}function f(d){return d===null||we(d)?(e.exit("definition"),o.parser.defined.push(n),t(d)):r(d)}}function o7(e,t,r){return o;function o(s){return zt(s)?gs(e,n)(s):r(s)}function n(s){return Ah(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return He(s)?We(e,i,"whitespace")(s):i(s)}function i(s){return s===null||we(s)?t(s):r(s)}}var ex={name:"hardBreakEscape",tokenize:n7};function n7(e,t,r){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),n}function n(a){return we(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var tx={name:"headingAtx",tokenize:i7,resolve:a7};function a7(e,t){let r=e.length-2,o=3,n,a;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},a={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},Dr(e,o,r-o+1,[["enter",n,t],["enter",a,t],["exit",a,t],["exit",n,t]])),e}function i7(e,t,r){let o=0;return n;function n(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&o++<6?(e.consume(c),i):c===null||zt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||we(c)?(e.exit("atxHeading"),t(c)):He(c)?We(e,s,"whitespace")(c):(e.enter("atxHeadingText"),p(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function p(c){return c===null||c===35||zt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var sO=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],rx=["pre","script","style","textarea"];var ox={name:"htmlFlow",tokenize:c7,resolveTo:p7,concrete:!0},s7={tokenize:d7,partial:!0},l7={tokenize:u7,partial:!0};function p7(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function c7(e,t,r){let o=this,n,a,i,s,l;return p;function p(D){return c(D)}function c(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),u}function u(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),a=!0,h):D===63?(e.consume(D),n=3,o.interrupt?t:k):uo(D)?(e.consume(D),i=String.fromCharCode(D),g):r(D)}function f(D){return D===45?(e.consume(D),n=2,d):D===91?(e.consume(D),n=5,s=0,y):uo(D)?(e.consume(D),n=4,o.interrupt?t:k):r(D)}function d(D){return D===45?(e.consume(D),o.interrupt?t:k):r(D)}function y(D){let pe="CDATA[";return D===pe.charCodeAt(s++)?(e.consume(D),s===pe.length?o.interrupt?t:A:y):r(D)}function h(D){return uo(D)?(e.consume(D),i=String.fromCharCode(D),g):r(D)}function g(D){if(D===null||D===47||D===62||zt(D)){let pe=D===47,me=i.toLowerCase();return!pe&&!a&&rx.includes(me)?(n=1,o.interrupt?t(D):A(D)):sO.includes(i.toLowerCase())?(n=6,pe?(e.consume(D),b):o.interrupt?t(D):A(D)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(D):a?x(D):v(D))}return D===45||ar(D)?(e.consume(D),i+=String.fromCharCode(D),g):r(D)}function b(D){return D===62?(e.consume(D),o.interrupt?t:A):r(D)}function x(D){return He(D)?(e.consume(D),x):O(D)}function v(D){return D===47?(e.consume(D),O):D===58||D===95||uo(D)?(e.consume(D),S):He(D)?(e.consume(D),v):O(D)}function S(D){return D===45||D===46||D===58||D===95||ar(D)?(e.consume(D),S):T(D)}function T(D){return D===61?(e.consume(D),P):He(D)?(e.consume(D),T):v(D)}function P(D){return D===null||D===60||D===61||D===62||D===96?r(D):D===34||D===39?(e.consume(D),l=D,C):He(D)?(e.consume(D),P):R(D)}function C(D){return D===l?(e.consume(D),l=null,_):D===null||we(D)?r(D):(e.consume(D),C)}function R(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||zt(D)?T(D):(e.consume(D),R)}function _(D){return D===47||D===62||He(D)?v(D):r(D)}function O(D){return D===62?(e.consume(D),N):r(D)}function N(D){return D===null||we(D)?A(D):He(D)?(e.consume(D),N):r(D)}function A(D){return D===45&&n===2?(e.consume(D),w):D===60&&n===1?(e.consume(D),B):D===62&&n===4?(e.consume(D),q):D===63&&n===3?(e.consume(D),k):D===93&&n===5?(e.consume(D),z):we(D)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(s7,re,I)(D)):D===null||we(D)?(e.exit("htmlFlowData"),I(D)):(e.consume(D),A)}function I(D){return e.check(l7,F,re)(D)}function F(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),L}function L(D){return D===null||we(D)?I(D):(e.enter("htmlFlowData"),A(D))}function w(D){return D===45?(e.consume(D),k):A(D)}function B(D){return D===47?(e.consume(D),i="",U):A(D)}function U(D){if(D===62){let pe=i.toLowerCase();return rx.includes(pe)?(e.consume(D),q):A(D)}return uo(D)&&i.length<8?(e.consume(D),i+=String.fromCharCode(D),U):A(D)}function z(D){return D===93?(e.consume(D),k):A(D)}function k(D){return D===62?(e.consume(D),q):D===45&&n===2?(e.consume(D),k):A(D)}function q(D){return D===null||we(D)?(e.exit("htmlFlowData"),re(D)):(e.consume(D),q)}function re(D){return e.exit("htmlFlow"),t(D)}}function u7(e,t,r){let o=this;return n;function n(i){return we(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):r(i)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}function d7(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(mi,t,r)}}var nx={name:"htmlText",tokenize:f7};function f7(e,t,r){let o=this,n,a,i;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),p):k===47?(e.consume(k),T):k===63?(e.consume(k),v):uo(k)?(e.consume(k),R):r(k)}function p(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),a=0,y):uo(k)?(e.consume(k),x):r(k)}function c(k){return k===45?(e.consume(k),d):r(k)}function u(k){return k===null?r(k):k===45?(e.consume(k),f):we(k)?(i=u,B(k)):(e.consume(k),u)}function f(k){return k===45?(e.consume(k),d):u(k)}function d(k){return k===62?w(k):k===45?f(k):u(k)}function y(k){let q="CDATA[";return k===q.charCodeAt(a++)?(e.consume(k),a===q.length?h:y):r(k)}function h(k){return k===null?r(k):k===93?(e.consume(k),g):we(k)?(i=h,B(k)):(e.consume(k),h)}function g(k){return k===93?(e.consume(k),b):h(k)}function b(k){return k===62?w(k):k===93?(e.consume(k),b):h(k)}function x(k){return k===null||k===62?w(k):we(k)?(i=x,B(k)):(e.consume(k),x)}function v(k){return k===null?r(k):k===63?(e.consume(k),S):we(k)?(i=v,B(k)):(e.consume(k),v)}function S(k){return k===62?w(k):v(k)}function T(k){return uo(k)?(e.consume(k),P):r(k)}function P(k){return k===45||ar(k)?(e.consume(k),P):C(k)}function C(k){return we(k)?(i=C,B(k)):He(k)?(e.consume(k),C):w(k)}function R(k){return k===45||ar(k)?(e.consume(k),R):k===47||k===62||zt(k)?_(k):r(k)}function _(k){return k===47?(e.consume(k),w):k===58||k===95||uo(k)?(e.consume(k),O):we(k)?(i=_,B(k)):He(k)?(e.consume(k),_):w(k)}function O(k){return k===45||k===46||k===58||k===95||ar(k)?(e.consume(k),O):N(k)}function N(k){return k===61?(e.consume(k),A):we(k)?(i=N,B(k)):He(k)?(e.consume(k),N):_(k)}function A(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),n=k,I):we(k)?(i=A,B(k)):He(k)?(e.consume(k),A):(e.consume(k),F)}function I(k){return k===n?(e.consume(k),n=void 0,L):k===null?r(k):we(k)?(i=I,B(k)):(e.consume(k),I)}function F(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||zt(k)?_(k):(e.consume(k),F)}function L(k){return k===47||k===62||zt(k)?_(k):r(k)}function w(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):r(k)}function B(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),U}function U(k){return He(k)?We(e,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):z(k)}function z(k){return e.enter("htmlTextData"),i(k)}}var vs={name:"labelEnd",tokenize:b7,resolveTo:v7,resolveAll:g7},m7={tokenize:x7},h7={tokenize:T7},y7={tokenize:P7};function g7(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function v7(e,t){let r=e.length,o=0,n,a,i,s;for(;r--;)if(n=e[r][1],a){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(i){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(a=r,n.type!=="labelLink")){o=2;break}}else n.type==="labelEnd"&&(i=r);let l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[a+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return s=[["enter",l,t],["enter",p,t]],s=Fr(s,e.slice(a+1,a+o+3)),s=Fr(s,[["enter",c,t]]),s=Fr(s,Kl(t.parser.constructs.insideSpan.null,e.slice(a+o+4,i-3),t)),s=Fr(s,[["exit",c,t],e[i-2],e[i-1],["exit",p,t]]),s=Fr(s,e.slice(i+1)),s=Fr(s,[["exit",l,t]]),Dr(e,a,e.length,s),e}function b7(e,t,r){let o=this,n=o.events.length,a,i;for(;n--;)if((o.events[n][1].type==="labelImage"||o.events[n][1].type==="labelLink")&&!o.events[n][1]._balanced){a=o.events[n][1];break}return s;function s(f){return a?a._inactive?u(f):(i=o.parser.defined.includes(ma(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(m7,c,i?c:u)(f):f===91?e.attempt(h7,c,i?p:u)(f):i?c(f):u(f)}function p(f){return e.attempt(y7,c,u)(f)}function c(f){return t(f)}function u(f){return a._balanced=!0,r(f)}}function x7(e,t,r){return o;function o(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),n}function n(u){return zt(u)?gs(e,a)(u):a(u)}function a(u){return u===41?c(u):Dh(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function i(u){return zt(u)?gs(e,l)(u):c(u)}function s(u){return r(u)}function l(u){return u===34||u===39||u===40?Ah(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function p(u){return zt(u)?gs(e,c)(u):c(u)}function c(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):r(u)}}function T7(e,t,r){let o=this;return n;function n(s){return wh.call(o,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return o.parser.defined.includes(ma(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function P7(e,t,r){return o;function o(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),n}function n(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var ax={name:"labelStartImage",tokenize:C7,resolveAll:vs.resolveAll};function C7(e,t,r){let o=this;return n;function n(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):r(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(s):t(s)}}var ix={name:"labelStartLink",tokenize:S7,resolveAll:vs.resolveAll};function S7(e,t,r){let o=this;return n;function n(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(i):t(i)}}var Pu={name:"lineEnding",tokenize:k7};function k7(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),We(e,t,"linePrefix")}}var bs={name:"thematicBreak",tokenize:R7};function R7(e,t,r){let o=0,n;return a;function a(p){return e.enter("thematicBreak"),i(p)}function i(p){return n=p,s(p)}function s(p){return p===n?(e.enter("thematicBreakSequence"),l(p)):o>=3&&(p===null||we(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),He(p)?We(e,s,"whitespace")(p):s(p))}}var wr={name:"list",tokenize:O7,continuation:{tokenize:_7},exit:w7},E7={tokenize:A7,partial:!0},I7={tokenize:D7,partial:!0};function O7(e,t,r){let o=this,n=o.events[o.events.length-1],a=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,i=0;return s;function s(d){let y=o.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!o.containerState.marker||d===o.containerState.marker:vu(d)){if(o.containerState.type||(o.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(bs,r,p)(d):p(d);if(!o.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return r(d)}function l(d){return vu(d)&&++i<10?(e.consume(d),l):(!o.interrupt||i<2)&&(o.containerState.marker?d===o.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),p(d)):r(d)}function p(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||d,e.check(mi,o.interrupt?r:c,e.attempt(E7,f,u))}function c(d){return o.containerState.initialBlankLine=!0,a++,f(d)}function u(d){return He(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):r(d)}function f(d){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function _7(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(mi,n,a);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,We(e,t,"listItemIndent",o.containerState.size+1)(s)}function a(s){return o.containerState.furtherBlankLines||!He(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(I7,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,We(e,e.attempt(wr,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function D7(e,t,r){let o=this;return We(e,n,"listItemIndent",o.containerState.size+1);function n(a){let i=o.events[o.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===o.containerState.size?t(a):r(a)}}function w7(e){e.exit(this.containerState.type)}function A7(e,t,r){let o=this;return We(e,n,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(a){let i=o.events[o.events.length-1];return!He(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var Mh={name:"setextUnderline",tokenize:N7,resolveTo:M7};function M7(e,t){let r=e.length,o,n,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);let i={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",i,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[a][1].end)):e[o][1]=i,e.push(["exit",i,t]),e}function N7(e,t,r){let o=this,n;return a;function a(p){let c=o.events.length,u;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){u=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(e.enter("setextHeadingLine"),n=p,i(p)):r(p)}function i(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===n?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),He(p)?We(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||we(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var lO={tokenize:L7};function L7(e){let t=this,r=e.attempt(mi,o,e.attempt(this.parser.constructs.flowInitial,n,We(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Zb,n)),"linePrefix")));return r;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var pO={resolveAll:fO()},cO=dO("string"),uO=dO("text");function dO(e){return{tokenize:t,resolveAll:fO(e==="text"?B7:void 0)};function t(r){let o=this,n=this.parser.constructs[e],a=r.attempt(n,i,s);return i;function i(c){return p(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return p(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function p(c){if(c===null)return!0;let u=n[c],f=-1;if(u)for(;++f<u.length;){let d=u[f];if(!d.previous||d.previous.call(o,o.previous))return!0}return!1}}}function fO(e){return t;function t(r,o){let n=-1,a;for(;++n<=r.length;)a===void 0?r[n]&&r[n][1].type==="data"&&(a=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==a+2&&(r[a][1].end=r[n-1][1].end,r.splice(a+2,n-a-2),n=a+2),a=void 0);return e?e(r,o):r}}function B7(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let o=e[r-1][1],n=t.sliceStream(o),a=n.length,i=-1,s=0,l;for(;a--;){let p=n[a];if(typeof p=="string"){for(i=p.length;p.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(p===-2)l=!0,s++;else if(p!==-1){a++;break}}if(s){let p={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-s,offset:o.end.offset-s,_index:o.start._index+a,_bufferIndex:a?i:o.start._bufferIndex+i},end:Object.assign({},o.end)};o.end=Object.assign({},p.start),o.start.offset===o.end.offset?Object.assign(o,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}function mO(e,t,r){let o=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},a=[],i=[],s=[],l=!0,p={consume:S,enter:T,exit:P,attempt:_(C),check:_(R),interrupt:_(R,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:y,now:g,defineSkip:b,write:d},u=t.tokenize.call(c,p),f;return t.resolveAll&&a.push(t),c;function d(I){return i=Fr(i,I),x(),i[i.length-1]!==null?[]:(O(t,0),c.events=Kl(a,c.events,c),c.events)}function y(I,F){return F7(h(I),F)}function h(I){return z7(i,I)}function g(){let{line:I,column:F,offset:L,_index:w,_bufferIndex:B}=o;return{line:I,column:F,offset:L,_index:w,_bufferIndex:B}}function b(I){n[I.line]=I.column,A()}function x(){let I;for(;o._index<i.length;){let F=i[o._index];if(typeof F=="string")for(I=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===I&&o._bufferIndex<F.length;)v(F.charCodeAt(o._bufferIndex));else v(F)}}function v(I){l=void 0,f=I,u=u(I)}function S(I){we(I)?(o.line++,o.column=1,o.offset+=I===-3?2:1,A()):I!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),c.previous=I,l=!0}function T(I,F){let L=F||{};return L.type=I,L.start=g(),c.events.push(["enter",L,c]),s.push(L),L}function P(I){let F=s.pop();return F.end=g(),c.events.push(["exit",F,c]),F}function C(I,F){O(I,F.from)}function R(I,F){F.restore()}function _(I,F){return L;function L(w,B,U){let z,k,q,re;return Array.isArray(w)?pe(w):"tokenize"in w?pe([w]):D(w);function D(W){return de;function de(fe){let Ce=fe!==null&&W[fe],be=fe!==null&&W.null,Le=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(be)?be:be?[be]:[]];return pe(Le)(fe)}}function pe(W){return z=W,k=0,W.length===0?U:me(W[k])}function me(W){return de;function de(fe){return re=N(),q=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ae(fe):W.tokenize.call(F?Object.assign(Object.create(c),F):c,p,De,ae)(fe)}}function De(W){return l=!0,I(q,re),B}function ae(W){return l=!0,re.restore(),++k<z.length?me(z[k]):U}}}function O(I,F){I.resolveAll&&!a.includes(I)&&a.push(I),I.resolve&&Dr(c.events,F,c.events.length-F,I.resolve(c.events.slice(F),c)),I.resolveTo&&(c.events=I.resolveTo(c.events,c))}function N(){let I=g(),F=c.previous,L=c.currentConstruct,w=c.events.length,B=Array.from(s);return{restore:U,from:w};function U(){o=I,c.previous=F,c.currentConstruct=L,c.events.length=w,s=B,A()}}function A(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function z7(e,t){let r=t.start._index,o=t.start._bufferIndex,n=t.end._index,a=t.end._bufferIndex,i;if(r===n)i=[e[r].slice(o,a)];else{if(i=e.slice(r,n),o>-1){let s=i[0];typeof s=="string"?i[0]=s.slice(o):i.shift()}a>0&&i.push(e[n].slice(0,a))}return i}function F7(e,t){let r=-1,o=[],n;for(;++r<e.length;){let a=e[r],i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
127
+ `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function iW(e){e=aW(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,o=e.thousandsGroupStyle,n=e.suffix,a=e.allowNegative,i=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=ai);var l=e.onBlur;l===void 0&&(l=ai);var p=e.thousandSeparator,c=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var d=e.defaultValue,y=e.value,h=e.valueIsNumericString,g=e.onValueChange,b=GI(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=eh(e),v=x.decimalSeparator,S=x.allowedDecimalSeparators,T=function(z){return UI(z,e)},P=function(z,k){return oW(z,k,e)},C=jl(y)?d:y,R=h!=null?h:rW(C,f,n);jl(y)?jl(d)||(R=R||typeof d=="number"):R=R||typeof y=="number";var _=function(z){return YI(z)?z:(typeof z=="number"&&(z=KI(z)),R&&typeof c=="number"?jI(z,c,!!u):z)},O=ZI(_(y),_(d),!!R,T,P,g),N=O[0],A=N.numAsString,I=N.formattedValue,F=O[1],L=function(z){var k=z.target,q=z.key,re=k.selectionStart,D=k.selectionEnd,pe=k.value;if(pe===void 0&&(pe=""),re!==D){s(z);return}q==="Backspace"&&pe[0]==="-"&&re===f.length+1&&a&&fs(k,1),c&&u&&(q==="Backspace"&&pe[re-1]===v?(fs(k,re-1),z.preventDefault()):q==="Delete"&&pe[re]===v&&z.preventDefault()),S!=null&&S.includes(q)&&pe[re]===v&&fs(k,re+1);var me=p===!0?",":p;q==="Backspace"&&pe[re-1]===me&&fs(k,re-1),q==="Delete"&&pe[re]===me&&fs(k,re+1),s(z)},w=function(z){var k=A;if(k.match(/\d/g)||(k=""),i||(k=U4(k)),u&&c&&(k=jI(k,c,u)),k!==A){var q=UI(k,e);F({formattedValue:q,value:k,floatValue:parseFloat(k)},{event:z,source:qc.event})}l(z)},B=function(z){return z===v?!0:Kc(z)},U=function(z){var k=z.currentValue,q=z.lastValue,re=z.formattedValue,D=z.currentValueIndex,pe=z.formattedValueIndex,me=k[D],De=re[pe],ae=XI(q,k),W=ae.to;return D>=W.start&&D<W.end&&S&&S.includes(me)&&De===v?!0:me===De};return Object.assign(Object.assign({},b),{value:I,valueIsNumericString:!1,isValidInputCharacter:B,isCharacterSame:U,onValueChange:F,format:T,removeFormatting:P,getCaretBoundary:function(z){return nW(z,e)},onKeyDown:L,onBlur:w})}function QI(e){var t=iW(e);return Vl.createElement(Q4,Object.assign({},t))}import sW,{useCallback as lW}from"react";import{motion as pW}from"framer-motion";var cW=pW(Pl),Xc=sW.forwardRef((e,t)=>{var P;let T=e,{label:r,helperText:o,error:n,style:a,size:i,color:s,disabled:l,required:p,onChange:c,name:u,sx:f,className:d,enableClearable:y}=T,h=ve(T,["label","helperText","error","style","size","color","disabled","required","onChange","name","sx","className","enableClearable"]),[g,b]=Rr(e.value,e.defaultValue,lW(C=>{c==null||c({target:{value:(C==null?void 0:C.toString())||"",name:u||""}})},[c,u])),x=C=>{b(C.target.value)},v=()=>{b(e.defaultValue||"")},S=M(cW,oe(V({value:g,name:u,onChange:x,required:p,color:n?"danger":s,disabled:l,slotProps:V({input:V({ref:t},(P=h.slotProps)==null?void 0:P.input)},h.slotProps)},h),{endDecorator:y?Pe(Lt,{gap:1,direction:"row",children:[h.endDecorator,g&&M(Wt,{onMouseDown:C=>C.preventDefault(),onClick:v,"aria-label":"Clear",children:M(_m,{})})]}):h.endDecorator}));return Pe(Sn,{required:p,color:s,size:i,error:n,disabled:l,sx:f,className:d,children:[r&&M(kn,{children:r}),S,o&&M(Rn,{children:o})]})});Xc.displayName="Input";var po=Xc;var uW={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},e1=(e="USD")=>{let[t,r,o,...n]=new $I(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=uW[e];return{symbol:`${t} `,thousandSeparator:r,decimalSeparator:o,placeholder:o?`${t} 0${o}${Array.from(Array(a)).map(()=>0).join("")}`:`${t} 0`,fixedDecimalScale:!!o,decimalScale:a}};var fW=o1.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=ve(a,["onChange"]);return M(QI,oe(V({},n),{onValueChange:({value:i})=>{o==null||o({target:{name:t.name,value:i}})},valueIsNumericString:!0,getInputRef:r,allowNegative:!1}))}),mW=E(po,{name:"CurrencyInput",slot:"root"})({}),th=o1.forwardRef(function(t,r){let o=Y({props:t,name:"CurrencyInput"}),I=o,{currency:n="USD",name:a,onChange:i,label:s,error:l,helperText:p,required:c,disabled:u,useMinorUnit:f,sx:d,className:y}=I,h=ve(I,["currency","name","onChange","label","error","helperText","required","disabled","useMinorUnit","sx","className"]),{symbol:g,thousandSeparator:b,decimalSeparator:x,placeholder:v,fixedDecimalScale:S,decimalScale:T}=e1(n),[P,C]=Rr(o.value,o.defaultValue,t1(F=>i==null?void 0:i({target:{name:a,value:F}}),[i,a])),R=r1(()=>P&&f?P/Math.pow(10,T):P,[P,f,T]),_=r1(()=>o.max&&f?o.max/Math.pow(10,T):o.max,[o.max,f,T]),[O,N]=dW(!!_&&!!R&&R>_),A=t1(F=>{var w;if(F.target.value===""){C(void 0);return}let L=Number(f?(w=F.target.value)==null?void 0:w.replace(x,""):F.target.value);_&&Number(F.target.value)>_?N(!0):N(!1),C(L)},[x,_,f,C]);return M(mW,oe(V({},h),{ref:r,value:R,placeholder:v,onChange:A,error:l||O,disabled:u,required:c,color:l||O?"danger":o.color,label:s,helperText:O?new Qm(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:_}):p,slotProps:{input:{component:fW,decimalSeparator:x,thousandSeparator:b,prefix:g,fixedDecimalScale:S,decimalScale:T,"aria-label":h["aria-label"]}},sx:V({},d),className:y}))});var n1=th;import GW,{useCallback as da,useEffect as mh,useMemo as nr,useRef as xb,useState as y1,useId as YW}from"react";import{jsx as hW}from"react/jsx-runtime";var a1=Nt(hW("path",{d:"M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0s.39-1.02 0-1.41l-6.59-6.59a.996.996 0 0 0-1.41 0l-6.6 6.58c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1"}),"ArrowUpwardRounded");import{motion as yW}from"framer-motion";var gW=yW(nm),Zc=gW;Zc.displayName="Sheet";var Fo=Zc;var Qc=e=>{let o=e,{children:t}=o,r=ve(o,["children"]);return M(dm,oe(V({},r),{children:t}))};Qc.displayName="Table";function cb(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=jc}={},slotProps:{checkbox:a={}}={}}=e;return M("thead",{children:Pe("tr",{children:[r&&M("th",{style:{width:"40px",textAlign:"center"},children:M(n,V({onChange:o},a))}),t.map(i=>M("th",{style:{width:i.width,minWidth:i.minWidth,maxWidth:i.maxWidth,textAlign:i.numeric?"right":"left"},children:i.label},i.label))]})})}cb.displayName="TableHead";function ub(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:a,slots:{checkbox:i=jc}={},slotProps:{checkbox:s={}}={}}=e;return M("tbody",{children:t.map((l,p)=>Pe("tr",{children:[n&&M("td",{style:{textAlign:"center"},children:M(i,V({onChange:c=>a==null?void 0:a(c,p)},s))}),r.map(c=>{var u;return M("td",{style:{textAlign:(u=o==null?void 0:o[c])!=null&&u.numeric?"right":"left"},children:l[c]},c)})]},p))})}ub.displayName="TableBody";import EW,{forwardRef as IW,useCallback as bb,useEffect as OW,useImperativeHandle as _W,useRef as DW,useState as wW}from"react";function co(e){return typeof e=="string"||e instanceof String}function db(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function fb(e,t){return Array.isArray(t)?fb(e,(r,o)=>t.includes(o)):Object.entries(e).reduce((r,o)=>{let[n,a]=o;return t(a,n)&&(r[n]=a),r},{})}var _e={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function mb(e){switch(e){case _e.LEFT:return _e.FORCE_LEFT;case _e.RIGHT:return _e.FORCE_RIGHT;default:return e}}function rh(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Hl(e,t){if(t===e)return!0;let r=Array.isArray(t),o=Array.isArray(e),n;if(r&&o){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!Hl(t[n],e[n]))return!1;return!0}if(r!=o)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){let a=t instanceof Date,i=e instanceof Date;if(a&&i)return t.getTime()==e.getTime();if(a!=i)return!1;let s=t instanceof RegExp,l=e instanceof RegExp;if(s&&l)return t.toString()==e.toString();if(s!=l)return!1;let p=Object.keys(t);for(n=0;n<p.length;n++)if(!Object.prototype.hasOwnProperty.call(e,p[n]))return!1;for(n=0;n<p.length;n++)if(!Hl(e[p[n]],t[p[n]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}var oh=class{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}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?_e.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?_e.RIGHT:_e.LEFT}};function Te(e,t){return new Te.InputMask(e,t)}function hb(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Te.MaskedRegExp:co(e)?Te.MaskedPattern:e===Date?Te.MaskedDate:e===Number?Te.MaskedNumber:Array.isArray(e)||e===Array?Te.MaskedDynamic:Te.Masked&&e.prototype instanceof Te.Masked?e:Te.Masked&&e instanceof Te.Masked?e.constructor:e instanceof Function?Te.MaskedFunction:(console.warn("Mask not found for mask",e),Te.Masked)}function pa(e){if(!e)throw new Error("Options in not defined");if(Te.Masked){if(e.prototype instanceof Te.Masked)return{mask:e};let t=e instanceof Te.Masked?{mask:e}:db(e)&&e.mask instanceof Te.Masked?e:{},{mask:r=void 0}=t,o=ve(t,["mask"]);if(r){let n=r.mask;return V(oe(V({},fb(r,(a,i)=>!i.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return db(e)?V({},e):{mask:e}}function Ir(e){if(Te.Masked&&e instanceof Te.Masked)return e;let t=pa(e),r=hb(t.mask);if(!r)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===r&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new r(t)}Te.createMask=Ir;var ii=class{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch(r){}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch(r){}return t!=null?t:this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch(o){}}get isActive(){return!1}};Te.MaskElement=ii;var i1=90,vW=89,ca=class extends ii{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,r,o;return(t=(r=(o=this.input).getRootNode)==null?void 0:r.call(o))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===i1&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===vW&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===i1&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};Te.HTMLMaskElement=ca;var eu=class extends ca{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,r){this.input.setSelectionRange(t,r)}get value(){return this.input.value}set value(t){this.input.value=t}};Te.HTMLMaskElement=ca;var Ul=class extends ca{get _unsafeSelectionStart(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o<n?o:n}get _unsafeSelectionEnd(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o>n?o:n}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;let o=this.rootElement.createRange();o.setStart(this.input.firstChild||this.input,t),o.setEnd(this.input.lastChild||this.input,r);let n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(o))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}};Te.HTMLContenteditableMaskElement=Ul;var tu=class e{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>e.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};tu.MAX_LENGTH=100;var nh=class{constructor(t,r){this.el=t instanceof ii?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new Ul(t):new eu(t),this.masked=Ir(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new tu,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._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var r;return t==null||((r=this.masked)==null?void 0:r.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Te.Masked)&&this.masked.constructor===hb(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Te.Masked?t:Ir({mask:t});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}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,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){let o=this._listeners[t];o&&o.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),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(t){let r=this.masked.unmaskedValue,o=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==o||this._rawInputValue!==n;this._unmaskedValue=r,this._value=o,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){let i=t,{mask:r}=i,o=ve(i,["mask"]),n=!this.maskEquals(r),a=this.masked.optionsIsChanged(o);n&&(this.mask=r),a&&this.masked.updateOptions(o),(n||a)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,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,_e.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,r){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r),this}off(t,r){if(!this._listeners[t])return this;if(!r)return delete this._listeners[t],this;let o=this._listeners[t].indexOf(r);return o>=0&&this._listeners[t].splice(o,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();let r=new oh({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),o=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=o===this.masked.rawInputValue?r.removeDirection:_e.NONE,i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==_e.NONE&&(i=this.masked.nearestInputPos(i,_e.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};Te.InputMask=nh;var Fe=class e{static normalize(t){return Array.isArray(t)?t:[t,new e]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}};Te.ChangeDetails=Fe;var Or=class{constructor(t,r,o){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=o}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";let r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";let t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}};var Gt=class e{constructor(t){this._value="",this._update(V(V({},e.DEFAULTS),t)),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,r){r===void 0&&(r={input:!0}),this.reset(),this.append(t,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,r){return t}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(t,r)}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or(this.extractInput(t,r),t)}appendTail(t){return co(t)&&(t=new Or(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new Fe({inserted:t,rawInserted:t})):new Fe}_appendChar(t,r,o){r===void 0&&(r={});let n=this.state,a;if([t,a]=this.doPrepareChar(t,r),t&&(a=a.aggregate(this._appendCharRaw(t,r)),!a.rawInserted&&this.autofix==="pad")){let i=this.state;this.state=n;let s=this.pad(r),l=this._appendCharRaw(t,r);s=s.aggregate(l),l.rawInserted||s.equals(a)?a=s:this.state=i}if(a.inserted){let i,s=this.doValidate(r)!==!1;if(s&&o!=null){let l=this.state;if(this.overwrite===!0){i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.unshift(this.displayValue.length-a.tailShift)}let p=this.appendTail(o);if(s=p.rawInserted.length===o.toString().length,!(s&&p.inserted)&&this.overwrite==="shift"){this.state=l,i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.shift();p=this.appendTail(o),s=p.rawInserted.length===o.toString().length}s&&p.inserted&&(this.state=l)}s||(a=new Fe,this.state=n,o&&i&&(o.state=i))}return a}_appendPlaceholder(){return new Fe}_appendEager(){return new Fe}append(t,r,o){if(!co(t))throw new Error("value should be string");let n=co(o)?new Or(String(o)):o;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,r);for(let i=0;i<t.length;++i){let s=this._appendChar(t[i],r,n);if(!s.rawInserted&&!this.doSkipInvalid(t[i],r,n))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(r),new Fe}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;let r=this.rawInputValue,o=this.value,n=t();return this.rawInputValue=r,this.value&&this.value!==o&&o.indexOf(this.value)===0&&(this.append(o.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;let r=this.state,o=t(this);return this.state=r,delete this._isolated,o}doSkipInvalid(t,r,o){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),Fe.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),Fe.normalize(this.prepareChar?this.prepareChar(t,this,r):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,r,o,n,a){o===void 0&&(o=""),n===void 0&&(n=_e.NONE),a===void 0&&(a={input:!0});let i=t+r,s=this.extractTail(i),l=this.eager===!0||this.eager==="remove",p;l&&(n=mb(n),p=this.extractInput(0,i,{raw:!0}));let c=t,u=new Fe;if(n!==_e.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?_e.NONE:n),u.tailShift=c-t),u.aggregate(this.remove(c)),l&&n!==_e.NONE&&p===this.rawInputValue)if(n===_e.FORCE_LEFT){let f;for(;p===this.rawInputValue&&(f=this.displayValue.length);)u.aggregate(new Fe({tailShift:-1})).aggregate(this.remove(f-1))}else n===_e.FORCE_RIGHT&&s.unshift();return u.aggregate(this.append(o,a,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Hl(this,t)}typedValueEquals(t){let r=this.typedValue;return t===r||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new Fe}};Gt.DEFAULTS={skipInvalid:!0};Gt.EMPTY_VALUES=[void 0,null,""];Te.Masked=Gt;var Wl=class e{constructor(t,r){t===void 0&&(t=[]),r===void 0&&(r=0),this.chunks=t,this.from=r}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=co(t)?new Or(String(t)):t;let r=this.chunks[this.chunks.length-1],o=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof Or)o?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof e){if(t.stop==null){let n;for(;t.chunks.length&&t.chunks[0].stop==null;)n=t.chunks.shift(),n.from+=t.from,this.extend(n)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Te.MaskedPattern))return new Or(this.toString()).appendTo(t);let r=new Fe;for(let o=0;o<this.chunks.length;++o){let n=this.chunks[o],a=t._mapPosToBlock(t.displayValue.length),i=n.stop,s;if(i!=null&&(!a||a.index<=i)&&((n instanceof e||t._stops.indexOf(i)>=0)&&r.aggregate(t._appendPlaceholder(i)),s=n instanceof e&&t._blocks[i]),s){let l=s.appendTail(n);r.aggregate(l);let p=n.toString().slice(l.rawInserted.length);p&&r.aggregate(t.append(p,{tail:!0}))}else r.aggregate(t.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){let n=t,{chunks:r}=n,o=ve(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(a=>{let i="chunks"in a?new e:new Or;return i.state=a,i})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";let r=t!=null?t-this.from:t,o=0;for(;o<this.chunks.length;){let n=this.chunks[o],a=n.unshift(r);if(n.toString()){if(!a)break;++o}else this.chunks.splice(o,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){let r=this.chunks[t],o=r.shift();if(r.toString()){if(!o)break;--t}else this.chunks.splice(t,1);if(o)return o}return""}};var ah=class{constructor(t,r){this.masked=t,this._log=[];let{offset:o,index:n}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=o,this.index=n,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(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){let t=this._log.pop();return t&&(this.state=t),t}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(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())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,_e.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,_e.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,_e.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,_e.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,_e.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,_e.NONE),!0})}};var Gl=class{constructor(t){Object.assign(this,t),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(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(r),this._value||(this._isRawInput=!1),new Fe}nearestInputPos(t,r){r===void 0&&(r=_e.NONE);let o=0,n=this._value.length;switch(r){case _e.LEFT:case _e.FORCE_LEFT:return o;case _e.NONE:case _e.RIGHT:case _e.FORCE_RIGHT:default:return n}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),o===void 0&&(o={}),o.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new Fe;let o=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!o)&&!r.tail,i=new Fe({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let t=new Fe;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Or("")}appendTail(t){return co(t)&&(t=new Or(String(t))),t.appendTo(this)}append(t,r,o){let n=this._appendChar(t[0],r);return o!=null&&(n.tailShift+=this.appendTail(o).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}};var si=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s}=p,l=ve(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Ir(l),Object.assign(this,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),t===0&&r>=1?(this.isFilled=!1,this.masked.remove(t,r)):new Fe}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(t,r){if(r===void 0&&(r={}),this.isFilled)return new Fe;let o=this.masked.state,n=this.masked._appendChar(t,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new Fe,this.masked.state=o),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(t,r,o){return this.masked.append(t,this.currentMaskFlags(r),o)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Fe:(this.isFilled=!0,new Fe({inserted:this.placeholderChar}))}_appendEager(){return new Fe}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,o)}nearestInputPos(t,r){r===void 0&&(r=_e.NONE);let o=0,n=this.value.length,a=Math.min(Math.max(t,o),n);switch(r){case _e.LEFT:case _e.FORCE_LEFT:return this.isComplete?a:o;case _e.RIGHT:case _e.FORCE_RIGHT:return this.isComplete?a:n;case _e.NONE:default:return a}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.value.slice(t,r).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var r;return oe(V({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new Fe}};si.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]/,"*":/./};var ih=class extends Gt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Te.MaskedRegExp=ih;var Zt=class e extends Gt{constructor(t){super(oe(V(V({},e.DEFAULTS),t),{definitions:Object.assign({},si.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)}))}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){let t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let r=this.mask;if(!r||!t)return;let o=!1,n=!1;for(let i=0;i<r.length;++i){if(this.blocks){let c=r.slice(i),u=Object.keys(this.blocks).filter(d=>c.indexOf(d)===0);u.sort((d,y)=>y.length-d.length);let f=u[0];if(f){let a=pa(this.blocks[f]),{expose:d,repeat:y}=a,h=ve(a,["expose","repeat"]),g=oe(V({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix},h),{repeat:y,parent:this}),b=y!=null?new Te.RepeatBlock(g):Ir(g);b&&(this._blocks.push(b),d&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),i+=f.length-1;continue}}let s=r[i],l=s in t;if(s===e.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){o=!o;continue}if(s==="["||s==="]"){n=!n;continue}if(s===e.ESCAPE_CHAR){if(++i,s=r[i],!s)break;l=!1}let p=l?new si(oe(V({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},pa(t[s])),{parent:this})):new Gl({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return oe(V({},super.state),{_blocks:this._blocks.map(t=>t.state)})}set state(t){if(!t){this.reset();return}let n=t,{_blocks:r}=n,o=ve(n,["_blocks"]);this._blocks.forEach((a,i)=>a.state=r[i]),super.state=o}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,r)=>t+=r.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(r),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,r)=>t+=r.value,"")}set value(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(r),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(r),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,r)=>t+=r.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;let r=new Fe,o=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(o==null)return r;this._blocks[o].isFilled&&++o;for(let n=o;n<this._blocks.length;++n){let a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._mapPosToBlock(this.displayValue.length),n=new Fe;if(!o)return n;for(let i=o.index,s;s=this._blocks[i];++i){var a;let l=s._appendChar(t,oe(V({},r),{_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]}));if(n.aggregate(l),l.consumed)break}return n}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=new Wl;return t===r||this._forEachBlocksInRange(t,r,(n,a,i,s)=>{let l=n.extractTail(i,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Wl&&(l.blockIndex=a),o.extend(l)}),o}extractInput(t,r,o){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),o===void 0&&(o={}),t===r)return"";let n="";return this._forEachBlocksInRange(t,r,(a,i,s,l)=>{n+=a.extractInput(s,l,o)}),n}_findStopBefore(t){let r;for(let o=0;o<this._stops.length;++o){let n=this._stops[o];if(n<=t)r=n;else break}return r}_appendPlaceholder(t){let r=new Fe;if(this.lazy&&t==null)return r;let o=this._mapPosToBlock(this.displayValue.length);if(!o)return r;let n=o.index,a=t!=null?t:this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||t!=null){var s;r.aggregate(i._appendPlaceholder((s=i._blocks)==null?void 0:s.length))}}),r}_mapPosToBlock(t){let r="";for(let o=0;o<this._blocks.length;++o){let n=this._blocks[o],a=r.length;if(r+=n.displayValue,t<=r.length)return{index:o,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,o)=>r+=o.displayValue.length,0)}_forEachBlocksInRange(t,r,o){r===void 0&&(r=this.displayValue.length);let n=this._mapPosToBlock(t);if(n){let a=this._mapPosToBlock(r),i=a&&n.index===a.index,s=n.offset,l=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(o(this._blocks[n.index],n.index,s,l),a&&!i){for(let p=n.index+1;p<a.index;++p)o(this._blocks[p],p,0,this._blocks[p].displayValue.length);o(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o.aggregate(n.remove(i,s))}),o}nearestInputPos(t,r){if(r===void 0&&(r=_e.NONE),!this._blocks.length)return 0;let o=new ah(this,t);if(r===_e.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===_e.LEFT||r===_e.FORCE_LEFT){if(r===_e.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===_e.LEFT){if(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.ok&&o.pos<=t||(o.popState(),o.ok&&o.pos<=t))return o.pos;o.popState()}return o.ok?o.pos:r===_e.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===_e.RIGHT||r===_e.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===_e.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,_e.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=0;return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o+=n.totalInputPositions(i,s)}),o}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){let r=this._maskedBlocks[t];return r?r.map(o=>this._blocks[o]):[]}pad(t){let r=new Fe;return this._forEachBlocksInRange(0,this.displayValue.length,o=>r.aggregate(o.pad(t))),r}};Zt.DEFAULTS=oe(V({},Gt.DEFAULTS),{lazy:!0,placeholderChar:"_"});Zt.STOP_CHAR="`";Zt.ESCAPE_CHAR="\\";Zt.InputDefinition=si;Zt.FixedDefinition=Gl;Te.MaskedPattern=Zt;var li=class extends Zt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){let c=t,{to:r=this.to||0,from:o=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix}=c,i=ve(c,["to","from","maxLength","autofix"]);this.to=r,this.from=o,this.maxLength=Math.max(String(r).length,n),this.autofix=a;let s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0"),p=0;for(;p<l.length&&l[p]===s[p];)++p;i.mask=l.slice(0,p).replace(/0/g,"\\0")+"0".repeat(this.maxLength-p),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",o="",[,n,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,o="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),o=o.padEnd(this.maxLength,"9"),[r,o]}doPrepareChar(t,r){r===void 0&&(r={});let o;return[t,o]=super.doPrepareChar(t.replace(/\D/g,""),r),t||(o.skip=!this.isComplete),[t,o]}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,r);let o=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+t);return Number(i)<this.from?super._appendCharRaw(o[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(o[this.value.length],r).aggregate(this._appendCharRaw(t,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(t,r)}doValidate(t){let r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;let[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){let r=new Fe;if(this.value.length===this.maxLength)return r;let o=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",t));o.split("").forEach(a=>this._appendCharRaw(a))}return r}};Te.MaskedRange=li;var Yl=class e extends Zt{static extractPatternOptions(t){let a=t,{mask:r,pattern:o}=a,n=ve(a,["mask","pattern"]);return oe(V({},n),{mask:co(r)?r:o})}constructor(t){super(e.extractPatternOptions(V(V({},e.DEFAULTS),t)))}updateOptions(t){super.updateOptions(t)}_update(t){let s=V(V({},e.DEFAULTS),t),{mask:r,pattern:o,blocks:n}=s,a=ve(s,["mask","pattern","blocks"]),i=Object.assign({},e.GET_DEFAULT_BLOCKS());t.min&&(i.Y.from=t.min.getFullYear()),t.max&&(i.Y.to=t.max.getFullYear()),t.min&&t.max&&i.Y.from===i.Y.to&&(i.m.from=t.min.getMonth()+1,i.m.to=t.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=t.min.getDate(),i.d.to=t.max.getDate())),Object.assign(i,this.blocks,n),super._update(oe(V({},a),{mask:co(r)?r:o,blocks:i}))}doValidate(t){let r=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(e.extractPatternOptions(t))}};Yl.GET_DEFAULT_BLOCKS=()=>({d:{mask:li,from:1,to:31,maxLength:2},m:{mask:li,from:1,to:12,maxLength:2},Y:{mask:li,from:1900,to:9999}});Yl.DEFAULTS=oe(V({},Zt.DEFAULTS),{mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=e.getFullYear();return[r,o,n].join(".")},parse:(e,t)=>{let[r,o,n]=e.split(".").map(Number);return new Date(n,o-1,r)}});Te.MaskedDate=Yl;var ru=class e extends Gt{constructor(t){super(V(V({},e.DEFAULTS),t)),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(r=>{let i=pa(r),{expose:o}=i,n=ve(i,["expose"]),a=Ir(V({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid},n));return o&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._applyDispatch(t,r);return this.currentMask&&o.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),o}_applyDispatch(t,r,o){t===void 0&&(t=""),r===void 0&&(r={}),o===void 0&&(o="");let n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,s=a.slice(i.length),l=this.currentMask,p=new Fe,c=l==null?void 0:l.state;return this.currentMask=this.doDispatch(t,V({},r),o),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),p.tailShift=this.currentMask.value.length-n.length),s&&(p.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),p}_appendPlaceholder(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){let r=new Fe;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,o;return oe(V({},t),{_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((o=t._beforeTailState)==null?void 0:o.currentMask)||t._beforeTailState})}doDispatch(t,r,o){return r===void 0&&(r={}),o===void 0&&(o=""),this.dispatch(t,this,r,o)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[o,n]=super.doPrepare(t,r);if(this.currentMask){let a;[o,a]=super.doPrepare(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(t,r);if(this.currentMask){let a;[o,a]=super.doPrepareChar(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(t);this.currentMask&&(this.currentMask.typedValue=t,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,r){let o=new Fe;return this.currentMask&&o.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),o}get state(){var t;return oe(V({},super.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state})}set state(t){let i=t,{compiledMasks:r,currentMaskRef:o,currentMask:n}=i,a=ve(i,["compiledMasks","currentMaskRef","currentMask"]);r&&this.compiledMasks.forEach((s,l)=>s.state=r[l]),o!=null&&(this.currentMask=o,this.currentMask.state=n),super.state=a}extractInput(t,r,o){return this.currentMask?this.currentMask.extractInput(t,r,o):""}extractTail(t,r){return this.currentMask?this.currentMask.extractTail(t,r):super.extractTail(t,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,r){return this.currentMask?this.currentMask.nearestInputPos(t,r):super.nearestInputPos(t,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,o)=>{if(!t[o])return;let i=t[o],{mask:n}=i,a=ve(i,["mask"]);return Hl(r,a)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};ru.DEFAULTS=oe(V({},Gt.DEFAULTS),{dispatch:(e,t,r,o)=>{if(!t.compiledMasks.length)return;let n=t.rawInputValue,a=t.compiledMasks.map((i,s)=>{let l=t.currentMask===i,p=l?i.displayValue.length:i.nearestInputPos(i.displayValue.length,_e.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):l||i.remove(p),i.append(e,t.currentMaskFlags(r)),i.appendTail(o),{index:s,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(p,i.nearestInputPos(i.displayValue.length,_e.FORCE_LEFT)))}});return a.sort((i,s)=>s.weight-i.weight||s.totalInputPositions-i.totalInputPositions),t.compiledMasks[a[0].index]}});Te.MaskedDynamic=ru;var ou=class e extends Zt{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=ve(n,["enum"]);if(r){let a=r.map(l=>l.length),i=Math.min(...a),s=Math.max(...a)-i;o.mask="*".repeat(i),s&&(o.mask+="["+"*".repeat(s)+"]"),this.enum=r}super._update(o)}_appendCharRaw(t,r){r===void 0&&(r={});let o=Math.min(this.nearestInputPos(0,_e.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+t,o));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,s)=>{let l=n[0][s];s>=this.value.length||l===i.value||(i.reset(),i._appendChar(l,r))});let a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new Fe}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or("",t)}remove(t,r){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),t===r)return new Fe;let o=Math.min(super.nearestInputPos(0,_e.FORCE_RIGHT),this.value.length),n;for(n=t;n>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(o,n),o)).length>1);--n);let a=super.remove(n,r);return a.tailShift+=n-t,a}};ou.DEFAULTS=oe(V({},Zt.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Te.MaskedEnum=ou;var sh=class extends Gt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(oe(V({},t),{validate:t.mask}))}};Te.MaskedFunction=sh;var s1,pi=class e extends Gt{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){let t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",o=(this.scale?"("+rh(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(rh).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(rh(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){let r=t.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),r);return t&&!o&&(n.skip=!0),o&&!this.allowPositive&&!this.value&&o!=="-"&&n.aggregate(this._appendChar("-")),[o,n]}_separatorsCount(t,r){r===void 0&&(r=!1);let o=0;for(let n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++o,r&&(t+=this.thousandsSeparator.length));return o}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r),this._removeThousandsSeparators(super.extractInput(t,r,o))}_appendCharRaw(t,r){r===void 0&&(r={});let o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(o);this._value=this._removeThousandsSeparators(this.value);let a=this._value;this._value+=t;let i=this.number,s=!isNaN(i),l=!1;if(s){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(e.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!r.tail)):s=!1),s&&(s=!!this._value.match(this._numberRegExp))}let p;s?p=new Fe({inserted:this._value.slice(a.length),rawInserted:l?"":t,skip:l}):(this._value=a,p=new Fe),this._value=this._insertThousandsSeparators(this._value);let c=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,u=this._separatorsCountFromSlice(c);return p.tailShift+=(u-n)*this.thousandsSeparator.length,p}_findSeparatorAround(t){if(this.thousandsSeparator){let r=t-this.thousandsSeparator.length+1,o=this.value.indexOf(this.thousandsSeparator,r);if(o<=t)return o}return-1}_adjustRangeWithSeparators(t,r){let o=this._findSeparatorAround(t);o>=0&&(t=o);let n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[t,r]}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r);let o=this.value.slice(0,t),n=this.value.slice(r),a=this._separatorsCount(o.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(o+n));let i=this._separatorsCountFromSlice(o);return new Fe({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case _e.NONE:case _e.LEFT:case _e.FORCE_LEFT:{let o=this._findSeparatorAround(t-1);if(o>=0){let n=o+this.thousandsSeparator.length;if(t<n||this.value.length<=n||r===_e.FORCE_LEFT)return o}break}case _e.RIGHT:case _e.FORCE_RIGHT:{let o=this._findSeparatorAround(t);if(o>=0)return o+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){let t=this.number,r=t;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==t&&(this.unmaskedValue=this.format(r,this));let o=this.value;this.normalizeZeros&&(o=this._normalizeZeros(o)),this.padFractionalZeros&&this.scale>0&&(o=this._padFractionalZeros(o)),this._value=o}super.doCommit()}_normalizeZeros(t){let r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(o,n,a,i)=>n+i),t.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(t){if(!t)return t;let r=t.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(t,r,o){r===void 0&&(r={});let n=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===e.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,o)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}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(t){return(super.typedValueEquals(t)||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}};s1=pi;pi.UNMASKED_RADIX=".";pi.EMPTY_VALUES=[...Gt.EMPTY_VALUES,0];pi.DEFAULTS=oe(V({},Gt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[s1.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})});Te.MaskedNumber=pi;var lh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function yb(e,t,r){t===void 0&&(t=lh.MASKED),r===void 0&&(r=lh.MASKED);let o=Ir(e);return n=>o.runIsolated(a=>(a[t]=n,a[r]))}function l1(e,t,r,o){return yb(t,r,o)(e)}Te.PIPE_TYPE=lh;Te.createPipe=yb;Te.pipe=l1;var ph=class extends Zt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var r,o,n;let l=pa(t),{repeat:a}=l,i=ve(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,i);let s=Ir(this._blockOpts);this.repeat=(r=(o=a!=null?a:s.repeat)!=null?o:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ir(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,r){r===void 0&&(r={});let o=new Fe;for(let l=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),p,c;p=(i=this._blocks[l])!=null?i:c=!c&&this._allocateBlock(l);++l){var n,a,i,s;let u=p._appendChar(t,oe(V({},r),{_beforeTailState:(s=r._beforeTailState)==null||(s=s._blocks)==null?void 0:s[l]}));if(u.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(o.aggregate(u),u.consumed)break}return o}_trimEmptyTail(t,r){var o,n;t===void 0&&(t=0);let a=Math.max(((o=this._mapPosToBlock(t))==null?void 0:o.index)||0,this.repeatFrom,0),i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let s=0;for(let l=i;a<=l&&!this._blocks[l].unmaskedValue;--l,++s);s&&(this._blocks.splice(i-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._trimEmptyTail(t,r),o}totalInputPositions(t,r){return t===void 0&&(t=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,r)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};Te.RepeatBlock=ph;try{globalThis.IMask=Te}catch(e){}import vb from"react";var Ne=An(k0(),1);import ch from"react";var p1={mask:Ne.default.oneOfType([Ne.default.array,Ne.default.func,Ne.default.string,Ne.default.instanceOf(RegExp),Ne.default.oneOf([Date,Number,Te.Masked]),Ne.default.instanceOf(Te.Masked)]),value:Ne.default.any,unmask:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["typed"])]),prepare:Ne.default.func,prepareChar:Ne.default.func,validate:Ne.default.func,commit:Ne.default.func,overwrite:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["shift"])]),eager:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["append","remove"])]),skipInvalid:Ne.default.bool,onAccept:Ne.default.func,onComplete:Ne.default.func,placeholderChar:Ne.default.string,displayChar:Ne.default.string,lazy:Ne.default.bool,definitions:Ne.default.object,blocks:Ne.default.object,enum:Ne.default.arrayOf(Ne.default.string),maxLength:Ne.default.number,from:Ne.default.number,to:Ne.default.number,pattern:Ne.default.string,format:Ne.default.func,parse:Ne.default.func,autofix:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["pad"])]),radix:Ne.default.string,thousandsSeparator:Ne.default.string,mapToRadix:Ne.default.arrayOf(Ne.default.string),scale:Ne.default.number,normalizeZeros:Ne.default.bool,padFractionalZeros:Ne.default.bool,min:Ne.default.oneOfType([Ne.default.number,Ne.default.instanceOf(Date)]),max:Ne.default.oneOfType([Ne.default.number,Ne.default.instanceOf(Date)]),dispatch:Ne.default.func,inputRef:Ne.default.oneOfType([Ne.default.func,Ne.default.shape({current:Ne.default.object})])},c1=Object.keys(p1).filter(e=>e!=="value"),bW=["value","unmask","onAccept","onComplete","inputRef"],xW=c1.filter(e=>bW.indexOf(e)<0);function gb(e){var t;let r=(t=class extends ch.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){let a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Te(this.element,a).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(a){let i=ve(a,[]);return Object.keys(i).filter(s=>xW.indexOf(s)<0).forEach(s=>{delete i[s]}),i}_extractNonMaskProps(a){let i=ve(a,[]);return c1.forEach(s=>{s!=="maxLength"&&delete i[s]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return ch.createElement(e,oe(V({},this._extractNonMaskProps(this.props)),{inputRef:this._inputRef}))}},t.displayName=void 0,t.propTypes=void 0,t),o=e.displayName||e.name||"Component";return r.displayName="IMask("+o+")",r.propTypes=p1,ch.forwardRef((n,a)=>ch.createElement(r,oe(V({},n),{ref:a})))}var TW=gb(e=>{let o=e,{inputRef:t}=o,r=ve(o,["inputRef"]);return vb.createElement("input",oe(V({},r),{ref:t}))}),PW=(e,t)=>vb.createElement(TW,oe(V({},e),{ref:t})),ua=vb.forwardRef(PW);import{useRef as YGe,useState as JGe,useCallback as qGe,useEffect as KGe}from"react";import"react";import{jsx as CW}from"react/jsx-runtime";var ci=Nt(CW("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");import{motion as SW}from"framer-motion";var kW=SW(Of),RW=E(kW)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),nu=RW;nu.displayName="DialogActions";var En=nu;var AW=E(Ut,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),MW=E(Fo,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),NW=E("div",{name:"DatePicker",slot:"root"})({width:"100%"}),u1=(e,t)=>{let r=`${e.getDate()}`,o=`${e.getMonth()+1}`,n=e.getFullYear();return Number(r)<10&&(r="0"+r),Number(o)<10&&(o="0"+o),t.replace(/YYYY/g,n.toString()).replace(/MM/g,o).replace(/DD/g,r)};function LW(e,t){let r=t.split(/[-./\s]/),o=e.split(/[-./\s]/);if(r.length!==o.length)throw new Error("Invalid date string or format");let n,a,i;for(let l=0;l<r.length;l++){let p=parseInt(o[l],10);switch(r[l]){case"DD":n=p;break;case"MM":a=p-1;break;case"YYYY":i=p;break}}return new Date(i,a,n)}var BW=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,t=>`${t}\``),zW=EW.forwardRef(function(t,r){let i=t,{onChange:o,format:n}=i,a=ve(i,["onChange","format"]);return M(ua,oe(V({},a),{inputRef:r,onAccept:s=>o({target:{name:t.name,value:s}}),mask:Date,pattern:BW(n),blocks:{D:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},M:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999,maxLength:4}},format:s=>u1(s,n),parse:s=>LW(s,n),autofix:"pad",overwrite:!0}))}),uh=IW((e,t)=>{let r=Y({props:e,name:"DatePicker"}),O=r,{onChange:o,disabled:n,label:a,error:i,helperText:s,minDate:l,maxDate:p,disableFuture:c,disablePast:u,required:f,sx:d,className:y,format:h="YYYY/MM/DD",size:g}=O,b=ve(O,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className","format","size"]),x=DW(null),[v,S]=Rr(r.value,r.defaultValue||"",bb(N=>o==null?void 0:o({target:{name:r.name,value:N}}),[r.name,o]),{disableStrict:!0}),[T,P]=wW(null),C=!!T;OW(()=>{var N;T||(N=x.current)==null||N.blur()},[T,x]),_W(t,()=>x.current,[x]);let R=bb(N=>{S(N.target.value)},[S]),_=bb(N=>{P(T?null:N.currentTarget),setTimeout(()=>{var A;(A=x.current)==null||A.focus()},0)},[T,P,x]);return M(NW,{children:M(Wr,{open:!0,children:Pe(Bo,{children:[M(po,oe(V({},b),{color:i?"danger":b.color,ref:x,size:g,value:v,onChange:R,placeholder:h,disabled:n,required:f,error:i,slotProps:{input:{component:zW,ref:x,format:h}},className:y,sx:d,endDecorator:M(Wt,{variant:"plain",onClick:_,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:M(ci,{})}),label:a,helperText:s})),C&&M($n,{onClickAway:()=>P(null),children:M(AW,{id:"date-picker-popper",open:!0,anchorEl:T,placement:"bottom-end",onMouseDown:N=>N.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(MW,{tabIndex:-1,role:"presentation",children:[M(ni,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([N])=>{R({target:{name:r.name,value:u1(N,h)}}),P(null)},minDate:l?new Date(l):void 0,maxDate:p?new Date(p):void 0,disableFuture:c,disablePast:u}),M(En,{sx:{p:1},children:M(It,{size:g,variant:"plain",color:"neutral",onClick:()=>{R({target:{name:r.name,value:""}}),P(null)},children:"Clear"})})]})})})]})})})});var d1=uh;import{motion as FW}from"framer-motion";var $W=FW(vm),au=e=>{let y=e,{label:t,error:r,helperText:o,color:n,size:a,disabled:i,required:s,minRows:l=2,maxRows:p=4,sx:c,className:u}=y,f=ve(y,["label","error","helperText","color","size","disabled","required","minRows","maxRows","sx","className"]),d=M($W,V({required:s,disabled:i,color:r?"danger":n,size:a,minRows:l,maxRows:p},f));return Pe(Sn,{required:s,disabled:i,color:n,size:a,error:r,sx:c,className:u,children:[t&&M(kn,{children:t}),d,o&&M(Rn,{children:o})]})};au.displayName="Textarea";var f1=au;import{useMemo as VW}from"react";import{motion as jW}from"framer-motion";var HW=jW(em),dh=HW;dh.displayName="Option";function iu(e){let h=e,{label:t,helperText:r,error:o,size:n,color:a,disabled:i,required:s,onChange:l,sx:p,className:c}=h,u=ve(h,["label","helperText","error","size","color","disabled","required","onChange","sx","className"]),f=VW(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),d=(g,b)=>{var S;let x=g||{target:{}},v=oe(V({},x),{target:{name:((S=x.target)==null?void 0:S.name)||e.name,value:b||void 0}});l==null||l(v)},y=M(om,oe(V({},u),{required:s,disabled:i,size:n,color:o?"danger":a,onChange:d,children:f.map(g=>M(dh,{value:g.value,children:g.label},g.value))}));return Pe(Sn,{required:s,disabled:i,size:n,color:a,error:o,sx:p,className:c,children:[t&&M(kn,{children:t}),y,r&&M(Rn,{children:r})]})}iu.displayName="Select";var m1=iu;import{motion as UW}from"framer-motion";var WW=UW(xm),su=e=>M(WW,V({},e));su.displayName="Tooltip";var h1=su;import{motion as g1}from"framer-motion";function v1(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var JW=E("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),fh=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function qW(e){let{paginationModel:{page:t,pageSize:r},rowCount:o,onPageChange:n}=e,a=1,i=Math.ceil(o/r),s=[t-2,t-1].filter(u=>u>1),l=[t+1,t+2].filter(u=>u<=i-1),p=i>1&&t<i-3,c=i>1&&t>4;return M(Lt,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:Pe(Lt,{direction:"row",spacing:.5,alignItems:"center",children:[M(Wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===a,"aria-label":"Previous page",children:M(Bm,{})}),t!==a&&M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),c&&M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(u=>M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),M(It,{variant:"soft",size:"sm",children:t}),l.map(u=>M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),p&&M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==i&&M(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),M(Wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===i,"aria-label":"Next page",children:M(zm,{})})]})})}var KW=e=>M(Lm,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:t=>t.stopPropagation(),onMouseDown:t=>{var i;let r=t.clientX,o=(i=e.current)==null?void 0:i.getBoundingClientRect().width,n=s=>{o&&r&&(e.current.style.width=`${o+(s.clientX-r)}px`)},a=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)}}),XW=E("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"100%"}}),ZW=E("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>oe(V({},e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"}),{"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),QW=E("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),e9=g1(a1),t9=e=>{let{width:t,maxWidth:r,minWidth:o,stickyHeader:n,resizable:a,field:i,tableId:s,headerName:l,required:p,editMode:c,sort:u,onSortChange:f,sortable:d=!0,sortOrder:y}=e,h=xb(null),g=nr(()=>`${s}_header_${l!=null?l:i}`.trim(),[s,l,i]),b=a==null||a?KW(h):null,x={width:t,minWidth:o!=null?o:"50px",maxWidth:r,position:n?void 0:"relative",cursor:d?"pointer":"default",userSelect:"none"},v=v1(e),S=y[0],T=d&&M(e9,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":g,"aria-description":(u!=null?u:S)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:u?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(u!=null?u:S)==="desc"?180:0,opacity:u?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}});return Pe(g1.th,{id:g,"aria-label":l!=null?l:i,"aria-sort":u?{asc:"ascending",desc:"descending"}[u]:"none",ref:h,style:x,onClick:P=>d&&(f==null?void 0:f({field:i,currentSort:u,multiple:P.shiftKey})),whileHover:"hover",initial:"initial",children:[Pe(Lt,{gap:1,direction:"row",justifyContent:v,children:[v==="end"&&T,Pe("div",{children:[l!=null?l:i,c&&p&&M(QW,{children:"*"})]}),v==="start"&&T]}),b]},i)},r9=e=>{var T;let{tableId:t,field:r,type:o,renderCell:n,renderEditCell:a,isCellEditable:i,noWrap:s,row:l,rowId:p}=e,[c,u]=y1(l[r]),f=xb(null),d=nr(()=>({row:l,value:c,id:p}),[l,p,c]),y=nr(()=>!!(e.editMode&&(typeof i=="function"?i(d):i==null||i)),[e.editMode,i,d]),h=nr(()=>oe(V({},typeof e.componentProps=="function"?e.componentProps(d):e.componentProps||{}),{size:"sm"}),[e,d]),g=nr(()=>V(oe(V({},h),{onChange:P=>{var C,R;(C=h.onChange)==null||C.call(h,P),u(P.target.value),o==="select"&&((R=e.onCellEditStop)==null||R.call(e,oe(V({},d),{originalRow:l,row:oe(V({},d.row),{[r]:P.target.value}),value:P.target.value})))},onFocus:P=>{var C,R;(C=h.onFocus)==null||C.call(h,P),(R=e.onCellEditStart)==null||R.call(e,oe(V({},d),{originalRow:l,row:oe(V({},d.row),{value:c}),value:c}))},onBlur:P=>{var C,R;(C=h.onBlur)==null||C.call(h,P),o&&["number","text","longText","currency","date"].includes(o)&&((R=e.onCellEditStop)==null||R.call(e,oe(V({},d),{originalRow:l,row:oe(V({},d.row),{[r]:c}),value:c})))}}),o==="autocomplete"&&{onChangeComplete:P=>{var C,R;(C=h.onChangeComplete)==null||C.call(h,P),u(P.target.value),(R=e.onCellEditStop)==null||R.call(e,oe(V({},d),{originalRow:l,row:oe(V({},d.row),{[r]:P.target.value}),value:P.target.value}))}}),[d,l,r,c,h,o,e]),b=nr(()=>a?a(d):{date:M(d1,V({value:c},g)),currency:M(n1,V({value:c},g)),number:M(po,V({value:c,type:"number"},g)),text:M(po,V({value:c,type:"text"},g)),longText:M(f1,V({value:c},g)),autocomplete:M(ZE,V({value:c,options:g.options||[c]},g)),select:M(m1,V({value:c,options:g.options||[c]},g))}[o||"text"],[c,g,o]),x=nr(()=>{if(n)return n(d);let P=c;return{link:GW.createElement(e.component||oa,V({children:P},h))}[o||"text"]||P},[c,n,d,o,h,e]),v=nr(()=>y&&b?b:x,[y,b,x]),S=nr(()=>s&&e.type==="longText",[s,e.type]);return mh(()=>{u(l[r])},[l,r]),M("td",{ref:f,headers:`${t}_header_${(T=e.headerName)!=null?T:r}`,style:{textAlign:v1({type:o}),verticalAlign:y?"top":"middle"},children:S?M(h1,{title:c,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500,children:M("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:v})}):v},r)},o9=e=>{let{tableId:t,columns:r,rowId:o,editMode:n,noWrap:a,row:i}=e;return M(Bo,{children:r.map((s,l)=>f0(r9,oe(V({},s),{tableId:t,key:`${o}_${s.field.toString()}_${l}`,row:i,rowId:o,editMode:n,noWrap:a})))})};function n9({rows:e,columns:t,rowCount:r,pagination:o,paginationMode:n,paginationModel:a,onPaginationModelChange:i,sortModel:s,sortOrder:l=["asc","desc",null],selectionModel:p=[],onSortModelChange:c,onSelectionModelChange:u,editMode:f,getId:d,isTotalSelected:y}){let[h,g]=Rr(s,[],da(B=>c==null?void 0:c(B),[c])),b=nr(()=>t.reduce((B,U)=>oe(V({},B),{[U.field]:U}),{}),[t]),x=da((B,U)=>{for(let z of h){let{field:k,sort:q}=z,re=B[k],D=U[k],pe=b[k],me=0;if(pe.sortComparator?me=pe.sortComparator({rowA:B,rowB:U}):typeof re=="string"&&typeof D=="string"?me=re.localeCompare(D):typeof re=="number"&&typeof D=="number"?me=re-D:re instanceof Date&&D instanceof Date&&(me=re.getTime()-D.getTime()),me!==0)return q==="asc"?me:-me}return 0},[h,b]),v=nr(()=>h.length?[...e].sort(x):e,[e,h,x]),S=nr(()=>Array.from(new Set(l)),[l]),[T,P]=y1((a==null?void 0:a.page)||1),C=(a==null?void 0:a.pageSize)||20,R=da((B,U)=>{var z,k;return(k=(z=d==null?void 0:d(B))!=null?z:B.id)!=null?k:`${(U||0)+(T-1)*C}`},[d,T,C]),_=nr(()=>new Set(p),[p]),O=nr(()=>!o||n==="server"?v:v.slice((T-1)*C,(T-1)*C+C),[v,T,C,n,o]),N=nr(()=>O.length>0&&O.every((B,U)=>_.has(R(B,U))),[O,_,R]),A=r||v.length,I=nr(()=>y!=null?y:A>0&&p.length===A,[y,p,A]),F=nr(()=>(t||Object.keys(v[0]||{}).map(U=>({field:U}))).map(U=>{var z,k,q;return oe(V({},U),{isCellEditable:f&&(typeof U.isCellEditable=="function"?U.isCellEditable:(z=U.isCellEditable)!=null?z:!0),sort:(k=h.find(re=>re.field===U.field))==null?void 0:k.sort,sortOrder:((q=b[U.field])==null?void 0:q.sortOrder)||S})}),[v,t,f,h,b,S]),L=da(B=>{P(B),i==null||i({page:B,pageSize:C})},[i,C]),w=da(B=>{let{field:U,currentSort:z,multiple:k}=B,re=b[U].sortOrder||S;if(z!==void 0){let pe=(re.indexOf(z)+1)%re.length,me=re[pe];if(!me){let ae=k?h.filter(W=>W.field!==U):[];g(ae);return}let De=k?h.map(ae=>ae.field===U?{field:U,sort:me}:ae):[{field:U,sort:me}];g(De)}else{let D=k?[...h,{field:U,sort:re[0]}]:[{field:U,sort:re[0]}];g(D)}},[S,b,h,g]);return mh(()=>{a||L(1)},[A,L,a]),mh(()=>{let B=Math.max(1,Math.ceil(A/C));T>B&&L(B)},[T,A,C,L]),mh(()=>{u==null||u([])},[T]),{rowCount:A,page:T,pageSize:C,onPaginationModelChange:L,getId:R,HeadCell:t9,BodyRow:o9,dataInPage:O,handleSortChange:w,isAllSelected:N,isTotalSelected:I,isSelectedRow:da(B=>_.has(B),[_]),onAllCheckboxChange:da(()=>{u==null||u(N?[]:O.map(R))},[N,O,u,R]),onCheckboxChange:da((B,U)=>{if(_.has(U)){let z=p.filter(k=>k!==U);u==null||u(z)}else{let z=[...p,U];u==null||u(z)}},[p,u,_]),columns:F,onTotalSelect:da(()=>{u==null||u(I?[]:v.map(R),!I)},[I,v,u,R])}}function Tb(e){let Le=e,{rows:t,checkboxSelection:r,editMode:o,selectionModel:n,onSelectionModelChange:a,disableSelectionOnClick:i,onRowClick:s,rowCount:l,columns:p,onPaginationModelChange:c,pagination:u,paginationMode:f,paginationModel:d,sortModel:y,sortOrder:h,onSortModelChange:g,loading:b,slots:{checkbox:x=jc,toolbar:v,footer:S,loadingOverlay:T=()=>M(hc,{value:8,variant:"plain"})}={},slotProps:{checkbox:P={},toolbar:C,background:R={}}={},stripe:_}=Le,O=ve(Le,["rows","checkboxSelection","editMode","selectionModel","onSelectionModelChange","disableSelectionOnClick","onRowClick","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","sortModel","sortOrder","onSortModelChange","loading","slots","slotProps","stripe"]),N=YW(),A=xb(null),{columns:I,isAllSelected:F,isSelectedRow:L,onAllCheckboxChange:w,onCheckboxChange:B,getId:U,rowCount:z,page:k,pageSize:q,onPaginationModelChange:re,handleSortChange:D,dataInPage:pe,isTotalSelected:me,onTotalSelect:De,HeadCell:ae,BodyRow:W}=n9(e),de=Am({count:pe.length,getScrollElement:()=>A.current,estimateSize:()=>32,measureElement:Ve=>Ve.clientHeight,overscan:20}),fe=nr(()=>({page:k,pageSize:q}),[k,q]),Ce=de.getTotalSize(),be=de.getVirtualItems();return Pe(Lm,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"},children:[(!!r||!!v)&&Pe(Lt,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&Pe(Lt,{direction:"row",spacing:1,children:[!F&&Pe(qr,{level:"body-xs",children:[fh((n==null?void 0:n.length)||0)," items selected"]}),F&&!me&&Pe(Lt,{direction:"row",spacing:1,alignItems:"center",children:[Pe(qr,{level:"body-xs",children:["All ",fh((n==null?void 0:n.length)||0)," items on this page are selected."]}),Pe(It,{size:"sm",variant:"plain",onClick:De,children:["Select all ",fh(z!=null?z:t.length)," items"]})]}),me&&Pe(Lt,{direction:"row",spacing:1,alignItems:"center",children:[Pe(qr,{level:"body-xs",children:["All ",fh(z!=null?z:t.length)," items are selected."]}),M(It,{size:"sm",variant:"plain",color:"danger",onClick:De,children:"Cancel"})]})]}),v&&M(v,V({},C||{}))]}),M(Fo,oe(V({variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:A},R),{children:Pe(Qc,oe(V({},O),{children:[M("thead",{children:Pe("tr",{children:[r&&M("th",{style:{width:"40px",textAlign:"center"},children:M(x,V({onChange:w,checked:F,indeterminate:(n||[]).length>0&&!F},P))}),I.map((Ve,te)=>M(ae,V({tableId:N,stickyHeader:e.stickyHeader,editMode:!!Ve.isCellEditable,onSortChange:D},Ve),`${Ve.field.toString()}_${te}`))]})}),Pe(XW,{style:{height:`${Ce}px`},children:[!!b&&M(JW,{children:M("td",{children:M(Lm,{sx:{position:"absolute",top:0,left:0,right:0},children:M(T,{})})})}),be.map((Ve,te)=>{let X=Ve.index,ye=pe[X],ge=U(ye,X),$e=_&&(_==="even"&&(X+1)%2===0||_==="odd"&&(X+1)%2===1);return Pe(ZW,{role:r&&!i?"checkbox":void 0,tabIndex:r&&!i?-1:void 0,onClick:Re=>{s==null||s({row:ye,rowId:ge},Re),r&&!i&&B(Re,ge)},"aria-checked":r&&!i?L(ge):void 0,striped:$e,style:{height:`${Ve.size}px`,transform:`translateY(${Ve.start-te*Ve.size}px)`},children:[r&&M("th",{scope:"row",style:{textAlign:"center"},children:M(x,V({onClick:Re=>Re.stopPropagation(),onChange:Re=>B(Re,ge),checked:L(ge)},P))}),M(W,{tableId:N,columns:I,row:ye,rowId:ge,editMode:o,noWrap:e.noWrap})]},ge)})]}),S&&M(S,{})]}))})),u&&M(qW,{paginationModel:fe,rowCount:z,onPageChange:re})]})}Tb.displayName="DataTable";import a9,{forwardRef as i9,useCallback as hh,useEffect as s9,useImperativeHandle as l9,useMemo as p9,useRef as c9,useState as u9}from"react";var d9=E(Ut,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),f9=E(Fo,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),m9=E("div",{name:"DateRangePicker",slot:"root"})({width:"100%"}),x1=([e,t],r)=>{let o=n=>{let a=`${n.getDate()}`,i=`${n.getMonth()+1}`,s=n.getFullYear();return Number(a)<10&&(a="0"+a),Number(i)<10&&(i="0"+i),r.replace(/YYYY/g,s.toString()).replace(/MM/g,i).replace(/DD/g,a)};return[o(e),t?o(t):""].join(" - ")};function b1(e,t){let r=t.split(/[-./\s]/),o=e.split(/[-./\s]/),n,a,i;for(let l=0;l<r.length;l++){let p=parseInt(o[l],10);switch(r[l]){case"DD":n=p;break;case"MM":a=p-1;break;case"YYYY":i=p;break}}return new Date(i,a,n)}var T1=(e,t)=>{let r=e.split(" - ")[0]||"",o=e.split(" - ")[1]||"";return[b1(r,t),b1(o,t)]},h9=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,t=>`${t}\``),y9=a9.forwardRef(function(t,r){let i=t,{onChange:o,format:n}=i,a=ve(i,["onChange","format"]);return M(ua,oe(V({},a),{inputRef:r,onAccept:s=>o({target:{name:t.name,value:s}}),mask:Date,pattern:h9(n),blocks:{D:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},M:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:s=>x1(s,n),parse:s=>T1(s,n),autofix:"pad",overwrite:!0}))}),Pb=i9((e,t)=>{let r=Y({props:e,name:"DateRangePicker"}),A=r,{onChange:o,disabled:n,label:a,error:i,helperText:s,minDate:l,maxDate:p,disableFuture:c,disablePast:u,required:f,sx:d,className:y,format:h="YYYY/MM/DD",size:g}=A,b=ve(A,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className","format","size"]),x=c9(null),[v,S]=Rr(r.value,r.defaultValue||"",hh(I=>o==null?void 0:o({target:{name:r.name,value:I}}),[r.name,o]),{disableStrict:!0}),[T,P]=u9(null),C=!!T,R=p9(()=>v?T1(v,h):void 0,[v,h]);s9(()=>{var I;T||(I=x.current)==null||I.blur()},[T,x]),l9(t,()=>x.current,[x]);let _=hh(I=>{S(I.target.value)},[S]),O=hh(I=>{var F;P(T?null:I.currentTarget),(F=x.current)==null||F.focus()},[T,P,x]),N=hh(([I,F])=>{!I||!F||(S(x1([I,F],h)),P(null))},[S,P,h]);return M(m9,{children:M(Wr,{open:!0,children:Pe(Bo,{children:[M(po,oe(V({},b),{color:i?"danger":b.color,ref:t,size:g,value:v,onChange:_,disabled:n,required:f,placeholder:`${h} - ${h}`,slotProps:{input:{component:y9,ref:x,format:h}},error:i,className:y,sx:d,endDecorator:M(Wt,{variant:"plain",onClick:O,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:M(ci,{})}),label:a,helperText:s})),C&&M($n,{onClickAway:()=>P(null),children:M(d9,{id:"date-range-picker-popper",open:!0,anchorEl:T,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(f9,{tabIndex:-1,role:"presentation",children:[M(ni,{rangeSelection:!0,defaultValue:R,onChange:N,minDate:l?new Date(l):void 0,maxDate:p?new Date(p):void 0,disableFuture:c,disablePast:u}),M(En,{sx:{p:1},children:M(It,{size:g,variant:"plain",color:"neutral",onClick:()=>{S(""),P(null)},children:"Clear"})})]})})})]})})})});Pb.displayName="DateRangePicker";import{motion as g9}from"framer-motion";var v9=g9(Il),Cb=e=>{var i;let a=e,{children:t,size:r}=a,o=ve(a,["children","size"]),n=Mp();return M(v9,oe(V({},o),{slotProps:oe(V({},o.slotProps),{content:oe(V({},(i=o.slotProps)==null?void 0:i.content),{sx:{bgcolor:"transparent",boxShadow:"none",[n.breakpoints.down("md")]:{width:"100%"}}})}),sx:oe(V({},e.sx),{"--Drawer-horizontalSize":{sm:"360px",md:"600px",lg:"900px"}[r||"md"]}),children:t}))};Cb.displayName="Drawer";import{motion as b9}from"framer-motion";var x9=b9(Df),T9=E(x9)(({theme:e})=>({padding:e.spacing(0,6,5)})),lu=T9;lu.displayName="DialogContent";var yh=lu;import{motion as P9}from"framer-motion";var C9=P9(wf),S9=E(C9)(({theme:e})=>({padding:e.spacing(4,6)})),pu=S9;pu.displayName="DialogTitle";var gh=pu;import I9 from"react";import{motion as Sb}from"framer-motion";var k9=Sb(Nf),kb=k9;kb.displayName="Modal";var P1=E(Kf)({padding:0}),cu=P1;cu.displayName="ModalDialog";var R9=E(Sb(qf))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),vh=R9;vh.displayName="ModalClose";var E9=Sb(Zf),Rb=E9;Rb.displayName="ModalOverflow";function Eb(e){let n=e,{title:t,children:r}=n,o=ve(n,["title","children"]);return Pe(P1,oe(V({},o),{children:[M(vh,{}),M(gh,{children:t}),M(yh,{children:r})]}))}Eb.displayName="ModalFrame";var O9=E(cu,{name:"Dialog",slot:"Root"})({padding:0}),Ib=I9.forwardRef((e,t)=>{let s=e,{title:r,children:o,actions:n,fullscreen:a}=s,i=ve(s,["title","children","actions","fullscreen"]);return Pe(O9,oe(V({layout:a?"fullscreen":"center",ref:t},i),{children:[M(gh,{children:r}),M(yh,{children:o}),M(En,{children:n})]}))});Ib.displayName="DialogFrame";import{motion as _9}from"framer-motion";var D9=_9(Af),uu=e=>M(D9,V({},e));uu.displayName="Divider";import{motion as w9}from"framer-motion";var A9=w9(Il),Ob=e=>{var n;let o=e,{children:t}=o,r=ve(o,["children"]);return M(A9,oe(V({},r),{slotProps:oe(V({},r.slotProps),{content:oe(V({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};Ob.displayName="InsetDrawer";import{motion as M9}from"framer-motion";var N9=M9(Vf),_b=N9;_b.displayName="Grid";function C1(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var L9=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,B9=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,z9={};function bh(e,t){return((t||z9).jsx?B9:L9).test(e)}var F9=/[ \t\n\f\r]/g;function Db(e){return typeof e=="object"?e.type==="text"?S1(e.value):!1:S1(e)}function S1(e){return e.replace(F9,"")===""}var fa=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};fa.prototype.property={};fa.prototype.normal={};fa.prototype.space=null;function wb(e,t){let r={},o={},n=-1;for(;++n<e.length;)Object.assign(r,e[n].property),Object.assign(o,e[n].normal);return new fa(r,o,t)}function du(e){return e.toLowerCase()}var _r=class{constructor(t,r){this.property=t,this.attribute=r}};_r.prototype.space=null;_r.prototype.boolean=!1;_r.prototype.booleanish=!1;_r.prototype.overloadedBoolean=!1;_r.prototype.number=!1;_r.prototype.commaSeparated=!1;_r.prototype.spaceSeparated=!1;_r.prototype.commaOrSpaceSeparated=!1;_r.prototype.mustUseProperty=!1;_r.prototype.defined=!1;var fu={};RT(fu,{boolean:()=>je,booleanish:()=>Ot,commaOrSpaceSeparated:()=>Kr,commaSeparated:()=>ui,number:()=>he,overloadedBoolean:()=>Ab,spaceSeparated:()=>pt});var $9=0,je=ms(),Ot=ms(),Ab=ms(),he=ms(),pt=ms(),ui=ms(),Kr=ms();function ms(){return 2**++$9}var Mb=Object.keys(fu),hs=class extends _r{constructor(t,r,o,n){let a=-1;if(super(t,r),k1(this,"space",n),typeof o=="number")for(;++a<Mb.length;){let i=Mb[a];k1(this,Mb[a],(o&fu[i])===fu[i])}}};hs.prototype.defined=!0;function k1(e,t,r){r&&(e[t]=r)}var V9={}.hasOwnProperty;function $o(e){let t={},r={},o;for(o in e.properties)if(V9.call(e.properties,o)){let n=e.properties[o],a=new hs(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,r[du(o)]=o,r[du(a.attribute)]=o}return new fa(t,r,e.space)}var Nb=$o({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Lb=$o({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function xh(e,t){return t in e?e[t]:t}function Th(e,t){return xh(e,t.toLowerCase())}var Bb=$o({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Th,properties:{xmlns:null,xmlnsXLink:null}});var zb=$o({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:pt,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:he,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:pt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Ot,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null}});var R1=$o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Th,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ui,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:pt,autoFocus:je,autoPlay:je,blocking:pt,capture:null,charSet:null,checked:je,cite:null,className:pt,cols:he,colSpan:null,content:null,contentEditable:Ot,controls:je,controlsList:pt,coords:he|ui,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Ab,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:pt,height:he,hidden:je,high:he,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:pt,itemRef:pt,itemScope:je,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:he,pattern:null,ping:pt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:pt,required:je,reversed:je,rows:he,rowSpan:he,sandbox:pt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Ot,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:he,security:null,unselectable:null}});var E1=$o({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:xh,properties:{about:Kr,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ui,g2:ui,glyphName:ui,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kr,rev:Kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kr,requiredFeatures:Kr,requiredFonts:Kr,requiredFormats:Kr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kr,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var j9=/^data[-\w.:]+$/i,I1=/-[a-z]/g,H9=/[A-Z]/g;function Fb(e,t){let r=du(t),o=t,n=_r;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&j9.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(I1,W9);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!I1.test(a)){let i=a.replace(H9,U9);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=hs}return new n(o,t)}function U9(e){return"-"+e.toLowerCase()}function W9(e){return e.charAt(1).toUpperCase()}var $b={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var O1=wb([Lb,Nb,Bb,zb,R1],"html"),Ph=wb([Lb,Nb,Bb,zb,E1],"svg");function _1(e){return e.join(" ").trim()}var Vb=An(B1(),1),z1=Vb.default.default||Vb.default;var Ch=F1("end"),Jl=F1("start");function F1(e){return t;function t(r){let o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function jb(e){let t=Jl(e),r=Ch(e);if(t&&r)return{start:t,end:r}}function di(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?$1(e.position):"start"in e||"end"in e?$1(e):"line"in e||"column"in e?Hb(e):""}function Hb(e){return V1(e&&e.line)+":"+V1(e&&e.column)}function $1(e){return Hb(e&&e.start)+"-"+Hb(e&&e.end)}function V1(e){return e&&typeof e=="number"?e:1}var Bt=class extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let n="",a={},i=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a=V({},r)),typeof t=="string"?n=t:!a.cause&&t&&(i=!0,n=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){let l=o.indexOf(":");l===-1?a.ruleId=o:(a.source=o.slice(0,l),a.ruleId=o.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){let l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}let s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=s?s.line:void 0,this.name=di(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}};Bt.prototype.file="";Bt.prototype.name="";Bt.prototype.reason="";Bt.prototype.message="";Bt.prototype.stack="";Bt.prototype.column=void 0;Bt.prototype.line=void 0;Bt.prototype.ancestors=void 0;Bt.prototype.cause=void 0;Bt.prototype.fatal=void 0;Bt.prototype.place=void 0;Bt.prototype.ruleId=void 0;Bt.prototype.source=void 0;var Ub={}.hasOwnProperty,a6=new Map,i6=/[A-Z]/g,s6=/-([a-z])/g,l6=new Set(["table","tbody","thead","tfoot","tr"]),p6=new Set(["td","th"]),j1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Wb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let r=t.filePath||void 0,o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=g6(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=y6(r,t.jsx,t.jsxs)}let n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ph:O1,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=H1(n,e,void 0);return a&&typeof a!="string"?a:n.create(e,n.Fragment,{children:a||void 0},void 0)}function H1(e,t,r){if(t.type==="element")return c6(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return u6(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return f6(e,t,r);if(t.type==="mdxjsEsm")return d6(e,t);if(t.type==="root")return m6(e,t,r);if(t.type==="text")return h6(e,t)}function c6(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=Ph,e.schema=n),e.ancestors.push(t);let a=W1(e,t.tagName,!1),i=v6(e,t),s=Yb(e,t);return l6.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Db(l):!0})),U1(e,i,a,t),Gb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function u6(e,t){if(t.data&&t.data.estree&&e.evaluater){let o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}hu(e,t.position)}function d6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hu(e,t.position)}function f6(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=Ph,e.schema=n),e.ancestors.push(t);let a=t.name===null?e.Fragment:W1(e,t.name,!0),i=b6(e,t),s=Yb(e,t);return U1(e,i,a,t),Gb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function m6(e,t,r){let o={};return Gb(o,Yb(e,t)),e.create(t,e.Fragment,o,r)}function h6(e,t){return t.value}function U1(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function Gb(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function y6(e,t,r){return o;function o(n,a,i,s){let p=Array.isArray(i.children)?r:t;return s?p(a,i,s):p(a,i)}}function g6(e,t){return r;function r(o,n,a,i){let s=Array.isArray(a.children),l=Jl(o);return t(n,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function v6(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&Ub.call(t.properties,n)){let a=x6(e,n,t.properties[n]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&p6.has(t.tagName)?o=s:r[i]=s}}if(o){let a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function b6(e,t){let r={};for(let o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){let a=o.data.estree.body[0];a.type;let i=a.expression;i.type;let s=i.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else hu(e,t.position);else{let n=o.name,a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){let s=o.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else hu(e,t.position);else a=o.value===null?!0:o.value;r[n]=a}return r}function Yb(e,t){let r=[],o=-1,n=e.passKeys?new Map:a6;for(;++o<t.children.length;){let a=t.children[o],i;if(e.passKeys){let l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){let p=n.get(l)||0;i=l+"-"+p,n.set(l,p+1)}}let s=H1(e,a,i);s!==void 0&&r.push(s)}return r}function x6(e,t,r){let o=Fb(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?C1(r):_1(r)),o.property==="style"){let n=typeof r=="object"?r:T6(e,String(r));return e.stylePropertyNameCase==="css"&&(n=P6(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?$b[o.property]||o.property:o.attribute,r]}}function T6(e,t){let r={};try{z1(t,o)}catch(n){if(!e.ignoreInvalidStyle){let a=n,i=new Bt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=j1+"#cannot-parse-style-attribute",i}}return r;function o(n,a){let i=n;i.slice(0,2)!=="--"&&(i.slice(0,4)==="-ms-"&&(i="ms-"+i.slice(4)),i=i.replace(s6,S6)),r[i]=a}}function W1(e,t,r){let o;if(!r)o={type:"Literal",value:t};else if(t.includes(".")){let n=t.split("."),a=-1,i;for(;++a<n.length;){let s=bh(n[a])?{type:"Identifier",name:n[a]}:{type:"Literal",value:n[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}o=i}else o=bh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return Ub.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);hu(e)}function hu(e,t){let r=new Bt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=j1+"#cannot-handle-mdx-estrees-without-createevaluater",r}function P6(e){let t={},r;for(r in e)Ub.call(e,r)&&(t[C6(r)]=e[r]);return t}function C6(e){let t=e.replace(i6,k6);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function S6(e,t){return t.toUpperCase()}function k6(e){return"-"+e.toLowerCase()}var yu={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};import{Fragment as _G,jsx as DG,jsxs as wG}from"react/jsx-runtime";var R6={};function Jb(e,t){let r=t||R6,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Y1(e,o,n)}function Y1(e,t,r){if(E6(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return G1(e.children,t,r)}return Array.isArray(e)?G1(e,t,r):""}function G1(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=Y1(e[n],t,r);return o.join("")}function E6(e){return!!(e&&typeof e=="object")}var J1=document.createElement("i");function ql(e){let t="&"+e+";";J1.innerHTML=t;let r=J1.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Dr(e,t,r,o){let n=e.length,a=0,i;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,o.length<1e4)i=Array.from(o),i.unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);a<o.length;)i=o.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Fr(e,t){return e.length>0?(Dr(e,e.length,0,t),e):t}var q1={}.hasOwnProperty;function K1(e){let t={},r=-1;for(;++r<e.length;)I6(t,e[r]);return t}function I6(e,t){let r;for(r in t){let n=(q1.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){q1.call(n,i)||(n[i]=[]);let s=a[i];O6(n[i],Array.isArray(s)?s:s?[s]:[])}}}function O6(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);Dr(e,0,0,o)}function Sh(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function ma(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var uo=fi(/[A-Za-z]/),ar=fi(/[\dA-Za-z]/),X1=fi(/[#-'*+\--9=?A-Z^-~]/);function gu(e){return e!==null&&(e<32||e===127)}var vu=fi(/\d/),Z1=fi(/[\dA-Fa-f]/),Q1=fi(/[!-/:-@[-`{-~]/);function we(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}var eO=fi(new RegExp("\\p{P}|\\p{S}","u")),tO=fi(/\s/);function fi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Vo(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&ar(e.charCodeAt(r+1))&&ar(e.charCodeAt(r+2)))n=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){let s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),n=1):i="\uFFFD"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,r),encodeURIComponent(i)),o=r+n+1,i=""),n&&(r+=n,n=0)}return t.join("")+e.slice(o)}function We(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return He(l)?(e.enter(r),s(l)):t(l)}function s(l){return He(l)&&a++<n?(e.consume(l),s):(e.exit(r),t(l))}}var rO={tokenize:_6};function _6(e){let t=e.attempt(this.parser.constructs.contentInitial,o,n),r;return t;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),We(e,t,"linePrefix")}function n(s){return e.enter("paragraph"),a(s)}function a(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return we(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var nO={tokenize:D6},oO={tokenize:w6};function D6(e){let t=this,r=[],o=0,n,a,i;return s;function s(v){if(o<r.length){let S=r[o];return t.containerState=S[1],e.attempt(S[0].continuation,l,p)(v)}return p(v)}function l(v){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let S=t.events.length,T=S,P;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){P=t.events[T][1].end;break}b(o);let C=S;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},P),C++;return Dr(t.events,T+1,0,t.events.slice(S)),t.events.length=C,p(v)}return s(v)}function p(v){if(o===r.length){if(!n)return f(v);if(n.currentConstruct&&n.currentConstruct.concrete)return y(v);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(oO,c,u)(v)}function c(v){return n&&x(),b(o),f(v)}function u(v){return t.parser.lazy[t.now().line]=o!==r.length,i=t.now().offset,y(v)}function f(v){return t.containerState={},e.attempt(oO,d,y)(v)}function d(v){return o++,r.push([t.currentConstruct,t.containerState]),f(v)}function y(v){if(v===null){n&&x(),b(0),e.consume(v);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:n}),h(v)}function h(v){if(v===null){g(e.exit("chunkFlow"),!0),b(0),e.consume(v);return}return we(v)?(e.consume(v),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(v),h)}function g(v,S){let T=t.sliceStream(v);if(S&&T.push(null),v.previous=a,a&&(a.next=v),a=v,n.defineSkip(v.start),n.write(T),t.parser.lazy[v.start.line]){let P=n.events.length;for(;P--;)if(n.events[P][1].start.offset<i&&(!n.events[P][1].end||n.events[P][1].end.offset>i))return;let C=t.events.length,R=C,_,O;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(_){O=t.events[R][1].end;break}_=!0}for(b(o),P=C;P<t.events.length;)t.events[P][1].end=Object.assign({},O),P++;Dr(t.events,R+1,0,t.events.slice(C)),t.events.length=P}}function b(v){let S=r.length;for(;S-- >v;){let T=r[S];t.containerState=T[1],T[0].exit.call(t,e)}r.length=v}function x(){n.write([null]),a=void 0,n=void 0,t.containerState._closeFlow=void 0}}function w6(e,t,r){return We(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qb(e){if(e===null||zt(e)||tO(e))return 1;if(eO(e))return 2}function Kl(e,t,r){let o=[],n=-1;for(;++n<e.length;){let a=e[n].resolveAll;a&&!o.includes(a)&&(t=a(t,r),o.push(a))}return t}var bu={name:"attention",tokenize:M6,resolveAll:A6};function A6(e,t){let r=-1,o,n,a,i,s,l,p,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(o=r;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[o][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[o][1].end.offset-e[o][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let u=Object.assign({},e[o][1].end),f=Object.assign({},e[r][1].start);aO(u,-l),aO(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[o][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[r][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[o][1].end=Object.assign({},i.start),e[r][1].start=Object.assign({},s.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=Fr(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=Fr(p,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),p=Fr(p,Kl(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=Fr(p,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,p=Fr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Dr(e,o-1,r-o+3,p),r=o+p.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function M6(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=qb(o),a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;let p=e.exit("attentionSequence"),c=qb(l),u=!c||c===2&&n||r.includes(l),f=!n||n===2&&c||r.includes(o);return p._open=!!(a===42?u:u&&(n||!f)),p._close=!!(a===42?f:f&&(c||!u)),t(l)}}function aO(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Kb={name:"autolink",tokenize:N6};function N6(e,t,r){let o=0;return n;function n(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return uo(d)?(e.consume(d),i):p(d)}function i(d){return d===43||d===45||d===46||ar(d)?(o=1,s(d)):p(d)}function s(d){return d===58?(e.consume(d),o=0,l):(d===43||d===45||d===46||ar(d))&&o++<32?(e.consume(d),s):(o=0,p(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||gu(d)?r(d):(e.consume(d),l)}function p(d){return d===64?(e.consume(d),c):X1(d)?(e.consume(d),p):r(d)}function c(d){return ar(d)?u(d):r(d)}function u(d){return d===46?(e.consume(d),o=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||ar(d))&&o++<63){let y=d===45?f:u;return e.consume(d),y}return r(d)}}var mi={tokenize:L6,partial:!0};function L6(e,t,r){return o;function o(a){return He(a)?We(e,n,"linePrefix")(a):n(a)}function n(a){return a===null||we(a)?t(a):r(a)}}var kh={name:"blockQuote",tokenize:B6,continuation:{tokenize:z6},exit:F6};function B6(e,t,r){let o=this;return n;function n(i){if(i===62){let s=o.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return r(i)}function a(i){return He(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function z6(e,t,r){let o=this;return n;function n(i){return He(i)?We(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(kh,t,r)(i)}}function F6(e){e.exit("blockQuote")}var Rh={name:"characterEscape",tokenize:$6};function $6(e,t,r){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),n}function n(a){return Q1(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var Eh={name:"characterReference",tokenize:V6};function V6(e,t,r){let o=this,n=0,a,i;return s;function s(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,i=ar,c(u))}function p(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=Z1,c):(e.enter("characterReferenceValue"),a=7,i=vu,c(u))}function c(u){if(u===59&&n){let f=e.exit("characterReferenceValue");return i===ar&&!ql(o.sliceSerialize(f))?r(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(u)&&n++<a?(e.consume(u),c):r(u)}}var iO={tokenize:H6,partial:!0},Ih={name:"codeFenced",tokenize:j6,concrete:!0};function j6(e,t,r){let o=this,n={tokenize:T,partial:!0},a=0,i=0,s;return l;function l(P){return p(P)}function p(P){let C=o.events[o.events.length-1];return a=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(P)}function c(P){return P===s?(i++,e.consume(P),c):i<3?r(P):(e.exit("codeFencedFenceSequence"),He(P)?We(e,u,"whitespace")(P):u(P))}function u(P){return P===null||we(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(iO,h,S)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(P))}function f(P){return P===null||we(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(P)):He(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),We(e,d,"whitespace")(P)):P===96&&P===s?r(P):(e.consume(P),f)}function d(P){return P===null||we(P)?u(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(P))}function y(P){return P===null||we(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(P)):P===96&&P===s?r(P):(e.consume(P),y)}function h(P){return e.attempt(n,S,g)(P)}function g(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b}function b(P){return a>0&&He(P)?We(e,x,"linePrefix",a+1)(P):x(P)}function x(P){return P===null||we(P)?e.check(iO,h,S)(P):(e.enter("codeFlowValue"),v(P))}function v(P){return P===null||we(P)?(e.exit("codeFlowValue"),x(P)):(e.consume(P),v)}function S(P){return e.exit("codeFenced"),t(P)}function T(P,C,R){let _=0;return O;function O(L){return P.enter("lineEnding"),P.consume(L),P.exit("lineEnding"),N}function N(L){return P.enter("codeFencedFence"),He(L)?We(P,A,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):A(L)}function A(L){return L===s?(P.enter("codeFencedFenceSequence"),I(L)):R(L)}function I(L){return L===s?(_++,P.consume(L),I):_>=i?(P.exit("codeFencedFenceSequence"),He(L)?We(P,F,"whitespace")(L):F(L)):R(L)}function F(L){return L===null||we(L)?(P.exit("codeFencedFence"),C(L)):R(L)}}}function H6(e,t,r){let o=this;return n;function n(i){return i===null?r(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}var xu={name:"codeIndented",tokenize:W6},U6={tokenize:G6,partial:!0};function W6(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),We(e,a,"linePrefix",5)(p)}function a(p){let c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(p):r(p)}function i(p){return p===null?l(p):we(p)?e.attempt(U6,i,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||we(p)?(e.exit("codeFlowValue"),i(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function G6(e,t,r){let o=this;return n;function n(i){return o.parser.lazy[o.now().line]?r(i):we(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):We(e,a,"linePrefix",5)(i)}function a(i){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):we(i)?n(i):r(i)}}var Xb={name:"codeText",tokenize:q6,resolve:Y6,previous:J6};function Y6(e){let t=e.length-4,r=3,o,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o<t;)if(e[o][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(o=r-1,t++;++o<=t;)n===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(n=o):(o===t||e[o][1].type==="lineEnding")&&(e[n][1].type="codeTextData",o!==n+2&&(e[n][1].end=e[o-1][1].end,e.splice(n+2,o-n-2),t-=o-n-2,o=n+2),n=void 0);return e}function J6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function q6(e,t,r){let o=this,n=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),p(f))}function p(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),p):f===96?(i=e.enter("codeTextSequence"),a=0,u(f)):we(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),p):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||we(f)?(e.exit("codeTextData"),p(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),a++,u):a===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}var Oh=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let o=r==null?Number.POSITIVE_INFINITY:r;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){let n=r||0;this.setCursor(Math.trunc(t));let a=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return o&&Tu(this.left,o),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Tu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Tu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);Tu(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Tu(this.left,r.reverse())}}};function Tu(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function _h(e){let t={},r=-1,o,n,a,i,s,l,p,c=new Oh(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(o=c.get(r),r&&o[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=o[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,K6(c,r)),r=t[r],p=!0);else if(o[1]._container){for(a=r,n=void 0;a--&&(i=c.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=a);n&&(o[1].end=Object.assign({},c.get(n)[1].start),s=c.slice(n,r),s.unshift(o),c.splice(n,r-n+1,s))}}return Dr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function K6(e,t){let r=e.get(t)[1],o=e.get(t)[2],n=t-1,a=[],i=r._tokenizer||o.parser[r.contentType](r.start),s=i.events,l=[],p={},c,u,f=-1,d=r,y=0,h=0,g=[h];for(;d;){for(;e.get(++n)[1]!==d;);a.push(n),d._tokenizer||(c=o.sliceStream(d),d.next||c.push(null),u&&i.defineSkip(d.start),d._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),d._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(i.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),f=g.length;f--;){let b=s.slice(g[f],g[f+1]),x=a.pop();l.push([x,x+b.length-1]),e.splice(x,2,b)}for(l.reverse(),f=-1;++f<l.length;)p[y+l[f][0]]=y+l[f][1],y+=l[f][1]-l[f][0]-1;return p}var Zb={tokenize:Q6,resolve:Z6},X6={tokenize:e7,partial:!0};function Z6(e){return _h(e),e}function Q6(e,t){let r;return o;function o(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?a(s):we(s)?e.check(X6,i,a)(s):(e.consume(s),n)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function e7(e,t,r){let o=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),We(e,a,"linePrefix")}function a(i){if(i===null||we(i))return r(i);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(o.parser.constructs.flow,r,t)(i)}}function Dh(e,t,r,o,n,a,i,s,l){let p=l||Number.POSITIVE_INFINITY,c=0;return u;function u(b){return b===60?(e.enter(o),e.enter(n),e.enter(a),e.consume(b),e.exit(a),f):b===null||b===32||b===41||gu(b)?r(b):(e.enter(o),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function f(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(n),e.exit(o),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(e.exit("chunkString"),e.exit(s),f(b)):b===null||b===60||we(b)?r(b):(e.consume(b),b===92?y:d)}function y(b){return b===60||b===62||b===92?(e.consume(b),d):d(b)}function h(b){return!c&&(b===null||b===41||zt(b))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(o),t(b)):c<p&&b===40?(e.consume(b),c++,h):b===41?(e.consume(b),c--,h):b===null||b===32||b===40||gu(b)?r(b):(e.consume(b),b===92?g:h)}function g(b){return b===40||b===41||b===92?(e.consume(b),h):h(b)}}function wh(e,t,r,o,n,a){let i=this,s=0,l;return p;function p(d){return e.enter(o),e.enter(n),e.consume(d),e.exit(n),e.enter(a),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):d===93?(e.exit(a),e.enter(n),e.consume(d),e.exit(n),e.exit(o),t):we(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||we(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!He(d)),d===92?f:u)}function f(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function Ah(e,t,r,o,n,a){let i;return s;function s(f){return f===34||f===39||f===40?(e.enter(o),e.enter(n),e.consume(f),e.exit(n),i=f===40?41:f,l):r(f)}function l(f){return f===i?(e.enter(n),e.consume(f),e.exit(n),e.exit(o),t):(e.enter(a),p(f))}function p(f){return f===i?(e.exit(a),l(i)):f===null?r(f):we(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),We(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||we(f)?(e.exit("chunkString"),p(f)):(e.consume(f),f===92?u:c)}function u(f){return f===i||f===92?(e.consume(f),c):c(f)}}function gs(e,t){let r;return o;function o(n){return we(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):He(n)?We(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var Qb={name:"definition",tokenize:r7},t7={tokenize:o7,partial:!0};function r7(e,t,r){let o=this,n;return a;function a(d){return e.enter("definition"),i(d)}function i(d){return wh.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return n=ma(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):r(d)}function l(d){return zt(d)?gs(e,p)(d):p(d)}function p(d){return Dh(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(t7,u,u)(d)}function u(d){return He(d)?We(e,f,"whitespace")(d):f(d)}function f(d){return d===null||we(d)?(e.exit("definition"),o.parser.defined.push(n),t(d)):r(d)}}function o7(e,t,r){return o;function o(s){return zt(s)?gs(e,n)(s):r(s)}function n(s){return Ah(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return He(s)?We(e,i,"whitespace")(s):i(s)}function i(s){return s===null||we(s)?t(s):r(s)}}var ex={name:"hardBreakEscape",tokenize:n7};function n7(e,t,r){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),n}function n(a){return we(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var tx={name:"headingAtx",tokenize:i7,resolve:a7};function a7(e,t){let r=e.length-2,o=3,n,a;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},a={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},Dr(e,o,r-o+1,[["enter",n,t],["enter",a,t],["exit",a,t],["exit",n,t]])),e}function i7(e,t,r){let o=0;return n;function n(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&o++<6?(e.consume(c),i):c===null||zt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||we(c)?(e.exit("atxHeading"),t(c)):He(c)?We(e,s,"whitespace")(c):(e.enter("atxHeadingText"),p(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function p(c){return c===null||c===35||zt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var sO=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],rx=["pre","script","style","textarea"];var ox={name:"htmlFlow",tokenize:c7,resolveTo:p7,concrete:!0},s7={tokenize:d7,partial:!0},l7={tokenize:u7,partial:!0};function p7(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function c7(e,t,r){let o=this,n,a,i,s,l;return p;function p(D){return c(D)}function c(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),u}function u(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),a=!0,h):D===63?(e.consume(D),n=3,o.interrupt?t:k):uo(D)?(e.consume(D),i=String.fromCharCode(D),g):r(D)}function f(D){return D===45?(e.consume(D),n=2,d):D===91?(e.consume(D),n=5,s=0,y):uo(D)?(e.consume(D),n=4,o.interrupt?t:k):r(D)}function d(D){return D===45?(e.consume(D),o.interrupt?t:k):r(D)}function y(D){let pe="CDATA[";return D===pe.charCodeAt(s++)?(e.consume(D),s===pe.length?o.interrupt?t:A:y):r(D)}function h(D){return uo(D)?(e.consume(D),i=String.fromCharCode(D),g):r(D)}function g(D){if(D===null||D===47||D===62||zt(D)){let pe=D===47,me=i.toLowerCase();return!pe&&!a&&rx.includes(me)?(n=1,o.interrupt?t(D):A(D)):sO.includes(i.toLowerCase())?(n=6,pe?(e.consume(D),b):o.interrupt?t(D):A(D)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(D):a?x(D):v(D))}return D===45||ar(D)?(e.consume(D),i+=String.fromCharCode(D),g):r(D)}function b(D){return D===62?(e.consume(D),o.interrupt?t:A):r(D)}function x(D){return He(D)?(e.consume(D),x):O(D)}function v(D){return D===47?(e.consume(D),O):D===58||D===95||uo(D)?(e.consume(D),S):He(D)?(e.consume(D),v):O(D)}function S(D){return D===45||D===46||D===58||D===95||ar(D)?(e.consume(D),S):T(D)}function T(D){return D===61?(e.consume(D),P):He(D)?(e.consume(D),T):v(D)}function P(D){return D===null||D===60||D===61||D===62||D===96?r(D):D===34||D===39?(e.consume(D),l=D,C):He(D)?(e.consume(D),P):R(D)}function C(D){return D===l?(e.consume(D),l=null,_):D===null||we(D)?r(D):(e.consume(D),C)}function R(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||zt(D)?T(D):(e.consume(D),R)}function _(D){return D===47||D===62||He(D)?v(D):r(D)}function O(D){return D===62?(e.consume(D),N):r(D)}function N(D){return D===null||we(D)?A(D):He(D)?(e.consume(D),N):r(D)}function A(D){return D===45&&n===2?(e.consume(D),w):D===60&&n===1?(e.consume(D),B):D===62&&n===4?(e.consume(D),q):D===63&&n===3?(e.consume(D),k):D===93&&n===5?(e.consume(D),z):we(D)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(s7,re,I)(D)):D===null||we(D)?(e.exit("htmlFlowData"),I(D)):(e.consume(D),A)}function I(D){return e.check(l7,F,re)(D)}function F(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),L}function L(D){return D===null||we(D)?I(D):(e.enter("htmlFlowData"),A(D))}function w(D){return D===45?(e.consume(D),k):A(D)}function B(D){return D===47?(e.consume(D),i="",U):A(D)}function U(D){if(D===62){let pe=i.toLowerCase();return rx.includes(pe)?(e.consume(D),q):A(D)}return uo(D)&&i.length<8?(e.consume(D),i+=String.fromCharCode(D),U):A(D)}function z(D){return D===93?(e.consume(D),k):A(D)}function k(D){return D===62?(e.consume(D),q):D===45&&n===2?(e.consume(D),k):A(D)}function q(D){return D===null||we(D)?(e.exit("htmlFlowData"),re(D)):(e.consume(D),q)}function re(D){return e.exit("htmlFlow"),t(D)}}function u7(e,t,r){let o=this;return n;function n(i){return we(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):r(i)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}function d7(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(mi,t,r)}}var nx={name:"htmlText",tokenize:f7};function f7(e,t,r){let o=this,n,a,i;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),p):k===47?(e.consume(k),T):k===63?(e.consume(k),v):uo(k)?(e.consume(k),R):r(k)}function p(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),a=0,y):uo(k)?(e.consume(k),x):r(k)}function c(k){return k===45?(e.consume(k),d):r(k)}function u(k){return k===null?r(k):k===45?(e.consume(k),f):we(k)?(i=u,B(k)):(e.consume(k),u)}function f(k){return k===45?(e.consume(k),d):u(k)}function d(k){return k===62?w(k):k===45?f(k):u(k)}function y(k){let q="CDATA[";return k===q.charCodeAt(a++)?(e.consume(k),a===q.length?h:y):r(k)}function h(k){return k===null?r(k):k===93?(e.consume(k),g):we(k)?(i=h,B(k)):(e.consume(k),h)}function g(k){return k===93?(e.consume(k),b):h(k)}function b(k){return k===62?w(k):k===93?(e.consume(k),b):h(k)}function x(k){return k===null||k===62?w(k):we(k)?(i=x,B(k)):(e.consume(k),x)}function v(k){return k===null?r(k):k===63?(e.consume(k),S):we(k)?(i=v,B(k)):(e.consume(k),v)}function S(k){return k===62?w(k):v(k)}function T(k){return uo(k)?(e.consume(k),P):r(k)}function P(k){return k===45||ar(k)?(e.consume(k),P):C(k)}function C(k){return we(k)?(i=C,B(k)):He(k)?(e.consume(k),C):w(k)}function R(k){return k===45||ar(k)?(e.consume(k),R):k===47||k===62||zt(k)?_(k):r(k)}function _(k){return k===47?(e.consume(k),w):k===58||k===95||uo(k)?(e.consume(k),O):we(k)?(i=_,B(k)):He(k)?(e.consume(k),_):w(k)}function O(k){return k===45||k===46||k===58||k===95||ar(k)?(e.consume(k),O):N(k)}function N(k){return k===61?(e.consume(k),A):we(k)?(i=N,B(k)):He(k)?(e.consume(k),N):_(k)}function A(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),n=k,I):we(k)?(i=A,B(k)):He(k)?(e.consume(k),A):(e.consume(k),F)}function I(k){return k===n?(e.consume(k),n=void 0,L):k===null?r(k):we(k)?(i=I,B(k)):(e.consume(k),I)}function F(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||zt(k)?_(k):(e.consume(k),F)}function L(k){return k===47||k===62||zt(k)?_(k):r(k)}function w(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):r(k)}function B(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),U}function U(k){return He(k)?We(e,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):z(k)}function z(k){return e.enter("htmlTextData"),i(k)}}var vs={name:"labelEnd",tokenize:b7,resolveTo:v7,resolveAll:g7},m7={tokenize:x7},h7={tokenize:T7},y7={tokenize:P7};function g7(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function v7(e,t){let r=e.length,o=0,n,a,i,s;for(;r--;)if(n=e[r][1],a){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(i){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(a=r,n.type!=="labelLink")){o=2;break}}else n.type==="labelEnd"&&(i=r);let l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[a+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return s=[["enter",l,t],["enter",p,t]],s=Fr(s,e.slice(a+1,a+o+3)),s=Fr(s,[["enter",c,t]]),s=Fr(s,Kl(t.parser.constructs.insideSpan.null,e.slice(a+o+4,i-3),t)),s=Fr(s,[["exit",c,t],e[i-2],e[i-1],["exit",p,t]]),s=Fr(s,e.slice(i+1)),s=Fr(s,[["exit",l,t]]),Dr(e,a,e.length,s),e}function b7(e,t,r){let o=this,n=o.events.length,a,i;for(;n--;)if((o.events[n][1].type==="labelImage"||o.events[n][1].type==="labelLink")&&!o.events[n][1]._balanced){a=o.events[n][1];break}return s;function s(f){return a?a._inactive?u(f):(i=o.parser.defined.includes(ma(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(m7,c,i?c:u)(f):f===91?e.attempt(h7,c,i?p:u)(f):i?c(f):u(f)}function p(f){return e.attempt(y7,c,u)(f)}function c(f){return t(f)}function u(f){return a._balanced=!0,r(f)}}function x7(e,t,r){return o;function o(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),n}function n(u){return zt(u)?gs(e,a)(u):a(u)}function a(u){return u===41?c(u):Dh(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function i(u){return zt(u)?gs(e,l)(u):c(u)}function s(u){return r(u)}function l(u){return u===34||u===39||u===40?Ah(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function p(u){return zt(u)?gs(e,c)(u):c(u)}function c(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):r(u)}}function T7(e,t,r){let o=this;return n;function n(s){return wh.call(o,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return o.parser.defined.includes(ma(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function P7(e,t,r){return o;function o(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),n}function n(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var ax={name:"labelStartImage",tokenize:C7,resolveAll:vs.resolveAll};function C7(e,t,r){let o=this;return n;function n(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):r(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(s):t(s)}}var ix={name:"labelStartLink",tokenize:S7,resolveAll:vs.resolveAll};function S7(e,t,r){let o=this;return n;function n(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(i):t(i)}}var Pu={name:"lineEnding",tokenize:k7};function k7(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),We(e,t,"linePrefix")}}var bs={name:"thematicBreak",tokenize:R7};function R7(e,t,r){let o=0,n;return a;function a(p){return e.enter("thematicBreak"),i(p)}function i(p){return n=p,s(p)}function s(p){return p===n?(e.enter("thematicBreakSequence"),l(p)):o>=3&&(p===null||we(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),He(p)?We(e,s,"whitespace")(p):s(p))}}var wr={name:"list",tokenize:O7,continuation:{tokenize:_7},exit:w7},E7={tokenize:A7,partial:!0},I7={tokenize:D7,partial:!0};function O7(e,t,r){let o=this,n=o.events[o.events.length-1],a=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,i=0;return s;function s(d){let y=o.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!o.containerState.marker||d===o.containerState.marker:vu(d)){if(o.containerState.type||(o.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(bs,r,p)(d):p(d);if(!o.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return r(d)}function l(d){return vu(d)&&++i<10?(e.consume(d),l):(!o.interrupt||i<2)&&(o.containerState.marker?d===o.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),p(d)):r(d)}function p(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||d,e.check(mi,o.interrupt?r:c,e.attempt(E7,f,u))}function c(d){return o.containerState.initialBlankLine=!0,a++,f(d)}function u(d){return He(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):r(d)}function f(d){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function _7(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(mi,n,a);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,We(e,t,"listItemIndent",o.containerState.size+1)(s)}function a(s){return o.containerState.furtherBlankLines||!He(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(I7,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,We(e,e.attempt(wr,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function D7(e,t,r){let o=this;return We(e,n,"listItemIndent",o.containerState.size+1);function n(a){let i=o.events[o.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===o.containerState.size?t(a):r(a)}}function w7(e){e.exit(this.containerState.type)}function A7(e,t,r){let o=this;return We(e,n,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(a){let i=o.events[o.events.length-1];return!He(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var Mh={name:"setextUnderline",tokenize:N7,resolveTo:M7};function M7(e,t){let r=e.length,o,n,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);let i={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",i,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[a][1].end)):e[o][1]=i,e.push(["exit",i,t]),e}function N7(e,t,r){let o=this,n;return a;function a(p){let c=o.events.length,u;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){u=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(e.enter("setextHeadingLine"),n=p,i(p)):r(p)}function i(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===n?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),He(p)?We(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||we(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var lO={tokenize:L7};function L7(e){let t=this,r=e.attempt(mi,o,e.attempt(this.parser.constructs.flowInitial,n,We(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Zb,n)),"linePrefix")));return r;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var pO={resolveAll:fO()},cO=dO("string"),uO=dO("text");function dO(e){return{tokenize:t,resolveAll:fO(e==="text"?B7:void 0)};function t(r){let o=this,n=this.parser.constructs[e],a=r.attempt(n,i,s);return i;function i(c){return p(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return p(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function p(c){if(c===null)return!0;let u=n[c],f=-1;if(u)for(;++f<u.length;){let d=u[f];if(!d.previous||d.previous.call(o,o.previous))return!0}return!1}}}function fO(e){return t;function t(r,o){let n=-1,a;for(;++n<=r.length;)a===void 0?r[n]&&r[n][1].type==="data"&&(a=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==a+2&&(r[a][1].end=r[n-1][1].end,r.splice(a+2,n-a-2),n=a+2),a=void 0);return e?e(r,o):r}}function B7(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let o=e[r-1][1],n=t.sliceStream(o),a=n.length,i=-1,s=0,l;for(;a--;){let p=n[a];if(typeof p=="string"){for(i=p.length;p.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(p===-2)l=!0,s++;else if(p!==-1){a++;break}}if(s){let p={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-s,offset:o.end.offset-s,_index:o.start._index+a,_bufferIndex:a?i:o.start._bufferIndex+i},end:Object.assign({},o.end)};o.end=Object.assign({},p.start),o.start.offset===o.end.offset?Object.assign(o,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}function mO(e,t,r){let o=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},a=[],i=[],s=[],l=!0,p={consume:S,enter:T,exit:P,attempt:_(C),check:_(R),interrupt:_(R,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:y,now:g,defineSkip:b,write:d},u=t.tokenize.call(c,p),f;return t.resolveAll&&a.push(t),c;function d(I){return i=Fr(i,I),x(),i[i.length-1]!==null?[]:(O(t,0),c.events=Kl(a,c.events,c),c.events)}function y(I,F){return F7(h(I),F)}function h(I){return z7(i,I)}function g(){let{line:I,column:F,offset:L,_index:w,_bufferIndex:B}=o;return{line:I,column:F,offset:L,_index:w,_bufferIndex:B}}function b(I){n[I.line]=I.column,A()}function x(){let I;for(;o._index<i.length;){let F=i[o._index];if(typeof F=="string")for(I=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===I&&o._bufferIndex<F.length;)v(F.charCodeAt(o._bufferIndex));else v(F)}}function v(I){l=void 0,f=I,u=u(I)}function S(I){we(I)?(o.line++,o.column=1,o.offset+=I===-3?2:1,A()):I!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),c.previous=I,l=!0}function T(I,F){let L=F||{};return L.type=I,L.start=g(),c.events.push(["enter",L,c]),s.push(L),L}function P(I){let F=s.pop();return F.end=g(),c.events.push(["exit",F,c]),F}function C(I,F){O(I,F.from)}function R(I,F){F.restore()}function _(I,F){return L;function L(w,B,U){let z,k,q,re;return Array.isArray(w)?pe(w):"tokenize"in w?pe([w]):D(w);function D(W){return de;function de(fe){let Ce=fe!==null&&W[fe],be=fe!==null&&W.null,Le=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(be)?be:be?[be]:[]];return pe(Le)(fe)}}function pe(W){return z=W,k=0,W.length===0?U:me(W[k])}function me(W){return de;function de(fe){return re=N(),q=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ae(fe):W.tokenize.call(F?Object.assign(Object.create(c),F):c,p,De,ae)(fe)}}function De(W){return l=!0,I(q,re),B}function ae(W){return l=!0,re.restore(),++k<z.length?me(z[k]):U}}}function O(I,F){I.resolveAll&&!a.includes(I)&&a.push(I),I.resolve&&Dr(c.events,F,c.events.length-F,I.resolve(c.events.slice(F),c)),I.resolveTo&&(c.events=I.resolveTo(c.events,c))}function N(){let I=g(),F=c.previous,L=c.currentConstruct,w=c.events.length,B=Array.from(s);return{restore:U,from:w};function U(){o=I,c.previous=F,c.currentConstruct=L,c.events.length=w,s=B,A()}}function A(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function z7(e,t){let r=t.start._index,o=t.start._bufferIndex,n=t.end._index,a=t.end._bufferIndex,i;if(r===n)i=[e[r].slice(o,a)];else{if(i=e.slice(r,n),o>-1){let s=i[0];typeof s=="string"?i[0]=s.slice(o):i.shift()}a>0&&i.push(e[n].slice(0,a))}return i}function F7(e,t){let r=-1,o=[],n;for(;++r<e.length;){let a=e[r],i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
128
128
  `;break}case-3:{i=`\r
129
129
  `;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&n)continue;i=" ";break}default:i=String.fromCharCode(a)}n=a===-2,o.push(i)}return o.join("")}var sx={};RT(sx,{attentionMarkers:()=>Y7,contentInitial:()=>V7,disable:()=>J7,document:()=>$7,flow:()=>H7,flowInitial:()=>j7,insideSpan:()=>G7,string:()=>U7,text:()=>W7});var $7={42:wr,43:wr,45:wr,48:wr,49:wr,50:wr,51:wr,52:wr,53:wr,54:wr,55:wr,56:wr,57:wr,62:kh},V7={91:Qb},j7={[-2]:xu,[-1]:xu,32:xu},H7={35:tx,42:bs,45:[Mh,bs],60:ox,61:Mh,95:bs,96:Ih,126:Ih},U7={38:Eh,92:Rh},W7={[-5]:Pu,[-4]:Pu,[-3]:Pu,33:ax,38:Eh,42:bu,60:[Kb,nx],91:ix,92:[ex,Rh],93:vs,95:bu,96:Xb},G7={null:[bu,pO]},Y7={null:[42,95]},J7={null:[]};function lx(e){let r=K1([sx,...(e||{}).extensions||[]]),o={defined:[],lazy:{},constructs:r,content:n(rO),document:n(nO),flow:n(lO),string:n(cO),text:n(uO)};return o;function n(a){return i;function i(s){return mO(o,a,s)}}}function px(e){for(;!_h(e););return e}var hO=/[\0\t\n\r]/g;function cx(){let e=1,t="",r=!0,o;return n;function n(a,i,s){let l=[],p,c,u,f,d;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(i||void 0).decode(a)),u=0,t="",r&&(a.charCodeAt(0)===65279&&u++,r=void 0);u<a.length;){if(hO.lastIndex=u,p=hO.exec(a),f=p&&p.index!==void 0?p.index:a.length,d=a.charCodeAt(f),!p){t=a.slice(u);break}if(d===10&&u===f&&o)l.push(-3),o=void 0;else switch(o&&(l.push(-5),o=void 0),u<f&&(l.push(a.slice(u,f)),e+=f-u),d){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:o=!0,e=1}u=f+1}return s&&(o&&l.push(-5),t&&l.push(t),l.push(null)),l}}var q7=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yO(e){return e.replace(q7,K7)}function K7(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let n=r.charCodeAt(1),a=n===120||n===88;return Sh(r.slice(a?2:1),a?16:10)}return ql(r)||e}var vO={}.hasOwnProperty;function ux(e,t,r){return typeof t!="string"&&(r=t,t=void 0),X7(r)(px(lx(r).document().write(cx()(e,t,!0))))}function X7(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ge),autolinkProtocol:_,autolinkEmail:_,atxHeading:a(Ve),blockQuote:a(de),characterEscape:_,characterReference:_,codeFenced:a(fe),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(fe,i),codeText:a(Ce,i),codeTextData:_,data:_,codeFlowValue:_,definition:a(be),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(Le),hardBreakEscape:a(te),hardBreakTrailing:a(te),htmlFlow:a(X,i),htmlFlowData:_,htmlText:a(X,i),htmlTextData:_,image:a(ye),label:i,link:a(ge),listItem:a(Re),listItemValue:f,listOrdered:a($e,u),listUnordered:a($e),paragraph:a(Ae),reference:D,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(Ve),strong:a(Be),thematicBreak:a(it)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:W,autolinkProtocol:ae,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:De,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:y,codeFlowValue:O,codeIndented:l(b),codeText:l(L),codeTextData:O,data:O,definition:l(),definitionDestinationString:S,definitionLabelString:x,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(I),htmlFlowData:O,htmlText:l(F),htmlTextData:O,image:l(B),label:z,labelText:U,lineEnding:N,link:l(w),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:pe,resourceDestinationString:k,resourceTitleString:q,resource:re,setextHeading:l(R),setextHeadingLineSequence:C,setextHeadingText:P,strong:l(),thematicBreak:l()}};bO(t,(e||{}).mdastExtensions||[]);let r={};return o;function o(Z){let ue={type:"root",children:[]},Se={stack:[ue],tokenStack:[],config:t,enter:s,exit:p,buffer:i,resume:c,data:r},G=[],J=-1;for(;++J<Z.length;)if(Z[J][1].type==="listOrdered"||Z[J][1].type==="listUnordered")if(Z[J][0]==="enter")G.push(J);else{let le=G.pop();J=n(Z,le,J)}for(J=-1;++J<Z.length;){let le=t[Z[J][0]];vO.call(le,Z[J][1].type)&&le[Z[J][1].type].call(Object.assign({sliceSerialize:Z[J][2].sliceSerialize},Se),Z[J][1])}if(Se.tokenStack.length>0){let le=Se.tokenStack[Se.tokenStack.length-1];(le[1]||gO).call(Se,void 0,le[0])}for(ue.position={start:hi(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:hi(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)ue=t.transforms[J](ue)||ue;return ue}function n(Z,ue,Se){let G=ue-1,J=-1,le=!1,Oe,se,ie,ke;for(;++G<=Se;){let Me=Z[G];switch(Me[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Me[0]==="enter"?J++:J--,ke=void 0;break}case"lineEndingBlank":{Me[0]==="enter"&&(Oe&&!ke&&!J&&!ie&&(ie=G),ke=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ke=void 0}if(!J&&Me[0]==="enter"&&Me[1].type==="listItemPrefix"||J===-1&&Me[0]==="exit"&&(Me[1].type==="listUnordered"||Me[1].type==="listOrdered")){if(Oe){let nt=G;for(se=void 0;nt--;){let Je=Z[nt];if(Je[1].type==="lineEnding"||Je[1].type==="lineEndingBlank"){if(Je[0]==="exit")continue;se&&(Z[se][1].type="lineEndingBlank",le=!0),Je[1].type="lineEnding",se=nt}else if(!(Je[1].type==="linePrefix"||Je[1].type==="blockQuotePrefix"||Je[1].type==="blockQuotePrefixWhitespace"||Je[1].type==="blockQuoteMarker"||Je[1].type==="listItemIndent"))break}ie&&(!se||ie<se)&&(Oe._spread=!0),Oe.end=Object.assign({},se?Z[se][1].start:Me[1].end),Z.splice(se||G,0,["exit",Oe,Me[2]]),G++,Se++}if(Me[1].type==="listItemPrefix"){let nt={type:"listItem",_spread:!1,start:Object.assign({},Me[1].start),end:void 0};Oe=nt,Z.splice(G,0,["enter",nt,Me[2]]),G++,Se++,ie=void 0,ke=!0}}}return Z[ue][1]._spread=le,Se}function a(Z,ue){return Se;function Se(G){s.call(this,Z(G),G),ue&&ue.call(this,G)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(Z,ue,Se){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ue,Se]),Z.position={start:hi(ue.start),end:void 0}}function l(Z){return ue;function ue(Se){Z&&Z.call(this,Se),p.call(this,Se)}}function p(Z,ue){let Se=this.stack.pop(),G=this.tokenStack.pop();if(G)G[0].type!==Z.type&&(ue?ue.call(this,Z,G[0]):(G[1]||gO).call(this,Z,G[0]));else throw new Error("Cannot close `"+Z.type+"` ("+di({start:Z.start,end:Z.end})+"): it\u2019s not open");Se.position.end=hi(Z.end)}function c(){return Jb(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function f(Z){if(this.data.expectingFirstListItemValue){let ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function d(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=Z}function y(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=Z}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Z.replace(/(\r?\n|\r)$/g,"")}function x(Z){let ue=this.resume(),Se=this.stack[this.stack.length-1];Se.label=ue,Se.identifier=ma(this.sliceSerialize(Z)).toLowerCase()}function v(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.title=Z}function S(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.url=Z}function T(Z){let ue=this.stack[this.stack.length-1];if(!ue.depth){let Se=this.sliceSerialize(Z).length;ue.depth=Se}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function C(Z){let ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function _(Z){let Se=this.stack[this.stack.length-1].children,G=Se[Se.length-1];(!G||G.type!=="text")&&(G=Ye(),G.position={start:hi(Z.start),end:void 0},Se.push(G)),this.stack.push(G)}function O(Z){let ue=this.stack.pop();ue.value+=this.sliceSerialize(Z),ue.position.end=hi(Z.end)}function N(Z){let ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Se=ue.children[ue.children.length-1];Se.position.end=hi(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(_.call(this,Z),O.call(this,Z))}function A(){this.data.atHardBreak=!0}function I(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Z}function F(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Z}function L(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Z}function w(){let Z=this.stack[this.stack.length-1];if(this.data.inReference){let ue=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ue,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function B(){let Z=this.stack[this.stack.length-1];if(this.data.inReference){let ue=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ue,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function U(Z){let ue=this.sliceSerialize(Z),Se=this.stack[this.stack.length-2];Se.label=yO(ue),Se.identifier=ma(ue).toLowerCase()}function z(){let Z=this.stack[this.stack.length-1],ue=this.resume(),Se=this.stack[this.stack.length-1];if(this.data.inReference=!0,Se.type==="link"){let G=Z.children;Se.children=G}else Se.alt=ue}function k(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.url=Z}function q(){let Z=this.resume(),ue=this.stack[this.stack.length-1];ue.title=Z}function re(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function pe(Z){let ue=this.resume(),Se=this.stack[this.stack.length-1];Se.label=ue,Se.identifier=ma(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function me(Z){this.data.characterReferenceType=Z.type}function De(Z){let ue=this.sliceSerialize(Z),Se=this.data.characterReferenceType,G;Se?(G=Sh(ue,Se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=ql(ue);let J=this.stack.pop();J.value+=G,J.position.end=hi(Z.end)}function ae(Z){O.call(this,Z);let ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(Z)}function W(Z){O.call(this,Z);let ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(Z)}function de(){return{type:"blockquote",children:[]}}function fe(){return{type:"code",lang:null,meta:null,value:""}}function Ce(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Le(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function te(){return{type:"break"}}function X(){return{type:"html",value:""}}function ye(){return{type:"image",title:null,url:"",alt:null}}function ge(){return{type:"link",title:null,url:"",children:[]}}function $e(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Re(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function Ye(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function hi(e){return{line:e.line,column:e.column,offset:e.offset}}function bO(e,t){let r=-1;for(;++r<t.length;){let o=t[r];Array.isArray(o)?bO(e,o):Z7(e,o)}}function Z7(e,t){let r;for(r in t)if(vO.call(t,r))switch(r){case"canContainEols":{let o=t[r];o&&e[r].push(...o);break}case"transforms":{let o=t[r];o&&e[r].push(...o);break}case"enter":case"exit":{let o=t[r];o&&Object.assign(e[r],o);break}}}function gO(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+di({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+di({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+di({start:t.start,end:t.end})+") is still open")}function Nh(e){let t=this;t.parser=r;function r(o){return ux(o,oe(V(V({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function xO(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function TO(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
130
130
  `}]}function PO(e,t){let r=t.value?t.value+`
@@ -136,7 +136,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
136
136
  `});++o<e.length;)o&&r.push({type:"text",value:`
137
137
  `}),r.push(e[o]);return t&&e.length>0&&r.push({type:"text",value:`
138
138
  `}),r}function KO(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Gh(e,t){let r=XO(e,t),o=r.one(e,void 0),n=JO(r),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return n&&("children"in a,a.children.push({type:"text",value:`
139
- `},n)),a}function Yh(e,t){return e&&"run"in e?async function(r,o){let n=Gh(r,V({file:o},t));await e.run(n,o)}:function(r,o){return Gh(r,V({file:o},t||e))}}function Tx(e){if(e)throw e}var Kh=An(i_(),1);function Eu(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Px(){let e=[],t={run:r,use:o};return t;function r(...n){let a=-1,i=n.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);s(null,...n);function s(l,...p){let c=e[++a],u=-1;if(l){i(l);return}for(;++u<n.length;)(p[u]===null||p[u]===void 0)&&(p[u]=n[u]);n=p,c?s_(c,s)(...p):i(null,...p)}}function o(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function s_(e,t){let r;return o;function o(...i){let s=e.length>i.length,l;s&&i.push(n);try{l=e.apply(this,i)}catch(p){let c=p;if(s&&r)throw c;return n(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,n):l instanceof Error?n(l):a(l))}function n(i,...s){r||(r=!0,t(i,...s))}function a(i){n(null,i)}}var dn={basename:gG,dirname:vG,extname:bG,join:xG,sep:"/"};function gG(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Iu(e);let r=0,o=-1,n=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;n--;)if(e.codePointAt(n)===47){if(a){r=n+1;break}}else o<0&&(a=!0,o=n+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,s=t.length-1;for(;n--;)if(e.codePointAt(n)===47){if(a){r=n+1;break}}else i<0&&(a=!0,i=n+1),s>-1&&(e.codePointAt(n)===t.codePointAt(s--)?s<0&&(o=n):(s=-1,o=i));return r===o?o=i:o<0&&(o=e.length),e.slice(r,o)}function vG(e){if(Iu(e),e.length===0)return".";let t=-1,r=e.length,o;for(;--r;)if(e.codePointAt(r)===47){if(o){t=r;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function bG(e){Iu(e);let t=e.length,r=-1,o=0,n=-1,a=0,i;for(;t--;){let s=e.codePointAt(t);if(s===47){if(i){o=t+1;break}continue}r<0&&(i=!0,r=t+1),s===46?n<0?n=t:a!==1&&(a=1):n>-1&&(a=-1)}return n<0||r<0||a===0||a===1&&n===r-1&&n===o+1?"":e.slice(n,r)}function xG(...e){let t=-1,r;for(;++t<e.length;)Iu(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":TG(r)}function TG(e){Iu(e);let t=e.codePointAt(0)===47,r=PG(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function PG(e,t){let r="",o=0,n=-1,a=0,i=-1,s,l;for(;++i<=e.length;){if(i<e.length)s=e.codePointAt(i);else{if(s===47)break;s=47}if(s===47){if(!(n===i-1||a===1))if(n!==i-1&&a===2){if(r.length<2||o!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",o=0):(r=r.slice(0,l),o=r.length-1-r.lastIndexOf("/")),n=i,a=0;continue}}else if(r.length>0){r="",o=0,n=i,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(n+1,i):r=e.slice(n+1,i),o=i-n-1;n=i,a=0}else s===46&&a>-1?a++:a=-1}return r}function Iu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var l_={cwd:CG};function CG(){return"/"}function Ql(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function p_(e){if(typeof e=="string")e=new URL(e);else if(!Ql(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return SG(e)}function SG(e){if(e.hostname!==""){let o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}let t=e.pathname,r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){let o=t.codePointAt(r+2);if(o===70||o===102){let n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(t)}var Cx=["history","path","basename","stem","extname","dirname"],Ts=class{constructor(t){let r;t?Ql(t)?r={path:t}:typeof t=="string"||kG(t)?r={value:t}:r=t:r={},this.cwd=l_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Cx.length;){let a=Cx[o];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let n;for(n in r)Cx.includes(n)||(this[n]=r[n])}get basename(){return typeof this.path=="string"?dn.basename(this.path):void 0}set basename(t){kx(t,"basename"),Sx(t,"basename"),this.path=dn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dn.dirname(this.path):void 0}set dirname(t){c_(this.basename,"dirname"),this.path=dn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dn.extname(this.path):void 0}set extname(t){if(Sx(t,"extname"),c_(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=dn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ql(t)&&(t=p_(t)),kx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dn.basename(this.path,this.extname):void 0}set stem(t){kx(t,"stem"),Sx(t,"stem"),this.path=dn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,o){let n=this.message(t,r,o);throw n.fatal=!0,n}info(t,r,o){let n=this.message(t,r,o);return n.fatal=void 0,n}message(t,r,o){let n=new Bt(t,r,o);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}};function Sx(e,t){if(e&&e.includes(dn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dn.sep+"`")}function kx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function c_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function kG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var u_=function(e){let o=this.constructor.prototype,n=o[e],a=function(){return n.apply(a,arguments)};Object.setPrototypeOf(a,o);let i=Object.getOwnPropertyNames(n);for(let s of i){let l=Object.getOwnPropertyDescriptor(n,s);l&&Object.defineProperty(a,s,l)}return a};var RG={}.hasOwnProperty,Ox=class e extends u_{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Px()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let o=this.attachers[r];t.use(...o)}return t.data((0,Kh.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Ix("data",this.frozen),this.namespace[t]=r,this):RG.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ix("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);let n=r.call(t,...o);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let r=qh(t),o=this.parser||this.Parser;return Rx("parse",o),o(String(r),r)}process(t,r){let o=this;return this.freeze(),Rx("process",this.parser||this.Parser),Ex("process",this.compiler||this.Compiler),r?n(void 0,r):new Promise(n);function n(a,i){let s=qh(t),l=o.parse(s);o.run(l,s,function(c,u,f){if(c||!u||!f)return p(c);let d=u,y=o.stringify(d,f);IG(y)?f.value=y:f.result=y,p(c,f)});function p(c,u){c||!u?i(c):a?a(u):r(void 0,u)}}}processSync(t){let r=!1,o;return this.freeze(),Rx("processSync",this.parser||this.Parser),Ex("processSync",this.compiler||this.Compiler),this.process(t,n),f_("processSync","process",r),o;function n(a,i){r=!0,Tx(a),o=i}}run(t,r,o){d_(t),this.freeze();let n=this.transformers;return!o&&typeof r=="function"&&(o=r,r=void 0),o?a(void 0,o):new Promise(a);function a(i,s){let l=qh(r);n.run(t,l,p);function p(c,u,f){let d=u||t;c?s(c):i?i(d):o(void 0,d,f)}}}runSync(t,r){let o=!1,n;return this.run(t,r,a),f_("runSync","run",o),n;function a(i,s){Tx(i),n=s,o=!0}}stringify(t,r){this.freeze();let o=qh(r),n=this.compiler||this.Compiler;return Ex("stringify",n),d_(t),n(t,o)}use(t,...r){let o=this.attachers,n=this.namespace;if(Ix("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(p){if(typeof p=="function")l(p,[]);else if(typeof p=="object")if(Array.isArray(p)){let[c,...u]=p;l(c,u)}else i(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function i(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(p.plugins),p.settings&&(n.settings=(0,Kh.default)(!0,n.settings,p.settings))}function s(p){let c=-1;if(p!=null)if(Array.isArray(p))for(;++c<p.length;){let u=p[c];a(u)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function l(p,c){let u=-1,f=-1;for(;++u<o.length;)if(o[u][0]===p){f=u;break}if(f===-1)o.push([p,...c]);else if(c.length>0){let[d,...y]=c,h=o[f][1];Eu(h)&&Eu(d)&&(d=(0,Kh.default)(!0,h,d)),o[f]=[p,d,...y]}}}},_x=new Ox().freeze();function Rx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ex(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ix(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function d_(e){if(!Eu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function f_(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qh(e){return EG(e)?e:new Ts(e)}function EG(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function IG(e){return typeof e=="string"||OG(e)}function OG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var AG="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",m_=[],h_={allowDangerousHtml:!0},MG=/^(https?|ircs?|mailto|xmpp)$/i,NG=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Dx(e){let t=e.allowedElements,r=e.allowElement,o=e.children||"",n=e.className,a=e.components,i=e.disallowedElements,s=e.rehypePlugins||m_,l=e.remarkPlugins||m_,p=e.remarkRehypeOptions?V(V({},e.remarkRehypeOptions),h_):h_,c=e.skipHtml,u=e.unwrapDisallowed,f=e.urlTransform||y_,d=_x().use(Nh).use(l).use(Yh,p).use(s),y=new Ts;typeof o=="string"?y.value=o:(""+o,void 0),t&&i&&void 0;for(let x of NG)Object.hasOwn(e,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+AG+x.id,void 0);let h=d.parse(y),g=d.runSync(h,y);return n&&(g={type:"element",tagName:"div",properties:{className:n},children:g.type==="root"?g.children:[g]}),xs(g,b),Wb(g,{Fragment:_G,components:a,ignoreInvalidStyle:!0,jsx:DG,jsxs:wG,passKeys:!0,passNode:!0});function b(x,v,S){if(x.type==="raw"&&S&&typeof v=="number")return c?S.children.splice(v,1):S.children[v]={type:"text",value:x.value},v;if(x.type==="element"){let T;for(T in yu)if(Object.hasOwn(yu,T)&&Object.hasOwn(x.properties,T)){let P=x.properties[T],C=yu[T];(C===null||C.includes(x.tagName))&&(x.properties[T]=f(String(P||""),T,x))}}if(x.type==="element"){let T=t?!t.includes(x.tagName):i?i.includes(x.tagName):!1;if(!T&&r&&typeof v=="number"&&(T=!r(x,v,S)),T&&S&&typeof v=="number")return u&&x.children?S.children.splice(v,1,...x.children):S.children.splice(v,1),v}}}function y_(e){let t=e.indexOf(":"),r=e.indexOf("?"),o=e.indexOf("#"),n=e.indexOf("/");return t<0||n>-1&&t>n||r>-1&&t>r||o>-1&&t>o||MG.test(e.slice(0,t))?e:""}function g_(e){let{accentColor:t}=e;return r=>{xs(r,"text",(o,n,a)=>{let i=o.value,s=/\|\|.*?\|\|/g,l,p=0,c=[];for(;(l=s.exec(i))!==null;){l.index>p&&c.push({type:"text",value:i.slice(p,l.index)});let u=l[0].split("||")[1];c.push({type:"element",tagName:"p",properties:{textColor:t},children:[{type:"text",value:u}]}),p=l.index+l[0].length}p<i.length&&c.push({type:"text",value:i.slice(p)}),c.length&&a.children.splice(n,1,...c)})}}var wx=e=>{let p=e,{color:t,textColor:r,defaultLevel:o="body-md",accentColor:n="danger.500",defaultLinkAction:a="_self",markdownOptions:i,content:s}=p,l=ve(p,["color","textColor","defaultLevel","accentColor","defaultLinkAction","markdownOptions","content"]);return M(zo,oe(V({component:"div",color:t,textColor:r,level:o},l),{children:M(Dx,oe(V({},i),{children:s,rehypePlugins:[[g_,{accentColor:n}]],components:V({h1:({children:c})=>M(zo,{color:t,textColor:r,level:"h1",children:c}),h2:({children:c})=>M(zo,{color:t,textColor:r,level:"h2",children:c}),h3:({children:c})=>M(zo,{color:t,textColor:r,level:"h3",children:c}),h4:({children:c})=>M(zo,{color:t,textColor:r,level:"h4",children:c}),p:({children:c,node:u})=>M(zo,oe(V({color:t,textColor:r,level:o},u==null?void 0:u.properties),{children:c})),a:({children:c,href:u})=>M(oa,{href:u,target:a,children:c}),hr:()=>M(uu,{})},i==null?void 0:i.components)}))}))};wx.displayName="Markdown";import LG,{forwardRef as BG,useCallback as Ax,useEffect as zG,useImperativeHandle as FG,useRef as $G,useState as VG}from"react";var jG=E(Ut,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),HG=E(Fo,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),UG=E("div",{name:"MonthPicker",slot:"root"})({width:"100%"}),v_=(e,t)=>{let r=`${e.getMonth()+1}`,o=e.getFullYear();return Number(r)<10&&(r="0"+r),t.replace(/YYYY/g,o.toString()).replace(/MM/g,r)},WG=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,t=>`${t}\``);function GG(e){let t,r,o=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(t=o.slice(0,2),r=o.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(r=o.slice(0,4),t=o.slice(4)),new Date(`${r}/${t}`)}var YG=LG.forwardRef(function(t,r){let i=t,{onChange:o,format:n}=i,a=ve(i,["onChange","format"]);return M(ua,oe(V({},a),{inputRef:r,onAccept:s=>o({target:{name:t.name,value:s}}),mask:Date,pattern:WG(n),blocks:{M:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:s=>v_(s,n),parse:GG,autofix:"pad",overwrite:!0}))}),b_=BG((e,t)=>{let r=Y({props:e,name:"MonthPicker"}),O=r,{onChange:o,disabled:n,label:a,error:i,helperText:s,minDate:l,maxDate:p,disableFuture:c,disablePast:u,required:f,sx:d,className:y,format:h="YYYY/MM",size:g}=O,b=ve(O,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className","format","size"]),x=$G(null),[v,S]=Rr(r.value,r.defaultValue||"",Ax(N=>o==null?void 0:o({target:{name:r.name,value:N}}),[r.name,o]),{disableStrict:!0}),[T,P]=VG(null),C=!!T;zG(()=>{var N;T||(N=x.current)==null||N.blur()},[T,x]),FG(t,()=>x.current,[x]);let R=Ax(N=>{S(N.target.value)},[S]),_=Ax(N=>{var A;P(T?null:N.currentTarget),(A=x.current)==null||A.focus()},[T,P,x]);return M(UG,{children:M(Wr,{open:!0,children:Pe(Bo,{children:[M(po,oe(V({},b),{color:i?"danger":b.color,ref:x,size:g,value:v,onChange:R,placeholder:h,disabled:n,required:f,slotProps:{input:{component:YG,ref:x,format:h}},error:i,className:y,sx:oe(V({},d),{fontFamily:"monospace"}),endDecorator:M(Wt,{variant:"plain",onClick:_,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:M(ci,{})}),label:a,helperText:s})),C&&M($n,{onClickAway:()=>P(null),children:M(jG,{id:"month-picker-popper",open:!0,anchorEl:T,placement:"bottom-end",onMouseDown:N=>N.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(HG,{tabIndex:-1,role:"presentation",children:[M(ni,{view:"month",views:["month"],value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([N])=>{R({target:{name:r.name,value:v_(N,h)}}),P(null)},minDate:l?new Date(l):void 0,maxDate:p?new Date(p):void 0,disableFuture:c,disablePast:u}),M(En,{sx:{p:1},children:M(It,{size:g,variant:"plain",color:"neutral",onClick:()=>{R({target:{name:r.name,value:""}}),P(null)},children:"Clear"})})]})})})]})})})});import JG,{forwardRef as qG,useCallback as Xh,useEffect as KG,useImperativeHandle as XG,useMemo as ZG,useRef as QG,useState as e8}from"react";var t8=E(Ut,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),r8=E(Fo,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),o8=E("div",{name:"MonthRangePicker",slot:"root"})({width:"100%"}),T_=([e,t],r)=>{let o=n=>{let a=`${n.getMonth()+1}`,i=n.getFullYear();return Number(a)<10&&(a="0"+a),r.replace(/YYYY/g,i.toString()).replace(/MM/g,a)};return[o(e),t?o(t):""].join(" - ")};function x_(e){let t,r,o=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(t=o.slice(0,2),r=o.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(r=o.slice(0,4),t=o.slice(4)),new Date(`${r}/${t}`)}var P_=e=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[x_(t),x_(r)]},n8=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,t=>`${t}\``),a8=JG.forwardRef(function(t,r){let i=t,{onChange:o,format:n}=i,a=ve(i,["onChange","format"]);return M(ua,oe(V({},a),{inputRef:r,onAccept:s=>o({target:{name:t.name,value:s}}),mask:Date,pattern:n8(n),blocks:{m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:s=>T_(s,n),parse:P_,autofix:"pad",overwrite:!0}))}),Mx=qG((e,t)=>{let r=Y({props:e,name:"MonthRangePicker"}),A=r,{onChange:o,disabled:n,label:a,error:i,helperText:s,minDate:l,maxDate:p,disableFuture:c,disablePast:u,required:f,sx:d,className:y,format:h="YYYY/MM",size:g}=A,b=ve(A,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className","format","size"]),x=QG(null),[v,S]=Rr(r.value,r.defaultValue||"",Xh(I=>o==null?void 0:o({target:{name:r.name,value:I}}),[r.name,o]),{disableStrict:!0}),[T,P]=e8(null),C=!!T,R=ZG(()=>v?P_(v):void 0,[v]);KG(()=>{var I;T||(I=x.current)==null||I.blur()},[T,x]),XG(t,()=>x.current,[x]);let _=Xh(I=>{S(I.target.value)},[S]),O=Xh(I=>{var F;P(T?null:I.currentTarget),(F=x.current)==null||F.focus()},[T,P,x]),N=Xh(([I,F])=>{!I||!F||(S(T_([I,F],h)),P(null))},[S,P,h]);return M(o8,{children:M(Wr,{open:!0,children:Pe(Bo,{children:[M(po,oe(V({},b),{color:i?"danger":b.color,ref:t,size:g,value:v,onChange:_,disabled:n,required:f,placeholder:`${h} - ${h}`,slotProps:{input:{component:a8,ref:x,format:h}},error:i,className:y,sx:oe(V({},d),{fontFamily:"monospace"}),endDecorator:M(Wt,{variant:"plain",onClick:O,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:M(ci,{})}),label:a,helperText:s})),C&&M($n,{onClickAway:()=>P(null),children:M(t8,{id:"month-range-picker-popper",open:!0,anchorEl:T,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(r8,{tabIndex:-1,role:"presentation",children:[M(ni,{view:"month",views:["month"],rangeSelection:!0,defaultValue:R,onChange:N,minDate:l?new Date(l):void 0,maxDate:p?new Date(p):void 0,disableFuture:c,disablePast:u}),M(En,{sx:{p:1},children:M(It,{size:g,variant:"plain",color:"neutral",onClick:()=>{S(""),P(null)},children:"Clear"})})]})})})]})})})});Mx.displayName="MonthRangePicker";var i8=E(hl,{name:"NavigationGroup",slot:"Summary",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:t,level:r})=>({[`& .${Yn.button}`]:{padding:e.spacing(4,6,4,(t?6:8)+(r||0)*8),[`&.${Yn.expanded}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor}}})),s8=E(dl,{name:"NavigationGroup",slot:"Details"})(({theme:e})=>({"--AccordionDetails-transition":"grid-template-rows 0.2s ease, padding-block 0.2s ease",backgroundColor:e.palette.background.level1}));function Zh(e){let i=e,{title:t,children:r,startDecorator:o,level:n}=i,a=ve(i,["title","children","startDecorator","level"]);return Pe(ul,oe(V({},a),{children:[M(i8,{useIcon:!!o,level:n,children:Pe(Ml,{direction:"row",gap:4,children:[o,t]})}),M(s8,{children:r})]}))}var l8=E(Qp,{name:"NavigationItem",slot:"Button",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:t,level:r})=>({padding:e.spacing(4,6,4,(t?6:8)+(r||0)*8),gap:e.spacing(4),fontWeight:500,"&:hover":{backgroundColor:e.palette.neutral.plainHoverBg},"&:active":{backgroundColor:e.palette.neutral.plainActiveBg},[`&.${Jn.selected}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor,"&:not(:hover):not(:active)":{backgroundColor:e.palette.background.surface}}}));function Qh(e){let p=e,{children:t,startDecorator:r,level:o,selected:n,id:a,onClick:i}=p,s=ve(p,["children","startDecorator","level","selected","id","onClick"]),l=()=>{i==null||i(a)};return M(Gn,oe(V({},s),{children:Pe(l8,{level:o,useIcon:!!r,selected:n,"aria-current":n,onClick:l,children:[r&&M(ei,{children:r}),t]})}))}function Nx(e){let{items:t,level:r=0,onSelect:o}=e,n=a=>{o==null||o(a)};return M("div",{children:t.map((a,i)=>a.type==="item"?M(Qh,{id:a.id,startDecorator:a.startDecorator,selected:a.selected,level:r,onClick:n,children:a.title},a.id):a.type==="group"?M(Zh,{title:a.title,startDecorator:a.startDecorator,level:r,defaultExpanded:a.expanded,children:a.content},i):null)})}Nx.displayName="Navigator";import{motion as C_}from"framer-motion";var p8=C_(tm),Ou=p8;Ou.displayName="Radio";var c8=C_(rm),_u=c8;_u.displayName="RadioGroup";function Lx(e){let o=e,{items:t}=o,r=ve(o,["items"]);return M(_u,oe(V({},r),{children:t.map(n=>M(Ou,{value:n.value,label:n.label},`${n.value}`))}))}Lx.displayName="RadioList";import{jsx as u8}from"react/jsx-runtime";var S_=Nt(u8("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");import{motion as d8}from"framer-motion";var ey=E(sm)({});ey.displayName="Step";var ty=E(pm)({});ty.displayName="StepIndicator";var f8=E(im)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${as.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),m8=d8(f8);function Bx(e){let{steps:t,activeColor:r="primary.500",inactiveColor:o="neutral.400",activeLineColor:n="primary.500",inactiveLineColor:a="neutral.300",activeStep:i}=e;return M(m8,{sx:s=>({"--StepIndicator-size":"24px","--Step-gap":s.spacing(2),[`& .${as.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${kr.completed}`]:{"&::after":{bgcolor:n},[`& .${as.root}`]:{bgcolor:r}},[`& .${kr.active}`]:{"&::after":{bgcolor:a},[`& .${as.root}`]:{bgcolor:r}},[`& .${kr.disabled}`]:{"&::after":{bgcolor:a},[`& .${as.root}`]:{bgcolor:o}}}),children:t.map((s,l)=>{let p=i===l+1,c=i>l+1,u=i<l+1,f=s.label||s.extraContent;return M(ey,{indicator:M(ty,{variant:"solid",color:"primary",children:c?M(S_,{}):s.indicatorContent}),active:p,completed:c,disabled:u,children:f&&Pe(Lt,{children:[s.label&&M(qr,{level:"title-sm",children:s.label}),s.extraContent&&M(qr,{level:"body-xs",children:s.extraContent})]})})})})}Bx.displayName="Stepper";import{motion as k_}from"framer-motion";var h8=k_(cm),y8=E(k_.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Pn.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),g8=e=>M(y8,oe(V({},e),{layout:!0,transition:v8})),v8={type:"spring",stiffness:700,damping:30},zx=e=>M(h8,oe(V({},e),{slots:V({thumb:g8},e.slots)}));zx.displayName="Switch";import{motion as ry}from"framer-motion";var b8=ry(gm),Fx=b8;Fx.displayName="Tabs";var x8=ry(um),$x=x8;$x.displayName="Tab";var T8=ry(mm),Vx=T8;Vx.displayName="TabList";var P8=ry(ym),jx=P8;jx.displayName="TabPanel";var R_={palette:{danger:{50:"#FEF3F2",100:"#FDE6E5",200:"#FBC7C4",300:"#F89E99",400:"#F46E66",500:"#DC0D00",600:"#AB0F00",700:"#791000",800:"#430A0A",900:"#240505"},neutral:{50:"#FAFBFC",100:"#F3F5F7",200:"#EBECF0",300:"#D1D5DB",400:"#A2AAB8",500:"#5E6C83",600:"#505E79",700:"#253858",800:"#071B36",900:"#0B0D0E"},primary:{50:"#F2F7FE",100:"#E8F0FD",200:"#CCDFFC",300:"#9DC1F9",400:"#4D8EF3",500:"#015DEE",600:"#0154D6",700:"#0141A7",800:"#00255F",900:"#000F26"},warning:{50:"#FEF8F2",100:"#FEF1E5",200:"#FCE1C4",300:"#FABD7F",400:"#F57C00",500:"#AF5100",600:"#843600",700:"#672600",800:"#421400",900:"#1d1002"}}},In=Ks({cssVarPrefix:"ceed",spacing:4,breakpoints:{values:{xs:0,sm:360,md:600,lg:900,xl:1280}},fontFamily:{display:'"Poppins", var(--ceed-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol")'},typography:{"marketing-lg":{color:"var(--ceed-palette-text-primary, var(--ceed-palette-neutral-800, #171A1C))",fontFamily:'var(--ceed-fontFamily-display, "Poppins", var(--ceed-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"))',fontSize:"var(--ceed-fontSize-marketing-lg, 2.625rem)",fontWeight:"var(--ceed-fontWeight-lg, 600)",letterSpacing:"-0.025em",lineHeight:"var(--ceed-lineHeight-xs, 1.33334)"},"marketing-md":{color:"var(--ceed-palette-text-primary, var(--ceed-palette-neutral-800, #171A1C))",fontFamily:'var(--ceed-fontFamily-display, "Poppins", var(--ceed-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"))',fontSize:"var(--ceed-fontSize-marketing-md, 2rem)",fontWeight:"var(--ceed-fontWeight-lg, 600)",letterSpacing:"-0.025em",lineHeight:"var(--ceed-lineHeight-xs, 1.33334)"},"marketing-sm":{color:"var(--ceed-palette-text-primary, var(--ceed-palette-neutral-800, #171A1C))",fontFamily:'var(--ceed-fontFamily-display, "Poppins", var(--ceed-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"))',fontSize:"var(--ceed-fontSize-marketing-sm, 1.5rem)",fontWeight:"var(--ceed-fontWeight-md, 500)",letterSpacing:"-0.025em",lineHeight:"var(--ceed-lineHeight-xs, 1.33334)"}},colorSchemes:{light:R_,dark:R_},components:{DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{fontFamily:"monospace"}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{fontFamily:"monospace"}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{fontFamily:"monospace"}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{fontFamily:"monospace"}}},JoyTypography:{defaultProps:{levelMapping:{"marketing-lg":"div","marketing-md":"div","marketing-sm":"div"}}},JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr:has([type=checkbox]:not(:checked)) th":{"--TableCell-headBackground":"transparent"},"& tbody tr:has([type=checkbox]:checked):hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${pn.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function Hx(e){return M(Bo,{children:Pe(sg,{theme:In,children:[M(If,{}),M(Xs,{styles:{body:{"--ceed-fontSize-marketing-lg":"2.625rem","--ceed-fontSize-marketing-md":"2rem","--ceed-fontSize-marketing-sm":"1.5rem",[In.breakpoints.down("md")]:{"--ceed-fontSize-xs":`calc(${In.fontSize.xs} * 0.875)`,"--ceed-fontSize-sm":`calc(${In.fontSize.sm} * 0.875)`,"--ceed-fontSize-md":`calc(${In.fontSize.md} * 0.875)`,"--ceed-fontSize-lg":`calc(${In.fontSize.lg} * 0.875)`,"--ceed-fontSize-xl":`calc(${In.fontSize.xl} * 0.875)`,"--ceed-fontSize-xl2":`calc(${In.fontSize.xl2} * 0.875)`,"--ceed-fontSize-xl3":`calc(${In.fontSize.xl3} * 0.875)`,"--ceed-fontSize-xl4":`calc(${In.fontSize.xl4} * 0.875)`,"--ceed-fontSize-marketing-lg":"calc(2.625rem * 0.875)","--ceed-fontSize-marketing-md":"calc(2rem * 0.875)","--ceed-fontSize-marketing-sm":"calc(1.5rem * 0.875)"}}}}),e.children]})})}Hx.displayName="ThemeProvider";import Y8,{useCallback as uy,useEffect as oD,useMemo as mT,useRef as nD,useState as dy}from"react";import{jsx as C8}from"react/jsx-runtime";var E_=Nt(C8("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l4.65-4.65c.2-.2.51-.2.71 0L17 13z"}),"CloudUploadRounded");import{jsx as S8}from"react/jsx-runtime";var I_=Nt(S8("path",{d:"m19.41 7.41-4.83-4.83c-.37-.37-.88-.58-1.41-.58H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8.83c0-.53-.21-1.04-.59-1.42M14.8 15H13v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H9.21c-.45 0-.67-.54-.35-.85l2.8-2.79c.2-.19.51-.19.71 0l2.79 2.79c.3.31.08.85-.36.85M14 9c-.55 0-1-.45-1-1V3.5L18.5 9z"}),"UploadFileRounded");import{jsx as k8}from"react/jsx-runtime";var O_=Nt(k8("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded");function Du(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){t.forEach(function(n){return n()})}}function ep(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function Ux(e){if(Array.isArray(e))return ep(e)}function Wx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wu(e,t){if(e){if(typeof e=="string")return ep(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ep(e,t)}}function Gx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
139
+ `},n)),a}function Yh(e,t){return e&&"run"in e?async function(r,o){let n=Gh(r,V({file:o},t));await e.run(n,o)}:function(r,o){return Gh(r,V({file:o},t||e))}}function Tx(e){if(e)throw e}var Kh=An(i_(),1);function Eu(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Px(){let e=[],t={run:r,use:o};return t;function r(...n){let a=-1,i=n.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);s(null,...n);function s(l,...p){let c=e[++a],u=-1;if(l){i(l);return}for(;++u<n.length;)(p[u]===null||p[u]===void 0)&&(p[u]=n[u]);n=p,c?s_(c,s)(...p):i(null,...p)}}function o(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function s_(e,t){let r;return o;function o(...i){let s=e.length>i.length,l;s&&i.push(n);try{l=e.apply(this,i)}catch(p){let c=p;if(s&&r)throw c;return n(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,n):l instanceof Error?n(l):a(l))}function n(i,...s){r||(r=!0,t(i,...s))}function a(i){n(null,i)}}var dn={basename:gG,dirname:vG,extname:bG,join:xG,sep:"/"};function gG(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Iu(e);let r=0,o=-1,n=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;n--;)if(e.codePointAt(n)===47){if(a){r=n+1;break}}else o<0&&(a=!0,o=n+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,s=t.length-1;for(;n--;)if(e.codePointAt(n)===47){if(a){r=n+1;break}}else i<0&&(a=!0,i=n+1),s>-1&&(e.codePointAt(n)===t.codePointAt(s--)?s<0&&(o=n):(s=-1,o=i));return r===o?o=i:o<0&&(o=e.length),e.slice(r,o)}function vG(e){if(Iu(e),e.length===0)return".";let t=-1,r=e.length,o;for(;--r;)if(e.codePointAt(r)===47){if(o){t=r;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function bG(e){Iu(e);let t=e.length,r=-1,o=0,n=-1,a=0,i;for(;t--;){let s=e.codePointAt(t);if(s===47){if(i){o=t+1;break}continue}r<0&&(i=!0,r=t+1),s===46?n<0?n=t:a!==1&&(a=1):n>-1&&(a=-1)}return n<0||r<0||a===0||a===1&&n===r-1&&n===o+1?"":e.slice(n,r)}function xG(...e){let t=-1,r;for(;++t<e.length;)Iu(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":TG(r)}function TG(e){Iu(e);let t=e.codePointAt(0)===47,r=PG(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function PG(e,t){let r="",o=0,n=-1,a=0,i=-1,s,l;for(;++i<=e.length;){if(i<e.length)s=e.codePointAt(i);else{if(s===47)break;s=47}if(s===47){if(!(n===i-1||a===1))if(n!==i-1&&a===2){if(r.length<2||o!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",o=0):(r=r.slice(0,l),o=r.length-1-r.lastIndexOf("/")),n=i,a=0;continue}}else if(r.length>0){r="",o=0,n=i,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(n+1,i):r=e.slice(n+1,i),o=i-n-1;n=i,a=0}else s===46&&a>-1?a++:a=-1}return r}function Iu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var l_={cwd:CG};function CG(){return"/"}function Ql(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function p_(e){if(typeof e=="string")e=new URL(e);else if(!Ql(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return SG(e)}function SG(e){if(e.hostname!==""){let o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}let t=e.pathname,r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){let o=t.codePointAt(r+2);if(o===70||o===102){let n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(t)}var Cx=["history","path","basename","stem","extname","dirname"],Ts=class{constructor(t){let r;t?Ql(t)?r={path:t}:typeof t=="string"||kG(t)?r={value:t}:r=t:r={},this.cwd=l_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Cx.length;){let a=Cx[o];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let n;for(n in r)Cx.includes(n)||(this[n]=r[n])}get basename(){return typeof this.path=="string"?dn.basename(this.path):void 0}set basename(t){kx(t,"basename"),Sx(t,"basename"),this.path=dn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dn.dirname(this.path):void 0}set dirname(t){c_(this.basename,"dirname"),this.path=dn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dn.extname(this.path):void 0}set extname(t){if(Sx(t,"extname"),c_(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=dn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ql(t)&&(t=p_(t)),kx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dn.basename(this.path,this.extname):void 0}set stem(t){kx(t,"stem"),Sx(t,"stem"),this.path=dn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,o){let n=this.message(t,r,o);throw n.fatal=!0,n}info(t,r,o){let n=this.message(t,r,o);return n.fatal=void 0,n}message(t,r,o){let n=new Bt(t,r,o);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}};function Sx(e,t){if(e&&e.includes(dn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dn.sep+"`")}function kx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function c_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function kG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var u_=function(e){let o=this.constructor.prototype,n=o[e],a=function(){return n.apply(a,arguments)};Object.setPrototypeOf(a,o);let i=Object.getOwnPropertyNames(n);for(let s of i){let l=Object.getOwnPropertyDescriptor(n,s);l&&Object.defineProperty(a,s,l)}return a};var RG={}.hasOwnProperty,Ox=class e extends u_{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Px()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let o=this.attachers[r];t.use(...o)}return t.data((0,Kh.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Ix("data",this.frozen),this.namespace[t]=r,this):RG.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ix("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);let n=r.call(t,...o);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let r=qh(t),o=this.parser||this.Parser;return Rx("parse",o),o(String(r),r)}process(t,r){let o=this;return this.freeze(),Rx("process",this.parser||this.Parser),Ex("process",this.compiler||this.Compiler),r?n(void 0,r):new Promise(n);function n(a,i){let s=qh(t),l=o.parse(s);o.run(l,s,function(c,u,f){if(c||!u||!f)return p(c);let d=u,y=o.stringify(d,f);IG(y)?f.value=y:f.result=y,p(c,f)});function p(c,u){c||!u?i(c):a?a(u):r(void 0,u)}}}processSync(t){let r=!1,o;return this.freeze(),Rx("processSync",this.parser||this.Parser),Ex("processSync",this.compiler||this.Compiler),this.process(t,n),f_("processSync","process",r),o;function n(a,i){r=!0,Tx(a),o=i}}run(t,r,o){d_(t),this.freeze();let n=this.transformers;return!o&&typeof r=="function"&&(o=r,r=void 0),o?a(void 0,o):new Promise(a);function a(i,s){let l=qh(r);n.run(t,l,p);function p(c,u,f){let d=u||t;c?s(c):i?i(d):o(void 0,d,f)}}}runSync(t,r){let o=!1,n;return this.run(t,r,a),f_("runSync","run",o),n;function a(i,s){Tx(i),n=s,o=!0}}stringify(t,r){this.freeze();let o=qh(r),n=this.compiler||this.Compiler;return Ex("stringify",n),d_(t),n(t,o)}use(t,...r){let o=this.attachers,n=this.namespace;if(Ix("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(p){if(typeof p=="function")l(p,[]);else if(typeof p=="object")if(Array.isArray(p)){let[c,...u]=p;l(c,u)}else i(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function i(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(p.plugins),p.settings&&(n.settings=(0,Kh.default)(!0,n.settings,p.settings))}function s(p){let c=-1;if(p!=null)if(Array.isArray(p))for(;++c<p.length;){let u=p[c];a(u)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function l(p,c){let u=-1,f=-1;for(;++u<o.length;)if(o[u][0]===p){f=u;break}if(f===-1)o.push([p,...c]);else if(c.length>0){let[d,...y]=c,h=o[f][1];Eu(h)&&Eu(d)&&(d=(0,Kh.default)(!0,h,d)),o[f]=[p,d,...y]}}}},_x=new Ox().freeze();function Rx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ex(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ix(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function d_(e){if(!Eu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function f_(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qh(e){return EG(e)?e:new Ts(e)}function EG(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function IG(e){return typeof e=="string"||OG(e)}function OG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var AG="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",m_=[],h_={allowDangerousHtml:!0},MG=/^(https?|ircs?|mailto|xmpp)$/i,NG=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Dx(e){let t=e.allowedElements,r=e.allowElement,o=e.children||"",n=e.className,a=e.components,i=e.disallowedElements,s=e.rehypePlugins||m_,l=e.remarkPlugins||m_,p=e.remarkRehypeOptions?V(V({},e.remarkRehypeOptions),h_):h_,c=e.skipHtml,u=e.unwrapDisallowed,f=e.urlTransform||y_,d=_x().use(Nh).use(l).use(Yh,p).use(s),y=new Ts;typeof o=="string"?y.value=o:(""+o,void 0),t&&i&&void 0;for(let x of NG)Object.hasOwn(e,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+AG+x.id,void 0);let h=d.parse(y),g=d.runSync(h,y);return n&&(g={type:"element",tagName:"div",properties:{className:n},children:g.type==="root"?g.children:[g]}),xs(g,b),Wb(g,{Fragment:_G,components:a,ignoreInvalidStyle:!0,jsx:DG,jsxs:wG,passKeys:!0,passNode:!0});function b(x,v,S){if(x.type==="raw"&&S&&typeof v=="number")return c?S.children.splice(v,1):S.children[v]={type:"text",value:x.value},v;if(x.type==="element"){let T;for(T in yu)if(Object.hasOwn(yu,T)&&Object.hasOwn(x.properties,T)){let P=x.properties[T],C=yu[T];(C===null||C.includes(x.tagName))&&(x.properties[T]=f(String(P||""),T,x))}}if(x.type==="element"){let T=t?!t.includes(x.tagName):i?i.includes(x.tagName):!1;if(!T&&r&&typeof v=="number"&&(T=!r(x,v,S)),T&&S&&typeof v=="number")return u&&x.children?S.children.splice(v,1,...x.children):S.children.splice(v,1),v}}}function y_(e){let t=e.indexOf(":"),r=e.indexOf("?"),o=e.indexOf("#"),n=e.indexOf("/");return t<0||n>-1&&t>n||r>-1&&t>r||o>-1&&t>o||MG.test(e.slice(0,t))?e:""}function g_(e){let{accentColor:t}=e;return r=>{xs(r,"text",(o,n,a)=>{let i=o.value,s=/\|\|.*?\|\|/g,l,p=0,c=[];for(;(l=s.exec(i))!==null;){l.index>p&&c.push({type:"text",value:i.slice(p,l.index)});let u=l[0].split("||")[1];c.push({type:"element",tagName:"p",properties:{textColor:t},children:[{type:"text",value:u}]}),p=l.index+l[0].length}p<i.length&&c.push({type:"text",value:i.slice(p)}),c.length&&a.children.splice(n,1,...c)})}}var wx=e=>{let p=e,{color:t,textColor:r,defaultLevel:o="body-md",accentColor:n="danger.500",defaultLinkAction:a="_self",markdownOptions:i,content:s}=p,l=ve(p,["color","textColor","defaultLevel","accentColor","defaultLinkAction","markdownOptions","content"]);return M(zo,oe(V({component:"div",color:t,textColor:r,level:o},l),{children:M(Dx,oe(V({},i),{children:s,rehypePlugins:[[g_,{accentColor:n}]],components:V({h1:({children:c})=>M(zo,{color:t,textColor:r,level:"h1",children:c}),h2:({children:c})=>M(zo,{color:t,textColor:r,level:"h2",children:c}),h3:({children:c})=>M(zo,{color:t,textColor:r,level:"h3",children:c}),h4:({children:c})=>M(zo,{color:t,textColor:r,level:"h4",children:c}),p:({children:c,node:u})=>M(zo,oe(V({color:t,textColor:r,level:o},u==null?void 0:u.properties),{children:c})),a:({children:c,href:u})=>M(oa,{href:u,target:a,children:c}),hr:()=>M(uu,{})},i==null?void 0:i.components)}))}))};wx.displayName="Markdown";import LG,{forwardRef as BG,useCallback as Ax,useEffect as zG,useImperativeHandle as FG,useRef as $G,useState as VG}from"react";var jG=E(Ut,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),HG=E(Fo,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),UG=E("div",{name:"MonthPicker",slot:"root"})({width:"100%"}),v_=(e,t)=>{let r=`${e.getMonth()+1}`,o=e.getFullYear();return Number(r)<10&&(r="0"+r),t.replace(/YYYY/g,o.toString()).replace(/MM/g,r)},WG=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,t=>`${t}\``);function GG(e){let t,r,o=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(t=o.slice(0,2),r=o.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(r=o.slice(0,4),t=o.slice(4)),new Date(`${r}/${t}`)}var YG=LG.forwardRef(function(t,r){let i=t,{onChange:o,format:n}=i,a=ve(i,["onChange","format"]);return M(ua,oe(V({},a),{inputRef:r,onAccept:s=>o({target:{name:t.name,value:s}}),mask:Date,pattern:WG(n),blocks:{M:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:s=>v_(s,n),parse:GG,autofix:"pad",overwrite:!0}))}),b_=BG((e,t)=>{let r=Y({props:e,name:"MonthPicker"}),O=r,{onChange:o,disabled:n,label:a,error:i,helperText:s,minDate:l,maxDate:p,disableFuture:c,disablePast:u,required:f,sx:d,className:y,format:h="YYYY/MM",size:g}=O,b=ve(O,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className","format","size"]),x=$G(null),[v,S]=Rr(r.value,r.defaultValue||"",Ax(N=>o==null?void 0:o({target:{name:r.name,value:N}}),[r.name,o]),{disableStrict:!0}),[T,P]=VG(null),C=!!T;zG(()=>{var N;T||(N=x.current)==null||N.blur()},[T,x]),FG(t,()=>x.current,[x]);let R=Ax(N=>{S(N.target.value)},[S]),_=Ax(N=>{var A;P(T?null:N.currentTarget),(A=x.current)==null||A.focus()},[T,P,x]);return M(UG,{children:M(Wr,{open:!0,children:Pe(Bo,{children:[M(po,oe(V({},b),{color:i?"danger":b.color,ref:x,size:g,value:v,onChange:R,placeholder:h,disabled:n,required:f,slotProps:{input:{component:YG,ref:x,format:h}},error:i,className:y,sx:oe(V({},d),{fontFamily:"monospace"}),endDecorator:M(Wt,{variant:"plain",onClick:_,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:M(ci,{})}),label:a,helperText:s})),C&&M($n,{onClickAway:()=>P(null),children:M(jG,{id:"month-picker-popper",open:!0,anchorEl:T,placement:"bottom-end",onMouseDown:N=>N.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(HG,{tabIndex:-1,role:"presentation",children:[M(ni,{view:"month",views:["month"],value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([N])=>{R({target:{name:r.name,value:v_(N,h)}}),P(null)},minDate:l?new Date(l):void 0,maxDate:p?new Date(p):void 0,disableFuture:c,disablePast:u}),M(En,{sx:{p:1},children:M(It,{size:g,variant:"plain",color:"neutral",onClick:()=>{R({target:{name:r.name,value:""}}),P(null)},children:"Clear"})})]})})})]})})})});import JG,{forwardRef as qG,useCallback as Xh,useEffect as KG,useImperativeHandle as XG,useMemo as ZG,useRef as QG,useState as e8}from"react";var t8=E(Ut,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),r8=E(Fo,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),o8=E("div",{name:"MonthRangePicker",slot:"root"})({width:"100%"}),T_=([e,t],r)=>{let o=n=>{let a=`${n.getMonth()+1}`,i=n.getFullYear();return Number(a)<10&&(a="0"+a),r.replace(/YYYY/g,i.toString()).replace(/MM/g,a)};return[o(e),t?o(t):""].join(" - ")};function x_(e){let t,r,o=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(t=o.slice(0,2),r=o.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(r=o.slice(0,4),t=o.slice(4)),new Date(`${r}/${t}`)}var P_=e=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[x_(t),x_(r)]},n8=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,t=>`${t}\``),a8=JG.forwardRef(function(t,r){let i=t,{onChange:o,format:n}=i,a=ve(i,["onChange","format"]);return M(ua,oe(V({},a),{inputRef:r,onAccept:s=>o({target:{name:t.name,value:s}}),mask:Date,pattern:n8(n),blocks:{m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:s=>T_(s,n),parse:P_,autofix:"pad",overwrite:!0}))}),Mx=qG((e,t)=>{let r=Y({props:e,name:"MonthRangePicker"}),A=r,{onChange:o,disabled:n,label:a,error:i,helperText:s,minDate:l,maxDate:p,disableFuture:c,disablePast:u,required:f,sx:d,className:y,format:h="YYYY/MM",size:g}=A,b=ve(A,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className","format","size"]),x=QG(null),[v,S]=Rr(r.value,r.defaultValue||"",Xh(I=>o==null?void 0:o({target:{name:r.name,value:I}}),[r.name,o]),{disableStrict:!0}),[T,P]=e8(null),C=!!T,R=ZG(()=>v?P_(v):void 0,[v]);KG(()=>{var I;T||(I=x.current)==null||I.blur()},[T,x]),XG(t,()=>x.current,[x]);let _=Xh(I=>{S(I.target.value)},[S]),O=Xh(I=>{var F;P(T?null:I.currentTarget),(F=x.current)==null||F.focus()},[T,P,x]),N=Xh(([I,F])=>{!I||!F||(S(T_([I,F],h)),P(null))},[S,P,h]);return M(o8,{children:M(Wr,{open:!0,children:Pe(Bo,{children:[M(po,oe(V({},b),{color:i?"danger":b.color,ref:t,size:g,value:v,onChange:_,disabled:n,required:f,placeholder:`${h} - ${h}`,slotProps:{input:{component:a8,ref:x,format:h}},error:i,className:y,sx:oe(V({},d),{fontFamily:"monospace"}),endDecorator:M(Wt,{variant:"plain",onClick:O,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:M(ci,{})}),label:a,helperText:s})),C&&M($n,{onClickAway:()=>P(null),children:M(t8,{id:"month-range-picker-popper",open:!0,anchorEl:T,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(r8,{tabIndex:-1,role:"presentation",children:[M(ni,{view:"month",views:["month"],rangeSelection:!0,defaultValue:R,onChange:N,minDate:l?new Date(l):void 0,maxDate:p?new Date(p):void 0,disableFuture:c,disablePast:u}),M(En,{sx:{p:1},children:M(It,{size:g,variant:"plain",color:"neutral",onClick:()=>{S(""),P(null)},children:"Clear"})})]})})})]})})})});Mx.displayName="MonthRangePicker";var i8=E(hl,{name:"NavigationGroup",slot:"Summary",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:t,level:r})=>({[`& .${Yn.button}`]:{padding:e.spacing(4,6,4,(t?6:8)+(r||0)*8),[`&.${Yn.expanded}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor}}})),s8=E(dl,{name:"NavigationGroup",slot:"Details"})(({theme:e})=>({"--AccordionDetails-transition":"grid-template-rows 0.2s ease, padding-block 0.2s ease",backgroundColor:e.palette.background.level1}));function Zh(e){let i=e,{title:t,children:r,startDecorator:o,level:n}=i,a=ve(i,["title","children","startDecorator","level"]);return Pe(ul,oe(V({},a),{children:[M(i8,{useIcon:!!o,level:n,children:Pe(Ml,{direction:"row",gap:4,children:[o,t]})}),M(s8,{children:r})]}))}var l8=E(Qp,{name:"NavigationItem",slot:"Button",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:t,level:r})=>({padding:e.spacing(4,6,4,(t?6:8)+(r||0)*8),gap:e.spacing(4),fontWeight:500,"&:hover":{backgroundColor:e.palette.neutral.plainHoverBg},"&:active":{backgroundColor:e.palette.neutral.plainActiveBg},[`&.${Jn.selected}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor,"&:not(:hover):not(:active)":{backgroundColor:e.palette.background.surface}}}));function Qh(e){let p=e,{children:t,startDecorator:r,level:o,selected:n,id:a,onClick:i}=p,s=ve(p,["children","startDecorator","level","selected","id","onClick"]),l=()=>{i==null||i(a)};return M(Gn,oe(V({},s),{children:Pe(l8,{level:o,useIcon:!!r,selected:n,"aria-current":n,onClick:l,children:[r&&M(ei,{children:r}),t]})}))}function Nx(e){let{items:t,level:r=0,onSelect:o}=e,n=a=>{o==null||o(a)};return M("div",{children:t.map((a,i)=>a.type==="item"?M(Qh,{id:a.id,startDecorator:a.startDecorator,selected:a.selected,level:r,onClick:n,children:a.title},a.id):a.type==="group"?M(Zh,{title:a.title,startDecorator:a.startDecorator,level:r,defaultExpanded:a.expanded,children:a.content},i):null)})}Nx.displayName="Navigator";import{motion as C_}from"framer-motion";var p8=C_(tm),Ou=p8;Ou.displayName="Radio";var c8=C_(rm),_u=c8;_u.displayName="RadioGroup";function Lx(e){let o=e,{items:t}=o,r=ve(o,["items"]);return M(_u,oe(V({},r),{children:t.map(n=>M(Ou,{value:n.value,label:n.label},`${n.value}`))}))}Lx.displayName="RadioList";import{jsx as u8}from"react/jsx-runtime";var S_=Nt(u8("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");import{motion as d8}from"framer-motion";var ey=E(sm)({});ey.displayName="Step";var ty=E(pm)({});ty.displayName="StepIndicator";var f8=E(im)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${as.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),m8=d8(f8);function Bx(e){let{steps:t,activeColor:r="primary.500",inactiveColor:o="neutral.400",activeLineColor:n="primary.500",inactiveLineColor:a="neutral.300",activeStep:i}=e;return M(m8,{sx:s=>({"--StepIndicator-size":"24px","--Step-gap":s.spacing(2),[`& .${as.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${kr.completed}`]:{"&::after":{bgcolor:n},[`& .${as.root}`]:{bgcolor:r}},[`& .${kr.active}`]:{"&::after":{bgcolor:a},[`& .${as.root}`]:{bgcolor:r}},[`& .${kr.disabled}`]:{"&::after":{bgcolor:a},[`& .${as.root}`]:{bgcolor:o}}}),children:t.map((s,l)=>{let p=i===l+1,c=i>l+1,u=i<l+1,f=s.label||s.extraContent;return M(ey,{indicator:M(ty,{variant:"solid",color:"primary",children:c?M(S_,{}):s.indicatorContent}),active:p,completed:c,disabled:u,children:f&&Pe(Lt,{children:[s.label&&M(qr,{level:"title-sm",children:s.label}),s.extraContent&&M(qr,{level:"body-xs",children:s.extraContent})]})})})})}Bx.displayName="Stepper";import{motion as k_}from"framer-motion";var h8=k_(cm),y8=E(k_.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Pn.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),g8=e=>M(y8,oe(V({},e),{layout:!0,transition:v8})),v8={type:"spring",stiffness:700,damping:30},zx=e=>M(h8,oe(V({},e),{slots:V({thumb:g8},e.slots)}));zx.displayName="Switch";import{motion as ry}from"framer-motion";var b8=ry(gm),Fx=b8;Fx.displayName="Tabs";var x8=ry(um),$x=x8;$x.displayName="Tab";var T8=ry(mm),Vx=T8;Vx.displayName="TabList";var P8=ry(ym),jx=P8;jx.displayName="TabPanel";var R_={palette:{danger:{50:"#FEF3F2",100:"#FDE6E5",200:"#FBC7C4",300:"#F89E99",400:"#F46E66",500:"#DC0D00",600:"#AB0F00",700:"#791000",800:"#430A0A",900:"#240505"},neutral:{50:"#FAFBFC",100:"#F3F5F7",200:"#EBECF0",300:"#D1D5DB",400:"#A2AAB8",500:"#5E6C83",600:"#505E79",700:"#253858",800:"#071B36",900:"#0B0D0E"},primary:{50:"#F2F7FE",100:"#E8F0FD",200:"#CCDFFC",300:"#9DC1F9",400:"#4D8EF3",500:"#015DEE",600:"#0154D6",700:"#0141A7",800:"#00255F",900:"#000F26"},warning:{50:"#FEF8F2",100:"#FEF1E5",200:"#FCE1C4",300:"#FABD7F",400:"#F57C00",500:"#AF5100",600:"#843600",700:"#672600",800:"#421400",900:"#1d1002"}}},In=Ks({cssVarPrefix:"ceed",spacing:4,breakpoints:{values:{xs:0,sm:360,md:600,lg:900,xl:1280}},fontFamily:{display:'"Poppins", var(--ceed-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol")'},typography:{"marketing-lg":{color:"var(--ceed-palette-text-primary, var(--ceed-palette-neutral-800, #171A1C))",fontFamily:'var(--ceed-fontFamily-display, "Poppins", var(--ceed-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"))',fontSize:"var(--ceed-fontSize-marketing-lg, 2.625rem)",fontWeight:"var(--ceed-fontWeight-lg, 600)",letterSpacing:"-0.025em",lineHeight:"var(--ceed-lineHeight-xs, 1.33334)"},"marketing-md":{color:"var(--ceed-palette-text-primary, var(--ceed-palette-neutral-800, #171A1C))",fontFamily:'var(--ceed-fontFamily-display, "Poppins", var(--ceed-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"))',fontSize:"var(--ceed-fontSize-marketing-md, 2rem)",fontWeight:"var(--ceed-fontWeight-lg, 600)",letterSpacing:"-0.025em",lineHeight:"var(--ceed-lineHeight-xs, 1.33334)"},"marketing-sm":{color:"var(--ceed-palette-text-primary, var(--ceed-palette-neutral-800, #171A1C))",fontFamily:'var(--ceed-fontFamily-display, "Poppins", var(--ceed-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"))',fontSize:"var(--ceed-fontSize-marketing-sm, 1.5rem)",fontWeight:"var(--ceed-fontWeight-md, 500)",letterSpacing:"-0.025em",lineHeight:"var(--ceed-lineHeight-xs, 1.33334)"}},colorSchemes:{light:R_,dark:R_},components:{DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{fontFamily:"monospace"}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{fontFamily:"monospace"}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{fontFamily:"monospace"}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{fontFamily:"monospace"}}},JoyTypography:{defaultProps:{levelMapping:{"marketing-lg":"div","marketing-md":"div","marketing-sm":"div"}}},JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr:has([type=checkbox]:not(:checked)) th":{"--TableCell-headBackground":"transparent"},"& tbody tr:has([type=checkbox]:checked):hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${pn.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function Hx(e){return M(Bo,{children:Pe(sg,{theme:In,children:[M(If,{}),M(Xs,{styles:{body:{"--ceed-fontSize-marketing-lg":"2.625rem","--ceed-fontSize-marketing-md":"2rem","--ceed-fontSize-marketing-sm":"1.5rem",[In.breakpoints.down("md")]:{"--ceed-fontSize-xs":`calc(${In.fontSize.xs} * 0.875)`,"--ceed-fontSize-sm":`calc(${In.fontSize.sm} * 0.875)`,"--ceed-fontSize-md":`calc(${In.fontSize.md} * 0.875)`,"--ceed-fontSize-lg":`calc(${In.fontSize.lg} * 0.875)`,"--ceed-fontSize-xl":`calc(${In.fontSize.xl} * 0.875)`,"--ceed-fontSize-xl2":`calc(${In.fontSize.xl2} * 0.875)`,"--ceed-fontSize-xl3":`calc(${In.fontSize.xl3} * 0.875)`,"--ceed-fontSize-xl4":`calc(${In.fontSize.xl4} * 0.875)`,"--ceed-fontSize-marketing-lg":"calc(2.625rem * 0.875)","--ceed-fontSize-marketing-md":"calc(2rem * 0.875)","--ceed-fontSize-marketing-sm":"calc(1.5rem * 0.875)"}}}}),e.children]})})}Hx.displayName="ThemeProvider";import Y8,{useCallback as uy,useEffect as oD,useMemo as mT,useRef as nD,useState as dy}from"react";import{jsx as C8}from"react/jsx-runtime";var E_=Nt(C8("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l4.65-4.65c.2-.2.51-.2.71 0L17 13z"}),"CloudUploadRounded");import{jsx as S8}from"react/jsx-runtime";var I_=Nt(S8("path",{d:"m19.41 7.41-4.83-4.83c-.37-.37-.88-.58-1.41-.58H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8.83c0-.53-.21-1.04-.59-1.42M14.8 15H13v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H9.21c-.45 0-.67-.54-.35-.85l2.8-2.79c.2-.19.51-.19.71 0l2.79 2.79c.3.31.08.85-.36.85M14 9c-.55 0-1-.45-1-1V3.5L18.5 9z"}),"UploadFileRounded");import{jsx as k8}from"react/jsx-runtime";var O_=Nt(k8("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded");function Du(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){t.forEach(function(n){return n()})}}function ep(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function Ux(e){if(Array.isArray(e))return ep(e)}function Wx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wu(e,t){if(e){if(typeof e=="string")return ep(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ep(e,t)}}function Gx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
140
140
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ha(e){return Ux(e)||Wx(e)||wu(e)||Gx()}var Lu=An(Au());var $_=An(Au());function Jx(e){if(Array.isArray(e))return e}function qx(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,n,a,i,s=[],l=!0,p=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(o=a.call(r)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(c){p=!0,n=c}finally{try{if(!l&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(p)throw n}}return s}}function Kx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
141
141
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xx(e,t){return Jx(e)||qx(e,t)||wu(e,t)||Kx()}var w_="data-pdnd-honey-pot";function ny(e){return e instanceof Element&&e.hasAttribute(w_)}function A_(e){var t=document.elementsFromPoint(e.x,e.y),r=Xx(t,2),o=r[0],n=r[1];return o?ny(o)?n!=null?n:null:o:null}function np(e){var t=null;return function(){if(!t){for(var o=arguments.length,n=new Array(o),a=0;a<o;a++)n[a]=arguments[a];var i=e.apply(this,n);t={result:i}}return t.result}}var ay=np(function(){return navigator.userAgent.includes("Firefox")});var yi=np(function(){var t=navigator,r=t.userAgent;return r.includes("AppleWebKit")&&!r.includes("Chrome")});var M_=An(Au());var iy={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};function N_(e){var t=e.dragEnter;return yi()?t.hasOwnProperty(iy.isEnteringWindow):!1}function L_(e){var t=e.dragLeave;return yi()?t.hasOwnProperty(iy.isLeavingWindow):!1}(function(){if(typeof window>"u"||!yi())return;function t(){return{enterCount:0,isOverWindow:!1}}var r=t();function o(){r=t()}(0,M_.bindAll)(window,[{type:"dragstart",listener:function(){r.enterCount=0,r.isOverWindow=!0}},{type:"drop",listener:o},{type:"dragend",listener:o},{type:"dragenter",listener:function(a){!r.isOverWindow&&r.enterCount===0&&(a[iy.isEnteringWindow]=!0),r.isOverWindow=!0,r.enterCount++}},{type:"dragleave",listener:function(a){r.enterCount--,r.isOverWindow&&r.enterCount===0&&(a[iy.isLeavingWindow]=!0,r.isOverWindow=!1)}}],{capture:!0})})();function w8(e){return"nodeName"in e}function sy(e){return w8(e)&&e.ownerDocument!==document}function B_(e){var t=e.dragLeave,r=t.type,o=t.relatedTarget;return r!=="dragleave"?!1:yi()?L_({dragLeave:t}):o==null?!0:ay()?sy(o):o instanceof HTMLIFrameElement}function ap(e){var t=e.onDragEnd;return[{type:"pointermove",listener:function(){var r=0;return function(){if(r<20){r++;return}t()}}()},{type:"pointerdown",listener:t}]}function Mu(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var A8=function(t){var r=[],o=null,n=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];r=s,!o&&(o=requestAnimationFrame(function(){o=null,t.apply(void 0,r)}))};return n.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},n},z_=A8;var Zx=z_(function(e){return e()}),ly=function(){var e=null;function t(o){var n=requestAnimationFrame(function(){e=null,o()});e={frameId:n,fn:o}}function r(){e&&(cancelAnimationFrame(e.frameId),e.fn(),e=null)}return{schedule:t,flush:r}}();function F_(e){var t=e.source,r=e.initial,o=e.dispatchEvent,n={dropTargets:[]};function a(s){o(s),n={dropTargets:s.payload.location.current.dropTargets}}var i={start:function(l){var p=l.nativeSetDragImage,c={current:r,previous:n,initial:r};a({eventName:"onGenerateDragPreview",payload:{source:t,location:c,nativeSetDragImage:p}}),ly.schedule(function(){a({eventName:"onDragStart",payload:{source:t,location:c}})})},dragUpdate:function(l){var p=l.current;ly.flush(),Zx.cancel(),a({eventName:"onDropTargetChange",payload:{source:t,location:{initial:r,previous:n,current:p}}})},drag:function(l){var p=l.current;Zx(function(){ly.flush();var c={initial:r,previous:n,current:p};a({eventName:"onDrag",payload:{source:t,location:c}})})},drop:function(l){var p=l.current,c=l.updatedSourcePayload;ly.flush(),Zx.cancel(),a({eventName:"onDrop",payload:{source:c!=null?c:t,location:{current:p,previous:n,initial:r}}})}};return i}var eT={isActive:!1};function V_(){return!eT.isActive}function M8(e){return e.dataTransfer?e.dataTransfer.setDragImage.bind(e.dataTransfer):null}function N8(e){var t=e.current,r=e.next;if(t.length!==r.length)return!0;for(var o=0;o<t.length;o++)if(t[o].element!==r[o].element)return!0;return!1}function L8(e){var t=e.event,r=e.dragType,o=e.getDropTargetsOver,n=e.dispatchEvent;if(!V_())return;var a=B8({event:t,dragType:r,getDropTargetsOver:o});eT.isActive=!0;var i={current:a};Qx({event:t,current:a.dropTargets});var s=F_({source:r.payload,dispatchEvent:n,initial:a});function l(d){var y=N8({current:i.current.dropTargets,next:d.dropTargets});i.current=d,y&&s.dragUpdate({current:i.current})}function p(d){var y=Mu(d),h=ny(d.target)?A_({x:y.clientX,y:y.clientY}):d.target,g=o({target:h,input:y,source:r.payload,current:i.current.dropTargets});g.length&&(d.preventDefault(),Qx({event:d,current:g})),l({dropTargets:g,input:y})}function c(){i.current.dropTargets.length&&l({dropTargets:[],input:i.current.input}),s.drop({current:i.current,updatedSourcePayload:null}),u()}function u(){eT.isActive=!1,f()}var f=(0,$_.bindAll)(window,[{type:"dragover",listener:function(y){p(y),s.drag({current:i.current})}},{type:"dragenter",listener:p},{type:"dragleave",listener:function(y){B_({dragLeave:y})&&(l({input:i.current.input,dropTargets:[]}),r.startedFrom==="external"&&c())}},{type:"drop",listener:function(y){if(i.current={dropTargets:i.current.dropTargets,input:Mu(y)},!i.current.dropTargets.length){c();return}y.preventDefault(),Qx({event:y,current:i.current.dropTargets}),s.drop({current:i.current,updatedSourcePayload:r.type==="external"?r.getDropPayload(y):null}),u()}},{type:"dragend",listener:function(y){i.current={dropTargets:i.current.dropTargets,input:Mu(y)},c()}}].concat(ha(ap({onDragEnd:c}))),{capture:!0});s.start({nativeSetDragImage:M8(t)})}function Qx(e){var t,r=e.event,o=e.current,n=(t=o[0])===null||t===void 0?void 0:t.dropEffect;n!=null&&r.dataTransfer&&(r.dataTransfer.dropEffect=n)}function B8(e){var t=e.event,r=e.dragType,o=e.getDropTargetsOver,n=Mu(t);if(r.startedFrom==="external")return{input:n,dropTargets:[]};var a=o({input:n,source:r.payload,target:t.target,current:[]});return{input:n,dropTargets:a}}var tT={canStart:V_,start:L8};var rT=new Map;function z8(e){var t=e.typeKey,r=e.mount,o=rT.get(t);if(o)return o.usageCount++,o;var n={typeKey:t,unmount:r(),usageCount:1};return rT.set(t,n),n}function j_(e){var t=z8(e);return function(){t.usageCount--,!(t.usageCount>0)&&(t.unmount(),rT.delete(e.typeKey))}}function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function oT(e,t){if(gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(gi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nT(e){var t=oT(e,"string");return gi(t)=="symbol"?t:t+""}function Nu(e,t,r){return t=nT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H_(e,t){var r=t.attribute,o=t.value;return e.setAttribute(r,o),function(){return e.removeAttribute(r)}}function U_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function bi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U_(Object(r),!0).forEach(function(o){Nu(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U_(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function aT(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=F8(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
142
142
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,i=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return a=p.done,p},e:function(p){i=!0,s=p},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(i)throw s}}}}function F8(e,t){if(e){if(typeof e=="string")return W_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W_(e,t)}}function W_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function iT(e){return e.slice(0).reverse()}function G_(e){var t=e.typeKey,r=e.defaultDropEffect,o=new WeakMap,n="data-drop-target-for-".concat(t),a="[".concat(n,"]");function i(d){return o.set(d.element,d),function(){return o.delete(d.element)}}function s(d){if(0)var y;return Du(H_(d.element,{attribute:n,value:"true"}),i(d))}function l(d){var y,h,g,b,x=d.source,v=d.target,S=d.input,T=d.result,P=T===void 0?[]:T;if(v==null)return P;if(!(v instanceof Element))return v instanceof Node?l({source:x,target:v.parentElement,input:S,result:P}):P;var C=v.closest(a);if(C==null)return P;var R=o.get(C);if(R==null)return P;var _={input:S,source:x,element:R.element};if(R.canDrop&&!R.canDrop(_))return l({source:x,target:R.element.parentElement,input:S,result:P});var O=(y=(h=R.getData)===null||h===void 0?void 0:h.call(R,_))!==null&&y!==void 0?y:{},N=(g=(b=R.getDropEffect)===null||b===void 0?void 0:b.call(R,_))!==null&&g!==void 0?g:r,A={data:O,element:R.element,dropEffect:N,isActiveDueToStickiness:!1};return l({source:x,target:R.element.parentElement,input:S,result:[].concat(ha(P),[A])})}function p(d){var y=d.eventName,h=d.payload,g=aT(h.location.current.dropTargets),b;try{for(g.s();!(b=g.n()).done;){var x,v=b.value,S=o.get(v.element),T=bi(bi({},h),{},{self:v});S==null||(x=S[y])===null||x===void 0||x.call(S,T)}}catch(P){g.e(P)}finally{g.f()}}var c={onGenerateDragPreview:p,onDrag:p,onDragStart:p,onDrop:p,onDropTargetChange:function(y){var h=y.payload,g=new Set(h.location.current.dropTargets.map(function(B){return B.element})),b=new Set,x=aT(h.location.previous.dropTargets),v;try{for(x.s();!(v=x.n()).done;){var S,T=v.value;b.add(T.element);var P=o.get(T.element),C=g.has(T.element),R=bi(bi({},h),{},{self:T});if(P==null||(S=P.onDropTargetChange)===null||S===void 0||S.call(P,R),!C){var _;P==null||(_=P.onDragLeave)===null||_===void 0||_.call(P,R)}}}catch(B){x.e(B)}finally{x.f()}var O=aT(h.location.current.dropTargets),N;try{for(O.s();!(N=O.n()).done;){var A,I,F=N.value;if(!b.has(F.element)){var L=bi(bi({},h),{},{self:F}),w=o.get(F.element);w==null||(A=w.onDropTargetChange)===null||A===void 0||A.call(w,L),w==null||(I=w.onDragEnter)===null||I===void 0||I.call(w,L)}}}catch(B){O.e(B)}finally{O.f()}}};function u(d){c[d.eventName](d)}function f(d){var y=d.source,h=d.target,g=d.input,b=d.current,x=l({source:y,target:h,input:g});if(x.length>=b.length)return x;for(var v=iT(b),S=iT(x),T=[],P=0;P<v.length;P++){var C,R=v[P],_=S[P];if(_!=null){T.push(_);continue}var O=T[P-1],N=v[P-1];if((O==null?void 0:O.element)!==(N==null?void 0:N.element))break;var A=o.get(R.element);if(!A)break;var I={input:g,source:y,element:A.element};if(A.canDrop&&!A.canDrop(I)||!((C=A.getIsSticky)!==null&&C!==void 0&&C.call(A,I)))break;T.push(bi(bi({},R),{},{isActiveDueToStickiness:!0}))}return iT(T)}return{dropTargetForConsumers:s,getIsOver:f,dispatchEvent:u}}function $8(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=V8(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.