ados-rcm 1.1.724 → 1.1.725
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/dist/AModule/AComponents/AFileUploder/AFileUploader.d.ts +8 -8
- package/dist/index.cjs.js +57 -57
- package/dist/index.es.js +5051 -5051
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -278,66 +278,66 @@ H=m.get(G);H&&(k(F,"vt-share"),k(H,"vt-share"),m.set(G,null))}}c=c.nextSibling}f
|
|
|
278
278
|
document.__reactViewTransition=document.startViewTransition({update:function(){A(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<u.length;b={g:b.g},e++)if(b.g=u[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(w){return function(q){w.g.addEventListener("load",q);w.g.addEventListener("error",q)}}(b)),a.push(p))}return Promise.race([Promise.all(a),new Promise(function(w){var q=
|
|
279
279
|
performance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===b.getAttribute("style")&&b.removeAttribute("style")}});z.finished.finally(function(){document.__reactViewTransition===z&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}A(g)}.bind(null,$RV);`);var Mr=R('$RC("'),ro=R(`$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=
|
|
280
280
|
"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=
|
|
281
|
-
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`),Bi=R('$RR("'),tl=R('","'),es=R('",'),Zs=R('"'),vr=R(")<\/script>");R('<template data-rci="" data-bid="'),R('<template data-rri="" data-bid="'),R('" data-sid="'),R('" data-sty="');var Bl=R('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'),yo=R('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'),Cl=R('$RX("'),ja=R('"'),zi=R(","),vc=R(")<\/script>");R('<template data-rxi="" data-bid="'),R('" data-dgst="'),R('" data-msg="'),R('" data-stck="'),R('" data-cstck="');var Ls=/[<\u2028\u2029]/g,_l=/[&><\u2028\u2029]/g,ps=R(' media="not all" data-precedence="'),zl=R('" data-href="'),bc=R('">'),Kc=R("</style>"),ts=!1,Jc=!0,Hl=[],$a=R(' data-precedence="'),yf=R('" data-href="'),Ri=R(" "),mu=R('">'),Os=R("</style>");R('<link rel="expect" href="#'),R('" blocking="render"/>');var xr=R(' id="'),Qc=R("["),mf=R(",["),yc=R(","),qc=R("]"),mc=0,xf=1,Do=2,jc=3,Ra=/[<>\r\n]/g,wf=/["';,\r\n]/g,Ps=Function.prototype.bind,Jf=Symbol.for("react.client.reference"),io={};Object.freeze(io);var ns={},ca=null,Yu={},$c={},Vu=new Set,ec=new Set,Qf=new Set,Zu=new Set,xc=new Set,tc=new Set,Cf=new Set,wc=new Set,_f=new Set,md={enqueueSetState:function(c,d,E){var D=c._reactInternals;D.queue===null?it(c,"setState"):(D.queue.push(d),E!=null&&Se(E))},enqueueReplaceState:function(c,d,E){c=c._reactInternals,c.replace=!0,c.queue=[d],E!=null&&Se(E)},enqueueForceUpdate:function(c,d){c._reactInternals.queue===null?it(c,"forceUpdate"):d!=null&&Se(d)}},xu={id:1,overflow:""},wu=Math.clz32?Math.clz32:mn,ch=Math.log,uh=Math.LN2,ua=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),qf=null,fh=typeof Object.is=="function"?Object.is:gr,nl=null,Ia=null,Ci=null,Sl=null,Xs=null,fi=null,El=!1,vs=!1,So=0,Cu=0,Sf=-1,jf=0,fa=null,da=null,Xu=0,Ks=!1,Cc,_c={readContext:xo,use:function(c){if(c!==null&&typeof c=="object"){if(typeof c.then=="function")return ri(c);if(c.$$typeof===Pi)return xo(c)}throw Error("An unsupported type was passed to use(): "+String(c))},useContext:function(c){return Cc="useContext",Sn(),c._currentValue},useMemo:ai,useReducer:so,useRef:function(c){nl=Sn(),fi=xn();var d=fi.memoizedState;return d===null?(c={current:c},Object.seal(c),fi.memoizedState=c):d},useState:function(c){return Cc="useState",so(wo,c)},useInsertionEffect:An,useLayoutEffect:An,useCallback:function(c,d){return ai(function(){return c},d)},useImperativeHandle:An,useEffect:An,useDebugValue:An,useDeferredValue:function(c,d){return Sn(),d!==void 0?d:c},useTransition:function(){return Sn(),[!1,Jl]},useId:function(){var c=Ia.treeContext,d=c.overflow;c=c.id,c=(c&~(1<<32-wu(c)-1)).toString(32)+d;var E=f;if(E===null)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");return d=So++,c="_"+E.idPrefix+"R_"+c,0<d&&(c+="H"+d.toString(32)),c+"_"},useSyncExternalStore:function(c,d,E){if(E===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return E()},useOptimistic:function(c){return Sn(),[c,Wo]},useActionState:Co,useFormState:Co,useHostTransitionStatus:function(){return Sn(),Xr},useMemoCache:function(c){for(var d=Array(c),E=0;E<c;E++)d[E]=ra;return d},useCacheRefresh:function(){return an},useEffectEvent:function(){return Yi}},f=null,p=null,A={getCacheForType:function(){throw Error("Not implemented.")},cacheSignal:function(){throw Error("Not implemented.")},getOwner:function(){return p===null?null:p.componentStack}},F=0,Q,ue,Ie,Ue,kt,tt,yt;On.__reactDisabledLog=!0;var en,bn,sn=!1,Ht=new(typeof WeakMap=="function"?WeakMap:Map),Lr={react_stack_bottom_frame:function(c,d,E){return c(d,E)}},Ii=Lr.react_stack_bottom_frame.bind(Lr),ar={react_stack_bottom_frame:function(c){return c.render()}},Sr=ar.react_stack_bottom_frame.bind(ar),rl={react_stack_bottom_frame:function(c){var d=c._init;return d(c._payload)}},il=rl.react_stack_bottom_frame.bind(rl),qr=0;if(typeof performance=="object"&&typeof performance.now=="function")var Eo=performance,rs=function(){return Eo.now()};else{var In=Date;rs=function(){return In.now()}}var Mn=4,ii=0,Yr=1,_i=2,Hi=3,Vr=4,Bn=5,Wl=14,bi=null,gl={},Vi={},is={},_u={},bs=!1,ka=!1,pl=!1,co=0,Zo=!1;Fs(),Fs(),_g.prerender=function(c,d){return new Promise(function(E,D){var K=d?d.onHeaders:void 0,ie;K&&(ie=function(nt){K(new Headers(nt))});var Ce=be(d?d.identifierPrefix:void 0,d?d.unstable_externalRuntimeSrc:void 0,d?d.bootstrapScriptContent:void 0,d?d.bootstrapScripts:void 0,d?d.bootstrapModules:void 0),Be=Oi(c,Ce,he(Ce,void 0,d?d.unstable_externalRuntimeSrc:void 0,d?d.importMap:void 0,ie,d?d.maxHeadersLength:void 0),pe(d?d.namespaceURI:void 0),d?d.progressiveChunkSize:void 0,d?d.onError:void 0,function(){var nt=new ReadableStream({type:"bytes",pull:function(Zt){ds(Be,Zt)},cancel:function(Zt){Be.destination=null,gi(Be,Zt)}},{highWaterMark:0});nt={postponed:Ai(Be),prelude:nt},E(nt)},void 0,void 0,D,d?d.onPostpone:void 0);if(d&&d.signal){var vt=d.signal;if(vt.aborted)gi(Be,vt.reason);else{var Ke=function(){gi(Be,vt.reason),vt.removeEventListener("abort",Ke)};vt.addEventListener("abort",Ke)}}fl(Be)})},_g.renderToReadableStream=function(c,d){return new Promise(function(E,D){var K,ie,Ce=new Promise(function(Qt,Ot){ie=Qt,K=Ot}),Be=d?d.onHeaders:void 0,vt;Be&&(vt=function(Qt){Be(new Headers(Qt))});var Ke=be(d?d.identifierPrefix:void 0,d?d.unstable_externalRuntimeSrc:void 0,d?d.bootstrapScriptContent:void 0,d?d.bootstrapScripts:void 0,d?d.bootstrapModules:void 0),nt=Ro(c,Ke,he(Ke,d?d.nonce:void 0,d?d.unstable_externalRuntimeSrc:void 0,d?d.importMap:void 0,vt,d?d.maxHeadersLength:void 0),pe(d?d.namespaceURI:void 0),d?d.progressiveChunkSize:void 0,d?d.onError:void 0,ie,function(){var Qt=new ReadableStream({type:"bytes",pull:function(Ot){ds(nt,Ot)},cancel:function(Ot){nt.destination=null,gi(nt,Ot)}},{highWaterMark:0});Qt.allReady=Ce,E(Qt)},function(Qt){Ce.catch(function(){}),D(Qt)},K,d?d.onPostpone:void 0,d?d.formState:void 0);if(d&&d.signal){var Zt=d.signal;if(Zt.aborted)gi(nt,Zt.reason);else{var jt=function(){gi(nt,Zt.reason),Zt.removeEventListener("abort",jt)};Zt.addEventListener("abort",jt)}}fl(nt)})},_g.resume=function(c,d,E){return new Promise(function(D,K){var ie,Ce,Be=new Promise(function(Zt,jt){Ce=Zt,ie=jt}),vt=Kr(c,d,he(d.resumableState,E?E.nonce:void 0,void 0,void 0,void 0,void 0),E?E.onError:void 0,Ce,function(){var Zt=new ReadableStream({type:"bytes",pull:function(jt){ds(vt,jt)},cancel:function(jt){vt.destination=null,gi(vt,jt)}},{highWaterMark:0});Zt.allReady=Be,D(Zt)},function(Zt){Be.catch(function(){}),K(Zt)},ie,E?E.onPostpone:void 0);if(E&&E.signal){var Ke=E.signal;if(Ke.aborted)gi(vt,Ke.reason);else{var nt=function(){gi(vt,Ke.reason),Ke.removeEventListener("abort",nt)};Ke.addEventListener("abort",nt)}}fl(vt)})},_g.resumeAndPrerender=function(c,d,E){return new Promise(function(D,K){var ie=Cr(c,d,he(d.resumableState,void 0,void 0,void 0,void 0,void 0),E?E.onError:void 0,function(){var vt=new ReadableStream({type:"bytes",pull:function(Ke){ds(ie,Ke)},cancel:function(Ke){ie.destination=null,gi(ie,Ke)}},{highWaterMark:0});vt={postponed:Ai(ie),prelude:vt},D(vt)},void 0,void 0,K,E?E.onPostpone:void 0);if(E&&E.signal){var Ce=E.signal;if(Ce.aborted)gi(ie,Ce.reason);else{var Be=function(){gi(ie,Ce.reason),Ce.removeEventListener("abort",Be)};Ce.addEventListener("abort",Be)}}fl(ie)})},_g.version="19.2.0"})()),_g}var z2;function UA(){if(z2)return wg;z2=1;var n,e;return process.env.NODE_ENV==="production"?(n=BA(),e=zA()):(n=HA(),e=WA()),wg.version=n.version,wg.renderToString=n.renderToString,wg.renderToStaticMarkup=n.renderToStaticMarkup,wg.renderToReadableStream=e.renderToReadableStream,wg.resume=e.resume,wg}var ZC=UA();const s1=M1(ZC);function hp(n,e,t){return e!==void 0&&n<e?e:t!==void 0&&n>t?t:n}const kg={_canvas:null,_cache:new Map,_fontCache:{value:"",timestamp:0},_charWidthMap:new Map,clearCache(){this._cache.clear(),this._canvas=null,this._fontCache={value:"",timestamp:0},this._charWidthMap.clear()},getDefaultFont(){const n=Date.now();if(this._fontCache.value&&n-this._fontCache.timestamp<3e5)return this._fontCache.value;try{const e=getComputedStyle(document.documentElement).getPropertyValue("--Font").trim()||"400 14px pretendard";return this._fontCache={value:e,timestamp:n},e}catch{return"400 14px pretendard"}},measureCharWidth(n,e){var i,o,l,a,u,h;const t=`${n}|${e}`;if(this._charWidthMap.has(t))return this._charWidthMap.get(t);try{this._canvas||(this._canvas=document.createElement("canvas"));const y=this._canvas.getContext("2d");if(y){y.font=e;const x=y.measureText(n).width;return this._charWidthMap.set(t,x),x}}catch{}let r;return n===" "?r=parseInt(((i=e.match(/(\d+)px/))==null?void 0:i[1])||"14")/3:/^[A-Z]$/.test(n)?r=parseInt(((o=e.match(/(\d+)px/))==null?void 0:o[1])||"14")*.67:/^[a-z]$/.test(n)?r=parseInt(((l=e.match(/(\d+)px/))==null?void 0:l[1])||"14")*.5:/^\d$/.test(n)?r=parseInt(((a=e.match(/(\d+)px/))==null?void 0:a[1])||"14")*.6:/^[.,;:!?]$/.test(n)?r=parseInt(((u=e.match(/(\d+)px/))==null?void 0:u[1])||"14")*.25:r=parseInt(((h=e.match(/(\d+)px/))==null?void 0:h[1])||"14")*.67,this._charWidthMap.set(t,r),r},extractTextFromNode(n){if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return`${n}`;if(Array.isArray(n))return n.map(e=>this.extractTextFromNode(e)).join("");if(N.isValidElement(n))try{const t=ZC.renderToString(n).replace(/<[^>]*>/g,""),r=document.createElement("div");return r.innerHTML=t,r.textContent||""}catch{return n.props&&n.props.children?this.extractTextFromNode(n.props.children):""}return""},measureTextWidth(n,e){var o;if(!n)return 0;const t=e||this.getDefaultFont(),r=`${n}|${t}`,i=this._cache.get(r);if(i!==void 0)return i;try{this._canvas||(this._canvas=document.createElement("canvas"));const l=this._canvas.getContext("2d");if(l){l.font=t;const a=l.measureText(n),u=Math.ceil(a.width);return this._cache.size>=300&&[...this._cache.keys()].slice(0,50).forEach(y=>this._cache.delete(y)),this._cache.set(r,u),u}}catch{}try{const l=document.createElement("span");l.style.font=t,l.style.position="absolute",l.style.visibility="hidden",l.style.whiteSpace="nowrap",l.textContent=n,document.body.appendChild(l);const a=Math.ceil(l.getBoundingClientRect().width);return document.body.removeChild(l),this._cache.set(r,a),a}catch{}try{let l=0;for(let u=0;u<n.length;u++)l+=this.measureCharWidth(n[u],t);l*=.95;const a=Math.ceil(l);return this._cache.set(r,a),a}catch{}try{const l=parseInt(((o=t.match(/(\d+)px/))==null?void 0:o[1])||"14");let a=0;for(let h=0;h<n.length;h++){const y=n[h];y===" "?a+=.33:/^[A-Z]$/.test(y)?a+=.67:/^[a-z]$/.test(y)?a+=.5:/^\d$/.test(y)?a+=.6:/^[.,;:!?]$/.test(y)?a+=.25:a+=.67}const u=Math.ceil(a*l);return this._cache.set(r,u),u}catch{const a=n.length*10;return this._cache.set(r,a),a}},measureTextWithElementStyle(n,e){if(!e)return 0;try{const t=window.getComputedStyle(n),r=t.getPropertyValue("--Font").trim()||`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`;return this.measureTextWidth(e,r)}catch{return this.measureTextWidth(e)}},measureReactNodeWidth(n){const e=this.extractTextFromNode(n);return this.measureTextWidth(e)},measureRenderedOptionWidth(n,e){if(n==null)return 0;const t=e(n),r=this.extractTextFromNode(t);return this.measureTextWidth(r)},calculateOptimalSelectWidth({elementRef:n,options:e=[],selectedOption:t=null,selectedOptions:r=[],placeholder:i="",optionRenderer:o,type:l="Primary",isMulti:a=!1}){if(!n.current)return 200;try{let u=0;if(e&&e.length>0){const _=[...e.length>0?[e[0]]:[],...e.length>1?[e[e.length-1]]:[],...e.length>10?Array.from({length:8},(R,I)=>e[Math.floor(I*e.length/8)]):e,...e.length>20?Array.from({length:5},()=>e[Math.floor(Math.random()*e.length)]):[]],S=Array.from(new Set(_.filter(Boolean)));for(const R of S){if(!R)continue;const I=this.measureRenderedOptionWidth(R,o);u=Math.max(u,I)}}let h=0;if(!a&&t)h=this.measureRenderedOptionWidth(t,o);else if(a&&r&&r.length){if(r.length===1)h=this.measureRenderedOptionWidth(r[0],o);else if(h=this.measureTextWidth(`${r.length} selected`),r.length>0){let _=0;for(const S of r){const R=this.measureRenderedOptionWidth(S,o);_=Math.max(_,R)}h=Math.max(h,_)}}let y=0;i&&(y=this.measureReactNodeWidth(i));const w=Math.max(u,h,y,50);if(n.current){const _=window.getComputedStyle(n.current),S=parseFloat(_.paddingLeft||"0")+parseFloat(_.paddingRight||"0"),R=parseFloat(_.borderLeftWidth||"0")+parseFloat(_.borderRightWidth||"0"),I=l==="Primary"?30:20,O=a?24:0,P=Math.ceil(w*.05)+10;return Math.ceil(w+S+R+I+O+P)}return w+60}catch{return 200}}};function XC(n,e){const t=Dn.c(5),[r,i]=N.useState(0);let o,l;return t[0]!==r||t[1]!==n||t[2]!==e?(o=()=>{const a=()=>{const h=n.current,y=e.current;if(!h||!y)return i(0);const x=h.getBoundingClientRect(),w=y.getBoundingClientRect(),_=Math.max(0,Math.round(x.right-w.left));_!==r&&i(_)};a();const u=new ResizeObserver(a);return n.current&&u.observe(n.current),e.current&&u.observe(e.current),window.addEventListener("resize",a),()=>{u.disconnect(),window.removeEventListener("resize",a)}},l=[n,e,r],t[0]=r,t[1]=n,t[2]=e,t[3]=o,t[4]=l):(o=t[3],l=t[4]),N.useEffect(o,l),r}var oc=(n=>(n.E="East",n.N="North",n.S="South",n.W="West",n))(oc||{}),L1=(n=>(n.E="East",n.EN="EastNorth",n.ES="EastSouth",n.N="North",n.NE="NorthEast",n.NW="NorthWest",n.S="South",n.SE="SouthEast",n.SW="SouthWest",n.W="West",n.WN="WestNorth",n.WS="WestSouth",n))(L1||{});function ym(n,e,t,r){if(!n.current||!e.current)return;const i=n.current.getBoundingClientRect(),o=e.current.getBoundingClientRect();let l={bottom:void 0,left:void 0,right:void 0,top:void 0};switch(t){case"North":l=o?{bottom:window.innerHeight-i.top,left:i.left+i.width/2-o.width/2}:{bottom:window.innerHeight-i.top,left:i.left};break;case"NorthWest":l={bottom:window.innerHeight-i.top,left:i.left};break;case"NorthEast":l={bottom:window.innerHeight-i.top,right:window.innerWidth-i.left-i.width};break;case"South":l=o?{top:i.bottom,left:i.left+i.width/2-o.width/2}:{top:i.bottom,left:i.left};break;case"SouthWest":l={top:i.bottom,left:i.left};break;case"SouthEast":l={top:i.bottom,right:window.innerWidth-i.left-i.width};break;case"East":l=o?{top:i.top+i.height/2-o.height/2,left:i.right}:{top:i.top,left:i.right};break;case"EastNorth":l={bottom:window.innerHeight-i.top-i.height,left:i.right};break;case"EastSouth":l={top:i.top,left:i.right};break;case"West":l=o?{top:i.top+i.height/2-o.height/2,right:window.innerWidth-i.left}:{top:i.top,right:window.innerWidth-i.left};break;case"WestNorth":l={bottom:window.innerHeight-i.top-i.height,right:window.innerWidth-i.left};break;case"WestSouth":l={top:i.top,right:window.innerWidth-i.left};break;default:l={top:i.top,left:i.left}}r&&(r.x&&l.left&&(l.left+=r.x),r.y&&l.top&&(l.top+=r.y)),l=JC(l,o),e.current.style.top=l.top+"px",e.current.style.left=l.left+"px",e.current.style.bottom=l.bottom+"px",e.current.style.right=l.right+"px"}function KC(n,e,t,r){if(!n)return;const i=e instanceof HTMLElement?e:e==null?void 0:e.current;if(!i)return;const o=n.getBoundingClientRect(),l=i.getBoundingClientRect();let a={bottom:void 0,left:void 0,right:void 0,top:void 0};switch(t){case"North":a=l?{bottom:window.innerHeight-o.top,left:o.left+o.width/2-l.width/2}:{bottom:window.innerHeight-o.top,left:o.left};break;case"NorthWest":a={bottom:window.innerHeight-o.top,left:o.left};break;case"NorthEast":a={bottom:window.innerHeight-o.top,right:window.innerWidth-o.left-o.width};break;case"South":a=l?{top:o.bottom,left:o.left+o.width/2-l.width/2}:{top:o.bottom,left:o.left};break;case"SouthWest":a={top:o.bottom,left:o.left};break;case"SouthEast":a={top:o.bottom,right:window.innerWidth-o.left-o.width};break;case"East":a=l?{top:o.top+o.height/2-l.height/2,left:o.right}:{top:o.top,left:o.right};break;case"EastNorth":a={bottom:window.innerHeight-o.top-o.height,left:o.right};break;case"EastSouth":a={top:o.top,left:o.right};break;case"West":a=l?{top:o.top+o.height/2-l.height/2,right:window.innerWidth-o.left}:{top:o.top,right:window.innerWidth-o.left};break;case"WestNorth":a={bottom:window.innerHeight-o.top-o.height,right:window.innerWidth-o.left};break;case"WestSouth":a={top:o.top,right:window.innerWidth-o.left};break;default:a={top:o.top,left:o.left}}return r&&(r.x&&a.left&&(a.left+=r.x),r.y&&a.top&&(a.top+=r.y)),a=JC(a,l),i.style.top=a.top+"px",i.style.left=a.left+"px",i.style.bottom=a.bottom+"px",i.style.right=a.right+"px",a}function JC(n,e,t=10){return n.left&&n.left<t&&(n.left=t),n.right&&n.right<t&&(n.right=t),n.top&&n.top<t&&(n.top=t),n.bottom&&n.bottom<t&&(n.bottom=t),n.left&&e&&n.left+e.width>window.innerWidth-t&&(n.left=window.innerWidth-e.width-t),n.right&&e&&n.right+e.width>window.innerWidth-t&&(n.right=window.innerWidth-e.width-t),n.top&&e&&n.top+e.height>window.innerHeight-t&&(n.top=window.innerHeight-e.height-t),n.bottom&&e&&n.bottom+e.height>window.innerHeight-t&&(n.bottom=window.innerHeight-e.height-t),n}function Ag(){const n={preventDefault:!1};return{event:n,e:{preventDefault:()=>n.preventDefault=!0}}}const GA="_Tooltip_1khnz_1",YA="_Arrow_1khnz_17",H2={Tooltip:GA,Arrow:YA},QC=n=>{const e=Dn.c(28),{tooltip:t,targetRef:r,delay:i,distance:o,direction:l}=n,a=i===void 0?0:i,u=o===void 0?10:o,h=l===void 0?oc.S:l,[y,x]=N.useState(!1),w=N.useRef(null),_=N.useRef(null),S=N.useRef(null);let R;e[0]!==a||e[1]!==h||e[2]!==u||e[3]!==r?(R=()=>{x(!0),S.current&&(clearTimeout(S.current),S.current=null);const fe=setTimeout(()=>requestAnimationFrame(()=>W2(r,w,_,u,h)),a);S.current=fe},e[0]=a,e[1]=h,e[2]=u,e[3]=r,e[4]=R):R=e[4];const I=R;let O;e[5]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{S.current&&(clearTimeout(S.current),S.current=null),x(!1)},e[5]=O):O=e[5];const P=O;let Y,z;e[6]!==I||e[7]!==r?(Y=()=>{const fe=r.current;if(fe)return fe.addEventListener("mouseenter",I),fe.addEventListener("mouseleave",P),()=>{fe.removeEventListener("mouseenter",I),fe.removeEventListener("mouseleave",P)}},z=[r,P,I],e[6]=I,e[7]=r,e[8]=Y,e[9]=z):(Y=e[8],z=e[9]),N.useEffect(Y,z);let W;e[10]!==h||e[11]!==u||e[12]!==r?(W=()=>{W2(r,w,_,u,h)},e[10]=h,e[11]=u,e[12]=r,e[13]=W):W=e[13];const B=W;let ee,H;e[14]!==y||e[15]!==B||e[16]!==r?(ee=()=>{if(!r.current||!w.current||!y)return;const fe=r.current.parentElement;let ae=fe;for(;ae;)ae.addEventListener("scroll",B),ae=ae.parentElement;return()=>{let j=fe;for(;j;)j.removeEventListener("scroll",B),j=j.parentElement}},H=[r,B,y],e[14]=y,e[15]=B,e[16]=r,e[17]=ee,e[18]=H):(ee=e[17],H=e[18]),N.useEffect(ee,H);let V;e[19]!==B?(V=()=>{B()},e[19]=B,e[20]=V):V=e[20];let de;e[21]!==B||e[22]!==t?(de=[t,B],e[21]=B,e[22]=t,e[23]=de):de=e[23],N.useEffect(V,de);let Z;e:switch(typeof t){case"boolean":{Z=!0;break e}case"string":{Z=t==="";break e}case"number":{Z=!1;break e}default:Z=!t}if(!y||Z)return null;let ne;if(e[24]!==t){let fe;e[26]===Symbol.for("react.memo_cache_sentinel")?(fe=gt.clsx(H2.Tooltip,"NoSelect"),e[26]=fe):fe=e[26];let ae;e[27]===Symbol.for("react.memo_cache_sentinel")?(ae=k.jsx("div",{ref:_,className:H2.Arrow}),e[27]=ae):ae=e[27],ne=su.createPortal(k.jsxs("div",{ref:w,className:fe,children:[t,ae]}),document.body),e[24]=t,e[25]=ne}else ne=e[25];return ne},c0="5px solid var(--ATooltip_background-color)";function W2(n,e,t,r,i=oc.S){if(!n.current||!e.current||!t.current)return;const o=VA(n.current,e.current,r,i);if(!o)return;const{left:l,top:a,arrowDir:u,arrow:h}=o;e.current.style.left=`${l}px`,e.current.style.top=`${a}px`,e.current.style.visibility="visible",e.current.style.opacity="1",t.current.style.border="5px solid transparent",u===oc.N?(t.current.style.top="-9px",t.current.style.left=`calc(50% - 5px + ${h.left??0}px)`,t.current.style.borderBottom=c0):u===oc.S?(t.current.style.top="100%",t.current.style.left=`calc(50% - 5px + ${h.left??0}px)`,t.current.style.borderTop=c0):u===oc.W?(t.current.style.top=`calc(50% - 5px + ${h.top??0}px)`,t.current.style.left="-9px",t.current.style.borderRight=c0):u===oc.E&&(t.current.style.top=`calc(50% - 5px + ${h.top??0}px)`,t.current.style.left="100%",t.current.style.borderLeft=c0)}const Gh=5;function VA(n,e,t,r){const i=n.getBoundingClientRect(),o=e.getBoundingClientRect();function l(){if(window.innerHeight-i.bottom>o.height+t){const y=i.bottom+t,x=i.left+(i.width-o.width)/2,w=hp(x,Gh,window.innerWidth-Gh-o.width),_=oc.N;return{left:w,top:y,arrowDir:_,arrow:{left:x-w}}}}function a(){if(i.top>o.height+t){const y=i.top-o.height-t,x=i.left+(i.width-o.width)/2,w=hp(x,Gh,window.innerWidth-Gh-o.width),_=oc.S;return{left:w,top:y,arrowDir:_,arrow:{left:x-w}}}}function u(){if(window.innerWidth-i.right>o.width+t){const y=i.right+t,x=i.top+(i.height-o.height)/2,w=hp(x,Gh,window.innerHeight-Gh-o.height),_=oc.W;return{left:y,top:w,arrowDir:_,arrow:{top:x-w}}}}function h(){if(i.left>o.width+t){const y=i.left-o.width-t,x=i.top+(i.height-o.height)/2,w=hp(x,Gh,window.innerHeight-Gh-o.height),_=oc.E;return{left:y,top:w,arrowDir:_,arrow:{top:x-w}}}}if(r===oc.E)return u()||h()||l()||a();if(r===oc.S)return l()||a()||u()||h();if(r===oc.W)return h()||u()||l()||a();if(r===oc.N)return a()||l()||u()||h()}const ZA="_ABase_1ilav_1",XA="_UseDimming_1ilav_6",KA="_Dimmer_1ilav_6",JA="_Spinner_1ilav_9",QA="_Dimmed_1ilav_12",qA="_HasProgress_1ilav_18",jA="_Skeleton_1ilav_21",$A="_IsDimmed_1ilav_52",eT="_IsLoading_1ilav_57",tT="_IsDisabled_1ilav_62",Sg={ABase:ZA,UseDimming:XA,Dimmer:KA,Spinner:JA,Dimmed:QA,HasProgress:qA,Skeleton:jA,"skeleton-loading":"_skeleton-loading_1ilav_1",IsDimmed:$A,IsLoading:eT,IsDisabled:tT},Gi=n=>{const e=Dn.c(59);let t,r,i,o,l,a,u,h,y,x,w,_,S,R,I;e[0]!==n?({children:i,abaseRef:r,abaseCallbackRef:t,isDisabled:u,isPending:y,isLoading:h,isDimmed:l,tooltip:a,tooltipDistance:_,tooltipDelay:S,tooltipDirection:R,progress:x,ProgressRenderer:I,progressProps:w,...o}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S,e[14]=R,e[15]=I):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13],R=e[14],I=e[15]);const O=_===void 0?10:_,P=S===void 0?0:S,Y=R===void 0?oc.S:R,z=I===void 0?nT:I,W=N.useRef(null),B=r??W;let ee;e:{if(typeof u=="string"&&u!==""){ee=u;break e}else if(a!==void 0){ee=a;break e}ee=""}const H=ee,V=u||h||l,de=u!==void 0||h!==void 0||l!==void 0,Z=typeof x=="number"&&h;let te;e:{if(!y){te=o.style;break e}let J;e[16]!==o.style?(J=o.style??{},e[16]=o.style,e[17]=J):J=e[17];const pe=J;let Te;e[18]!==i||e[19]!==pe.height||e[20]!==pe.width?(Te={},!pe.width&&!i&&(Te.width="100%"),!pe.height&&!i&&(Te.height="1.25em"),e[18]=i,e[19]=pe.height,e[20]=pe.width,e[21]=Te):Te=e[21];let Fe;e[22]!==Te||e[23]!==pe?(Fe=Object.keys(Te).length?{...Te,...pe}:pe,e[22]=Te,e[23]=pe,e[24]=Fe):Fe=e[24],te=Fe}const ne=te,fe=t||B;let ae;e[25]!==o.className||e[26]!==Z||e[27]!==V||e[28]!==y||e[29]!==de?(ae=gt.clsx(o.className,Sg.ABase,de&&Sg.UseDimming,V&&Sg.Dimmed,Z&&Sg.HasProgress,y&&Sg.Skeleton),e[25]=o.className,e[26]=Z,e[27]=V,e[28]=y,e[29]=de,e[30]=ae):ae=e[30];const j=!y&&i;let re;e[31]!==l||e[32]!==Z||e[33]!==u||e[34]!==h||e[35]!==de?(re=de&&k.jsx("div",{className:gt.sclsx(Sg,"Dimmer",u&&"IsDisabled",h&&"IsLoading",l&&"IsDimmed",Z&&"HasProgress")}),e[31]=l,e[32]=Z,e[33]=u,e[34]=h,e[35]=de,e[36]=re):re=e[36];let he;e[37]!==z||e[38]!==Z||e[39]!==u||e[40]!==h||e[41]!==x||e[42]!==w?(he=h&&k.jsxs("div",{className:gt.sclsx(Sg,"Spinner",u&&"IsDisabled",h&&"IsLoading",Z&&"HasProgress"),children:[k.jsx(ho,{icon:"Spinner"}),k.jsx(N.Activity,{mode:Z?"visible":"hidden",children:k.jsx(z,{progress:x??0,...w})})]}),e[37]=z,e[38]=Z,e[39]=u,e[40]=h,e[41]=x,e[42]=w,e[43]=he):he=e[43];let be;e[44]!==B||e[45]!==H||e[46]!==P||e[47]!==Y||e[48]!==O?(be=k.jsx(QC,{delay:P,direction:Y,distance:O,targetRef:B,tooltip:H}),e[44]=B,e[45]=H,e[46]=P,e[47]=Y,e[48]=O,e[49]=be):be=e[49];let le;return e[50]!==o||e[51]!==ne||e[52]!==he||e[53]!==be||e[54]!==fe||e[55]!==ae||e[56]!==j||e[57]!==re?(le=k.jsxs("div",{...o,ref:fe,style:ne,className:ae,children:[j,re,he,be]}),e[50]=o,e[51]=ne,e[52]=he,e[53]=be,e[54]=fe,e[55]=ae,e[56]=j,e[57]=re,e[58]=le):le=e[58],le},nT=n=>{const e=Dn.c(6);let t,r;e[0]!==n?({progress:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;return e[3]!==t||e[4]!==r?(i=k.jsx(VC,{progress:t,...r}),e[3]=t,e[4]=r,e[5]=i):i=e[5],i},rT="_AButton_zrw2c_1",iT="_Primary_zrw2c_14",oT="_Secondary_zrw2c_29",lT="_Alter_zrw2c_44",sT="_AIconButton_zrw2c_60",aT="_AThemeButton_zrw2c_101",Ep={AButton:rT,Primary:iT,Secondary:oT,Alter:lT,AIconButton:sT,AThemeButton:aT},cT=["Primary","Secondary","Alter","Raw"],Ic=n=>{const e=Dn.c(17);let t,r,i,o;e[0]!==n?({type:o,onClick:r,noInteractive:i,...t}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o):(t=e[1],r=e[2],i=e[3],o=e[4]);const l=o===void 0?"Primary":o,a=t.isDisabled||t.isLoading;let u;e[5]!==r||e[6]!==a?(u=w=>{a||r==null||r(w)},e[5]=r,e[6]=a,e[7]=u):u=e[7];const h=u;let y;e[8]!==t.className||e[9]!==i||e[10]!==l||e[11]!==a?(y=gt.clsx(t.className,Ep.AButton,l!=="Raw"&&Ep[l],"IsClickable",!a&&!i&&"IsInteractive"),e[8]=t.className,e[9]=i,e[10]=l,e[11]=a,e[12]=y):y=e[12];let x;return e[13]!==t||e[14]!==h||e[15]!==y?(x=k.jsx(Gi,{...t,className:y,onClick:h}),e[13]=t,e[14]=h,e[15]=y,e[16]=x):x=e[16],x},uT=["Primary","Secondary","Raw"],ba=n=>{const e=Dn.c(29);let t,r,i,o,l,a,u,h,y;e[0]!==n?({icon:o,iconSize:l,type:h,onClick:i,isDisabled:a,isLoading:u,tooltip:y,className:r,...t}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9]);const x=h===void 0?"Primary":h,w=a||u;let _;e[10]!==i||e[11]!==w?(_=Y=>{w||i==null||i(Y)},e[10]=i,e[11]=w,e[12]=_):_=e[12];const S=_;let R;e:{if(bm.includes(o)){let Y;e[13]!==o||e[14]!==l?(Y=k.jsx(ho,{icon:o,size:l}),e[13]=o,e[14]=l,e[15]=Y):Y=e[15],R=Y;break e}R=o}const I=R;let O;e[16]!==r||e[17]!==a||e[18]!==u||e[19]!==x?(O=gt.clsx(Ep.AIconButton,!a&&!u&&"IsClickable",x!=="Raw"&&Ep[x],r),e[16]=r,e[17]=a,e[18]=u,e[19]=x,e[20]=O):O=e[20];let P;return e[21]!==t||e[22]!==I||e[23]!==a||e[24]!==u||e[25]!==S||e[26]!==O||e[27]!==y?(P=k.jsx(Gi,{className:O,isDisabled:a,isLoading:u,tooltip:y,onClick:S,...t,children:I}),e[21]=t,e[22]=I,e[23]=a,e[24]=u,e[25]=S,e[26]=O,e[27]=y,e[28]=P):P=e[28],P};function Ho(n,e){n!==void 0&&n.length===1&&(e=n[0]);const t=N.useState(e);let r;return n===void 0||n.length===1?r=t:r=n,r}const fT="_AWrap_u1f1h_1",dT="_Label_u1f1h_8",hT="_Asterisk_u1f1h_19",gT="_HelperTextConatiner_u1f1h_23",pT="_HelperText_u1f1h_23",qg={AWrap:fT,Label:dT,Asterisk:hT,HelperTextConatiner:gT,HelperText:pT,Error:"_Error_u1f1h_38"},vT=["Default","Error"],Bg=n=>{if(!n)return[{},{}];const e={},t={},r=["errorMessage","helperText","label","labelProps","wrapId","wrapProps","wrapType"];for(const i in n)r.includes(i)?e[i]=n[i]:t[i]=n[i];return[e,t]},lg=n=>{const{wrapProps:e,errorMessage:t,helperText:r,wrapType:i="Default",label:o,labelProps:l,wrapId:a,children:u}=n,h=N.useRef(null),[y,x]=N.useState({height:0}),w=N.useRef(null),[_,S]=N.useMemo(()=>{let I=r,O=i;if(Array.isArray(t)){const P=t.filter(Boolean);P.length>0&&([I,O]=[P,"Error"])}else t&&([I,O]=[t,"Error"]);return Array.isArray(I)&&(O!=="Error"&&(I=I.filter(Boolean)),I=I.map((P,Y)=>k.jsxs(N.Fragment,{children:[P,k.jsx("br",{})]},er.key(Y)))),[I,O]},[r,t,i]);N.useEffect(()=>{if(!_||!h.current)x({minHeight:0});else{const I=h.current.getBoundingClientRect();x({minHeight:I.height,marginTop:I.height===0?0:6})}},[_]);const R=N.useMemo(()=>{switch(typeof(l==null?void 0:l.prefix)){case"string":return k.jsx(ho,{height:"1rem",icon:l.prefix,width:"1rem"});case"boolean":return k.jsx(ho,{height:10,icon:"Target",width:10});default:return l==null?void 0:l.prefix}},[l==null?void 0:l.prefix]);return k.jsxs("div",{...e,ref:w,className:gt.clsx(e==null?void 0:e.className,qg.AWrap),id:a,children:[o&&k.jsxs("div",{className:gt.clsx(qg.Label,"NoSelect",l==null?void 0:l.className),style:l==null?void 0:l.style,children:[l==null?void 0:l.leftAddon,R,o,(l==null?void 0:l.asterisk)&&k.jsx(Gi,{className:qg.Asterisk,tooltip:Nr.AWrap.Asterisk,children:"*"}),l==null?void 0:l.rightAddon]}),u,_!==void 0&&k.jsx("div",{className:gt.clsx(qg.HelperTextConatiner,"NoSelect"),style:y,children:k.jsx("div",{ref:h,className:gt.clsx(qg.HelperText,qg[S]),children:_})})]})},bT="_ASwitch_nlcij_1",yT="_Track_nlcij_6",mT="_Truthy_nlcij_13",xT="_Thumb_nlcij_17",j1={ASwitch:bT,Track:yT,Truthy:mT,Thumb:xT},qC=n=>{const e=Dn.c(33);let t,r;if(e[0]!==n){const{useCheck:W,...B}=n;r=W,t=Bg(B),e[0]=n,e[1]=t,e[2]=r}else t=e[1],r=e[2];const[i,o]=t;let l,a,u,h;e[3]!==i?({wrapId:a,wrapProps:u,labelProps:l,...h}=i,e[3]=i,e[4]=l,e[5]=a,e[6]=u,e[7]=h):(l=e[4],a=e[5],u=e[6],h=e[7]);const[y,x]=Ho(r,!1);let w;e[8]!==y||e[9]!==o||e[10]!==x?(w=W=>{var B;o.isDisabled||o.isLoading||(x==null||x(!y),(B=o.onClick)==null||B.call(o,W))},e[8]=y,e[9]=o,e[10]=x,e[11]=w):w=e[11];const _=w;let S;e[12]!==l||e[13]!==a||e[14]!==u||e[15]!==h?(S={wrapId:a,wrapProps:u,labelProps:l,...h},e[12]=l,e[13]=a,e[14]=u,e[15]=h,e[16]=S):S=e[16];let R;e[17]!==y?(R=gt.clsx(j1.Track,y&&j1.Truthy),e[17]=y,e[18]=R):R=e[18];let I;e[19]!==y?(I=gt.clsx(j1.Thumb,y&&j1.Truthy),e[19]=y,e[20]=I):I=e[20];let O;e[21]!==I?(O=k.jsx("div",{className:I}),e[21]=I,e[22]=O):O=e[22];let P;e[23]!==R||e[24]!==O?(P=k.jsx("div",{className:R,children:O}),e[23]=R,e[24]=O,e[25]=P):P=e[25];let Y;e[26]!==_||e[27]!==o||e[28]!==P?(Y=k.jsx(Gi,{...o,className:j1.ASwitch,onClick:_,children:P}),e[26]=_,e[27]=o,e[28]=P,e[29]=Y):Y=e[29];let z;return e[30]!==S||e[31]!==Y?(z=k.jsx(lg,{...S,children:Y}),e[30]=S,e[31]=Y,e[32]=z):z=e[32],z},wT={palette:{"mode-1":{"common-100":"#ffffff","common-0":"#000000","neutral-99":"#fcfcfc","neutral-94":"#efefef","neutral-89":"#e2e2e2","neutral-84":"#d6d6d6","neutral-79":"#c9c9c9","neutral-73":"#bababa","neutral-65":"#a5a5a5","neutral-54":"#898989","neutral-42":"#6b6b6b","neutral-30":"#4c4c4c","neutral-20":"#333333","neutral-15":"#2c2c2c","neutral-10":"#191919","neutral-5":"#0c0c0c","cool-neutral-99":"#fcfcfc","cool-neutral-94":"#efeff0","cool-neutral-89":"#e1e2e4","cool-neutral-84":"#d4d5d7","cool-neutral-79":"#c7c8cb","cool-neutral-73":"#b7b9bc","cool-neutral-65":"#a2a4a9","cool-neutral-54":"#85888e","cool-neutral-42":"#66696f","cool-neutral-30":"#494b4f","cool-neutral-20":"#303235","cool-neutral-10":"#18191a","cool-neutral-5":"#0c0c0c","red-99":"#fff9f9","red-95":"#ffe5e5","red-90":"#ffcccc","red-84":"#ffadad","red-76":"#ff8484","red-66":"#ff5151","red-53":"#ff0f0f","red-45":"#e50000","red-34":"#a80000","red-30":"#990000","red-24":"#7a0000","red-10":"#330000","green-99":"#fafffa","green-95":"#e5ffe8","green-90":"#ccffd1","green-84":"#adffb6","green-76":"#84ff90","green-66":"#51ff62","green-48":"#00f418","green-45":"#00e517","green-34":"#00a810","green-30":"#00990f","green-24":"#007a0c","green-10":"#003305","blue-99":"#fafdff","blue-95":"#e5f3ff","blue-90":"#cce6ff","blue-84":"#add7ff","blue-76":"#84c3ff","blue-66":"#51abff","blue-53":"#0f8bff","blue-45":"#0077e5","blue-34":"#0056a8","blue-30":"#004f99","blue-24":"#003f7a","blue-10":"#001a33","orange-99":"#fffcfa","orange-95":"#ffefe5","orange-90":"#ffdecc","orange-84":"#ffcbad","orange-76":"#ffb184","orange-66":"#ff9151","orange-53":"#ff670f","orange-45":"#e55400","orange-34":"#a83d00","orange-30":"#993800","orange-24":"#7a2c00","orange-10":"#331200","violet-99":"#fcfaff","violet-95":"#eee5ff","violet-90":"#dcccff","violet-84":"#c7adff","violet-76":"#ab84ff","violet-66":"#8852ff","violet-53":"#5b0fff","violet-45":"#4900e5","violet-34":"#3500a8","violet-28":"#2d008e","violet-24":"#26007a","violet-10":"#100033","cyan-99":"#faffff","cyan-95":"#e5fdff","cyan-90":"#ccfbff","cyan-84":"#adf9ff","cyan-76":"#84f6ff","cyan-66":"#51f3ff","cyan-50":"#00edff","cyan-45":"#00d6e5","cyan-40":"#00becc","cyan-30":"#008e99","cyan-21":"#00636b","cyan-10":"#002f33","pink-99":"#fffefa","pink-95":"#ffe5f5","pink-90":"#ffccea","pink-84":"#ffadde","pink-76":"#ff84ce","pink-66":"#ff51b9","pink-53":"#ff0f9f","pink-45":"#e5008a","pink-40":"#cc007a","pink-30":"#99005b","pink-21":"#6b0040","pink-10":"#33001e","lime-99":"#fcfffa","lime-95":"#eeffe5","lime-90":"#ddffcc","lime-84":"#c8ffad","lime-76":"#adff84","lime-66":"#8bff51","lime-49":"#53f900","lime-45":"#4ce500","lime-40":"#44cc00","lime-30":"#339900","lime-21":"#236b00","lime-10":"#113300","brand-b-color":"#386fff"}},semantic:{light:{"static-white":"common-100","static-black":"common-0","acent-brand":"brand-b-color","acent-brand-fill":"blue-95","label-normal":"neutral-20","label-strong":"neutral-5","label-neutral":"neutral-73","line-normal":"neutral-79","line-strong":"neutral-65","line-neutral":"neutral-89","background-normal":"common-100","elevation-0":"common-100","elevation-10":"neutral-94","elevation-20":"neutral-73","alert-warning":"orange-53","alert-success":"green-45","alert-danger":"red-45","inverse-label-normal":"neutral-84","inverse-label-strong":"neutral-99","inverse-label-neutral":"neutral-30","inverse-line-normal":"neutral-30","inverse-line-strong":"neutral-54","inverse-line-neutral":"neutral-20","inverse-elevation-0":"neutral-5","inverse-elevation-10":"neutral-10","inverse-elevation-20":"neutral-15"},dark:{"static-white":"common-100","static-black":"common-0","acent-brand":"brand-b-color","acent-brand-fill":"blue-10","label-normal":"neutral-84","label-strong":"neutral-99","label-neutral":"neutral-30","line-normal":"neutral-30","line-strong":"neutral-54","line-neutral":"neutral-20","background-normal":"neutral-5","elevation-0":"neutral-5","elevation-10":"neutral-10","elevation-20":"neutral-15","alert-warning":"orange-53","alert-success":"green-45","alert-danger":"red-45","inverse-label-normal":"neutral-20","inverse-label-strong":"neutral-5","inverse-label-neutral":"neutral-73","inverse-line-normal":"neutral-79","inverse-line-strong":"neutral-65","inverse-line-neutral":"neutral-89","inverse-elevation-0":"common-100","inverse-elevation-10":"neutral-94","inverse-elevation-20":"neutral-73"}}},sc=tg.cloneDeep(wT);er.keys(sc.semantic).forEach(n=>{const e=sc.semantic[n];er.keys(e).forEach(t=>{e[t]=`var(--${e[t]})`})});const _v=er.keys(sc.palette),jC=er.keys(sc.palette[_v[0]]);function CT(){return va.paletteMode}function _T(n,e=va.paletteMode){return sc.palette[e][n]}function ST(n){return Ev(n)}const j0=[];function $C(n){va.paletteMode=n,jC.forEach(e=>document.documentElement.style.setProperty(`--${e}`,sc.palette[n][e])),j0.forEach(e=>e(n))}function e3(n,e="all"){er.keys(n).forEach(r=>{const i=n[r];i!==void 0&&(document.documentElement.style.setProperty(`--${r}`,i),e==="all"?_v.forEach(o=>{sc.palette[o][r]=i}):sc.palette[e][r]=i)})}const m1=er.keys(sc.semantic),t3=er.keys(sc.semantic[m1[0]]);function ET(){return va.semanticMode}function AT(n,e=va.semanticMode){return sc.semantic[e][n]}function TT(n){return Ev(n)}const $0=[];function mm(n){va.semanticMode=n,document.documentElement.setAttribute("data-theme",n),t3.forEach(e=>document.documentElement.style.setProperty(`--${e}`,sc.semantic[n][e])),$0.forEach(e=>e(n)),va.save==="localStorage"?localStorage.setItem("semanticMode",n):va.save==="sessionStorage"&&sessionStorage.setItem("semanticMode",n)}function n3(n,e=va.semanticMode){er.keys(n).forEach(r=>{const i=n[r];i!==void 0&&(document.documentElement.style.setProperty(`--${r}`,i),e==="all"?m1.forEach(o=>{sc.semantic[o][r]=i}):sc.semantic[e][r]=i)})}const r3=["Body-background-color","Body-color","Body-transition","Font","Scrollbar-handle","Scrollbar-handle-hover","Scrollbar-handle-active","Scrollbar-track","Scrollbar-border-radius","Scrollbar-width","Transition","Transition-Enabled"],i3=["ABase_Dimming_background-color","ABase_Primary_Skeleton_background-color","ABase_Secondary_Skeleton_background-color"],o3=["ATooltip_background-color","ATooltip_color"],l3=["AButton_Primary_border","AButton_Primary_background-color","AButton_Primary_color","AButton_Primary_hover_border","AButton_Primary_hover_background-color","AButton_Primary_hover_color","AButton_Primary_active_border","AButton_Primary_active_background-color","AButton_Primary_active_color","AButton_Secondary_border","AButton_Secondary_background-color","AButton_Secondary_color","AButton_Secondary_hover_border","AButton_Secondary_hover_background-color","AButton_Secondary_hover_color","AButton_Secondary_active_border","AButton_Secondary_active_background-color","AButton_Secondary_active_color","AButton_Alter_border","AButton_Alter_background-color","AButton_Alter_color","AButton_Alter_hover_border","AButton_Alter_hover_background-color","AButton_Alter_hover_color","AButton_Alter_active_border","AButton_Alter_active_background-color","AButton_Alter_active_color"],s3=["AInput_Primary_background-color","AInput_Primary_border","AInput_Primary_color","AInput_Primary_hover_border","AInput_Primary_focus_background-color","AInput_Primary_focus_border","AInput_Primary_placeholder_color","AInput_Secondary_background-color","AInput_Secondary_border","AInput_Secondary_color","AInput_Secondary_hover_border","AInput_Secondary_focus_border","AInput_Secondary_placeholder_color","AInput_ReadOnly_background-color","AInput_ReadOnly_border","AInput_ReadOnly_color","AInput_Error_HelperText_color","AInput_Error_background-color","AInput_Error_border","AInput_Error_color","AInput_Error_placeholder_color"],a3=["ATextArea_Primary_background-color","ATextArea_Primary_border","ATextArea_Primary_color","ATextArea_Primary_hover_border","ATextArea_Primary_focus_background-color","ATextArea_Primary_focus_border","ATextArea_Secondary_background-color","ATextArea_Secondary_border","ATextArea_Secondary_color","ATextArea_Secondary_hover_border","ATextArea_Secondary_focus_border","ATextArea_ReadOnly_background-color","ATextArea_ReadOnly_border","ATextArea_ReadOnly_color","ATextArea_Error_background-color","ATextArea_Error_border","ATextArea_Error_color","ATextArea_Error_placeholder_color"],c3=["AEditor_Primary_background-color","AEditor_Primary_border","AEditor_Primary_color","AEditor_Primary_hover_border","AEditor_Primary_focus_background-color","AEditor_Primary_focus_border","AEditor_ReadOnly_background-color","AEditor_ReadOnly_border","AEditor_ReadOnly_hover_border","AEditor_ReadOnly_focus_border","AEditor_ReadOnly_color","AEditor_Error_background-color","AEditor_Error_border","AEditor_Error_hover_border","AEditor_Error_focus_border","AEditor_Error_color","AEditor_Error_placeholder_color","AEditor_Addon_Primary_background-color","AEditor_Addon_Primary_border","AEditor_Addon_Primary_color","AEditor_Addon_Secondary_background-color","AEditor_Addon_Secondary_border","AEditor_Addon_Secondary_color","AEditor_Addon_hover_background-color","AEditor_Addon_hover_color","AEditor_Addon_focus_border","AEditor_border-radius","AEditor_Select_border-radius","AEditor_Option_border-radius"],u3=["ACheckBox_color"],f3=["ADialog_Paper_background-color","ADialog_background-color","ADialog_border","ADialog_Action_background-color"],d3=["ASelect_Placeholder_color","ASelect_Primary_border","ASelect_Primary_hover_border","ASelect_Primary_Arrow_color","ASelect_Primary_Options_background-color","ASelect_Primary_Options_border","ASelect_Primary_Option_hover_background-color","ASelect_Primary_Option_active_background-color","ASelect_Primary_Option_Selected_background-color","ASelect_Secondary_border","ASelect_Secondary_hover_border","ASelect_Secondary_background-color","ASelect_Secondary_Arrow_color","ASelect_Secondary_Options_background-color","ASelect_Secondary_Options_border","ASelect_Secondary_Option_hover_background-color","ASelect_Secondary_Option_active_background-color","ASelect_Secondary_Option_Selected_background-color"],h3=["AMultiSelect_Placeholder_color","AMultiSelect_Primary_border","AMultiSelect_Primary_hover_border","AMultiSelect_Primary_Arrow_color","AMultiSelect_Primary_Options_background-color","AMultiSelect_Primary_Options_border","AMultiSelect_Primary_Option_hover_background-color","AMultiSelect_Primary_Option_active_background-color","AMultiSelect_Primary_Option_Selected_background-color","AMultiSelect_Secondary_border","AMultiSelect_Secondary_hover_border","AMultiSelect_Secondary_background-color","AMultiSelect_Secondary_Arrow_color","AMultiSelect_Secondary_Options_background-color","AMultiSelect_Secondary_Options_border","AMultiSelect_Secondary_Option_hover_background-color","AMultiSelect_Secondary_Option_active_background-color","AMultiSelect_Secondary_Option_Selected_background-color"],g3=["ATree_background-color","ATree_Indent_border","ATreeBodyHeader_border-bottom","ATreeItem_hover_background-color","ATreeItem_active_background-color","ATreeItem_select_background-color","ATreeItem_search_background-color","ATreeItem_search_border-top","ATreeItem_search_border-bottom","ATreeItem_select_color"],p3=["ASwitch_Track_Falsy_border","ASwitch_Track_Truthy_border","ASwitch_Thumb_border"],v3=["ATab_IndicatorTrack_Primary_border-bottom","ATab_Indicator_Primary_background-color","ATab_Option_Secondary_border","ATab_Option_Secondary_IsSelected_border-bottom","ATab_Option_Secondary_IsDisabled_border","ATab_IndicatorTrack_Tertiary_background-color","ATab_Indicator_Tertiary_background-color","ATab_Option_Tertiary_color","ATab_Option_Tertiary_IsSelected_color","ATab_Option_Quaternary_color","ATab_Option_Quaternary_IsSelected_color"],b3=["AFileBox_border","AFileBox_background-color","AFileBox_SelectedFile_color","AFileBox_Dropping_color"],y3=["AFileUploader_background-color","AFileUploader_brand_color","AFileUploader_disabled_color","AFileUploader_error_color","AFileUploader_text_color"],m3=["AListView_border-thin","AListView_border-thick"],x3=["AStepper_OutCircle_background-color","AStepper_OutCircle_IsOver_background-color","AStepper_InCircle_background-color","AStepper_InCircle_IsOver_background-color","AStepper_Line_background-color","AStepper_Line_IsOver_background-color"],w3=["ADatePicker_Anchor_border","ADatePicker_Anchor_color","ADatePicker_Anchor_Placeholder_color","ADatePicker_Anchor_hover_border","ADatePicker_Anchor_focus_border","ADatePicker_Anchor_Icon_Primary_color","ADatePicker_Anchor_Icon_Secondary_color","ADatePicker_background-color","ADatePicker_border","ADatePicker_StringInputContainer_background-color","ADatePicker_String_border","ADatePicker_Prev_background-color","ADatePicker_Prev_border-right","ADatePicker_Next_background-color","ADatePicker_Next_border-left","ADatePicker_Cell_color","ADatePicker_Cell_IsNotCurrentMonth_color","ADatePicker_Cell_IsDisabled_color","ADatePicker_Cell_IsSelected_background-color","ADatePicker_Cell_IsSelected_color","ADatePicker_Cell_IsHovered_background-color"],C3=["ADateRangePicker_Anchor_border","ADateRangePicker_Anchor_color","ADateRangePicker_Anchor_Placeholder_color","ADateRangePicker_Anchor_hover_border","ADateRangePicker_Anchor_focus_border","ADateRangePicker_Anchor_Icon_Primary_color","ADateRangePicker_Anchor_Icon_Secondary_color","ADateRangePicker_background-color","ADateRangePicker_border","ADateRangePicker_StringInputContainer_background-color","ADateRangePicker_String_border","ADateRangePicker_Prev_background-color","ADateRangePicker_Prev_border-right","ADateRangePicker_Next_background-color","ADateRangePicker_Next_border-left","ADateRangePicker_Cell_color","ADateRangePicker_Cell_IsNotCurrentMonth_color","ADateRangePicker_Cell_IsDisabled_color","ADateRangePicker_Cell_IsSelected_background-color","ADateRangePicker_Cell_IsSelected_color","ADateRangePicker_Cell_IsHovered_background-color"],_3=["AIconButton_Primary_color","AIconButton_Primary_border","AIconButton_Primary_background-color","AIconButton_Primary_hover_background-color","AIconButton_Primary_active_background-color","AIconButton_Secondary_color","AIconButton_Secondary_background-color","AIconButton_Secondary_hover_background-color","AIconButton_Secondary_active_background-color"],S3=["ATableBody_TRow_border-bottom","ATableBody_TRow_IsSelected_background-color","ATableBody_TRow_IsSelectable_hover_background-color","ATableBody_TH_color","ATableBody_TD_IsMarked_background-color","ATableBody_TD_IsMarked_color","ATableBody_Resizer_hover_ResizerCenter_background-color","ATableBody_Resizer_active_ResizerCenter_background-color","ATableBody_Resizer_active_ResizerOut_background-color","ATableBody_Resizer_active_ResizerIn_background-color","ATableFooter_Button_IsSelected_background-color","ATableFooter_Button_IsSelected_color","ATableFooter_Button_IsDisabled_color","ATableFilter_SubFilters_background-color","ATableFilter_SubFilters_border","ATableFilter_Icon_color","ATableFilter_Alert_color"],E3=["ADivideFrame_DividerInner_background-color"],A3=["AFloatMenu_background-color","AFloatMenu_hover_background-color","AFloatMenu_color","AFloatMenu_border"],T3=["ALoadingBorder_background-color","ALoadingBorder_ProgressBar_background-color","ALoadingBorder_Cover_background-color"],R3=["AWrap_Error_color"],I3=["ARadioSelect_RadioButton_border","ARadioSelect_RadioButton_InnerCircle_isChecked_background-color"],k3=["AChip_background-color","AChip_color","AChip_border","AChip_hover_background-color","AChip_hover_color","AChip_DeleteButton_border","AChip_DeleteButton_color","AChip_DeleteButton_hover_border","AChip_DeleteButton_hover_color"],RT=[...r3,...i3,...o3,...l3,...s3,...a3,...c3,...u3,...f3,...d3,...h3,...g3,...p3,...v3,...b3,...y3,...m3,...x3,...w3,...C3,..._3,...S3,...E3,...A3,...T3,...R3,...I3,...k3],Sv={"Body-background-color":"var(--background-normal)","Body-color":"var(--label-normal)","Body-transition":"background-color var(--Transition), color var(--Transition)",Font:"400 16px pretendard","Scrollbar-handle":"var(--label-neutral)","Scrollbar-handle-hover":"var(--label-normal)","Scrollbar-handle-active":"var(--label-strong)","Scrollbar-track":"var(--elevation-10)","Scrollbar-border-radius":"6px","Scrollbar-width":"12px",Transition:"300ms","Transition-Enabled":"1","ABase_Dimming_background-color":"var(--elevation-0)","ABase_Primary_Skeleton_background-color":"var(--elevation-10)","ABase_Secondary_Skeleton_background-color":"var(--line-neutral)","ATooltip_background-color":"var(--inverse-elevation-0)",ATooltip_color:"var(--inverse-label-strong)",AButton_Primary_border:"none","AButton_Primary_background-color":"var(--acent-brand)",AButton_Primary_color:"var(--static-white)",AButton_Primary_hover_border:"none","AButton_Primary_hover_background-color":"var(--acent-brand)",AButton_Primary_hover_color:"var(--static-white)",AButton_Primary_active_border:"none","AButton_Primary_active_background-color":"var(--acent-brand)",AButton_Primary_active_color:"var(--static-white)",AButton_Secondary_border:"1px solid var(--elevation-10)","AButton_Secondary_background-color":"var(--elevation-10)",AButton_Secondary_color:"var(--label-normal)",AButton_Secondary_hover_border:"1px solid var(--elevation-10)","AButton_Secondary_hover_background-color":"var(--elevation-10)",AButton_Secondary_hover_color:"var(--label-normal)",AButton_Secondary_active_border:"1px solid var(--elevation-10)","AButton_Secondary_active_background-color":"var(--elevation-10)",AButton_Secondary_active_color:"var(--label-normal)",AButton_Alter_border:"1px solid var(--line-normal)","AButton_Alter_background-color":"var(--elevation-0)",AButton_Alter_color:"var(--label-normal)",AButton_Alter_hover_border:"1px solid var(--line-normal)","AButton_Alter_hover_background-color":"var(--elevation-0)",AButton_Alter_hover_color:"var(--label-normal)",AButton_Alter_active_border:"1px solid var(--line-normal)","AButton_Alter_active_background-color":"var(--elevation-0)",AButton_Alter_active_color:"var(--label-normal)","AInput_Primary_background-color":"var(--elevation-0)",AInput_Primary_border:"1px solid var(--line-normal)",AInput_Primary_color:"var(--label-normal)",AInput_Primary_hover_border:"1px solid var(--line-strong)","AInput_Primary_focus_background-color":"var(--elevation-10)",AInput_Primary_focus_border:"1px solid var(--line-strong)",AInput_Primary_placeholder_color:"var(--label-neutral)","AInput_Secondary_background-color":"var(--elevation-0)",AInput_Secondary_border:"1px solid var(--line-normal)",AInput_Secondary_color:"var(--label-normal)",AInput_Secondary_hover_border:"1px solid var(--line-strong)",AInput_Secondary_focus_border:"1px solid var(--line-strong)",AInput_Secondary_placeholder_color:"var(--label-neutral)","AInput_ReadOnly_background-color":"var(--elevation-10)",AInput_ReadOnly_border:"none",AInput_ReadOnly_color:"var(--label-normal)",AInput_Error_HelperText_color:"var(--alert-danger)","AInput_Error_background-color":"inherit",AInput_Error_border:"1px solid var(--line-normal)",AInput_Error_color:"var(--label-normal)",AInput_Error_placeholder_color:"var(--label-neutral)","ATextArea_Primary_background-color":"var(--elevation-0)",ATextArea_Primary_border:"1px solid var(--line-normal)",ATextArea_Primary_color:"var(--label-normal)",ATextArea_Primary_hover_border:"1px solid var(--line-strong)","ATextArea_Primary_focus_background-color":"var(--elevation-10)",ATextArea_Primary_focus_border:"1px solid var(--line-strong)","ATextArea_Secondary_background-color":"var(--elevation-0)",ATextArea_Secondary_border:"1px solid var(--line-normal)",ATextArea_Secondary_color:"var(--label-normal)",ATextArea_Secondary_hover_border:"1px solid var(--line-strong)",ATextArea_Secondary_focus_border:"1px solid var(--line-strong)","ATextArea_ReadOnly_background-color":"var(--elevation-10)",ATextArea_ReadOnly_border:"none",ATextArea_ReadOnly_color:"var(--label-normal)","ATextArea_Error_background-color":"inherit",ATextArea_Error_border:"1px solid var(--line-normal)",ATextArea_Error_color:"var(--label-normal)",ATextArea_Error_placeholder_color:"var(--label-neutral)","AEditor_Primary_background-color":"var(--elevation-0)",AEditor_Primary_border:"1px solid var(--line-normal)",AEditor_Primary_color:"var(--label-normal)",AEditor_Primary_hover_border:"1px solid var(--line-strong)","AEditor_Primary_focus_background-color":"var(--elevation-0)",AEditor_Primary_focus_border:"1px solid var(--line-strong)","AEditor_ReadOnly_background-color":"var(--elevation-0)",AEditor_ReadOnly_border:"1px solid var(--line-normal)",AEditor_ReadOnly_hover_border:"1px solid var(--line-strong)",AEditor_ReadOnly_focus_border:"1px solid var(--line-strong)",AEditor_ReadOnly_color:"var(--label-normal)","AEditor_Error_background-color":"inherit",AEditor_Error_border:"1px solid var(--alert-danger)",AEditor_Error_color:"var(--alert-danger)",AEditor_Error_hover_border:"1px solid var(--alert-danger)",AEditor_Error_focus_border:"1px solid var(--alert-danger)",AEditor_Error_placeholder_color:"var(--alert-danger)","AEditor_Addon_Primary_background-color":"var(--background-normal)",AEditor_Addon_Primary_border:"1px solid var(--line-normal)",AEditor_Addon_Primary_color:"var(--label-normal)","AEditor_Addon_Secondary_background-color":"var(--background-normal)",AEditor_Addon_Secondary_border:"1px solid var(--line-strong)",AEditor_Addon_Secondary_color:"var(--label-neutral)","AEditor_Addon_hover_background-color":"var(--elevation-10)",AEditor_Addon_hover_color:"var(--acent-brand)",AEditor_Addon_focus_border:"1px solid var(--line-strong)","AEditor_border-radius":"2px","AEditor_Select_border-radius":"6px","AEditor_Option_border-radius":"6px",ACheckBox_color:"var(--label-normal)","ADialog_Paper_background-color":"#00000060","ADialog_background-color":"var(--elevation-0)",ADialog_border:"1px solid var(--line-neutral)","ADialog_Action_background-color":"var(--elevation-0)",ASelect_Placeholder_color:"var(--label-neutral)",ASelect_Primary_border:"1px solid var(--line-normal)",ASelect_Primary_hover_border:"1px solid var(--line-strong)",ASelect_Primary_Arrow_color:"var(--label-normal)","ASelect_Primary_Options_background-color":"var(--elevation-0)",ASelect_Primary_Options_border:"1px solid var(--line-normal)","ASelect_Primary_Option_hover_background-color":"var(--elevation-10)","ASelect_Primary_Option_active_background-color":"var(--elevation-10)","ASelect_Primary_Option_Selected_background-color":"var(--elevation-20)",ASelect_Secondary_border:"1px solid var(--elevation-10)",ASelect_Secondary_hover_border:"1px solid var(--elevation-10)","ASelect_Secondary_background-color":"var(--elevation-10)",ASelect_Secondary_Arrow_color:"var(--label-normal)","ASelect_Secondary_Options_background-color":"var(--elevation-0)",ASelect_Secondary_Options_border:"var(--line-normal)","ASelect_Secondary_Option_hover_background-color":"var(--elevation-10)","ASelect_Secondary_Option_active_background-color":"var(--elevation-10)","ASelect_Secondary_Option_Selected_background-color":"var(--elevation-20)",AMultiSelect_Placeholder_color:"var(--label-neutral)",AMultiSelect_Primary_border:"1px solid var(--line-normal)",AMultiSelect_Primary_hover_border:"1px solid var(--line-strong)",AMultiSelect_Primary_Arrow_color:"var(--label-normal)","AMultiSelect_Primary_Options_background-color":"var(--elevation-0)",AMultiSelect_Primary_Options_border:"1px solid var(--line-normal)","AMultiSelect_Primary_Option_hover_background-color":"var(--elevation-10)","AMultiSelect_Primary_Option_active_background-color":"var(--elevation-10)","AMultiSelect_Primary_Option_Selected_background-color":"var(--elevation-20)",AMultiSelect_Secondary_border:"1px solid var(--elevation-10)",AMultiSelect_Secondary_hover_border:"1px solid var(--elevation-10)","AMultiSelect_Secondary_background-color":"var(--elevation-10)",AMultiSelect_Secondary_Arrow_color:"var(--label-normal)","AMultiSelect_Secondary_Options_background-color":"var(--elevation-0)",AMultiSelect_Secondary_Options_border:"1px solid var(--line-normal)","AMultiSelect_Secondary_Option_hover_background-color":"var(--elevation-10)","AMultiSelect_Secondary_Option_active_background-color":"var(--elevation-10)","AMultiSelect_Secondary_Option_Selected_background-color":"var(--elevation-20)","ATree_background-color":"var(--elevation-0)",ATree_Indent_border:"1px solid var(--line-normal)","ATreeBodyHeader_border-bottom":"1px solid var(--line-normal)","ATreeItem_hover_background-color":"var(--elevation-10)","ATreeItem_active_background-color":"var(--elevation-10)","ATreeItem_select_background-color":"var(--elevation-10)","ATreeItem_search_background-color":"yellow","ATreeItem_search_border-top":"1px dashed var(--label-normal)","ATreeItem_search_border-bottom":"1px dashed var(--label-normal)",ATreeItem_select_color:"var(--label-normal)",ASwitch_Track_Falsy_border:"12px solid var(--elevation-20)",ASwitch_Track_Truthy_border:"12px solid var(--acent-brand)",ASwitch_Thumb_border:"9px solid var(--static-white)","ATab_IndicatorTrack_Primary_border-bottom":"1px solid var(--line-normal)","ATab_Indicator_Primary_background-color":"var(--label-normal)",ATab_Option_Secondary_border:"2px solid var(--label-normal)","ATab_Option_Secondary_IsSelected_border-bottom":"2px solid var(--elevation-0)",ATab_Option_Secondary_IsDisabled_border:"2px solid var(--line-neutral)","ATab_IndicatorTrack_Tertiary_background-color":"var(--line-normal)","ATab_Indicator_Tertiary_background-color":"var(--elevation-0)",ATab_Option_Tertiary_color:"var(--line-strong)",ATab_Option_Tertiary_IsSelected_color:"var(--label-strong)",ATab_Option_Quaternary_color:"var(--label-neutral)",ATab_Option_Quaternary_IsSelected_color:"var(--label-normal)",AFileBox_border:"1px dashed var(--label-normal)","AFileBox_background-color":"var(--elevation-10)",AFileBox_SelectedFile_color:"var(--label-normal)",AFileBox_Dropping_color:"var(--label-normal)","AFileUploader_background-color":"var(--background-normal)",AFileUploader_brand_color:"var(--acent-brand)",AFileUploader_disabled_color:"var(--label-neutral)",AFileUploader_error_color:"var(--alert-danger)",AFileUploader_text_color:"var(--label-normal)","AListView_border-thin":"1px solid var(--line-neutral)","AListView_border-thick":"3px solid var(--line-neutral)","AStepper_OutCircle_background-color":"transparent","AStepper_OutCircle_IsOver_background-color":"var(--elevation-10)","AStepper_InCircle_background-color":"var(--elevation-20)","AStepper_InCircle_IsOver_background-color":"var(--label-normal)","AStepper_Line_background-color":"var(--line-neutral)","AStepper_Line_IsOver_background-color":"var(--label-normal)",ADatePicker_Anchor_border:"1px solid var(--line-normal)",ADatePicker_Anchor_color:"var(--label-normal)",ADatePicker_Anchor_Placeholder_color:"var(--label-neutral)",ADatePicker_Anchor_hover_border:"1px solid var(--line-strong)",ADatePicker_Anchor_focus_border:"1px solid var(--line-strong)",ADatePicker_Anchor_Icon_Primary_color:"var(--label-normal)",ADatePicker_Anchor_Icon_Secondary_color:"var(--label-normal)","ADatePicker_background-color":"var(--elevation-0)",ADatePicker_border:"1px solid var(--line-neutral)","ADatePicker_StringInputContainer_background-color":"var(--label-neutral)",ADatePicker_String_border:"1px solid var(--label-normal)","ADatePicker_Prev_background-color":"var(--elevation-10)","ADatePicker_Prev_border-right":"6px solid var(--label-normal)","ADatePicker_Next_background-color":"var(--elevation-10)","ADatePicker_Next_border-left":"6px solid var(--label-normal)",ADatePicker_Cell_color:"var(--label-normal)",ADatePicker_Cell_IsNotCurrentMonth_color:"var(--label-neutral)",ADatePicker_Cell_IsDisabled_color:"var(--label-neutral)","ADatePicker_Cell_IsSelected_background-color":"var(--elevation-20)",ADatePicker_Cell_IsSelected_color:"var(--label-normal)","ADatePicker_Cell_IsHovered_background-color":"var(--elevation-10)",ADateRangePicker_Anchor_border:"1px solid var(--line-normal)",ADateRangePicker_Anchor_color:"var(--label-normal)",ADateRangePicker_Anchor_Placeholder_color:"var(--label-neutral)",ADateRangePicker_Anchor_hover_border:"1px solid var(--line-strong)",ADateRangePicker_Anchor_focus_border:"1px solid var(--line-strong)",ADateRangePicker_Anchor_Icon_Primary_color:"var(--label-normal)",ADateRangePicker_Anchor_Icon_Secondary_color:"var(--label-normal)","ADateRangePicker_background-color":"var(--elevation-0)",ADateRangePicker_border:"1px solid var(--line-neutral)","ADateRangePicker_StringInputContainer_background-color":"var(--label-neutral)",ADateRangePicker_String_border:"1px solid var(--label-normal)","ADateRangePicker_Prev_background-color":"var(--elevation-10)","ADateRangePicker_Prev_border-right":"6px solid var(--label-normal)","ADateRangePicker_Next_background-color":"var(--elevation-10)","ADateRangePicker_Next_border-left":"6px solid var(--label-normal)",ADateRangePicker_Cell_color:"var(--label-normal)",ADateRangePicker_Cell_IsNotCurrentMonth_color:"var(--label-neutral)",ADateRangePicker_Cell_IsDisabled_color:"var(--label-neutral)","ADateRangePicker_Cell_IsSelected_background-color":"var(--elevation-20)",ADateRangePicker_Cell_IsSelected_color:"var(--label-normal)","ADateRangePicker_Cell_IsHovered_background-color":"var(--elevation-10)",AIconButton_Primary_color:"var(--label-normal)",AIconButton_Primary_border:"1px solid var(--line-normal)","AIconButton_Primary_background-color":"var(--elevation-0)","AIconButton_Primary_hover_background-color":"var(--elevation-10)","AIconButton_Primary_active_background-color":"var(--elevation-20)",AIconButton_Secondary_color:"var(--label-normal)","AIconButton_Secondary_background-color":"var(--elevation-0)","AIconButton_Secondary_hover_background-color":"var(--elevation-10)","AIconButton_Secondary_active_background-color":"var(--elevation-20)","ATableBody_TRow_border-bottom":"1px solid var(--line-normal)","ATableBody_TRow_IsSelected_background-color":"var(--elevation-10)","ATableBody_TRow_IsSelectable_hover_background-color":"var(--elevation-10)",ATableBody_TH_color:"var(--label-neutral)","ATableBody_TD_IsMarked_background-color":"yellow",ATableBody_TD_IsMarked_color:"var(--label-normal)","ATableBody_Resizer_hover_ResizerCenter_background-color":"var(--line-neutral)","ATableBody_Resizer_active_ResizerCenter_background-color":"var(--line-neutral)","ATableBody_Resizer_active_ResizerOut_background-color":"var(--line-neutral)","ATableBody_Resizer_active_ResizerIn_background-color":"var(--line-neutral)","ATableFooter_Button_IsSelected_background-color":"var(--elevation-10)",ATableFooter_Button_IsSelected_color:"var(--label-normal)",ATableFooter_Button_IsDisabled_color:"var(--label-neutral)","ATableFilter_SubFilters_background-color":"var(--elevation-0)",ATableFilter_SubFilters_border:"1px solid var(--line-normal)",ATableFilter_Icon_color:"var(--label-normal)",ATableFilter_Alert_color:"var(--alert-danger)","ADivideFrame_DividerInner_background-color":"var(--line-normal)","AFloatMenu_background-color":"var(--elevation-0)","AFloatMenu_hover_background-color":"var(--elevation-10)",AFloatMenu_color:"var(--label-normal)",AFloatMenu_border:"1px solid var(--line-neutral)","ALoadingBorder_background-color":"var(--label-normal)","ALoadingBorder_ProgressBar_background-color":"var(--elevation-0)","ALoadingBorder_Cover_background-color":"var(--label-normal)",AWrap_Error_color:"var(--alert-danger)",ARadioSelect_RadioButton_border:"1px solid var(--line-normal)","ARadioSelect_RadioButton_InnerCircle_isChecked_background-color":"var(--acent-brand)","AChip_background-color":"var(--elevation-10)",AChip_color:"var(--label-normal)",AChip_border:"1px solid var(--line-normal)","AChip_hover_background-color":"var(--elevation-20)",AChip_hover_color:"var(--label-normal)",AChip_DeleteButton_border:"9px solid var(--line-normal)",AChip_DeleteButton_color:"var(--label-normal)",AChip_DeleteButton_hover_border:"9px solid var(--line-strong)",AChip_DeleteButton_hover_color:"var(--label-normal)"};function IT(n){return Sv[n]}function kT(n){return Ev(n)}function M3(n){er.keys(n).forEach(t=>{const r=n[t];r!==void 0&&(document.documentElement.style.setProperty(`--${t}`,r),Sv[t]=r)})}function MT(n){er.keys(n).forEach(t=>{const r=n[t];if(r===void 0)return;const i=sc.semantic[va.semanticMode][r];i!==void 0&&(document.documentElement.style.setProperty(t,i),Sv[t]=i)})}const va={paletteMode:_v[0],semanticMode:m1[0],save:"",followDeviceSetting:!1};function LT({semanticMode:n,save:e,followDeviceSetting:t}){if(t!==void 0&&(va.followDeviceSetting=t,t)){const r=window.matchMedia("(prefers-color-scheme: dark)"),i=l=>{va.semanticMode=l.matches?"dark":"light"};i(r);const o=l=>i(l);r.addEventListener("change",o)}if(e!==void 0){if(va.save=e,e==="localStorage"){const r=localStorage.getItem("semanticMode");m1.includes(r)&&(va.semanticMode=r)}else if(e==="sessionStorage"){const r=sessionStorage.getItem("semanticMode");m1.includes(r)&&(va.semanticMode=r)}}n!==void 0&&(va.semanticMode=n),$C(va.paletteMode),mm(va.semanticMode),e3(sc.palette[va.paletteMode]),n3(sc.semantic[va.semanticMode]),M3(Sv)}function OT(n){n.type==="semanticModeChange"?$0.push(n.listener):n.type==="paletteModeChange"?j0.push(n.listener):console.error("AThemes.addEventListener : parameter is not valid")}function PT(n){if(n.type==="semanticModeChange"){const e=$0.indexOf(n.listener);e!==-1&&$0.splice(e,1)}else if(n.type==="paletteModeChange"){const e=j0.indexOf(n.listener);e!==-1&&j0.splice(e,1)}else console.error("AThemes.removeEventListener : parameter is not valid")}function Ev(n){const e=window.getComputedStyle(document.documentElement);let t=e.getPropertyValue(n);return t===""&&(t=e.getPropertyValue(`--${n}`)),t}function DT(n){Object.assign(gt.additionalClasses,n),gt.updateKeys(),gt.additionalClasses=gt.additionalClasses}const gp={getCurrentPaletteMode:CT,getPaletteValue:_T,getPaletteDeepValue:ST,changePaletteMode:$C,editPalette:e3,getCurrentSemanticMode:ET,getSemanticValue:AT,getSemanticDeepValue:TT,changeSemanticMode:mm,editSemantic:n3,getComponentStyleValue:IT,getComponentStyleDeepValue:kT,editComponentStyle:M3,editComponentStyleWithSemantic:MT,init:LT,addEventListener:OT,removeEventListener:PT,getDeepValue:Ev,addClasses:DT},NT=n=>{const e=Dn.c(9),{onChange:t,onClick:r,type:i,...o}=n,l=i===void 0?"Icon":i,[a,u]=N.useState(gp.getCurrentSemanticMode()==="dark"?"Moon":"Sun");let h;e[0]!==r||e[1]!==t?(h=x=>{const w=gp.getCurrentSemanticMode();let _="light";w==="light"?_="dark":w==="dark"&&(_="light"),gp.changeSemanticMode(_),u(FT[_]),t==null||t(_),r==null||r(x)},e[0]=r,e[1]=t,e[2]=h):h=e[2];const y=h;if(l==="Icon")return k.jsx(ba,{...o,className:gt.clsx(Ep.AThemeButton,o.className,"IsInteractive"),icon:a,type:"Raw",onClick:y});if(l==="Switch"){let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=gp.getCurrentSemanticMode(),e[3]=x):x=e[3];let w;e[4]!==y?(w=[x==="dark",y],e[4]=y,e[5]=w):w=e[5];let _;return e[6]!==o||e[7]!==w?(_=k.jsx(qC,{...o,useCheck:w}),e[6]=o,e[7]=w,e[8]=_):_=e[8],_}},FT={light:"Sun",dark:"Moon"},BT="_ACheckBoxWrap_1ozuz_1",zT="_ACheckBox_1ozuz_1",U2={ACheckBoxWrap:BT,ACheckBox:zT},x1=n=>{const e=Dn.c(16),{useCheck:t,isIndeterminate:r,isDisabled:i,isLoading:o,onClick:l,...a}=n,[u,h]=Ho(t,!1);let y;e[0]!==u||e[1]!==l||e[2]!==i||e[3]!==o||e[4]!==h?(y=O=>{i||o||(h==null||h(!u),l==null||l(O))},e[0]=u,e[1]=l,e[2]=i,e[3]=o,e[4]=h,e[5]=y):y=e[5];const x=y,w=Gi,_=gt.clsx(a.className,U2.ACheckBoxWrap),S=r?"Check.Indeterminate":u?"Check.Checked":"Check.UnChecked";let R;e[6]!==S?(R=k.jsx(ho,{className:U2.ACheckBox,icon:S}),e[6]=S,e[7]=R):R=e[7];let I;return e[8]!==w||e[9]!==a||e[10]!==i||e[11]!==o||e[12]!==x||e[13]!==_||e[14]!==R?(I=k.jsx(w,{...a,className:_,isDisabled:i,isLoading:o,onClick:x,children:R}),e[8]=w,e[9]=a,e[10]=i,e[11]=o,e[12]=x,e[13]=_,e[14]=R,e[15]=I):I=e[15],I};function HT(n){return typeof n=="function"}function WT(n,e){return HT(n)?n(e):n}const Zr={getContent:WT};class G2{constructor(e){Ae(this,"capacity");Ae(this,"cache",new Map);this.capacity=e}get(e){if(!this.cache.has(e))return;const t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}put(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}delete(e){return this.cache.delete(e)}clear(){this.cache.clear()}entries(){return Array.from(this.cache.entries())}}const Rg=class Rg{constructor(){Ae(this,"databases",{});Ae(this,"caches",{});Ae(this,"DEFAULT_CACHE_SIZE",100)}static getInstance(){return Rg.instance||(Rg.instance=new Rg),Rg.instance}getCache(e,t){const r=`${e}_${t}`;return this.caches[r]||(this.caches[r]=new G2(this.DEFAULT_CACHE_SIZE)),this.caches[r]}async getDB(e,t,r=1){return this.databases[e]?this.databases[e]:new Promise((i,o)=>{if(!window.indexedDB){console.error("이 브라우저는 IndexedDB를 지원하지 않습니다."),o(new Error("IndexedDB not supported"));return}const l=window.indexedDB.open(e,r);l.onerror=a=>{console.error("IndexedDB 연결 오류:",a.target.error),o(a.target.error)},l.onsuccess=a=>{const u=a.target.result;this.databases[e]=u,i(u)},l.onupgradeneeded=a=>{const u=a.target.result;u.objectStoreNames.contains(t)||u.createObjectStore(t,{keyPath:"id"}).createIndex("updatedAt_idx","updatedAt",{unique:!1})}})}async save(e,t,r){this.getCache(e,t).put(r.id,{...r});const a=(await this.getDB(e,t)).transaction([t],"readwrite").objectStore(t);return new Promise((u,h)=>{const y=a.put(r);y.onsuccess=()=>u(),y.onerror=x=>{console.error("데이터 저장 오류:",x.target.error),h(x.target.error)}})}async batchSave(e,t,r){if(r.length===0)return;const i=this.getCache(e,t);r.forEach(u=>i.put(u.id,{...u}));const l=(await this.getDB(e,t)).transaction([t],"readwrite"),a=l.objectStore(t);return new Promise((u,h)=>{l.oncomplete=()=>u(),l.onerror=y=>{console.error("배치 저장 오류:",y.target.error),h(y.target.error)},r.forEach(y=>a.put(y))})}async get(e,t,r){const i=this.getCache(e,t),o=i.get(r);if(o)return o;const u=(await this.getDB(e,t)).transaction([t],"readonly").objectStore(t);return new Promise((h,y)=>{const x=u.get(r);x.onsuccess=()=>{const w=x.result;w&&i.put(r,w),h(w||null)},x.onerror=w=>{console.error("데이터 조회 오류:",w.target.error),y(w.target.error)}})}async getByIndex(e,t,r,i){const u=(await this.getDB(e,t)).transaction([t],"readonly").objectStore(t).index(r);return new Promise((h,y)=>{const x=u.getAll(i);x.onsuccess=()=>{const w=x.result,_=this.getCache(e,t);w.forEach(S=>{S&&S.id&&_.put(S.id,S)}),h(w)},x.onerror=w=>{console.error("인덱스 조회 오류:",w.target.error),y(w.target.error)}})}async delete(e,t,r){this.getCache(e,t).delete(r);const a=(await this.getDB(e,t)).transaction([t],"readwrite").objectStore(t);return new Promise((u,h)=>{const y=a.delete(r);y.onsuccess=()=>u(),y.onerror=x=>{console.error("데이터 삭제 오류:",x.target.error),h(x.target.error)}})}async batchDelete(e,t,r){if(r.length===0)return;const i=this.getCache(e,t);r.forEach(u=>i.delete(u));const l=(await this.getDB(e,t)).transaction([t],"readwrite"),a=l.objectStore(t);return new Promise((u,h)=>{l.oncomplete=()=>u(),l.onerror=y=>{console.error("배치 삭제 오류:",y.target.error),h(y.target.error)},r.forEach(y=>a.delete(y))})}async getAll(e,t){const o=(await this.getDB(e,t)).transaction([t],"readonly").objectStore(t);return new Promise((l,a)=>{const u=o.getAll();u.onsuccess=()=>{const h=u.result,y={},x=this.getCache(e,t);h.forEach(w=>{w.id&&(y[w.id]=w,x.put(w.id,w))}),l(y)},u.onerror=h=>{console.error("데이터 전체 조회 오류:",h.target.error),a(h.target.error)}})}async clear(e,t){this.getCache(e,t).clear();const l=(await this.getDB(e,t)).transaction([t],"readwrite").objectStore(t);return new Promise((a,u)=>{const h=l.clear();h.onsuccess=()=>a(),h.onerror=y=>{console.error("데이터 초기화 오류:",y.target.error),u(y.target.error)}})}getCached(e,t,r){return this.getCache(e,t).get(r)||null}clearCached(e,t){this.getCache(e,t).clear()}setCacheSize(e,t,r){const i=`${e}_${t}`,l=this.getCache(e,t).entries();this.caches[i]=new G2(r);for(const[a,u]of l)this.caches[i].get(a)===void 0&&a!==void 0&&this.caches[i].put(a,u)}};Ae(Rg,"instance");let Iy=Rg;const Sd=Iy.getInstance(),Td={save:(n,e,t)=>Sd.save(n,e,t),get:(n,e,t)=>Sd.get(n,e,t),delete:(n,e,t)=>Sd.delete(n,e,t),getAll:(n,e)=>Sd.getAll(n,e),clear:(n,e)=>Sd.clear(n,e),batchSave:(n,e,t)=>Sd.batchSave(n,e,t),batchDelete:(n,e,t)=>Sd.batchDelete(n,e,t),getByIndex:(n,e,t,r)=>Sd.getByIndex(n,e,t,r),getCached:(n,e,t)=>Sd.getCached(n,e,t),clearCached:(n,e)=>Sd.clearCached(n,e),setCacheSize:(n,e,t)=>Sd.setCacheSize(n,e,t)};function L3(n,e,t={}){const{dataFieldName:r="data"}=t,[i,o]=N.useState(!1),[l,a]=N.useState(null),u=N.useRef(new Map);N.useEffect(()=>{const B=u.current;return()=>{B.forEach(ee=>ee.abort()),B.clear()}},[]);const h=N.useCallback(async(B,ee)=>{try{o(!0),a(null);const H=u.current,V=H.get(B);V&&V.abort();const de=new AbortController;H.set(B,de);const Z=await ee();return u.current.delete(B),Z}catch(H){return H instanceof Error&&H.name==="AbortError"||a(H instanceof Error?H:new Error(String(H))),null}finally{o(!1)}},[]),y=N.useCallback(async(B,ee)=>B?await h(`save_${B}`,async()=>(await Td.save(n,e,{id:B,[r]:ee,updatedAt:new Date().toISOString()}),!0))===!0:!1,[n,e,r,h]),x=N.useCallback(async B=>B.length?await h(`batch_save_${Date.now()}`,async()=>{const ee=B.map(H=>({id:H.id,[r]:H.data,updatedAt:new Date().toISOString()}));return await Td.batchSave(n,e,ee),!0})===!0:!1,[n,e,r,h]),w=N.useCallback(async B=>B?await h(`get_${B}`,async()=>{const ee=await Td.get(n,e,B);return(ee==null?void 0:ee[r])||null}):null,[n,e,r,h]),_=N.useCallback(B=>{if(!B)return null;const ee=Td.getCached(n,e,B);return(ee==null?void 0:ee[r])||null},[n,e,r]),S=N.useCallback(async B=>B?await h(`delete_${B}`,async()=>(await Td.delete(n,e,B),!0))===!0:!1,[n,e,h]),R=N.useCallback(async B=>B.length?await h(`batch_delete_${Date.now()}`,async()=>(await Td.batchDelete(n,e,B),!0))===!0:!1,[n,e,h]),I=N.useCallback(async()=>await h(`get_all_${Date.now()}`,async()=>{const B=await Td.getAll(n,e);return Object.entries(B).reduce((ee,[H,V])=>(ee[H]=V[r],ee),{})})||{},[n,e,r,h]),O=N.useCallback(async()=>await h(`clear_all_${Date.now()}`,async()=>(await Td.clear(n,e),!0))===!0,[n,e,h]),P=N.useCallback(B=>{const ee=u.current.get(B);ee&&(ee.abort(),u.current.delete(B))},[]),Y=N.useCallback(()=>{new Map(u.current).forEach(ee=>ee.abort()),u.current.clear()},[]),z=N.useCallback(B=>{Td.setCacheSize(n,e,B)},[n,e]),W=N.useCallback(()=>{Td.clearCached(n,e)},[n,e]);return{save:y,get:w,delete:S,getAll:I,clearAll:O,batchSave:x,batchDelete:R,getCached:_,setCacheSize:z,clearCache:W,cancelOperation:P,cancelAllOperations:Y,isLoading:i,error:l}}const UT="LayoutDB",GT="layouts";function O3(){const n=Dn.c(24);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e={dataFieldName:"lengths"},n[0]=e):e=n[0];const t=L3(UT,GT,e);let r;n[1]===Symbol.for("react.memo_cache_sentinel")?(r={},n[1]=r):r=n[1];const[i,o]=N.useState(r);let l;n[2]===Symbol.for("react.memo_cache_sentinel")?(l={},n[2]=l):l=n[2];const a=N.useRef(l);let u;n[3]!==t?(u=async(W,B)=>await t.save(W,B),n[3]=t,n[4]=u):u=n[4];const h=u;let y;n[5]!==t?(y=async W=>await t.get(W),n[5]=t,n[6]=y):y=n[6];const x=y;let w;n[7]!==t?(w=W=>t.getCached(W),n[7]=t,n[8]=w):w=n[8];const _=w;let S;n[9]!==x||n[10]!==_||n[11]!==i?(S=W=>{const B=_(W);return B?{data:B,isLoaded:!0}:a.current[W]!==void 0?{data:a.current[W],isLoaded:!!i[W]}:(i[W]||(a.current[W]=null,x(W).then(ee=>{a.current[W]=ee,o(H=>({...H,[W]:!0}))})),{data:null,isLoaded:!1})},n[9]=x,n[10]=_,n[11]=i,n[12]=S):S=n[12];const R=S;let I;n[13]!==t?(I=async W=>(o(B=>{const ee={...B};return delete ee[W],ee}),a.current[W]!==void 0&&delete a.current[W],await t.delete(W)),n[13]=t,n[14]=I):I=n[14];const O=I;let P;n[15]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{o({}),a.current={}},n[15]=P):P=n[15];const Y=P;let z;return n[16]!==t.error||n[17]!==t.isLoading||n[18]!==O||n[19]!==x||n[20]!==_||n[21]!==R||n[22]!==h?(z={save:h,get:x,getCached:_,getSync:R,deleteItem:O,resetSyncState:Y,isLoading:t.isLoading,error:t.error},n[16]=t.error,n[17]=t.isLoading,n[18]=O,n[19]=x,n[20]=_,n[21]=R,n[22]=h,n[23]=z):z=n[23],z}const YT="_ARowFrame_1v0ao_1",VT="_AColFrame_1v0ao_7",ZT="_AOverflowFrame_1v0ao_13",XT="_ADivideFrame_1v0ao_22",KT="_Row_1v0ao_30",JT="_Col_1v0ao_33",QT="_FadeIn_1v0ao_36",qT="_NoTransition_1v0ao_39",jT="_ChildFrame_1v0ao_43",$T="_ExpandButtonOverlay_1v0ao_61",e6="_Divider_1v0ao_73",t6="_IsMoving_1v0ao_81",n6="_NoDraggable_1v0ao_81",r6="_DividerInner_1v0ao_84",i6="_IsClicked_1v0ao_109",o6="_RemoteButton_1v0ao_144",l6="_isExpanded_1v0ao_151",s6="_ExpandButton_1v0ao_61",kl={ARowFrame:YT,AColFrame:VT,AOverflowFrame:ZT,ADivideFrame:XT,Row:KT,Col:JT,FadeIn:QT,NoTransition:qT,ChildFrame:jT,ExpandButtonOverlay:$T,Divider:e6,IsMoving:t6,NoDraggable:n6,DividerInner:r6,IsClicked:i6,RemoteButton:o6,isExpanded:l6,"fade-in":"_fade-in_1v0ao_1",ExpandButton:s6},bl=n=>{const e=Dn.c(5);let t;e[0]!==n.className?(t=gt.clsx(kl.ARowFrame,n.className),e[0]=n.className,e[1]=t):t=e[1];let r;return e[2]!==n||e[3]!==t?(r=k.jsx(Gi,{...n,className:t,children:n.children}),e[2]=n,e[3]=t,e[4]=r):r=e[4],r},P3=n=>{const e=Dn.c(5);let t;e[0]!==n.className?(t=gt.clsx(kl.AColFrame,n.className),e[0]=n.className,e[1]=t):t=e[1];let r;return e[2]!==n||e[3]!==t?(r=k.jsx("div",{...n,className:t,children:n.children}),e[2]=n,e[3]=t,e[4]=r):r=e[4],r},nh=n=>{const{tooltip:e,children:t,abaseRef:r,isDisabled:i,className:o,noOverflowTooltip:l,...a}=n,{onMouseEnter:u,onMouseLeave:h,...y}=a,x=N.useRef(null),w=N.useMemo(()=>r??x,[r]),[_,S]=N.useState(!1),R=N.useCallback(P=>{S(!0),u==null||u(P)},[u]),I=N.useCallback(P=>{S(!1),h==null||h(P)},[h]),O=N.useMemo(()=>{if(i)return"";if(l||!_)return e;const P=w.current;return P&&P.scrollWidth>P.clientWidth?t:e},[w,i,t,e,l,_]);return k.jsx(Gi,{...y,children:t,abaseRef:w,className:gt.clsx(kl.AOverflowFrame,o),isDisabled:i,tooltip:O,onMouseEnter:R,onMouseLeave:I})},D3=n=>{const e=Dn.c(2),{value:t,map:r}=n;if(r[t]===void 0)return r.fallback;const i=r[t];let o;return e[0]!==i?(o=k.jsx(N.Suspense,{children:i}),e[0]=i,e[1]=o):o=e[1],o},N3=N.memo(n=>{const{pk:e,direction:t="Row",lefts:r,minLength:i=40,expandLayerLength:o=40,children:l,childStyle:a,childClassName:u,dividerStyle:h,dividerClassName:y,dividerPadding:x,dividerInnerClassName:w,dividerInnerStyle:_,noDividerDraggable:S,resources:R,showExpandButton:I,...O}=n,P=N.useMemo(()=>({...Nr.ADivideFrame,...R}),[R]),Y=N.useRef(null),z=N.useRef(!1),W=N.useRef(!0),B=N.useRef(r),[ee,H]=N.useState(),[V,de]=N.useState("FadeOut"),[Z,te]=N.useState(null),[ne,fe]=N.useState({width:0,height:0}),{save:ae,get:j,deleteItem:re}=O3(),he=N.useCallback(()=>{W.current&&requestAnimationFrame(()=>{W.current=!1,de("FadeIn")})},[]),be=N.useMemo(()=>{let Ye;return Array.isArray(l)?Ye=l:Ye=[l],Ye.filter(Boolean)},[l]),le=N.useMemo(()=>be.length,[be.length]),J=N.useMemo(()=>be.length-1,[be.length]),pe=N.useMemo(()=>e?String(e):"",[e]),Te=N.useMemo(()=>!!e,[e]),Fe=N.useCallback(async()=>{if(!Te){te(r),he();return}try{const Ye=await j(pe);Ye?te(Ye):(te(r),ae(pe,r)),he()}catch{te(r),he()}},[Te,he,pe,j,r,ae]);N.useEffect(()=>{Fe()},[Fe]),N.useEffect(()=>{const Ye=Y.current;if(!Ye)return;const mt=Ye.getBoundingClientRect();fe({width:mt.width,height:mt.height});const bt=new ResizeObserver(Mt=>{for(const Nt of Mt){const{width:_t,height:rn}=Nt.contentRect;fe({width:_t,height:rn})}});return bt.observe(Ye),()=>bt.disconnect()},[]),N.useEffect(()=>{B.current!==r&&(B.current=r,z.current||(te(r),Te&&ae(pe,r)),z.current=!1)},[Te,r,pe,ae]);const _e=N.useMemo(()=>{const Ye=x??0;return typeof i=="number"?Array(le).fill(i+Ye):i.map(mt=>mt+Ye)},[i,le,x]),Me=N.useMemo(()=>typeof o=="number"?Array(le).fill(o):o,[o,le]),De=N.useMemo(()=>(ee==null?void 0:ee.lefts)||Z||[],[ee,Z]),Re=N.useRef({x:0,y:0}),Le=N.useCallback((Ye,mt,bt)=>{const Mt=De[Ye],Nt=Ye===0?0:De[Ye-1],_t=Mt-Nt,rn={...a,...a6(t,_t,mt)};return x!==void 0&&(t==="Row"?(bt||(rn.paddingLeft=x),mt||(rn.paddingRight=x)):(bt||(rn.paddingTop=x),mt||(rn.paddingBottom=x))),rn},[De,a,t,x]),Oe=N.useCallback((Ye,mt)=>{if(mt)return bt=>{if(!Y.current||!Z)return;W.current=!1;const Mt=Y.current;Re.current={x:bt.clientX,y:bt.clientY};const Nt=Mt.getBoundingClientRect(),_t=t==="Row"?Nt.left:Nt.top,rn=t==="Row"?Nt.width:Nt.height;let pn=[...Z];H({idx:Ye,lefts:pn});const Kt=zt=>{pn=d6(Z,t,Ye,zt,_t,rn,_e),H({idx:Ye,lefts:pn})},dn=()=>{H(void 0),te(pn),z.current=!0,Te&&ae(pe,pn),window.removeEventListener("mousemove",Kt),window.removeEventListener("mouseup",dn)};window.addEventListener("mousemove",Kt),window.addEventListener("mouseup",dn)}},[Z,t,_e,Te,pe,ae]),Ge=N.useCallback(Ye=>{if(Ye)return()=>{te(r),z.current=!1,H(void 0),Te&&re(pe)}},[r,Te,pe,re]),Ve=N.useMemo(()=>be.map(()=>!S),[be,S]),Pe=N.useMemo(()=>{if(!I||!Y.current||V!=="FadeIn")return{hasCollapsedAreas:!1,collapsedAreaIndex:-1};if(!ne.width)return{hasCollapsedAreas:!1,collapsedAreaIndex:-1};const Ye=Y.current.getBoundingClientRect(),mt=t==="Row"?Ye.width:Ye.height;if(mt===0)return{hasCollapsedAreas:!1,collapsedAreaIndex:-1};const bt=[];for(let _t=0;_t<le;_t++){const rn=De[_t],pn=_t===0?0:De[_t-1],Kt=_t===J?mt-pn:rn-pn,dn=Array.isArray(Me)?Me[_t]:Me[0];bt.push({panelIndex:_t,actualLength:Kt,expandLength:dn,isCollapsed:Kt<=dn})}const Mt=bt.filter(_t=>_t.isCollapsed).map(_t=>_t.panelIndex);if(Mt.length===0)return{hasCollapsedAreas:!1,collapsedAreaIndex:-1};let Nt=-1;return Mt.includes(0)?Nt=0:Mt.includes(J)?Nt=J:Nt=Mt[0],{hasCollapsedAreas:!0,collapsedAreaIndex:Nt}},[I,V,t,le,J,De,Me,ne]),ot=N.useCallback(()=>{I&&(te(r),z.current=!1,Te&&ae(pe,r),W.current=!1)},[I,r,Te,pe,ae]),Xe=N.useMemo(()=>Ve.map((Ye,mt)=>Oe(mt,Ye)),[Ve,Oe]),lt=N.useMemo(()=>Ve.map(Ye=>Ge(Ye)),[Ve,Ge]);return Z?k.jsx("div",{...O,ref:Y,className:gt.clsx(kl.ADivideFrame,n.className,kl[t],kl[V],W.current&&kl.NoTransition),children:be.map((Ye,mt)=>{const bt=mt===0,Mt=mt===J,Nt=Le(mt,Mt,bt),_t=De[mt],rn=Ve[mt],pn=Xe[mt],Kt=lt[mt];return k.jsxs(N.Fragment,{children:[k.jsxs("div",{style:Nt,className:gt.clsx(kl.ChildFrame,u,ee&&kl.IsMoving,W.current&&kl.NoTransition,kl[t]),children:[Ye,I&&Pe.hasCollapsedAreas&&Pe.collapsedAreaIndex===mt&&k.jsxs(k.Fragment,{children:[k.jsx(Gi,{className:gt.clsx(kl.ExpandButtonOverlay,kl[t]),onClick:ot}),k.jsx(ba,{className:gt.clsx(kl.ExpandButton,kl[t]),icon:u6(mt,le),tooltip:P.Expand,type:"Raw",style:{transform:f6(mt,t)},onClick:ot})]})]}),!Mt&&k.jsx("div",{"data-nodraggable":rn?void 0:"true",className:gt.clsx(kl.Divider,kl[t],"NoSelect",ee&&kl.IsMoving,(ee==null?void 0:ee.idx)===mt&&kl.IsClicked,W.current&&kl.NoTransition,!rn&&kl.NoDraggable,y),style:{...h,...c6(t,_t)},onDoubleClick:Kt,onMouseDown:pn,children:k.jsx("div",{className:gt.clsx(kl.DividerInner,w),style:{..._}})})]},mt)})}):k.jsx("div",{...O,ref:Y,className:gt.clsx(kl.ADivideFrame,n.className,kl[t],kl.FadeOut,kl.NoTransition),style:{...O.style,visibility:"hidden",pointerEvents:"none"}})});N3.displayName="ADivideFrame";function a6(n,e,t){return t?{}:n==="Col"?{height:e,minHeight:e,maxHeight:e}:{maxWidth:e,width:e,minWidth:e}}function c6(n,e){return n==="Col"?{top:e}:{left:e}}function u6(n,e){const t=n===0,r=n===e-1;return t||r?"DividerExpand":"DividerMiddle"}function f6(n,e){const t=n===0;let r="";return e==="Row"&&t?r=" rotate(180deg)":e==="Col"&&(r=t?" rotate(-90deg)":" rotate(90deg)"),`translate(-50%, -50%)${r}`}function d6(n,e,t,r,i,o,l){const a=[...n],u=e==="Row"?r.clientX-i-n[t]:r.clientY-i-n[t];if(u===0)return a;const h=l.length,y=n.length,x=t+1,w=[],_=[];let S=0;for(let O=0;O<=h;O++)w[O]=S,O<h&&(S+=l[O]);let R=0;for(let O=h-2;O>=0;O--)R+=l[O+1],_[O]=R;_[h-1]=0;let I=a[t]+u;if(u<0){if(I<=w[x])for(let O=0;O<=t;O++)a[O]=w[O+1];else if(a[t]=I,t>0)for(let O=t-1;O>=0&&I-a[O]<l[O+1];O--)a[O]=I-l[O+1],I=a[O]}else{const O=t===h-2?l[h-1]:0;if(I>=o-_[t]-O)for(let P=t;P<y;P++)a[P]=o-_[P]-(P===y-1?0:O);else if(a[t]=I,t<y-1)for(let P=x;P<y&&a[P]-I<l[P];P++)a[P]=I+l[P],I=a[P]}return a}const zg=()=>{const n=Dn.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=k.jsx("div",{style:{display:"flex",flexGrow:1}}),n[0]=e):e=n[0],e},h6="_ASpace_1okqf_1",g6={ASpace:h6},cs=n=>{const e=Dn.c(14);let t,r,i,o,l;e[0]!==n?({h:r,w:l,...t}=n,i=t,o=gt.clsx(g6.ASpace,t.className),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5]);let a;e[6]!==t.style||e[7]!==r||e[8]!==l?(a={height:r,minHeight:r,maxHeight:r,width:l,minWidth:l,maxWidth:l,...t.style},e[6]=t.style,e[7]=r,e[8]=l,e[9]=a):a=e[9];let u;return e[10]!==i||e[11]!==o||e[12]!==a?(u=k.jsx("div",{...i,className:o,style:a}),e[10]=i,e[11]=o,e[12]=a,e[13]=u):u=e[13],u},p6="_AChipsContainer_1ag9v_1",v6="_AChip_1ag9v_1",b6="_Clickable_1ag9v_21",y6="_AChipDelete_1ag9v_26",m6="_IsHover_1ag9v_40",x6="_AChipDeleteIcon_1ag9v_45",f1={AChipsContainer:p6,AChip:v6,Clickable:b6,AChipDelete:y6,IsHover:m6,AChipDeleteIcon:x6},w6=n=>{const e=Dn.c(42);let t,r,i,o,l,a,u,h,y,x,w,_;e[0]!==n?({useLabels:_,alignItems:y,ChipStyle:l,ChipClassName:t,ChipOnDelete:o,ChipOnClick:i,ChipIcon:r,className:u,style:h,ButtonRenderer:x,gap:w,...a}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12]);const S=y===void 0?"flex-start":y,R=x===void 0?F3:x,I=w===void 0?8:w;let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=[],e[13]=O):O=e[13];const[P,Y]=Ho(_,O);let z;e[14]!==o||e[15]!==P||e[16]!==Y?(z=te=>{!Y||!o||(o({label:te}),Y(P.filter(ne=>ne!==te)))},e[14]=o,e[15]=P,e[16]=Y,e[17]=z):z=e[17];const W=z;let B;e[18]!==t||e[19]!==r||e[20]!==i||e[21]!==l||e[22]!==W?(B=te=>{const ne={label:te};return{label:te,useLabel:[te,C6],style:Zr.getContent(l,ne),className:Zr.getContent(t,ne),icon:Zr.getContent(r,ne),onDelete:()=>W(te),onClick:i?()=>i({label:te}):void 0}},e[18]=t,e[19]=r,e[20]=i,e[21]=l,e[22]=W,e[23]=B):B=e[23];const ee=B;let H;e[24]!==u?(H=gt.clsx(f1.AChipsContainer,u),e[24]=u,e[25]=H):H=e[25];let V;e[26]!==S||e[27]!==I||e[28]!==h?(V={...h,alignItems:S,gap:I},e[26]=S,e[27]=I,e[28]=h,e[29]=V):V=e[29];let de;if(e[30]!==R||e[31]!==ee||e[32]!==P){let te;e[34]!==R||e[35]!==ee?(te=(ne,fe)=>k.jsx(xm,{...ee(ne),ButtonRenderer:R},fe),e[34]=R,e[35]=ee,e[36]=te):te=e[36],de=P.map(te),e[30]=R,e[31]=ee,e[32]=P,e[33]=de}else de=e[33];let Z;return e[37]!==a||e[38]!==H||e[39]!==V||e[40]!==de?(Z=k.jsx(Gi,{...a,className:H,style:V,children:de}),e[37]=a,e[38]=H,e[39]=V,e[40]=de,e[41]=Z):Z=e[41],Z},xm=n=>{const e=Dn.c(27);let t,r,i,o,l,a,u;if(e[0]!==n){const{label:O,useLabel:P,icon:Y,className:z,onDelete:W,onClick:B,ButtonRenderer:ee,width:H,style:V,...de}=n;i=O,r=z,o=B,a=ee,u=H,l=V,t=de,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7];const h=a===void 0?F3:a,y=u===void 0?"fit-content":u;if(i===void 0){let O;return e[8]===Symbol.for("react.memo_cache_sentinel")?(O=k.jsx(k.Fragment,{}),e[8]=O):O=e[8],O}let x;e[9]!==r||e[10]!==o?(x=gt.clsx("NoSelect",f1.AChip,o&&f1.Clickable,o&&"IsClickable",r),e[9]=r,e[10]=o,e[11]=x):x=e[11];let w;e[12]!==l||e[13]!==y?(w={...l,width:y},e[12]=l,e[13]=y,e[14]=w):w=e[14];const _=i;let S;e[15]!==_?(S=k.jsx(nh,{children:_}),e[15]=_,e[16]=S):S=e[16];let R;e[17]!==h||e[18]!==n?(R=h({...n}),e[17]=h,e[18]=n,e[19]=R):R=e[19];let I;return e[20]!==t||e[21]!==o||e[22]!==x||e[23]!==w||e[24]!==S||e[25]!==R?(I=k.jsxs(Gi,{...t,className:x,style:w,onClick:o,children:[S,R]}),e[20]=t,e[21]=o,e[22]=x,e[23]=w,e[24]=S,e[25]=R,e[26]=I):I=e[26],I},F3=n=>{const e=Dn.c(13),{label:t,icon:r,onDelete:i,useLabel:o}=n,[,l]=Ho(o,t),[a,u]=N.useState(!1);let h;e[0]!==i||e[1]!==n||e[2]!==l?(h=O=>{i&&(O.stopPropagation(),l==null||l(void 0),i(n))},e[0]=i,e[1]=n,e[2]=l,e[3]=h):h=e[3];const y=h;let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{u(!0)},e[4]=x):x=e[4];const w=x;let _;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(!1)},e[5]=_):_=e[5];const S=_;let R;e[6]!==y||e[7]!==r||e[8]!==a||e[9]!==i?(R=i&&k.jsxs(k.Fragment,{children:[k.jsx(zg,{}),k.jsx(cs,{w:24}),k.jsx(Gi,{className:gt.clsx(f1.AChipDelete,"IsClickable",a&&f1.IsHover)}),k.jsx(ba,{className:f1.AChipDeleteIcon,icon:r||k.jsx(ho,{height:14,icon:"Close",stroke:"currentColor",width:14}),type:"Raw",onClick:y,onMouseEnter:w,onMouseLeave:S})]}),e[6]=y,e[7]=r,e[8]=a,e[9]=i,e[10]=R):R=e[10];let I;return e[11]!==R?(I=k.jsx(k.Fragment,{children:R}),e[11]=R,e[12]=I):I=e[12],I};function C6(){}const Mg=n=>{if(!n)return"0 bytes";const e=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB","RB","QB"];let t=0;for(;n>=1024&&t<e.length-1;)n/=1024,t++;return`${t===0?Math.floor(n).toString():n.toFixed(1).replace(/\.0$/,"")} ${e[t]}`},_6=n=>{let e="";n<0&&(e+="-",n=-n);const t=Math.floor(n/3600),r=Math.floor(n%3600/60),i=n%60;return t>0&&(e+=t.toString().padStart(2,"0")+":"),e+=r.toString().padStart(2,"0")+":",e+=i.toString().padStart(2,"0"),e},S6=/[a-zA-Z0-9]/,E6=/^[a-zA-Z0-9]*$/,A6=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9]{2,}$/,T6=/^[a-zA-Z0-9._-]+$/,R6=/^[0-9a-fA-F-]+$/i,I6=/[가-힣ㄱ-ㅎㅏ-ㅣ]/,k6=/^\S*$/,M6=/^([^ㄱ-ㅎㅏ-ㅣ])*$/i,L6=/[!@#$%^&*+=;:?/<>\\[\](){}~\-_.(),]/,O6=/^(?=.*[A-Za-z])(?=.*\d)(?=.*[\W_])[A-Za-z\d\W_]{8,}$/,P6=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/,D6={hasKr:n=>/[가-힣ㄱ-ㅎㅏ-ㅣ]/.test(n),hasMalKr:n=>/[ㄱ-ㅎㅏ-ㅣ]/.test(n),hasBlank:n=>/\s/.test(n),isBlank:n=>/^\s*$/.test(n),isUuid:n=>/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/.test(n),isEmail:n=>/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9]{2,}$/.test(n),isAlphabet:n=>/^[a-zA-Z]*$/.test(n),isAlphaNumeric:n=>/^[a-zA-Z0-9]*$/.test(n),isKr:n=>/^[가-힣ㄱ-ㅎㅏ-ㅣ]*$/.test(n),isKrNumeric:n=>/^[가-힣ㄱ-ㅎㅏ-ㅣ0-9]*/.test(n),isNumeric:n=>/^[0-9]$/.test(n),isLenMinMax:(n,e)=>t=>!(n!==void 0&&t.length<n||e!==void 0&&t.length>e)},N6=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const e=Math.random()*16|0;return(n=="x"?e:e&3|8).toString(16)}),wm={secondToTime:_6,validate:D6,FileSizeTrans:Mg,uuid:N6},F6=n=>{const e=Dn.c(52);let t,r,i,o,l,a;if(e[0]!==n){const{maxTicks:J,interval:pe,onFinish:Te,noStartOnRender:Fe,actionRef:_e,...Me}=n;l=Te,o=Fe,t=_e,i=J===void 0?300:J,r=pe===void 0?1e3:pe,a=Bg(Me),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6];const[u,h]=a;let y,x,w,_;e[7]!==u?({wrapId:x,wrapProps:w,labelProps:y,..._}=u,e[7]=u,e[8]=y,e[9]=x,e[10]=w,e[11]=_):(y=e[8],x=e[9],w=e[10],_=e[11]);const[S,R]=N.useState(0),[I,O]=N.useState(!o);let P,Y;e[12]!==r||e[13]!==I||e[14]!==h.isDisabled||e[15]!==h.isLoading?(P=()=>{if(!I||h.isDisabled||h.isLoading)return;const J=setInterval(()=>R(B6),r);return()=>clearInterval(J)},Y=[r,I,h.isDisabled,h.isLoading],e[12]=r,e[13]=I,e[14]=h.isDisabled,e[15]=h.isLoading,e[16]=P,e[17]=Y):(P=e[16],Y=e[17]),N.useEffect(P,Y);let z;e[18]!==l?(z=()=>{l==null||l(),O(!1)},e[18]=l,e[19]=z):z=e[19];const W=z;let B,ee;e[20]!==i||e[21]!==W||e[22]!==h.isDisabled||e[23]!==h.isLoading||e[24]!==S?(B=()=>{S>=i&&!h.isDisabled&&!h.isLoading&&W()},ee=[S,i,W,h.isDisabled,h.isLoading],e[20]=i,e[21]=W,e[22]=h.isDisabled,e[23]=h.isLoading,e[24]=S,e[25]=B,e[26]=ee):(B=e[25],ee=e[26]),N.useEffect(B,ee);let H;e[27]!==h.isDisabled?(H=()=>{h.isDisabled||O(!0)},e[27]=h.isDisabled,e[28]=H):H=e[28];const V=H;let de;e[29]!==h.isDisabled?(de=()=>{h.isDisabled||O(!1)},e[29]=h.isDisabled,e[30]=de):de=e[30];const Z=de;let te;e[31]!==h.isDisabled?(te=()=>{h.isDisabled||(O(!1),R(0))},e[31]=h.isDisabled,e[32]=te):te=e[32];const ne=te;let fe,ae;e[33]!==t||e[34]!==ne||e[35]!==V||e[36]!==Z?(fe=()=>{t&&(t.current={start:V,stop:Z,reset:ne,setTicks:R})},ae=[t,V,Z,ne],e[33]=t,e[34]=ne,e[35]=V,e[36]=Z,e[37]=fe,e[38]=ae):(fe=e[37],ae=e[38]),N.useEffect(fe,ae);const j=i-S;let re;e[39]!==y||e[40]!==x||e[41]!==w||e[42]!==_?(re={wrapId:x,wrapProps:w,labelProps:y,..._},e[39]=y,e[40]=x,e[41]=w,e[42]=_,e[43]=re):re=e[43];let he;e[44]!==j?(he=wm.secondToTime(j>0?j:0),e[44]=j,e[45]=he):he=e[45];let be;e[46]!==h||e[47]!==he?(be=k.jsx(Gi,{...h,children:he}),e[46]=h,e[47]=he,e[48]=be):be=e[48];let le;return e[49]!==re||e[50]!==be?(le=k.jsx(lg,{...re,children:be}),e[49]=re,e[50]=be,e[51]=le):le=e[51],le};function B6(n){return n+1}function Pd(n){const e=n.getFullYear(),t=n.getMonth()+1,r=n.getDate();return`${e}-${t<10?"0"+t:t}-${r<10?"0"+r:r}`}function z6(n){try{if(!n)return;const e=new Date(n);return isNaN(e.getTime())?void 0:e}catch{return}}function H6(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0,0)}function W6(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59,999)}function Y2(n,e){return Pd(n)===Pd(e)}function d1(n,e){return Pd(n)>Pd(e)}function ev(n,e){return Pd(n)>=Pd(e)}function tv(n,e){return Pd(n)<Pd(e)}function nv(n,e){return Pd(n)<=Pd(e)}function V2(n,e,t){return d1(n,t)?d1(e,t)&&tv(e,n):d1(e,n)&&tv(e,t)}function Z2(n,e,t){return d1(n,t)?ev(e,t)&&nv(e,n):ev(e,n)&&nv(e,t)}const Yn={toString:Pd,toDate:z6,makeSDate:H6,makeEDate:W6,"===":Y2,">":d1,">=":ev,"<":tv,"<=":nv,"s<d<e|e<d<s":V2,"s<=d<=e|e<=d<=s":Z2,eq:Y2,g:d1,ge:ev,l:tv,le:nv,b:V2,be:Z2},U6="_InputContainer_16eoo_7",G6="_AInput_16eoo_21",Y6="_LeftAddon_16eoo_43",V6="_RightAddon_16eoo_50",Z6="_ErrorHelperText_16eoo_57",X6="_Primary_16eoo_61",K6="_UnAvailable_16eoo_66",J6="_Secondary_16eoo_77",Q6="_ReadOnly_16eoo_92",q6="_ANumInputUnitSelect_16eoo_108",ou={InputContainer:U6,AInput:G6,LeftAddon:Y6,RightAddon:V6,ErrorHelperText:Z6,Primary:X6,UnAvailable:K6,Secondary:J6,ReadOnly:Q6,Error:"_Error_16eoo_57",ANumInputUnitSelect:q6},j6=["Primary","Secondary","ReadOnly","Error"],sg=n=>{const{onEnterPress:e,type:t="Primary",inputRef:r,useValue:i,isReadonly:o,placeholder:l,minLength:a,maxLength:u,tabIndex:h,autoFocus:y,isPassword:x,autoComplete:w="off",inputProps:_,LeftAddon:S,RightAddon:R,dataList:I=[],pattern:O,id:P=(_==null?void 0:_.id)??wm.uuid(),...Y}=n,[{wrapId:z,wrapProps:W,labelProps:B,...ee},H]=Bg(Y),V=N.useMemo(()=>$6(ee.errorMessage)?"Error":t,[ee.errorMessage,t]),de=N.useMemo(()=>V==="ReadOnly"?!0:o,[V,o]),Z=N.useMemo(()=>H.isDisabled||H.isLoading,[H.isDisabled,H.isLoading]),[te,ne]=Ho(i,""),fe=N.useCallback(j=>{var re;Z||((re=_==null?void 0:_.onKeyDown)==null||re.call(_,j),["Escape","Enter","ArrowUp","ArrowDown"].includes(j.key)||j.stopPropagation(),j.key==="Enter"&&e&&e(j.currentTarget.value))},[Z,_,e]),ae=N.useCallback(j=>{var re;Z||O&&!new RegExp(O).test(j.target.value)||a&&j.target.value.length<a||(ne==null||ne(j.target.value),(re=_==null?void 0:_.onChange)==null||re.call(_,j))},[Z,a,ne,_,O]);return x?k.jsx(lg,{wrapId:z,wrapProps:W,labelProps:B,...ee,children:k.jsx("form",{onSubmit:j=>j.preventDefault(),children:k.jsxs(Gi,{...H,className:gt.clsx(ou.InputContainer,ou[V],Z&&ou.UnAvailable,H.className),children:[S&&k.jsx("div",{className:ou.LeftAddon,children:S}),k.jsx("input",{..._,ref:r,autoComplete:w,autoFocus:y,className:gt.clsx(ou.AInput,V==="Error"&&ou.InputError,_==null?void 0:_.className),id:P,list:`${P}-datalist`,maxLength:u,placeholder:l,readOnly:de,tabIndex:H.isDisabled||H.isLoading?-1:h,type:"password",value:te,onChange:ae,onKeyDown:fe}),I.length>0&&k.jsx("datalist",{id:`${P}-datalist`,children:I.map((j,re)=>k.jsx("option",{value:j},re))}),R&&k.jsx("div",{className:gt.clsx(ou.RightAddon,"NoSelect"),children:R})]})})}):k.jsx(lg,{wrapId:z,wrapProps:W,labelProps:B,...ee,children:k.jsxs(Gi,{...H,className:gt.clsx(ou.InputContainer,ou[V],Z&&ou.UnAvailable,H.className),children:[S&&k.jsx("div",{className:ou.LeftAddon,children:S}),k.jsx("input",{..._,ref:r,autoComplete:w,autoFocus:y,className:gt.clsx(ou.AInput,V==="Error"&&ou.InputError,_==null?void 0:_.className),id:P,list:`${P}-datalist`,maxLength:u,pattern:O,placeholder:l,readOnly:de,tabIndex:H.isDisabled||H.isLoading?-1:h,value:te,onChange:ae,onKeyDown:fe}),I.length>0&&k.jsx("datalist",{id:`${P}-datalist`,children:I.map((j,re)=>k.jsx("option",{value:j},re))}),R&&k.jsx("div",{className:ou.RightAddon,children:R})]})})};function $6(n){return Array.isArray(n)?n.filter(Boolean).length>0:!!n}const eR="_ASelect_1gbzd_1",tR="_Arrow_1gbzd_14",nR="_Primary_1gbzd_23",rR="_UnAvailable_1gbzd_34",iR="_IsOpen_1gbzd_34",oR="_Secondary_1gbzd_41",lR="_Placeholder_1gbzd_57",sR="_ValuesContainer_1gbzd_61",aR="_Values_1gbzd_61",cR="_Options_1gbzd_80",uR="_Raw_1gbzd_93",fR="_Option_1gbzd_80",dR="_Selected_1gbzd_122",hR="_CheckBox_1gbzd_129",Pf={ASelect:eR,Arrow:tR,Primary:nR,UnAvailable:rR,IsOpen:iR,Secondary:oR,Placeholder:lR,ValuesContainer:sR,Values:aR,Options:cR,Raw:uR,Option:fR,Selected:dR,CheckBox:hR},gR=["Primary","Secondary","Raw"],Ah=n=>{const{options:e,useSelect:t,type:r="Primary",placeholder:i=Nr.ASelect["Select(Placeholder)"],onClose:o,OptionRenderer:l=vR,SelectedRenderer:a=bR,minShowRows:u=2,maxShowRows:h=6,arrowProps:y,isAutoWidth:x=!1,...w}=n,_=N.useRef(null),S=N.useMemo(()=>w.abaseRef??_,[w.abaseRef]),R=N.useRef(null),[I,O]=Ho(t,e[0]),[P,Y]=N.useState(void 0),[z,W]=N.useState(!1),[B,ee]=N.useState(!1),H=N.useRef(e),V=N.useRef(null),de=N.useCallback(()=>ee(!1),[]),Z=N.useCallback(()=>{w.isDisabled||w.isLoading||e.length<1||(ee(!0),setTimeout(()=>W(!0),0),setTimeout(()=>ib(R,S,e,u,h),0))},[S,w.isDisabled,w.isLoading,e,u,h]),te=N.useCallback(()=>{W(!1),ee(!0),o==null||o()},[o]),ne=N.useCallback(le=>{var J;z?te():Z(),setTimeout(()=>ib(R,S,e,u,h),0),(J=w.onClick)==null||J.call(w,le)},[S,w,e,z,te,Z,u,h]),fe=N.useCallback(()=>{ib(R,S,e,u,h)},[S,e,u,h]);N.useEffect(()=>{if(!z||!S.current)return;const le=S.current;let J=le.parentElement;for(;J;)J.addEventListener("scroll",fe),J=J.parentElement;return()=>{let pe=le.parentElement;for(;pe;)pe.removeEventListener("scroll",fe),pe=pe.parentElement}},[S,z,fe]),N.useEffect(()=>{if(z)return window.addEventListener("resize",fe),()=>window.removeEventListener("resize",fe)},[z,fe]);const ae=N.useCallback(le=>{le[0].intersectionRatio===0&&te()},[te]);N.useEffect(()=>{if(!z)return;const le=new IntersectionObserver(ae,{threshold:0});return S.current&&le.observe(S.current),()=>le.disconnect()},[S,z,ae]);const j=N.useCallback(le=>{const J=le.target,pe=S.current,Te=R.current;!pe||!J||!Te||!pe.contains(J)&&!Te.contains(J)&&te()},[S,te]),re=N.useMemo(()=>w.isDisabled||w.isLoading||e.length<1,[w.isDisabled,w.isLoading,e]);N.useEffect(()=>{if(z)return setTimeout(()=>document.addEventListener("mousedown",j),0),()=>document.removeEventListener("mousedown",j)},[z,j]);const he=N.useCallback((le,J)=>{le.stopPropagation(),le.preventDefault(),O==null||O(J),te()},[O,te]),be=N.useCallback(()=>{if(!x||!S.current)return;const le=kg.calculateOptimalSelectWidth({elementRef:S,options:e,selectedOption:I,placeholder:i,optionRenderer:J=>J===null?null:l({option:J}),type:r,isMulti:!1});Y(le)},[x,S,e,I,i,l,r]);return N.useEffect(()=>x?((e!==H.current||P===void 0)&&(V.current!==null&&cancelAnimationFrame(V.current),V.current=requestAnimationFrame(()=>{be(),V.current=null,H.current=[...e]})),()=>{V.current!==null&&(cancelAnimationFrame(V.current),V.current=null)}):void 0,[x,e,be,P]),N.useEffect(()=>()=>{typeof kg.clearCache=="function"&&kg.clearCache()},[]),k.jsxs(k.Fragment,{children:[k.jsxs(Gi,{...w,abaseRef:S,isDisabled:w.isDisabled||e.length<1,className:gt.clsx(w.className,Pf.ASelect,"NoSelect",z&&Pf.IsOpen,re&&Pf.UnAvailable,Pf[r]),style:{padding:r==="Secondary"?"8px 8px 8px 0":0,width:P?`${P}px`:x?"100px":void 0,...w.style},onClick:ne,children:[k.jsx("div",{className:Pf.ValuesContainer,children:k.jsx("div",{className:gt.clsx(Pf.Values,(I==null||I==="")&&Pf.Placeholder),children:k.jsx(a,{OptionRenderer:l,placeholder:i,selectedOption:I})})}),k.jsx("div",{...y,className:gt.clsx(Pf.Arrow,y==null?void 0:y.className),children:k.jsx(ho,{icon:"TriangleDown",style:{transform:z?"rotate(180deg)":"",transition:"var(--Transition)"}})})]}),e.length>0&&(z||B)&&su.createPortal(k.jsx("div",{ref:R,className:gt.clsx(Pf.Options,Pf[r]),style:{opacity:+z,visibility:z?"visible":"hidden",pointerEvents:z?void 0:"none",borderRadius:S.current?window.getComputedStyle(S.current).borderRadius:void 0,width:P?`${P}px`:x?"100px":void 0},onTransitionEnd:de,children:e.map((le,J)=>{const pe=I===le,Te=S.current?window.getComputedStyle(S.current):void 0;return le===null?null:k.jsx("div",{className:gt.clsx(Pf.Option,pe&&Pf.Selected,"NoSelect",Pf[r]),style:{height:Te==null?void 0:Te.height},onClick:Fe=>he(Fe,le),children:k.jsx(l,{option:le})},J)})}),document.body)]})};function ib(n,e,t,r,i){if(!e.current||!n.current||!t||t.length<1)return;const o=e.current.getBoundingClientRect(),l=pR(o,t.length,r,i),a=window.getComputedStyle(e.current);n.current.style.top=`calc(${l.top??0}px - ${a.borderTopWidth})`,n.current.style.bottom=l.bottom?l.bottom+"px":"",n.current.style.left=l.left+"px",n.current.style.width||(n.current.style.minWidth=l.minWidth+"px"),n.current.style.minHeight=l.minHeight+"px",n.current.style.maxHeight=l.maxHeight+"px",n.current.style.visibility="visible"}function pR(n,e,t,r){const i={top:n.bottom,bottom:void 0,left:n.left,height:"fit-content",minWidth:n.width,minHeight:n.height*Math.min(t,e),maxHeight:n.height*r>window.innerHeight-n.bottom-10?window.innerHeight-n.bottom-10:n.height*r};return window.innerHeight-n.bottom-10<i.height&&(window.innerHeight-n.bottom-10<i.minHeight?(i.top=n.top-e*n.height,i.top<0&&(i.top=10,i.minHeight=n.top-10,i.height=n.top-10)):i.height=window.innerHeight-n.bottom-10),i}const vR=n=>{const{option:e}=n;return er.isReactNode(e)?e:null},bR=n=>{const e=Dn.c(3),{selectedOption:t,OptionRenderer:r,placeholder:i}=n;if(t==null||t==="")return i;const o=t;let l;return e[0]!==r||e[1]!==o?(l=k.jsx(r,{option:o}),e[0]=r,e[1]=o,e[2]=l):l=e[2],l},yR="_Anchor_1l5ql_1",mR="_Primary_1l5ql_18",xR="_Secondary_1l5ql_21",wR="_Placeholder_1l5ql_25",CR="_Icon_1l5ql_30",_R="_ADatePicker_1l5ql_40",SR="_StringInputWrap_1l5ql_51",ER="_StringInputContainer_1l5ql_56",AR="_StringInput_1l5ql_51",TR="_IsIdx_1l5ql_71",RR="_CalendarContainer_1l5ql_75",IR="_Header_1l5ql_81",kR="_Prev_1l5ql_85",MR="_Next_1l5ql_86",LR="_MonthYear_1l5ql_119",OR="_Select_1l5ql_124",PR="_Calendar_1l5ql_75",DR="_Cell_1l5ql_134",NR="_IsNotCurrentMonth_1l5ql_146",FR="_IsSelected_1l5ql_150",BR="_IsDisabled_1l5ql_154",zR="_IsHovered_1l5ql_157",HR="_Week_1l5ql_161",WR="_WeekDay_1l5ql_166",Jo={Anchor:yR,Primary:mR,Secondary:xR,Placeholder:wR,Icon:CR,ADatePicker:_R,StringInputWrap:SR,StringInputContainer:ER,StringInput:AR,String:"_String_1l5ql_51",IsIdx:TR,CalendarContainer:RR,Header:IR,Prev:kR,Next:MR,MonthYear:LR,Select:OR,Calendar:PR,Cell:DR,IsNotCurrentMonth:NR,IsSelected:FR,IsDisabled:BR,IsHovered:zR,Week:HR,WeekDay:WR},UR="_Anchor_5u6hq_1",GR="_Primary_5u6hq_18",YR="_Secondary_5u6hq_22",VR="_Placeholder_5u6hq_26",ZR="_Icon_5u6hq_31",XR="_ADateRangePicker_5u6hq_41",KR="_StringInputWrap_5u6hq_52",JR="_StringInputContainer_5u6hq_56",QR="_StringInput_5u6hq_52",qR="_IsIdx_5u6hq_72",jR="_CalendarContainer_5u6hq_76",$R="_Header_5u6hq_82",e8="_Prev_5u6hq_86",t8="_Next_5u6hq_87",n8="_MonthYear_5u6hq_120",r8="_Select_5u6hq_125",i8="_Calendar_5u6hq_76",o8="_Cell_5u6hq_135",l8="_IsNotCurrentMonth_5u6hq_147",s8="_IsSelected_5u6hq_151",a8="_IsDisabled_5u6hq_155",c8="_IsHovered_5u6hq_158",u8="_Week_5u6hq_162",f8="_WeekDay_5u6hq_167",d8="_ChoiceButton_5u6hq_171",Qi={Anchor:UR,Primary:GR,Secondary:YR,Placeholder:VR,Icon:ZR,ADateRangePicker:XR,StringInputWrap:KR,StringInputContainer:JR,StringInput:QR,String:"_String_5u6hq_52",IsIdx:qR,CalendarContainer:jR,Header:$R,Prev:e8,Next:t8,MonthYear:n8,Select:r8,Calendar:i8,Cell:o8,IsNotCurrentMonth:l8,IsSelected:s8,IsDisabled:a8,IsHovered:c8,Week:u8,WeekDay:f8,ChoiceButton:d8},Cm=n=>{const{type:e="Primary",className:t,useDateRange:r,actionRef:i,position:o=L1.SE,minDate:l,maxDate:a,isDisabled:u,isLoading:h,yearsOptionSize:y,noDefaultChoices:x,LeftAddon:w,RightAddon:_,placeholder:S,noClearButton:R,resources:I,onClick:O,...P}=n,Y=N.useMemo(()=>({...Nr.ADateRangePicker,...I}),[I]),z=N.useMemo(()=>S??Y["Select DateRange"],[S,Y]),[W,B]=N.useMemo(()=>{let se,He;if(l&&(se=Yn.makeSDate(l)),a&&(He=Yn.makeEDate(a)),se&&He&&Yn["<"](He,se)){console.warn("ADateRangePicker: maxDate should be greater than minDate. maxDate and minDate are swapped.");const We=se;se=He,He=We}return[se,He]},[l,a]),[ee,H]=N.useState("sD"),[V,de]=Ho(r,void 0),Z=N.useCallback(se=>{de&&(se===void 0?(de(void 0),Ve(""),Xe("")):(de({sDate:Yn.makeSDate(se.sDate),eDate:Yn.makeEDate(se.eDate)}),Ve(Yn.toString(se.sDate)),Xe(Yn.toString(se.eDate))))},[de]);N.useEffect(()=>{V&&(Ve(Yn.toString(V.sDate)),Xe(Yn.toString(V.eDate)))},[V]);const te=N.useCallback(se=>{if(!de)return;let He=V?V.sDate:Yn.makeSDate(se);se=Yn.makeEDate(se),de({sDate:He,eDate:se}),Ve(Yn.toString(He)),Xe(Yn.toString(se))},[de,V]),[ne,fe]=N.useState(),[ae,j]=N.useState(),re=N.useCallback(se=>{ee==="sD"&&Z({sDate:se,eDate:se}),fe(se),j(se)},[ee,Z,fe]),he=N.useCallback(se=>{ee==="sD"?ne&&(Yn.eq(ne,se)?H("eD"):Yn[">"](se,ne)?(te(se),fe(void 0)):(Z({sDate:se,eDate:ne}),fe(void 0))):(V?Yn["<"](se,V.sDate)?Z({sDate:se,eDate:V.eDate}):te(se):Z({sDate:se,eDate:se}),fe(void 0),H("sD"))},[te,ne,H,ee,Z,V,fe]),be=N.useCallback(se=>{ne&&j(se)},[ne]),le=N.useCallback(()=>{j(void 0),fe(void 0),H("sD")},[H,fe]),[J,pe]=N.useState(X2(V,W,B)),Te=N.useMemo(()=>_m(J.year,W,B,y),[J.year,W,B,y]),Fe=N.useMemo(()=>Ap(J.year,W,B),[W,B,J.year]),_e=N.useCallback(se=>{if(!Te.includes(se))return;const He={month:J.month,year:se},We=Ap(He.year,W,B);We.length<1||(We.includes(He.month)||(He.month<We[0]?He.month=We[0]:He.month>We[We.length-1]&&(He.month=We[We.length-1])),pe(He))},[W,B,Te,J.month]),Me=N.useCallback(se=>{Fe.includes(se)&&pe({month:se,year:J.year})},[Fe,J.year]),De=N.useMemo(()=>B?new Date(J.year,J.month+1,1)>B:!1,[J,B]),Re=N.useCallback(()=>{if(De||Fe.length<1)return;const se=J.month+1;se>11?pe({month:Fe[0],year:J.year+1}):pe({month:se,year:J.year})},[De,Fe,J]),Le=N.useMemo(()=>W?new Date(J.year,J.month,0)<W:!1,[J,W]),Oe=N.useCallback(()=>{if(Le||Fe.length<1)return;const se=J.month-1;se<Fe[0]?pe({month:Fe[Fe.length-1],year:J.year-1}):pe({month:se,year:J.year})},[Le,Fe,J]),[Ge,Ve]=N.useState(V!=null&&V.sDate?Yn.toString(V.sDate):""),Pe=N.useCallback(se=>{if(se.length>10||(Ve(se),se.length<10)||!de)return;let He=Yn.toDate(se);if(!He)return;W&&He<W&&(He=W),B&&He>B&&(He=B);let We=V?V.eDate:He;V&&Yn[">"](He,We)&&([He,We]=K2(He,We)),Z({sDate:He,eDate:We}),pe({month:He.getMonth(),year:He.getFullYear()})},[de,Z,V,W,B]),[ot,Xe]=N.useState(V!=null&&V.eDate?Yn.toString(V.eDate):""),lt=N.useCallback(se=>{if(se.length>10||(Xe(se),se.length<10)||!de)return;let He=Yn.toDate(se);if(!He)return;W&&He<W&&(He=W),B&&He>B&&(He=B);let We=V?V.sDate:He;V&&Yn[">"](We,He)&&([We,He]=K2(We,He)),Z({sDate:We,eDate:He}),pe({month:He.getMonth(),year:He.getFullYear()})},[de,Z,V,W,B]),Ye=N.useCallback(()=>{V&&(Ve(Yn.toString(V.sDate)),Xe(Yn.toString(V.eDate)))},[V]),mt=N.useMemo(()=>{const{month:se,year:He}=J,We=new Date(He,se,1),pt=new Date(He,se+1,0),wt=[];for(let Jt=0;Jt<We.getDay();Jt++){const hn=new Date(He,se,0).getDate()-We.getDay()+Jt+1,ln=new Date(He,se-1,hn),kn=W&&W>ln||B&&B<ln,Nn=V?Yn.be(V.sDate,ln,V.eDate):!1,En=ae&&V&&Yn.be(V.sDate,ln,ae);wt.push({day:hn,isSelected:Nn,isHovered:En,date:ln,isDisabled:kn,isCurrentMonth:!1})}for(let Jt=1;Jt<=pt.getDate();Jt++){const Vt=new Date(He,se,Jt),hn=W&&W>Vt||B&&B<Vt,ln=V?Yn.be(V.sDate,Vt,V.eDate):!1,kn=ae&&V&&Yn.be(V.sDate,Vt,ae);wt.push({day:Jt,isSelected:ln,isHovered:kn,date:Vt,isDisabled:hn,isCurrentMonth:!0})}for(let Jt=0;Jt<7-pt.getDay()-1;Jt++){const Vt=new Date(He,se+1,Jt+1),hn=W&&W>Vt||B&&B<Vt,ln=V?Yn.be(V.sDate,Vt,V.eDate):!1,kn=ae&&V&&Yn.be(V.sDate,Vt,ae);wt.push({day:Jt+1,isSelected:ln,isHovered:kn,date:Vt,isDisabled:hn,isCurrentMonth:!1})}const qt=[];for(let Jt=0;Jt<wt.length/7;Jt++)qt.push(k.jsx("div",{className:Qi.Week,children:wt.slice(Jt*7,Jt*7+7).map((Vt,hn)=>k.jsx(Ic,{isDisabled:Vt.isDisabled,type:"Raw",className:gt.clsx(Qi.Cell,Vt.isDisabled?Qi.IsDisabled:Vt.isCurrentMonth?Vt.isSelected?Qi.IsSelected:Vt.isHovered&&Qi.IsHovered:Qi.IsNotCurrentMonth),onMouseDown:()=>Vt.isCurrentMonth&&re(Vt.date),onMouseEnter:()=>Vt.isCurrentMonth&&be(Vt.date),onMouseUp:()=>Vt.isCurrentMonth&&he(Vt.date),children:Vt.day},hn))},Jt));return qt},[J,ae,V,W,B,re,he,be]),bt=N.useRef(null),Mt=N.useCallback(()=>{bt&&ym(bt,Kt,o)},[bt,o]),[Nt,_t]=N.useState(!1),[rn,pn]=N.useState(!1),Kt=N.useRef(null),dn=N.useCallback(()=>{u||h||(_t(!0),setTimeout(()=>pn(!0),0),setTimeout(()=>Mt(),0),pe(X2(V,W,B)))},[u,h,V,Mt,W,B]),zt=N.useCallback(()=>{u||h||(_t(!0),pn(!1))},[u,h]),wn=N.useMemo(()=>rn?zt:dn,[rn,dn,zt]),$t=N.useCallback(()=>_t(!1),[]),vn=N.useCallback(se=>{const He=document.getElementById("root"),We=se.target,pt=Kt.current,wt=bt.current;!He||!pt||!We||!wt||!pt.contains(We)&&He.contains(We)&&!wt.contains(We)&&zt()},[zt]);N.useEffect(()=>{if(rn)return setTimeout(()=>document.addEventListener("mousedown",vn),0),()=>document.removeEventListener("mousedown",vn)},[rn,vn]);const Pt=N.useCallback(()=>{Mt()},[Mt]);N.useEffect(()=>{if(!rn||!(bt!=null&&bt.current))return;const se=bt.current;let He=se.parentElement;for(;He;)He.addEventListener("scroll",Pt),He=He.parentElement;return()=>{let We=se.parentElement;for(;We;)We.removeEventListener("scroll",Pt),We=We.parentElement}},[bt,rn,Pt]),N.useEffect(()=>{if(rn)return window.addEventListener("resize",Pt),()=>window.removeEventListener("resize",Pt)},[rn,Pt]);const Yt=N.useCallback(se=>{se[0].intersectionRatio===0&&zt()},[zt]);N.useEffect(()=>{if(!rn)return;const se=new IntersectionObserver(Yt,{threshold:0});return Kt.current&&se.observe(Kt.current),()=>se.disconnect()},[Kt,rn,Yt]),N.useEffect(()=>{i&&(i.current={open:dn,close:zt,toggle:wn})},[i,dn,zt,wn]),N.useEffect(()=>{if(!V)return;let se={sDate:V.sDate,eDate:V.eDate};W&&(Yn["<"](V.sDate,W)&&(se.sDate=W),Yn["<"](V.eDate,W)&&(se.eDate=W)),B&&(Yn[">"](V.sDate,B)&&(se.sDate=B),Yn[">"](V.eDate,B)&&(se.eDate=B)),(se.sDate!==V.sDate||se.eDate!==V.eDate)&&Z(se)},[W,B,V,Z]);const ct=N.useCallback(se=>{O==null||O(se),wn()},[O,wn]),Tt=N.useCallback(se=>{Z(void 0),zt(),se.stopPropagation()},[Z,zt]),It=N.useCallback(()=>V?k.jsx(ba,{icon:"Close",style:{scale:"0.8"},type:"Raw",onClick:Tt}):null,[V,Tt]),ye=N.useMemo(()=>V?`${Yn.toString(V.sDate)} ~ ${Yn.toString(V.eDate)}`:k.jsx("span",{className:Qi.Placeholder,children:z}),[V,z]);return k.jsxs(k.Fragment,{children:[k.jsxs(Gi,{...P,abaseRef:bt,className:gt.clsx(Qi.Anchor,"IsClickable",Qi[e],t),isDisabled:u,isLoading:h,onClick:ct,children:[w,k.jsxs(N.Activity,{mode:e==="Primary"?"visible":"hidden",children:[k.jsx(ho,{className:gt.clsx(Qi.Icon,Qi[e]),icon:"CalendarDay"}),k.jsx(cs,{w:4})]}),ye,k.jsx(zg,{}),k.jsx(N.Activity,{mode:R?"hidden":"visible",children:k.jsx(It,{})}),k.jsx(N.Activity,{mode:e==="Secondary"?"visible":"hidden",children:k.jsx(ho,{className:gt.clsx(Qi.Icon,Qi[e]),icon:"CalendarDay"})}),k.jsx(N.Activity,{mode:_?"visible":"hidden",children:_})]}),(rn||Nt)&&su.createPortal(k.jsxs("div",{ref:Kt,className:Qi.ADateRangePicker,style:{opacity:+rn,visibility:rn?"visible":"hidden"},onMouseLeave:le,onTransitionEnd:$t,children:[k.jsxs("div",{className:Qi.StringInputContainer,children:[k.jsxs(bl,{children:[k.jsx(sg,{className:gt.clsx(Qi.String,ee==="sD"&&ae&&Qi.IsIdx),inputProps:{className:Qi.StringInput},maxLength:11,placeholder:"YYYY-MM-DD",useValue:[Ge,Pe],wrapProps:{className:Qi.StringInputWrap},onBlur:Ye}),k.jsx(cs,{w:8}),k.jsx(sg,{className:gt.clsx(Qi.String,ee==="eD"&&ae&&Qi.IsIdx),inputProps:{className:Qi.StringInput},maxLength:11,placeholder:"YYYY-MM-DD",useValue:[ot,lt],wrapProps:{className:Qi.StringInputWrap},onBlur:Ye})]}),!x&&k.jsxs(bl,{style:{marginTop:4},children:[k.jsx(u0,{children:Y["1일"],onClick:()=>Z({sDate:new Date,eDate:new Date})}),k.jsx(u0,{children:Y["1주일"],onClick:()=>Z({sDate:new Date(new Date().setDate(new Date().getDate()-7)),eDate:new Date})}),k.jsx(u0,{children:Y["1개월"],onClick:()=>Z({sDate:new Date(new Date().setMonth(new Date().getMonth()-1)),eDate:new Date})}),k.jsx(u0,{children:Y["3개월"],onClick:()=>Z({sDate:new Date(new Date().setMonth(new Date().getMonth()-3)),eDate:new Date})})]})]}),k.jsxs("div",{className:Qi.CalendarContainer,children:[k.jsxs(bl,{className:Qi.Header,children:[k.jsx(Ic,{className:Qi.Prev,isDisabled:Le,type:"Raw",onClick:Oe}),k.jsxs("div",{className:Qi.MonthYear,children:[k.jsx(Ah,{isAutoWidth:!0,className:Qi.Select,OptionRenderer:se=>Y.months(se.option),options:Fe,SelectedRenderer:se=>Y.months(se.selectedOption),type:"Secondary",useSelect:[J.month,Me]}),k.jsx(cs,{w:8}),k.jsx(Ah,{isAutoWidth:!0,className:Qi.Select,options:Te,type:"Secondary",useSelect:[J.year,_e]})]}),k.jsx(Ic,{className:Qi.Next,isDisabled:De,type:"Raw",onClick:Re})]}),k.jsx(cs,{h:10}),k.jsxs("div",{className:Qi.Calendar,children:[k.jsx("div",{className:Qi.Week,children:[0,1,2,3,4,5,6].map(se=>k.jsx("div",{className:gt.clsx(Qi.WeekDay,Qi.Cell),children:Y.weekDays(se)},se))}),mt]})]})]}),document.body)]})};function Ap(n,e,t){let r=0;e&&e.getFullYear()===n&&(r=e.getMonth());let i=11;t&&t.getFullYear()===n&&(i=t.getMonth());const o=[];for(let l=r;l<=i;l++)o.push(l);return o}function _m(n,e,t,r=5){const i=[];let o=n-r/2+r%2/2;e&&o<e.getFullYear()&&(o=e.getFullYear());let l=o+r-1;t&&l>t.getFullYear()&&(l=t.getFullYear());for(let a=o;a<=l;a++)i.push(a);return i}function X2(n,e,t){return n??(n={sDate:new Date,eDate:new Date}),e&&Yn["<"](n.sDate,e)?{month:e.getMonth(),year:e.getFullYear()}:t&&Yn[">"](n.eDate,t)?{month:t.getMonth(),year:t.getFullYear()}:{month:n.sDate.getMonth(),year:n.sDate.getFullYear()}}function K2(n,e){return[e,n]}const u0=n=>{const e=Dn.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=gt.clsx(Qi.ChoiceButton,"Headline2"),e[0]=t):t=e[0];let r;return e[1]!==n?(r=k.jsx(Ic,{className:t,type:"Secondary",...n}),e[1]=n,e[2]=r):r=e[2],r},h8=["Primary","Secondary","Raw"],Sm=n=>{const e=Dn.c(255);let t,r,i,o,l,a,u,h,y,x,w,_,S,R,I,O;e[0]!==n?({type:R,className:l,useDate:O,actionRef:o,position:I,minDate:u,maxDate:a,isDisabled:w,isLoading:_,placeholder:y,LeftAddon:t,RightAddon:r,resources:x,noClearButton:S,onClick:h,...i}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S,e[14]=R,e[15]=I,e[16]=O):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13],R=e[14],I=e[15],O=e[16]);const P=R===void 0?"Primary":R,Y=I===void 0?L1.SE:I;let z;e[17]!==x?(z={...Nr.ADatePicker,...x},e[17]=x,e[18]=z):z=e[18];const W=z,B=y??W["Select Date"];let ee;if(e[19]!==a||e[20]!==u){e:{let an,On;if(u&&(an=Yn.makeSDate(u)),a&&(On=Yn.makeEDate(a)),an&&On&&Yn["<"](On,an)){console.warn("ADatePicker: maxDate should be greater than minDate. maxDate and minDate are swapped."),ee=[Yn.makeSDate(On),Yn.makeEDate(an)];break e}let Fr;e[22]!==On||e[23]!==an?(Fr=[an,On],e[22]=On,e[23]=an,e[24]=Fr):Fr=e[24],ee=Fr}e[19]=a,e[20]=u,e[21]=ee}else ee=e[21];const[H,V]=ee,[de,Z]=Ho(O,void 0);let te;e[25]!==de?(te=de?Yn.toString(de):"",e[25]=de,e[26]=te):te=e[26];const[ne,fe]=N.useState(te);let ae;e[27]!==V||e[28]!==H||e[29]!==de?(ae=()=>{const an=de??new Date;return H&&an<H?H.getMonth():V&&an>V?V.getMonth():(an??new Date).getMonth()},e[27]=V,e[28]=H,e[29]=de,e[30]=ae):ae=e[30];const[j,re]=N.useState(ae);let he;e[31]!==V||e[32]!==H||e[33]!==de?(he=()=>{const an=de??new Date;return H&&an<H?H.getFullYear():V&&an>V?V.getFullYear():(an??new Date).getFullYear()},e[31]=V,e[32]=H,e[33]=de,e[34]=he):he=e[34];const[be,le]=N.useState(he);let J;e[35]!==V||e[36]!==H||e[37]!==j?(J=an=>{le(an);const On=Ap(an,H,V);On.includes(j)||(j<On[0]?re(On[0]):j>On[On.length-1]&&re(On[On.length-1]))},e[35]=V,e[36]=H,e[37]=j,e[38]=J):J=e[38];const pe=J;let Te;e[39]!==V||e[40]!==H||e[41]!==Z?(Te=an=>{if(an.length>10||(fe(an),an.length<10)||!Z)return;let On=Yn.toDate(an);On&&(H&&On<H&&(On=H),V&&On>V&&(On=V),Z(On),le(On.getFullYear()),re(On.getMonth()))},e[39]=V,e[40]=H,e[41]=Z,e[42]=Te):Te=e[42];const Fe=Te;let _e;e[43]!==be?(_e=an=>{const On=be+an;On<0||le(On)},e[43]=be,e[44]=_e):_e=e[44];const Me=_e;let De;e[45]!==j||e[46]!==Me?(De=an=>{const On=j+an;On<0?(re(11),Me(-1)):On>11?(re(0),Me(1)):re(On)},e[45]=j,e[46]=Me,e[47]=De):De=e[47];const Re=De;let Le;e[48]!==Z?(Le=an=>{Z&&(an===void 0?(Z(void 0),fe("")):(Z(an),fe(Yn.toString(an))))},e[48]=Z,e[49]=Le):Le=e[49];const Oe=Le;let Ge;e[50]!==j||e[51]!==be?(Ge=new Date(be,j,0),e[50]=j,e[51]=be,e[52]=Ge):Ge=e[52];const Pe=H&&Ge<H,ot=j+1;let Xe;e[53]!==ot||e[54]!==be?(Xe=new Date(be,ot,1),e[53]=ot,e[54]=be,e[55]=Xe):Xe=e[55];const Ye=V&&Xe>V;let mt;e[56]!==Pe||e[57]!==Re?(mt=()=>{Pe||Re(-1)},e[56]=Pe,e[57]=Re,e[58]=mt):mt=e[58];const bt=mt;let Mt;e[59]!==Ye||e[60]!==Re?(Mt=()=>{Ye||Re(1)},e[59]=Ye,e[60]=Re,e[61]=Mt):Mt=e[61];const Nt=Mt,[_t,rn]=N.useState(null);let pn;e[62]!==Z?(pn=()=>{Z&&rn(null)},e[62]=Z,e[63]=pn):pn=e[63];const Kt=pn;let dn;e[64]!==Z?(dn=an=>{Z&&rn(an)},e[64]=Z,e[65]=dn):dn=e[65];const zt=dn;let wn;if(e[66]!==Oe||e[67]!==_t||e[68]!==V||e[69]!==H||e[70]!==j||e[71]!==zt||e[72]!==Kt||e[73]!==de||e[74]!==be){const an=new Date(be,j,1),On=new Date(be,j+1,0),Fr=[];for(let tr=0;tr<an.getDay();tr++){const ir=new Date(be,j,0).getDate()-an.getDay()+tr+1,Tr=new Date(be,j-1,ir),mi=H&&H>Tr||V&&V<Tr,Li=de&&Yn.eq(Tr,de),Br=_t&&Yn.eq(Tr,_t);Fr.push({day:ir,isSelected:Li,date:Tr,isDisabled:mi,isHovered:Br,isCurrentMonth:!1})}for(let tr=1;tr<=On.getDate();tr++){const fr=new Date(be,j,tr),ir=H&&H>fr||V&&V<fr,Tr=de&&Yn.eq(fr,de),mi=_t&&Yn.eq(fr,_t);Fr.push({day:tr,isSelected:Tr,date:fr,isDisabled:ir,isHovered:mi,isCurrentMonth:!0})}for(let tr=0;tr<7-On.getDay()-1;tr++){const fr=new Date(be,j+1,tr+1),ir=H&&H>fr||V&&V<fr,Tr=de&&Yn.eq(fr,de),mi=_t&&Yn.eq(fr,_t);Fr.push({day:tr+1,isSelected:Tr,date:fr,isDisabled:ir,isHovered:mi,isCurrentMonth:!1})}wn=[];for(let tr=0;tr<Fr.length/7;tr++)wn.push(k.jsx("div",{className:Jo.Week,children:Fr.slice(tr*7,tr*7+7).map((fr,ir)=>k.jsx(Ic,{isDisabled:fr.isDisabled,type:"Raw",className:gt.clsx(Jo.Cell,fr.isDisabled?Jo.IsDisabled:fr.isCurrentMonth?fr.isSelected?Jo.IsSelected:fr.isHovered&&Jo.IsHovered:Jo.IsNotCurrentMonth),onClick:()=>fr.isCurrentMonth&&Oe(fr.date),onMouseEnter:()=>fr.isCurrentMonth&&zt(fr.date),onMouseLeave:()=>fr.isCurrentMonth&&Kt(),children:fr.day},ir))},tr));e[66]=Oe,e[67]=_t,e[68]=V,e[69]=H,e[70]=j,e[71]=zt,e[72]=Kt,e[73]=de,e[74]=be,e[75]=wn}else wn=e[75];const $t=wn,vn=N.useRef(null);let Pt;e[76]!==Y?(Pt=()=>{vn&&ym(vn,se,Y)},e[76]=Y,e[77]=Pt):Pt=e[77];const Yt=Pt,[ct,Tt]=N.useState(!1),[It,ye]=N.useState(!1),se=N.useRef(null);let He;e[78]!==Yt||e[79]!==w||e[80]!==_||e[81]!==V||e[82]!==H||e[83]!==de?(He=()=>{w||_||(Tt(!0),setTimeout(()=>ye(!0),0),setTimeout(()=>Yt(),0),fe(de?Yn.toString(de):""),re(()=>{const an=de??new Date;return H&&an<H?H.getMonth():V&&an>V?V.getMonth():an.getMonth()}),le(()=>{const an=de??new Date;return H&&an<H?H.getFullYear():V&&an>V?V.getFullYear():an.getFullYear()}))},e[78]=Yt,e[79]=w,e[80]=_,e[81]=V,e[82]=H,e[83]=de,e[84]=He):He=e[84];const We=He;let pt;e[85]!==w||e[86]!==_?(pt=()=>{w||_||(Tt(!0),ye(!1))},e[85]=w,e[86]=_,e[87]=pt):pt=e[87];const wt=pt,qt=It?wt:We;let Jt;e[88]===Symbol.for("react.memo_cache_sentinel")?(Jt=()=>Tt(!1),e[88]=Jt):Jt=e[88];const Vt=Jt;let hn;e[89]!==wt?(hn=an=>{const On=document.getElementById("root"),Fr=an.target,tr=se.current,fr=vn.current;!On||!tr||!Fr||!fr||!tr.contains(Fr)&&On.contains(Fr)&&!fr.contains(Fr)&&wt()},e[89]=wt,e[90]=hn):hn=e[90];const ln=hn;let kn,Nn;e[91]!==It||e[92]!==ln?(kn=()=>{if(It)return setTimeout(()=>document.addEventListener("mousedown",ln),0),()=>document.removeEventListener("mousedown",ln)},Nn=[It,ln],e[91]=It,e[92]=ln,e[93]=kn,e[94]=Nn):(kn=e[93],Nn=e[94]),N.useEffect(kn,Nn);let En;e[95]!==Yt?(En=()=>{Yt()},e[95]=Yt,e[96]=En):En=e[96];const Cn=En;let rr,Bt;e[97]!==It||e[98]!==Cn?(rr=()=>{if(!It||!(vn!=null&&vn.current))return;const an=vn.current;let On=an.parentElement;for(;On;)On.addEventListener("scroll",Cn),On=On.parentElement;return()=>{let Fr=an.parentElement;for(;Fr;)Fr.removeEventListener("scroll",Cn),Fr=Fr.parentElement}},Bt=[vn,It,Cn],e[97]=It,e[98]=Cn,e[99]=rr,e[100]=Bt):(rr=e[99],Bt=e[100]),N.useEffect(rr,Bt);let Ut,yn;e[101]!==It||e[102]!==Cn?(Ut=()=>{if(It)return window.addEventListener("resize",Cn),()=>window.removeEventListener("resize",Cn)},yn=[It,Cn],e[101]=It,e[102]=Cn,e[103]=Ut,e[104]=yn):(Ut=e[103],yn=e[104]),N.useEffect(Ut,yn);let Ft;e[105]!==wt?(Ft=an=>{an[0].intersectionRatio===0&&wt()},e[105]=wt,e[106]=Ft):Ft=e[106];const jn=Ft;let Hn;e[107]!==It||e[108]!==jn?(Hn=()=>{if(!It)return;const an=new IntersectionObserver(jn,{threshold:0});return se.current&&an.observe(se.current),()=>an.disconnect()},e[107]=It,e[108]=jn,e[109]=Hn):Hn=e[109];let Rn;e[110]!==It||e[111]!==jn?(Rn=[se,It,jn],e[110]=It,e[111]=jn,e[112]=Rn):Rn=e[112],N.useEffect(Hn,Rn);let Et,rt;e[113]!==o||e[114]!==wt||e[115]!==We||e[116]!==qt?(Et=()=>{o&&(o.current={open:We,close:wt,toggle:qt})},rt=[o,We,wt,qt],e[113]=o,e[114]=wt,e[115]=We,e[116]=qt,e[117]=Et,e[118]=rt):(Et=e[117],rt=e[118]),N.useEffect(Et,rt);let tn;e[119]!==h||e[120]!==qt?(tn=an=>{h==null||h(an),qt()},e[119]=h,e[120]=qt,e[121]=tn):tn=e[121];const Ln=tn;let mr;e[122]!==Oe||e[123]!==wt?(mr=an=>{Oe(void 0),wt(),an.stopPropagation()},e[122]=Oe,e[123]=wt,e[124]=mr):mr=e[124];const wr=mr;let gn;e[125]!==wr||e[126]!==de?(gn=()=>de?k.jsx(ba,{icon:"Close",style:{scale:"0.8"},type:"Raw",onClick:wr}):null,e[125]=wr,e[126]=de,e[127]=gn):gn=e[127];const Dt=gn;let Se;if(de){let an;e[128]!==de?(an=Yn.toString(de),e[128]=de,e[129]=an):an=e[129],Se=an}else{let an;e[130]!==B?(an=k.jsx("span",{className:Jo.Placeholder,children:B}),e[130]=B,e[131]=an):an=e[131],Se=an}const it=Se;let St;e[132]!==l||e[133]!==P?(St=gt.clsx(Jo.Anchor,"IsClickable",Jo[P],l),e[132]=l,e[133]=P,e[134]=St):St=e[134];const mn=P==="Primary"?"visible":"hidden";let An;e[135]!==P?(An=gt.clsx(Jo.Icon,Jo[P]),e[135]=P,e[136]=An):An=e[136];let Gn;e[137]!==An?(Gn=k.jsx(ho,{className:An,icon:"CalendarDay"}),e[137]=An,e[138]=Gn):Gn=e[138];let cr;e[139]===Symbol.for("react.memo_cache_sentinel")?(cr=k.jsx(cs,{w:4}),e[139]=cr):cr=e[139];let gr;e[140]!==mn||e[141]!==Gn?(gr=k.jsxs(N.Activity,{mode:mn,children:[Gn,cr]}),e[140]=mn,e[141]=Gn,e[142]=gr):gr=e[142];let Sn;e[143]===Symbol.for("react.memo_cache_sentinel")?(Sn=k.jsx(zg,{}),e[143]=Sn):Sn=e[143];const Qn=S?"hidden":"visible";let xn;e[144]!==Dt?(xn=k.jsx(Dt,{}),e[144]=Dt,e[145]=xn):xn=e[145];let ur;e[146]!==Qn||e[147]!==xn?(ur=k.jsx(N.Activity,{mode:Qn,children:xn}),e[146]=Qn,e[147]=xn,e[148]=ur):ur=e[148];const si=P==="Secondary"?"visible":"hidden";let xo;e[149]!==P?(xo=gt.clsx(Jo.Icon,Jo[P]),e[149]=P,e[150]=xo):xo=e[150];let wo;e[151]!==xo?(wo=k.jsx(ho,{className:xo,icon:"CalendarDay"}),e[151]=xo,e[152]=wo):wo=e[152];let so;e[153]!==si||e[154]!==wo?(so=k.jsx(N.Activity,{mode:si,children:wo}),e[153]=si,e[154]=wo,e[155]=so):so=e[155];const ai=r?"visible":"hidden";let qi;e[156]!==r||e[157]!==ai?(qi=k.jsx(N.Activity,{mode:ai,children:r}),e[156]=r,e[157]=ai,e[158]=qi):qi=e[158];let Yi;e[159]!==t||e[160]!==i||e[161]!==it||e[162]!==w||e[163]!==_||e[164]!==Ln||e[165]!==St||e[166]!==gr||e[167]!==ur||e[168]!==so||e[169]!==qi?(Yi=k.jsxs(Gi,{...i,abaseRef:vn,className:St,isDisabled:w,isLoading:_,onClick:Ln,children:[t,gr,it,Sn,ur,so,qi]}),e[159]=t,e[160]=i,e[161]=it,e[162]=w,e[163]=_,e[164]=Ln,e[165]=St,e[166]=gr,e[167]=ur,e[168]=so,e[169]=qi,e[170]=Yi):Yi=e[170];const Jl=It||ct?"visible":"hidden";let Wo;if(e[171]!==$t||e[172]!==ne||e[173]!==Ye||e[174]!==It||e[175]!==Pe||e[176]!==V||e[177]!==H||e[178]!==j||e[179]!==Fe||e[180]!==Nt||e[181]!==bt||e[182]!==pe||e[183]!==W||e[184]!==de||e[185]!==be){const an=+It;let On;e[187]!==an?(On={opacity:an},e[187]=an,e[188]=On):On=e[188];let Fr;e[189]===Symbol.for("react.memo_cache_sentinel")?(Fr={className:Jo.StringInput},e[189]=Fr):Fr=e[189];const tr=de?30:11;let fr;e[190]!==ne||e[191]!==Fe?(fr=[ne,Fe],e[190]=ne,e[191]=Fe,e[192]=fr):fr=e[192];let ir;e[193]===Symbol.for("react.memo_cache_sentinel")?(ir={className:Jo.StringInputWrap},e[193]=ir):ir=e[193];let Tr;e[194]!==tr||e[195]!==fr?(Tr=k.jsx("div",{className:Jo.StringInputContainer,children:k.jsx(sg,{className:Jo.String,inputProps:Fr,maxLength:tr,placeholder:"YYYY-MM-DD",useValue:fr,wrapProps:ir})}),e[194]=tr,e[195]=fr,e[196]=Tr):Tr=e[196];let mi;e[197]!==Pe||e[198]!==bt?(mi=k.jsx(Ic,{className:Jo.Prev,isDisabled:Pe,type:"Raw",onClick:bt}),e[197]=Pe,e[198]=bt,e[199]=mi):mi=e[199];let Li;e[200]!==W?(Li=Mo=>W.months(Mo.option),e[200]=W,e[201]=Li):Li=e[201];let Br;e[202]!==V||e[203]!==H||e[204]!==be?(Br=Ap(be,H,V),e[202]=V,e[203]=H,e[204]=be,e[205]=Br):Br=e[205];let Uo;e[206]!==W?(Uo=Mo=>W.months(Mo.selectedOption),e[206]=W,e[207]=Uo):Uo=e[207];let To;e[208]!==j?(To=[j,re],e[208]=j,e[209]=To):To=e[209];let Ro;e[210]!==Li||e[211]!==Br||e[212]!==Uo||e[213]!==To?(Ro=k.jsx(Ah,{isAutoWidth:!0,className:Jo.Select,OptionRenderer:Li,options:Br,SelectedRenderer:Uo,type:"Secondary",useSelect:To}),e[210]=Li,e[211]=Br,e[212]=Uo,e[213]=To,e[214]=Ro):Ro=e[214];let Oi;e[215]===Symbol.for("react.memo_cache_sentinel")?(Oi=k.jsx(cs,{w:8}),e[215]=Oi):Oi=e[215];let Kr;e[216]!==V||e[217]!==H||e[218]!==be?(Kr=_m(be,H,V),e[216]=V,e[217]=H,e[218]=be,e[219]=Kr):Kr=e[219];let Cr;e[220]!==pe||e[221]!==be?(Cr=[be,pe],e[220]=pe,e[221]=be,e[222]=Cr):Cr=e[222];let al;e[223]!==Kr||e[224]!==Cr?(al=k.jsx(Ah,{isAutoWidth:!0,className:Jo.Select,options:Kr,type:"Secondary",useSelect:Cr}),e[223]=Kr,e[224]=Cr,e[225]=al):al=e[225];let Si;e[226]!==Ro||e[227]!==al?(Si=k.jsxs("div",{className:Jo.MonthYear,children:[Ro,Oi,al]}),e[226]=Ro,e[227]=al,e[228]=Si):Si=e[228];let ji;e[229]!==Ye||e[230]!==Nt?(ji=k.jsx(Ic,{className:Jo.Next,isDisabled:Ye,type:"Raw",onClick:Nt}),e[229]=Ye,e[230]=Nt,e[231]=ji):ji=e[231];let cl;e[232]!==mi||e[233]!==Si||e[234]!==ji?(cl=k.jsxs(bl,{className:Jo.Header,children:[mi,Si,ji]}),e[232]=mi,e[233]=Si,e[234]=ji,e[235]=cl):cl=e[235];let Io;e[236]===Symbol.for("react.memo_cache_sentinel")?(Io=k.jsx(cs,{h:10}),e[236]=Io):Io=e[236];let $i;e[237]!==W?($i=k.jsx("div",{className:Jo.Week,children:[0,1,2,3,4,5,6].map(Mo=>k.jsx("div",{className:gt.clsx(Jo.WeekDay,Jo.Cell),children:W.weekDays(Mo)},Mo))}),e[237]=W,e[238]=$i):$i=e[238];let ko;e[239]!==$t||e[240]!==$i?(ko=k.jsxs("div",{className:Jo.Calendar,children:[$i,$t]}),e[239]=$t,e[240]=$i,e[241]=ko):ko=e[241];let _o;e[242]!==cl||e[243]!==ko?(_o=k.jsxs("div",{className:Jo.CalendarContainer,children:[cl,Io,ko]}),e[242]=cl,e[243]=ko,e[244]=_o):_o=e[244];let go;e[245]!==On||e[246]!==Tr||e[247]!==_o?(go=k.jsxs("div",{ref:se,className:Jo.ADatePicker,style:On,onTransitionEnd:Vt,children:[Tr,_o]}),e[245]=On,e[246]=Tr,e[247]=_o,e[248]=go):go=e[248],Wo=su.createPortal(go,document.body),e[171]=$t,e[172]=ne,e[173]=Ye,e[174]=It,e[175]=Pe,e[176]=V,e[177]=H,e[178]=j,e[179]=Fe,e[180]=Nt,e[181]=bt,e[182]=pe,e[183]=W,e[184]=de,e[185]=be,e[186]=Wo}else Wo=e[186];let Co;e[249]!==Jl||e[250]!==Wo?(Co=k.jsx(N.Activity,{mode:Jl,children:Wo}),e[249]=Jl,e[250]=Wo,e[251]=Co):Co=e[251];let ri;return e[252]!==Yi||e[253]!==Co?(ri=k.jsxs(k.Fragment,{children:[Yi,Co]}),e[252]=Yi,e[253]=Co,e[254]=ri):ri=e[254],ri},g8="_Paper_e69j5_1",p8="_Card_e69j5_15",v8="_Body_e69j5_26",b8="_Title_e69j5_35",y8="_Content_e69j5_42",m8="_Action_e69j5_45",x8="_Button_e69j5_58",Qd={Paper:g8,Card:p8,Body:v8,Title:b8,Content:y8,Action:m8,Button:x8},w8=["okCancel","cancelOk","ok","cancel","none"],C8=n=>{const e=Dn.c(129),{dlgCore:t,type:r,title:i,children:o,style:l,titleStyle:a,bodyStyle:u,contentStyle:h,okButtonStyle:y,cancelButtonStyle:x,actionStyle:w,onOk:_,onCancel:S,onClose:R,onEnterPress:I,onEscPress:O,onSpacePress:P,onPaperClick:Y,noDim:z,isLoading:W,isOkDisabled:B,isOkLoading:ee,isCancelDisabled:H,isCancelLoading:V,isChanged:de,buttonNoInteractive:Z,okButtonClassName:te,cancelButtonClassName:ne,progress:fe,ProgressRenderer:ae,progressProps:j,resources:re}=n,he=r===void 0?"okCancel":r,be=z===void 0?!1:z;let le;e[0]!==re?(le={...Nr.ADialog,...re},e[0]=re,e[1]=le):le=e[1];const J=le,[pe,Te]=N.useState(0);let Fe,_e;e[2]===Symbol.for("react.memo_cache_sentinel")?(Fe=()=>Te(1),_e=[],e[2]=Fe,e[3]=_e):(Fe=e[2],_e=e[3]),N.useEffect(Fe,_e);let Me;e[4]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>{Te(0)},e[4]=Me):Me=e[4];const De=Me;let Re;e[5]!==t||e[6]!==R||e[7]!==pe?(Re=()=>{if(!pe){const[,He]=t.state.useIsOpen;He==null||He(!1),R==null||R()}},e[5]=t,e[6]=R,e[7]=pe,e[8]=Re):Re=e[8];const Le=Re;let Oe;e[9]!==W||e[10]!==B||e[11]!==ee||e[12]!==_||e[13]!==pe||e[14]!==he?(Oe=async()=>{if(!pe||he==="cancel"||he==="none"||W||B||ee)return;const{event:He,e:We}=Ag();await(_==null?void 0:_(We)),!He.preventDefault&&De()},e[9]=W,e[10]=B,e[11]=ee,e[12]=_,e[13]=pe,e[14]=he,e[15]=Oe):Oe=e[15];const Ge=Oe;let Ve;e[16]!==H||e[17]!==V||e[18]!==W||e[19]!==S||e[20]!==pe||e[21]!==he?(Ve=async()=>{if(!pe||he==="ok"||he==="none"||W||H||V)return;const{event:He,e:We}=Ag();await(S==null?void 0:S(We)),!He.preventDefault&&De()},e[16]=H,e[17]=V,e[18]=W,e[19]=S,e[20]=pe,e[21]=he,e[22]=Ve):Ve=e[22];const Pe=Ve;let ot,Xe;e[23]!==Pe||e[24]!==t||e[25]!==Ge?(Xe=()=>{t&&t.state.setAction({close:De,ok:Ge,cancel:Pe})},ot=[t,De,Ge,Pe],e[23]=Pe,e[24]=t,e[25]=Ge,e[26]=ot,e[27]=Xe):(ot=e[26],Xe=e[27]),N.useEffect(Xe,ot);let lt;e[28]!==I||e[29]!==W||e[30]!==Ge?(lt=async()=>{if(W)return;const{event:He,e:We}=Ag();await(I==null?void 0:I(We)),!He.preventDefault&&Ge()},e[28]=I,e[29]=W,e[30]=Ge,e[31]=lt):lt=e[31];const Ye=lt;let mt;e[32]!==P||e[33]!==W||e[34]!==Ge?(mt=async()=>{if(W)return;const{event:He,e:We}=Ag();await(P==null?void 0:P(We)),!He.preventDefault&&Ge()},e[32]=P,e[33]=W,e[34]=Ge,e[35]=mt):mt=e[35];const bt=mt;let Mt;e[36]!==Pe||e[37]!==O||e[38]!==de||e[39]!==W?(Mt=async()=>{if(W)return;const{event:He,e:We}=Ag();await(O==null?void 0:O(We)),!He.preventDefault&&(de||Pe())},e[36]=Pe,e[37]=O,e[38]=de,e[39]=W,e[40]=Mt):Mt=e[40];const Nt=Mt,_t=N.useRef(null);let rn;e[41]!==Ye||e[42]!==Nt||e[43]!==bt||e[44]!==pe?(rn=He=>{const We=document.body.getElementsByClassName(Qd.Paper);We.length===0||We[We.length-1]!==_t.current||(He.key==="Enter"&&pe?Ye():He.key===" "&&pe?bt():He.key==="Escape"&&pe&&Nt())},e[41]=Ye,e[42]=Nt,e[43]=bt,e[44]=pe,e[45]=rn):rn=e[45];const pn=rn;let Kt,dn;e[46]!==pn||e[47]!==pe?(Kt=()=>{if(pe)return window.addEventListener("keydown",pn),()=>window.removeEventListener("keydown",pn)},dn=[pe,pn],e[46]=pn,e[47]=pe,e[48]=Kt,e[49]=dn):(Kt=e[48],dn=e[49]),N.useEffect(Kt,dn);const zt=N.useRef(!1),wn=N.useRef(!1);let $t;e[50]===Symbol.for("react.memo_cache_sentinel")?($t=()=>{zt.current=!0},e[50]=$t):$t=e[50];const vn=$t;let Pt;e[51]===Symbol.for("react.memo_cache_sentinel")?(Pt=()=>{zt.current=!1,wn.current=!1},e[51]=Pt):Pt=e[51];const Yt=Pt;let ct;e[52]===Symbol.for("react.memo_cache_sentinel")?(ct=()=>{wn.current=!0},e[52]=ct):ct=e[52];const Tt=ct;let It;e[53]!==Pe||e[54]!==Y||e[55]!==de||e[56]!==W?(It=async()=>{if(W)return;const He=!wn.current||zt.current;if(zt.current=!1,wn.current=!1,He)return;const{event:We,e:pt}=Ag();await(Y==null?void 0:Y(pt)),!We.preventDefault&&(de||Pe())},e[53]=Pe,e[54]=Y,e[55]=de,e[56]=W,e[57]=It):It=e[57];const ye=It;let se;if(e[58]!==ae||e[59]!==w||e[60]!==u||e[61]!==Z||e[62]!==Pe||e[63]!==ne||e[64]!==x||e[65]!==o||e[66]!==h||e[67]!==H||e[68]!==V||e[69]!==W||e[70]!==B||e[71]!==ee||e[72]!==be||e[73]!==Ge||e[74]!==te||e[75]!==y||e[76]!==ye||e[77]!==Le||e[78]!==pe||e[79]!==fe||e[80]!==j||e[81]!==J||e[82]!==l||e[83]!==i||e[84]!==a||e[85]!==he){const He=be?"transparent":void 0,We=pe?void 0:"none";let pt;e[87]!==pe||e[88]!==He||e[89]!==We?(pt={backgroundColor:He,pointerEvents:We,opacity:pe},e[87]=pe,e[88]=He,e[89]=We,e[90]=pt):pt=e[90];let wt;e[91]!==i||e[92]!==a?(wt=i&&k.jsx(_8,{title:i,titleStyle:a}),e[91]=i,e[92]=a,e[93]=wt):wt=e[93];let qt;e[94]!==o||e[95]!==h?(qt=o&&k.jsx("div",{className:Qd.Content,style:h,children:o}),e[94]=o,e[95]=h,e[96]=qt):qt=e[96];let Jt;e[97]!==u||e[98]!==wt||e[99]!==qt?(Jt=k.jsxs("div",{className:Qd.Body,style:u,children:[wt,qt]}),e[97]=u,e[98]=wt,e[99]=qt,e[100]=Jt):Jt=e[100];let Vt;e[101]!==w||e[102]!==Z||e[103]!==Pe||e[104]!==ne||e[105]!==x||e[106]!==H||e[107]!==V||e[108]!==B||e[109]!==ee||e[110]!==Ge||e[111]!==te||e[112]!==y||e[113]!==J||e[114]!==he?(Vt=he!=="none"&&k.jsx(S8,{type:he,ok:Ge,cancel:Pe,resources:J,isOkDisabled:B,isOkLoading:ee,isCancelDisabled:H,isCancelLoading:V,okButtonStyle:y,cancelButtonStyle:x,actionStyle:w,buttonNoInteractive:Z,okButtonClassName:te,cancelButtonClassName:ne}),e[101]=w,e[102]=Z,e[103]=Pe,e[104]=ne,e[105]=x,e[106]=H,e[107]=V,e[108]=B,e[109]=ee,e[110]=Ge,e[111]=te,e[112]=y,e[113]=J,e[114]=he,e[115]=Vt):Vt=e[115];let hn;e[116]!==ae||e[117]!==W||e[118]!==fe||e[119]!==j||e[120]!==l||e[121]!==Jt||e[122]!==Vt?(hn=k.jsxs(Gi,{className:Qd.Card,isLoading:W,progress:fe,progressProps:j,ProgressRenderer:ae,style:l,onMouseDown:vn,onMouseUp:Yt,children:[Jt,Vt]}),e[116]=ae,e[117]=W,e[118]=fe,e[119]=j,e[120]=l,e[121]=Jt,e[122]=Vt,e[123]=hn):hn=e[123];let ln;e[124]!==ye||e[125]!==Le||e[126]!==pt||e[127]!==hn?(ln=k.jsx("div",{ref:_t,className:Qd.Paper,style:pt,onMouseDown:Tt,onMouseUp:ye,onTransitionEnd:Le,children:hn}),e[124]=ye,e[125]=Le,e[126]=pt,e[127]=hn,e[128]=ln):ln=e[128],se=su.createPortal(ln,document.body),e[58]=ae,e[59]=w,e[60]=u,e[61]=Z,e[62]=Pe,e[63]=ne,e[64]=x,e[65]=o,e[66]=h,e[67]=H,e[68]=V,e[69]=W,e[70]=B,e[71]=ee,e[72]=be,e[73]=Ge,e[74]=te,e[75]=y,e[76]=ye,e[77]=Le,e[78]=pe,e[79]=fe,e[80]=j,e[81]=J,e[82]=l,e[83]=i,e[84]=a,e[85]=he,e[86]=se}else se=e[86];return se},_8=n=>{const e=Dn.c(4),{title:t,titleStyle:r}=n;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=gt.clsx(Qd.Title,"NoSelect","Title3"),e[0]=i):i=e[0];let o;return e[1]!==t||e[2]!==r?(o=k.jsx("div",{className:i,style:r,children:t}),e[1]=t,e[2]=r,e[3]=o):o=e[3],o},S8=n=>{const e=Dn.c(41),{type:t,ok:r,cancel:i,resources:o,isOkDisabled:l,isOkLoading:a,isCancelDisabled:u,isCancelLoading:h,okButtonStyle:y,cancelButtonStyle:x,actionStyle:w,buttonNoInteractive:_,okButtonClassName:S,cancelButtonClassName:R}=n,I=o.Ok;let O;e[0]!==S?(O=gt.clsx(Qd.Button,S),e[0]=S,e[1]=O):O=e[1];let P;e[2]!==_||e[3]!==l||e[4]!==a||e[5]!==r||e[6]!==y||e[7]!==o.Ok||e[8]!==O?(P={onClick:r,isDisabled:l,isLoading:a,children:I,style:y,noInteractive:_,className:O},e[2]=_,e[3]=l,e[4]=a,e[5]=r,e[6]=y,e[7]=o.Ok,e[8]=O,e[9]=P):P=e[9];const Y=P,z=o.Cancel;let W;e[10]!==R?(W=gt.clsx(Qd.Button,R),e[10]=R,e[11]=W):W=e[11];let B;e[12]!==_||e[13]!==i||e[14]!==x||e[15]!==u||e[16]!==h||e[17]!==o.Cancel||e[18]!==W?(B={type:"Secondary",onClick:i,isDisabled:u,isLoading:h,children:z,style:x,noInteractive:_,className:W},e[12]=_,e[13]=i,e[14]=x,e[15]=u,e[16]=h,e[17]=o.Cancel,e[18]=W,e[19]=B):B=e[19];const ee=B;if(t==="okCancel"||t==="ok"){let H;e[20]!==w?(H={...w},e[20]=w,e[21]=H):H=e[21];let V;e[22]!==Y?(V=k.jsx(Ic,{...Y}),e[22]=Y,e[23]=V):V=e[23];let de;e[24]!==ee||e[25]!==t?(de=t==="okCancel"&&k.jsxs(k.Fragment,{children:[k.jsx(cs,{w:8}),k.jsx(Ic,{...ee})]}),e[24]=ee,e[25]=t,e[26]=de):de=e[26];let Z;return e[27]!==H||e[28]!==V||e[29]!==de||e[30]!==t?(Z=k.jsxs("div",{className:Qd.Action,style:H,children:[V,de]},t),e[27]=H,e[28]=V,e[29]=de,e[30]=t,e[31]=Z):Z=e[31],Z}else if(t==="cancelOk"||t==="cancel"){let H;e[32]!==ee?(H=k.jsx(Ic,{...ee}),e[32]=ee,e[33]=H):H=e[33];let V;e[34]!==Y||e[35]!==t?(V=t==="cancelOk"&&k.jsxs(k.Fragment,{children:[k.jsx(cs,{w:8}),k.jsx(Ic,{...Y})]}),e[34]=Y,e[35]=t,e[36]=V):V=e[36];let de;return e[37]!==H||e[38]!==V||e[39]!==t?(de=k.jsxs("div",{className:Qd.Action,children:[H,V]},t),e[37]=H,e[38]=V,e[39]=t,e[40]=de):de=e[40],de}},E8=n=>{const e=N.useMemo(()=>Math.random().toFixed(32),[]),t=N.useMemo(()=>{const _={};return n.forEach(S=>{_[S]=S+e}),_},[n,e]),r=N.useMemo(()=>[],[]),i=N.useMemo(()=>(r.length=0,r.push(...n),r),[r,n]),[o,l]=N.useState([]),a=N.useRef((()=>{const _={};return i.forEach(S=>{_[S]={open:()=>l(R=>[...R,S]),close:()=>{},ok:()=>{},cancel:()=>{}}}),_})()),u=N.useMemo(()=>{const _={};return i.forEach(S=>{_[S]=R=>{l(I=>!R&&I.includes(S)?I.filter(O=>O!==S):R&&!I.includes(S)?[...I,S]:I)}}),_},[i]),h=N.useMemo(()=>{const _={};return i.forEach(S=>{const I=[o.includes(S),u[S]],O=P=>{a.current[S]={...a.current[S],...P}};_[S]={useIsOpen:I,setAction:O}}),_},[o,u,i]),y=N.useMemo(()=>{const _={};return i.forEach(S=>{const R=()=>a.current[S].open(),I=()=>a.current[S].close(),O=()=>a.current[S].ok(),P=()=>a.current[S].cancel();_[S]={open:R,close:I,ok:O,cancel:P}}),_},[i]),x=N.useMemo(()=>({}),[]),w=N.useMemo(()=>(i.forEach(_=>{x[_]={state:h[_],action:y[_]}}),x),[x,i,h,y]);return N.useEffect(()=>(Object.keys(w).forEach(S=>{const R=w[S],I=t[S],O=Md.find(P=>{P.id});O?O.core=R:Md.push({id:I,core:R})}),()=>{const S=Object.keys(w),R=Md.filter(I=>S.includes(I.id));Md.length=0,Md.push(...R)}),[w,t]),w},A8=()=>{const n=N.useMemo(()=>Math.random().toFixed(32),[]),[e,t]=N.useState(!1),r=N.useRef({open:()=>t(!0),close:()=>{},ok:()=>{},cancel:()=>{}}),i=N.useMemo(()=>({useIsOpen:[e,t],setAction:u=>{r.current={...r.current,...u}}}),[e]),o=N.useMemo(()=>({open:()=>r.current.open(),close:()=>r.current.close(),ok:()=>r.current.ok(),cancel:()=>r.current.cancel()}),[]),l=N.useMemo(()=>({}),[]),a=N.useMemo(()=>(l.state=i,l.action=o,l),[l,i,o]);return N.useEffect(()=>{const u=Md.find(h=>h.id===n);return u?u.core=a:Md.push({id:n,core:a}),()=>{const h=Md.filter(y=>y.id!==n);Md.length=0,Md.push(...h)}},[n,a]),a},T8=n=>{const e=Dn.c(5),{dlgCore:t,children:r}=n,[i,o]=t.state.useIsOpen;let l,a;e[0]!==o?(l=()=>()=>o==null?void 0:o(!1),a=[o],e[0]=o,e[1]=l,e[2]=a):(l=e[1],a=e[2]),N.useEffect(l,a);const u=i&&r;let h;return e[3]!==u?(h=k.jsx(N.Suspense,{children:u}),e[3]=u,e[4]=h):h=e[4],h},R8=n=>e=>{const{dlgCore:t}=e;return k.jsx(T8,{dlgCore:t,children:N.cloneElement(k.jsx(n,{...e}),{dlgCore:t})})},Md=[],I8={closeAllDlgs:()=>{Md.forEach(n=>{n.core.action.close()})}},k8="_AFileBox_1hlo1_1",M8="_SelectedFile_1hlo1_16",L8="_Dropping_1hlo1_26",Em={AFileBox:k8,SelectedFile:M8,Dropping:L8},O8=n=>{const e=Dn.c(60);let t,r,i,o,l,a,u,h,y,x,w,_;e[0]!==n?({useFile:_,FileRenderer:h,SelectRenderer:y,DropRenderer:x,resources:i,accept:w,onInvalidFileFormat:u,fileSelectButtonClassName:o,isDisabled:l,isLoading:a,className:r,...t}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12]);const S=h===void 0?P8:h,R=y===void 0?D8:y,I=x===void 0?N8:x,O=w===void 0?"":w;let P;e[13]!==i?(P={...Nr.AFileBox,...i},e[13]=i,e[14]=P):P=e[14];const Y=P,z=N.useRef(null),W=N.useRef(null),[B,ee]=Ho(_,null),[H,V]=N.useState(!1);let de;e[15]!==O?(de=O.split(",").map(F8).filter(B8),e[15]=O,e[16]=de):de=e[16];const Z=de;let te;e[17]!==Z?(te=Pe=>{if(Z.length===0)return!1;const ot=Pe.name.split(".").pop();return ot?!Z.includes(`.${ot}`):!0},e[17]=Z,e[18]=te):te=e[18];const ne=te;let fe;e[19]!==ne||e[20]!==u||e[21]!==ee?(fe=Pe=>{if(ee)if(ne(Pe)){u==null||u();return}else ee(Pe);else return},e[19]=ne,e[20]=u,e[21]=ee,e[22]=fe):fe=e[22];const ae=fe;let j;e[23]!==ae?(j=Pe=>{Pe.target.files&&Pe.target.files.length>0&&ae(Pe.target.files[0])},e[23]=ae,e[24]=j):j=e[24];const re=j;let he;e[25]!==ae||e[26]!==l||e[27]!==a?(he=Pe=>{Pe.preventDefault(),V(!1),!(l||a)&&Pe.dataTransfer.files&&Pe.dataTransfer.files.length>0&&ae(Pe.dataTransfer.files[0])},e[25]=ae,e[26]=l,e[27]=a,e[28]=he):he=e[28];const be=he;let le;e[29]!==l||e[30]!==a?(le=Pe=>{Pe.preventDefault(),!(l||a)&&V(!0)},e[29]=l,e[30]=a,e[31]=le):le=e[31];const J=le;let pe;e[32]===Symbol.for("react.memo_cache_sentinel")?(pe=Pe=>{Pe.target===z.current&&Pe.relatedTarget.contains(z.current.parentElement)&&(Pe.preventDefault(),V(!1))},e[32]=pe):pe=e[32];const Te=pe,Fe=z8;let _e;e[33]===Symbol.for("react.memo_cache_sentinel")?(_e=()=>{var Pe;(Pe=W.current)==null||Pe.click()},e[33]=_e):_e=e[33];const Me=_e;let De;if(H){let Pe;e[34]!==I||e[35]!==Y?(Pe=k.jsx(I,{resources:Y}),e[34]=I,e[35]=Y,e[36]=Pe):Pe=e[36],De=Pe}else if(B){let Pe;e[37]!==S||e[38]!==B||e[39]!==_?(Pe=k.jsx(S,{file:B,useFile:_}),e[37]=S,e[38]=B,e[39]=_,e[40]=Pe):Pe=e[40],De=Pe}else{let Pe;e[41]!==R||e[42]!==o||e[43]!==Y?(Pe=k.jsx(R,{fileSelectButtonClassName:o,resources:Y,onClick:Me}),e[41]=R,e[42]=o,e[43]=Y,e[44]=Pe):Pe=e[44],De=Pe}const Re=De;let Le;e[45]!==r?(Le=gt.clsx(Em.AFileBox,r),e[45]=r,e[46]=Le):Le=e[46];let Oe;e[47]===Symbol.for("react.memo_cache_sentinel")?(Oe={display:"none"},e[47]=Oe):Oe=e[47];let Ge;e[48]!==O||e[49]!==re?(Ge=k.jsx("input",{ref:W,accept:O,style:Oe,type:"file",value:"",onChange:re}),e[48]=O,e[49]=re,e[50]=Ge):Ge=e[50];let Ve;return e[51]!==t||e[52]!==Re||e[53]!==l||e[54]!==a||e[55]!==J||e[56]!==be||e[57]!==Le||e[58]!==Ge?(Ve=k.jsxs(Gi,{...t,abaseRef:z,className:Le,isDisabled:l,isLoading:a,onDragEnter:J,onDragLeave:Te,onDragOver:Fe,onDrop:be,children:[Ge,Re]}),e[51]=t,e[52]=Re,e[53]=l,e[54]=a,e[55]=J,e[56]=be,e[57]=Le,e[58]=Ge,e[59]=Ve):Ve=e[59],Ve},P8=n=>{const e=Dn.c(10),{file:t,useFile:r}=n,[,i]=Ho(r,null);let o,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundColor:""},l=k.jsx(ho,{icon:"File"}),e[0]=o,e[1]=l):(o=e[0],l=e[1]);let a;e[2]!==t.name?(a=k.jsx(nh,{children:t.name}),e[2]=t.name,e[3]=a):a=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u={marginLeft:2,transform:"scale(0.8)"},e[4]=u):u=e[4];let h;e[5]!==i?(h=k.jsx(ba,{icon:"Close",style:u,type:"Raw",onClick:()=>i==null?void 0:i(null)}),e[5]=i,e[6]=h):h=e[6];let y;return e[7]!==a||e[8]!==h?(y=k.jsxs(bl,{className:Em.SelectedFile,style:o,children:[l,a,h]}),e[7]=a,e[8]=h,e[9]=y):y=e[9],y},D8=n=>{const e=Dn.c(9),{onClick:t,resources:r,fileSelectButtonClassName:i}=n;let o,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=gt.clsx("NoSelect"),l={gap:4},e[0]=o,e[1]=l):(o=e[0],l=e[1]);const a=r["Select File"];let u;e[2]!==i||e[3]!==t||e[4]!==a?(u=k.jsx(Ic,{className:i,onClick:t,children:a}),e[2]=i,e[3]=t,e[4]=a,e[5]=u):u=e[5];const h=r["or Drag & Drop"];let y;return e[6]!==u||e[7]!==h?(y=k.jsxs(bl,{className:o,style:l,children:[u,h]}),e[6]=u,e[7]=h,e[8]=y):y=e[8],y},N8=n=>{const e=Dn.c(4),{resources:t}=n;let r,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=gt.clsx(Em.Dropping,"NoSelect","Headline2"),i=k.jsx(ho,{icon:"FileDownload"}),e[0]=r,e[1]=i):(r=e[0],i=e[1]);const o=t["drop file to select"];let l;return e[2]!==o?(l=k.jsxs(P3,{className:r,children:[i,o]}),e[2]=o,e[3]=l):l=e[3],l};function F8(n){return n.trim()}function B8(n){return n.length>0&&n.startsWith(".")}function z8(n){return n.preventDefault()}async function H8(n){const e=new Promise((t,r)=>{const i=new FileReader;i.onloadend=()=>{i.result?typeof i.result=="string"?t(i.result):r(new Error("Failed to convert file to Base64: Invalid result type.")):r(new Error("Failed to convert file to Base64: Empty result."))},i.onerror=r,i.readAsDataURL(n)});try{return await e}catch{return}}function W8(n,e){var a,u;const t=n.split(","),r=(u=(a=t[0])==null?void 0:a.match(/:(.*?);/))==null?void 0:u[1],i=atob(t[1]);let o=i.length;const l=new Uint8Array(o);for(;o--;)l[o]=i.charCodeAt(o);return new File([l],e,{type:r})}const B3=n=>{if(n.idx!==void 0&&n.idx!==null)return String(n.idx);if(n.uniqueId)return n.uniqueId;const e=n.name||"",t=typeof n.size=="number"?n.size:0,r=n.lastModified??"";return`${e}-${t}-${r}`},z3={toBase64:H8,toFile:W8,getFileKey:B3},U8="_AFileUploader_i2nun_1",G8="_LabelContainer_i2nun_16",Y8="_LabelButton_i2nun_25",V8="_Disabled_i2nun_31",Z8="_Delete_i2nun_34",X8="_FileSize_i2nun_38",K8="_TotalFileSize_i2nun_45",J8="_FileBox_i2nun_49",Q8="_FileBoxFullSize_i2nun_68",q8="_SelectRenderer_i2nun_75",j8="_ChipsContainer_i2nun_87",$8="_FileChip_i2nun_100",e9="_FileChipContent_i2nun_113",t9="_FileNameContainer_i2nun_124",n9="_ButtonRenderer_i2nun_130",r9="_ErrorBorder_i2nun_141",i9="_ErrorColor_i2nun_145",o9="_ErrorCursor_i2nun_149",l9="_DropIdle_i2nun_159",vl={AFileUploader:U8,LabelContainer:G8,LabelButton:Y8,Disabled:V8,Delete:Z8,FileSize:X8,TotalFileSize:K8,FileBox:J8,FileBoxFullSize:Q8,SelectRenderer:q8,ChipsContainer:j8,FileChip:$8,FileChipContent:e9,FileNameContainer:t9,ButtonRenderer:n9,ErrorBorder:r9,ErrorColor:i9,ErrorCursor:o9,DropIdle:l9},s9=N.memo(n=>{const e=Dn.c(17),{file:t,baseClass:r,errorClass:i,errorCursorClass:o,mode:l,resources:a,onDelete:u,onDownload:h}=n,[y,x]=N.useState(!1),w=l==="Upload"&&!!u,_=l==="Download"&&!!h;if(!w&&!_)return null;let S;e[0]!==t||e[1]!==_||e[2]!==w||e[3]!==u||e[4]!==h?(S=()=>{w&&u?u(t):_&&h&&h(t)},e[0]=t,e[1]=_,e[2]=w,e[3]=u,e[4]=h,e[5]=S):S=e[5];const R=S;let I;e[6]!==r||e[7]!==i||e[8]!==o?(I=gt.clsx(r,i,o),e[6]=r,e[7]=i,e[8]=o,e[9]=I):I=e[9];const O=y?w?"X":"FileDownload":"CircleAlertOutline",P=w?a["Retry Delete"]:a["Retry Download"];let Y,z;e[10]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>x(!0),z=()=>x(!1),e[10]=Y,e[11]=z):(Y=e[10],z=e[11]);let W;return e[12]!==R||e[13]!==I||e[14]!==O||e[15]!==P?(W=k.jsx(ba,{className:I,icon:O,iconSize:"sm",tooltip:P,type:"Raw",onClick:R,onMouseEnter:Y,onMouseLeave:z}),e[12]=R,e[13]=I,e[14]=O,e[15]=P,e[16]=W):W=e[16],W}),a9=N.memo(n=>{const e=Dn.c(10),{file:t,baseClass:r,onDelete:i,resources:o}=n,[l,a]=N.useState(!1),u=l?"X":"Pend",h=l&&o.Delete;let y;e[0]!==t||e[1]!==i?(y=()=>i(t),e[0]=t,e[1]=i,e[2]=y):y=e[2];let x,w;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=()=>a(!0),w=()=>a(!1),e[3]=x,e[4]=w):(x=e[3],w=e[4]);let _;return e[5]!==r||e[6]!==u||e[7]!==h||e[8]!==y?(_=k.jsx(ba,{className:r,icon:u,iconSize:"sm",tooltip:h,type:"Raw",onClick:y,onMouseEnter:x,onMouseLeave:w}),e[5]=r,e[6]=u,e[7]=h,e[8]=y,e[9]=_):_=e[9],_}),c9=N.memo(n=>{const e=Dn.c(13),{file:t,baseClass:r,onDelete:i,resources:o}=n,[l,a]=N.useState(!1),u=l?"X":"Check",h=l?"var(--AFileUploader_text_color)":"var(--AFileUploader_brand_color)";let y;e[0]!==h?(y={color:h},e[0]=h,e[1]=y):y=e[1];const x=l&&o.Delete;let w;e[2]!==t||e[3]!==i?(w=()=>i(t),e[2]=t,e[3]=i,e[4]=w):w=e[4];let _,S;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>a(!0),S=()=>a(!1),e[5]=_,e[6]=S):(_=e[5],S=e[6]);let R;return e[7]!==r||e[8]!==u||e[9]!==y||e[10]!==x||e[11]!==w?(R=k.jsx(ba,{className:r,icon:u,iconSize:"sm",style:y,tooltip:x,type:"Raw",onClick:w,onMouseEnter:_,onMouseLeave:S}),e[7]=r,e[8]=u,e[9]=y,e[10]=x,e[11]=w,e[12]=R):R=e[12],R}),u9=N.memo(n=>{const e=Dn.c(4),{baseClass:t,file:r,getFileProgress:i,mode:o,onDelete:l,resources:a}=n,u=i(r);let h;u!==void 0?h=`${Math.round(u*10)/10}%`:o==="Upload"&&l&&(h=a["Deleting..."]);let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={cursor:"default"},e[0]=y):y=e[0];let x;return e[1]!==t||e[2]!==h?(x=k.jsx(ba,{className:t,icon:"Spinner",iconSize:"sm",style:y,tooltip:h,type:"Raw"}),e[1]=t,e[2]=h,e[3]=x):x=e[3],x}),f9=n=>{const{useFiles:e,accept:t,onInvalidFileFormat:r,onDownload:i,onUpload:o,onDownloadCsv:l,onDelete:a,mode:u,type:h="Primary",limit:y=1024*1024*1024,maxFileCount:x,useError:w,isLoading:_,resources:S,className:R,onDownloadAll:I,csvFilename:O,...P}=n,[{wrapId:Y,wrapProps:z,labelProps:W,...B},ee]=Bg(P),H=N.useMemo(()=>({...Nr.AFileUploader,...S}),[S]),[V,de]=Ho(e,void 0),[Z,te]=Ho(w,!1),[ne,fe]=N.useState({}),[ae,j]=N.useState({}),[re,he]=N.useState(!1),be=N.useRef(null),le=N.useRef(null),J=N.useRef([]),pe=N.useRef(!1),Te=N.useRef(V);N.useEffect(()=>{Te.current=V},[V]);const Fe=N.useMemo(()=>(V==null?void 0:V.reduce((ct,{size:Tt})=>ct+Tt,0))||0,[V]);N.useEffect(()=>{te&&te(Fe>y)},[Fe,y,te]);const _e=N.useCallback(ct=>{var ye;if(!t||t==="*"||t==="")return!0;const Tt=t.split(",").map(se=>se.trim()),It=`.${(ye=ct.name.split(".").pop())==null?void 0:ye.toLowerCase()}`;return Tt.includes(It)?!0:Tt.some(se=>{var He;if(se.startsWith("."))return!1;if(se.endsWith("/*")){const We=se.split("/")[0];return(He=ct.type)==null?void 0:He.startsWith(`${We}/`)}return ct.type===se})},[t]),Me=N.useCallback((ct,Tt,It)=>{fe(ye=>{const se={...ye};return se[ct]=Tt,se}),j(ye=>{const se={...ye};return It!==void 0?se[ct]=It:ct in se&&delete se[ct],se})},[]),De=N.useRef(new WeakMap),Re=N.useCallback(ct=>{const Tt=De.current.get(ct);if(Tt)return Tt;const It=z3.getFileKey(ct);return De.current.set(ct,It),It},[]),Le=N.useCallback(ct=>ne[Re(ct)]||"Normal",[ne,Re]),Oe=N.useCallback(ct=>{const Tt=ae[Re(ct)];return typeof Tt=="number"?Tt:void 0},[ae,Re]),Ge=N.useCallback(ct=>_||Le(ct)==="Loading",[_,Le]),Ve=N.useCallback(ct=>Le(ct)==="Pending",[Le]),Pe=N.useCallback(ct=>Le(ct)==="Error"||u==="Upload"&&ct.size>y,[Le,y,u]),ot=N.useMemo(()=>V!=null&&V.length?u==="Download"?V.every(Pe):!1:!0,[V,u,Pe]),Xe=N.useCallback(()=>be.current&&(be.current.value=""),[]),lt=N.useMemo(()=>!x||!(V!=null&&V.length)?!1:V.length>=x,[V,x]),Ye=N.useCallback(ct=>{if(!de)return;const Tt=Te.current;Tt&&(de(Tt.filter(It=>It!==ct)),Xe())},[de,Xe]),mt=N.useCallback(()=>{if(pe.current||!o)return;const ct=J.current.shift();if(!ct)return;pe.current=!0;const Tt=Re(ct);Me(Tt,"Loading",0);const It=(ye,se)=>{if(ye==="Error"){Ye(ct);return}Me(Tt,ye,se)};Promise.resolve(o(ct,It)).catch(()=>Ye(ct)).finally(()=>{pe.current=!1,J.current.length>0&&mt()})},[o,Me,Re,Ye]),bt=N.useCallback(ct=>{if(!de)return;const Tt=[];let It=!1,ye=[],se=x?x-((V==null?void 0:V.length)||0):1/0;if(!(se<=0)){if(Array.from(ct).forEach((He,We)=>{if(We>=se)return;if(!_e(He)){It=!0,ye.push(He.name);return}const pt=He;pt.uniqueId=`file-${crypto.randomUUID()}`,Tt.push(pt)}),It)if(r)r();else{const He=t?t.replace(/,/g,", "):"",We=He?`${H["Supported file format(s)"]}: ${He}`:"",pt=ye.length>3?`${ye.slice(0,3).join(", ")} ${H.and} ${ye.length-3} ${H["more file(s)"]}`:ye.join(", ");alert(`${H["Unsupported file format detected."]}
|
|
281
|
+
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`),Bi=R('$RR("'),tl=R('","'),es=R('",'),Zs=R('"'),vr=R(")<\/script>");R('<template data-rci="" data-bid="'),R('<template data-rri="" data-bid="'),R('" data-sid="'),R('" data-sty="');var Bl=R('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'),yo=R('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'),Cl=R('$RX("'),ja=R('"'),zi=R(","),vc=R(")<\/script>");R('<template data-rxi="" data-bid="'),R('" data-dgst="'),R('" data-msg="'),R('" data-stck="'),R('" data-cstck="');var Ls=/[<\u2028\u2029]/g,_l=/[&><\u2028\u2029]/g,ps=R(' media="not all" data-precedence="'),zl=R('" data-href="'),bc=R('">'),Kc=R("</style>"),ts=!1,Jc=!0,Hl=[],$a=R(' data-precedence="'),yf=R('" data-href="'),Ri=R(" "),mu=R('">'),Os=R("</style>");R('<link rel="expect" href="#'),R('" blocking="render"/>');var xr=R(' id="'),Qc=R("["),mf=R(",["),yc=R(","),qc=R("]"),mc=0,xf=1,Do=2,jc=3,Ra=/[<>\r\n]/g,wf=/["';,\r\n]/g,Ps=Function.prototype.bind,Jf=Symbol.for("react.client.reference"),io={};Object.freeze(io);var ns={},ca=null,Yu={},$c={},Vu=new Set,ec=new Set,Qf=new Set,Zu=new Set,xc=new Set,tc=new Set,Cf=new Set,wc=new Set,_f=new Set,md={enqueueSetState:function(c,d,E){var D=c._reactInternals;D.queue===null?it(c,"setState"):(D.queue.push(d),E!=null&&Se(E))},enqueueReplaceState:function(c,d,E){c=c._reactInternals,c.replace=!0,c.queue=[d],E!=null&&Se(E)},enqueueForceUpdate:function(c,d){c._reactInternals.queue===null?it(c,"forceUpdate"):d!=null&&Se(d)}},xu={id:1,overflow:""},wu=Math.clz32?Math.clz32:mn,ch=Math.log,uh=Math.LN2,ua=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),qf=null,fh=typeof Object.is=="function"?Object.is:gr,nl=null,Ia=null,Ci=null,Sl=null,Xs=null,fi=null,El=!1,vs=!1,So=0,Cu=0,Sf=-1,jf=0,fa=null,da=null,Xu=0,Ks=!1,Cc,_c={readContext:xo,use:function(c){if(c!==null&&typeof c=="object"){if(typeof c.then=="function")return ri(c);if(c.$$typeof===Pi)return xo(c)}throw Error("An unsupported type was passed to use(): "+String(c))},useContext:function(c){return Cc="useContext",Sn(),c._currentValue},useMemo:ai,useReducer:so,useRef:function(c){nl=Sn(),fi=xn();var d=fi.memoizedState;return d===null?(c={current:c},Object.seal(c),fi.memoizedState=c):d},useState:function(c){return Cc="useState",so(wo,c)},useInsertionEffect:An,useLayoutEffect:An,useCallback:function(c,d){return ai(function(){return c},d)},useImperativeHandle:An,useEffect:An,useDebugValue:An,useDeferredValue:function(c,d){return Sn(),d!==void 0?d:c},useTransition:function(){return Sn(),[!1,Jl]},useId:function(){var c=Ia.treeContext,d=c.overflow;c=c.id,c=(c&~(1<<32-wu(c)-1)).toString(32)+d;var E=f;if(E===null)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");return d=So++,c="_"+E.idPrefix+"R_"+c,0<d&&(c+="H"+d.toString(32)),c+"_"},useSyncExternalStore:function(c,d,E){if(E===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return E()},useOptimistic:function(c){return Sn(),[c,Wo]},useActionState:Co,useFormState:Co,useHostTransitionStatus:function(){return Sn(),Xr},useMemoCache:function(c){for(var d=Array(c),E=0;E<c;E++)d[E]=ra;return d},useCacheRefresh:function(){return an},useEffectEvent:function(){return Yi}},f=null,p=null,A={getCacheForType:function(){throw Error("Not implemented.")},cacheSignal:function(){throw Error("Not implemented.")},getOwner:function(){return p===null?null:p.componentStack}},F=0,Q,ue,Ie,Ue,kt,tt,yt;On.__reactDisabledLog=!0;var en,bn,sn=!1,Ht=new(typeof WeakMap=="function"?WeakMap:Map),Lr={react_stack_bottom_frame:function(c,d,E){return c(d,E)}},Ii=Lr.react_stack_bottom_frame.bind(Lr),ar={react_stack_bottom_frame:function(c){return c.render()}},Sr=ar.react_stack_bottom_frame.bind(ar),rl={react_stack_bottom_frame:function(c){var d=c._init;return d(c._payload)}},il=rl.react_stack_bottom_frame.bind(rl),qr=0;if(typeof performance=="object"&&typeof performance.now=="function")var Eo=performance,rs=function(){return Eo.now()};else{var In=Date;rs=function(){return In.now()}}var Mn=4,ii=0,Yr=1,_i=2,Hi=3,Vr=4,Bn=5,Wl=14,bi=null,gl={},Vi={},is={},_u={},bs=!1,ka=!1,pl=!1,co=0,Zo=!1;Fs(),Fs(),_g.prerender=function(c,d){return new Promise(function(E,D){var K=d?d.onHeaders:void 0,ie;K&&(ie=function(nt){K(new Headers(nt))});var Ce=be(d?d.identifierPrefix:void 0,d?d.unstable_externalRuntimeSrc:void 0,d?d.bootstrapScriptContent:void 0,d?d.bootstrapScripts:void 0,d?d.bootstrapModules:void 0),Be=Oi(c,Ce,he(Ce,void 0,d?d.unstable_externalRuntimeSrc:void 0,d?d.importMap:void 0,ie,d?d.maxHeadersLength:void 0),pe(d?d.namespaceURI:void 0),d?d.progressiveChunkSize:void 0,d?d.onError:void 0,function(){var nt=new ReadableStream({type:"bytes",pull:function(Zt){ds(Be,Zt)},cancel:function(Zt){Be.destination=null,gi(Be,Zt)}},{highWaterMark:0});nt={postponed:Ai(Be),prelude:nt},E(nt)},void 0,void 0,D,d?d.onPostpone:void 0);if(d&&d.signal){var vt=d.signal;if(vt.aborted)gi(Be,vt.reason);else{var Ke=function(){gi(Be,vt.reason),vt.removeEventListener("abort",Ke)};vt.addEventListener("abort",Ke)}}fl(Be)})},_g.renderToReadableStream=function(c,d){return new Promise(function(E,D){var K,ie,Ce=new Promise(function(Qt,Ot){ie=Qt,K=Ot}),Be=d?d.onHeaders:void 0,vt;Be&&(vt=function(Qt){Be(new Headers(Qt))});var Ke=be(d?d.identifierPrefix:void 0,d?d.unstable_externalRuntimeSrc:void 0,d?d.bootstrapScriptContent:void 0,d?d.bootstrapScripts:void 0,d?d.bootstrapModules:void 0),nt=Ro(c,Ke,he(Ke,d?d.nonce:void 0,d?d.unstable_externalRuntimeSrc:void 0,d?d.importMap:void 0,vt,d?d.maxHeadersLength:void 0),pe(d?d.namespaceURI:void 0),d?d.progressiveChunkSize:void 0,d?d.onError:void 0,ie,function(){var Qt=new ReadableStream({type:"bytes",pull:function(Ot){ds(nt,Ot)},cancel:function(Ot){nt.destination=null,gi(nt,Ot)}},{highWaterMark:0});Qt.allReady=Ce,E(Qt)},function(Qt){Ce.catch(function(){}),D(Qt)},K,d?d.onPostpone:void 0,d?d.formState:void 0);if(d&&d.signal){var Zt=d.signal;if(Zt.aborted)gi(nt,Zt.reason);else{var jt=function(){gi(nt,Zt.reason),Zt.removeEventListener("abort",jt)};Zt.addEventListener("abort",jt)}}fl(nt)})},_g.resume=function(c,d,E){return new Promise(function(D,K){var ie,Ce,Be=new Promise(function(Zt,jt){Ce=Zt,ie=jt}),vt=Kr(c,d,he(d.resumableState,E?E.nonce:void 0,void 0,void 0,void 0,void 0),E?E.onError:void 0,Ce,function(){var Zt=new ReadableStream({type:"bytes",pull:function(jt){ds(vt,jt)},cancel:function(jt){vt.destination=null,gi(vt,jt)}},{highWaterMark:0});Zt.allReady=Be,D(Zt)},function(Zt){Be.catch(function(){}),K(Zt)},ie,E?E.onPostpone:void 0);if(E&&E.signal){var Ke=E.signal;if(Ke.aborted)gi(vt,Ke.reason);else{var nt=function(){gi(vt,Ke.reason),Ke.removeEventListener("abort",nt)};Ke.addEventListener("abort",nt)}}fl(vt)})},_g.resumeAndPrerender=function(c,d,E){return new Promise(function(D,K){var ie=Cr(c,d,he(d.resumableState,void 0,void 0,void 0,void 0,void 0),E?E.onError:void 0,function(){var vt=new ReadableStream({type:"bytes",pull:function(Ke){ds(ie,Ke)},cancel:function(Ke){ie.destination=null,gi(ie,Ke)}},{highWaterMark:0});vt={postponed:Ai(ie),prelude:vt},D(vt)},void 0,void 0,K,E?E.onPostpone:void 0);if(E&&E.signal){var Ce=E.signal;if(Ce.aborted)gi(ie,Ce.reason);else{var Be=function(){gi(ie,Ce.reason),Ce.removeEventListener("abort",Be)};Ce.addEventListener("abort",Be)}}fl(ie)})},_g.version="19.2.0"})()),_g}var z2;function UA(){if(z2)return wg;z2=1;var n,e;return process.env.NODE_ENV==="production"?(n=BA(),e=zA()):(n=HA(),e=WA()),wg.version=n.version,wg.renderToString=n.renderToString,wg.renderToStaticMarkup=n.renderToStaticMarkup,wg.renderToReadableStream=e.renderToReadableStream,wg.resume=e.resume,wg}var ZC=UA();const s1=M1(ZC);function hp(n,e,t){return e!==void 0&&n<e?e:t!==void 0&&n>t?t:n}const kg={_canvas:null,_cache:new Map,_fontCache:{value:"",timestamp:0},_charWidthMap:new Map,clearCache(){this._cache.clear(),this._canvas=null,this._fontCache={value:"",timestamp:0},this._charWidthMap.clear()},getDefaultFont(){const n=Date.now();if(this._fontCache.value&&n-this._fontCache.timestamp<3e5)return this._fontCache.value;try{const e=getComputedStyle(document.documentElement).getPropertyValue("--Font").trim()||"400 14px pretendard";return this._fontCache={value:e,timestamp:n},e}catch{return"400 14px pretendard"}},measureCharWidth(n,e){var i,o,l,a,u,h;const t=`${n}|${e}`;if(this._charWidthMap.has(t))return this._charWidthMap.get(t);try{this._canvas||(this._canvas=document.createElement("canvas"));const y=this._canvas.getContext("2d");if(y){y.font=e;const x=y.measureText(n).width;return this._charWidthMap.set(t,x),x}}catch{}let r;return n===" "?r=parseInt(((i=e.match(/(\d+)px/))==null?void 0:i[1])||"14")/3:/^[A-Z]$/.test(n)?r=parseInt(((o=e.match(/(\d+)px/))==null?void 0:o[1])||"14")*.67:/^[a-z]$/.test(n)?r=parseInt(((l=e.match(/(\d+)px/))==null?void 0:l[1])||"14")*.5:/^\d$/.test(n)?r=parseInt(((a=e.match(/(\d+)px/))==null?void 0:a[1])||"14")*.6:/^[.,;:!?]$/.test(n)?r=parseInt(((u=e.match(/(\d+)px/))==null?void 0:u[1])||"14")*.25:r=parseInt(((h=e.match(/(\d+)px/))==null?void 0:h[1])||"14")*.67,this._charWidthMap.set(t,r),r},extractTextFromNode(n){if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return`${n}`;if(Array.isArray(n))return n.map(e=>this.extractTextFromNode(e)).join("");if(N.isValidElement(n))try{const t=ZC.renderToString(n).replace(/<[^>]*>/g,""),r=document.createElement("div");return r.innerHTML=t,r.textContent||""}catch{return n.props&&n.props.children?this.extractTextFromNode(n.props.children):""}return""},measureTextWidth(n,e){var o;if(!n)return 0;const t=e||this.getDefaultFont(),r=`${n}|${t}`,i=this._cache.get(r);if(i!==void 0)return i;try{this._canvas||(this._canvas=document.createElement("canvas"));const l=this._canvas.getContext("2d");if(l){l.font=t;const a=l.measureText(n),u=Math.ceil(a.width);return this._cache.size>=300&&[...this._cache.keys()].slice(0,50).forEach(y=>this._cache.delete(y)),this._cache.set(r,u),u}}catch{}try{const l=document.createElement("span");l.style.font=t,l.style.position="absolute",l.style.visibility="hidden",l.style.whiteSpace="nowrap",l.textContent=n,document.body.appendChild(l);const a=Math.ceil(l.getBoundingClientRect().width);return document.body.removeChild(l),this._cache.set(r,a),a}catch{}try{let l=0;for(let u=0;u<n.length;u++)l+=this.measureCharWidth(n[u],t);l*=.95;const a=Math.ceil(l);return this._cache.set(r,a),a}catch{}try{const l=parseInt(((o=t.match(/(\d+)px/))==null?void 0:o[1])||"14");let a=0;for(let h=0;h<n.length;h++){const y=n[h];y===" "?a+=.33:/^[A-Z]$/.test(y)?a+=.67:/^[a-z]$/.test(y)?a+=.5:/^\d$/.test(y)?a+=.6:/^[.,;:!?]$/.test(y)?a+=.25:a+=.67}const u=Math.ceil(a*l);return this._cache.set(r,u),u}catch{const a=n.length*10;return this._cache.set(r,a),a}},measureTextWithElementStyle(n,e){if(!e)return 0;try{const t=window.getComputedStyle(n),r=t.getPropertyValue("--Font").trim()||`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`;return this.measureTextWidth(e,r)}catch{return this.measureTextWidth(e)}},measureReactNodeWidth(n){const e=this.extractTextFromNode(n);return this.measureTextWidth(e)},measureRenderedOptionWidth(n,e){if(n==null)return 0;const t=e(n),r=this.extractTextFromNode(t);return this.measureTextWidth(r)},calculateOptimalSelectWidth({elementRef:n,options:e=[],selectedOption:t=null,selectedOptions:r=[],placeholder:i="",optionRenderer:o,type:l="Primary",isMulti:a=!1}){if(!n.current)return 200;try{let u=0;if(e&&e.length>0){const _=[...e.length>0?[e[0]]:[],...e.length>1?[e[e.length-1]]:[],...e.length>10?Array.from({length:8},(R,I)=>e[Math.floor(I*e.length/8)]):e,...e.length>20?Array.from({length:5},()=>e[Math.floor(Math.random()*e.length)]):[]],S=Array.from(new Set(_.filter(Boolean)));for(const R of S){if(!R)continue;const I=this.measureRenderedOptionWidth(R,o);u=Math.max(u,I)}}let h=0;if(!a&&t)h=this.measureRenderedOptionWidth(t,o);else if(a&&r&&r.length){if(r.length===1)h=this.measureRenderedOptionWidth(r[0],o);else if(h=this.measureTextWidth(`${r.length} selected`),r.length>0){let _=0;for(const S of r){const R=this.measureRenderedOptionWidth(S,o);_=Math.max(_,R)}h=Math.max(h,_)}}let y=0;i&&(y=this.measureReactNodeWidth(i));const w=Math.max(u,h,y,50);if(n.current){const _=window.getComputedStyle(n.current),S=parseFloat(_.paddingLeft||"0")+parseFloat(_.paddingRight||"0"),R=parseFloat(_.borderLeftWidth||"0")+parseFloat(_.borderRightWidth||"0"),I=l==="Primary"?30:20,O=a?24:0,P=Math.ceil(w*.05)+10;return Math.ceil(w+S+R+I+O+P)}return w+60}catch{return 200}}};function XC(n,e){const t=Dn.c(5),[r,i]=N.useState(0);let o,l;return t[0]!==r||t[1]!==n||t[2]!==e?(o=()=>{const a=()=>{const h=n.current,y=e.current;if(!h||!y)return i(0);const x=h.getBoundingClientRect(),w=y.getBoundingClientRect(),_=Math.max(0,Math.round(x.right-w.left));_!==r&&i(_)};a();const u=new ResizeObserver(a);return n.current&&u.observe(n.current),e.current&&u.observe(e.current),window.addEventListener("resize",a),()=>{u.disconnect(),window.removeEventListener("resize",a)}},l=[n,e,r],t[0]=r,t[1]=n,t[2]=e,t[3]=o,t[4]=l):(o=t[3],l=t[4]),N.useEffect(o,l),r}var oc=(n=>(n.E="East",n.N="North",n.S="South",n.W="West",n))(oc||{}),L1=(n=>(n.E="East",n.EN="EastNorth",n.ES="EastSouth",n.N="North",n.NE="NorthEast",n.NW="NorthWest",n.S="South",n.SE="SouthEast",n.SW="SouthWest",n.W="West",n.WN="WestNorth",n.WS="WestSouth",n))(L1||{});function ym(n,e,t,r){if(!n.current||!e.current)return;const i=n.current.getBoundingClientRect(),o=e.current.getBoundingClientRect();let l={bottom:void 0,left:void 0,right:void 0,top:void 0};switch(t){case"North":l=o?{bottom:window.innerHeight-i.top,left:i.left+i.width/2-o.width/2}:{bottom:window.innerHeight-i.top,left:i.left};break;case"NorthWest":l={bottom:window.innerHeight-i.top,left:i.left};break;case"NorthEast":l={bottom:window.innerHeight-i.top,right:window.innerWidth-i.left-i.width};break;case"South":l=o?{top:i.bottom,left:i.left+i.width/2-o.width/2}:{top:i.bottom,left:i.left};break;case"SouthWest":l={top:i.bottom,left:i.left};break;case"SouthEast":l={top:i.bottom,right:window.innerWidth-i.left-i.width};break;case"East":l=o?{top:i.top+i.height/2-o.height/2,left:i.right}:{top:i.top,left:i.right};break;case"EastNorth":l={bottom:window.innerHeight-i.top-i.height,left:i.right};break;case"EastSouth":l={top:i.top,left:i.right};break;case"West":l=o?{top:i.top+i.height/2-o.height/2,right:window.innerWidth-i.left}:{top:i.top,right:window.innerWidth-i.left};break;case"WestNorth":l={bottom:window.innerHeight-i.top-i.height,right:window.innerWidth-i.left};break;case"WestSouth":l={top:i.top,right:window.innerWidth-i.left};break;default:l={top:i.top,left:i.left}}r&&(r.x&&l.left&&(l.left+=r.x),r.y&&l.top&&(l.top+=r.y)),l=JC(l,o),e.current.style.top=l.top+"px",e.current.style.left=l.left+"px",e.current.style.bottom=l.bottom+"px",e.current.style.right=l.right+"px"}function KC(n,e,t,r){if(!n)return;const i=e instanceof HTMLElement?e:e==null?void 0:e.current;if(!i)return;const o=n.getBoundingClientRect(),l=i.getBoundingClientRect();let a={bottom:void 0,left:void 0,right:void 0,top:void 0};switch(t){case"North":a=l?{bottom:window.innerHeight-o.top,left:o.left+o.width/2-l.width/2}:{bottom:window.innerHeight-o.top,left:o.left};break;case"NorthWest":a={bottom:window.innerHeight-o.top,left:o.left};break;case"NorthEast":a={bottom:window.innerHeight-o.top,right:window.innerWidth-o.left-o.width};break;case"South":a=l?{top:o.bottom,left:o.left+o.width/2-l.width/2}:{top:o.bottom,left:o.left};break;case"SouthWest":a={top:o.bottom,left:o.left};break;case"SouthEast":a={top:o.bottom,right:window.innerWidth-o.left-o.width};break;case"East":a=l?{top:o.top+o.height/2-l.height/2,left:o.right}:{top:o.top,left:o.right};break;case"EastNorth":a={bottom:window.innerHeight-o.top-o.height,left:o.right};break;case"EastSouth":a={top:o.top,left:o.right};break;case"West":a=l?{top:o.top+o.height/2-l.height/2,right:window.innerWidth-o.left}:{top:o.top,right:window.innerWidth-o.left};break;case"WestNorth":a={bottom:window.innerHeight-o.top-o.height,right:window.innerWidth-o.left};break;case"WestSouth":a={top:o.top,right:window.innerWidth-o.left};break;default:a={top:o.top,left:o.left}}return r&&(r.x&&a.left&&(a.left+=r.x),r.y&&a.top&&(a.top+=r.y)),a=JC(a,l),i.style.top=a.top+"px",i.style.left=a.left+"px",i.style.bottom=a.bottom+"px",i.style.right=a.right+"px",a}function JC(n,e,t=10){return n.left&&n.left<t&&(n.left=t),n.right&&n.right<t&&(n.right=t),n.top&&n.top<t&&(n.top=t),n.bottom&&n.bottom<t&&(n.bottom=t),n.left&&e&&n.left+e.width>window.innerWidth-t&&(n.left=window.innerWidth-e.width-t),n.right&&e&&n.right+e.width>window.innerWidth-t&&(n.right=window.innerWidth-e.width-t),n.top&&e&&n.top+e.height>window.innerHeight-t&&(n.top=window.innerHeight-e.height-t),n.bottom&&e&&n.bottom+e.height>window.innerHeight-t&&(n.bottom=window.innerHeight-e.height-t),n}function Ag(){const n={preventDefault:!1};return{event:n,e:{preventDefault:()=>n.preventDefault=!0}}}const GA="_Tooltip_1khnz_1",YA="_Arrow_1khnz_17",H2={Tooltip:GA,Arrow:YA},QC=n=>{const e=Dn.c(28),{tooltip:t,targetRef:r,delay:i,distance:o,direction:l}=n,a=i===void 0?0:i,u=o===void 0?10:o,h=l===void 0?oc.S:l,[y,x]=N.useState(!1),w=N.useRef(null),_=N.useRef(null),S=N.useRef(null);let R;e[0]!==a||e[1]!==h||e[2]!==u||e[3]!==r?(R=()=>{x(!0),S.current&&(clearTimeout(S.current),S.current=null);const fe=setTimeout(()=>requestAnimationFrame(()=>W2(r,w,_,u,h)),a);S.current=fe},e[0]=a,e[1]=h,e[2]=u,e[3]=r,e[4]=R):R=e[4];const I=R;let O;e[5]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{S.current&&(clearTimeout(S.current),S.current=null),x(!1)},e[5]=O):O=e[5];const P=O;let Y,z;e[6]!==I||e[7]!==r?(Y=()=>{const fe=r.current;if(fe)return fe.addEventListener("mouseenter",I),fe.addEventListener("mouseleave",P),()=>{fe.removeEventListener("mouseenter",I),fe.removeEventListener("mouseleave",P)}},z=[r,P,I],e[6]=I,e[7]=r,e[8]=Y,e[9]=z):(Y=e[8],z=e[9]),N.useEffect(Y,z);let W;e[10]!==h||e[11]!==u||e[12]!==r?(W=()=>{W2(r,w,_,u,h)},e[10]=h,e[11]=u,e[12]=r,e[13]=W):W=e[13];const B=W;let ee,H;e[14]!==y||e[15]!==B||e[16]!==r?(ee=()=>{if(!r.current||!w.current||!y)return;const fe=r.current.parentElement;let ae=fe;for(;ae;)ae.addEventListener("scroll",B),ae=ae.parentElement;return()=>{let j=fe;for(;j;)j.removeEventListener("scroll",B),j=j.parentElement}},H=[r,B,y],e[14]=y,e[15]=B,e[16]=r,e[17]=ee,e[18]=H):(ee=e[17],H=e[18]),N.useEffect(ee,H);let V;e[19]!==B?(V=()=>{B()},e[19]=B,e[20]=V):V=e[20];let de;e[21]!==B||e[22]!==t?(de=[t,B],e[21]=B,e[22]=t,e[23]=de):de=e[23],N.useEffect(V,de);let Z;e:switch(typeof t){case"boolean":{Z=!0;break e}case"string":{Z=t==="";break e}case"number":{Z=!1;break e}default:Z=!t}if(!y||Z)return null;let ne;if(e[24]!==t){let fe;e[26]===Symbol.for("react.memo_cache_sentinel")?(fe=gt.clsx(H2.Tooltip,"NoSelect"),e[26]=fe):fe=e[26];let ae;e[27]===Symbol.for("react.memo_cache_sentinel")?(ae=k.jsx("div",{ref:_,className:H2.Arrow}),e[27]=ae):ae=e[27],ne=su.createPortal(k.jsxs("div",{ref:w,className:fe,children:[t,ae]}),document.body),e[24]=t,e[25]=ne}else ne=e[25];return ne},c0="5px solid var(--ATooltip_background-color)";function W2(n,e,t,r,i=oc.S){if(!n.current||!e.current||!t.current)return;const o=VA(n.current,e.current,r,i);if(!o)return;const{left:l,top:a,arrowDir:u,arrow:h}=o;e.current.style.left=`${l}px`,e.current.style.top=`${a}px`,e.current.style.visibility="visible",e.current.style.opacity="1",t.current.style.border="5px solid transparent",u===oc.N?(t.current.style.top="-9px",t.current.style.left=`calc(50% - 5px + ${h.left??0}px)`,t.current.style.borderBottom=c0):u===oc.S?(t.current.style.top="100%",t.current.style.left=`calc(50% - 5px + ${h.left??0}px)`,t.current.style.borderTop=c0):u===oc.W?(t.current.style.top=`calc(50% - 5px + ${h.top??0}px)`,t.current.style.left="-9px",t.current.style.borderRight=c0):u===oc.E&&(t.current.style.top=`calc(50% - 5px + ${h.top??0}px)`,t.current.style.left="100%",t.current.style.borderLeft=c0)}const Gh=5;function VA(n,e,t,r){const i=n.getBoundingClientRect(),o=e.getBoundingClientRect();function l(){if(window.innerHeight-i.bottom>o.height+t){const y=i.bottom+t,x=i.left+(i.width-o.width)/2,w=hp(x,Gh,window.innerWidth-Gh-o.width),_=oc.N;return{left:w,top:y,arrowDir:_,arrow:{left:x-w}}}}function a(){if(i.top>o.height+t){const y=i.top-o.height-t,x=i.left+(i.width-o.width)/2,w=hp(x,Gh,window.innerWidth-Gh-o.width),_=oc.S;return{left:w,top:y,arrowDir:_,arrow:{left:x-w}}}}function u(){if(window.innerWidth-i.right>o.width+t){const y=i.right+t,x=i.top+(i.height-o.height)/2,w=hp(x,Gh,window.innerHeight-Gh-o.height),_=oc.W;return{left:y,top:w,arrowDir:_,arrow:{top:x-w}}}}function h(){if(i.left>o.width+t){const y=i.left-o.width-t,x=i.top+(i.height-o.height)/2,w=hp(x,Gh,window.innerHeight-Gh-o.height),_=oc.E;return{left:y,top:w,arrowDir:_,arrow:{top:x-w}}}}if(r===oc.E)return u()||h()||l()||a();if(r===oc.S)return l()||a()||u()||h();if(r===oc.W)return h()||u()||l()||a();if(r===oc.N)return a()||l()||u()||h()}const ZA="_ABase_1ilav_1",XA="_UseDimming_1ilav_6",KA="_Dimmer_1ilav_6",JA="_Spinner_1ilav_9",QA="_Dimmed_1ilav_12",qA="_HasProgress_1ilav_18",jA="_Skeleton_1ilav_21",$A="_IsDimmed_1ilav_52",eT="_IsLoading_1ilav_57",tT="_IsDisabled_1ilav_62",Sg={ABase:ZA,UseDimming:XA,Dimmer:KA,Spinner:JA,Dimmed:QA,HasProgress:qA,Skeleton:jA,"skeleton-loading":"_skeleton-loading_1ilav_1",IsDimmed:$A,IsLoading:eT,IsDisabled:tT},Gi=n=>{const e=Dn.c(59);let t,r,i,o,l,a,u,h,y,x,w,_,S,R,I;e[0]!==n?({children:i,abaseRef:r,abaseCallbackRef:t,isDisabled:u,isPending:y,isLoading:h,isDimmed:l,tooltip:a,tooltipDistance:_,tooltipDelay:S,tooltipDirection:R,progress:x,ProgressRenderer:I,progressProps:w,...o}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S,e[14]=R,e[15]=I):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13],R=e[14],I=e[15]);const O=_===void 0?10:_,P=S===void 0?0:S,Y=R===void 0?oc.S:R,z=I===void 0?nT:I,W=N.useRef(null),B=r??W;let ee;e:{if(typeof u=="string"&&u!==""){ee=u;break e}else if(a!==void 0){ee=a;break e}ee=""}const H=ee,V=u||h||l,de=u!==void 0||h!==void 0||l!==void 0,Z=typeof x=="number"&&h;let te;e:{if(!y){te=o.style;break e}let J;e[16]!==o.style?(J=o.style??{},e[16]=o.style,e[17]=J):J=e[17];const pe=J;let Te;e[18]!==i||e[19]!==pe.height||e[20]!==pe.width?(Te={},!pe.width&&!i&&(Te.width="100%"),!pe.height&&!i&&(Te.height="1.25em"),e[18]=i,e[19]=pe.height,e[20]=pe.width,e[21]=Te):Te=e[21];let Fe;e[22]!==Te||e[23]!==pe?(Fe=Object.keys(Te).length?{...Te,...pe}:pe,e[22]=Te,e[23]=pe,e[24]=Fe):Fe=e[24],te=Fe}const ne=te,fe=t||B;let ae;e[25]!==o.className||e[26]!==Z||e[27]!==V||e[28]!==y||e[29]!==de?(ae=gt.clsx(o.className,Sg.ABase,de&&Sg.UseDimming,V&&Sg.Dimmed,Z&&Sg.HasProgress,y&&Sg.Skeleton),e[25]=o.className,e[26]=Z,e[27]=V,e[28]=y,e[29]=de,e[30]=ae):ae=e[30];const j=!y&&i;let re;e[31]!==l||e[32]!==Z||e[33]!==u||e[34]!==h||e[35]!==de?(re=de&&k.jsx("div",{className:gt.sclsx(Sg,"Dimmer",u&&"IsDisabled",h&&"IsLoading",l&&"IsDimmed",Z&&"HasProgress")}),e[31]=l,e[32]=Z,e[33]=u,e[34]=h,e[35]=de,e[36]=re):re=e[36];let he;e[37]!==z||e[38]!==Z||e[39]!==u||e[40]!==h||e[41]!==x||e[42]!==w?(he=h&&k.jsxs("div",{className:gt.sclsx(Sg,"Spinner",u&&"IsDisabled",h&&"IsLoading",Z&&"HasProgress"),children:[k.jsx(ho,{icon:"Spinner"}),k.jsx(N.Activity,{mode:Z?"visible":"hidden",children:k.jsx(z,{progress:x??0,...w})})]}),e[37]=z,e[38]=Z,e[39]=u,e[40]=h,e[41]=x,e[42]=w,e[43]=he):he=e[43];let be;e[44]!==B||e[45]!==H||e[46]!==P||e[47]!==Y||e[48]!==O?(be=k.jsx(QC,{delay:P,direction:Y,distance:O,targetRef:B,tooltip:H}),e[44]=B,e[45]=H,e[46]=P,e[47]=Y,e[48]=O,e[49]=be):be=e[49];let le;return e[50]!==o||e[51]!==ne||e[52]!==he||e[53]!==be||e[54]!==fe||e[55]!==ae||e[56]!==j||e[57]!==re?(le=k.jsxs("div",{...o,ref:fe,style:ne,className:ae,children:[j,re,he,be]}),e[50]=o,e[51]=ne,e[52]=he,e[53]=be,e[54]=fe,e[55]=ae,e[56]=j,e[57]=re,e[58]=le):le=e[58],le},nT=n=>{const e=Dn.c(6);let t,r;e[0]!==n?({progress:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;return e[3]!==t||e[4]!==r?(i=k.jsx(VC,{progress:t,...r}),e[3]=t,e[4]=r,e[5]=i):i=e[5],i},rT="_AButton_zrw2c_1",iT="_Primary_zrw2c_14",oT="_Secondary_zrw2c_29",lT="_Alter_zrw2c_44",sT="_AIconButton_zrw2c_60",aT="_AThemeButton_zrw2c_101",Ep={AButton:rT,Primary:iT,Secondary:oT,Alter:lT,AIconButton:sT,AThemeButton:aT},cT=["Primary","Secondary","Alter","Raw"],Ic=n=>{const e=Dn.c(17);let t,r,i,o;e[0]!==n?({type:o,onClick:r,noInteractive:i,...t}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o):(t=e[1],r=e[2],i=e[3],o=e[4]);const l=o===void 0?"Primary":o,a=t.isDisabled||t.isLoading;let u;e[5]!==r||e[6]!==a?(u=w=>{a||r==null||r(w)},e[5]=r,e[6]=a,e[7]=u):u=e[7];const h=u;let y;e[8]!==t.className||e[9]!==i||e[10]!==l||e[11]!==a?(y=gt.clsx(t.className,Ep.AButton,l!=="Raw"&&Ep[l],"IsClickable",!a&&!i&&"IsInteractive"),e[8]=t.className,e[9]=i,e[10]=l,e[11]=a,e[12]=y):y=e[12];let x;return e[13]!==t||e[14]!==h||e[15]!==y?(x=k.jsx(Gi,{...t,className:y,onClick:h}),e[13]=t,e[14]=h,e[15]=y,e[16]=x):x=e[16],x},uT=["Primary","Secondary","Raw"],ba=n=>{const e=Dn.c(29);let t,r,i,o,l,a,u,h,y;e[0]!==n?({icon:o,iconSize:l,type:h,onClick:i,isDisabled:a,isLoading:u,tooltip:y,className:r,...t}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9]);const x=h===void 0?"Primary":h,w=a||u;let _;e[10]!==i||e[11]!==w?(_=Y=>{w||i==null||i(Y)},e[10]=i,e[11]=w,e[12]=_):_=e[12];const S=_;let R;e:{if(bm.includes(o)){let Y;e[13]!==o||e[14]!==l?(Y=k.jsx(ho,{icon:o,size:l}),e[13]=o,e[14]=l,e[15]=Y):Y=e[15],R=Y;break e}R=o}const I=R;let O;e[16]!==r||e[17]!==a||e[18]!==u||e[19]!==x?(O=gt.clsx(Ep.AIconButton,!a&&!u&&"IsClickable",x!=="Raw"&&Ep[x],r),e[16]=r,e[17]=a,e[18]=u,e[19]=x,e[20]=O):O=e[20];let P;return e[21]!==t||e[22]!==I||e[23]!==a||e[24]!==u||e[25]!==S||e[26]!==O||e[27]!==y?(P=k.jsx(Gi,{className:O,isDisabled:a,isLoading:u,tooltip:y,onClick:S,...t,children:I}),e[21]=t,e[22]=I,e[23]=a,e[24]=u,e[25]=S,e[26]=O,e[27]=y,e[28]=P):P=e[28],P};function Ho(n,e){n!==void 0&&n.length===1&&(e=n[0]);const t=N.useState(e);let r;return n===void 0||n.length===1?r=t:r=n,r}const fT="_AWrap_u1f1h_1",dT="_Label_u1f1h_8",hT="_Asterisk_u1f1h_19",gT="_HelperTextConatiner_u1f1h_23",pT="_HelperText_u1f1h_23",qg={AWrap:fT,Label:dT,Asterisk:hT,HelperTextConatiner:gT,HelperText:pT,Error:"_Error_u1f1h_38"},vT=["Default","Error"],Bg=n=>{if(!n)return[{},{}];const e={},t={},r=["errorMessage","helperText","label","labelProps","wrapId","wrapProps","wrapType"];for(const i in n)r.includes(i)?e[i]=n[i]:t[i]=n[i];return[e,t]},lg=n=>{const{wrapProps:e,errorMessage:t,helperText:r,wrapType:i="Default",label:o,labelProps:l,wrapId:a,children:u}=n,h=N.useRef(null),[y,x]=N.useState({height:0}),w=N.useRef(null),[_,S]=N.useMemo(()=>{let I=r,O=i;if(Array.isArray(t)){const P=t.filter(Boolean);P.length>0&&([I,O]=[P,"Error"])}else t&&([I,O]=[t,"Error"]);return Array.isArray(I)&&(O!=="Error"&&(I=I.filter(Boolean)),I=I.map((P,Y)=>k.jsxs(N.Fragment,{children:[P,k.jsx("br",{})]},er.key(Y)))),[I,O]},[r,t,i]);N.useEffect(()=>{if(!_||!h.current)x({minHeight:0});else{const I=h.current.getBoundingClientRect();x({minHeight:I.height,marginTop:I.height===0?0:6})}},[_]);const R=N.useMemo(()=>{switch(typeof(l==null?void 0:l.prefix)){case"string":return k.jsx(ho,{height:"1rem",icon:l.prefix,width:"1rem"});case"boolean":return k.jsx(ho,{height:10,icon:"Target",width:10});default:return l==null?void 0:l.prefix}},[l==null?void 0:l.prefix]);return k.jsxs("div",{...e,ref:w,className:gt.clsx(e==null?void 0:e.className,qg.AWrap),id:a,children:[o&&k.jsxs("div",{className:gt.clsx(qg.Label,"NoSelect",l==null?void 0:l.className),style:l==null?void 0:l.style,children:[l==null?void 0:l.leftAddon,R,o,(l==null?void 0:l.asterisk)&&k.jsx(Gi,{className:qg.Asterisk,tooltip:Nr.AWrap.Asterisk,children:"*"}),l==null?void 0:l.rightAddon]}),u,_!==void 0&&k.jsx("div",{className:gt.clsx(qg.HelperTextConatiner,"NoSelect"),style:y,children:k.jsx("div",{ref:h,className:gt.clsx(qg.HelperText,qg[S]),children:_})})]})},bT="_ASwitch_nlcij_1",yT="_Track_nlcij_6",mT="_Truthy_nlcij_13",xT="_Thumb_nlcij_17",j1={ASwitch:bT,Track:yT,Truthy:mT,Thumb:xT},qC=n=>{const e=Dn.c(33);let t,r;if(e[0]!==n){const{useCheck:W,...B}=n;r=W,t=Bg(B),e[0]=n,e[1]=t,e[2]=r}else t=e[1],r=e[2];const[i,o]=t;let l,a,u,h;e[3]!==i?({wrapId:a,wrapProps:u,labelProps:l,...h}=i,e[3]=i,e[4]=l,e[5]=a,e[6]=u,e[7]=h):(l=e[4],a=e[5],u=e[6],h=e[7]);const[y,x]=Ho(r,!1);let w;e[8]!==y||e[9]!==o||e[10]!==x?(w=W=>{var B;o.isDisabled||o.isLoading||(x==null||x(!y),(B=o.onClick)==null||B.call(o,W))},e[8]=y,e[9]=o,e[10]=x,e[11]=w):w=e[11];const _=w;let S;e[12]!==l||e[13]!==a||e[14]!==u||e[15]!==h?(S={wrapId:a,wrapProps:u,labelProps:l,...h},e[12]=l,e[13]=a,e[14]=u,e[15]=h,e[16]=S):S=e[16];let R;e[17]!==y?(R=gt.clsx(j1.Track,y&&j1.Truthy),e[17]=y,e[18]=R):R=e[18];let I;e[19]!==y?(I=gt.clsx(j1.Thumb,y&&j1.Truthy),e[19]=y,e[20]=I):I=e[20];let O;e[21]!==I?(O=k.jsx("div",{className:I}),e[21]=I,e[22]=O):O=e[22];let P;e[23]!==R||e[24]!==O?(P=k.jsx("div",{className:R,children:O}),e[23]=R,e[24]=O,e[25]=P):P=e[25];let Y;e[26]!==_||e[27]!==o||e[28]!==P?(Y=k.jsx(Gi,{...o,className:j1.ASwitch,onClick:_,children:P}),e[26]=_,e[27]=o,e[28]=P,e[29]=Y):Y=e[29];let z;return e[30]!==S||e[31]!==Y?(z=k.jsx(lg,{...S,children:Y}),e[30]=S,e[31]=Y,e[32]=z):z=e[32],z},wT={palette:{"mode-1":{"common-100":"#ffffff","common-0":"#000000","neutral-99":"#fcfcfc","neutral-94":"#efefef","neutral-89":"#e2e2e2","neutral-84":"#d6d6d6","neutral-79":"#c9c9c9","neutral-73":"#bababa","neutral-65":"#a5a5a5","neutral-54":"#898989","neutral-42":"#6b6b6b","neutral-30":"#4c4c4c","neutral-20":"#333333","neutral-15":"#2c2c2c","neutral-10":"#191919","neutral-5":"#0c0c0c","cool-neutral-99":"#fcfcfc","cool-neutral-94":"#efeff0","cool-neutral-89":"#e1e2e4","cool-neutral-84":"#d4d5d7","cool-neutral-79":"#c7c8cb","cool-neutral-73":"#b7b9bc","cool-neutral-65":"#a2a4a9","cool-neutral-54":"#85888e","cool-neutral-42":"#66696f","cool-neutral-30":"#494b4f","cool-neutral-20":"#303235","cool-neutral-10":"#18191a","cool-neutral-5":"#0c0c0c","red-99":"#fff9f9","red-95":"#ffe5e5","red-90":"#ffcccc","red-84":"#ffadad","red-76":"#ff8484","red-66":"#ff5151","red-53":"#ff0f0f","red-45":"#e50000","red-34":"#a80000","red-30":"#990000","red-24":"#7a0000","red-10":"#330000","green-99":"#fafffa","green-95":"#e5ffe8","green-90":"#ccffd1","green-84":"#adffb6","green-76":"#84ff90","green-66":"#51ff62","green-48":"#00f418","green-45":"#00e517","green-34":"#00a810","green-30":"#00990f","green-24":"#007a0c","green-10":"#003305","blue-99":"#fafdff","blue-95":"#e5f3ff","blue-90":"#cce6ff","blue-84":"#add7ff","blue-76":"#84c3ff","blue-66":"#51abff","blue-53":"#0f8bff","blue-45":"#0077e5","blue-34":"#0056a8","blue-30":"#004f99","blue-24":"#003f7a","blue-10":"#001a33","orange-99":"#fffcfa","orange-95":"#ffefe5","orange-90":"#ffdecc","orange-84":"#ffcbad","orange-76":"#ffb184","orange-66":"#ff9151","orange-53":"#ff670f","orange-45":"#e55400","orange-34":"#a83d00","orange-30":"#993800","orange-24":"#7a2c00","orange-10":"#331200","violet-99":"#fcfaff","violet-95":"#eee5ff","violet-90":"#dcccff","violet-84":"#c7adff","violet-76":"#ab84ff","violet-66":"#8852ff","violet-53":"#5b0fff","violet-45":"#4900e5","violet-34":"#3500a8","violet-28":"#2d008e","violet-24":"#26007a","violet-10":"#100033","cyan-99":"#faffff","cyan-95":"#e5fdff","cyan-90":"#ccfbff","cyan-84":"#adf9ff","cyan-76":"#84f6ff","cyan-66":"#51f3ff","cyan-50":"#00edff","cyan-45":"#00d6e5","cyan-40":"#00becc","cyan-30":"#008e99","cyan-21":"#00636b","cyan-10":"#002f33","pink-99":"#fffefa","pink-95":"#ffe5f5","pink-90":"#ffccea","pink-84":"#ffadde","pink-76":"#ff84ce","pink-66":"#ff51b9","pink-53":"#ff0f9f","pink-45":"#e5008a","pink-40":"#cc007a","pink-30":"#99005b","pink-21":"#6b0040","pink-10":"#33001e","lime-99":"#fcfffa","lime-95":"#eeffe5","lime-90":"#ddffcc","lime-84":"#c8ffad","lime-76":"#adff84","lime-66":"#8bff51","lime-49":"#53f900","lime-45":"#4ce500","lime-40":"#44cc00","lime-30":"#339900","lime-21":"#236b00","lime-10":"#113300","brand-b-color":"#386fff"}},semantic:{light:{"static-white":"common-100","static-black":"common-0","acent-brand":"brand-b-color","acent-brand-fill":"blue-95","label-normal":"neutral-20","label-strong":"neutral-5","label-neutral":"neutral-73","line-normal":"neutral-79","line-strong":"neutral-65","line-neutral":"neutral-89","background-normal":"common-100","elevation-0":"common-100","elevation-10":"neutral-94","elevation-20":"neutral-73","alert-warning":"orange-53","alert-success":"green-45","alert-danger":"red-45","inverse-label-normal":"neutral-84","inverse-label-strong":"neutral-99","inverse-label-neutral":"neutral-30","inverse-line-normal":"neutral-30","inverse-line-strong":"neutral-54","inverse-line-neutral":"neutral-20","inverse-elevation-0":"neutral-5","inverse-elevation-10":"neutral-10","inverse-elevation-20":"neutral-15"},dark:{"static-white":"common-100","static-black":"common-0","acent-brand":"brand-b-color","acent-brand-fill":"blue-10","label-normal":"neutral-84","label-strong":"neutral-99","label-neutral":"neutral-30","line-normal":"neutral-30","line-strong":"neutral-54","line-neutral":"neutral-20","background-normal":"neutral-5","elevation-0":"neutral-5","elevation-10":"neutral-10","elevation-20":"neutral-15","alert-warning":"orange-53","alert-success":"green-45","alert-danger":"red-45","inverse-label-normal":"neutral-20","inverse-label-strong":"neutral-5","inverse-label-neutral":"neutral-73","inverse-line-normal":"neutral-79","inverse-line-strong":"neutral-65","inverse-line-neutral":"neutral-89","inverse-elevation-0":"common-100","inverse-elevation-10":"neutral-94","inverse-elevation-20":"neutral-73"}}},sc=tg.cloneDeep(wT);er.keys(sc.semantic).forEach(n=>{const e=sc.semantic[n];er.keys(e).forEach(t=>{e[t]=`var(--${e[t]})`})});const _v=er.keys(sc.palette),jC=er.keys(sc.palette[_v[0]]);function CT(){return va.paletteMode}function _T(n,e=va.paletteMode){return sc.palette[e][n]}function ST(n){return Ev(n)}const j0=[];function $C(n){va.paletteMode=n,jC.forEach(e=>document.documentElement.style.setProperty(`--${e}`,sc.palette[n][e])),j0.forEach(e=>e(n))}function e3(n,e="all"){er.keys(n).forEach(r=>{const i=n[r];i!==void 0&&(document.documentElement.style.setProperty(`--${r}`,i),e==="all"?_v.forEach(o=>{sc.palette[o][r]=i}):sc.palette[e][r]=i)})}const m1=er.keys(sc.semantic),t3=er.keys(sc.semantic[m1[0]]);function ET(){return va.semanticMode}function AT(n,e=va.semanticMode){return sc.semantic[e][n]}function TT(n){return Ev(n)}const $0=[];function mm(n){va.semanticMode=n,document.documentElement.setAttribute("data-theme",n),t3.forEach(e=>document.documentElement.style.setProperty(`--${e}`,sc.semantic[n][e])),$0.forEach(e=>e(n)),va.save==="localStorage"?localStorage.setItem("semanticMode",n):va.save==="sessionStorage"&&sessionStorage.setItem("semanticMode",n)}function n3(n,e=va.semanticMode){er.keys(n).forEach(r=>{const i=n[r];i!==void 0&&(document.documentElement.style.setProperty(`--${r}`,i),e==="all"?m1.forEach(o=>{sc.semantic[o][r]=i}):sc.semantic[e][r]=i)})}const r3=["Body-background-color","Body-color","Body-transition","Font","Scrollbar-handle","Scrollbar-handle-hover","Scrollbar-handle-active","Scrollbar-track","Scrollbar-border-radius","Scrollbar-width","Transition","Transition-Enabled"],i3=["ABase_Dimming_background-color","ABase_Primary_Skeleton_background-color","ABase_Secondary_Skeleton_background-color"],o3=["ATooltip_background-color","ATooltip_color"],l3=["AButton_Primary_border","AButton_Primary_background-color","AButton_Primary_color","AButton_Primary_hover_border","AButton_Primary_hover_background-color","AButton_Primary_hover_color","AButton_Primary_active_border","AButton_Primary_active_background-color","AButton_Primary_active_color","AButton_Secondary_border","AButton_Secondary_background-color","AButton_Secondary_color","AButton_Secondary_hover_border","AButton_Secondary_hover_background-color","AButton_Secondary_hover_color","AButton_Secondary_active_border","AButton_Secondary_active_background-color","AButton_Secondary_active_color","AButton_Alter_border","AButton_Alter_background-color","AButton_Alter_color","AButton_Alter_hover_border","AButton_Alter_hover_background-color","AButton_Alter_hover_color","AButton_Alter_active_border","AButton_Alter_active_background-color","AButton_Alter_active_color"],s3=["AInput_Primary_background-color","AInput_Primary_border","AInput_Primary_color","AInput_Primary_hover_border","AInput_Primary_focus_background-color","AInput_Primary_focus_border","AInput_Primary_placeholder_color","AInput_Secondary_background-color","AInput_Secondary_border","AInput_Secondary_color","AInput_Secondary_hover_border","AInput_Secondary_focus_border","AInput_Secondary_placeholder_color","AInput_ReadOnly_background-color","AInput_ReadOnly_border","AInput_ReadOnly_color","AInput_Error_HelperText_color","AInput_Error_background-color","AInput_Error_border","AInput_Error_color","AInput_Error_placeholder_color"],a3=["ATextArea_Primary_background-color","ATextArea_Primary_border","ATextArea_Primary_color","ATextArea_Primary_hover_border","ATextArea_Primary_focus_background-color","ATextArea_Primary_focus_border","ATextArea_Secondary_background-color","ATextArea_Secondary_border","ATextArea_Secondary_color","ATextArea_Secondary_hover_border","ATextArea_Secondary_focus_border","ATextArea_ReadOnly_background-color","ATextArea_ReadOnly_border","ATextArea_ReadOnly_color","ATextArea_Error_background-color","ATextArea_Error_border","ATextArea_Error_color","ATextArea_Error_placeholder_color"],c3=["AEditor_Primary_background-color","AEditor_Primary_border","AEditor_Primary_color","AEditor_Primary_hover_border","AEditor_Primary_focus_background-color","AEditor_Primary_focus_border","AEditor_ReadOnly_background-color","AEditor_ReadOnly_border","AEditor_ReadOnly_hover_border","AEditor_ReadOnly_focus_border","AEditor_ReadOnly_color","AEditor_Error_background-color","AEditor_Error_border","AEditor_Error_hover_border","AEditor_Error_focus_border","AEditor_Error_color","AEditor_Error_placeholder_color","AEditor_Addon_Primary_background-color","AEditor_Addon_Primary_border","AEditor_Addon_Primary_color","AEditor_Addon_Secondary_background-color","AEditor_Addon_Secondary_border","AEditor_Addon_Secondary_color","AEditor_Addon_hover_background-color","AEditor_Addon_hover_color","AEditor_Addon_focus_border","AEditor_border-radius","AEditor_Select_border-radius","AEditor_Option_border-radius"],u3=["ACheckBox_color"],f3=["ADialog_Paper_background-color","ADialog_background-color","ADialog_border","ADialog_Action_background-color"],d3=["ASelect_Placeholder_color","ASelect_Primary_border","ASelect_Primary_hover_border","ASelect_Primary_Arrow_color","ASelect_Primary_Options_background-color","ASelect_Primary_Options_border","ASelect_Primary_Option_hover_background-color","ASelect_Primary_Option_active_background-color","ASelect_Primary_Option_Selected_background-color","ASelect_Secondary_border","ASelect_Secondary_hover_border","ASelect_Secondary_background-color","ASelect_Secondary_Arrow_color","ASelect_Secondary_Options_background-color","ASelect_Secondary_Options_border","ASelect_Secondary_Option_hover_background-color","ASelect_Secondary_Option_active_background-color","ASelect_Secondary_Option_Selected_background-color"],h3=["AMultiSelect_Placeholder_color","AMultiSelect_Primary_border","AMultiSelect_Primary_hover_border","AMultiSelect_Primary_Arrow_color","AMultiSelect_Primary_Options_background-color","AMultiSelect_Primary_Options_border","AMultiSelect_Primary_Option_hover_background-color","AMultiSelect_Primary_Option_active_background-color","AMultiSelect_Primary_Option_Selected_background-color","AMultiSelect_Secondary_border","AMultiSelect_Secondary_hover_border","AMultiSelect_Secondary_background-color","AMultiSelect_Secondary_Arrow_color","AMultiSelect_Secondary_Options_background-color","AMultiSelect_Secondary_Options_border","AMultiSelect_Secondary_Option_hover_background-color","AMultiSelect_Secondary_Option_active_background-color","AMultiSelect_Secondary_Option_Selected_background-color"],g3=["ATree_background-color","ATree_Indent_border","ATreeBodyHeader_border-bottom","ATreeItem_hover_background-color","ATreeItem_active_background-color","ATreeItem_select_background-color","ATreeItem_search_background-color","ATreeItem_search_border-top","ATreeItem_search_border-bottom","ATreeItem_select_color"],p3=["ASwitch_Track_Falsy_border","ASwitch_Track_Truthy_border","ASwitch_Thumb_border"],v3=["ATab_IndicatorTrack_Primary_border-bottom","ATab_Indicator_Primary_background-color","ATab_Option_Secondary_border","ATab_Option_Secondary_IsSelected_border-bottom","ATab_Option_Secondary_IsDisabled_border","ATab_IndicatorTrack_Tertiary_background-color","ATab_Indicator_Tertiary_background-color","ATab_Option_Tertiary_color","ATab_Option_Tertiary_IsSelected_color","ATab_Option_Quaternary_color","ATab_Option_Quaternary_IsSelected_color"],b3=["AFileBox_border","AFileBox_background-color","AFileBox_SelectedFile_color","AFileBox_Dropping_color"],y3=["AFileUploader_background-color","AFileUploader_brand_color","AFileUploader_disabled_color","AFileUploader_error_color","AFileUploader_text_color"],m3=["AListView_border-thin","AListView_border-thick"],x3=["AStepper_OutCircle_background-color","AStepper_OutCircle_IsOver_background-color","AStepper_InCircle_background-color","AStepper_InCircle_IsOver_background-color","AStepper_Line_background-color","AStepper_Line_IsOver_background-color"],w3=["ADatePicker_Anchor_border","ADatePicker_Anchor_color","ADatePicker_Anchor_Placeholder_color","ADatePicker_Anchor_hover_border","ADatePicker_Anchor_focus_border","ADatePicker_Anchor_Icon_Primary_color","ADatePicker_Anchor_Icon_Secondary_color","ADatePicker_background-color","ADatePicker_border","ADatePicker_StringInputContainer_background-color","ADatePicker_String_border","ADatePicker_Prev_background-color","ADatePicker_Prev_border-right","ADatePicker_Next_background-color","ADatePicker_Next_border-left","ADatePicker_Cell_color","ADatePicker_Cell_IsNotCurrentMonth_color","ADatePicker_Cell_IsDisabled_color","ADatePicker_Cell_IsSelected_background-color","ADatePicker_Cell_IsSelected_color","ADatePicker_Cell_IsHovered_background-color"],C3=["ADateRangePicker_Anchor_border","ADateRangePicker_Anchor_color","ADateRangePicker_Anchor_Placeholder_color","ADateRangePicker_Anchor_hover_border","ADateRangePicker_Anchor_focus_border","ADateRangePicker_Anchor_Icon_Primary_color","ADateRangePicker_Anchor_Icon_Secondary_color","ADateRangePicker_background-color","ADateRangePicker_border","ADateRangePicker_StringInputContainer_background-color","ADateRangePicker_String_border","ADateRangePicker_Prev_background-color","ADateRangePicker_Prev_border-right","ADateRangePicker_Next_background-color","ADateRangePicker_Next_border-left","ADateRangePicker_Cell_color","ADateRangePicker_Cell_IsNotCurrentMonth_color","ADateRangePicker_Cell_IsDisabled_color","ADateRangePicker_Cell_IsSelected_background-color","ADateRangePicker_Cell_IsSelected_color","ADateRangePicker_Cell_IsHovered_background-color"],_3=["AIconButton_Primary_color","AIconButton_Primary_border","AIconButton_Primary_background-color","AIconButton_Primary_hover_background-color","AIconButton_Primary_active_background-color","AIconButton_Secondary_color","AIconButton_Secondary_background-color","AIconButton_Secondary_hover_background-color","AIconButton_Secondary_active_background-color"],S3=["ATableBody_TRow_border-bottom","ATableBody_TRow_IsSelected_background-color","ATableBody_TRow_IsSelectable_hover_background-color","ATableBody_TH_color","ATableBody_TD_IsMarked_background-color","ATableBody_TD_IsMarked_color","ATableBody_Resizer_hover_ResizerCenter_background-color","ATableBody_Resizer_active_ResizerCenter_background-color","ATableBody_Resizer_active_ResizerOut_background-color","ATableBody_Resizer_active_ResizerIn_background-color","ATableFooter_Button_IsSelected_background-color","ATableFooter_Button_IsSelected_color","ATableFooter_Button_IsDisabled_color","ATableFilter_SubFilters_background-color","ATableFilter_SubFilters_border","ATableFilter_Icon_color","ATableFilter_Alert_color"],E3=["ADivideFrame_DividerInner_background-color"],A3=["AFloatMenu_background-color","AFloatMenu_hover_background-color","AFloatMenu_color","AFloatMenu_border"],T3=["ALoadingBorder_background-color","ALoadingBorder_ProgressBar_background-color","ALoadingBorder_Cover_background-color"],R3=["AWrap_Error_color"],I3=["ARadioSelect_RadioButton_border","ARadioSelect_RadioButton_InnerCircle_isChecked_background-color"],k3=["AChip_background-color","AChip_color","AChip_border","AChip_hover_background-color","AChip_hover_color","AChip_DeleteButton_border","AChip_DeleteButton_color","AChip_DeleteButton_hover_border","AChip_DeleteButton_hover_color"],RT=[...r3,...i3,...o3,...l3,...s3,...a3,...c3,...u3,...f3,...d3,...h3,...g3,...p3,...v3,...b3,...y3,...m3,...x3,...w3,...C3,..._3,...S3,...E3,...A3,...T3,...R3,...I3,...k3],Sv={"Body-background-color":"var(--background-normal)","Body-color":"var(--label-normal)","Body-transition":"background-color var(--Transition), color var(--Transition)",Font:"400 16px pretendard","Scrollbar-handle":"var(--label-neutral)","Scrollbar-handle-hover":"var(--label-normal)","Scrollbar-handle-active":"var(--label-strong)","Scrollbar-track":"var(--elevation-10)","Scrollbar-border-radius":"6px","Scrollbar-width":"12px",Transition:"300ms","Transition-Enabled":"1","ABase_Dimming_background-color":"var(--elevation-0)","ABase_Primary_Skeleton_background-color":"var(--elevation-10)","ABase_Secondary_Skeleton_background-color":"var(--line-neutral)","ATooltip_background-color":"var(--inverse-elevation-0)",ATooltip_color:"var(--inverse-label-strong)",AButton_Primary_border:"none","AButton_Primary_background-color":"var(--acent-brand)",AButton_Primary_color:"var(--static-white)",AButton_Primary_hover_border:"none","AButton_Primary_hover_background-color":"var(--acent-brand)",AButton_Primary_hover_color:"var(--static-white)",AButton_Primary_active_border:"none","AButton_Primary_active_background-color":"var(--acent-brand)",AButton_Primary_active_color:"var(--static-white)",AButton_Secondary_border:"1px solid var(--elevation-10)","AButton_Secondary_background-color":"var(--elevation-10)",AButton_Secondary_color:"var(--label-normal)",AButton_Secondary_hover_border:"1px solid var(--elevation-10)","AButton_Secondary_hover_background-color":"var(--elevation-10)",AButton_Secondary_hover_color:"var(--label-normal)",AButton_Secondary_active_border:"1px solid var(--elevation-10)","AButton_Secondary_active_background-color":"var(--elevation-10)",AButton_Secondary_active_color:"var(--label-normal)",AButton_Alter_border:"1px solid var(--line-normal)","AButton_Alter_background-color":"var(--elevation-0)",AButton_Alter_color:"var(--label-normal)",AButton_Alter_hover_border:"1px solid var(--line-normal)","AButton_Alter_hover_background-color":"var(--elevation-0)",AButton_Alter_hover_color:"var(--label-normal)",AButton_Alter_active_border:"1px solid var(--line-normal)","AButton_Alter_active_background-color":"var(--elevation-0)",AButton_Alter_active_color:"var(--label-normal)","AInput_Primary_background-color":"var(--elevation-0)",AInput_Primary_border:"1px solid var(--line-normal)",AInput_Primary_color:"var(--label-normal)",AInput_Primary_hover_border:"1px solid var(--line-strong)","AInput_Primary_focus_background-color":"var(--elevation-10)",AInput_Primary_focus_border:"1px solid var(--line-strong)",AInput_Primary_placeholder_color:"var(--label-neutral)","AInput_Secondary_background-color":"var(--elevation-0)",AInput_Secondary_border:"1px solid var(--line-normal)",AInput_Secondary_color:"var(--label-normal)",AInput_Secondary_hover_border:"1px solid var(--line-strong)",AInput_Secondary_focus_border:"1px solid var(--line-strong)",AInput_Secondary_placeholder_color:"var(--label-neutral)","AInput_ReadOnly_background-color":"var(--elevation-10)",AInput_ReadOnly_border:"none",AInput_ReadOnly_color:"var(--label-normal)",AInput_Error_HelperText_color:"var(--alert-danger)","AInput_Error_background-color":"inherit",AInput_Error_border:"1px solid var(--line-normal)",AInput_Error_color:"var(--label-normal)",AInput_Error_placeholder_color:"var(--label-neutral)","ATextArea_Primary_background-color":"var(--elevation-0)",ATextArea_Primary_border:"1px solid var(--line-normal)",ATextArea_Primary_color:"var(--label-normal)",ATextArea_Primary_hover_border:"1px solid var(--line-strong)","ATextArea_Primary_focus_background-color":"var(--elevation-10)",ATextArea_Primary_focus_border:"1px solid var(--line-strong)","ATextArea_Secondary_background-color":"var(--elevation-0)",ATextArea_Secondary_border:"1px solid var(--line-normal)",ATextArea_Secondary_color:"var(--label-normal)",ATextArea_Secondary_hover_border:"1px solid var(--line-strong)",ATextArea_Secondary_focus_border:"1px solid var(--line-strong)","ATextArea_ReadOnly_background-color":"var(--elevation-10)",ATextArea_ReadOnly_border:"none",ATextArea_ReadOnly_color:"var(--label-normal)","ATextArea_Error_background-color":"inherit",ATextArea_Error_border:"1px solid var(--line-normal)",ATextArea_Error_color:"var(--label-normal)",ATextArea_Error_placeholder_color:"var(--label-neutral)","AEditor_Primary_background-color":"var(--elevation-0)",AEditor_Primary_border:"1px solid var(--line-normal)",AEditor_Primary_color:"var(--label-normal)",AEditor_Primary_hover_border:"1px solid var(--line-strong)","AEditor_Primary_focus_background-color":"var(--elevation-0)",AEditor_Primary_focus_border:"1px solid var(--line-strong)","AEditor_ReadOnly_background-color":"var(--elevation-0)",AEditor_ReadOnly_border:"1px solid var(--line-normal)",AEditor_ReadOnly_hover_border:"1px solid var(--line-strong)",AEditor_ReadOnly_focus_border:"1px solid var(--line-strong)",AEditor_ReadOnly_color:"var(--label-normal)","AEditor_Error_background-color":"inherit",AEditor_Error_border:"1px solid var(--alert-danger)",AEditor_Error_color:"var(--alert-danger)",AEditor_Error_hover_border:"1px solid var(--alert-danger)",AEditor_Error_focus_border:"1px solid var(--alert-danger)",AEditor_Error_placeholder_color:"var(--alert-danger)","AEditor_Addon_Primary_background-color":"var(--background-normal)",AEditor_Addon_Primary_border:"1px solid var(--line-normal)",AEditor_Addon_Primary_color:"var(--label-normal)","AEditor_Addon_Secondary_background-color":"var(--background-normal)",AEditor_Addon_Secondary_border:"1px solid var(--line-strong)",AEditor_Addon_Secondary_color:"var(--label-neutral)","AEditor_Addon_hover_background-color":"var(--elevation-10)",AEditor_Addon_hover_color:"var(--acent-brand)",AEditor_Addon_focus_border:"1px solid var(--line-strong)","AEditor_border-radius":"2px","AEditor_Select_border-radius":"6px","AEditor_Option_border-radius":"6px",ACheckBox_color:"var(--label-normal)","ADialog_Paper_background-color":"#00000060","ADialog_background-color":"var(--elevation-0)",ADialog_border:"1px solid var(--line-neutral)","ADialog_Action_background-color":"var(--elevation-0)",ASelect_Placeholder_color:"var(--label-neutral)",ASelect_Primary_border:"1px solid var(--line-normal)",ASelect_Primary_hover_border:"1px solid var(--line-strong)",ASelect_Primary_Arrow_color:"var(--label-normal)","ASelect_Primary_Options_background-color":"var(--elevation-0)",ASelect_Primary_Options_border:"1px solid var(--line-normal)","ASelect_Primary_Option_hover_background-color":"var(--elevation-10)","ASelect_Primary_Option_active_background-color":"var(--elevation-10)","ASelect_Primary_Option_Selected_background-color":"var(--elevation-20)",ASelect_Secondary_border:"1px solid var(--elevation-10)",ASelect_Secondary_hover_border:"1px solid var(--elevation-10)","ASelect_Secondary_background-color":"var(--elevation-10)",ASelect_Secondary_Arrow_color:"var(--label-normal)","ASelect_Secondary_Options_background-color":"var(--elevation-0)",ASelect_Secondary_Options_border:"var(--line-normal)","ASelect_Secondary_Option_hover_background-color":"var(--elevation-10)","ASelect_Secondary_Option_active_background-color":"var(--elevation-10)","ASelect_Secondary_Option_Selected_background-color":"var(--elevation-20)",AMultiSelect_Placeholder_color:"var(--label-neutral)",AMultiSelect_Primary_border:"1px solid var(--line-normal)",AMultiSelect_Primary_hover_border:"1px solid var(--line-strong)",AMultiSelect_Primary_Arrow_color:"var(--label-normal)","AMultiSelect_Primary_Options_background-color":"var(--elevation-0)",AMultiSelect_Primary_Options_border:"1px solid var(--line-normal)","AMultiSelect_Primary_Option_hover_background-color":"var(--elevation-10)","AMultiSelect_Primary_Option_active_background-color":"var(--elevation-10)","AMultiSelect_Primary_Option_Selected_background-color":"var(--elevation-20)",AMultiSelect_Secondary_border:"1px solid var(--elevation-10)",AMultiSelect_Secondary_hover_border:"1px solid var(--elevation-10)","AMultiSelect_Secondary_background-color":"var(--elevation-10)",AMultiSelect_Secondary_Arrow_color:"var(--label-normal)","AMultiSelect_Secondary_Options_background-color":"var(--elevation-0)",AMultiSelect_Secondary_Options_border:"1px solid var(--line-normal)","AMultiSelect_Secondary_Option_hover_background-color":"var(--elevation-10)","AMultiSelect_Secondary_Option_active_background-color":"var(--elevation-10)","AMultiSelect_Secondary_Option_Selected_background-color":"var(--elevation-20)","ATree_background-color":"var(--elevation-0)",ATree_Indent_border:"1px solid var(--line-normal)","ATreeBodyHeader_border-bottom":"1px solid var(--line-normal)","ATreeItem_hover_background-color":"var(--elevation-10)","ATreeItem_active_background-color":"var(--elevation-10)","ATreeItem_select_background-color":"var(--elevation-10)","ATreeItem_search_background-color":"yellow","ATreeItem_search_border-top":"1px dashed var(--label-normal)","ATreeItem_search_border-bottom":"1px dashed var(--label-normal)",ATreeItem_select_color:"var(--label-normal)",ASwitch_Track_Falsy_border:"12px solid var(--elevation-20)",ASwitch_Track_Truthy_border:"12px solid var(--acent-brand)",ASwitch_Thumb_border:"9px solid var(--static-white)","ATab_IndicatorTrack_Primary_border-bottom":"1px solid var(--line-normal)","ATab_Indicator_Primary_background-color":"var(--label-normal)",ATab_Option_Secondary_border:"2px solid var(--label-normal)","ATab_Option_Secondary_IsSelected_border-bottom":"2px solid var(--elevation-0)",ATab_Option_Secondary_IsDisabled_border:"2px solid var(--line-neutral)","ATab_IndicatorTrack_Tertiary_background-color":"var(--line-normal)","ATab_Indicator_Tertiary_background-color":"var(--elevation-0)",ATab_Option_Tertiary_color:"var(--line-strong)",ATab_Option_Tertiary_IsSelected_color:"var(--label-strong)",ATab_Option_Quaternary_color:"var(--label-neutral)",ATab_Option_Quaternary_IsSelected_color:"var(--label-normal)",AFileBox_border:"1px dashed var(--label-normal)","AFileBox_background-color":"var(--elevation-10)",AFileBox_SelectedFile_color:"var(--label-normal)",AFileBox_Dropping_color:"var(--label-normal)","AFileUploader_background-color":"var(--background-normal)",AFileUploader_brand_color:"var(--acent-brand)",AFileUploader_disabled_color:"var(--label-neutral)",AFileUploader_error_color:"var(--alert-danger)",AFileUploader_text_color:"var(--label-normal)","AListView_border-thin":"1px solid var(--line-neutral)","AListView_border-thick":"3px solid var(--line-neutral)","AStepper_OutCircle_background-color":"transparent","AStepper_OutCircle_IsOver_background-color":"var(--elevation-10)","AStepper_InCircle_background-color":"var(--elevation-20)","AStepper_InCircle_IsOver_background-color":"var(--label-normal)","AStepper_Line_background-color":"var(--line-neutral)","AStepper_Line_IsOver_background-color":"var(--label-normal)",ADatePicker_Anchor_border:"1px solid var(--line-normal)",ADatePicker_Anchor_color:"var(--label-normal)",ADatePicker_Anchor_Placeholder_color:"var(--label-neutral)",ADatePicker_Anchor_hover_border:"1px solid var(--line-strong)",ADatePicker_Anchor_focus_border:"1px solid var(--line-strong)",ADatePicker_Anchor_Icon_Primary_color:"var(--label-normal)",ADatePicker_Anchor_Icon_Secondary_color:"var(--label-normal)","ADatePicker_background-color":"var(--elevation-0)",ADatePicker_border:"1px solid var(--line-neutral)","ADatePicker_StringInputContainer_background-color":"var(--label-neutral)",ADatePicker_String_border:"1px solid var(--label-normal)","ADatePicker_Prev_background-color":"var(--elevation-10)","ADatePicker_Prev_border-right":"6px solid var(--label-normal)","ADatePicker_Next_background-color":"var(--elevation-10)","ADatePicker_Next_border-left":"6px solid var(--label-normal)",ADatePicker_Cell_color:"var(--label-normal)",ADatePicker_Cell_IsNotCurrentMonth_color:"var(--label-neutral)",ADatePicker_Cell_IsDisabled_color:"var(--label-neutral)","ADatePicker_Cell_IsSelected_background-color":"var(--elevation-20)",ADatePicker_Cell_IsSelected_color:"var(--label-normal)","ADatePicker_Cell_IsHovered_background-color":"var(--elevation-10)",ADateRangePicker_Anchor_border:"1px solid var(--line-normal)",ADateRangePicker_Anchor_color:"var(--label-normal)",ADateRangePicker_Anchor_Placeholder_color:"var(--label-neutral)",ADateRangePicker_Anchor_hover_border:"1px solid var(--line-strong)",ADateRangePicker_Anchor_focus_border:"1px solid var(--line-strong)",ADateRangePicker_Anchor_Icon_Primary_color:"var(--label-normal)",ADateRangePicker_Anchor_Icon_Secondary_color:"var(--label-normal)","ADateRangePicker_background-color":"var(--elevation-0)",ADateRangePicker_border:"1px solid var(--line-neutral)","ADateRangePicker_StringInputContainer_background-color":"var(--label-neutral)",ADateRangePicker_String_border:"1px solid var(--label-normal)","ADateRangePicker_Prev_background-color":"var(--elevation-10)","ADateRangePicker_Prev_border-right":"6px solid var(--label-normal)","ADateRangePicker_Next_background-color":"var(--elevation-10)","ADateRangePicker_Next_border-left":"6px solid var(--label-normal)",ADateRangePicker_Cell_color:"var(--label-normal)",ADateRangePicker_Cell_IsNotCurrentMonth_color:"var(--label-neutral)",ADateRangePicker_Cell_IsDisabled_color:"var(--label-neutral)","ADateRangePicker_Cell_IsSelected_background-color":"var(--elevation-20)",ADateRangePicker_Cell_IsSelected_color:"var(--label-normal)","ADateRangePicker_Cell_IsHovered_background-color":"var(--elevation-10)",AIconButton_Primary_color:"var(--label-normal)",AIconButton_Primary_border:"1px solid var(--line-normal)","AIconButton_Primary_background-color":"var(--elevation-0)","AIconButton_Primary_hover_background-color":"var(--elevation-10)","AIconButton_Primary_active_background-color":"var(--elevation-20)",AIconButton_Secondary_color:"var(--label-normal)","AIconButton_Secondary_background-color":"var(--elevation-0)","AIconButton_Secondary_hover_background-color":"var(--elevation-10)","AIconButton_Secondary_active_background-color":"var(--elevation-20)","ATableBody_TRow_border-bottom":"1px solid var(--line-normal)","ATableBody_TRow_IsSelected_background-color":"var(--elevation-10)","ATableBody_TRow_IsSelectable_hover_background-color":"var(--elevation-10)",ATableBody_TH_color:"var(--label-neutral)","ATableBody_TD_IsMarked_background-color":"yellow",ATableBody_TD_IsMarked_color:"var(--label-normal)","ATableBody_Resizer_hover_ResizerCenter_background-color":"var(--line-neutral)","ATableBody_Resizer_active_ResizerCenter_background-color":"var(--line-neutral)","ATableBody_Resizer_active_ResizerOut_background-color":"var(--line-neutral)","ATableBody_Resizer_active_ResizerIn_background-color":"var(--line-neutral)","ATableFooter_Button_IsSelected_background-color":"var(--elevation-10)",ATableFooter_Button_IsSelected_color:"var(--label-normal)",ATableFooter_Button_IsDisabled_color:"var(--label-neutral)","ATableFilter_SubFilters_background-color":"var(--elevation-0)",ATableFilter_SubFilters_border:"1px solid var(--line-normal)",ATableFilter_Icon_color:"var(--label-normal)",ATableFilter_Alert_color:"var(--alert-danger)","ADivideFrame_DividerInner_background-color":"var(--line-normal)","AFloatMenu_background-color":"var(--elevation-0)","AFloatMenu_hover_background-color":"var(--elevation-10)",AFloatMenu_color:"var(--label-normal)",AFloatMenu_border:"1px solid var(--line-neutral)","ALoadingBorder_background-color":"var(--label-normal)","ALoadingBorder_ProgressBar_background-color":"var(--elevation-0)","ALoadingBorder_Cover_background-color":"var(--label-normal)",AWrap_Error_color:"var(--alert-danger)",ARadioSelect_RadioButton_border:"1px solid var(--line-normal)","ARadioSelect_RadioButton_InnerCircle_isChecked_background-color":"var(--acent-brand)","AChip_background-color":"var(--elevation-10)",AChip_color:"var(--label-normal)",AChip_border:"1px solid var(--line-normal)","AChip_hover_background-color":"var(--elevation-20)",AChip_hover_color:"var(--label-normal)",AChip_DeleteButton_border:"9px solid var(--line-normal)",AChip_DeleteButton_color:"var(--label-normal)",AChip_DeleteButton_hover_border:"9px solid var(--line-strong)",AChip_DeleteButton_hover_color:"var(--label-normal)"};function IT(n){return Sv[n]}function kT(n){return Ev(n)}function M3(n){er.keys(n).forEach(t=>{const r=n[t];r!==void 0&&(document.documentElement.style.setProperty(`--${t}`,r),Sv[t]=r)})}function MT(n){er.keys(n).forEach(t=>{const r=n[t];if(r===void 0)return;const i=sc.semantic[va.semanticMode][r];i!==void 0&&(document.documentElement.style.setProperty(t,i),Sv[t]=i)})}const va={paletteMode:_v[0],semanticMode:m1[0],save:"",followDeviceSetting:!1};function LT({semanticMode:n,save:e,followDeviceSetting:t}){if(t!==void 0&&(va.followDeviceSetting=t,t)){const r=window.matchMedia("(prefers-color-scheme: dark)"),i=l=>{va.semanticMode=l.matches?"dark":"light"};i(r);const o=l=>i(l);r.addEventListener("change",o)}if(e!==void 0){if(va.save=e,e==="localStorage"){const r=localStorage.getItem("semanticMode");m1.includes(r)&&(va.semanticMode=r)}else if(e==="sessionStorage"){const r=sessionStorage.getItem("semanticMode");m1.includes(r)&&(va.semanticMode=r)}}n!==void 0&&(va.semanticMode=n),$C(va.paletteMode),mm(va.semanticMode),e3(sc.palette[va.paletteMode]),n3(sc.semantic[va.semanticMode]),M3(Sv)}function OT(n){n.type==="semanticModeChange"?$0.push(n.listener):n.type==="paletteModeChange"?j0.push(n.listener):console.error("AThemes.addEventListener : parameter is not valid")}function PT(n){if(n.type==="semanticModeChange"){const e=$0.indexOf(n.listener);e!==-1&&$0.splice(e,1)}else if(n.type==="paletteModeChange"){const e=j0.indexOf(n.listener);e!==-1&&j0.splice(e,1)}else console.error("AThemes.removeEventListener : parameter is not valid")}function Ev(n){const e=window.getComputedStyle(document.documentElement);let t=e.getPropertyValue(n);return t===""&&(t=e.getPropertyValue(`--${n}`)),t}function DT(n){Object.assign(gt.additionalClasses,n),gt.updateKeys(),gt.additionalClasses=gt.additionalClasses}const gp={getCurrentPaletteMode:CT,getPaletteValue:_T,getPaletteDeepValue:ST,changePaletteMode:$C,editPalette:e3,getCurrentSemanticMode:ET,getSemanticValue:AT,getSemanticDeepValue:TT,changeSemanticMode:mm,editSemantic:n3,getComponentStyleValue:IT,getComponentStyleDeepValue:kT,editComponentStyle:M3,editComponentStyleWithSemantic:MT,init:LT,addEventListener:OT,removeEventListener:PT,getDeepValue:Ev,addClasses:DT},NT=n=>{const e=Dn.c(9),{onChange:t,onClick:r,type:i,...o}=n,l=i===void 0?"Icon":i,[a,u]=N.useState(gp.getCurrentSemanticMode()==="dark"?"Moon":"Sun");let h;e[0]!==r||e[1]!==t?(h=x=>{const w=gp.getCurrentSemanticMode();let _="light";w==="light"?_="dark":w==="dark"&&(_="light"),gp.changeSemanticMode(_),u(FT[_]),t==null||t(_),r==null||r(x)},e[0]=r,e[1]=t,e[2]=h):h=e[2];const y=h;if(l==="Icon")return k.jsx(ba,{...o,className:gt.clsx(Ep.AThemeButton,o.className,"IsInteractive"),icon:a,type:"Raw",onClick:y});if(l==="Switch"){let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=gp.getCurrentSemanticMode(),e[3]=x):x=e[3];let w;e[4]!==y?(w=[x==="dark",y],e[4]=y,e[5]=w):w=e[5];let _;return e[6]!==o||e[7]!==w?(_=k.jsx(qC,{...o,useCheck:w}),e[6]=o,e[7]=w,e[8]=_):_=e[8],_}},FT={light:"Sun",dark:"Moon"},BT="_ACheckBoxWrap_1ozuz_1",zT="_ACheckBox_1ozuz_1",U2={ACheckBoxWrap:BT,ACheckBox:zT},x1=n=>{const e=Dn.c(16),{useCheck:t,isIndeterminate:r,isDisabled:i,isLoading:o,onClick:l,...a}=n,[u,h]=Ho(t,!1);let y;e[0]!==u||e[1]!==l||e[2]!==i||e[3]!==o||e[4]!==h?(y=O=>{i||o||(h==null||h(!u),l==null||l(O))},e[0]=u,e[1]=l,e[2]=i,e[3]=o,e[4]=h,e[5]=y):y=e[5];const x=y,w=Gi,_=gt.clsx(a.className,U2.ACheckBoxWrap),S=r?"Check.Indeterminate":u?"Check.Checked":"Check.UnChecked";let R;e[6]!==S?(R=k.jsx(ho,{className:U2.ACheckBox,icon:S}),e[6]=S,e[7]=R):R=e[7];let I;return e[8]!==w||e[9]!==a||e[10]!==i||e[11]!==o||e[12]!==x||e[13]!==_||e[14]!==R?(I=k.jsx(w,{...a,className:_,isDisabled:i,isLoading:o,onClick:x,children:R}),e[8]=w,e[9]=a,e[10]=i,e[11]=o,e[12]=x,e[13]=_,e[14]=R,e[15]=I):I=e[15],I};function HT(n){return typeof n=="function"}function WT(n,e){return HT(n)?n(e):n}const Zr={getContent:WT};class G2{constructor(e){Ae(this,"capacity");Ae(this,"cache",new Map);this.capacity=e}get(e){if(!this.cache.has(e))return;const t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}put(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}delete(e){return this.cache.delete(e)}clear(){this.cache.clear()}entries(){return Array.from(this.cache.entries())}}const Rg=class Rg{constructor(){Ae(this,"databases",{});Ae(this,"caches",{});Ae(this,"DEFAULT_CACHE_SIZE",100)}static getInstance(){return Rg.instance||(Rg.instance=new Rg),Rg.instance}getCache(e,t){const r=`${e}_${t}`;return this.caches[r]||(this.caches[r]=new G2(this.DEFAULT_CACHE_SIZE)),this.caches[r]}async getDB(e,t,r=1){return this.databases[e]?this.databases[e]:new Promise((i,o)=>{if(!window.indexedDB){console.error("이 브라우저는 IndexedDB를 지원하지 않습니다."),o(new Error("IndexedDB not supported"));return}const l=window.indexedDB.open(e,r);l.onerror=a=>{console.error("IndexedDB 연결 오류:",a.target.error),o(a.target.error)},l.onsuccess=a=>{const u=a.target.result;this.databases[e]=u,i(u)},l.onupgradeneeded=a=>{const u=a.target.result;u.objectStoreNames.contains(t)||u.createObjectStore(t,{keyPath:"id"}).createIndex("updatedAt_idx","updatedAt",{unique:!1})}})}async save(e,t,r){this.getCache(e,t).put(r.id,{...r});const a=(await this.getDB(e,t)).transaction([t],"readwrite").objectStore(t);return new Promise((u,h)=>{const y=a.put(r);y.onsuccess=()=>u(),y.onerror=x=>{console.error("데이터 저장 오류:",x.target.error),h(x.target.error)}})}async batchSave(e,t,r){if(r.length===0)return;const i=this.getCache(e,t);r.forEach(u=>i.put(u.id,{...u}));const l=(await this.getDB(e,t)).transaction([t],"readwrite"),a=l.objectStore(t);return new Promise((u,h)=>{l.oncomplete=()=>u(),l.onerror=y=>{console.error("배치 저장 오류:",y.target.error),h(y.target.error)},r.forEach(y=>a.put(y))})}async get(e,t,r){const i=this.getCache(e,t),o=i.get(r);if(o)return o;const u=(await this.getDB(e,t)).transaction([t],"readonly").objectStore(t);return new Promise((h,y)=>{const x=u.get(r);x.onsuccess=()=>{const w=x.result;w&&i.put(r,w),h(w||null)},x.onerror=w=>{console.error("데이터 조회 오류:",w.target.error),y(w.target.error)}})}async getByIndex(e,t,r,i){const u=(await this.getDB(e,t)).transaction([t],"readonly").objectStore(t).index(r);return new Promise((h,y)=>{const x=u.getAll(i);x.onsuccess=()=>{const w=x.result,_=this.getCache(e,t);w.forEach(S=>{S&&S.id&&_.put(S.id,S)}),h(w)},x.onerror=w=>{console.error("인덱스 조회 오류:",w.target.error),y(w.target.error)}})}async delete(e,t,r){this.getCache(e,t).delete(r);const a=(await this.getDB(e,t)).transaction([t],"readwrite").objectStore(t);return new Promise((u,h)=>{const y=a.delete(r);y.onsuccess=()=>u(),y.onerror=x=>{console.error("데이터 삭제 오류:",x.target.error),h(x.target.error)}})}async batchDelete(e,t,r){if(r.length===0)return;const i=this.getCache(e,t);r.forEach(u=>i.delete(u));const l=(await this.getDB(e,t)).transaction([t],"readwrite"),a=l.objectStore(t);return new Promise((u,h)=>{l.oncomplete=()=>u(),l.onerror=y=>{console.error("배치 삭제 오류:",y.target.error),h(y.target.error)},r.forEach(y=>a.delete(y))})}async getAll(e,t){const o=(await this.getDB(e,t)).transaction([t],"readonly").objectStore(t);return new Promise((l,a)=>{const u=o.getAll();u.onsuccess=()=>{const h=u.result,y={},x=this.getCache(e,t);h.forEach(w=>{w.id&&(y[w.id]=w,x.put(w.id,w))}),l(y)},u.onerror=h=>{console.error("데이터 전체 조회 오류:",h.target.error),a(h.target.error)}})}async clear(e,t){this.getCache(e,t).clear();const l=(await this.getDB(e,t)).transaction([t],"readwrite").objectStore(t);return new Promise((a,u)=>{const h=l.clear();h.onsuccess=()=>a(),h.onerror=y=>{console.error("데이터 초기화 오류:",y.target.error),u(y.target.error)}})}getCached(e,t,r){return this.getCache(e,t).get(r)||null}clearCached(e,t){this.getCache(e,t).clear()}setCacheSize(e,t,r){const i=`${e}_${t}`,l=this.getCache(e,t).entries();this.caches[i]=new G2(r);for(const[a,u]of l)this.caches[i].get(a)===void 0&&a!==void 0&&this.caches[i].put(a,u)}};Ae(Rg,"instance");let Iy=Rg;const Sd=Iy.getInstance(),Td={save:(n,e,t)=>Sd.save(n,e,t),get:(n,e,t)=>Sd.get(n,e,t),delete:(n,e,t)=>Sd.delete(n,e,t),getAll:(n,e)=>Sd.getAll(n,e),clear:(n,e)=>Sd.clear(n,e),batchSave:(n,e,t)=>Sd.batchSave(n,e,t),batchDelete:(n,e,t)=>Sd.batchDelete(n,e,t),getByIndex:(n,e,t,r)=>Sd.getByIndex(n,e,t,r),getCached:(n,e,t)=>Sd.getCached(n,e,t),clearCached:(n,e)=>Sd.clearCached(n,e),setCacheSize:(n,e,t)=>Sd.setCacheSize(n,e,t)};function L3(n,e,t={}){const{dataFieldName:r="data"}=t,[i,o]=N.useState(!1),[l,a]=N.useState(null),u=N.useRef(new Map);N.useEffect(()=>{const B=u.current;return()=>{B.forEach(ee=>ee.abort()),B.clear()}},[]);const h=N.useCallback(async(B,ee)=>{try{o(!0),a(null);const H=u.current,V=H.get(B);V&&V.abort();const de=new AbortController;H.set(B,de);const Z=await ee();return u.current.delete(B),Z}catch(H){return H instanceof Error&&H.name==="AbortError"||a(H instanceof Error?H:new Error(String(H))),null}finally{o(!1)}},[]),y=N.useCallback(async(B,ee)=>B?await h(`save_${B}`,async()=>(await Td.save(n,e,{id:B,[r]:ee,updatedAt:new Date().toISOString()}),!0))===!0:!1,[n,e,r,h]),x=N.useCallback(async B=>B.length?await h(`batch_save_${Date.now()}`,async()=>{const ee=B.map(H=>({id:H.id,[r]:H.data,updatedAt:new Date().toISOString()}));return await Td.batchSave(n,e,ee),!0})===!0:!1,[n,e,r,h]),w=N.useCallback(async B=>B?await h(`get_${B}`,async()=>{const ee=await Td.get(n,e,B);return(ee==null?void 0:ee[r])||null}):null,[n,e,r,h]),_=N.useCallback(B=>{if(!B)return null;const ee=Td.getCached(n,e,B);return(ee==null?void 0:ee[r])||null},[n,e,r]),S=N.useCallback(async B=>B?await h(`delete_${B}`,async()=>(await Td.delete(n,e,B),!0))===!0:!1,[n,e,h]),R=N.useCallback(async B=>B.length?await h(`batch_delete_${Date.now()}`,async()=>(await Td.batchDelete(n,e,B),!0))===!0:!1,[n,e,h]),I=N.useCallback(async()=>await h(`get_all_${Date.now()}`,async()=>{const B=await Td.getAll(n,e);return Object.entries(B).reduce((ee,[H,V])=>(ee[H]=V[r],ee),{})})||{},[n,e,r,h]),O=N.useCallback(async()=>await h(`clear_all_${Date.now()}`,async()=>(await Td.clear(n,e),!0))===!0,[n,e,h]),P=N.useCallback(B=>{const ee=u.current.get(B);ee&&(ee.abort(),u.current.delete(B))},[]),Y=N.useCallback(()=>{new Map(u.current).forEach(ee=>ee.abort()),u.current.clear()},[]),z=N.useCallback(B=>{Td.setCacheSize(n,e,B)},[n,e]),W=N.useCallback(()=>{Td.clearCached(n,e)},[n,e]);return{save:y,get:w,delete:S,getAll:I,clearAll:O,batchSave:x,batchDelete:R,getCached:_,setCacheSize:z,clearCache:W,cancelOperation:P,cancelAllOperations:Y,isLoading:i,error:l}}const UT="LayoutDB",GT="layouts";function O3(){const n=Dn.c(24);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e={dataFieldName:"lengths"},n[0]=e):e=n[0];const t=L3(UT,GT,e);let r;n[1]===Symbol.for("react.memo_cache_sentinel")?(r={},n[1]=r):r=n[1];const[i,o]=N.useState(r);let l;n[2]===Symbol.for("react.memo_cache_sentinel")?(l={},n[2]=l):l=n[2];const a=N.useRef(l);let u;n[3]!==t?(u=async(W,B)=>await t.save(W,B),n[3]=t,n[4]=u):u=n[4];const h=u;let y;n[5]!==t?(y=async W=>await t.get(W),n[5]=t,n[6]=y):y=n[6];const x=y;let w;n[7]!==t?(w=W=>t.getCached(W),n[7]=t,n[8]=w):w=n[8];const _=w;let S;n[9]!==x||n[10]!==_||n[11]!==i?(S=W=>{const B=_(W);return B?{data:B,isLoaded:!0}:a.current[W]!==void 0?{data:a.current[W],isLoaded:!!i[W]}:(i[W]||(a.current[W]=null,x(W).then(ee=>{a.current[W]=ee,o(H=>({...H,[W]:!0}))})),{data:null,isLoaded:!1})},n[9]=x,n[10]=_,n[11]=i,n[12]=S):S=n[12];const R=S;let I;n[13]!==t?(I=async W=>(o(B=>{const ee={...B};return delete ee[W],ee}),a.current[W]!==void 0&&delete a.current[W],await t.delete(W)),n[13]=t,n[14]=I):I=n[14];const O=I;let P;n[15]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{o({}),a.current={}},n[15]=P):P=n[15];const Y=P;let z;return n[16]!==t.error||n[17]!==t.isLoading||n[18]!==O||n[19]!==x||n[20]!==_||n[21]!==R||n[22]!==h?(z={save:h,get:x,getCached:_,getSync:R,deleteItem:O,resetSyncState:Y,isLoading:t.isLoading,error:t.error},n[16]=t.error,n[17]=t.isLoading,n[18]=O,n[19]=x,n[20]=_,n[21]=R,n[22]=h,n[23]=z):z=n[23],z}const YT="_ARowFrame_1v0ao_1",VT="_AColFrame_1v0ao_7",ZT="_AOverflowFrame_1v0ao_13",XT="_ADivideFrame_1v0ao_22",KT="_Row_1v0ao_30",JT="_Col_1v0ao_33",QT="_FadeIn_1v0ao_36",qT="_NoTransition_1v0ao_39",jT="_ChildFrame_1v0ao_43",$T="_ExpandButtonOverlay_1v0ao_61",e6="_Divider_1v0ao_73",t6="_IsMoving_1v0ao_81",n6="_NoDraggable_1v0ao_81",r6="_DividerInner_1v0ao_84",i6="_IsClicked_1v0ao_109",o6="_RemoteButton_1v0ao_144",l6="_isExpanded_1v0ao_151",s6="_ExpandButton_1v0ao_61",kl={ARowFrame:YT,AColFrame:VT,AOverflowFrame:ZT,ADivideFrame:XT,Row:KT,Col:JT,FadeIn:QT,NoTransition:qT,ChildFrame:jT,ExpandButtonOverlay:$T,Divider:e6,IsMoving:t6,NoDraggable:n6,DividerInner:r6,IsClicked:i6,RemoteButton:o6,isExpanded:l6,"fade-in":"_fade-in_1v0ao_1",ExpandButton:s6},bl=n=>{const e=Dn.c(5);let t;e[0]!==n.className?(t=gt.clsx(kl.ARowFrame,n.className),e[0]=n.className,e[1]=t):t=e[1];let r;return e[2]!==n||e[3]!==t?(r=k.jsx(Gi,{...n,className:t,children:n.children}),e[2]=n,e[3]=t,e[4]=r):r=e[4],r},P3=n=>{const e=Dn.c(5);let t;e[0]!==n.className?(t=gt.clsx(kl.AColFrame,n.className),e[0]=n.className,e[1]=t):t=e[1];let r;return e[2]!==n||e[3]!==t?(r=k.jsx("div",{...n,className:t,children:n.children}),e[2]=n,e[3]=t,e[4]=r):r=e[4],r},nh=n=>{const{tooltip:e,children:t,abaseRef:r,isDisabled:i,className:o,noOverflowTooltip:l,...a}=n,{onMouseEnter:u,onMouseLeave:h,...y}=a,x=N.useRef(null),w=N.useMemo(()=>r??x,[r]),[_,S]=N.useState(!1),R=N.useCallback(P=>{S(!0),u==null||u(P)},[u]),I=N.useCallback(P=>{S(!1),h==null||h(P)},[h]),O=N.useMemo(()=>{if(i)return"";if(l||!_)return e;const P=w.current;return P&&P.scrollWidth>P.clientWidth?t:e},[w,i,t,e,l,_]);return k.jsx(Gi,{...y,children:t,abaseRef:w,className:gt.clsx(kl.AOverflowFrame,o),isDisabled:i,tooltip:O,onMouseEnter:R,onMouseLeave:I})},D3=n=>{const e=Dn.c(2),{value:t,map:r}=n;if(r[t]===void 0)return r.fallback;const i=r[t];let o;return e[0]!==i?(o=k.jsx(N.Suspense,{children:i}),e[0]=i,e[1]=o):o=e[1],o},N3=N.memo(n=>{const{pk:e,direction:t="Row",lefts:r,minLength:i=40,expandLayerLength:o=40,children:l,childStyle:a,childClassName:u,dividerStyle:h,dividerClassName:y,dividerPadding:x,dividerInnerClassName:w,dividerInnerStyle:_,noDividerDraggable:S,resources:R,showExpandButton:I,...O}=n,P=N.useMemo(()=>({...Nr.ADivideFrame,...R}),[R]),Y=N.useRef(null),z=N.useRef(!1),W=N.useRef(!0),B=N.useRef(r),[ee,H]=N.useState(),[V,de]=N.useState("FadeOut"),[Z,te]=N.useState(null),[ne,fe]=N.useState({width:0,height:0}),{save:ae,get:j,deleteItem:re}=O3(),he=N.useCallback(()=>{W.current&&requestAnimationFrame(()=>{W.current=!1,de("FadeIn")})},[]),be=N.useMemo(()=>{let Ye;return Array.isArray(l)?Ye=l:Ye=[l],Ye.filter(Boolean)},[l]),le=N.useMemo(()=>be.length,[be.length]),J=N.useMemo(()=>be.length-1,[be.length]),pe=N.useMemo(()=>e?String(e):"",[e]),Te=N.useMemo(()=>!!e,[e]),Fe=N.useCallback(async()=>{if(!Te){te(r),he();return}try{const Ye=await j(pe);Ye?te(Ye):(te(r),ae(pe,r)),he()}catch{te(r),he()}},[Te,he,pe,j,r,ae]);N.useEffect(()=>{Fe()},[Fe]),N.useEffect(()=>{const Ye=Y.current;if(!Ye)return;const mt=Ye.getBoundingClientRect();fe({width:mt.width,height:mt.height});const bt=new ResizeObserver(Mt=>{for(const Nt of Mt){const{width:_t,height:rn}=Nt.contentRect;fe({width:_t,height:rn})}});return bt.observe(Ye),()=>bt.disconnect()},[]),N.useEffect(()=>{B.current!==r&&(B.current=r,z.current||(te(r),Te&&ae(pe,r)),z.current=!1)},[Te,r,pe,ae]);const _e=N.useMemo(()=>{const Ye=x??0;return typeof i=="number"?Array(le).fill(i+Ye):i.map(mt=>mt+Ye)},[i,le,x]),Me=N.useMemo(()=>typeof o=="number"?Array(le).fill(o):o,[o,le]),De=N.useMemo(()=>(ee==null?void 0:ee.lefts)||Z||[],[ee,Z]),Re=N.useRef({x:0,y:0}),Le=N.useCallback((Ye,mt,bt)=>{const Mt=De[Ye],Nt=Ye===0?0:De[Ye-1],_t=Mt-Nt,rn={...a,...a6(t,_t,mt)};return x!==void 0&&(t==="Row"?(bt||(rn.paddingLeft=x),mt||(rn.paddingRight=x)):(bt||(rn.paddingTop=x),mt||(rn.paddingBottom=x))),rn},[De,a,t,x]),Oe=N.useCallback((Ye,mt)=>{if(mt)return bt=>{if(!Y.current||!Z)return;W.current=!1;const Mt=Y.current;Re.current={x:bt.clientX,y:bt.clientY};const Nt=Mt.getBoundingClientRect(),_t=t==="Row"?Nt.left:Nt.top,rn=t==="Row"?Nt.width:Nt.height;let pn=[...Z];H({idx:Ye,lefts:pn});const Kt=zt=>{pn=d6(Z,t,Ye,zt,_t,rn,_e),H({idx:Ye,lefts:pn})},dn=()=>{H(void 0),te(pn),z.current=!0,Te&&ae(pe,pn),window.removeEventListener("mousemove",Kt),window.removeEventListener("mouseup",dn)};window.addEventListener("mousemove",Kt),window.addEventListener("mouseup",dn)}},[Z,t,_e,Te,pe,ae]),Ge=N.useCallback(Ye=>{if(Ye)return()=>{te(r),z.current=!1,H(void 0),Te&&re(pe)}},[r,Te,pe,re]),Ve=N.useMemo(()=>be.map(()=>!S),[be,S]),Pe=N.useMemo(()=>{if(!I||!Y.current||V!=="FadeIn")return{hasCollapsedAreas:!1,collapsedAreaIndex:-1};if(!ne.width)return{hasCollapsedAreas:!1,collapsedAreaIndex:-1};const Ye=Y.current.getBoundingClientRect(),mt=t==="Row"?Ye.width:Ye.height;if(mt===0)return{hasCollapsedAreas:!1,collapsedAreaIndex:-1};const bt=[];for(let _t=0;_t<le;_t++){const rn=De[_t],pn=_t===0?0:De[_t-1],Kt=_t===J?mt-pn:rn-pn,dn=Array.isArray(Me)?Me[_t]:Me[0];bt.push({panelIndex:_t,actualLength:Kt,expandLength:dn,isCollapsed:Kt<=dn})}const Mt=bt.filter(_t=>_t.isCollapsed).map(_t=>_t.panelIndex);if(Mt.length===0)return{hasCollapsedAreas:!1,collapsedAreaIndex:-1};let Nt=-1;return Mt.includes(0)?Nt=0:Mt.includes(J)?Nt=J:Nt=Mt[0],{hasCollapsedAreas:!0,collapsedAreaIndex:Nt}},[I,V,t,le,J,De,Me,ne]),ot=N.useCallback(()=>{I&&(te(r),z.current=!1,Te&&ae(pe,r),W.current=!1)},[I,r,Te,pe,ae]),Xe=N.useMemo(()=>Ve.map((Ye,mt)=>Oe(mt,Ye)),[Ve,Oe]),lt=N.useMemo(()=>Ve.map(Ye=>Ge(Ye)),[Ve,Ge]);return Z?k.jsx("div",{...O,ref:Y,className:gt.clsx(kl.ADivideFrame,n.className,kl[t],kl[V],W.current&&kl.NoTransition),children:be.map((Ye,mt)=>{const bt=mt===0,Mt=mt===J,Nt=Le(mt,Mt,bt),_t=De[mt],rn=Ve[mt],pn=Xe[mt],Kt=lt[mt];return k.jsxs(N.Fragment,{children:[k.jsxs("div",{style:Nt,className:gt.clsx(kl.ChildFrame,u,ee&&kl.IsMoving,W.current&&kl.NoTransition,kl[t]),children:[Ye,I&&Pe.hasCollapsedAreas&&Pe.collapsedAreaIndex===mt&&k.jsxs(k.Fragment,{children:[k.jsx(Gi,{className:gt.clsx(kl.ExpandButtonOverlay,kl[t]),onClick:ot}),k.jsx(ba,{className:gt.clsx(kl.ExpandButton,kl[t]),icon:u6(mt,le),tooltip:P.Expand,type:"Raw",style:{transform:f6(mt,t)},onClick:ot})]})]}),!Mt&&k.jsx("div",{"data-nodraggable":rn?void 0:"true",className:gt.clsx(kl.Divider,kl[t],"NoSelect",ee&&kl.IsMoving,(ee==null?void 0:ee.idx)===mt&&kl.IsClicked,W.current&&kl.NoTransition,!rn&&kl.NoDraggable,y),style:{...h,...c6(t,_t)},onDoubleClick:Kt,onMouseDown:pn,children:k.jsx("div",{className:gt.clsx(kl.DividerInner,w),style:{..._}})})]},mt)})}):k.jsx("div",{...O,ref:Y,className:gt.clsx(kl.ADivideFrame,n.className,kl[t],kl.FadeOut,kl.NoTransition),style:{...O.style,visibility:"hidden",pointerEvents:"none"}})});N3.displayName="ADivideFrame";function a6(n,e,t){return t?{}:n==="Col"?{height:e,minHeight:e,maxHeight:e}:{maxWidth:e,width:e,minWidth:e}}function c6(n,e){return n==="Col"?{top:e}:{left:e}}function u6(n,e){const t=n===0,r=n===e-1;return t||r?"DividerExpand":"DividerMiddle"}function f6(n,e){const t=n===0;let r="";return e==="Row"&&t?r=" rotate(180deg)":e==="Col"&&(r=t?" rotate(-90deg)":" rotate(90deg)"),`translate(-50%, -50%)${r}`}function d6(n,e,t,r,i,o,l){const a=[...n],u=e==="Row"?r.clientX-i-n[t]:r.clientY-i-n[t];if(u===0)return a;const h=l.length,y=n.length,x=t+1,w=[],_=[];let S=0;for(let O=0;O<=h;O++)w[O]=S,O<h&&(S+=l[O]);let R=0;for(let O=h-2;O>=0;O--)R+=l[O+1],_[O]=R;_[h-1]=0;let I=a[t]+u;if(u<0){if(I<=w[x])for(let O=0;O<=t;O++)a[O]=w[O+1];else if(a[t]=I,t>0)for(let O=t-1;O>=0&&I-a[O]<l[O+1];O--)a[O]=I-l[O+1],I=a[O]}else{const O=t===h-2?l[h-1]:0;if(I>=o-_[t]-O)for(let P=t;P<y;P++)a[P]=o-_[P]-(P===y-1?0:O);else if(a[t]=I,t<y-1)for(let P=x;P<y&&a[P]-I<l[P];P++)a[P]=I+l[P],I=a[P]}return a}const zg=()=>{const n=Dn.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=k.jsx("div",{style:{display:"flex",flexGrow:1}}),n[0]=e):e=n[0],e},h6="_ASpace_1okqf_1",g6={ASpace:h6},cs=n=>{const e=Dn.c(14);let t,r,i,o,l;e[0]!==n?({h:r,w:l,...t}=n,i=t,o=gt.clsx(g6.ASpace,t.className),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5]);let a;e[6]!==t.style||e[7]!==r||e[8]!==l?(a={height:r,minHeight:r,maxHeight:r,width:l,minWidth:l,maxWidth:l,...t.style},e[6]=t.style,e[7]=r,e[8]=l,e[9]=a):a=e[9];let u;return e[10]!==i||e[11]!==o||e[12]!==a?(u=k.jsx("div",{...i,className:o,style:a}),e[10]=i,e[11]=o,e[12]=a,e[13]=u):u=e[13],u},p6="_AChipsContainer_1ag9v_1",v6="_AChip_1ag9v_1",b6="_Clickable_1ag9v_21",y6="_AChipDelete_1ag9v_26",m6="_IsHover_1ag9v_40",x6="_AChipDeleteIcon_1ag9v_45",f1={AChipsContainer:p6,AChip:v6,Clickable:b6,AChipDelete:y6,IsHover:m6,AChipDeleteIcon:x6},w6=n=>{const e=Dn.c(42);let t,r,i,o,l,a,u,h,y,x,w,_;e[0]!==n?({useLabels:_,alignItems:y,ChipStyle:l,ChipClassName:t,ChipOnDelete:o,ChipOnClick:i,ChipIcon:r,className:u,style:h,ButtonRenderer:x,gap:w,...a}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12]);const S=y===void 0?"flex-start":y,R=x===void 0?F3:x,I=w===void 0?8:w;let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=[],e[13]=O):O=e[13];const[P,Y]=Ho(_,O);let z;e[14]!==o||e[15]!==P||e[16]!==Y?(z=te=>{!Y||!o||(o({label:te}),Y(P.filter(ne=>ne!==te)))},e[14]=o,e[15]=P,e[16]=Y,e[17]=z):z=e[17];const W=z;let B;e[18]!==t||e[19]!==r||e[20]!==i||e[21]!==l||e[22]!==W?(B=te=>{const ne={label:te};return{label:te,useLabel:[te,C6],style:Zr.getContent(l,ne),className:Zr.getContent(t,ne),icon:Zr.getContent(r,ne),onDelete:()=>W(te),onClick:i?()=>i({label:te}):void 0}},e[18]=t,e[19]=r,e[20]=i,e[21]=l,e[22]=W,e[23]=B):B=e[23];const ee=B;let H;e[24]!==u?(H=gt.clsx(f1.AChipsContainer,u),e[24]=u,e[25]=H):H=e[25];let V;e[26]!==S||e[27]!==I||e[28]!==h?(V={...h,alignItems:S,gap:I},e[26]=S,e[27]=I,e[28]=h,e[29]=V):V=e[29];let de;if(e[30]!==R||e[31]!==ee||e[32]!==P){let te;e[34]!==R||e[35]!==ee?(te=(ne,fe)=>k.jsx(xm,{...ee(ne),ButtonRenderer:R},fe),e[34]=R,e[35]=ee,e[36]=te):te=e[36],de=P.map(te),e[30]=R,e[31]=ee,e[32]=P,e[33]=de}else de=e[33];let Z;return e[37]!==a||e[38]!==H||e[39]!==V||e[40]!==de?(Z=k.jsx(Gi,{...a,className:H,style:V,children:de}),e[37]=a,e[38]=H,e[39]=V,e[40]=de,e[41]=Z):Z=e[41],Z},xm=n=>{const e=Dn.c(27);let t,r,i,o,l,a,u;if(e[0]!==n){const{label:O,useLabel:P,icon:Y,className:z,onDelete:W,onClick:B,ButtonRenderer:ee,width:H,style:V,...de}=n;i=O,r=z,o=B,a=ee,u=H,l=V,t=de,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7];const h=a===void 0?F3:a,y=u===void 0?"fit-content":u;if(i===void 0){let O;return e[8]===Symbol.for("react.memo_cache_sentinel")?(O=k.jsx(k.Fragment,{}),e[8]=O):O=e[8],O}let x;e[9]!==r||e[10]!==o?(x=gt.clsx("NoSelect",f1.AChip,o&&f1.Clickable,o&&"IsClickable",r),e[9]=r,e[10]=o,e[11]=x):x=e[11];let w;e[12]!==l||e[13]!==y?(w={...l,width:y},e[12]=l,e[13]=y,e[14]=w):w=e[14];const _=i;let S;e[15]!==_?(S=k.jsx(nh,{children:_}),e[15]=_,e[16]=S):S=e[16];let R;e[17]!==h||e[18]!==n?(R=h({...n}),e[17]=h,e[18]=n,e[19]=R):R=e[19];let I;return e[20]!==t||e[21]!==o||e[22]!==x||e[23]!==w||e[24]!==S||e[25]!==R?(I=k.jsxs(Gi,{...t,className:x,style:w,onClick:o,children:[S,R]}),e[20]=t,e[21]=o,e[22]=x,e[23]=w,e[24]=S,e[25]=R,e[26]=I):I=e[26],I},F3=n=>{const e=Dn.c(13),{label:t,icon:r,onDelete:i,useLabel:o}=n,[,l]=Ho(o,t),[a,u]=N.useState(!1);let h;e[0]!==i||e[1]!==n||e[2]!==l?(h=O=>{i&&(O.stopPropagation(),l==null||l(void 0),i(n))},e[0]=i,e[1]=n,e[2]=l,e[3]=h):h=e[3];const y=h;let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{u(!0)},e[4]=x):x=e[4];const w=x;let _;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(!1)},e[5]=_):_=e[5];const S=_;let R;e[6]!==y||e[7]!==r||e[8]!==a||e[9]!==i?(R=i&&k.jsxs(k.Fragment,{children:[k.jsx(zg,{}),k.jsx(cs,{w:24}),k.jsx(Gi,{className:gt.clsx(f1.AChipDelete,"IsClickable",a&&f1.IsHover)}),k.jsx(ba,{className:f1.AChipDeleteIcon,icon:r||k.jsx(ho,{height:14,icon:"Close",stroke:"currentColor",width:14}),type:"Raw",onClick:y,onMouseEnter:w,onMouseLeave:S})]}),e[6]=y,e[7]=r,e[8]=a,e[9]=i,e[10]=R):R=e[10];let I;return e[11]!==R?(I=k.jsx(k.Fragment,{children:R}),e[11]=R,e[12]=I):I=e[12],I};function C6(){}const Mg=n=>{if(!n)return"0 bytes";const e=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB","RB","QB"];let t=0;for(;n>=1024&&t<e.length-1;)n/=1024,t++;return`${t===0?Math.floor(n).toString():n.toFixed(1).replace(/\.0$/,"")} ${e[t]}`},_6=n=>{let e="";n<0&&(e+="-",n=-n);const t=Math.floor(n/3600),r=Math.floor(n%3600/60),i=n%60;return t>0&&(e+=t.toString().padStart(2,"0")+":"),e+=r.toString().padStart(2,"0")+":",e+=i.toString().padStart(2,"0"),e},S6=/[a-zA-Z0-9]/,E6=/^[a-zA-Z0-9]*$/,A6=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9]{2,}$/,T6=/^[a-zA-Z0-9._-]+$/,R6=/^[0-9a-fA-F-]+$/i,I6=/[가-힣ㄱ-ㅎㅏ-ㅣ]/,k6=/^\S*$/,M6=/^([^ㄱ-ㅎㅏ-ㅣ])*$/i,L6=/[!@#$%^&*+=;:?/<>\\[\](){}~\-_.(),]/,O6=/^(?=.*[A-Za-z])(?=.*\d)(?=.*[\W_])[A-Za-z\d\W_]{8,}$/,P6=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/,D6={hasKr:n=>/[가-힣ㄱ-ㅎㅏ-ㅣ]/.test(n),hasMalKr:n=>/[ㄱ-ㅎㅏ-ㅣ]/.test(n),hasBlank:n=>/\s/.test(n),isBlank:n=>/^\s*$/.test(n),isUuid:n=>/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/.test(n),isEmail:n=>/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9]{2,}$/.test(n),isAlphabet:n=>/^[a-zA-Z]*$/.test(n),isAlphaNumeric:n=>/^[a-zA-Z0-9]*$/.test(n),isKr:n=>/^[가-힣ㄱ-ㅎㅏ-ㅣ]*$/.test(n),isKrNumeric:n=>/^[가-힣ㄱ-ㅎㅏ-ㅣ0-9]*/.test(n),isNumeric:n=>/^[0-9]$/.test(n),isLenMinMax:(n,e)=>t=>!(n!==void 0&&t.length<n||e!==void 0&&t.length>e)},N6=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const e=Math.random()*16|0;return(n=="x"?e:e&3|8).toString(16)}),wm={secondToTime:_6,validate:D6,FileSizeTrans:Mg,uuid:N6},F6=n=>{const e=Dn.c(52);let t,r,i,o,l,a;if(e[0]!==n){const{maxTicks:J,interval:pe,onFinish:Te,noStartOnRender:Fe,actionRef:_e,...Me}=n;l=Te,o=Fe,t=_e,i=J===void 0?300:J,r=pe===void 0?1e3:pe,a=Bg(Me),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6];const[u,h]=a;let y,x,w,_;e[7]!==u?({wrapId:x,wrapProps:w,labelProps:y,..._}=u,e[7]=u,e[8]=y,e[9]=x,e[10]=w,e[11]=_):(y=e[8],x=e[9],w=e[10],_=e[11]);const[S,R]=N.useState(0),[I,O]=N.useState(!o);let P,Y;e[12]!==r||e[13]!==I||e[14]!==h.isDisabled||e[15]!==h.isLoading?(P=()=>{if(!I||h.isDisabled||h.isLoading)return;const J=setInterval(()=>R(B6),r);return()=>clearInterval(J)},Y=[r,I,h.isDisabled,h.isLoading],e[12]=r,e[13]=I,e[14]=h.isDisabled,e[15]=h.isLoading,e[16]=P,e[17]=Y):(P=e[16],Y=e[17]),N.useEffect(P,Y);let z;e[18]!==l?(z=()=>{l==null||l(),O(!1)},e[18]=l,e[19]=z):z=e[19];const W=z;let B,ee;e[20]!==i||e[21]!==W||e[22]!==h.isDisabled||e[23]!==h.isLoading||e[24]!==S?(B=()=>{S>=i&&!h.isDisabled&&!h.isLoading&&W()},ee=[S,i,W,h.isDisabled,h.isLoading],e[20]=i,e[21]=W,e[22]=h.isDisabled,e[23]=h.isLoading,e[24]=S,e[25]=B,e[26]=ee):(B=e[25],ee=e[26]),N.useEffect(B,ee);let H;e[27]!==h.isDisabled?(H=()=>{h.isDisabled||O(!0)},e[27]=h.isDisabled,e[28]=H):H=e[28];const V=H;let de;e[29]!==h.isDisabled?(de=()=>{h.isDisabled||O(!1)},e[29]=h.isDisabled,e[30]=de):de=e[30];const Z=de;let te;e[31]!==h.isDisabled?(te=()=>{h.isDisabled||(O(!1),R(0))},e[31]=h.isDisabled,e[32]=te):te=e[32];const ne=te;let fe,ae;e[33]!==t||e[34]!==ne||e[35]!==V||e[36]!==Z?(fe=()=>{t&&(t.current={start:V,stop:Z,reset:ne,setTicks:R})},ae=[t,V,Z,ne],e[33]=t,e[34]=ne,e[35]=V,e[36]=Z,e[37]=fe,e[38]=ae):(fe=e[37],ae=e[38]),N.useEffect(fe,ae);const j=i-S;let re;e[39]!==y||e[40]!==x||e[41]!==w||e[42]!==_?(re={wrapId:x,wrapProps:w,labelProps:y,..._},e[39]=y,e[40]=x,e[41]=w,e[42]=_,e[43]=re):re=e[43];let he;e[44]!==j?(he=wm.secondToTime(j>0?j:0),e[44]=j,e[45]=he):he=e[45];let be;e[46]!==h||e[47]!==he?(be=k.jsx(Gi,{...h,children:he}),e[46]=h,e[47]=he,e[48]=be):be=e[48];let le;return e[49]!==re||e[50]!==be?(le=k.jsx(lg,{...re,children:be}),e[49]=re,e[50]=be,e[51]=le):le=e[51],le};function B6(n){return n+1}function Pd(n){const e=n.getFullYear(),t=n.getMonth()+1,r=n.getDate();return`${e}-${t<10?"0"+t:t}-${r<10?"0"+r:r}`}function z6(n){try{if(!n)return;const e=new Date(n);return isNaN(e.getTime())?void 0:e}catch{return}}function H6(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0,0)}function W6(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59,999)}function Y2(n,e){return Pd(n)===Pd(e)}function d1(n,e){return Pd(n)>Pd(e)}function ev(n,e){return Pd(n)>=Pd(e)}function tv(n,e){return Pd(n)<Pd(e)}function nv(n,e){return Pd(n)<=Pd(e)}function V2(n,e,t){return d1(n,t)?d1(e,t)&&tv(e,n):d1(e,n)&&tv(e,t)}function Z2(n,e,t){return d1(n,t)?ev(e,t)&&nv(e,n):ev(e,n)&&nv(e,t)}const Yn={toString:Pd,toDate:z6,makeSDate:H6,makeEDate:W6,"===":Y2,">":d1,">=":ev,"<":tv,"<=":nv,"s<d<e|e<d<s":V2,"s<=d<=e|e<=d<=s":Z2,eq:Y2,g:d1,ge:ev,l:tv,le:nv,b:V2,be:Z2},U6="_InputContainer_16eoo_7",G6="_AInput_16eoo_21",Y6="_LeftAddon_16eoo_43",V6="_RightAddon_16eoo_50",Z6="_ErrorHelperText_16eoo_57",X6="_Primary_16eoo_61",K6="_UnAvailable_16eoo_66",J6="_Secondary_16eoo_77",Q6="_ReadOnly_16eoo_92",q6="_ANumInputUnitSelect_16eoo_108",ou={InputContainer:U6,AInput:G6,LeftAddon:Y6,RightAddon:V6,ErrorHelperText:Z6,Primary:X6,UnAvailable:K6,Secondary:J6,ReadOnly:Q6,Error:"_Error_16eoo_57",ANumInputUnitSelect:q6},j6=["Primary","Secondary","ReadOnly","Error"],sg=n=>{const{onEnterPress:e,type:t="Primary",inputRef:r,useValue:i,isReadonly:o,placeholder:l,minLength:a,maxLength:u,tabIndex:h,autoFocus:y,isPassword:x,autoComplete:w="off",inputProps:_,LeftAddon:S,RightAddon:R,dataList:I=[],pattern:O,id:P=(_==null?void 0:_.id)??wm.uuid(),...Y}=n,[{wrapId:z,wrapProps:W,labelProps:B,...ee},H]=Bg(Y),V=N.useMemo(()=>$6(ee.errorMessage)?"Error":t,[ee.errorMessage,t]),de=N.useMemo(()=>V==="ReadOnly"?!0:o,[V,o]),Z=N.useMemo(()=>H.isDisabled||H.isLoading,[H.isDisabled,H.isLoading]),[te,ne]=Ho(i,""),fe=N.useCallback(j=>{var re;Z||((re=_==null?void 0:_.onKeyDown)==null||re.call(_,j),["Escape","Enter","ArrowUp","ArrowDown"].includes(j.key)||j.stopPropagation(),j.key==="Enter"&&e&&e(j.currentTarget.value))},[Z,_,e]),ae=N.useCallback(j=>{var re;Z||O&&!new RegExp(O).test(j.target.value)||a&&j.target.value.length<a||(ne==null||ne(j.target.value),(re=_==null?void 0:_.onChange)==null||re.call(_,j))},[Z,a,ne,_,O]);return x?k.jsx(lg,{wrapId:z,wrapProps:W,labelProps:B,...ee,children:k.jsx("form",{onSubmit:j=>j.preventDefault(),children:k.jsxs(Gi,{...H,className:gt.clsx(ou.InputContainer,ou[V],Z&&ou.UnAvailable,H.className),children:[S&&k.jsx("div",{className:ou.LeftAddon,children:S}),k.jsx("input",{..._,ref:r,autoComplete:w,autoFocus:y,className:gt.clsx(ou.AInput,V==="Error"&&ou.InputError,_==null?void 0:_.className),id:P,list:`${P}-datalist`,maxLength:u,placeholder:l,readOnly:de,tabIndex:H.isDisabled||H.isLoading?-1:h,type:"password",value:te,onChange:ae,onKeyDown:fe}),I.length>0&&k.jsx("datalist",{id:`${P}-datalist`,children:I.map((j,re)=>k.jsx("option",{value:j},re))}),R&&k.jsx("div",{className:gt.clsx(ou.RightAddon,"NoSelect"),children:R})]})})}):k.jsx(lg,{wrapId:z,wrapProps:W,labelProps:B,...ee,children:k.jsxs(Gi,{...H,className:gt.clsx(ou.InputContainer,ou[V],Z&&ou.UnAvailable,H.className),children:[S&&k.jsx("div",{className:ou.LeftAddon,children:S}),k.jsx("input",{..._,ref:r,autoComplete:w,autoFocus:y,className:gt.clsx(ou.AInput,V==="Error"&&ou.InputError,_==null?void 0:_.className),id:P,list:`${P}-datalist`,maxLength:u,pattern:O,placeholder:l,readOnly:de,tabIndex:H.isDisabled||H.isLoading?-1:h,value:te,onChange:ae,onKeyDown:fe}),I.length>0&&k.jsx("datalist",{id:`${P}-datalist`,children:I.map((j,re)=>k.jsx("option",{value:j},re))}),R&&k.jsx("div",{className:ou.RightAddon,children:R})]})})};function $6(n){return Array.isArray(n)?n.filter(Boolean).length>0:!!n}const eR="_ASelect_1gbzd_1",tR="_Arrow_1gbzd_14",nR="_Primary_1gbzd_23",rR="_UnAvailable_1gbzd_34",iR="_IsOpen_1gbzd_34",oR="_Secondary_1gbzd_41",lR="_Placeholder_1gbzd_57",sR="_ValuesContainer_1gbzd_61",aR="_Values_1gbzd_61",cR="_Options_1gbzd_80",uR="_Raw_1gbzd_93",fR="_Option_1gbzd_80",dR="_Selected_1gbzd_122",hR="_CheckBox_1gbzd_129",Pf={ASelect:eR,Arrow:tR,Primary:nR,UnAvailable:rR,IsOpen:iR,Secondary:oR,Placeholder:lR,ValuesContainer:sR,Values:aR,Options:cR,Raw:uR,Option:fR,Selected:dR,CheckBox:hR},gR=["Primary","Secondary","Raw"],Ah=n=>{const{options:e,useSelect:t,type:r="Primary",placeholder:i=Nr.ASelect["Select(Placeholder)"],onClose:o,OptionRenderer:l=vR,SelectedRenderer:a=bR,minShowRows:u=2,maxShowRows:h=6,arrowProps:y,isAutoWidth:x=!1,...w}=n,_=N.useRef(null),S=N.useMemo(()=>w.abaseRef??_,[w.abaseRef]),R=N.useRef(null),[I,O]=Ho(t,e[0]),[P,Y]=N.useState(void 0),[z,W]=N.useState(!1),[B,ee]=N.useState(!1),H=N.useRef(e),V=N.useRef(null),de=N.useCallback(()=>ee(!1),[]),Z=N.useCallback(()=>{w.isDisabled||w.isLoading||e.length<1||(ee(!0),setTimeout(()=>W(!0),0),setTimeout(()=>ib(R,S,e,u,h),0))},[S,w.isDisabled,w.isLoading,e,u,h]),te=N.useCallback(()=>{W(!1),ee(!0),o==null||o()},[o]),ne=N.useCallback(le=>{var J;z?te():Z(),setTimeout(()=>ib(R,S,e,u,h),0),(J=w.onClick)==null||J.call(w,le)},[S,w,e,z,te,Z,u,h]),fe=N.useCallback(()=>{ib(R,S,e,u,h)},[S,e,u,h]);N.useEffect(()=>{if(!z||!S.current)return;const le=S.current;let J=le.parentElement;for(;J;)J.addEventListener("scroll",fe),J=J.parentElement;return()=>{let pe=le.parentElement;for(;pe;)pe.removeEventListener("scroll",fe),pe=pe.parentElement}},[S,z,fe]),N.useEffect(()=>{if(z)return window.addEventListener("resize",fe),()=>window.removeEventListener("resize",fe)},[z,fe]);const ae=N.useCallback(le=>{le[0].intersectionRatio===0&&te()},[te]);N.useEffect(()=>{if(!z)return;const le=new IntersectionObserver(ae,{threshold:0});return S.current&&le.observe(S.current),()=>le.disconnect()},[S,z,ae]);const j=N.useCallback(le=>{const J=le.target,pe=S.current,Te=R.current;!pe||!J||!Te||!pe.contains(J)&&!Te.contains(J)&&te()},[S,te]),re=N.useMemo(()=>w.isDisabled||w.isLoading||e.length<1,[w.isDisabled,w.isLoading,e]);N.useEffect(()=>{if(z)return setTimeout(()=>document.addEventListener("mousedown",j),0),()=>document.removeEventListener("mousedown",j)},[z,j]);const he=N.useCallback((le,J)=>{le.stopPropagation(),le.preventDefault(),O==null||O(J),te()},[O,te]),be=N.useCallback(()=>{if(!x||!S.current)return;const le=kg.calculateOptimalSelectWidth({elementRef:S,options:e,selectedOption:I,placeholder:i,optionRenderer:J=>J===null?null:l({option:J}),type:r,isMulti:!1});Y(le)},[x,S,e,I,i,l,r]);return N.useEffect(()=>x?((e!==H.current||P===void 0)&&(V.current!==null&&cancelAnimationFrame(V.current),V.current=requestAnimationFrame(()=>{be(),V.current=null,H.current=[...e]})),()=>{V.current!==null&&(cancelAnimationFrame(V.current),V.current=null)}):void 0,[x,e,be,P]),N.useEffect(()=>()=>{typeof kg.clearCache=="function"&&kg.clearCache()},[]),k.jsxs(k.Fragment,{children:[k.jsxs(Gi,{...w,abaseRef:S,isDisabled:w.isDisabled||e.length<1,className:gt.clsx(w.className,Pf.ASelect,"NoSelect",z&&Pf.IsOpen,re&&Pf.UnAvailable,Pf[r]),style:{padding:r==="Secondary"?"8px 8px 8px 0":0,width:P?`${P}px`:x?"100px":void 0,...w.style},onClick:ne,children:[k.jsx("div",{className:Pf.ValuesContainer,children:k.jsx("div",{className:gt.clsx(Pf.Values,(I==null||I==="")&&Pf.Placeholder),children:k.jsx(a,{OptionRenderer:l,placeholder:i,selectedOption:I})})}),k.jsx("div",{...y,className:gt.clsx(Pf.Arrow,y==null?void 0:y.className),children:k.jsx(ho,{icon:"TriangleDown",style:{transform:z?"rotate(180deg)":"",transition:"var(--Transition)"}})})]}),e.length>0&&(z||B)&&su.createPortal(k.jsx("div",{ref:R,className:gt.clsx(Pf.Options,Pf[r]),style:{opacity:+z,visibility:z?"visible":"hidden",pointerEvents:z?void 0:"none",borderRadius:S.current?window.getComputedStyle(S.current).borderRadius:void 0,width:P?`${P}px`:x?"100px":void 0},onTransitionEnd:de,children:e.map((le,J)=>{const pe=I===le,Te=S.current?window.getComputedStyle(S.current):void 0;return le===null?null:k.jsx("div",{className:gt.clsx(Pf.Option,pe&&Pf.Selected,"NoSelect",Pf[r]),style:{height:Te==null?void 0:Te.height},onClick:Fe=>he(Fe,le),children:k.jsx(l,{option:le})},J)})}),document.body)]})};function ib(n,e,t,r,i){if(!e.current||!n.current||!t||t.length<1)return;const o=e.current.getBoundingClientRect(),l=pR(o,t.length,r,i),a=window.getComputedStyle(e.current);n.current.style.top=`calc(${l.top??0}px - ${a.borderTopWidth})`,n.current.style.bottom=l.bottom?l.bottom+"px":"",n.current.style.left=l.left+"px",n.current.style.width||(n.current.style.minWidth=l.minWidth+"px"),n.current.style.minHeight=l.minHeight+"px",n.current.style.maxHeight=l.maxHeight+"px",n.current.style.visibility="visible"}function pR(n,e,t,r){const i={top:n.bottom,bottom:void 0,left:n.left,height:"fit-content",minWidth:n.width,minHeight:n.height*Math.min(t,e),maxHeight:n.height*r>window.innerHeight-n.bottom-10?window.innerHeight-n.bottom-10:n.height*r};return window.innerHeight-n.bottom-10<i.height&&(window.innerHeight-n.bottom-10<i.minHeight?(i.top=n.top-e*n.height,i.top<0&&(i.top=10,i.minHeight=n.top-10,i.height=n.top-10)):i.height=window.innerHeight-n.bottom-10),i}const vR=n=>{const{option:e}=n;return er.isReactNode(e)?e:null},bR=n=>{const e=Dn.c(3),{selectedOption:t,OptionRenderer:r,placeholder:i}=n;if(t==null||t==="")return i;const o=t;let l;return e[0]!==r||e[1]!==o?(l=k.jsx(r,{option:o}),e[0]=r,e[1]=o,e[2]=l):l=e[2],l},yR="_Anchor_1l5ql_1",mR="_Primary_1l5ql_18",xR="_Secondary_1l5ql_21",wR="_Placeholder_1l5ql_25",CR="_Icon_1l5ql_30",_R="_ADatePicker_1l5ql_40",SR="_StringInputWrap_1l5ql_51",ER="_StringInputContainer_1l5ql_56",AR="_StringInput_1l5ql_51",TR="_IsIdx_1l5ql_71",RR="_CalendarContainer_1l5ql_75",IR="_Header_1l5ql_81",kR="_Prev_1l5ql_85",MR="_Next_1l5ql_86",LR="_MonthYear_1l5ql_119",OR="_Select_1l5ql_124",PR="_Calendar_1l5ql_75",DR="_Cell_1l5ql_134",NR="_IsNotCurrentMonth_1l5ql_146",FR="_IsSelected_1l5ql_150",BR="_IsDisabled_1l5ql_154",zR="_IsHovered_1l5ql_157",HR="_Week_1l5ql_161",WR="_WeekDay_1l5ql_166",Jo={Anchor:yR,Primary:mR,Secondary:xR,Placeholder:wR,Icon:CR,ADatePicker:_R,StringInputWrap:SR,StringInputContainer:ER,StringInput:AR,String:"_String_1l5ql_51",IsIdx:TR,CalendarContainer:RR,Header:IR,Prev:kR,Next:MR,MonthYear:LR,Select:OR,Calendar:PR,Cell:DR,IsNotCurrentMonth:NR,IsSelected:FR,IsDisabled:BR,IsHovered:zR,Week:HR,WeekDay:WR},UR="_Anchor_5u6hq_1",GR="_Primary_5u6hq_18",YR="_Secondary_5u6hq_22",VR="_Placeholder_5u6hq_26",ZR="_Icon_5u6hq_31",XR="_ADateRangePicker_5u6hq_41",KR="_StringInputWrap_5u6hq_52",JR="_StringInputContainer_5u6hq_56",QR="_StringInput_5u6hq_52",qR="_IsIdx_5u6hq_72",jR="_CalendarContainer_5u6hq_76",$R="_Header_5u6hq_82",e8="_Prev_5u6hq_86",t8="_Next_5u6hq_87",n8="_MonthYear_5u6hq_120",r8="_Select_5u6hq_125",i8="_Calendar_5u6hq_76",o8="_Cell_5u6hq_135",l8="_IsNotCurrentMonth_5u6hq_147",s8="_IsSelected_5u6hq_151",a8="_IsDisabled_5u6hq_155",c8="_IsHovered_5u6hq_158",u8="_Week_5u6hq_162",f8="_WeekDay_5u6hq_167",d8="_ChoiceButton_5u6hq_171",Qi={Anchor:UR,Primary:GR,Secondary:YR,Placeholder:VR,Icon:ZR,ADateRangePicker:XR,StringInputWrap:KR,StringInputContainer:JR,StringInput:QR,String:"_String_5u6hq_52",IsIdx:qR,CalendarContainer:jR,Header:$R,Prev:e8,Next:t8,MonthYear:n8,Select:r8,Calendar:i8,Cell:o8,IsNotCurrentMonth:l8,IsSelected:s8,IsDisabled:a8,IsHovered:c8,Week:u8,WeekDay:f8,ChoiceButton:d8},Cm=n=>{const{type:e="Primary",className:t,useDateRange:r,actionRef:i,position:o=L1.SE,minDate:l,maxDate:a,isDisabled:u,isLoading:h,yearsOptionSize:y,noDefaultChoices:x,LeftAddon:w,RightAddon:_,placeholder:S,noClearButton:R,resources:I,onClick:O,...P}=n,Y=N.useMemo(()=>({...Nr.ADateRangePicker,...I}),[I]),z=N.useMemo(()=>S??Y["Select DateRange"],[S,Y]),[W,B]=N.useMemo(()=>{let se,He;if(l&&(se=Yn.makeSDate(l)),a&&(He=Yn.makeEDate(a)),se&&He&&Yn["<"](He,se)){console.warn("ADateRangePicker: maxDate should be greater than minDate. maxDate and minDate are swapped.");const We=se;se=He,He=We}return[se,He]},[l,a]),[ee,H]=N.useState("sD"),[V,de]=Ho(r,void 0),Z=N.useCallback(se=>{de&&(se===void 0?(de(void 0),Ve(""),Xe("")):(de({sDate:Yn.makeSDate(se.sDate),eDate:Yn.makeEDate(se.eDate)}),Ve(Yn.toString(se.sDate)),Xe(Yn.toString(se.eDate))))},[de]);N.useEffect(()=>{V&&(Ve(Yn.toString(V.sDate)),Xe(Yn.toString(V.eDate)))},[V]);const te=N.useCallback(se=>{if(!de)return;let He=V?V.sDate:Yn.makeSDate(se);se=Yn.makeEDate(se),de({sDate:He,eDate:se}),Ve(Yn.toString(He)),Xe(Yn.toString(se))},[de,V]),[ne,fe]=N.useState(),[ae,j]=N.useState(),re=N.useCallback(se=>{ee==="sD"&&Z({sDate:se,eDate:se}),fe(se),j(se)},[ee,Z,fe]),he=N.useCallback(se=>{ee==="sD"?ne&&(Yn.eq(ne,se)?H("eD"):Yn[">"](se,ne)?(te(se),fe(void 0)):(Z({sDate:se,eDate:ne}),fe(void 0))):(V?Yn["<"](se,V.sDate)?Z({sDate:se,eDate:V.eDate}):te(se):Z({sDate:se,eDate:se}),fe(void 0),H("sD"))},[te,ne,H,ee,Z,V,fe]),be=N.useCallback(se=>{ne&&j(se)},[ne]),le=N.useCallback(()=>{j(void 0),fe(void 0),H("sD")},[H,fe]),[J,pe]=N.useState(X2(V,W,B)),Te=N.useMemo(()=>_m(J.year,W,B,y),[J.year,W,B,y]),Fe=N.useMemo(()=>Ap(J.year,W,B),[W,B,J.year]),_e=N.useCallback(se=>{if(!Te.includes(se))return;const He={month:J.month,year:se},We=Ap(He.year,W,B);We.length<1||(We.includes(He.month)||(He.month<We[0]?He.month=We[0]:He.month>We[We.length-1]&&(He.month=We[We.length-1])),pe(He))},[W,B,Te,J.month]),Me=N.useCallback(se=>{Fe.includes(se)&&pe({month:se,year:J.year})},[Fe,J.year]),De=N.useMemo(()=>B?new Date(J.year,J.month+1,1)>B:!1,[J,B]),Re=N.useCallback(()=>{if(De||Fe.length<1)return;const se=J.month+1;se>11?pe({month:Fe[0],year:J.year+1}):pe({month:se,year:J.year})},[De,Fe,J]),Le=N.useMemo(()=>W?new Date(J.year,J.month,0)<W:!1,[J,W]),Oe=N.useCallback(()=>{if(Le||Fe.length<1)return;const se=J.month-1;se<Fe[0]?pe({month:Fe[Fe.length-1],year:J.year-1}):pe({month:se,year:J.year})},[Le,Fe,J]),[Ge,Ve]=N.useState(V!=null&&V.sDate?Yn.toString(V.sDate):""),Pe=N.useCallback(se=>{if(se.length>10||(Ve(se),se.length<10)||!de)return;let He=Yn.toDate(se);if(!He)return;W&&He<W&&(He=W),B&&He>B&&(He=B);let We=V?V.eDate:He;V&&Yn[">"](He,We)&&([He,We]=K2(He,We)),Z({sDate:He,eDate:We}),pe({month:He.getMonth(),year:He.getFullYear()})},[de,Z,V,W,B]),[ot,Xe]=N.useState(V!=null&&V.eDate?Yn.toString(V.eDate):""),lt=N.useCallback(se=>{if(se.length>10||(Xe(se),se.length<10)||!de)return;let He=Yn.toDate(se);if(!He)return;W&&He<W&&(He=W),B&&He>B&&(He=B);let We=V?V.sDate:He;V&&Yn[">"](We,He)&&([We,He]=K2(We,He)),Z({sDate:We,eDate:He}),pe({month:He.getMonth(),year:He.getFullYear()})},[de,Z,V,W,B]),Ye=N.useCallback(()=>{V&&(Ve(Yn.toString(V.sDate)),Xe(Yn.toString(V.eDate)))},[V]),mt=N.useMemo(()=>{const{month:se,year:He}=J,We=new Date(He,se,1),pt=new Date(He,se+1,0),wt=[];for(let Jt=0;Jt<We.getDay();Jt++){const hn=new Date(He,se,0).getDate()-We.getDay()+Jt+1,ln=new Date(He,se-1,hn),kn=W&&W>ln||B&&B<ln,Nn=V?Yn.be(V.sDate,ln,V.eDate):!1,En=ae&&V&&Yn.be(V.sDate,ln,ae);wt.push({day:hn,isSelected:Nn,isHovered:En,date:ln,isDisabled:kn,isCurrentMonth:!1})}for(let Jt=1;Jt<=pt.getDate();Jt++){const Vt=new Date(He,se,Jt),hn=W&&W>Vt||B&&B<Vt,ln=V?Yn.be(V.sDate,Vt,V.eDate):!1,kn=ae&&V&&Yn.be(V.sDate,Vt,ae);wt.push({day:Jt,isSelected:ln,isHovered:kn,date:Vt,isDisabled:hn,isCurrentMonth:!0})}for(let Jt=0;Jt<7-pt.getDay()-1;Jt++){const Vt=new Date(He,se+1,Jt+1),hn=W&&W>Vt||B&&B<Vt,ln=V?Yn.be(V.sDate,Vt,V.eDate):!1,kn=ae&&V&&Yn.be(V.sDate,Vt,ae);wt.push({day:Jt+1,isSelected:ln,isHovered:kn,date:Vt,isDisabled:hn,isCurrentMonth:!1})}const qt=[];for(let Jt=0;Jt<wt.length/7;Jt++)qt.push(k.jsx("div",{className:Qi.Week,children:wt.slice(Jt*7,Jt*7+7).map((Vt,hn)=>k.jsx(Ic,{isDisabled:Vt.isDisabled,type:"Raw",className:gt.clsx(Qi.Cell,Vt.isDisabled?Qi.IsDisabled:Vt.isCurrentMonth?Vt.isSelected?Qi.IsSelected:Vt.isHovered&&Qi.IsHovered:Qi.IsNotCurrentMonth),onMouseDown:()=>Vt.isCurrentMonth&&re(Vt.date),onMouseEnter:()=>Vt.isCurrentMonth&&be(Vt.date),onMouseUp:()=>Vt.isCurrentMonth&&he(Vt.date),children:Vt.day},hn))},Jt));return qt},[J,ae,V,W,B,re,he,be]),bt=N.useRef(null),Mt=N.useCallback(()=>{bt&&ym(bt,Kt,o)},[bt,o]),[Nt,_t]=N.useState(!1),[rn,pn]=N.useState(!1),Kt=N.useRef(null),dn=N.useCallback(()=>{u||h||(_t(!0),setTimeout(()=>pn(!0),0),setTimeout(()=>Mt(),0),pe(X2(V,W,B)))},[u,h,V,Mt,W,B]),zt=N.useCallback(()=>{u||h||(_t(!0),pn(!1))},[u,h]),wn=N.useMemo(()=>rn?zt:dn,[rn,dn,zt]),$t=N.useCallback(()=>_t(!1),[]),vn=N.useCallback(se=>{const He=document.getElementById("root"),We=se.target,pt=Kt.current,wt=bt.current;!He||!pt||!We||!wt||!pt.contains(We)&&He.contains(We)&&!wt.contains(We)&&zt()},[zt]);N.useEffect(()=>{if(rn)return setTimeout(()=>document.addEventListener("mousedown",vn),0),()=>document.removeEventListener("mousedown",vn)},[rn,vn]);const Pt=N.useCallback(()=>{Mt()},[Mt]);N.useEffect(()=>{if(!rn||!(bt!=null&&bt.current))return;const se=bt.current;let He=se.parentElement;for(;He;)He.addEventListener("scroll",Pt),He=He.parentElement;return()=>{let We=se.parentElement;for(;We;)We.removeEventListener("scroll",Pt),We=We.parentElement}},[bt,rn,Pt]),N.useEffect(()=>{if(rn)return window.addEventListener("resize",Pt),()=>window.removeEventListener("resize",Pt)},[rn,Pt]);const Yt=N.useCallback(se=>{se[0].intersectionRatio===0&&zt()},[zt]);N.useEffect(()=>{if(!rn)return;const se=new IntersectionObserver(Yt,{threshold:0});return Kt.current&&se.observe(Kt.current),()=>se.disconnect()},[Kt,rn,Yt]),N.useEffect(()=>{i&&(i.current={open:dn,close:zt,toggle:wn})},[i,dn,zt,wn]),N.useEffect(()=>{if(!V)return;let se={sDate:V.sDate,eDate:V.eDate};W&&(Yn["<"](V.sDate,W)&&(se.sDate=W),Yn["<"](V.eDate,W)&&(se.eDate=W)),B&&(Yn[">"](V.sDate,B)&&(se.sDate=B),Yn[">"](V.eDate,B)&&(se.eDate=B)),(se.sDate!==V.sDate||se.eDate!==V.eDate)&&Z(se)},[W,B,V,Z]);const ct=N.useCallback(se=>{O==null||O(se),wn()},[O,wn]),Tt=N.useCallback(se=>{Z(void 0),zt(),se.stopPropagation()},[Z,zt]),It=N.useCallback(()=>V?k.jsx(ba,{icon:"Close",style:{scale:"0.8"},type:"Raw",onClick:Tt}):null,[V,Tt]),ye=N.useMemo(()=>V?`${Yn.toString(V.sDate)} ~ ${Yn.toString(V.eDate)}`:k.jsx("span",{className:Qi.Placeholder,children:z}),[V,z]);return k.jsxs(k.Fragment,{children:[k.jsxs(Gi,{...P,abaseRef:bt,className:gt.clsx(Qi.Anchor,"IsClickable",Qi[e],t),isDisabled:u,isLoading:h,onClick:ct,children:[w,k.jsxs(N.Activity,{mode:e==="Primary"?"visible":"hidden",children:[k.jsx(ho,{className:gt.clsx(Qi.Icon,Qi[e]),icon:"CalendarDay"}),k.jsx(cs,{w:4})]}),ye,k.jsx(zg,{}),k.jsx(N.Activity,{mode:R?"hidden":"visible",children:k.jsx(It,{})}),k.jsx(N.Activity,{mode:e==="Secondary"?"visible":"hidden",children:k.jsx(ho,{className:gt.clsx(Qi.Icon,Qi[e]),icon:"CalendarDay"})}),k.jsx(N.Activity,{mode:_?"visible":"hidden",children:_})]}),(rn||Nt)&&su.createPortal(k.jsxs("div",{ref:Kt,className:Qi.ADateRangePicker,style:{opacity:+rn,visibility:rn?"visible":"hidden"},onMouseLeave:le,onTransitionEnd:$t,children:[k.jsxs("div",{className:Qi.StringInputContainer,children:[k.jsxs(bl,{children:[k.jsx(sg,{className:gt.clsx(Qi.String,ee==="sD"&&ae&&Qi.IsIdx),inputProps:{className:Qi.StringInput},maxLength:11,placeholder:"YYYY-MM-DD",useValue:[Ge,Pe],wrapProps:{className:Qi.StringInputWrap},onBlur:Ye}),k.jsx(cs,{w:8}),k.jsx(sg,{className:gt.clsx(Qi.String,ee==="eD"&&ae&&Qi.IsIdx),inputProps:{className:Qi.StringInput},maxLength:11,placeholder:"YYYY-MM-DD",useValue:[ot,lt],wrapProps:{className:Qi.StringInputWrap},onBlur:Ye})]}),!x&&k.jsxs(bl,{style:{marginTop:4},children:[k.jsx(u0,{children:Y["1일"],onClick:()=>Z({sDate:new Date,eDate:new Date})}),k.jsx(u0,{children:Y["1주일"],onClick:()=>Z({sDate:new Date(new Date().setDate(new Date().getDate()-7)),eDate:new Date})}),k.jsx(u0,{children:Y["1개월"],onClick:()=>Z({sDate:new Date(new Date().setMonth(new Date().getMonth()-1)),eDate:new Date})}),k.jsx(u0,{children:Y["3개월"],onClick:()=>Z({sDate:new Date(new Date().setMonth(new Date().getMonth()-3)),eDate:new Date})})]})]}),k.jsxs("div",{className:Qi.CalendarContainer,children:[k.jsxs(bl,{className:Qi.Header,children:[k.jsx(Ic,{className:Qi.Prev,isDisabled:Le,type:"Raw",onClick:Oe}),k.jsxs("div",{className:Qi.MonthYear,children:[k.jsx(Ah,{isAutoWidth:!0,className:Qi.Select,OptionRenderer:se=>Y.months(se.option),options:Fe,SelectedRenderer:se=>Y.months(se.selectedOption),type:"Secondary",useSelect:[J.month,Me]}),k.jsx(cs,{w:8}),k.jsx(Ah,{isAutoWidth:!0,className:Qi.Select,options:Te,type:"Secondary",useSelect:[J.year,_e]})]}),k.jsx(Ic,{className:Qi.Next,isDisabled:De,type:"Raw",onClick:Re})]}),k.jsx(cs,{h:10}),k.jsxs("div",{className:Qi.Calendar,children:[k.jsx("div",{className:Qi.Week,children:[0,1,2,3,4,5,6].map(se=>k.jsx("div",{className:gt.clsx(Qi.WeekDay,Qi.Cell),children:Y.weekDays(se)},se))}),mt]})]})]}),document.body)]})};function Ap(n,e,t){let r=0;e&&e.getFullYear()===n&&(r=e.getMonth());let i=11;t&&t.getFullYear()===n&&(i=t.getMonth());const o=[];for(let l=r;l<=i;l++)o.push(l);return o}function _m(n,e,t,r=5){const i=[];let o=n-r/2+r%2/2;e&&o<e.getFullYear()&&(o=e.getFullYear());let l=o+r-1;t&&l>t.getFullYear()&&(l=t.getFullYear());for(let a=o;a<=l;a++)i.push(a);return i}function X2(n,e,t){return n??(n={sDate:new Date,eDate:new Date}),e&&Yn["<"](n.sDate,e)?{month:e.getMonth(),year:e.getFullYear()}:t&&Yn[">"](n.eDate,t)?{month:t.getMonth(),year:t.getFullYear()}:{month:n.sDate.getMonth(),year:n.sDate.getFullYear()}}function K2(n,e){return[e,n]}const u0=n=>{const e=Dn.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=gt.clsx(Qi.ChoiceButton,"Headline2"),e[0]=t):t=e[0];let r;return e[1]!==n?(r=k.jsx(Ic,{className:t,type:"Secondary",...n}),e[1]=n,e[2]=r):r=e[2],r},h8=["Primary","Secondary","Raw"],Sm=n=>{const e=Dn.c(255);let t,r,i,o,l,a,u,h,y,x,w,_,S,R,I,O;e[0]!==n?({type:R,className:l,useDate:O,actionRef:o,position:I,minDate:u,maxDate:a,isDisabled:w,isLoading:_,placeholder:y,LeftAddon:t,RightAddon:r,resources:x,noClearButton:S,onClick:h,...i}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S,e[14]=R,e[15]=I,e[16]=O):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13],R=e[14],I=e[15],O=e[16]);const P=R===void 0?"Primary":R,Y=I===void 0?L1.SE:I;let z;e[17]!==x?(z={...Nr.ADatePicker,...x},e[17]=x,e[18]=z):z=e[18];const W=z,B=y??W["Select Date"];let ee;if(e[19]!==a||e[20]!==u){e:{let an,On;if(u&&(an=Yn.makeSDate(u)),a&&(On=Yn.makeEDate(a)),an&&On&&Yn["<"](On,an)){console.warn("ADatePicker: maxDate should be greater than minDate. maxDate and minDate are swapped."),ee=[Yn.makeSDate(On),Yn.makeEDate(an)];break e}let Fr;e[22]!==On||e[23]!==an?(Fr=[an,On],e[22]=On,e[23]=an,e[24]=Fr):Fr=e[24],ee=Fr}e[19]=a,e[20]=u,e[21]=ee}else ee=e[21];const[H,V]=ee,[de,Z]=Ho(O,void 0);let te;e[25]!==de?(te=de?Yn.toString(de):"",e[25]=de,e[26]=te):te=e[26];const[ne,fe]=N.useState(te);let ae;e[27]!==V||e[28]!==H||e[29]!==de?(ae=()=>{const an=de??new Date;return H&&an<H?H.getMonth():V&&an>V?V.getMonth():(an??new Date).getMonth()},e[27]=V,e[28]=H,e[29]=de,e[30]=ae):ae=e[30];const[j,re]=N.useState(ae);let he;e[31]!==V||e[32]!==H||e[33]!==de?(he=()=>{const an=de??new Date;return H&&an<H?H.getFullYear():V&&an>V?V.getFullYear():(an??new Date).getFullYear()},e[31]=V,e[32]=H,e[33]=de,e[34]=he):he=e[34];const[be,le]=N.useState(he);let J;e[35]!==V||e[36]!==H||e[37]!==j?(J=an=>{le(an);const On=Ap(an,H,V);On.includes(j)||(j<On[0]?re(On[0]):j>On[On.length-1]&&re(On[On.length-1]))},e[35]=V,e[36]=H,e[37]=j,e[38]=J):J=e[38];const pe=J;let Te;e[39]!==V||e[40]!==H||e[41]!==Z?(Te=an=>{if(an.length>10||(fe(an),an.length<10)||!Z)return;let On=Yn.toDate(an);On&&(H&&On<H&&(On=H),V&&On>V&&(On=V),Z(On),le(On.getFullYear()),re(On.getMonth()))},e[39]=V,e[40]=H,e[41]=Z,e[42]=Te):Te=e[42];const Fe=Te;let _e;e[43]!==be?(_e=an=>{const On=be+an;On<0||le(On)},e[43]=be,e[44]=_e):_e=e[44];const Me=_e;let De;e[45]!==j||e[46]!==Me?(De=an=>{const On=j+an;On<0?(re(11),Me(-1)):On>11?(re(0),Me(1)):re(On)},e[45]=j,e[46]=Me,e[47]=De):De=e[47];const Re=De;let Le;e[48]!==Z?(Le=an=>{Z&&(an===void 0?(Z(void 0),fe("")):(Z(an),fe(Yn.toString(an))))},e[48]=Z,e[49]=Le):Le=e[49];const Oe=Le;let Ge;e[50]!==j||e[51]!==be?(Ge=new Date(be,j,0),e[50]=j,e[51]=be,e[52]=Ge):Ge=e[52];const Pe=H&&Ge<H,ot=j+1;let Xe;e[53]!==ot||e[54]!==be?(Xe=new Date(be,ot,1),e[53]=ot,e[54]=be,e[55]=Xe):Xe=e[55];const Ye=V&&Xe>V;let mt;e[56]!==Pe||e[57]!==Re?(mt=()=>{Pe||Re(-1)},e[56]=Pe,e[57]=Re,e[58]=mt):mt=e[58];const bt=mt;let Mt;e[59]!==Ye||e[60]!==Re?(Mt=()=>{Ye||Re(1)},e[59]=Ye,e[60]=Re,e[61]=Mt):Mt=e[61];const Nt=Mt,[_t,rn]=N.useState(null);let pn;e[62]!==Z?(pn=()=>{Z&&rn(null)},e[62]=Z,e[63]=pn):pn=e[63];const Kt=pn;let dn;e[64]!==Z?(dn=an=>{Z&&rn(an)},e[64]=Z,e[65]=dn):dn=e[65];const zt=dn;let wn;if(e[66]!==Oe||e[67]!==_t||e[68]!==V||e[69]!==H||e[70]!==j||e[71]!==zt||e[72]!==Kt||e[73]!==de||e[74]!==be){const an=new Date(be,j,1),On=new Date(be,j+1,0),Fr=[];for(let tr=0;tr<an.getDay();tr++){const ir=new Date(be,j,0).getDate()-an.getDay()+tr+1,Tr=new Date(be,j-1,ir),mi=H&&H>Tr||V&&V<Tr,Li=de&&Yn.eq(Tr,de),Br=_t&&Yn.eq(Tr,_t);Fr.push({day:ir,isSelected:Li,date:Tr,isDisabled:mi,isHovered:Br,isCurrentMonth:!1})}for(let tr=1;tr<=On.getDate();tr++){const fr=new Date(be,j,tr),ir=H&&H>fr||V&&V<fr,Tr=de&&Yn.eq(fr,de),mi=_t&&Yn.eq(fr,_t);Fr.push({day:tr,isSelected:Tr,date:fr,isDisabled:ir,isHovered:mi,isCurrentMonth:!0})}for(let tr=0;tr<7-On.getDay()-1;tr++){const fr=new Date(be,j+1,tr+1),ir=H&&H>fr||V&&V<fr,Tr=de&&Yn.eq(fr,de),mi=_t&&Yn.eq(fr,_t);Fr.push({day:tr+1,isSelected:Tr,date:fr,isDisabled:ir,isHovered:mi,isCurrentMonth:!1})}wn=[];for(let tr=0;tr<Fr.length/7;tr++)wn.push(k.jsx("div",{className:Jo.Week,children:Fr.slice(tr*7,tr*7+7).map((fr,ir)=>k.jsx(Ic,{isDisabled:fr.isDisabled,type:"Raw",className:gt.clsx(Jo.Cell,fr.isDisabled?Jo.IsDisabled:fr.isCurrentMonth?fr.isSelected?Jo.IsSelected:fr.isHovered&&Jo.IsHovered:Jo.IsNotCurrentMonth),onClick:()=>fr.isCurrentMonth&&Oe(fr.date),onMouseEnter:()=>fr.isCurrentMonth&&zt(fr.date),onMouseLeave:()=>fr.isCurrentMonth&&Kt(),children:fr.day},ir))},tr));e[66]=Oe,e[67]=_t,e[68]=V,e[69]=H,e[70]=j,e[71]=zt,e[72]=Kt,e[73]=de,e[74]=be,e[75]=wn}else wn=e[75];const $t=wn,vn=N.useRef(null);let Pt;e[76]!==Y?(Pt=()=>{vn&&ym(vn,se,Y)},e[76]=Y,e[77]=Pt):Pt=e[77];const Yt=Pt,[ct,Tt]=N.useState(!1),[It,ye]=N.useState(!1),se=N.useRef(null);let He;e[78]!==Yt||e[79]!==w||e[80]!==_||e[81]!==V||e[82]!==H||e[83]!==de?(He=()=>{w||_||(Tt(!0),setTimeout(()=>ye(!0),0),setTimeout(()=>Yt(),0),fe(de?Yn.toString(de):""),re(()=>{const an=de??new Date;return H&&an<H?H.getMonth():V&&an>V?V.getMonth():an.getMonth()}),le(()=>{const an=de??new Date;return H&&an<H?H.getFullYear():V&&an>V?V.getFullYear():an.getFullYear()}))},e[78]=Yt,e[79]=w,e[80]=_,e[81]=V,e[82]=H,e[83]=de,e[84]=He):He=e[84];const We=He;let pt;e[85]!==w||e[86]!==_?(pt=()=>{w||_||(Tt(!0),ye(!1))},e[85]=w,e[86]=_,e[87]=pt):pt=e[87];const wt=pt,qt=It?wt:We;let Jt;e[88]===Symbol.for("react.memo_cache_sentinel")?(Jt=()=>Tt(!1),e[88]=Jt):Jt=e[88];const Vt=Jt;let hn;e[89]!==wt?(hn=an=>{const On=document.getElementById("root"),Fr=an.target,tr=se.current,fr=vn.current;!On||!tr||!Fr||!fr||!tr.contains(Fr)&&On.contains(Fr)&&!fr.contains(Fr)&&wt()},e[89]=wt,e[90]=hn):hn=e[90];const ln=hn;let kn,Nn;e[91]!==It||e[92]!==ln?(kn=()=>{if(It)return setTimeout(()=>document.addEventListener("mousedown",ln),0),()=>document.removeEventListener("mousedown",ln)},Nn=[It,ln],e[91]=It,e[92]=ln,e[93]=kn,e[94]=Nn):(kn=e[93],Nn=e[94]),N.useEffect(kn,Nn);let En;e[95]!==Yt?(En=()=>{Yt()},e[95]=Yt,e[96]=En):En=e[96];const Cn=En;let rr,Bt;e[97]!==It||e[98]!==Cn?(rr=()=>{if(!It||!(vn!=null&&vn.current))return;const an=vn.current;let On=an.parentElement;for(;On;)On.addEventListener("scroll",Cn),On=On.parentElement;return()=>{let Fr=an.parentElement;for(;Fr;)Fr.removeEventListener("scroll",Cn),Fr=Fr.parentElement}},Bt=[vn,It,Cn],e[97]=It,e[98]=Cn,e[99]=rr,e[100]=Bt):(rr=e[99],Bt=e[100]),N.useEffect(rr,Bt);let Ut,yn;e[101]!==It||e[102]!==Cn?(Ut=()=>{if(It)return window.addEventListener("resize",Cn),()=>window.removeEventListener("resize",Cn)},yn=[It,Cn],e[101]=It,e[102]=Cn,e[103]=Ut,e[104]=yn):(Ut=e[103],yn=e[104]),N.useEffect(Ut,yn);let Ft;e[105]!==wt?(Ft=an=>{an[0].intersectionRatio===0&&wt()},e[105]=wt,e[106]=Ft):Ft=e[106];const jn=Ft;let Hn;e[107]!==It||e[108]!==jn?(Hn=()=>{if(!It)return;const an=new IntersectionObserver(jn,{threshold:0});return se.current&&an.observe(se.current),()=>an.disconnect()},e[107]=It,e[108]=jn,e[109]=Hn):Hn=e[109];let Rn;e[110]!==It||e[111]!==jn?(Rn=[se,It,jn],e[110]=It,e[111]=jn,e[112]=Rn):Rn=e[112],N.useEffect(Hn,Rn);let Et,rt;e[113]!==o||e[114]!==wt||e[115]!==We||e[116]!==qt?(Et=()=>{o&&(o.current={open:We,close:wt,toggle:qt})},rt=[o,We,wt,qt],e[113]=o,e[114]=wt,e[115]=We,e[116]=qt,e[117]=Et,e[118]=rt):(Et=e[117],rt=e[118]),N.useEffect(Et,rt);let tn;e[119]!==h||e[120]!==qt?(tn=an=>{h==null||h(an),qt()},e[119]=h,e[120]=qt,e[121]=tn):tn=e[121];const Ln=tn;let mr;e[122]!==Oe||e[123]!==wt?(mr=an=>{Oe(void 0),wt(),an.stopPropagation()},e[122]=Oe,e[123]=wt,e[124]=mr):mr=e[124];const wr=mr;let gn;e[125]!==wr||e[126]!==de?(gn=()=>de?k.jsx(ba,{icon:"Close",style:{scale:"0.8"},type:"Raw",onClick:wr}):null,e[125]=wr,e[126]=de,e[127]=gn):gn=e[127];const Dt=gn;let Se;if(de){let an;e[128]!==de?(an=Yn.toString(de),e[128]=de,e[129]=an):an=e[129],Se=an}else{let an;e[130]!==B?(an=k.jsx("span",{className:Jo.Placeholder,children:B}),e[130]=B,e[131]=an):an=e[131],Se=an}const it=Se;let St;e[132]!==l||e[133]!==P?(St=gt.clsx(Jo.Anchor,"IsClickable",Jo[P],l),e[132]=l,e[133]=P,e[134]=St):St=e[134];const mn=P==="Primary"?"visible":"hidden";let An;e[135]!==P?(An=gt.clsx(Jo.Icon,Jo[P]),e[135]=P,e[136]=An):An=e[136];let Gn;e[137]!==An?(Gn=k.jsx(ho,{className:An,icon:"CalendarDay"}),e[137]=An,e[138]=Gn):Gn=e[138];let cr;e[139]===Symbol.for("react.memo_cache_sentinel")?(cr=k.jsx(cs,{w:4}),e[139]=cr):cr=e[139];let gr;e[140]!==mn||e[141]!==Gn?(gr=k.jsxs(N.Activity,{mode:mn,children:[Gn,cr]}),e[140]=mn,e[141]=Gn,e[142]=gr):gr=e[142];let Sn;e[143]===Symbol.for("react.memo_cache_sentinel")?(Sn=k.jsx(zg,{}),e[143]=Sn):Sn=e[143];const Qn=S?"hidden":"visible";let xn;e[144]!==Dt?(xn=k.jsx(Dt,{}),e[144]=Dt,e[145]=xn):xn=e[145];let ur;e[146]!==Qn||e[147]!==xn?(ur=k.jsx(N.Activity,{mode:Qn,children:xn}),e[146]=Qn,e[147]=xn,e[148]=ur):ur=e[148];const si=P==="Secondary"?"visible":"hidden";let xo;e[149]!==P?(xo=gt.clsx(Jo.Icon,Jo[P]),e[149]=P,e[150]=xo):xo=e[150];let wo;e[151]!==xo?(wo=k.jsx(ho,{className:xo,icon:"CalendarDay"}),e[151]=xo,e[152]=wo):wo=e[152];let so;e[153]!==si||e[154]!==wo?(so=k.jsx(N.Activity,{mode:si,children:wo}),e[153]=si,e[154]=wo,e[155]=so):so=e[155];const ai=r?"visible":"hidden";let qi;e[156]!==r||e[157]!==ai?(qi=k.jsx(N.Activity,{mode:ai,children:r}),e[156]=r,e[157]=ai,e[158]=qi):qi=e[158];let Yi;e[159]!==t||e[160]!==i||e[161]!==it||e[162]!==w||e[163]!==_||e[164]!==Ln||e[165]!==St||e[166]!==gr||e[167]!==ur||e[168]!==so||e[169]!==qi?(Yi=k.jsxs(Gi,{...i,abaseRef:vn,className:St,isDisabled:w,isLoading:_,onClick:Ln,children:[t,gr,it,Sn,ur,so,qi]}),e[159]=t,e[160]=i,e[161]=it,e[162]=w,e[163]=_,e[164]=Ln,e[165]=St,e[166]=gr,e[167]=ur,e[168]=so,e[169]=qi,e[170]=Yi):Yi=e[170];const Jl=It||ct?"visible":"hidden";let Wo;if(e[171]!==$t||e[172]!==ne||e[173]!==Ye||e[174]!==It||e[175]!==Pe||e[176]!==V||e[177]!==H||e[178]!==j||e[179]!==Fe||e[180]!==Nt||e[181]!==bt||e[182]!==pe||e[183]!==W||e[184]!==de||e[185]!==be){const an=+It;let On;e[187]!==an?(On={opacity:an},e[187]=an,e[188]=On):On=e[188];let Fr;e[189]===Symbol.for("react.memo_cache_sentinel")?(Fr={className:Jo.StringInput},e[189]=Fr):Fr=e[189];const tr=de?30:11;let fr;e[190]!==ne||e[191]!==Fe?(fr=[ne,Fe],e[190]=ne,e[191]=Fe,e[192]=fr):fr=e[192];let ir;e[193]===Symbol.for("react.memo_cache_sentinel")?(ir={className:Jo.StringInputWrap},e[193]=ir):ir=e[193];let Tr;e[194]!==tr||e[195]!==fr?(Tr=k.jsx("div",{className:Jo.StringInputContainer,children:k.jsx(sg,{className:Jo.String,inputProps:Fr,maxLength:tr,placeholder:"YYYY-MM-DD",useValue:fr,wrapProps:ir})}),e[194]=tr,e[195]=fr,e[196]=Tr):Tr=e[196];let mi;e[197]!==Pe||e[198]!==bt?(mi=k.jsx(Ic,{className:Jo.Prev,isDisabled:Pe,type:"Raw",onClick:bt}),e[197]=Pe,e[198]=bt,e[199]=mi):mi=e[199];let Li;e[200]!==W?(Li=Mo=>W.months(Mo.option),e[200]=W,e[201]=Li):Li=e[201];let Br;e[202]!==V||e[203]!==H||e[204]!==be?(Br=Ap(be,H,V),e[202]=V,e[203]=H,e[204]=be,e[205]=Br):Br=e[205];let Uo;e[206]!==W?(Uo=Mo=>W.months(Mo.selectedOption),e[206]=W,e[207]=Uo):Uo=e[207];let To;e[208]!==j?(To=[j,re],e[208]=j,e[209]=To):To=e[209];let Ro;e[210]!==Li||e[211]!==Br||e[212]!==Uo||e[213]!==To?(Ro=k.jsx(Ah,{isAutoWidth:!0,className:Jo.Select,OptionRenderer:Li,options:Br,SelectedRenderer:Uo,type:"Secondary",useSelect:To}),e[210]=Li,e[211]=Br,e[212]=Uo,e[213]=To,e[214]=Ro):Ro=e[214];let Oi;e[215]===Symbol.for("react.memo_cache_sentinel")?(Oi=k.jsx(cs,{w:8}),e[215]=Oi):Oi=e[215];let Kr;e[216]!==V||e[217]!==H||e[218]!==be?(Kr=_m(be,H,V),e[216]=V,e[217]=H,e[218]=be,e[219]=Kr):Kr=e[219];let Cr;e[220]!==pe||e[221]!==be?(Cr=[be,pe],e[220]=pe,e[221]=be,e[222]=Cr):Cr=e[222];let al;e[223]!==Kr||e[224]!==Cr?(al=k.jsx(Ah,{isAutoWidth:!0,className:Jo.Select,options:Kr,type:"Secondary",useSelect:Cr}),e[223]=Kr,e[224]=Cr,e[225]=al):al=e[225];let Si;e[226]!==Ro||e[227]!==al?(Si=k.jsxs("div",{className:Jo.MonthYear,children:[Ro,Oi,al]}),e[226]=Ro,e[227]=al,e[228]=Si):Si=e[228];let ji;e[229]!==Ye||e[230]!==Nt?(ji=k.jsx(Ic,{className:Jo.Next,isDisabled:Ye,type:"Raw",onClick:Nt}),e[229]=Ye,e[230]=Nt,e[231]=ji):ji=e[231];let cl;e[232]!==mi||e[233]!==Si||e[234]!==ji?(cl=k.jsxs(bl,{className:Jo.Header,children:[mi,Si,ji]}),e[232]=mi,e[233]=Si,e[234]=ji,e[235]=cl):cl=e[235];let Io;e[236]===Symbol.for("react.memo_cache_sentinel")?(Io=k.jsx(cs,{h:10}),e[236]=Io):Io=e[236];let $i;e[237]!==W?($i=k.jsx("div",{className:Jo.Week,children:[0,1,2,3,4,5,6].map(Mo=>k.jsx("div",{className:gt.clsx(Jo.WeekDay,Jo.Cell),children:W.weekDays(Mo)},Mo))}),e[237]=W,e[238]=$i):$i=e[238];let ko;e[239]!==$t||e[240]!==$i?(ko=k.jsxs("div",{className:Jo.Calendar,children:[$i,$t]}),e[239]=$t,e[240]=$i,e[241]=ko):ko=e[241];let _o;e[242]!==cl||e[243]!==ko?(_o=k.jsxs("div",{className:Jo.CalendarContainer,children:[cl,Io,ko]}),e[242]=cl,e[243]=ko,e[244]=_o):_o=e[244];let go;e[245]!==On||e[246]!==Tr||e[247]!==_o?(go=k.jsxs("div",{ref:se,className:Jo.ADatePicker,style:On,onTransitionEnd:Vt,children:[Tr,_o]}),e[245]=On,e[246]=Tr,e[247]=_o,e[248]=go):go=e[248],Wo=su.createPortal(go,document.body),e[171]=$t,e[172]=ne,e[173]=Ye,e[174]=It,e[175]=Pe,e[176]=V,e[177]=H,e[178]=j,e[179]=Fe,e[180]=Nt,e[181]=bt,e[182]=pe,e[183]=W,e[184]=de,e[185]=be,e[186]=Wo}else Wo=e[186];let Co;e[249]!==Jl||e[250]!==Wo?(Co=k.jsx(N.Activity,{mode:Jl,children:Wo}),e[249]=Jl,e[250]=Wo,e[251]=Co):Co=e[251];let ri;return e[252]!==Yi||e[253]!==Co?(ri=k.jsxs(k.Fragment,{children:[Yi,Co]}),e[252]=Yi,e[253]=Co,e[254]=ri):ri=e[254],ri},g8="_Paper_e69j5_1",p8="_Card_e69j5_15",v8="_Body_e69j5_26",b8="_Title_e69j5_35",y8="_Content_e69j5_42",m8="_Action_e69j5_45",x8="_Button_e69j5_58",Qd={Paper:g8,Card:p8,Body:v8,Title:b8,Content:y8,Action:m8,Button:x8},w8=["okCancel","cancelOk","ok","cancel","none"],C8=n=>{const e=Dn.c(129),{dlgCore:t,type:r,title:i,children:o,style:l,titleStyle:a,bodyStyle:u,contentStyle:h,okButtonStyle:y,cancelButtonStyle:x,actionStyle:w,onOk:_,onCancel:S,onClose:R,onEnterPress:I,onEscPress:O,onSpacePress:P,onPaperClick:Y,noDim:z,isLoading:W,isOkDisabled:B,isOkLoading:ee,isCancelDisabled:H,isCancelLoading:V,isChanged:de,buttonNoInteractive:Z,okButtonClassName:te,cancelButtonClassName:ne,progress:fe,ProgressRenderer:ae,progressProps:j,resources:re}=n,he=r===void 0?"okCancel":r,be=z===void 0?!1:z;let le;e[0]!==re?(le={...Nr.ADialog,...re},e[0]=re,e[1]=le):le=e[1];const J=le,[pe,Te]=N.useState(0);let Fe,_e;e[2]===Symbol.for("react.memo_cache_sentinel")?(Fe=()=>Te(1),_e=[],e[2]=Fe,e[3]=_e):(Fe=e[2],_e=e[3]),N.useEffect(Fe,_e);let Me;e[4]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>{Te(0)},e[4]=Me):Me=e[4];const De=Me;let Re;e[5]!==t||e[6]!==R||e[7]!==pe?(Re=()=>{if(!pe){const[,He]=t.state.useIsOpen;He==null||He(!1),R==null||R()}},e[5]=t,e[6]=R,e[7]=pe,e[8]=Re):Re=e[8];const Le=Re;let Oe;e[9]!==W||e[10]!==B||e[11]!==ee||e[12]!==_||e[13]!==pe||e[14]!==he?(Oe=async()=>{if(!pe||he==="cancel"||he==="none"||W||B||ee)return;const{event:He,e:We}=Ag();await(_==null?void 0:_(We)),!He.preventDefault&&De()},e[9]=W,e[10]=B,e[11]=ee,e[12]=_,e[13]=pe,e[14]=he,e[15]=Oe):Oe=e[15];const Ge=Oe;let Ve;e[16]!==H||e[17]!==V||e[18]!==W||e[19]!==S||e[20]!==pe||e[21]!==he?(Ve=async()=>{if(!pe||he==="ok"||he==="none"||W||H||V)return;const{event:He,e:We}=Ag();await(S==null?void 0:S(We)),!He.preventDefault&&De()},e[16]=H,e[17]=V,e[18]=W,e[19]=S,e[20]=pe,e[21]=he,e[22]=Ve):Ve=e[22];const Pe=Ve;let ot,Xe;e[23]!==Pe||e[24]!==t||e[25]!==Ge?(Xe=()=>{t&&t.state.setAction({close:De,ok:Ge,cancel:Pe})},ot=[t,De,Ge,Pe],e[23]=Pe,e[24]=t,e[25]=Ge,e[26]=ot,e[27]=Xe):(ot=e[26],Xe=e[27]),N.useEffect(Xe,ot);let lt;e[28]!==I||e[29]!==W||e[30]!==Ge?(lt=async()=>{if(W)return;const{event:He,e:We}=Ag();await(I==null?void 0:I(We)),!He.preventDefault&&Ge()},e[28]=I,e[29]=W,e[30]=Ge,e[31]=lt):lt=e[31];const Ye=lt;let mt;e[32]!==P||e[33]!==W||e[34]!==Ge?(mt=async()=>{if(W)return;const{event:He,e:We}=Ag();await(P==null?void 0:P(We)),!He.preventDefault&&Ge()},e[32]=P,e[33]=W,e[34]=Ge,e[35]=mt):mt=e[35];const bt=mt;let Mt;e[36]!==Pe||e[37]!==O||e[38]!==de||e[39]!==W?(Mt=async()=>{if(W)return;const{event:He,e:We}=Ag();await(O==null?void 0:O(We)),!He.preventDefault&&(de||Pe())},e[36]=Pe,e[37]=O,e[38]=de,e[39]=W,e[40]=Mt):Mt=e[40];const Nt=Mt,_t=N.useRef(null);let rn;e[41]!==Ye||e[42]!==Nt||e[43]!==bt||e[44]!==pe?(rn=He=>{const We=document.body.getElementsByClassName(Qd.Paper);We.length===0||We[We.length-1]!==_t.current||(He.key==="Enter"&&pe?Ye():He.key===" "&&pe?bt():He.key==="Escape"&&pe&&Nt())},e[41]=Ye,e[42]=Nt,e[43]=bt,e[44]=pe,e[45]=rn):rn=e[45];const pn=rn;let Kt,dn;e[46]!==pn||e[47]!==pe?(Kt=()=>{if(pe)return window.addEventListener("keydown",pn),()=>window.removeEventListener("keydown",pn)},dn=[pe,pn],e[46]=pn,e[47]=pe,e[48]=Kt,e[49]=dn):(Kt=e[48],dn=e[49]),N.useEffect(Kt,dn);const zt=N.useRef(!1),wn=N.useRef(!1);let $t;e[50]===Symbol.for("react.memo_cache_sentinel")?($t=()=>{zt.current=!0},e[50]=$t):$t=e[50];const vn=$t;let Pt;e[51]===Symbol.for("react.memo_cache_sentinel")?(Pt=()=>{zt.current=!1,wn.current=!1},e[51]=Pt):Pt=e[51];const Yt=Pt;let ct;e[52]===Symbol.for("react.memo_cache_sentinel")?(ct=()=>{wn.current=!0},e[52]=ct):ct=e[52];const Tt=ct;let It;e[53]!==Pe||e[54]!==Y||e[55]!==de||e[56]!==W?(It=async()=>{if(W)return;const He=!wn.current||zt.current;if(zt.current=!1,wn.current=!1,He)return;const{event:We,e:pt}=Ag();await(Y==null?void 0:Y(pt)),!We.preventDefault&&(de||Pe())},e[53]=Pe,e[54]=Y,e[55]=de,e[56]=W,e[57]=It):It=e[57];const ye=It;let se;if(e[58]!==ae||e[59]!==w||e[60]!==u||e[61]!==Z||e[62]!==Pe||e[63]!==ne||e[64]!==x||e[65]!==o||e[66]!==h||e[67]!==H||e[68]!==V||e[69]!==W||e[70]!==B||e[71]!==ee||e[72]!==be||e[73]!==Ge||e[74]!==te||e[75]!==y||e[76]!==ye||e[77]!==Le||e[78]!==pe||e[79]!==fe||e[80]!==j||e[81]!==J||e[82]!==l||e[83]!==i||e[84]!==a||e[85]!==he){const He=be?"transparent":void 0,We=pe?void 0:"none";let pt;e[87]!==pe||e[88]!==He||e[89]!==We?(pt={backgroundColor:He,pointerEvents:We,opacity:pe},e[87]=pe,e[88]=He,e[89]=We,e[90]=pt):pt=e[90];let wt;e[91]!==i||e[92]!==a?(wt=i&&k.jsx(_8,{title:i,titleStyle:a}),e[91]=i,e[92]=a,e[93]=wt):wt=e[93];let qt;e[94]!==o||e[95]!==h?(qt=o&&k.jsx("div",{className:Qd.Content,style:h,children:o}),e[94]=o,e[95]=h,e[96]=qt):qt=e[96];let Jt;e[97]!==u||e[98]!==wt||e[99]!==qt?(Jt=k.jsxs("div",{className:Qd.Body,style:u,children:[wt,qt]}),e[97]=u,e[98]=wt,e[99]=qt,e[100]=Jt):Jt=e[100];let Vt;e[101]!==w||e[102]!==Z||e[103]!==Pe||e[104]!==ne||e[105]!==x||e[106]!==H||e[107]!==V||e[108]!==B||e[109]!==ee||e[110]!==Ge||e[111]!==te||e[112]!==y||e[113]!==J||e[114]!==he?(Vt=he!=="none"&&k.jsx(S8,{type:he,ok:Ge,cancel:Pe,resources:J,isOkDisabled:B,isOkLoading:ee,isCancelDisabled:H,isCancelLoading:V,okButtonStyle:y,cancelButtonStyle:x,actionStyle:w,buttonNoInteractive:Z,okButtonClassName:te,cancelButtonClassName:ne}),e[101]=w,e[102]=Z,e[103]=Pe,e[104]=ne,e[105]=x,e[106]=H,e[107]=V,e[108]=B,e[109]=ee,e[110]=Ge,e[111]=te,e[112]=y,e[113]=J,e[114]=he,e[115]=Vt):Vt=e[115];let hn;e[116]!==ae||e[117]!==W||e[118]!==fe||e[119]!==j||e[120]!==l||e[121]!==Jt||e[122]!==Vt?(hn=k.jsxs(Gi,{className:Qd.Card,isLoading:W,progress:fe,progressProps:j,ProgressRenderer:ae,style:l,onMouseDown:vn,onMouseUp:Yt,children:[Jt,Vt]}),e[116]=ae,e[117]=W,e[118]=fe,e[119]=j,e[120]=l,e[121]=Jt,e[122]=Vt,e[123]=hn):hn=e[123];let ln;e[124]!==ye||e[125]!==Le||e[126]!==pt||e[127]!==hn?(ln=k.jsx("div",{ref:_t,className:Qd.Paper,style:pt,onMouseDown:Tt,onMouseUp:ye,onTransitionEnd:Le,children:hn}),e[124]=ye,e[125]=Le,e[126]=pt,e[127]=hn,e[128]=ln):ln=e[128],se=su.createPortal(ln,document.body),e[58]=ae,e[59]=w,e[60]=u,e[61]=Z,e[62]=Pe,e[63]=ne,e[64]=x,e[65]=o,e[66]=h,e[67]=H,e[68]=V,e[69]=W,e[70]=B,e[71]=ee,e[72]=be,e[73]=Ge,e[74]=te,e[75]=y,e[76]=ye,e[77]=Le,e[78]=pe,e[79]=fe,e[80]=j,e[81]=J,e[82]=l,e[83]=i,e[84]=a,e[85]=he,e[86]=se}else se=e[86];return se},_8=n=>{const e=Dn.c(4),{title:t,titleStyle:r}=n;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=gt.clsx(Qd.Title,"NoSelect","Title3"),e[0]=i):i=e[0];let o;return e[1]!==t||e[2]!==r?(o=k.jsx("div",{className:i,style:r,children:t}),e[1]=t,e[2]=r,e[3]=o):o=e[3],o},S8=n=>{const e=Dn.c(41),{type:t,ok:r,cancel:i,resources:o,isOkDisabled:l,isOkLoading:a,isCancelDisabled:u,isCancelLoading:h,okButtonStyle:y,cancelButtonStyle:x,actionStyle:w,buttonNoInteractive:_,okButtonClassName:S,cancelButtonClassName:R}=n,I=o.Ok;let O;e[0]!==S?(O=gt.clsx(Qd.Button,S),e[0]=S,e[1]=O):O=e[1];let P;e[2]!==_||e[3]!==l||e[4]!==a||e[5]!==r||e[6]!==y||e[7]!==o.Ok||e[8]!==O?(P={onClick:r,isDisabled:l,isLoading:a,children:I,style:y,noInteractive:_,className:O},e[2]=_,e[3]=l,e[4]=a,e[5]=r,e[6]=y,e[7]=o.Ok,e[8]=O,e[9]=P):P=e[9];const Y=P,z=o.Cancel;let W;e[10]!==R?(W=gt.clsx(Qd.Button,R),e[10]=R,e[11]=W):W=e[11];let B;e[12]!==_||e[13]!==i||e[14]!==x||e[15]!==u||e[16]!==h||e[17]!==o.Cancel||e[18]!==W?(B={type:"Secondary",onClick:i,isDisabled:u,isLoading:h,children:z,style:x,noInteractive:_,className:W},e[12]=_,e[13]=i,e[14]=x,e[15]=u,e[16]=h,e[17]=o.Cancel,e[18]=W,e[19]=B):B=e[19];const ee=B;if(t==="okCancel"||t==="ok"){let H;e[20]!==w?(H={...w},e[20]=w,e[21]=H):H=e[21];let V;e[22]!==Y?(V=k.jsx(Ic,{...Y}),e[22]=Y,e[23]=V):V=e[23];let de;e[24]!==ee||e[25]!==t?(de=t==="okCancel"&&k.jsxs(k.Fragment,{children:[k.jsx(cs,{w:8}),k.jsx(Ic,{...ee})]}),e[24]=ee,e[25]=t,e[26]=de):de=e[26];let Z;return e[27]!==H||e[28]!==V||e[29]!==de||e[30]!==t?(Z=k.jsxs("div",{className:Qd.Action,style:H,children:[V,de]},t),e[27]=H,e[28]=V,e[29]=de,e[30]=t,e[31]=Z):Z=e[31],Z}else if(t==="cancelOk"||t==="cancel"){let H;e[32]!==ee?(H=k.jsx(Ic,{...ee}),e[32]=ee,e[33]=H):H=e[33];let V;e[34]!==Y||e[35]!==t?(V=t==="cancelOk"&&k.jsxs(k.Fragment,{children:[k.jsx(cs,{w:8}),k.jsx(Ic,{...Y})]}),e[34]=Y,e[35]=t,e[36]=V):V=e[36];let de;return e[37]!==H||e[38]!==V||e[39]!==t?(de=k.jsxs("div",{className:Qd.Action,children:[H,V]},t),e[37]=H,e[38]=V,e[39]=t,e[40]=de):de=e[40],de}},E8=n=>{const e=N.useMemo(()=>Math.random().toFixed(32),[]),t=N.useMemo(()=>{const _={};return n.forEach(S=>{_[S]=S+e}),_},[n,e]),r=N.useMemo(()=>[],[]),i=N.useMemo(()=>(r.length=0,r.push(...n),r),[r,n]),[o,l]=N.useState([]),a=N.useRef((()=>{const _={};return i.forEach(S=>{_[S]={open:()=>l(R=>[...R,S]),close:()=>{},ok:()=>{},cancel:()=>{}}}),_})()),u=N.useMemo(()=>{const _={};return i.forEach(S=>{_[S]=R=>{l(I=>!R&&I.includes(S)?I.filter(O=>O!==S):R&&!I.includes(S)?[...I,S]:I)}}),_},[i]),h=N.useMemo(()=>{const _={};return i.forEach(S=>{const I=[o.includes(S),u[S]],O=P=>{a.current[S]={...a.current[S],...P}};_[S]={useIsOpen:I,setAction:O}}),_},[o,u,i]),y=N.useMemo(()=>{const _={};return i.forEach(S=>{const R=()=>a.current[S].open(),I=()=>a.current[S].close(),O=()=>a.current[S].ok(),P=()=>a.current[S].cancel();_[S]={open:R,close:I,ok:O,cancel:P}}),_},[i]),x=N.useMemo(()=>({}),[]),w=N.useMemo(()=>(i.forEach(_=>{x[_]={state:h[_],action:y[_]}}),x),[x,i,h,y]);return N.useEffect(()=>(Object.keys(w).forEach(S=>{const R=w[S],I=t[S],O=Md.find(P=>{P.id});O?O.core=R:Md.push({id:I,core:R})}),()=>{const S=Object.keys(w),R=Md.filter(I=>S.includes(I.id));Md.length=0,Md.push(...R)}),[w,t]),w},A8=()=>{const n=N.useMemo(()=>Math.random().toFixed(32),[]),[e,t]=N.useState(!1),r=N.useRef({open:()=>t(!0),close:()=>{},ok:()=>{},cancel:()=>{}}),i=N.useMemo(()=>({useIsOpen:[e,t],setAction:u=>{r.current={...r.current,...u}}}),[e]),o=N.useMemo(()=>({open:()=>r.current.open(),close:()=>r.current.close(),ok:()=>r.current.ok(),cancel:()=>r.current.cancel()}),[]),l=N.useMemo(()=>({}),[]),a=N.useMemo(()=>(l.state=i,l.action=o,l),[l,i,o]);return N.useEffect(()=>{const u=Md.find(h=>h.id===n);return u?u.core=a:Md.push({id:n,core:a}),()=>{const h=Md.filter(y=>y.id!==n);Md.length=0,Md.push(...h)}},[n,a]),a},T8=n=>{const e=Dn.c(5),{dlgCore:t,children:r}=n,[i,o]=t.state.useIsOpen;let l,a;e[0]!==o?(l=()=>()=>o==null?void 0:o(!1),a=[o],e[0]=o,e[1]=l,e[2]=a):(l=e[1],a=e[2]),N.useEffect(l,a);const u=i&&r;let h;return e[3]!==u?(h=k.jsx(N.Suspense,{children:u}),e[3]=u,e[4]=h):h=e[4],h},R8=n=>e=>{const{dlgCore:t}=e;return k.jsx(T8,{dlgCore:t,children:N.cloneElement(k.jsx(n,{...e}),{dlgCore:t})})},Md=[],I8={closeAllDlgs:()=>{Md.forEach(n=>{n.core.action.close()})}},k8="_AFileBox_1hlo1_1",M8="_SelectedFile_1hlo1_16",L8="_Dropping_1hlo1_26",Em={AFileBox:k8,SelectedFile:M8,Dropping:L8},O8=n=>{const e=Dn.c(60);let t,r,i,o,l,a,u,h,y,x,w,_;e[0]!==n?({useFile:_,FileRenderer:h,SelectRenderer:y,DropRenderer:x,resources:i,accept:w,onInvalidFileFormat:u,fileSelectButtonClassName:o,isDisabled:l,isLoading:a,className:r,...t}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_):(t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12]);const S=h===void 0?P8:h,R=y===void 0?D8:y,I=x===void 0?N8:x,O=w===void 0?"":w;let P;e[13]!==i?(P={...Nr.AFileBox,...i},e[13]=i,e[14]=P):P=e[14];const Y=P,z=N.useRef(null),W=N.useRef(null),[B,ee]=Ho(_,null),[H,V]=N.useState(!1);let de;e[15]!==O?(de=O.split(",").map(F8).filter(B8),e[15]=O,e[16]=de):de=e[16];const Z=de;let te;e[17]!==Z?(te=Pe=>{if(Z.length===0)return!1;const ot=Pe.name.split(".").pop();return ot?!Z.includes(`.${ot}`):!0},e[17]=Z,e[18]=te):te=e[18];const ne=te;let fe;e[19]!==ne||e[20]!==u||e[21]!==ee?(fe=Pe=>{if(ee)if(ne(Pe)){u==null||u();return}else ee(Pe);else return},e[19]=ne,e[20]=u,e[21]=ee,e[22]=fe):fe=e[22];const ae=fe;let j;e[23]!==ae?(j=Pe=>{Pe.target.files&&Pe.target.files.length>0&&ae(Pe.target.files[0])},e[23]=ae,e[24]=j):j=e[24];const re=j;let he;e[25]!==ae||e[26]!==l||e[27]!==a?(he=Pe=>{Pe.preventDefault(),V(!1),!(l||a)&&Pe.dataTransfer.files&&Pe.dataTransfer.files.length>0&&ae(Pe.dataTransfer.files[0])},e[25]=ae,e[26]=l,e[27]=a,e[28]=he):he=e[28];const be=he;let le;e[29]!==l||e[30]!==a?(le=Pe=>{Pe.preventDefault(),!(l||a)&&V(!0)},e[29]=l,e[30]=a,e[31]=le):le=e[31];const J=le;let pe;e[32]===Symbol.for("react.memo_cache_sentinel")?(pe=Pe=>{Pe.target===z.current&&Pe.relatedTarget.contains(z.current.parentElement)&&(Pe.preventDefault(),V(!1))},e[32]=pe):pe=e[32];const Te=pe,Fe=z8;let _e;e[33]===Symbol.for("react.memo_cache_sentinel")?(_e=()=>{var Pe;(Pe=W.current)==null||Pe.click()},e[33]=_e):_e=e[33];const Me=_e;let De;if(H){let Pe;e[34]!==I||e[35]!==Y?(Pe=k.jsx(I,{resources:Y}),e[34]=I,e[35]=Y,e[36]=Pe):Pe=e[36],De=Pe}else if(B){let Pe;e[37]!==S||e[38]!==B||e[39]!==_?(Pe=k.jsx(S,{file:B,useFile:_}),e[37]=S,e[38]=B,e[39]=_,e[40]=Pe):Pe=e[40],De=Pe}else{let Pe;e[41]!==R||e[42]!==o||e[43]!==Y?(Pe=k.jsx(R,{fileSelectButtonClassName:o,resources:Y,onClick:Me}),e[41]=R,e[42]=o,e[43]=Y,e[44]=Pe):Pe=e[44],De=Pe}const Re=De;let Le;e[45]!==r?(Le=gt.clsx(Em.AFileBox,r),e[45]=r,e[46]=Le):Le=e[46];let Oe;e[47]===Symbol.for("react.memo_cache_sentinel")?(Oe={display:"none"},e[47]=Oe):Oe=e[47];let Ge;e[48]!==O||e[49]!==re?(Ge=k.jsx("input",{ref:W,accept:O,style:Oe,type:"file",value:"",onChange:re}),e[48]=O,e[49]=re,e[50]=Ge):Ge=e[50];let Ve;return e[51]!==t||e[52]!==Re||e[53]!==l||e[54]!==a||e[55]!==J||e[56]!==be||e[57]!==Le||e[58]!==Ge?(Ve=k.jsxs(Gi,{...t,abaseRef:z,className:Le,isDisabled:l,isLoading:a,onDragEnter:J,onDragLeave:Te,onDragOver:Fe,onDrop:be,children:[Ge,Re]}),e[51]=t,e[52]=Re,e[53]=l,e[54]=a,e[55]=J,e[56]=be,e[57]=Le,e[58]=Ge,e[59]=Ve):Ve=e[59],Ve},P8=n=>{const e=Dn.c(10),{file:t,useFile:r}=n,[,i]=Ho(r,null);let o,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundColor:""},l=k.jsx(ho,{icon:"File"}),e[0]=o,e[1]=l):(o=e[0],l=e[1]);let a;e[2]!==t.name?(a=k.jsx(nh,{children:t.name}),e[2]=t.name,e[3]=a):a=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u={marginLeft:2,transform:"scale(0.8)"},e[4]=u):u=e[4];let h;e[5]!==i?(h=k.jsx(ba,{icon:"Close",style:u,type:"Raw",onClick:()=>i==null?void 0:i(null)}),e[5]=i,e[6]=h):h=e[6];let y;return e[7]!==a||e[8]!==h?(y=k.jsxs(bl,{className:Em.SelectedFile,style:o,children:[l,a,h]}),e[7]=a,e[8]=h,e[9]=y):y=e[9],y},D8=n=>{const e=Dn.c(9),{onClick:t,resources:r,fileSelectButtonClassName:i}=n;let o,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=gt.clsx("NoSelect"),l={gap:4},e[0]=o,e[1]=l):(o=e[0],l=e[1]);const a=r["Select File"];let u;e[2]!==i||e[3]!==t||e[4]!==a?(u=k.jsx(Ic,{className:i,onClick:t,children:a}),e[2]=i,e[3]=t,e[4]=a,e[5]=u):u=e[5];const h=r["or Drag & Drop"];let y;return e[6]!==u||e[7]!==h?(y=k.jsxs(bl,{className:o,style:l,children:[u,h]}),e[6]=u,e[7]=h,e[8]=y):y=e[8],y},N8=n=>{const e=Dn.c(4),{resources:t}=n;let r,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=gt.clsx(Em.Dropping,"NoSelect","Headline2"),i=k.jsx(ho,{icon:"FileDownload"}),e[0]=r,e[1]=i):(r=e[0],i=e[1]);const o=t["drop file to select"];let l;return e[2]!==o?(l=k.jsxs(P3,{className:r,children:[i,o]}),e[2]=o,e[3]=l):l=e[3],l};function F8(n){return n.trim()}function B8(n){return n.length>0&&n.startsWith(".")}function z8(n){return n.preventDefault()}async function H8(n){const e=new Promise((t,r)=>{const i=new FileReader;i.onloadend=()=>{i.result?typeof i.result=="string"?t(i.result):r(new Error("Failed to convert file to Base64: Invalid result type.")):r(new Error("Failed to convert file to Base64: Empty result."))},i.onerror=r,i.readAsDataURL(n)});try{return await e}catch{return}}function W8(n,e){var a,u;const t=n.split(","),r=(u=(a=t[0])==null?void 0:a.match(/:(.*?);/))==null?void 0:u[1],i=atob(t[1]);let o=i.length;const l=new Uint8Array(o);for(;o--;)l[o]=i.charCodeAt(o);return new File([l],e,{type:r})}const B3=n=>{if(n.idx!==void 0&&n.idx!==null)return String(n.idx);if(n.uniqueId)return n.uniqueId;const e=n.name||"",t=typeof n.size=="number"?n.size:0,r=n.lastModified??"";return`${e}-${t}-${r}`},z3={toBase64:H8,toFile:W8,getFileKey:B3},U8="_AFileUploader_i2nun_1",G8="_LabelContainer_i2nun_16",Y8="_LabelButton_i2nun_25",V8="_Disabled_i2nun_31",Z8="_Delete_i2nun_34",X8="_FileSize_i2nun_38",K8="_TotalFileSize_i2nun_45",J8="_FileBox_i2nun_49",Q8="_FileBoxFullSize_i2nun_68",q8="_SelectRenderer_i2nun_75",j8="_ChipsContainer_i2nun_87",$8="_FileChip_i2nun_100",e9="_FileChipContent_i2nun_113",t9="_FileNameContainer_i2nun_124",n9="_ButtonRenderer_i2nun_130",r9="_ErrorBorder_i2nun_141",i9="_ErrorColor_i2nun_145",o9="_ErrorCursor_i2nun_149",l9="_DropIdle_i2nun_159",vl={AFileUploader:U8,LabelContainer:G8,LabelButton:Y8,Disabled:V8,Delete:Z8,FileSize:X8,TotalFileSize:K8,FileBox:J8,FileBoxFullSize:Q8,SelectRenderer:q8,ChipsContainer:j8,FileChip:$8,FileChipContent:e9,FileNameContainer:t9,ButtonRenderer:n9,ErrorBorder:r9,ErrorColor:i9,ErrorCursor:o9,DropIdle:l9},s9=n=>{const e=Dn.c(17),{file:t,baseClass:r,errorClass:i,errorCursorClass:o,mode:l,resources:a,onDelete:u,onDownload:h}=n,[y,x]=N.useState(!1),w=l==="Upload"&&!!u,_=l==="Download"&&!!h;if(!w&&!_)return null;let S;e[0]!==t||e[1]!==_||e[2]!==w||e[3]!==u||e[4]!==h?(S=()=>{w&&u?u(t):_&&h&&h(t)},e[0]=t,e[1]=_,e[2]=w,e[3]=u,e[4]=h,e[5]=S):S=e[5];const R=S;let I;e[6]!==r||e[7]!==i||e[8]!==o?(I=gt.clsx(r,i,o),e[6]=r,e[7]=i,e[8]=o,e[9]=I):I=e[9];const O=y?w?"X":"FileDownload":"CircleAlertOutline",P=w?a["Retry Delete"]:a["Retry Download"];let Y,z;e[10]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>x(!0),z=()=>x(!1),e[10]=Y,e[11]=z):(Y=e[10],z=e[11]);let W;return e[12]!==R||e[13]!==I||e[14]!==O||e[15]!==P?(W=k.jsx(ba,{className:I,icon:O,iconSize:"sm",tooltip:P,type:"Raw",onClick:R,onMouseEnter:Y,onMouseLeave:z}),e[12]=R,e[13]=I,e[14]=O,e[15]=P,e[16]=W):W=e[16],W},a9=N.memo(s9),c9=n=>{const e=Dn.c(10),{file:t,baseClass:r,onDelete:i,resources:o}=n,[l,a]=N.useState(!1),u=l?"X":"Pend",h=l&&o.Delete;let y;e[0]!==t||e[1]!==i?(y=()=>i(t),e[0]=t,e[1]=i,e[2]=y):y=e[2];let x,w;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=()=>a(!0),w=()=>a(!1),e[3]=x,e[4]=w):(x=e[3],w=e[4]);let _;return e[5]!==r||e[6]!==u||e[7]!==h||e[8]!==y?(_=k.jsx(ba,{className:r,icon:u,iconSize:"sm",tooltip:h,type:"Raw",onClick:y,onMouseEnter:x,onMouseLeave:w}),e[5]=r,e[6]=u,e[7]=h,e[8]=y,e[9]=_):_=e[9],_},u9=N.memo(c9),f9=n=>{const e=Dn.c(13),{file:t,baseClass:r,onDelete:i,resources:o}=n,[l,a]=N.useState(!1),u=l?"X":"Check",h=l?"var(--AFileUploader_text_color)":"var(--AFileUploader_brand_color)";let y;e[0]!==h?(y={color:h},e[0]=h,e[1]=y):y=e[1];const x=l&&o.Delete;let w;e[2]!==t||e[3]!==i?(w=()=>i(t),e[2]=t,e[3]=i,e[4]=w):w=e[4];let _,S;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>a(!0),S=()=>a(!1),e[5]=_,e[6]=S):(_=e[5],S=e[6]);let R;return e[7]!==r||e[8]!==u||e[9]!==y||e[10]!==x||e[11]!==w?(R=k.jsx(ba,{className:r,icon:u,iconSize:"sm",style:y,tooltip:x,type:"Raw",onClick:w,onMouseEnter:_,onMouseLeave:S}),e[7]=r,e[8]=u,e[9]=y,e[10]=x,e[11]=w,e[12]=R):R=e[12],R},d9=N.memo(f9),h9=n=>{const e=Dn.c(4),{baseClass:t,file:r,getFileProgress:i,mode:o,onDelete:l,resources:a}=n,u=i(r);let h;u!==void 0?h=`${Math.round(u*10)/10}%`:o==="Upload"&&l&&(h=a["Deleting..."]);let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={cursor:"default"},e[0]=y):y=e[0];let x;return e[1]!==t||e[2]!==h?(x=k.jsx(ba,{className:t,icon:"Spinner",iconSize:"sm",style:y,tooltip:h,type:"Raw"}),e[1]=t,e[2]=h,e[3]=x):x=e[3],x},g9=N.memo(h9),p9=n=>{const{useFiles:e,accept:t,onInvalidFileFormat:r,onDownload:i,onUpload:o,onDownloadCsv:l,onDelete:a,mode:u,type:h="Primary",limit:y=1024*1024*1024,maxFileCount:x,useError:w,isLoading:_,resources:S,className:R,onDownloadAll:I,csvFilename:O,...P}=n,[{wrapId:Y,wrapProps:z,labelProps:W,...B},ee]=Bg(P),H=N.useMemo(()=>({...Nr.AFileUploader,...S}),[S]),[V,de]=Ho(e,void 0),[Z,te]=Ho(w,!1),[ne,fe]=N.useState({}),[ae,j]=N.useState({}),[re,he]=N.useState(!1),be=N.useRef(null),le=N.useRef(null),J=N.useRef([]),pe=N.useRef(!1),Te=N.useRef(V);N.useEffect(()=>{Te.current=V},[V]);const Fe=N.useMemo(()=>(V==null?void 0:V.reduce((ct,{size:Tt})=>ct+Tt,0))||0,[V]);N.useEffect(()=>{te&&te(Fe>y)},[Fe,y,te]);const _e=N.useCallback(ct=>{var ye;if(!t||t==="*"||t==="")return!0;const Tt=t.split(",").map(se=>se.trim()),It=`.${(ye=ct.name.split(".").pop())==null?void 0:ye.toLowerCase()}`;return Tt.includes(It)?!0:Tt.some(se=>{var He;if(se.startsWith("."))return!1;if(se.endsWith("/*")){const We=se.split("/")[0];return(He=ct.type)==null?void 0:He.startsWith(`${We}/`)}return ct.type===se})},[t]),Me=N.useCallback((ct,Tt,It)=>{fe(ye=>{const se={...ye};return se[ct]=Tt,se}),j(ye=>{const se={...ye};return It!==void 0?se[ct]=It:ct in se&&delete se[ct],se})},[]),De=N.useRef(new WeakMap),Re=N.useCallback(ct=>{const Tt=De.current.get(ct);if(Tt)return Tt;const It=z3.getFileKey(ct);return De.current.set(ct,It),It},[]),Le=N.useCallback(ct=>ne[Re(ct)]||"Normal",[ne,Re]),Oe=N.useCallback(ct=>{const Tt=ae[Re(ct)];return typeof Tt=="number"?Tt:void 0},[ae,Re]),Ge=N.useCallback(ct=>_||Le(ct)==="Loading",[_,Le]),Ve=N.useCallback(ct=>Le(ct)==="Pending",[Le]),Pe=N.useCallback(ct=>Le(ct)==="Error"||u==="Upload"&&ct.size>y,[Le,y,u]),ot=N.useMemo(()=>V!=null&&V.length?u==="Download"?V.every(Pe):!1:!0,[V,u,Pe]),Xe=N.useCallback(()=>be.current&&(be.current.value=""),[]),lt=N.useMemo(()=>!x||!(V!=null&&V.length)?!1:V.length>=x,[V,x]),Ye=N.useCallback(ct=>{if(!de)return;const Tt=Te.current;Tt&&(de(Tt.filter(It=>It!==ct)),Xe())},[de,Xe]),mt=N.useCallback(()=>{if(pe.current||!o)return;const ct=J.current.shift();if(!ct)return;pe.current=!0;const Tt=Re(ct);Me(Tt,"Loading",0);const It=(ye,se)=>{if(ye==="Error"){Ye(ct);return}Me(Tt,ye,se)};Promise.resolve(o(ct,It)).catch(()=>Ye(ct)).finally(()=>{pe.current=!1,J.current.length>0&&mt()})},[o,Me,Re,Ye]),bt=N.useCallback(ct=>{if(!de)return;const Tt=[];let It=!1,ye=[],se=x?x-((V==null?void 0:V.length)||0):1/0;if(!(se<=0)){if(Array.from(ct).forEach((He,We)=>{if(We>=se)return;if(!_e(He)){It=!0,ye.push(He.name);return}const pt=He;pt.uniqueId=`file-${crypto.randomUUID()}`,Tt.push(pt)}),It)if(r)r();else{const He=t?t.replace(/,/g,", "):"",We=He?`${H["Supported file format(s)"]}: ${He}`:"",pt=ye.length>3?`${ye.slice(0,3).join(", ")} ${H.and} ${ye.length-3} ${H["more file(s)"]}`:ye.join(", ");alert(`${H["Unsupported file format detected."]}
|
|
282
282
|
|
|
283
283
|
${H["Invalid file(s)"]}: ${pt}${We?`
|
|
284
284
|
|
|
285
|
-
`+We:""}`)}Tt.length>0&&(de([...V||[],...Tt]),u==="Upload"&&o&&(Tt.forEach(He=>{J.current.push(He),Me(Re(He),"Pending")}),mt()))}},[de,_e,r,t,H,V,x,u,o,Me,Re,mt]),Mt=N.useCallback(()=>{be.current&&(be.current.value="",be.current.click())},[]),Nt=N.useCallback(ct=>ct.target.files&&bt(ct.target.files),[bt]),_t=N.useCallback((ct,Tt=!1)=>{const It=Re(ct);if(!de)return Promise.resolve();const ye=Le(ct);if(!Tt&&ye==="Loading")return Promise.resolve();if(ye==="Pending"){const pt=J.current.findIndex(wt=>wt===ct);return pt!==-1&&J.current.splice(pt,1),Ye(ct),Promise.resolve()}if(!ct.uniqueId||!a)return Ye(ct),Promise.resolve();ye!=="Loading"&&Me(It,"Loading");let He=!1;const We=pt=>{pt==="Error"&&(He=!0),Me(It,pt)};return Promise.resolve(a(ct,We)).then(()=>{He||Ye(ct)}).catch(()=>Me(It,"Error"))},[a,de,Me,Re,Le,Ye]),rn=N.useCallback(()=>{if(!(!de||!(V!=null&&V.length))&&!(typeof window<"u"&&!window.confirm(H["Are you sure you want to delete all files?"]))){if(u==="Upload"&&a){const ct=[...V];ct.forEach(Tt=>{const It=Re(Tt);Le(Tt)!=="Pending"&&Me(It,"Loading")}),(async()=>{for(const Tt of ct)await _t(Tt,!0)})();return}de([]),Xe()}},[de,V,u,a,Xe,H,Re,Le,Me,_t]),pn=N.useCallback(ct=>{if(!i)return Promise.resolve();const Tt=Re(ct);return ne[Tt]==="Loading"?Promise.resolve():(Me(Tt,"Loading"),new Promise(It=>{i(ct,(ye,se)=>{Me(Tt,ye,se),It()})}))},[i,Me,Re,ne]),Kt=N.useCallback(async()=>{if(V!=null&&V.length){if(V.forEach(ct=>{const Tt=Re(ct);Me(Tt,"Loading")}),I){I(V,(ct,Tt)=>Object.entries(ct).forEach(([It,ye])=>Me(It,ye,Tt==null?void 0:Tt[It])));return}if(i)for(const ct of V){const Tt=Re(ct);await new Promise(It=>{i(ct,(ye,se)=>{Me(Tt,ye,se),It()})})}}},[V,i,I,Me,Re]),dn=N.useCallback(()=>{!(V!=null&&V.length)||!l||l(V)},[V,l]),zt=N.useMemo(()=>{const ct=Tt=>{Tt.preventDefault(),Tt.stopPropagation()};return{onDragEnter:Tt=>{ct(Tt),!Z&&!_&&he(!0)},onDragOver:Tt=>{ct(Tt),!Z&&!_&&Tt.dataTransfer&&(Tt.dataTransfer.dropEffect="copy")},onDragLeave:Tt=>{var ye;ct(Tt),((ye=le.current)==null?void 0:ye.contains(Tt.relatedTarget))||he(!1)},onDrop:Tt=>{var It;ct(Tt),he(!1),!Z&&!_&&((It=Tt.dataTransfer.files)!=null&&It.length)&&bt(Tt.dataTransfer.files)}}},[Z,_,bt]),wn=N.useCallback(ct=>{Z||_||lt||ct.clipboardData.files.length&&(ct.preventDefault(),bt(ct.clipboardData.files))},[Z,_,lt,bt]),$t=N.useMemo(()=>{const ct=gt.clsx(vl.ButtonRenderer,"NoSelect");return{upload:Tt=>k.jsx(c9,{baseClass:ct,file:Tt,resources:H,onDelete:_t}),pending:Tt=>k.jsx(a9,{baseClass:ct,file:Tt,resources:H,onDelete:_t}),loading:Tt=>k.jsx(u9,{baseClass:ct,file:Tt,getFileProgress:Oe,mode:u,resources:H,onDelete:a}),error:Tt=>k.jsx(s9,{baseClass:ct,errorClass:vl.ErrorColor,errorCursorClass:vl.ErrorCursor,file:Tt,mode:u,resources:H,onDelete:_t,onDownload:pn}),download:Tt=>k.jsx(ba,{className:ct,icon:"FileDownload",iconSize:"sm",style:{color:"var(--AFileUploader_brand_color)"},tooltip:H.Download,type:"Raw",onClick:()=>pn(Tt)}),view:()=>null}},[H,_t,pn,Oe,u,a]),vn=N.useCallback((ct,Tt)=>{const It=Ge(ct),ye=Ve(ct),se=Pe(ct),He=()=>u==="Upload"?It?$t.loading(ct):ye?$t.pending(ct):se?$t.error(ct):$t.upload(ct):u==="View"?$t.view():It?$t.loading(ct):se?$t.error(ct):$t.download(ct);return k.jsx(xm,{ButtonRenderer:He,className:gt.clsx(vl.FileChip,se&&vl.ErrorBorder),label:k.jsx("div",{className:vl.FileChipContent,children:k.jsxs(bl,{className:vl.FileNameContainer,children:[k.jsx(nh,{children:ct.name,className:gt.clsx(se&&vl.ErrorColor)}),k.jsx("span",{children:Mg(ct.size),className:vl.FileSize})]})})},`${Re(ct)}-${Tt}`)},[Ge,Ve,Pe,u,$t,Re]),Pt=N.useCallback(()=>k.jsx("div",{className:gt.clsx(vl.FileBox,Z&&vl.ErrorBorder,Z&&vl.ErrorColor,Z&&vl.ErrorCursor,lt&&vl.Disabled,re&&!(V!=null&&V.length)&&vl.FileBoxFullSize),onPaste:wn,...zt,children:re?k.jsxs(bl,{className:gt.clsx("NoSelect"),style:{gap:4,display:V!=null&&V.length?"flex":"none"},children:[k.jsx(ho,{icon:"FileDownload"}),k.jsx("span",{children:H["Drop file to select"]})]}):k.jsxs(Ic,{className:gt.clsx(vl.SelectRenderer,"NoSelect"),isDisabled:Z||_||lt,type:"Raw",onClick:Mt,children:[H["Insert File"],x&&` ${(V==null?void 0:V.length)||0} / ${x}`]})}),[Z,lt,re,V==null?void 0:V.length,zt,H,_,Mt,x,wn]),Yt=N.useMemo(()=>{const ct=u==="Upload",Tt=u==="View",It=ct?H["Delete All"]:H["Download All"],ye=ct?rn:Kt,se=(V==null?void 0:V.some(He=>Ge(He)))||!1;return k.jsxs(bl,{className:vl.LabelContainer,children:[B.label,k.jsx(N.Activity,{mode:u==="Upload"?"visible":"hidden",children:k.jsxs(nh,{className:gt.clsx(vl.TotalFileSize,"NoSelect"),children:["(",k.jsx("span",{className:gt.clsx(Z&&vl.ErrorColor),children:Mg(Fe)})," / ",Mg(y),")"]})}),k.jsx(N.Activity,{mode:Tt?"hidden":"visible",children:k.jsx(bl,{style:{gap:4,alignItems:"center"},children:k.jsx("span",{children:It,style:{opacity:se?.6:1},className:gt.clsx(vl.LabelButton,"Label1",(ot||se)&&vl.Disabled,ct&&vl.Delete),onClick:!ot&&!se?ye:void 0})})}),k.jsx(N.Activity,{mode:l?"visible":"hidden",children:k.jsx("span",{children:H["Download List"]||"Download List",className:gt.clsx(vl.LabelButton,"Label1",!(V!=null&&V.length)&&vl.Disabled),style:{marginLeft:"auto",opacity:V!=null&&V.length?1:.6},onClick:V!=null&&V.length?dn:void 0})})]})},[u,H,rn,Kt,V,B.label,Z,Fe,y,ot,l,dn,Ge]);return u!=="Upload"&&!(V!=null&&V.length)?null:k.jsxs(lg,{wrapId:Y,wrapProps:z,labelProps:W,...B,label:Yt,children:[k.jsx("input",{ref:be,multiple:!0,accept:t||"",style:{display:"none"},type:"file",onChange:Nt}),k.jsxs(Gi,{...ee,className:gt.clsx(vl.AFileUploader,R),children:[k.jsxs(bl,{className:vl.ChipsContainer,children:[k.jsx(N.Activity,{mode:u==="Upload"?"visible":"hidden",children:Pt()}),V==null?void 0:V.map(vn)]}),k.jsx(N.Activity,{mode:u==="Upload"?"visible":"hidden",children:k.jsx(Gi,{abaseRef:le,className:gt.clsx(vl.DropIdle,"Title1","NoSelect"),style:{color:re?"var(--AFileUploader_brand_color)":"var(--AFileUploader_disabled_color)",opacity:re?1:.4},onPaste:wn,...zt,onClick:ct=>ct.preventDefault(),children:k.jsx(N.Activity,{mode:V!=null&&V.length?"hidden":"visible",children:k.jsxs(bl,{style:{gap:4},children:[k.jsx(ho,{icon:"FileDownload",size:"2xl"}),k.jsx("span",{children:H["Drop file to select"]})]})})})})]})]})},d9="_AFloatMenu_xco8u_1",h9="_Content_xco8u_10",J2={AFloatMenu:d9,Content:h9},H3=n=>{const e=Dn.c(67),{defs:t,defaultDef:r,actionRef:i,offset:o,onClose:l,onClick:a,onPaperClick:u,position:h,width:y}=n,x=h===void 0?L1.ES:h,w=y===void 0?137:y;let _;e[0]!==r?(_={content:g9,...r},e[0]=r,e[1]=_):_=e[1];const S=_;let R;e[2]!==S||e[3]!==t?(R={},er.keys(t).forEach(Xe=>{const lt=t[Xe],Ye={...S,...lt};Ye.noDisplay||(R[Xe]=Ye)}),e[2]=S,e[3]=t,e[4]=R):R=e[4];const I=R,[O,P]=N.useState(null);let Y;e[5]!==o||e[6]!==x?(Y=Xe=>{KC(Xe,V,x,o),P(Xe)},e[5]=o,e[6]=x,e[7]=Y):Y=e[7];const z=Y,[W,B]=N.useState(!1),[ee,H]=N.useState(!1),V=N.useRef(null);let de;e[8]!==z?(de=Xe=>{H(!0),setTimeout(()=>B(!0),0),setTimeout(()=>z(Xe),0)},e[8]=z,e[9]=de):de=e[9];const Z=de;let te;e[10]!==l?(te=()=>{B(!1),H(!0),l==null||l()},e[10]=l,e[11]=te):te=e[11];const ne=te;let fe;e[12]===Symbol.for("react.memo_cache_sentinel")?(fe=()=>H(!1),e[12]=fe):fe=e[12];const ae=fe;let j;e[13]!==ne||e[14]!==u?(j=async Xe=>{const lt=document.getElementById("root"),Ye=Xe.target,mt=V.current;!lt||!mt||!Ye||!mt.contains(Ye)&<.contains(Ye)&&(await(u==null?void 0:u(Xe)),ne())},e[13]=ne,e[14]=u,e[15]=j):j=e[15];const re=j;let he,be;e[16]!==W||e[17]!==re?(he=()=>{if(W)return setTimeout(()=>document.addEventListener("mousedown",re),0),()=>document.removeEventListener("mousedown",re)},be=[W,re],e[16]=W,e[17]=re,e[18]=he,e[19]=be):(he=e[18],be=e[19]),N.useEffect(he,be);let le;e[20]!==z||e[21]!==O?(le=()=>{O&&z(O)},e[20]=z,e[21]=O,e[22]=le):le=e[22];const J=le;let pe,Te;e[23]!==W||e[24]!==O||e[25]!==J?(pe=()=>{if(!W||!O)return;let Xe=O.parentElement;for(;Xe;)Xe.addEventListener("scroll",J),Xe=Xe.parentElement;return()=>{let lt=O.parentElement;for(;lt;)lt.removeEventListener("scroll",J),lt=lt.parentElement}},Te=[O,W,J],e[23]=W,e[24]=O,e[25]=J,e[26]=pe,e[27]=Te):(pe=e[26],Te=e[27]),N.useEffect(pe,Te);let Fe,_e;e[28]!==W||e[29]!==J?(Fe=()=>{if(W)return window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)},_e=[W,J],e[28]=W,e[29]=J,e[30]=Fe,e[31]=_e):(Fe=e[30],_e=e[31]),N.useEffect(Fe,_e);let Me;e[32]!==ne?(Me=Xe=>{Xe[0].intersectionRatio===0&&ne()},e[32]=ne,e[33]=Me):Me=e[33];const De=Me;let Re;e[34]!==W||e[35]!==De?(Re=()=>{if(!W)return;const Xe=new IntersectionObserver(De,{threshold:0});return V.current&&Xe.observe(V.current),()=>Xe.disconnect()},e[34]=W,e[35]=De,e[36]=Re):Re=e[36];let Le;e[37]!==W||e[38]!==De?(Le=[V,W,De],e[37]=W,e[38]=De,e[39]=Le):Le=e[39],N.useEffect(Re,Le);let Oe,Ge;e[40]!==i||e[41]!==ne||e[42]!==Z?(Oe=()=>{i&&(i.current={open:Z,close:ne})},Ge=[i,Z,ne],e[40]=i,e[41]=ne,e[42]=Z,e[43]=Oe,e[44]=Ge):(Oe=e[43],Ge=e[44]),N.useEffect(Oe,Ge);let Ve;e[45]!==ne||e[46]!==I||e[47]!==a||e[48]!==W?(Ve=Xe=>{var lt;if(W){if((lt=I[Xe])!=null&<.isDisabled)return}else return;a==null||a(Xe),ne()},e[45]=ne,e[46]=I,e[47]=a,e[48]=W,e[49]=Ve):Ve=e[49];const Pe=Ve;if(!W&&!ee)return null;let ot;if(e[50]!==S||e[51]!==I||e[52]!==W||e[53]!==Pe||e[54]!==w){const Xe=+W,lt=W&&Object.keys(I).length>0?"visible":"hidden";let Ye;e[56]!==Xe||e[57]!==lt||e[58]!==w?(Ye={opacity:Xe,visibility:lt,minWidth:w},e[56]=Xe,e[57]=lt,e[58]=w,e[59]=Ye):Ye=e[59];let mt;e[60]!==S||e[61]!==I||e[62]!==Pe?(mt=er.map(I,(Mt,Nt)=>{const[_t]=Mt,rn={...S,...I[_t]};let{content:pn,noDisplay:Kt,tooltipDirection:dn,...zt}=rn;const wn=dn===void 0?oc.E:dn;return Kt?null:(pn=Zr.getContent(rn.content,{defKey:_t,def:rn}),N.createElement(Gi,{...zt,key:Nt,className:gt.clsx(J2.Content,"Label2","IsClickable",zt.className),tooltipDirection:wn,onClick:$t=>{var vn;Pe==null||Pe(_t),(vn=zt.onClick)==null||vn.call(zt,$t)}},pn))}),e[60]=S,e[61]=I,e[62]=Pe,e[63]=mt):mt=e[63];let bt;e[64]!==Ye||e[65]!==mt?(bt=k.jsx("div",{ref:V,className:J2.AFloatMenu,style:Ye,onTransitionEnd:ae,children:mt}),e[64]=Ye,e[65]=mt,e[66]=bt):bt=e[66],ot=su.createPortal(bt,document.body),e[50]=S,e[51]=I,e[52]=W,e[53]=Pe,e[54]=w,e[55]=ot}else ot=e[55];return ot},g9=n=>n.defKey;function p9(n){try{const e=Number.parseInt(n);return isNaN(e)?void 0:e}catch{return}}const U0={parseInt:p9},v9=`${Number.MAX_SAFE_INTEGER}`.length-1,b9=n=>{const e=Dn.c(58);let t,r,i,o,l,a,u,h,y,x,w,_,S;if(e[0]!==n){const{unit:Re,unitMargin:Le,unitOptions:Oe,useSelectUnit:Ge,type:Ve,min:Pe,max:ot,unitSelectWidth:Xe,unitOptionsRenderer:lt,useValue:Ye,onEnterPress:mt,canAsterisk:bt,onFocus:Mt,...Nt}=n;h=Re,l=Le,y=Oe,_=Ge,a=Ve,o=Pe,i=ot,w=Xe,x=lt,S=Ye,r=mt,u=bt,t=Nt,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13];const R=l===void 0?4:l,I=a===void 0?"Secondary":a,O=i!==void 0&&o!==void 0?Math.max(`${i}`.length+1,`${o}`.length+1):v9,[P,Y]=Ho(S,""),[z,W]=N.useState(!1),[B,ee]=N.useState(""),H=N.useRef(null);let V;e:{if(!P||!Y){V=String(P);break e}const Re=String(P),Le=U0.parseInt(Re);if(Le!==void 0){if(o!==void 0&&Le<o){const Oe=`${o}`;Y(Oe),V=Oe;break e}if(i!==void 0&&Le>i){const Oe=`${i}`;Y(Oe),V=Oe;break e}}V=Re}const de=V;let Z;e[14]!==z||e[15]!==i||e[16]!==Y?(Z=Re=>{if(z){if(i!==void 0&&Re!==""){const Le=U0.parseInt(Re);if(Le!==void 0&&Le>i){ee(`${i}`);return}}ee(Re)}else Y&&Y(Re)},e[14]=z,e[15]=i,e[16]=Y,e[17]=Z):Z=e[17];const te=Z;let ne;e[18]!==de?(ne=()=>{W(!0),ee(de)},e[18]=de,e[19]=ne):ne=e[19];const fe=ne;let ae;e[20]!==i||e[21]!==o||e[22]!==Y?(ae=Re=>{if(W(!1),!Y)return;const Le=Re.target.value;let Oe=Le;if(Le===""||Le==="-")Oe=o!==void 0?`${o}`:Le;else{const Ge=U0.parseInt(Le);Ge===void 0?Oe=o!==void 0?`${o}`:Le:o!==void 0&&Ge<o?Oe=`${o}`:i!==void 0&&Ge>i&&(Oe=`${i}`)}Oe!==Le&&(Re.target.value=Oe),Y(Oe)},e[20]=i,e[21]=o,e[22]=Y,e[23]=ae):ae=e[23];const j=ae;let re;e[24]!==r?(re=Re=>{var Le;(Le=H.current)==null||Le.blur(),r==null||r(Re)},e[24]=r,e[25]=re):re=e[25];const he=re,be=o===void 0&&i===void 0?h??"number":`${o??""}~${i??""}`,[le,J]=Ho(_,(y==null?void 0:y[0])??"");let pe;if(y){const Re=w||"fit-content";let Le;e[26]!==Re?(Le={maxWidth:Re},e[26]=Re,e[27]=Le):Le=e[27];let Oe;e[28]!==J||e[29]!==le?(Oe=[le,J],e[28]=J,e[29]=le,e[30]=Oe):Oe=e[30];let Ge;e[31]!==R?(Ge={style:{color:"var(--label-normal)",marginLeft:4,marginRight:R}},e[31]=R,e[32]=Ge):Ge=e[32];let Ve;e[33]!==Le||e[34]!==Oe||e[35]!==Ge||e[36]!==y||e[37]!==x?(Ve=k.jsx(Ah,{className:ou.ANumInputUnitSelect,OptionRenderer:x,options:y,style:Le,type:"Raw",useSelect:Oe,arrowProps:Ge}),e[33]=Le,e[34]=Oe,e[35]=Ge,e[36]=y,e[37]=x,e[38]=Ve):Ve=e[38],pe=Ve}else{let Re;e[39]!==h||e[40]!==R?(Re=h&&k.jsx("span",{style:{marginRight:R},children:h}),e[39]=h,e[40]=R,e[41]=Re):Re=e[41],pe=Re}const Te=pe;let Fe;e[42]!==n.className?(Fe=gt.clsx(ou.ANumInput,n.className),e[42]=n.className,e[43]=Fe):Fe=e[43];const _e=z?B:de;let Me;e[44]!==te||e[45]!==_e?(Me=[_e,te],e[44]=te,e[45]=_e,e[46]=Me):Me=e[46];let De;return e[47]!==t||e[48]!==O||e[49]!==j||e[50]!==he||e[51]!==fe||e[52]!==be||e[53]!==Me||e[54]!==Fe||e[55]!==I||e[56]!==Te?(De=k.jsx(sg,{...t,autoComplete:"off",className:Fe,inputRef:H,maxLength:O,placeholder:be,RightAddon:Te,type:I,useValue:Me,onBlur:j,onEnterPress:he,onFocus:fe}),e[47]=t,e[48]=O,e[49]=j,e[50]=he,e[51]=fe,e[52]=be,e[53]=Me,e[54]=Fe,e[55]=I,e[56]=Te,e[57]=De):De=e[57],De},y9="_AListView_1nv5l_1",m9="_Row_1nv5l_10",x9="_Label_1nv5l_19",w9="_Content_1nv5l_29",f0={AListView:y9,Row:m9,Label:x9,Content:w9},C9=n=>{const e=Dn.c(50);let t,r,i,o,l,a,u,h,y,x,w,_,S,R,I,O,P,Y,z;if(e[0]!==n){const{defs:H,defaultDef:V,item:de,rowHeight:Z,labelWidth:te,noBorder:ne,onlyMiddleBorder:fe,rowGap:ae,middleBorder:j,rowBottomBorder:re,outerBorder:he,style:be,labelClassName:le,contentClassName:J,labelStyle:pe,contentStyle:Te,isPending:Fe,..._e}=n;h=de,O=Z,w=te,I=ae,P=be,y=le,i=J,x=pe,o=Te,u=Fe,S=ne||fe,r=S?"":re||"var(--AListView_border-thin)",R=S?"":he||"var(--AListView_border-thick)",_=ne?"":j||"var(--AListView_border-thick)";let Me;e[20]!==V?(Me={content:S9,label:_9,...V},e[20]=V,e[21]=Me):Me=e[21],l=Me;let De;e[22]!==l||e[23]!==H?(De={},er.keys(H).forEach(Re=>{const Le=H[Re],Oe={...l,...Le};De[Re]=Oe}),e[22]=l,e[23]=H,e[24]=De):De=e[24],a=De,t=Gi,Y=_e,z=gt.clsx(f0.AListView,_e.className),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S,e[14]=R,e[15]=I,e[16]=O,e[17]=P,e[18]=Y,e[19]=z}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13],R=e[14],I=e[15],O=e[16],P=e[17],Y=e[18],z=e[19];let W;e[25]!==r||e[26]!==P?(W={...P,borderTop:r},e[25]=r,e[26]=P,e[27]=W):W=e[27];let B;e[28]!==r||e[29]!==i||e[30]!==o||e[31]!==l||e[32]!==a||e[33]!==u||e[34]!==h||e[35]!==y||e[36]!==x||e[37]!==w||e[38]!==_||e[39]!==S||e[40]!==R||e[41]!==I||e[42]!==O?(B=er.map(a,(H,V)=>{const[de]=H,Z={...l,...a[de]},te=Zr.getContent(Z.label,{defKey:de,item:h,def:Z}),ne=Zr.getContent(Z.content,{defKey:de,item:h||{[de]:""},def:Z}),fe=Zr.getContent(Z.bold||"label",{defKey:de,item:h,def:Z}),ae=Z.height??O,j=Z.height===void 0;return k.jsxs("div",{className:f0.Row,style:{minHeight:ae,...!j&&{height:ae,maxHeight:ae},borderBottom:r,marginTop:V===0?0:typeof I=="number"?`${I}px`:I},children:[k.jsx("div",{className:gt.clsx(f0.Label,"NoSelect",fe!=="content"&&"Bold",y),style:{width:w,minWidth:w,maxWidth:w,borderLeft:R,paddingLeft:S?0:10,...x},children:k.jsx(nh,{children:te})}),k.jsx("div",{className:gt.clsx(f0.Content,fe!=="label"&&"Bold",i),style:{borderLeft:_,borderRight:R,...o},children:k.jsx(nh,{isPending:u,style:{width:"100%",padding:S?0:10},children:u?null:ne})})]},de)}),e[28]=r,e[29]=i,e[30]=o,e[31]=l,e[32]=a,e[33]=u,e[34]=h,e[35]=y,e[36]=x,e[37]=w,e[38]=_,e[39]=S,e[40]=R,e[41]=I,e[42]=O,e[43]=B):B=e[43];let ee;return e[44]!==t||e[45]!==Y||e[46]!==z||e[47]!==W||e[48]!==B?(ee=k.jsx(t,{...Y,className:z,style:W,children:B}),e[44]=t,e[45]=Y,e[46]=z,e[47]=W,e[48]=B,e[49]=ee):ee=e[49],ee},_9=n=>n.defKey,S9=n=>{const{defKey:e,item:t}=n;if(t)if(er.hasKey(t,e)){const r=t[e];return er.isReactNode(r)?r:null}else return null;else return null},E9="_ALoadingBorder_kwc1g_1",A9="_ProgressBar_kwc1g_9",T9="_IsLoading_kwc1g_15",R9="_Cover_kwc1g_19",$1={ALoadingBorder:E9,ProgressBar:A9,IsLoading:T9,Cover:R9},Am=n=>{const e=Dn.c(15),{isLoading:t}=n,[r,i]=N.useState(!1),o=N.useRef(null);let l,a;e[0]!==t?(l=()=>{t?(i(!0),o.current&&clearTimeout(o.current)):o.current=setTimeout(()=>i(!1),300)},a=[t],e[0]=t,e[1]=l,e[2]=a):(l=e[1],a=e[2]),N.useEffect(l,a);let u;e[3]!==r?(u=gt.clsx($1.ProgressBar,r&&$1.IsLoading),e[3]=r,e[4]=u):u=e[4];let h;e[5]!==u?(h=k.jsx("div",{className:u}),e[5]=u,e[6]=h):h=e[6];let y;e[7]!==t?(y=gt.clsx($1.Cover,t&&$1.IsLoading),e[7]=t,e[8]=y):y=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x={transition:"all 300ms"},e[9]=x):x=e[9];let w;e[10]!==y?(w=k.jsx("div",{className:y,style:x}),e[10]=y,e[11]=w):w=e[11];let _;return e[12]!==h||e[13]!==w?(_=k.jsxs("div",{className:$1.ALoadingBorder,children:[h,w]}),e[12]=h,e[13]=w,e[14]=_):_=e[14],_},I9="_Container_ez8dc_1",k9="_Option_ez8dc_7",M9="_RadioButton_ez8dc_14",L9="_InnerCircle_ez8dc_24",O9="_isChecked_ez8dc_29",a1={Container:I9,Option:k9,RadioButton:M9,InnerCircle:L9,isChecked:O9},P9=n=>{const{options:e,useSelect:t,selectDisabled:r,radius:i=23,innerRadius:o=i*.6,OptionRenderer:l=W3}=n,[a,u]=Ho(t,e[0]);return k.jsx("div",{className:a1.Container,children:e.map((h,y)=>{const x=r==null?void 0:r(h),w=()=>x?null:u==null?void 0:u(h);return k.jsxs(bl,{className:gt.clsx(a1.Option,"IsClickable"),isDisabled:x,onClick:w,children:[k.jsx(D9,{innerRadius:o,isChecked:a===h,radius:i},y),k.jsx(l,{option:h})]},y)})})},W3=({option:n})=>n,D9=n=>{const e=Dn.c(15),{isChecked:t,radius:r,innerRadius:i}=n;let o;e[0]!==t?(o=gt.clsx(a1.RadioButton,t&&a1.isChecked),e[0]=t,e[1]=o):o=e[1];let l;e[2]!==r?(l={width:r,height:r},e[2]=r,e[3]=l):l=e[3];let a;e[4]!==t?(a=gt.clsx(a1.InnerCircle,t&&a1.isChecked),e[4]=t,e[5]=a):a=e[5];let u;e[6]!==i?(u={width:i,height:i},e[6]=i,e[7]=u):u=e[7];let h;e[8]!==a||e[9]!==u?(h=k.jsx(Gi,{className:a,style:u}),e[8]=a,e[9]=u,e[10]=h):h=e[10];let y;return e[11]!==o||e[12]!==l||e[13]!==h?(y=k.jsx(Gi,{className:o,style:l,children:h}),e[11]=o,e[12]=l,e[13]=h,e[14]=y):y=e[14],y},N9="_AMultiSelect_19uuu_1",F9="_Arrow_19uuu_15",B9="_Primary_19uuu_24",z9="_UnAvailable_19uuu_35",H9="_IsOpen_19uuu_35",W9="_Secondary_19uuu_42",U9="_Placeholder_19uuu_58",G9="_ValuesContainer_19uuu_63",Y9="_Values_19uuu_63",V9="_Options_19uuu_82",Z9="_Option_19uuu_82",X9="_Selected_19uuu_124",K9="_CheckBox_19uuu_131",sf={AMultiSelect:N9,Arrow:F9,Primary:B9,UnAvailable:z9,IsOpen:H9,Secondary:W9,Placeholder:U9,ValuesContainer:G9,Values:Y9,Options:V9,Option:Z9,Selected:X9,CheckBox:K9},J9=n=>{const{options:e,useSelect:t,type:r="Primary",placeholder:i=Nr.AMultiSelect["Select(Placeholder)"],onClose:o,SelectedRenderer:l=q9,OptionRenderer:a=j9,minShowRows:u=2,maxShowRows:h=6,arrowProps:y,isAutoWidth:x=!1,...w}=n,_=N.useRef(null),S=N.useMemo(()=>w.abaseRef??_,[w.abaseRef]),R=N.useRef(null),[I,O]=Ho(t,[]),[P,Y]=N.useState(void 0),z=N.useRef(e),W=N.useRef(null),[B,ee]=N.useState(!1),[H,V]=N.useState(!1),de=N.useCallback(()=>V(!1),[]),Z=N.useCallback(()=>{w.isDisabled||w.isLoading||e.length<1||(V(!0),setTimeout(()=>ee(!0),0),setTimeout(()=>ob(R,S,e,u,h),0))},[S,w.isDisabled,w.isLoading,e,u,h]),te=N.useCallback(()=>{ee(!1),V(!0),o==null||o()},[o]),ne=N.useCallback(le=>{var J;B?te():Z(),setTimeout(()=>ob(R,S,e,u,h),0),(J=w.onClick)==null||J.call(w,le)},[S,w,e,B,te,Z,u,h]),fe=N.useCallback(()=>{ob(R,S,e,u,h)},[S,e,u,h]);N.useEffect(()=>{if(!B||!S.current)return;const le=S.current;let J=le.parentElement;for(;J;)J.addEventListener("scroll",fe),J=J.parentElement;return()=>{let pe=le.parentElement;for(;pe;)pe.removeEventListener("scroll",fe),pe=pe.parentElement}},[S,B,fe]),N.useEffect(()=>{if(B)return window.addEventListener("resize",fe),()=>window.removeEventListener("resize",fe)},[B,fe]);const ae=N.useCallback(le=>{le[0].intersectionRatio===0&&te()},[te]);N.useEffect(()=>{if(!B)return;const le=new IntersectionObserver(ae,{threshold:0});return S.current&&le.observe(S.current),()=>le.disconnect()},[S,B,ae]);const j=N.useCallback(le=>{const J=le.target,pe=S.current,Te=R.current;!pe||!J||!Te||!pe.contains(J)&&!Te.contains(J)&&te()},[S,te]),re=N.useMemo(()=>w.isDisabled||w.isLoading||e.length<1,[w.isDisabled,w.isLoading,e]);N.useEffect(()=>{if(B)return setTimeout(()=>document.addEventListener("mousedown",j),0),()=>document.removeEventListener("mousedown",j)},[B,j]);const he=N.useCallback((le,J)=>{le.stopPropagation(),le.preventDefault();let pe=[...I];pe.includes(J)?pe=pe.filter(Te=>Te!==J):pe.push(J),O==null||O(pe)},[I,O]),be=N.useCallback(()=>{if(!x||!S.current)return;const le=kg.calculateOptimalSelectWidth({elementRef:S,options:e,selectedOptions:I,placeholder:i,optionRenderer:J=>a({option:J}),type:r,isMulti:!0});Y(le)},[x,S,e,I,i,a,r]);return N.useEffect(()=>x?((e!==z.current||P===void 0)&&(W.current!==null&&cancelAnimationFrame(W.current),W.current=requestAnimationFrame(()=>{be(),W.current=null,z.current=[...e]})),()=>{W.current!==null&&(cancelAnimationFrame(W.current),W.current=null)}):void 0,[x,e,be,P]),N.useEffect(()=>()=>{typeof kg.clearCache=="function"&&kg.clearCache()},[]),k.jsxs(k.Fragment,{children:[k.jsxs(Gi,{...w,abaseRef:S,isDisabled:w.isDisabled||e.length<1,className:gt.clsx(w.className,sf.AMultiSelect,"NoSelect",B&&sf.IsOpen,re&&sf.UnAvailable,sf[r]),style:{padding:r==="Secondary"?"8px 8px 8px 0":0,width:P?`${P}px`:x?"100px":void 0,...w.style},onClick:ne,children:[k.jsx("div",{className:sf.ValuesContainer,children:k.jsx("div",{className:gt.clsx(sf.Values,I.length<1&&sf.Placeholder),children:k.jsx(l,{OptionRenderer:a,placeholder:i,selectedOptions:I})})}),k.jsx("div",{...y,className:gt.clsx(sf.Arrow,y==null?void 0:y.className),children:k.jsx(ho,{icon:"TriangleDown",style:{transform:B?"rotate(180deg)":"",transition:"var(--Transition)"}})})]}),e.length>0&&(B||H)&&su.createPortal(k.jsx("div",{ref:R,className:gt.clsx(sf.Options,sf[r]),style:{opacity:+B,visibility:B?"visible":"hidden",pointerEvents:B?void 0:"none",width:P?`${P}px`:x?"100px":void 0,borderRadius:S.current?window.getComputedStyle(S.current).borderRadius:void 0},onTransitionEnd:de,children:e.map((le,J)=>{var Te;const pe=I.includes(le);return k.jsxs("div",{className:gt.clsx(sf.Option,pe&&sf.Selected,"NoSelect",sf[r]),style:{height:(Te=S.current)==null?void 0:Te.getBoundingClientRect().height},onClick:Fe=>he(Fe,le),children:[k.jsx(x1,{className:sf.CheckBox,useCheck:[+pe,void 0]}),k.jsx(a,{option:le})]},J)})}),document.body)]})};function ob(n,e,t,r,i){if(!e.current||!n.current||!t||t.length<1)return;const o=e.current.getBoundingClientRect(),l=Q9(o,t.length,r,i),a=window.getComputedStyle(e.current);n.current.style.top=`calc(${l.top??0}px - ${a.borderTopWidth})`,n.current.style.bottom=l.bottom?l.bottom+"px":"",n.current.style.left=l.left+"px",n.current.style.width||(n.current.style.minWidth=l.minWidth+"px"),n.current.style.minHeight=l.minHeight+"px",n.current.style.maxHeight=l.maxHeight+"px",n.current.style.visibility="visible"}function Q9(n,e,t,r){const i={top:n.bottom,bottom:void 0,left:n.left,height:"fit-content",minWidth:n.width,minHeight:n.height*Math.min(t,e),maxHeight:n.height*r>window.innerHeight-n.bottom-10?window.innerHeight-n.bottom-10:n.height*r};return window.innerHeight-n.bottom-10<i.height&&(window.innerHeight-n.bottom-10<i.minHeight?(i.top=n.top-e*n.height,i.top<0&&(i.top=10,i.minHeight=n.top-10,i.height=n.top-10)):i.height=window.innerHeight-n.bottom-10),i}const q9=n=>{const e=Dn.c(3),{OptionRenderer:t,selectedOptions:r,placeholder:i}=n;if(r.length<1)return i;if(r.length===1){let o;return e[0]!==t||e[1]!==r[0]?(o=k.jsx(t,{option:r[0]}),e[0]=t,e[1]=r[0],e[2]=o):o=e[2],o}else return`${r.length} selected`},j9=n=>{const{option:e}=n;return er.isReactNode(e)?e:null},$9="_Container_10ion_1",eI="_Steps_10ion_9",tI="_Step_10ion_9",nI="_OutCircle_10ion_26",rI="_IsOver_10ion_37",iI="_InCircle_10ion_41",oI="_Line_10ion_54",lI="_Left_10ion_66",sI="_Right_10ion_69",aI="_ContentContainer_10ion_73",cI="_Content_10ion_73",ku={Container:$9,Steps:eI,Step:tI,OutCircle:nI,IsOver:rI,InCircle:iI,Line:oI,Left:lI,Right:sI,ContentContainer:aI,Content:cI},uI=n=>{const e=Dn.c(26),{useSelect:t,steps:r,StepRenderer:i,ContentRenderer:o}=n,l=i===void 0?Q2:i,a=o===void 0?Q2:o;if(r.length===0)throw new Error("steps should have at least one element");const u=N.useRef(null),[h,y]=Ho(t,r[0]);let x;e[0]!==y?(x=W=>y==null?void 0:y(W),e[0]=y,e[1]=x):x=e[1];const w=x,_=r.indexOf(h);let S;e[2]!==_||e[3]!==w||e[4]!==r[0]?(S=()=>{_<0&&w(r[0])},e[2]=_,e[3]=w,e[4]=r[0],e[5]=S):S=e[5];let R;e[6]!==_||e[7]!==w||e[8]!==r?(R=[_,r,w],e[6]=_,e[7]=w,e[8]=r,e[9]=R):R=e[9],N.useEffect(S,R);let I;e[10]!==l||e[11]!==_||e[12]!==w||e[13]!==r?(I=r.map((W,B)=>{const ee=r.indexOf(W),H=_>=B,V=_>B;return k.jsxs("div",{className:ku.Step,children:[B!==0&&k.jsx("div",{className:gt.clsx(ku.Line,ku.Left,H&&ku.IsOver)}),B!==r.length-1&&k.jsx("div",{className:gt.clsx(ku.Line,ku.Right,V&&ku.IsOver)}),k.jsx(Ic,{className:gt.clsx(ku.OutCircle,H&&ku.IsOver),type:"Raw",onClick:()=>w(W),children:k.jsx("div",{className:gt.clsx(ku.InCircle,H&&ku.IsOver)})}),k.jsx(l,{step:W,stepIdx:ee})]},B)}),e[10]=l,e[11]=_,e[12]=w,e[13]=r,e[14]=I):I=e[14];let O;e[15]!==I?(O=k.jsx("div",{className:ku.Steps,children:I}),e[15]=I,e[16]=O):O=e[16];let P;e[17]!==a||e[18]!==_||e[19]!==r?(P=r.map((W,B)=>{const ee=r.indexOf(W);return k.jsx("div",{className:ku.Content,style:B===0?{marginLeft:`${_*-100}%`}:{},children:k.jsx(a,{step:W,stepIdx:ee})},B)}),e[17]=a,e[18]=_,e[19]=r,e[20]=P):P=e[20];let Y;e[21]!==P?(Y=k.jsx("div",{ref:u,className:ku.ContentContainer,children:P}),e[21]=P,e[22]=Y):Y=e[22];let z;return e[23]!==O||e[24]!==Y?(z=k.jsxs("div",{className:ku.Container,children:[O,Y]}),e[23]=O,e[24]=Y,e[25]=z):z=e[25],z},Q2=n=>{const{step:e}=n;return typeof e=="object"?er.stringify(e):e},fI="_ATab_9eg6z_1",dI="_Addon_9eg6z_9",hI="_Option_9eg6z_14",gI="_Underline_9eg6z_26",pI="_IsSelected_9eg6z_26",vI="_IndicatorTrack_9eg6z_37",bI="_Indicator_9eg6z_37",yI="_Primary_9eg6z_54",mI="_Secondary_9eg6z_57",xI="_IsDisabled_9eg6z_63",wI="_Tertiary_9eg6z_77",CI="_Quaternary_9eg6z_101",Xd={ATab:fI,Addon:dI,Option:hI,Underline:gI,IsSelected:pI,IndicatorTrack:vI,Indicator:bI,Primary:yI,Secondary:mI,IsDisabled:xI,Tertiary:wI,Quaternary:CI},_I=["Primary","Secondary","Tertiary","Quaternary"],U3=n=>{const{options:e,useSelect:t,selectDisabled:r,type:i="Primary",tabProps:o,optionProps:l,optionWidth:a,OptionRenderer:u=SI,RightAddon:h,LeftAddon:y,color:x,selectedColor:w,underline:_,indicatorProps:S,indicatorTrackProps:R,height:I=40}=n;if(e.length===0)throw new Error("options should have at least one element");const O=N.useMemo(()=>e.findIndex(De=>!(r!=null&&r(De))),[e,r]),P=i==="Tertiary",Y=i==="Secondary",z=P?I*.1:0,W=Y?8:0,B=N.useMemo(()=>z+W,[z,W]),ee=N.useMemo(()=>(W-z)/e.length,[e.length,z,W]),[H,V]=Ho(t,e[O]),de=N.useRef([]),Z=N.useCallback(De=>V==null?void 0:V(De),[V]),te=N.useMemo(()=>typeof a=="number"?a+"px":a,[a]),ne=N.useMemo(()=>e.indexOf(H),[e,H]),fe=N.useMemo(()=>`calc(${100/e.length}% + ${ee}px)`,[e.length,ee]),ae=N.useMemo(()=>te||`calc(${fe} - ${B}px)`,[fe,B,te]),[j,re]=N.useState(0),[he,be]=N.useState(0),[le,J]=N.useState(ae),pe=N.useRef(null),Te=N.useRef(null),Fe=XC(Te,pe),_e=N.useMemo(()=>{let De;switch(te){case void 0:De=`calc(${fe} * ${ne})`;break;case"fit-content":De=`calc(${j}px)`;break;default:De=`calc((${te} + ${B}px) * ${ne})`;break}return De},[te,fe,ne,j,B]),Me=N.useMemo(()=>{switch(te){case void 0:return;case"fit-content":return`calc(${he}px)`;default:return`calc((${te} + ${B}px - ${ee}px) * ${e.length})`}},[te,ee,B,e,he]);return N.useEffect(()=>{var Re,Le;if(e.includes(H)||V==null||V(e[O]),te!=="fit-content"){J(ae);return}let De=0;de.current.forEach((Oe,Ge)=>{Ge<ne&&Oe.current&&(De+=Oe.current.offsetWidth+B)}),re(De),J(`calc(${((Le=(Re=de.current[ne])==null?void 0:Re.current)==null?void 0:Le.offsetWidth)||0}px)`),be(de.current.reduce((Oe,Ge)=>{var Ve;return Oe+((((Ve=Ge.current)==null?void 0:Ve.offsetWidth)||0)+B-ee)},0))},[te,de,e,H,V,O,ee,B,ne,ae]),k.jsxs("div",{ref:pe,...o,className:gt.clsx(Xd.ATab,"Headline2",Xd[i],o==null?void 0:o.className),style:{minHeight:I,height:I,maxHeight:I},children:[y&&k.jsx("div",{ref:Te,className:Xd.Addon,children:y}),k.jsx("div",{...S,className:gt.clsx(Xd.Indicator,S==null?void 0:S.className),style:{minWidth:le,left:_e,marginLeft:z,transform:`translate(${Fe??0}px, ${P?"-50%":"0"})`,height:P?I-z*2:void 0,...S==null?void 0:S.style}}),k.jsx("div",{...R,className:gt.clsx(Xd.IndicatorTrack,R==null?void 0:R.className),style:{width:Me,marginLeft:P?Fe:0,height:I,...R==null?void 0:R.style}}),e.map((De,Re)=>{const Le=r==null?void 0:r(De);return de.current[Re]||(de.current[Re]=N.createRef()),k.jsx(Gi,{abaseRef:de.current[Re],...l,isDisabled:Le,className:gt.clsx(Xd.Option,Le&&Xd.IsDiabled,De===H&&Xd.IsSelected,"IsClickable",_&&Xd.Underline,l==null?void 0:l.className),style:{minWidth:ae,maxWidth:ae,marginLeft:z,marginRight:W,"--color":De===H&&w||x,height:I,...l==null?void 0:l.style},onClick:Oe=>{!Le&&Z(De),l&&l.onClick&&l.onClick(Oe)},children:k.jsx(u,{option:De})},Re)}),k.jsx(cs,{w:z}),h&&k.jsxs(k.Fragment,{children:[k.jsx(zg,{}),k.jsx("div",{className:Xd.Addon,children:h})]})]})},SI=n=>{const{option:e}=n;if(typeof e=="string")return e;if(typeof e=="number")return e;if(typeof e=="object"){if(e===null)return"";const t=er.keys(e);return"name"in t?e.name:"label"in t?e.label:"value"in t?e.value:JSON.stringify(e)}else return JSON.stringify(e)};function G3(...n){const e=Dn.c(3),t=n,r=N.useRef(!1);let i,o;e[0]!==t?(i=()=>{r.current||(r.current=!0,t.forEach(EI))},o=[t],e[0]=t,e[1]=i,e[2]=o):(i=e[1],o=e[2]),N.useEffect(i,o)}function EI(n){return n()}const Y3={String:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;if(t==="")return er.keys(e).some(y=>{const x=e[y],w=Zr.getContent(x.asText,{defKey:y,def:x,item:n});if(w!==void 0)return w.toString().toLowerCase().includes(i.toLowerCase());const _=Zr.getContent(x.content,{defKey:y,def:x,item:n});return["string","number"].includes(typeof _)&&_!==void 0&&_!==null?_.toString().toLowerCase().includes(i.toLowerCase()):!1});const o=er.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Zr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0)return u.toString().toLowerCase().includes(i.toLowerCase());const h=Zr.getContent(a.content,{defKey:l,def:a,item:n});return["string","number"].includes(typeof h)&&h!==void 0&&h!==null?h.toString().toLowerCase().includes(i.toLowerCase()):!1},Select:(n,e,t,r)=>{const{value:i}=r;if(i==null)return!1;const o=er.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Zr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0)return i.toString().toLowerCase()===u.toString().toLowerCase();const h=Zr.getContent(a.content,{defKey:l,def:a,item:n});return["string","number"].includes(typeof h)&&h!==void 0&&h!==null?i.toString().toLowerCase()===h.toString().toLowerCase():!1},Date:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;const o=er.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Zr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0){const y=Yn.toDate(u.toString());return y&&Yn.eq(y,i)}const h=Zr.getContent(a.content,{defKey:l,def:a,item:n});if(["string","number"].includes(typeof h)&&h!==void 0&&h!==null){const y=Yn.toDate(h.toString());return y&&Yn.eq(y,i)}return!1},DateRange:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;const o=er.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Zr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0){const y=Yn.toDate(u.toString());return y&&Yn.be(i.sDate,y,i.eDate)}const h=Zr.getContent(a.content,{defKey:l,def:a,item:n});if(["string","number"].includes(typeof h)&&h!==void 0&&h!==null){const y=Yn.toDate(h.toString());return y&&Yn.be(i.sDate,y,i.eDate)}return!1}},AI=(n,e,t)=>{let r=n;return er.keys(t).forEach(o=>{const l=t[o];l.value===void 0||l.value===null||l.value===""||(r=r.filter(a=>{var u;return(u=l.predicate??Y3[l.type])==null?void 0:u(a,e,o,l)}))}),r},TI=(n,e,t)=>{if(!t)return n;const r=t.defKey,i=e[r];if(r===void 0)return n;const o=t.sortF??((l,a)=>{const u=Zr.getContent(i.content,{defKey:r,def:i,item:l}),h=Zr.getContent(i.content,{defKey:r,def:i,item:a});return typeof u=="string"&&typeof h=="string"?u<h?-1:u>h?1:0:typeof u=="number"&&typeof h=="number"?u-h:typeof u=="string"&&typeof h=="number"?-1:typeof u=="number"&&typeof h=="string"||u===void 0&&h!==void 0?1:u!==void 0&&h===void 0?-1:0});return typeof o=="function"&&o.length>=3?n.slice().sort((l,a)=>o(l,a,t.isAsc)):n.slice().sort((l,a)=>{const u=o(l,a);return t.isAsc?u:-u})},RI=(n,e,t)=>n.slice((e-1)*t,e*t),V3=(n,e)=>{const t=Math.max(Math.ceil(n/e),1);return Array.from({length:t},(r,i)=>i+1)},II=(n,e,t,r)=>{const i=V3(e,t),o=Math.floor((n-1)/r),l=o*r+1,a=(o+1)*r,u=i.slice(l-1,a);return{pages:i,rangedPages:u}},kI=(n,e,t)=>{const r=[],i=Object.keys(t),o=[];i.forEach(w=>{const _=t[w],S=Zr.getContent(_.hContent,{defKey:w,def:_});if(S!==void 0){if(typeof S=="string"){o.push(S);return}else if(typeof S=="number"){o.push(S.toString());return}}const R=Zr.getContent(_.name,{defKey:w,def:_});if(R!==void 0&&typeof R=="string"){o.push(R);return}o.push(w)});const l=o.map(w=>`"${w.replaceAll('"','""')}"`);r.push(l.join(",")),e.forEach(w=>{const _=[];i.forEach(R=>{const I=t[R],O=Zr.getContent(I.content,{defKey:R,def:I,item:w});if(O!==void 0){if(typeof O=="string"){_.push(O);return}else if(typeof O=="number"){_.push(O.toString());return}}const P=w[R];typeof P=="string"?_.push(P):typeof P=="number"?_.push(P.toString()):_.push("")});const S=_.map(R=>`"${R.replaceAll('"','""')}"`);r.push(S.join(","))});const a=`${n}.csv`,u="\uFEFF"+r.join(`
|
|
286
|
-
`),h=new Blob([u],{type:"text/csv;charset=UTF-8"}),y=URL.createObjectURL(h),x=document.createElement("a");x.href=y,x.download=a,x.click(),URL.revokeObjectURL(y)},MI=n=>{const e=er.keys(n);if(e.length!==1)return;const t=e[0];if(t!=="")return;const r=n[t];if(r.type==="String")return r.value},LI=n=>{const e=Object.entries(n);let t={};return e.forEach(([r,i])=>{!i||i.value===void 0||i.value===null||i.value===""||(i.type==="DateRange"?(t[i.sFilterKey]=i.value.sDate,t[i.eFilterKey]=i.value.eDate):t[i.filterKey??r]=i.value)}),t},OI=n=>{const e=er.keys(n).filter(i=>i!=="");if(e.length!==1)return;const t=e[0],r=n[t];return!r||r.value===void 0||r.value===null||r.value===""?{selectedKey:t,value:void 0}:{selectedKey:t,value:r.value}},_h={applyFilteration:AI,applySortation:TI,applyPagination:RI,getPages:V3,getRangedPages:II,downloadCsv:kI,getSingleFilterValue:MI,getMultiFilterValues:LI,getSelectFilterValue:OI},PI="_ATable_12zow_1",DI={ATable:PI};function Z3(n,e,t,r){const i=Dn.c(6);let o,l;i[0]!==e||i[1]!==n||i[2]!==t||i[3]!==r?(o=()=>{if(n)return n.addEventListener(e,t,r),()=>{n.removeEventListener(e,t,r)}},l=[n,e,t,r],i[0]=e,i[1]=n,i[2]=t,i[3]=r,i[4]=o,i[5]=l):(o=i[4],l=i[5]),N.useEffect(o,l)}const NI="_BodyHeader_ys4y0_1",FI="_TRow_ys4y0_7",BI="_OverflowSpace_ys4y0_11",zI="_BodyBody_ys4y0_16",HI="_IsSelected_ys4y0_35",WI="_IsSelectable_ys4y0_39",UI="_IsRowMarked_ys4y0_47",GI="_TH_ys4y0_52",YI="_TD_ys4y0_57",VI="_IsMarked_ys4y0_57",ZI="_Resizer_ys4y0_76",XI="_IsMoving_ys4y0_88",KI="_IsResizable_ys4y0_91",JI="_ResizerCenter_ys4y0_94",QI="_ResizerOut_ys4y0_100",qI="_ResizerIn_ys4y0_104",jI="_IsClicked_ys4y0_139",$I="_NoItems_ys4y0_146",ek="_Content_ys4y0_152",Zl={BodyHeader:NI,TRow:FI,OverflowSpace:BI,BodyBody:zI,IsSelected:HI,IsSelectable:WI,IsRowMarked:UI,TH:GI,TD:YI,IsMarked:VI,Resizer:ZI,IsMoving:XI,IsResizable:KI,ResizerCenter:JI,ResizerOut:QI,ResizerIn:qI,IsClicked:jI,NoItems:$I,Content:ek},jh=25,lb=50,tk=n=>{const e=Dn.c(119),{defs:t,isEqual:r,rProps:i,useSelect:o,isTableDisabled:l,isSelectMulti:a,selectDisabled:u,appliedFilteration:h,useSortation:y,pagination:x,pagedItems:w,noMarking:_,noDefHeader:S,isLoading:R,onScrollToSelectedReady:I,showRows:O,RowRenderer:P,isRowRendered:Y,rowHeight:z,resources:W}=n,B=P===void 0?ik:P;let ee;e[0]!==o?(ee=o??[],e[0]=o,e[1]=ee):ee=e[1];const[H,V]=ee;let de;e[2]!==r||e[3]!==a||e[4]!==l||e[5]!==u||e[6]!==H||e[7]!==V?(de=Se=>{l||!V||!H||u!=null&&u(Se)||(a?H.some(it=>r(it,Se))?V(H.filter(it=>!r(it,Se))):V([...H,Se]):V([Se]))},e[2]=r,e[3]=a,e[4]=l,e[5]=u,e[6]=H,e[7]=V,e[8]=de):de=e[8];const Z=de;let te,ne;e[9]!==a||e[10]!==H||e[11]!==V?(te=()=>{a||!H||!V||H.length>1&&V([H[H.length-1]])},ne=[H,V,a],e[9]=a,e[10]=H,e[11]=V,e[12]=te,e[13]=ne):(te=e[12],ne=e[13]),N.useEffect(te,ne);let fe,ae;e[14]!==u||e[15]!==H||e[16]!==V?(fe=()=>{if(!H||!V)return;H.filter(it=>u==null?void 0:u(it)).length>0&&V(H.filter(it=>!(u!=null&&u(it))))},ae=[H,V,u],e[14]=u,e[15]=H,e[16]=V,e[17]=fe,e[18]=ae):(fe=e[17],ae=e[18]),N.useEffect(fe,ae);const[j,re]=y;let he;e[19]!==re||e[20]!==j?(he=(Se,it)=>{re&&((j==null?void 0:j.defKey)===Se?j.isAsc===!0?re({defKey:Se,isAsc:!1,sortF:it}):j.isAsc===!1?re(void 0):re({defKey:Se,isAsc:!0,sortF:it}):re({defKey:Se,isAsc:!0,sortF:it}))},e[19]=re,e[20]=j,e[21]=he):he=e[21];const be=he;let le;e[22]===Symbol.for("react.memo_cache_sentinel")?(le={elem:null,row:null},e[22]=le):le=e[22];const[J,pe]=N.useState(le),Te=N.useRef(null),Fe=N.useRef(null);let _e;e[23]===Symbol.for("react.memo_cache_sentinel")?(_e=()=>pe({elem:Te.current,row:Fe.current}),e[23]=_e):_e=e[23];const Me=_e;let De;e[24]===Symbol.for("react.memo_cache_sentinel")?(De=()=>Me(),e[24]=De):De=e[24];let Re;e[25]!==w.length?(Re=[w.length,Me],e[25]=w.length,e[26]=Re):Re=e[26],N.useEffect(De,Re),Z3(window,"resize",Me);const[Le,Oe]=N.useState(z);let Ge;e[27]!==J?(Ge=()=>{const{row:Se}=J;Se!=null&&Oe(Se.clientHeight)},e[27]=J,e[28]=Ge):Ge=e[28];let Ve;e[29]!==J||e[30]!==Le?(Ve=[J,Le],e[29]=J,e[30]=Le,e[31]=Ve):Ve=e[31],N.useEffect(Ge,Ve);let Pe;e:{const{elem:Se}=J;if(!Se){Pe=0;break e}Pe=Math.floor(Se.clientHeight/Le)}const ot=Pe;let Xe;O?Xe=O:w.length<=ot?Xe=ot:Xe=w.length;const lt=Xe;let Ye;O===void 0?Ye=void 0:Ye=O*Le;const mt=Ye,bt=mt;let Mt;e:{const{elem:Se}=J;if(!Se){Mt=!1;break e}let it;e[32]!==Se?(it=Se.getBoundingClientRect(),e[32]=Se,e[33]=it):it=e[33],Mt=it.height/Le<w.length}const Nt=Mt,[_t,rn]=N.useState();let pn;const{elem:Kt}=J;!_t||!Kt?pn="100%":pn=Kt.clientHeight+(Y?0:50);const dn=pn,zt=N.useRef(null);let wn;e[34]===Symbol.for("react.memo_cache_sentinel")?(wn={},e[34]=wn):wn=e[34];const[$t,vn]=N.useState(wn);let Pt;e[35]===Symbol.for("react.memo_cache_sentinel")?(Pt={x:0,y:0},e[35]=Pt):Pt=e[35];const Yt=N.useRef(Pt);let ct;e[36]===Symbol.for("react.memo_cache_sentinel")?(ct={},e[36]=ct):ct=e[36];const Tt=N.useRef(ct);let It;e[37]!==$t?(It=er.keys($t),e[37]=$t,e[38]=It):It=e[38];const ye=It;let se;e[39]!==t?(se=(Se,it)=>{const St=zt.current;if(!St)return;const mn=[];St.childNodes.forEach(gr=>{gr.classList.contains(Zl.TH)&&mn.push(gr)});const An={};er.keys(t).forEach((gr,Sn)=>{const Qn=mn[Sn];if(!Qn)return;const xn=Qn.getBoundingClientRect().width;An[gr]=xn}),Tt.current=An,rn(it),Yt.current={x:Se.clientX,y:Se.clientY};const Gn=gr=>{if(!zt.current)return;const Qn=gr.clientX-Yt.current.x,xn=rk(t,it,Tt.current,Qn);vn(xn)};document.addEventListener("mousemove",Gn);const cr=()=>{rn(void 0),document.removeEventListener("mousemove",Gn),document.removeEventListener("mouseup",cr)};document.addEventListener("mouseup",cr)},e[39]=t,e[40]=se):se=e[40];const He=se;let We;e[41]===Symbol.for("react.memo_cache_sentinel")?(We=()=>{rn(void 0),vn({})},e[41]=We):We=e[41];const pt=We;let wt;e:{if(ye.length===0){let it;if(e[42]!==t){it={};const St=er.keys(t);for(let mn=0;mn<St.length;mn++){const An=St[mn],Gn=t[An],cr=Zr.getContent(Gn.colSpan,{defKey:An,def:Gn}),gr=Gn.width??80,Sn=Gn.minWidth??jh,Qn=Gn.maxWidth,xn={width:gr,minWidth:Sn,maxWidth:Qn,flexGrow:cr??1};if(it[An]=xn,cr!==void 0){for(let ur=1;ur<Math.min(cr,St.length-mn);ur++){const si=t[St[mn+ur]],xo=si.width??80,wo=si.minWidth??jh,so=si.maxWidth;xn.width=xn.width+xo,xn.minWidth=xn.minWidth+wo,xn.maxWidth!==void 0&&(so!==void 0?xn.maxWidth=xn.maxWidth+so:xn.maxWidth=void 0)}mn=mn+(cr-1)}}e[42]=t,e[43]=it}else it=e[43];wt=it;break e}let Se;if(e[44]!==t||e[45]!==$t){Se={};const it=er.keys(t);for(let St=0;St<it.length;St++){const mn=it[St],An=t[mn],Gn=$t[mn],cr=Zr.getContent(An.colSpan,{defKey:mn,def:An}),gr=An.minWidth??jh,Sn=An.maxWidth,Qn={width:Gn,minWidth:gr,maxWidth:Sn,flexGrow:cr??1};if(Se[mn]=Qn,cr!==void 0){for(let xn=1;xn<Math.min(cr,it.length-St);xn++){const ur=t[it[St+xn]],si=$t[it[St+xn]],xo=ur.minWidth??jh,wo=ur.maxWidth;Qn.width=Qn.width+si,Qn.minWidth=Qn.minWidth+xo,Qn.maxWidth!==void 0&&(wo!==void 0?Qn.maxWidth=Qn.maxWidth+wo:Qn.maxWidth=void 0)}St=St+(cr-1)}}e[44]=t,e[45]=$t,e[46]=Se}else Se=e[46];wt=Se}const qt=wt,Jt=N.useRef(null);let Vt;e[47]!==h?(Vt=_h.getSingleFilterValue(h),e[47]=h,e[48]=Vt):Vt=e[48];const hn=Vt;let ln;e[49]===Symbol.for("react.memo_cache_sentinel")?(ln=()=>{Te.current&&Te.current.scrollTo({top:0})},e[49]=ln):ln=e[49];let kn;e[50]!==x.page?(kn=[x.page],e[50]=x.page,e[51]=kn):kn=e[51],N.useEffect(ln,kn);let Nn;e[52]!==H?(Nn=Se=>{const it=Se===void 0?"center":Se;H&&H.length>0&&requestAnimationFrame(()=>{var St;return(St=Fe.current)==null?void 0:St.scrollIntoView({behavior:"auto",block:it})})},e[52]=H,e[53]=Nn):Nn=e[53];const En=Nn;let Cn,rr;e[54]!==I||e[55]!==En?(Cn=()=>{I==null||I(En)},rr=[I,En],e[54]=I,e[55]=En,e[56]=Cn,e[57]=rr):(Cn=e[56],rr=e[57]),N.useEffect(Cn,rr);let Bt;e[58]!==R?(Bt=k.jsx(Am,{isLoading:R}),e[58]=R,e[59]=Bt):Bt=e[59];let Ut;e[60]!==_t?(Ut=gt.clsx(Zl.BodyHeader,_t!==void 0&&Zl.IsClicked),e[60]=_t,e[61]=Ut):Ut=e[61];const yn=S||Y?"none":"flex";let Ft;e[62]!==yn?(Ft={display:yn},e[62]=yn,e[63]=Ft):Ft=e[63];let jn;e[64]===Symbol.for("react.memo_cache_sentinel")?(jn={minHeight:lb,maxHeight:lb},e[64]=jn):jn=e[64];let Hn;e[65]!==_t||e[66]!==t||e[67]!==$t||e[68]!==dn||e[69]!==He||e[70]!==be||e[71]!==(j==null?void 0:j.defKey)||e[72]!==(j==null?void 0:j.isAsc)||e[73]!==ye?(Hn=er.map(t,(Se,it)=>{const[St]=Se,mn=t[St],An=Zr.getContent(mn.hContent,{defKey:St,def:mn}),Gn=mn.name,cr=it===er.keys(t).length-1,gr=mn.width??80,Sn=mn.minWidth??jh,Qn=mn.maxWidth,xn={width:gr,minWidth:Sn,maxWidth:Qn,justifyContent:Zr.getContent(mn.hAlign,{defKey:St,def:mn})??"flex-start",...Zr.getContent(mn.hStyle,{defKey:St,def:mn})};ye.includes(St)&&(xn.width=$t[St]);const ur=mn.isSortable,si=(j==null?void 0:j.defKey)===St,xo=j==null?void 0:j.isAsc;return k.jsxs(N.Fragment,{children:[k.jsxs("div",{className:gt.clsx(Zl.TH,"Label1",ur?"IsClickable":"NoSelect"),style:xn,onClick:()=>ur&&be(St,mn.sortF),children:[k.jsx(nh,{children:An??Gn,className:Zl.Content}),ur&&k.jsx(ho,{icon:si?xo?"SortUp":"SortDown":"SortBoth",style:{width:16,height:16}})]}),!cr&&k.jsxs("div",{className:gt.sclsx(Zl,"Resizer","IsResizable","NoSelect",_t!==void 0&&"IsMoving"),onDoubleClick:pt,onMouseDown:wo=>He(wo,St),children:[k.jsx("div",{className:Zl.ResizerOut}),k.jsx("div",{className:Zl.ResizerIn}),k.jsx("div",{className:Zl.ResizerCenter,style:{height:dn}}),k.jsx("div",{className:Zl.ResizerIn}),k.jsx("div",{className:Zl.ResizerOut})]}),cr&&k.jsx(cs,{className:Zl.OverflowSpace,h:lb,style:{color:xn.color,backgroundColor:xn.backgroundColor,transition:xn.transition},w:"var(--Scrollbar-width)"})]},St)}),e[65]=_t,e[66]=t,e[67]=$t,e[68]=dn,e[69]=He,e[70]=be,e[71]=j==null?void 0:j.defKey,e[72]=j==null?void 0:j.isAsc,e[73]=ye,e[74]=Hn):Hn=e[74];let Rn;e[75]!==Hn?(Rn=k.jsx("div",{ref:zt,className:Zl.TRow,style:jn,children:Hn}),e[75]=Hn,e[76]=Rn):Rn=e[76];let Et;e[77]!==Ut||e[78]!==Ft||e[79]!==Rn?(Et=k.jsx("div",{ref:Jt,className:Ut,style:Ft,children:Rn}),e[77]=Ut,e[78]=Ft,e[79]=Rn,e[80]=Et):Et=e[80];let rt;e[81]!==_t?(rt=gt.clsx(Zl.BodyBody,_t!==void 0&&Zl.IsClicked),e[81]=_t,e[82]=rt):rt=e[82];const tn=Nt?"scroll":"hidden";let Ln;e[83]!==bt||e[84]!==mt||e[85]!==tn?(Ln={overflowY:tn,minHeight:mt,maxHeight:bt},e[83]=bt,e[84]=mt,e[85]=tn,e[86]=Ln):Ln=e[86];let mr;e[87]!==B||e[88]!==t||e[89]!==z||e[90]!==Nt||e[91]!==r||e[92]!==Y||e[93]!==l||e[94]!==_||e[95]!==Z||e[96]!==w||e[97]!==i||e[98]!==u||e[99]!==H||e[100]!==V||e[101]!==hn||e[102]!==qt?(mr=w.map((Se,it)=>{const St=Zr.getContent(i,{item:Se}),mn=V&&!l,An=H==null?void 0:H.some(Sn=>r(Sn,Se)),Gn=H&&(u==null?void 0:u(Se)),cr=typeof Gn=="string"?Gn:void 0,gr={...Se};return Y&&er.keys(t).forEach(Sn=>{const Qn=t[Sn],xn=Zr.getContent(Qn.content,{defKey:Sn,def:Qn,item:Se});let ur=!1;if(hn&&!_){const si=Zr.getContent(Qn.asText,{defKey:Sn,def:Qn,item:Se});si!==void 0?ur=si.toString().toLowerCase().includes(hn.toLowerCase()):["string","number"].includes(typeof xn)&&xn!==void 0&&xn!==null&&(ur=xn.toString().toLowerCase().includes(hn.toLowerCase()))}gr[Sn]=k.jsx("span",{className:gt.clsx(ur&&Zl.IsRowMarked),children:gr[Sn]})}),k.jsx(Gi,{isDisabled:Gn,tooltip:cr,...St,abaseRef:An?Fe:void 0,className:gt.clsx(St==null?void 0:St.className,mn&&Zl.IsSelectable,An&&Zl.IsSelected),onClick:Sn=>{var Qn;Z(Se),(Qn=St==null?void 0:St.onClick)==null||Qn.call(St,Sn)},children:k.jsx(B,{defs:t,isBodyBodyOverflowed:Nt,item:Se,markedItem:gr,noMarking:_,rowHeight:z,singleFilterValue:hn,spanWidths:qt})},it)}),e[87]=B,e[88]=t,e[89]=z,e[90]=Nt,e[91]=r,e[92]=Y,e[93]=l,e[94]=_,e[95]=Z,e[96]=w,e[97]=i,e[98]=u,e[99]=H,e[100]=V,e[101]=hn,e[102]=qt,e[103]=mr):mr=e[103];let wr;e[104]!==Y||e[105]!==w.length||e[106]!==W||e[107]!==Le||e[108]!==lt?(wr=k.jsx(nk,{isRowRendered:Y,itemsLength:w.length,resources:W,rowHeight:Le,showRows:lt}),e[104]=Y,e[105]=w.length,e[106]=W,e[107]=Le,e[108]=lt,e[109]=wr):wr=e[109];let gn;e[110]!==rt||e[111]!==Ln||e[112]!==mr||e[113]!==wr?(gn=k.jsxs("div",{ref:Te,className:rt,style:Ln,children:[mr,wr]}),e[110]=rt,e[111]=Ln,e[112]=mr,e[113]=wr,e[114]=gn):gn=e[114];let Dt;return e[115]!==Bt||e[116]!==Et||e[117]!==gn?(Dt=k.jsxs(k.Fragment,{children:[Bt,Et,gn]}),e[115]=Bt,e[116]=Et,e[117]=gn,e[118]=Dt):Dt=e[118],Dt},nk=n=>{const e=Dn.c(13),{showRows:t,itemsLength:r,resources:i,isRowRendered:o,rowHeight:l}=n;let a;e:{if(r===0){a=t;break e}a=t-r}const u=a;let h;if(e[0]!==o||e[1]!==r||e[2]!==u||e[3]!==i||e[4]!==l||e[5]!==t){let y;e[7]!==o||e[8]!==r||e[9]!==i||e[10]!==l||e[11]!==t?(y=(x,w)=>k.jsx("div",{className:gt.clsx(Zl.TRow,"NoSelect"),style:{minHeight:l,maxHeight:l,...o&&{border:"none"}},children:r===0&&w===Math.floor(t/2)&&k.jsx(bl,{className:Zl.NoItems,children:i["No Items"]})},w),e[7]=o,e[8]=r,e[9]=i,e[10]=l,e[11]=t,e[12]=y):y=e[12],h=Array.from({length:u},y),e[0]=o,e[1]=r,e[2]=u,e[3]=i,e[4]=l,e[5]=t,e[6]=h}else h=e[6];return h};function rk(n,e,t,r){const i={...t},o=er.keys(n).findIndex(h=>h===e)+1,l=Object.entries(n);let a=o-1,u=o;if(r<0){for(;r<0&&!(a<0||u>=l.length);){const[h,y]=[l[a][0],l[a][1]],[x,w]=[l[u][0],l[u][1]],_=y.minWidth??jh,S=w.maxWidth,R=i[h],I=i[x];let O=R-_;S!==void 0&&(O=Math.min(O,S-I));let P=-r;P=Math.min(P,O),R-P<=_&&a--,S!==void 0&&I+P>=S&&u++,i[h]=R-P,i[x]=I+P,r+=P}return i}else if(r>0){for(;r>0&&!(a<0||u>=l.length);){const[h,y]=[l[a][0],l[a][1]],[x,w]=[l[u][0],l[u][1]],_=w.minWidth??jh,S=y.maxWidth,R=i[x],I=i[h];let O=R-_;S!==void 0&&(O=Math.min(O,S-I));let P=r;P=Math.min(P,O),R-P<=_&&u++,S!==void 0&&I+P>=S&&a--,i[x]=R-P,i[h]=I+P,r-=P}return i}return i}const ik=n=>{const e=Dn.c(14),{defs:t,item:r,noMarking:i,spanWidths:o,singleFilterValue:l,isBodyBodyOverflowed:a,rowHeight:u}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=gt.clsx(Zl.TRow),e[0]=h):h=e[0];let y;e[1]!==u?(y={minHeight:u,maxHeight:u},e[1]=u,e[2]=y):y=e[2];let x;e[3]!==t||e[4]!==a||e[5]!==r||e[6]!==i||e[7]!==u||e[8]!==l||e[9]!==o?(x=er.map(t,(_,S)=>{const[R]=_,I=o[R];if(I===void 0)return null;const O=S===er.keys(t).length-1,P=t[R],Y=Zr.getContent(P.content,{defKey:R,def:P,item:r}),z={width:I.width,minWidth:I.minWidth,maxWidth:I.maxWidth,flexGrow:I.flexGrow,justifyContent:Zr.getContent(P.align,{defKey:R,def:P,item:r})??"flex-start",...Zr.getContent(P.style,{defKey:R,def:P,item:r})};let W=!1;if(l&&!i){const B=Zr.getContent(P.asText,{defKey:R,def:P,item:r});B!==void 0?W=B.toString().toLowerCase().includes(l.toLowerCase()):["string","number"].includes(typeof Y)&&Y!==void 0&&Y!==null&&(W=Y.toString().toLowerCase().includes(l.toLowerCase()))}return k.jsxs(N.Fragment,{children:[k.jsx("div",{className:gt.clsx(Zl.TD,"Label1",W&&Zl.IsMarked),style:z,children:k.jsx(nh,{children:Y,className:Zl.Content})}),!a&&O&&k.jsx(cs,{className:Zl.OverflowSpace,h:u,style:{color:z.color,backgroundColor:z.backgroundColor},w:"var(--Scrollbar-width)"})]},R)}),e[3]=t,e[4]=a,e[5]=r,e[6]=i,e[7]=u,e[8]=l,e[9]=o,e[10]=x):x=e[10];let w;return e[11]!==y||e[12]!==x?(w=k.jsx("div",{className:h,style:y,children:x}),e[11]=y,e[12]=x,e[13]=w):w=e[13],w},ok="_ATableFooter_w090q_1",lk="_Button_w090q_10",sk="_IsSelected_w090q_26",ak="_IsDisabled_w090q_31",Ed={ATableFooter:ok,Button:lk,IsSelected:sk,IsDisabled:ak},ck=n=>{const e=Dn.c(35),{pages:t,rangedPages:r,pageF:i,pagination:o}=n,l=t[t.length-1];let a;e[0]!==o.page?(a=gt.clsx(Ed.Button,o.page===1&&Ed.IsDisabled),e[0]=o.page,e[1]=a):a=e[1];let u;e[2]!==i.moveFirst||e[3]!==a?(u=k.jsx(ho,{className:a,icon:"FirstPage",onClick:i.moveFirst}),e[2]=i.moveFirst,e[3]=a,e[4]=u):u=e[4];let h;e[5]!==o.page?(h=gt.clsx(Ed.Button,o.page===1&&Ed.IsDisabled),e[5]=o.page,e[6]=h):h=e[6];let y;e[7]!==i.movePrev||e[8]!==h?(y=k.jsx(ho,{className:h,icon:"NavigateBefore",onClick:i.movePrev}),e[7]=i.movePrev,e[8]=h,e[9]=y):y=e[9];let x;if(e[10]!==i||e[11]!==o.page||e[12]!==r){let O;e[14]!==i||e[15]!==o.page?(O=P=>k.jsx("div",{className:gt.clsx(Ed.Button,"NoSelect",o.page===P&&Ed.IsSelected),onClick:()=>i.move(P),children:P},P),e[14]=i,e[15]=o.page,e[16]=O):O=e[16],x=r.map(O),e[10]=i,e[11]=o.page,e[12]=r,e[13]=x}else x=e[13];let w;e[17]!==l||e[18]!==o.page?(w=gt.clsx(Ed.Button,o.page===l&&Ed.IsDisabled),e[17]=l,e[18]=o.page,e[19]=w):w=e[19];let _;e[20]!==i.moveNext||e[21]!==w?(_=k.jsx(ho,{className:w,icon:"NavigateNext",onClick:i.moveNext}),e[20]=i.moveNext,e[21]=w,e[22]=_):_=e[22];let S;e[23]!==l||e[24]!==o.page?(S=gt.clsx(Ed.Button,o.page===l&&Ed.IsDisabled),e[23]=l,e[24]=o.page,e[25]=S):S=e[25];let R;e[26]!==i.moveLast||e[27]!==S?(R=k.jsx(ho,{className:S,icon:"LastPage",onClick:i.moveLast}),e[26]=i.moveLast,e[27]=S,e[28]=R):R=e[28];let I;return e[29]!==u||e[30]!==y||e[31]!==x||e[32]!==_||e[33]!==R?(I=k.jsxs(bl,{className:Ed.ATableFooter,children:[u,y,x,_,R]}),e[29]=u,e[30]=y,e[31]=x,e[32]=_,e[33]=R,e[34]=I):I=e[34],I},uk="_Filter_1b9j0_1",fk="_SelectFilter_1b9j0_11",dk="_MainFilter_1b9j0_15",hk="_IsOpen_1b9j0_26",gk="_SubFilters_1b9j0_30",pk="_Input_1b9j0_44",vk="_Main_1b9j0_15",bk="_Sub_1b9j0_30",yk="_Actions_1b9j0_62",mk="_Icon_1b9j0_67",xk="_LeftIcon_1b9j0_74",wk="_CircleAlertOutline_1b9j0_79",Ck="_Rotate_1b9j0_87",li={Filter:uk,SelectFilter:fk,MainFilter:dk,IsOpen:hk,SubFilters:gk,Input:pk,Main:vk,Sub:bk,Actions:yk,Icon:mk,LeftIcon:xk,CircleAlertOutline:wk,Rotate:Ck},_k=n=>{const e=Dn.c(79),{defs:t,useFilteration:r,hasToggleFilteration:i,filterF:o,isRowRendered:l,isFilterSort:a,filterType:u,resources:h,placeholder:y}=n;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=[],e[0]=x):x=e[0];const[w,_]=N.useState(x),[S,R]=r,I=u==="Select";let O;e[1]!==S?(O=er.keys(S).map(Ak),e[1]=S,e[2]=O):O=e[2];const P=O,[Y,z]=N.useState(I&&P.length>0?P[0]:null);let W;e[3]!==S||e[4]!==R?(W=(vn,Pt,Yt)=>{if(!R)return;const ct={...S};vn.value=Pt,R(ct),_(Tt=>Tt.map((It,ye)=>ye===(Yt?Yt+1:0)?"":It))},e[3]=S,e[4]=R,e[5]=W):W=e[5];const B=W;let ee;if(e[6]!==t||e[7]!==S||e[8]!==I||e[9]!==Y){ee=[];let vn=er.keys(S);if(I&&Y){let Pt;e[11]!==Y?(Pt=Yt=>Yt===Y,e[11]=Y,e[12]=Pt):Pt=e[12],vn=vn.filter(Pt)}for(const Pt of vn)ee.push({key:Pt,def:t[Pt],filter:S[Pt]});e[6]=t,e[7]=S,e[8]=I,e[9]=Y,e[10]=ee}else ee=e[10];const H=ee,V=H.length>0?H[0]:null,de=w.length>0?w[0]:"";let Z;e[13]!==H?(Z=H.length>1?H.slice(1):[],e[13]=H,e[14]=Z):Z=e[14];const te=Z;let ne;e[15]!==w?(ne=w.length>1?w.slice(1):[],e[15]=w,e[16]=ne):ne=e[16];const fe=ne,ae=te.length>0,[j,re]=N.useState(!1),[he,be]=N.useState(!1),le=N.useRef(null);let J;e[17]===Symbol.for("react.memo_cache_sentinel")?(J=()=>re(!1),e[17]=J):J=e[17];const pe=J,Te=N.useRef(null);let Fe;e[18]===Symbol.for("react.memo_cache_sentinel")?(Fe=()=>{be(!1),re(!0),Te.current&&(document.removeEventListener("mousedown",Te.current),Te.current=null)},e[18]=Fe):Fe=e[18];const _e=Fe;let Me;e[19]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>{const vn=Pt=>{const Yt=document.getElementById("root"),ct=Pt.target,Tt=le.current;!Yt||!Tt||!ct||!Tt.contains(ct)&&Yt.contains(ct)&&_e()};return Te.current=vn,vn},e[19]=Me):Me=e[19];const De=Me;let Re;e[20]===Symbol.for("react.memo_cache_sentinel")?(Re=()=>{re(!0),be(!0),setTimeout(()=>{const vn=De();document.addEventListener("mousedown",vn)},0)},e[20]=Re):Re=e[20];const Le=Re,Oe=he?_e:Le;let Ge;e[21]!==w||e[22]!==H?(Ge=()=>{const vn=H.map((Pt,Yt)=>Pt.filter.type==="String"&&Pt.filter.validation?Pt.filter.validation(Pt.filter.value||""):Pt.filter.type==="Date"&&Pt.filter.validation||Pt.filter.type==="DateRange"&&Pt.filter.validation?Pt.filter.validation(Pt.filter.value):w[Yt]);return _(vn),vn.every(Tk)},e[21]=w,e[22]=H,e[23]=Ge):Ge=e[23];const Ve=Ge;let Pe;e[24]!==o||e[25]!==Ve?(Pe=vn=>{vn.key==="Enter"?(Ve()&&o.apply(),vn.stopPropagation()):vn.key==="Escape"&&(be(!1),vn.currentTarget.focus(),vn.currentTarget.blur(),vn.stopPropagation())},e[24]=o,e[25]=Ve,e[26]=Pe):Pe=e[26];const ot=Pe;let Xe;e[27]!==Oe||e[28]!==Ve?(Xe={open:Le,close:_e,toggle:Oe,validate:Ve},e[27]=Oe,e[28]=Ve,e[29]=Xe):Xe=e[29];const lt=Xe;let Ye;e[30]!==o?(Ye=()=>{o.clear()},e[30]=o,e[31]=Ye):Ye=e[31];const mt=Ye;let bt;e[32]!==o||e[33]!==S||e[34]!==R?(bt=vn=>{if(!R||!vn)return;z(vn);const Pt={...S};er.keys(Pt).forEach(Yt=>{if(Yt!==vn&&Pt[Yt])e:switch(Pt[Yt].type){case"String":{Pt[Yt].value="";break e}case"Select":{Pt[Yt].value=null;break e}case"Date":{Pt[Yt].value=void 0;break e}case"DateRange":Pt[Yt].value=void 0}}),_([]),R(Pt),o.clear(),setTimeout(()=>{var ct;const Yt=(ct=le.current)==null?void 0:ct.querySelector("input");Yt&&Yt.focus()},0)},e[32]=o,e[33]=S,e[34]=R,e[35]=bt):bt=e[35];const Mt=bt;if(!V)return null;let Nt;e[36]!==t||e[37]!==P||e[38]!==S||e[39]!==Mt||e[40]!==I||e[41]!==Y?(Nt=I&&k.jsx(Ah,{isAutoWidth:!0,className:gt.clsx(li.SelectFilter),options:P,type:"Secondary",useSelect:[Y,Mt],OptionRenderer:vn=>{const{option:Pt}=vn,Yt=t[Pt];let ct;if(Yt!=null&&Yt.hContent){const Tt={defKey:Pt,def:Yt};ct=typeof Yt.hContent=="function"?Yt.hContent(Tt):Yt.hContent}else{const Tt=S[Pt],It=(Yt==null?void 0:Yt.name)||(Tt==null?void 0:Tt.placeholder)||String(Pt);ct=k.jsx("span",{children:It})}return ct}}),e[36]=t,e[37]=P,e[38]=S,e[39]=Mt,e[40]=I,e[41]=Y,e[42]=Nt):Nt=e[42];let _t;e[43]===Symbol.for("react.memo_cache_sentinel")?(_t=gt.clsx(li.Filter),e[43]=_t):_t=e[43];const rn=l?a?180:void 0:180,pn=l?a?300:void 0:300;let Kt;e[44]!==rn||e[45]!==pn?(Kt={minWidth:rn,maxWidth:pn},e[44]=rn,e[45]=pn,e[46]=Kt):Kt=e[46];let dn;e[47]!==o||e[48]!==I||e[49]!==ae||e[50]!==i||e[51]!==he||e[52]!==de||e[53]!==V||e[54]!==B||e[55]!==y||e[56]!==lt||e[57]!==h?(dn=k.jsx(Sk,{errorMessage:de,filterF:o,filterSet:V,hasSelectFilterType:I,hasSubFilters:ae,hasToggleFilteration:i,isOpen:he,placeholder:y,popupF:lt,resources:h,onChange:B}),e[47]=o,e[48]=I,e[49]=ae,e[50]=i,e[51]=he,e[52]=de,e[53]=V,e[54]=B,e[55]=y,e[56]=lt,e[57]=h,e[58]=dn):dn=e[58];let zt;e[59]!==o||e[60]!==I||e[61]!==he||e[62]!==j||e[63]!==B||e[64]!==mt||e[65]!==y||e[66]!==h||e[67]!==fe||e[68]!==te||e[69]!==Ve?(zt=!I&&k.jsx(Ek,{errorMessages:fe,filterF:o,isOpen:he,isTransitioning:j,placeholder:y,resources:h,subFilterSets:te,validate:Ve,onChange:B,onClearClick:mt,onTransitionEnd:pe}),e[59]=o,e[60]=I,e[61]=he,e[62]=j,e[63]=B,e[64]=mt,e[65]=y,e[66]=h,e[67]=fe,e[68]=te,e[69]=Ve,e[70]=zt):zt=e[70];let wn;e[71]!==ot||e[72]!==Kt||e[73]!==dn||e[74]!==zt?(wn=k.jsxs("div",{ref:le,className:_t,tabIndex:-1,style:Kt,onKeyDown:ot,onClick:Rk,children:[dn,zt]}),e[71]=ot,e[72]=Kt,e[73]=dn,e[74]=zt,e[75]=wn):wn=e[75];let $t;return e[76]!==Nt||e[77]!==wn?($t=k.jsxs(k.Fragment,{children:[Nt,wn]}),e[76]=Nt,e[77]=wn,e[78]=$t):$t=e[78],$t},Sk=n=>{var _,S,R,I;const e=Dn.c(182),{filterSet:t,hasToggleFilteration:r,hasSelectFilterType:i,onChange:o,filterF:l,hasSubFilters:a,popupF:u,isOpen:h,resources:y,errorMessage:x,placeholder:w}=n;if(t.filter.type==="String"){const O=t.filter.value??"";let P;e[0]!==t.filter||e[1]!==o?(P=le=>o(t.filter,le),e[0]=t.filter,e[1]=o,e[2]=P):P=e[2];let Y;e[3]!==O||e[4]!==P?(Y=[O,P],e[3]=O,e[4]=P,e[5]=Y):Y=e[5];const z=Y,W=w??t.filter.placeholder??((_=t.def)==null?void 0:_.name),B=t.filter.icon,ee=t.filter.iconTooltip??W;let H;e[6]!==h?(H=gt.clsx(li.MainFilter,h&&li.IsOpen),e[6]=h,e[7]=H):H=e[7];const V=B??"Type";let de;e[8]!==ee||e[9]!==h||e[10]!==V?(de=k.jsx(Jd,{icon:V,isOpen:h,tooltip:ee}),e[8]=ee,e[9]=h,e[10]=V,e[11]=de):de=e[11];const Z=t.filter.autoFocus;let te;e[12]===Symbol.for("react.memo_cache_sentinel")?(te=gt.clsx(li.Input,li.Main),e[12]=te):te=e[12];let ne;e[13]!==l||e[14]!==r||e[15]!==h||e[16]!==u||e[17]!==y?(ne=r&&k.jsx(d0,{isOpen:h,filterF:l,popupF:u,resources:y}),e[13]=l,e[14]=r,e[15]=h,e[16]=u,e[17]=y,e[18]=ne):ne=e[18];const fe=W??y["Search(Placeholder)"],ae=x?"Error":"Primary";let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j={style:{width:"100%",boxSizing:"border-box"}},e[19]=j):j=e[19];let re;e[20]!==x||e[21]!==l||e[22]!==i||e[23]!==a||e[24]!==h||e[25]!==u||e[26]!==y?(re=k.jsx(h0,{errorMessage:x,filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:h,popupF:u,resources:y}),e[20]=x,e[21]=l,e[22]=i,e[23]=a,e[24]=h,e[25]=u,e[26]=y,e[27]=re):re=e[27];let he;e[28]!==t.filter.autoFocus||e[29]!==t.filter.dataList||e[30]!==t.filter.maxLength||e[31]!==t.filter.pattern||e[32]!==ae||e[33]!==re||e[34]!==ne||e[35]!==fe||e[36]!==z?(he=k.jsx(sg,{autoFocus:Z,className:te,dataList:t.filter.dataList,LeftAddon:ne,maxLength:t.filter.maxLength,pattern:t.filter.pattern,placeholder:fe,type:ae,useValue:z,wrapProps:j,RightAddon:re}),e[28]=t.filter.autoFocus,e[29]=t.filter.dataList,e[30]=t.filter.maxLength,e[31]=t.filter.pattern,e[32]=ae,e[33]=re,e[34]=ne,e[35]=fe,e[36]=z,e[37]=he):he=e[37];let be;return e[38]!==he||e[39]!==H||e[40]!==de?(be=k.jsxs("div",{className:H,children:[de,he]}),e[38]=he,e[39]=H,e[40]=de,e[41]=be):be=e[41],be}else if(t.filter.type==="Select"){const O=t.filter.value??null;let P;e[42]!==l||e[43]!==t.filter||e[44]!==i||e[45]!==o||e[46]!==u?(P=ae=>{o(t.filter,ae),i&&setTimeout(()=>{u.validate()&&l.apply()},0)},e[42]=l,e[43]=t.filter,e[44]=i,e[45]=o,e[46]=u,e[47]=P):P=e[47];let Y;e[48]!==O||e[49]!==P?(Y=[O,P],e[48]=O,e[49]=P,e[50]=Y):Y=e[50];const z=Y,W=w??t.filter.placeholder??((S=t.def)==null?void 0:S.name),B=t.filter.icon,ee=t.filter.iconTooltip??W;let H;e[51]!==h?(H=gt.clsx(li.MainFilter,h&&li.IsOpen),e[51]=h,e[52]=H):H=e[52];const V=B??"Menu";let de;e[53]!==ee||e[54]!==h||e[55]!==V?(de=k.jsx(Jd,{icon:V,isOpen:h,tooltip:ee}),e[53]=ee,e[54]=h,e[55]=V,e[56]=de):de=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=gt.clsx(li.Input,li.Main),e[57]=Z):Z=e[57];let te;e[58]!==l||e[59]!==t.filter.placeholder||e[60]!==i||e[61]!==a||e[62]!==r||e[63]!==h||e[64]!==W||e[65]!==u||e[66]!==y?(te=ae=>{const{OptionRenderer:j,selectedOption:re}=ae;return re===null?W||t.filter.placeholder:k.jsxs(k.Fragment,{children:[r&&k.jsx(d0,{isOpen:h,filterF:l,popupF:u,resources:y}),k.jsx(j,{option:re}),k.jsx(h0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,hideSearchButton:!0,isOpen:h,popupF:u,resources:y})]})},e[58]=l,e[59]=t.filter.placeholder,e[60]=i,e[61]=a,e[62]=r,e[63]=h,e[64]=W,e[65]=u,e[66]=y,e[67]=te):te=e[67];let ne;e[68]!==t.filter.OptionRenderer||e[69]!==t.filter.options||e[70]!==W||e[71]!==te||e[72]!==z?(ne=k.jsx(Ah,{className:Z,OptionRenderer:t.filter.OptionRenderer,options:t.filter.options,placeholder:W,useSelect:z,SelectedRenderer:te}),e[68]=t.filter.OptionRenderer,e[69]=t.filter.options,e[70]=W,e[71]=te,e[72]=z,e[73]=ne):ne=e[73];let fe;return e[74]!==H||e[75]!==de||e[76]!==ne?(fe=k.jsxs("div",{className:H,children:[de,ne]}),e[74]=H,e[75]=de,e[76]=ne,e[77]=fe):fe=e[77],fe}else if(t.filter.type==="Date"){let O;e[78]!==t.filter||e[79]!==o?(O=pe=>o(t.filter,pe),e[78]=t.filter,e[79]=o,e[80]=O):O=e[80];let P;e[81]!==t.filter.value||e[82]!==O?(P=[t.filter.value,O],e[81]=t.filter.value,e[82]=O,e[83]=P):P=e[83];const Y=P,z=w??t.filter.placeholder??((R=t.def)==null?void 0:R.name),W=t.filter.icon,B=t.filter.iconTooltip??z;let ee;e[84]!==h?(ee=gt.clsx(li.MainFilter,h&&li.IsOpen),e[84]=h,e[85]=ee):ee=e[85];const H=W??"CalendarDay";let V;e[86]!==B||e[87]!==h||e[88]!==H?(V=k.jsx(Jd,{icon:H,isOpen:h,tooltip:B}),e[86]=B,e[87]=h,e[88]=H,e[89]=V):V=e[89];let de;e[90]===Symbol.for("react.memo_cache_sentinel")?(de=gt.clsx(li.DatePicker,li.Input,li.Main),e[90]=de):de=e[90];let Z;e[91]!==l||e[92]!==r||e[93]!==h||e[94]!==u||e[95]!==y?(Z=r&&k.jsx(d0,{isOpen:h,filterF:l,popupF:u,resources:y}),e[91]=l,e[92]=r,e[93]=h,e[94]=u,e[95]=y,e[96]=Z):Z=e[96];let te;e[97]!==r||e[98]!==h?(te=!r&&k.jsx(cs,{w:h?0:6}),e[97]=r,e[98]=h,e[99]=te):te=e[99];const ne=W??"CalendarDay",fe=!h;let ae;e[100]!==B||e[101]!==ne||e[102]!==fe?(ae=k.jsx(Jd,{icon:ne,isOpen:fe,tooltip:B}),e[100]=B,e[101]=ne,e[102]=fe,e[103]=ae):ae=e[103];const j=h?8:0;let re;e[104]!==j?(re=k.jsx(cs,{w:j}),e[104]=j,e[105]=re):re=e[105];let he;e[106]!==ae||e[107]!==re||e[108]!==Z||e[109]!==te?(he=k.jsxs(k.Fragment,{children:[Z,te,ae,re]}),e[106]=ae,e[107]=re,e[108]=Z,e[109]=te,e[110]=he):he=e[110];let be;e[111]!==l||e[112]!==i||e[113]!==a||e[114]!==h||e[115]!==u||e[116]!==y?(be=k.jsx(h0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:h,popupF:u,resources:y}),e[111]=l,e[112]=i,e[113]=a,e[114]=h,e[115]=u,e[116]=y,e[117]=be):be=e[117];let le;e[118]!==t.filter.maxDate||e[119]!==t.filter.minDate||e[120]!==z||e[121]!==he||e[122]!==be||e[123]!==Y?(le=k.jsx(Sm,{className:de,maxDate:t.filter.maxDate,minDate:t.filter.minDate,placeholder:z,type:"Raw",useDate:Y,LeftAddon:he,RightAddon:be}),e[118]=t.filter.maxDate,e[119]=t.filter.minDate,e[120]=z,e[121]=he,e[122]=be,e[123]=Y,e[124]=le):le=e[124];let J;return e[125]!==le||e[126]!==ee||e[127]!==V?(J=k.jsxs("div",{className:ee,children:[V,le]}),e[125]=le,e[126]=ee,e[127]=V,e[128]=J):J=e[128],J}else if(t.filter.type==="DateRange"){let O;e[129]!==t.filter||e[130]!==o?(O=Fe=>o(t.filter,Fe),e[129]=t.filter,e[130]=o,e[131]=O):O=e[131];let P;e[132]!==t.filter.value||e[133]!==O?(P=[t.filter.value,O],e[132]=t.filter.value,e[133]=O,e[134]=P):P=e[134];const Y=P,{noDefaultChoices:z,noClearButton:W}=t.filter,B=w??t.filter.placeholder??((I=t.def)==null?void 0:I.name),ee=t.filter.icon,H=t.filter.iconTooltip??B;let V;e[135]!==h?(V=gt.clsx(li.MainFilter,h&&li.IsOpen),e[135]=h,e[136]=V):V=e[136];const de=ee??"CalendarDay";let Z;e[137]!==H||e[138]!==h||e[139]!==de?(Z=k.jsx(Jd,{icon:de,isOpen:h,tooltip:H}),e[137]=H,e[138]=h,e[139]=de,e[140]=Z):Z=e[140];let te;e[141]===Symbol.for("react.memo_cache_sentinel")?(te=gt.clsx(li.DatePicker,li.Input,li.Main),e[141]=te):te=e[141];let ne;e[142]!==l||e[143]!==r||e[144]!==h||e[145]!==u||e[146]!==y?(ne=r&&k.jsx(d0,{isOpen:h,filterF:l,popupF:u,resources:y}),e[142]=l,e[143]=r,e[144]=h,e[145]=u,e[146]=y,e[147]=ne):ne=e[147];let fe;e[148]!==r||e[149]!==h?(fe=!r&&k.jsx(cs,{w:h?0:6}),e[148]=r,e[149]=h,e[150]=fe):fe=e[150];const ae=ee??"CalendarDay",j=!h;let re;e[151]!==H||e[152]!==ae||e[153]!==j?(re=k.jsx(Jd,{icon:ae,isOpen:j,tooltip:H}),e[151]=H,e[152]=ae,e[153]=j,e[154]=re):re=e[154];const he=h?8:0;let be;e[155]!==he?(be=k.jsx(cs,{w:he}),e[155]=he,e[156]=be):be=e[156];let le;e[157]!==re||e[158]!==be||e[159]!==ne||e[160]!==fe?(le=k.jsxs(k.Fragment,{children:[ne,fe,re,be]}),e[157]=re,e[158]=be,e[159]=ne,e[160]=fe,e[161]=le):le=e[161];let J;e[162]!==l||e[163]!==i||e[164]!==a||e[165]!==h||e[166]!==u||e[167]!==y?(J=k.jsx(h0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:h,popupF:u,resources:y}),e[162]=l,e[163]=i,e[164]=a,e[165]=h,e[166]=u,e[167]=y,e[168]=J):J=e[168];let pe;e[169]!==t.filter.maxDate||e[170]!==t.filter.minDate||e[171]!==W||e[172]!==z||e[173]!==B||e[174]!==le||e[175]!==J||e[176]!==Y?(pe=k.jsx(Cm,{className:te,maxDate:t.filter.maxDate,minDate:t.filter.minDate,noClearButton:W,noDefaultChoices:z,placeholder:B,type:"Raw",useDateRange:Y,LeftAddon:le,RightAddon:J}),e[169]=t.filter.maxDate,e[170]=t.filter.minDate,e[171]=W,e[172]=z,e[173]=B,e[174]=le,e[175]=J,e[176]=Y,e[177]=pe):pe=e[177];let Te;return e[178]!==pe||e[179]!==V||e[180]!==Z?(Te=k.jsxs("div",{className:V,children:[Z,pe]}),e[178]=pe,e[179]=V,e[180]=Z,e[181]=Te):Te=e[181],Te}return null},d0=n=>{const e=Dn.c(10),{filterF:t,popupF:r,resources:i,isOpen:o}=n,l=o?0:24,a=o?0:8;let u;e[0]!==l||e[1]!==a?(u={width:l,marginLeft:a},e[0]=l,e[1]=a,e[2]=u):u=e[2];const h=i["Toggle Filter"];let y;e[3]!==t||e[4]!==r?(y=w=>{w.currentTarget.classList.add(li.Rotate),t.toggle(),r.close(),w.stopPropagation()},e[3]=t,e[4]=r,e[5]=y):y=e[5];let x;return e[6]!==u||e[7]!==h||e[8]!==y?(x=k.jsx(ba,{className:li.Icon,icon:"Convert",style:u,tooltip:h,type:"Raw",onMouseDown:Ik,onClick:y}),e[6]=u,e[7]=h,e[8]=y,e[9]=x):x=e[9],x},h0=n=>{const e=Dn.c(29),{hasSubFilters:t,popupF:r,isOpen:i,resources:o,errorMessage:l,hideSearchButton:a,hasSelectFilterType:u,filterF:h}=n;let y;e[0]!==r?(y=W=>{W.stopPropagation(),r.open()},e[0]=r,e[1]=y):y=e[1];const x=y;let w;e[2]!==r?(w=W=>{W.stopPropagation(),r.close()},e[2]=r,e[3]=w):w=e[3];const _=w;let S;e[4]!==h||e[5]!==r?(S=W=>{W.stopPropagation(),r.validate()&&h.apply()},e[4]=h,e[5]=r,e[6]=S):S=e[6];const R=S;let I;e[7]!==l?(I=l&&k.jsx(ba,{className:li.CircleAlertOutline,icon:"CircleAlertOutline",iconSize:"xs",tooltip:l,type:"Raw"}),e[7]=l,e[8]=I):I=e[8];let O;e[9]!==u||e[10]!==t||e[11]!==i||e[12]!==x?(O=t&&!u&&k.jsx(ba,{className:li.Icon,icon:"ListAdd",type:"Raw",style:{opacity:+!i,visibility:+!i?"visible":"hidden",marginRight:-24,pointerEvents:i?"none":void 0},onClick:x}),e[9]=u,e[10]=t,e[11]=i,e[12]=x,e[13]=O):O=e[13];let P;e[14]!==u||e[15]!==t||e[16]!==i||e[17]!==_?(P=t&&!u&&k.jsx(ba,{className:li.Icon,icon:"ListRemove",type:"Raw",style:{opacity:+i,visibility:+i?"visible":"hidden",marginRight:i?-24:0,pointerEvents:i?void 0:"none"},onClick:_}),e[14]=u,e[15]=t,e[16]=i,e[17]=_,e[18]=P):P=e[18];let Y;e[19]!==a||e[20]!==i||e[21]!==R||e[22]!==o?(Y=!a&&k.jsx(ba,{className:li.Icon,icon:"Search",tooltip:o["Search(Button)"],type:"Raw",style:{opacity:+!i,visibility:+!i?"visible":"hidden",pointerEvents:i?"none":void 0,marginRight:4},onClick:R}),e[19]=a,e[20]=i,e[21]=R,e[22]=o,e[23]=Y):Y=e[23];let z;return e[24]!==I||e[25]!==O||e[26]!==P||e[27]!==Y?(z=k.jsxs(N.Fragment,{children:[I,O,P,Y]}),e[24]=I,e[25]=O,e[26]=P,e[27]=Y,e[28]=z):z=e[28],z},Ek=n=>{const e=Dn.c(31),{subFilterSets:t,onChange:r,onClearClick:i,isOpen:o,isTransitioning:l,onTransitionEnd:a,resources:u,errorMessages:h,placeholder:y,filterF:x,validate:w}=n;if(!o&&!l)return null;const _=+o,S=+o?"visible":"hidden";let R;e[0]!==_||e[1]!==S?(R={opacity:_,visibility:S},e[0]=_,e[1]=S,e[2]=R):R=e[2];let I;if(e[3]!==h||e[4]!==y||e[5]!==r||e[6]!==u||e[7]!==t){let H;e[9]!==h||e[10]!==y||e[11]!==r||e[12]!==u?(H=(V,de)=>{var Z,te,ne,fe;if(V.filter.type==="String"){const ae=[V.filter.value??"",le=>r(V.filter,le,de)],j=h[de],re=y??V.filter.placeholder??((Z=V.def)==null?void 0:Z.name),he=V.filter.icon,be=V.filter.iconTooltip??re;return k.jsxs(bl,{style:{marginBottom:6},children:[k.jsx(Jd,{icon:he??"Type",tooltip:be}),k.jsx(sg,{autoFocus:V.filter.autoFocus,className:gt.clsx(li.Input,li.Sub),dataList:V.filter.dataList,maxLength:V.filter.maxLength,pattern:V.filter.pattern,placeholder:re??u["Search(Placeholder)"],type:j?"Error":"Secondary",useValue:ae,wrapProps:{style:{width:"100%"}},RightAddon:j&&k.jsx(ba,{className:li.CircleAlertOutline,icon:"CircleAlertOutline",iconSize:"xs",tooltip:j,type:"Raw"})}),k.jsx(cs,{h:8})]},de)}else if(V.filter.type==="Select"){const ae=[V.filter.value??null,be=>r(V.filter,be)],j=y??V.filter.placeholder??((te=V.def)==null?void 0:te.name),re=V.filter.icon,he=V.filter.iconTooltip??j;return k.jsxs(bl,{style:{marginBottom:6},children:[k.jsx(Jd,{icon:re??"Menu",tooltip:he}),k.jsx(Ah,{arrowProps:{style:{marginRight:4}},className:gt.clsx(li.Input,li.Sub),OptionRenderer:V.filter.OptionRenderer,options:V.filter.options,placeholder:j,type:"Secondary",useSelect:ae}),k.jsx(cs,{h:8})]},de)}else if(V.filter.type==="Date"){const ae=[V.filter.value,be=>r(V.filter,be)],j=y??V.filter.placeholder??((ne=V.def)==null?void 0:ne.name),re=V.filter.icon,he=V.filter.iconTooltip??j;return k.jsxs(bl,{style:{marginBottom:6},children:[k.jsx(Jd,{icon:re??"CalendarDay",tooltip:he}),k.jsx(Sm,{className:gt.clsx(li.DatePicker,li.Input,li.Sub),LeftAddon:k.jsx(cs,{w:12}),maxDate:V.filter.maxDate,minDate:V.filter.minDate,placeholder:j,type:"Raw",useDate:ae}),k.jsx(cs,{h:8})]},de)}else if(V.filter.type==="DateRange"){const ae=[V.filter.value,J=>r(V.filter,J)],{noDefaultChoices:j,noClearButton:re}=V.filter,he=y??V.filter.placeholder??((fe=V.def)==null?void 0:fe.name),be=V.filter.icon,le=V.filter.iconTooltip??he;return k.jsxs(bl,{style:{marginBottom:6},children:[k.jsx(Jd,{icon:be??"CalendarDay",tooltip:le}),k.jsx(Cm,{className:gt.clsx(li.DatePicker,li.Input,li.Sub),LeftAddon:k.jsx(cs,{w:12}),maxDate:V.filter.maxDate,minDate:V.filter.minDate,noClearButton:re,noDefaultChoices:j,placeholder:he,type:"Raw",useDateRange:ae})]},de)}else return null},e[9]=h,e[10]=y,e[11]=r,e[12]=u,e[13]=H):H=e[13],I=t.map(H),e[3]=h,e[4]=y,e[5]=r,e[6]=u,e[7]=t,e[8]=I}else I=e[8];const O=u["Clear(Button)"];let P;e[14]!==i||e[15]!==O?(P=k.jsx(Ic,{type:"Secondary",onClick:i,children:O}),e[14]=i,e[15]=O,e[16]=P):P=e[16];let Y;e[17]!==x||e[18]!==w?(Y=()=>{w()&&x.apply()},e[17]=x,e[18]=w,e[19]=Y):Y=e[19];const z=u["Search(Button)"];let W;e[20]!==Y||e[21]!==z?(W=k.jsx(Ic,{onClick:Y,children:z}),e[20]=Y,e[21]=z,e[22]=W):W=e[22];let B;e[23]!==P||e[24]!==W?(B=k.jsxs(bl,{className:li.Actions,children:[P,W]}),e[23]=P,e[24]=W,e[25]=B):B=e[25];let ee;return e[26]!==a||e[27]!==R||e[28]!==I||e[29]!==B?(ee=k.jsxs("div",{className:li.SubFilters,style:R,onTransitionEnd:a,children:[I,B]}),e[26]=a,e[27]=R,e[28]=I,e[29]=B,e[30]=ee):ee=e[30],ee},Jd=n=>{const e=Dn.c(8),{icon:t,tooltip:r,isOpen:i}=n,o=i===void 0?!0:i,l=o?24:0,a=o?4:0,u=+o;let h;e[0]!==l||e[1]!==a||e[2]!==u?(h={width:l,marginRight:a,opacity:u},e[0]=l,e[1]=a,e[2]=u,e[3]=h):h=e[3];let y;return e[4]!==t||e[5]!==h||e[6]!==r?(y=k.jsx(ba,{className:li.LeftIcon,icon:t,tooltip:r,type:"Raw",style:h}),e[4]=t,e[5]=h,e[6]=r,e[7]=y):y=e[7],y};function Ak(n){return String(n)}function Tk(n){return!n}function Rk(n){n.preventDefault(),n.stopPropagation()}function Ik(n){return n.currentTarget.classList.remove(li.Rotate)}const kk="_ATableHeader_1hzfz_1",Mk="_LeftHeaderContent_1hzfz_11",Lk="_RightHeaderContent_1hzfz_19",Ok="_TopRightAddon_1hzfz_27",Pk="_HItem_1hzfz_32",Eg={ATableHeader:kk,LeftHeaderContent:Mk,RightHeaderContent:Lk,TopRightAddon:Ok,HItem:Pk},Dk=n=>{const{defs:e,title:t,totalCount:r,useCheck:i,useFilteration:o,hasToggleFilteration:l,filterF:a,noFilter:u,noCount:h,isFiltered:y,TopLeftAddon:x,TopRightAddon:w,useSortation:_,resources:S=Nr.ATable,filterType:R,placeholder:I}=n,[O]=N.useMemo(()=>i||[],[i]),P=N.useMemo(()=>y?S["Searched n items"](r):S["Total n items"](r),[S,y,r]),[Y]=o,[z,W]=_,[B,ee]=N.useState(!1),H=N.useMemo(()=>{const re=er.values(Y).filter(le=>le.type==="DateRange"),he=er.keys(Y).filter(le=>re.includes(Y[le])),be=er.keys(e).filter(le=>e[le].isSortable);return he.length>0?(he.length>1&&ee(!0),be.map(J=>he.includes(J)?[J+"_Asc",J+"_Desc"]:J).flat()):be},[e,Y]),V=N.useMemo(()=>n.isRowRendered&&H.length>0,[H.length,n.isRowRendered]),de=N.useCallback((re,he)=>{W&&(z==null?void 0:z.defKey)===re&&(z.isAsc===!0?W({defKey:re,isAsc:!1,sortF:he}):W({defKey:re,isAsc:!0,sortF:he}))},[z,W]),Z=N.useRef(null),[te,ne]=N.useState(),[fe,ae]=N.useState(z?z.defKey:H[0]),j=N.useMemo(()=>{if(!te)return{};const re=e[te];return{SortUp:{onClick:()=>{W==null||W({defKey:te,isAsc:!0,sortF:re.sortF}),ae(te)},content:()=>S["Sort up"]},SortDown:{onClick:()=>{W==null||W({defKey:te,isAsc:!1,sortF:re.sortF}),ae(te)},content:()=>S["Sort down"]}}},[W,te,e,S]);return k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:gt.clsx(Eg.ATableHeader),children:[k.jsxs("div",{className:gt.clsx(Eg.LeftHeaderContent,"NoSelect"),children:[k.jsxs(bl,{style:{marginBottom:V?8:0},children:[t&&k.jsx("div",{className:gt.clsx(Eg.HItem),style:{whiteSpace:"nowrap"},children:t}),!h&&k.jsxs("div",{className:gt.clsx(Eg.HItem),style:{maxHeight:14,...V&&{minHeight:14,color:"var(--label-neutral)"}},children:[P,O&&O.length>0&&k.jsxs(k.Fragment,{children:[" / ",S["Checked n items"](O.length)]})]})]}),V&&k.jsx(U3,{options:H,optionWidth:"fit-content",tabProps:{style:{marginRight:8}},type:"Tertiary",useSelect:[fe,()=>{}],optionProps:{style:{cursor:"default"},onClick:re=>{var le;const he=re.currentTarget.textContent;if(he===S[he])return;re.currentTarget.querySelector("svg")===null&&((le=Z.current)==null||le.open(re.currentTarget))}},OptionRenderer:re=>{const he=/_Asc|_Desc/.test(re.option),be=(z==null?void 0:z.defKey)===re.option,le=fe===re.option,J=z==null?void 0:z.isAsc,pe=()=>{if(he){ne(void 0),ae(re.option);const[_e,Me]=re.option.split("_"),De=Me==="Asc";W==null||W({defKey:_e,isAsc:De,sortF:e[_e].sortF})}else le?de(re.option,e[re.option].sortF):ne(re.option)},Fe=he?(_e=>{const[Me,De]=_e.split("_");return(B?Me+" ":"")+S[De]})(re.option):S["Sort by x"](re.option);return k.jsxs(bl,{className:gt.clsx(!(he&&le)&&"IsClickable"),style:{height:"100%"},onClick:pe,children:[Fe,le&&!he&&k.jsx(ho,{icon:be?J?"RowSortUp":"RowSortDown":"RowSortBoth",style:{marginRight:-5,marginLeft:4}})]},re.option)}})]}),k.jsx(zg,{}),k.jsxs("div",{className:gt.clsx(Eg.RightHeaderContent,"NoSelect"),children:[x&&k.jsx("div",{className:gt.clsx(Eg.HItem),children:x}),!u&&k.jsx(_k,{defs:e,filterF:a,filterType:R,hasToggleFilteration:l,isFilterSort:H.length>0,isRowRendered:n.isRowRendered,placeholder:I,resources:S,useFilteration:o}),w&&k.jsx(bl,{children:w,className:gt.clsx(Eg.TopRightAddon)})]})]}),k.jsx(H3,{actionRef:Z,defs:j,position:L1.S,width:100,onClose:()=>ne(void 0)})]})},q2={page:1,pageSize:50,pageRange:10},Nk=n=>{const e=Dn.c(259),{defs:t,pk:r,defaultDef:i,rProps:o,useSelect:l,isSelectMulti:a,selectDisabled:u,useCheck:h,checkDisabled:y,isLoading:x,isDisabled:w,title:_,entireItems:S,onStateChange:R,pagedItems:I,totalCount:O,useFilteration:P,useToggleFilteration:Y,filterType:z,placeholder:W,rowHeight:B,usePagination:ee,useSortation:H,showRows:V,noHeader:de,noDefHeader:Z,noFooter:te,noFilter:ne,noCount:fe,noMarking:ae,noStateChangeOnMount:j,TopLeftAddon:re,TopRightAddon:he,actionRef:be,RowRenderer:le,resources:J}=n,pe=z===void 0?"Default":z,Te=B===void 0?40:B;let Fe;e[0]!==J?(Fe={...Nr.ATable,...J},e[0]=J,e[1]=Fe):Fe=e[1];const _e=Fe,Me=N.useRef(null);let De;e[2]!==r?(De=(Qe,on)=>r!==void 0?Array.isArray(r)?r.every(Wn=>ud.isEqual(Qe[Wn],on[Wn])):ud.isEqual(Qe[r],on[r]):ud.isEqual(Qe,on),e[2]=r,e[3]=De):De=e[3];const Re=De;let Le;e[4]!==i?(Le={content:Fk,...i},e[4]=i,e[5]=Le):Le=e[5];const Oe=Le;let Ge;e[6]!==Oe||e[7]!==t?(Ge={},er.keys(t).forEach(Qe=>{const on=t[Qe],Wn={...Oe,...on};Ge[Qe]=Wn}),e[6]=Oe,e[7]=t,e[8]=Ge):Ge=e[8];const Ve=Ge;let Pe;e[9]!==P?(Pe=ud.cloneDeep(P),e[9]=P,e[10]=Pe):Pe=e[10];const ot=_e["Search(Placeholder)"];let Xe;e[11]!==ot?(Xe={"":{type:"String",placeholder:ot,value:""}},e[11]=ot,e[12]=Xe):Xe=e[12];const[lt,Ye]=Ho(Pe,Xe);let mt;e[13]!==Y?(mt=ud.cloneDeep(Y),e[13]=Y,e[14]=mt):mt=e[14];let bt;e[15]===Symbol.for("react.memo_cache_sentinel")?(bt={},e[15]=bt):bt=e[15];const[Mt,Nt]=Ho(mt,bt),[_t,rn]=N.useState(!1),pn=N.useRef(void 0),Kt=N.useRef(void 0);let dn,zt;e[16]!==lt?(dn=()=>{pn.current===void 0&&(pn.current=ud.cloneDeep(lt))},zt=[lt],e[16]=lt,e[17]=dn,e[18]=zt):(dn=e[17],zt=e[18]),N.useEffect(dn,zt);let wn,$t;e[19]!==Mt?(wn=()=>{Kt.current===void 0&&Mt&&(Kt.current=ud.cloneDeep(Mt))},$t=[Mt],e[19]=Mt,e[20]=wn,e[21]=$t):(wn=e[20],$t=e[21]),N.useEffect(wn,$t);let vn;e:{if(_t&&Mt){let on;e[22]!==Nt||e[23]!==Mt?(on=[Mt,Nt],e[22]=Nt,e[23]=Mt,e[24]=on):on=e[24],vn=on;break e}let Qe;e[25]!==lt||e[26]!==Ye?(Qe=[lt,Ye],e[25]=lt,e[26]=Ye,e[27]=Qe):Qe=e[27],vn=Qe}const[Pt,Yt]=vn,[ct,Tt]=N.useState(Pt);let It;e:{if(!S){let on;e[28]===Symbol.for("react.memo_cache_sentinel")?(on=[],e[28]=on):on=e[28],It=on;break e}let Qe;e[29]!==ct||e[30]!==Ve||e[31]!==S?(Qe=_h.applyFilteration(S,Ve,ct),e[29]=ct,e[30]=Ve,e[31]=S,e[32]=Qe):Qe=e[32],It=Qe}const ye=It;let se;e:{for(const Qe in ct){const on=ct[Qe];if(on.value!==void 0&&on.value!==null&&on.value!==""){se=!0;break e}}se=!1}const He=se,[We,pt]=Ho(H,void 0);let wt;e[33]!==Ve||e[34]!==ye||e[35]!==We?(wt=_h.applySortation(ye,Ve,We),e[33]=Ve,e[34]=ye,e[35]=We,e[36]=wt):wt=e[36];const qt=wt;let Jt;e:{if(I!==void 0){let Qe;e[37]!==Ve||e[38]!==I||e[39]!==We?(Qe=_h.applySortation(I,Ve,We),e[37]=Ve,e[38]=I,e[39]=We,e[40]=Qe):Qe=e[40],Jt=Qe;break e}Jt=void 0}const Vt=Jt,[hn,ln]=N.useState(!1),kn=x??hn,[Nn,En]=Ho(ee,q2);let Cn;e[41]!==Nn?(Cn={...q2,...Nn},e[41]=Nn,e[42]=Cn):Cn=e[42];const rr=Cn;let Bt;if(e[43]!==S||e[44]!==rr||e[45]!==O||e[46]!==kn||e[47]!==qt||e[48]!==Vt){const Qe={...rr};if(Vt!==void 0){const on=O??Vt.length,Wn=_h.getPages(on,Qe.pageSize);Qe.page<1&&(Qe.page=1),O!==void 0&&!kn&&Qe.page>Wn.length&&(Qe.page=Wn.length),Bt={pagedItems:Vt,totalCount:on,pagination:Qe}}else if(S!==void 0){const on=O??qt.length,Wn=_h.getPages(on,Qe.pageSize);Qe.page>Wn.length?Qe.page=Wn.length:Qe.page<1&&(Qe.page=1);const zr=_h.applyPagination(qt,Qe.page,Qe.pageSize);let Hr;e[50]!==zr||e[51]!==Qe||e[52]!==on?(Hr={pagedItems:zr,totalCount:on,pagination:Qe},e[50]=zr,e[51]=Qe,e[52]=on,e[53]=Hr):Hr=e[53],Bt=Hr}else{let on;e[54]===Symbol.for("react.memo_cache_sentinel")?(on=[],e[54]=on):on=e[54];const Wn=O??0;let zr;e[55]!==rr||e[56]!==Wn?(zr={pagedItems:on,totalCount:Wn,pagination:rr},e[55]=rr,e[56]=Wn,e[57]=zr):zr=e[57],Bt=zr}e[43]=S,e[44]=rr,e[45]=O,e[46]=kn,e[47]=qt,e[48]=Vt,e[49]=Bt}else Bt=e[49];const{pagedItems:Ut,totalCount:yn,pagination:Ft}=Bt;let jn;e[58]!==Ft.page||e[59]!==Ft.pageRange||e[60]!==Ft.pageSize||e[61]!==yn?(jn=_h.getRangedPages(Ft.page,yn,Ft.pageSize,Ft.pageRange),e[58]=Ft.page,e[59]=Ft.pageRange,e[60]=Ft.pageSize,e[61]=yn,e[62]=jn):jn=e[62];const{pages:Hn,rangedPages:Rn}=jn;let Et;e[63]!==h?(Et=h??[],e[63]=h,e[64]=Et):Et=e[64];const[rt,tn]=Et;let Ln;if(e[65]!==rt||e[66]!==Re||e[67]!==Ut){let Qe;e[69]!==rt||e[70]!==Re?(Qe=on=>rt==null?void 0:rt.some(Wn=>Re(Wn,on)),e[69]=rt,e[70]=Re,e[71]=Qe):Qe=e[71],Ln=Ut.filter(Qe),e[65]=rt,e[66]=Re,e[67]=Ut,e[68]=Ln}else Ln=e[68];const mr=Ln;let wr;if(e[72]!==y||e[73]!==Ut){let Qe;e[75]!==y?(Qe=on=>!(y!=null&&y(on)),e[75]=y,e[76]=Qe):Qe=e[76],wr=Ut.filter(Qe),e[72]=y,e[73]=Ut,e[74]=wr}else wr=e[74];const gn=wr;let Dt;e[77]!==Re||e[78]!==gn||e[79]!==mr?(Dt=gn.length>0&&gn.every(Qe=>mr.some(on=>Re(on,Qe))),e[77]=Re,e[78]=gn,e[79]=mr,e[80]=Dt):Dt=e[80];const Se=Dt;let it;e:{if(Se){it=!1;break e}let Qe;if(e[81]!==Re||e[82]!==gn||e[83]!==mr){let on;e[85]!==Re||e[86]!==mr?(on=Wn=>mr.some(zr=>Re(zr,Wn)),e[85]=Re,e[86]=mr,e[87]=on):on=e[87],Qe=gn.some(on),e[81]=Re,e[82]=gn,e[83]=mr,e[84]=Qe}else Qe=e[84];it=Qe}const St=it;let mn;e[88]!==rt||e[89]!==w||e[90]!==Re||e[91]!==Se||e[92]!==St||e[93]!==gn||e[94]!==tn?(mn=()=>{!rt||!tn||w||tn(Se||St?rt.filter(Qe=>!gn.some(on=>Re(on,Qe))):[...rt,...gn])},e[88]=rt,e[89]=w,e[90]=Re,e[91]=Se,e[92]=St,e[93]=gn,e[94]=tn,e[95]=mn):mn=e[95];const An=mn;let Gn;e[96]!==rt||e[97]!==w||e[98]!==Re||e[99]!==tn?(Gn=Qe=>{!rt||!tn||w||(rt.some(on=>Re(on,Qe))?tn(rt.filter(on=>!Re(on,Qe))):tn([...rt,Qe]))},e[96]=rt,e[97]=w,e[98]=Re,e[99]=tn,e[100]=Gn):Gn=e[100];const cr=Gn;let gr,Sn;e[101]!==y||e[102]!==rt||e[103]!==tn?(gr=()=>{if(!tn||!rt||!y)return;rt.filter(on=>y(on)).length>0&&tn(rt.filter(on=>!y(on)))},Sn=[y,rt,tn],e[101]=y,e[102]=rt,e[103]=tn,e[104]=gr,e[105]=Sn):(gr=e[104],Sn=e[105]),N.useEffect(gr,Sn);let Qn;e[106]!==rt||e[107]!==Se||e[108]!==St||e[109]!==An?(Qn=rt&&k.jsx(x1,{isIndeterminate:St,useCheck:[Se,An]}),e[106]=rt,e[107]=Se,e[108]=St,e[109]=An,e[110]=Qn):Qn=e[110];let xn;e[111]!==y||e[112]!==rt||e[113]!==Re||e[114]!==cr?(xn=Qe=>{const{item:on}=Qe,Wn=y==null?void 0:y(on),zr=typeof Wn=="string"?Wn:void 0,Hr=rt==null?void 0:rt.some(Ei=>Re(Ei,on));return k.jsx(x1,{isDisabled:Wn,style:{zIndex:1},tooltip:zr,useCheck:[Hr,()=>cr(on)],onClick:Bk})},e[111]=y,e[112]=rt,e[113]=Re,e[114]=cr,e[115]=xn):xn=e[115];let ur;e[116]!==Qn||e[117]!==xn?(ur={hContent:Qn,content:xn,minWidth:32,maxWidth:32},e[116]=Qn,e[117]=xn,e[118]=ur):ur=e[118];const si=ur;let xo;e:{if(!h){xo=Ve;break e}let Qe;e[119]!==si||e[120]!==Ve?(Qe={checkDef:si,...Ve},e[119]=si,e[120]=Ve,e[121]=Qe):Qe=e[121],xo=Qe}const wo=xo;let so;e[122]!==R||e[123]!==En||e[124]!==pt?(so=async Qe=>{R&&(ln(!0),await R(Qe),ln(!1)),En==null||En(Qe.pagination),pt==null||pt(Qe.sortation),Tt(Qe.filteration)},e[122]=R,e[123]=En,e[124]=pt,e[125]=so):so=e[125];const ai=so;let qi;e[126]===Symbol.for("react.memo_cache_sentinel")?(qi=Qe=>{var on;(on=Me.current)==null||on.call(Me,Qe)},e[126]=qi):qi=e[126];const Yi=qi;let Jl,Wo;e[127]!==be||e[128]!==S||e[129]!==Pt||e[130]!==ai||e[131]!==Ft||e[132]!==Yt||e[133]!==We?(Jl=()=>{if(!be)return;const Qe=Wn=>{const zr={entireItems:S,filteration:Pt,pagination:Ft,sortation:We},Hr=Wn?Wn(zr):zr;ai(Hr)},on=Wn=>{const zr={...Ft,page:1},Hr=Wn?Wn(Pt):Pt;Yt==null||Yt(Hr),ai({entireItems:S,filteration:Hr,pagination:zr,sortation:We})};be.current={fireOnStateChange:Qe,applyFilteration:on,scrollToSelected:Yi}},Wo=[be,ai,S,Yt,Pt,Ft,We,Yi],e[127]=be,e[128]=S,e[129]=Pt,e[130]=ai,e[131]=Ft,e[132]=Yt,e[133]=We,e[134]=Jl,e[135]=Wo):(Jl=e[134],Wo=e[135]),N.useEffect(Jl,Wo);let Co;e[136]!==ct||e[137]!==S||e[138]!==ai||e[139]!==Hn||e[140]!==Ft.page||e[141]!==Ft.pageSize||e[142]!==We?(Co=Qe=>{Qe.page===Ft.page&&Qe.pageSize===Ft.pageSize||(Qe.page<1?Qe.page=1:Qe.page>Hn[Hn.length-1]&&(Qe.page=Hn[Hn.length-1]),ai({entireItems:S,filteration:ct,pagination:Qe,sortation:We}))},e[136]=ct,e[137]=S,e[138]=ai,e[139]=Hn,e[140]=Ft.page,e[141]=Ft.pageSize,e[142]=We,e[143]=Co):Co=e[143];const ri=Co;let an;e[144]!==Yt?(an=Qe=>{Yt&&Yt(Qe)},e[144]=Yt,e[145]=an):an=e[145];const On=an;let Fr;e[146]!==ct||e[147]!==S||e[148]!==ai||e[149]!==Ft?(Fr=Qe=>{ai({entireItems:S,filteration:ct,pagination:Ft,sortation:Qe})},e[146]=ct,e[147]=S,e[148]=ai,e[149]=Ft,e[150]=Fr):Fr=e[150];const tr=Fr;let fr;e[151]!==ri||e[152]!==Ft?(fr=Qe=>{ri({...Ft,page:Qe})},e[151]=ri,e[152]=Ft,e[153]=fr):fr=e[153];const ir=fr;let Tr;e[154]!==ir||e[155]!==Ft.page?(Tr=()=>{ir(Ft.page-1)},e[154]=ir,e[155]=Ft.page,e[156]=Tr):Tr=e[156];const mi=Tr;let Li;e[157]!==ir||e[158]!==Ft.page?(Li=()=>{ir(Ft.page+1)},e[157]=ir,e[158]=Ft.page,e[159]=Li):Li=e[159];const Br=Li;let Uo;e[160]!==ir?(Uo=()=>{ir(1)},e[160]=ir,e[161]=Uo):Uo=e[161];const To=Uo;let Ro;e[162]!==ir||e[163]!==Hn?(Ro=()=>{ir(Hn[Hn.length-1])},e[162]=ir,e[163]=Hn,e[164]=Ro):Ro=e[164];const Oi=Ro;let Kr;e[165]!==ir||e[166]!==To||e[167]!==Oi||e[168]!==Br||e[169]!==mi?(Kr={move:ir,movePrev:mi,moveNext:Br,moveFirst:To,moveLast:Oi},e[165]=ir,e[166]=To,e[167]=Oi,e[168]=Br,e[169]=mi,e[170]=Kr):Kr=e[170];const Cr=Kr;let al;e[171]!==S||e[172]!==Pt||e[173]!==ai||e[174]!==Ft||e[175]!==We?(al=()=>{const Qe={...Ft,page:1};ai({entireItems:S,filteration:Pt,pagination:Qe,sortation:We})},e[171]=S,e[172]=Pt,e[173]=ai,e[174]=Ft,e[175]=We,e[176]=al):al=e[176];const Si=al;let ji;e[177]!==_t?(ji=()=>{rn(!_t)},e[177]=_t,e[178]=ji):ji=e[178];const cl=ji;let Io;e[179]!==lt||e[180]!==_t||e[181]!==Yt||e[182]!==Nt||e[183]!==Mt?(Io=()=>{if(_t&&Mt){const Qe=Kt.current;Qe?Nt==null||Nt($2(Mt,Qe)):Nt==null||Nt(j2(Mt))}else{const Qe=pn.current;Qe?Yt==null||Yt($2(lt,Qe)):Yt==null||Yt(j2(lt))}},e[179]=lt,e[180]=_t,e[181]=Yt,e[182]=Nt,e[183]=Mt,e[184]=Io):Io=e[184];const $i=Io;let ko;e[185]!==Si||e[186]!==$i||e[187]!==cl?(ko={apply:Si,toggle:cl,clear:$i},e[185]=Si,e[186]=$i,e[187]=cl,e[188]=ko):ko=e[188];const _o=ko;let go;e[189]!==S||e[190]!==Pt||e[191]!==j||e[192]!==ai||e[193]!==Ft||e[194]!==We?(go=()=>{j||ai({entireItems:S,filteration:Pt,pagination:Ft,sortation:We})},e[189]=S,e[190]=Pt,e[191]=j,e[192]=ai,e[193]=Ft,e[194]=We,e[195]=go):go=e[195],G3(go);let Mo;e[196]!==Ve?(Mo=er.map(Ve,on=>{const[Wn]=on;return Ve[Wn].minWidth??jh}).reduce(zk,0),e[196]=Ve,e[197]=Mo):Mo=e[197];const nr=Mo,po=le!==void 0;let hi;e[198]!==nr?(hi={minWidth:nr},e[198]=nr,e[199]=hi):hi=e[199];let Lo;e[200]!==re||e[201]!==he||e[202]!==rt||e[203]!==Ve||e[204]!==_o||e[205]!==pe||e[206]!==Pt||e[207]!==He||e[208]!==po||e[209]!==fe||e[210]!==ne||e[211]!==de||e[212]!==On||e[213]!==tr||e[214]!==W||e[215]!==_e||e[216]!==tn||e[217]!==We||e[218]!==_||e[219]!==Mt||e[220]!==yn||e[221]!==h?(Lo=!de&&k.jsx(Dk,{defs:Ve,filterF:_o,filterType:pe,hasToggleFilteration:Mt!==void 0,isFiltered:He,isRowRendered:po,noCount:fe,noFilter:ne,placeholder:W,resources:_e,title:_,TopLeftAddon:re,TopRightAddon:he,totalCount:yn,useCheck:h&&rt?[rt,tn]:void 0,useFilteration:[Pt,On],useSortation:[We,tr]}),e[200]=re,e[201]=he,e[202]=rt,e[203]=Ve,e[204]=_o,e[205]=pe,e[206]=Pt,e[207]=He,e[208]=po,e[209]=fe,e[210]=ne,e[211]=de,e[212]=On,e[213]=tr,e[214]=W,e[215]=_e,e[216]=tn,e[217]=We,e[218]=_,e[219]=Mt,e[220]=yn,e[221]=h,e[222]=Lo):Lo=e[222];let Vn;e[223]!==tr||e[224]!==We?(Vn=[We,tr],e[223]=tr,e[224]=We,e[225]=Vn):Vn=e[225];let Rr;e[226]===Symbol.for("react.memo_cache_sentinel")?(Rr=Qe=>Me.current=Qe,e[226]=Rr):Rr=e[226];let we;e[227]!==le||e[228]!==ct||e[229]!==wo||e[230]!==w||e[231]!==Re||e[232]!==kn||e[233]!==po||e[234]!==a||e[235]!==Z||e[236]!==ae||e[237]!==Ut||e[238]!==Ft||e[239]!==o||e[240]!==_e||e[241]!==Te||e[242]!==u||e[243]!==V||e[244]!==Vn||e[245]!==l?(we=k.jsx(tk,{appliedFilteration:ct,defs:wo,isEqual:Re,isLoading:kn,isRowRendered:po,isSelectMulti:a,isTableDisabled:w,noDefHeader:Z,noMarking:ae,pagedItems:Ut,pagination:Ft,resources:_e,rowHeight:Te,RowRenderer:le,rProps:o,selectDisabled:u,showRows:V,useSelect:l,useSortation:Vn,onScrollToSelectedReady:Rr}),e[227]=le,e[228]=ct,e[229]=wo,e[230]=w,e[231]=Re,e[232]=kn,e[233]=po,e[234]=a,e[235]=Z,e[236]=ae,e[237]=Ut,e[238]=Ft,e[239]=o,e[240]=_e,e[241]=Te,e[242]=u,e[243]=V,e[244]=Vn,e[245]=l,e[246]=we):we=e[246];let at;e[247]!==te||e[248]!==Cr||e[249]!==Hn||e[250]!==Ft||e[251]!==Rn?(at=!te&&k.jsx(ck,{pageF:Cr,pages:Hn,pagination:Ft,rangedPages:Rn}),e[247]=te,e[248]=Cr,e[249]=Hn,e[250]=Ft,e[251]=Rn,e[252]=at):at=e[252];let Rt;return e[253]!==w||e[254]!==hi||e[255]!==Lo||e[256]!==we||e[257]!==at?(Rt=k.jsxs(Gi,{className:DI.ATable,isDisabled:w,style:hi,children:[Lo,we,at]}),e[253]=w,e[254]=hi,e[255]=Lo,e[256]=we,e[257]=at,e[258]=Rt):Rt=e[258],Rt},Fk=n=>{const{defKey:e,item:t}=n;if(er.hasKey(t,e)){const r=t[e];return er.isReactNode(r)?r:null}else return null};function j2(n){const e={...n};for(const t in e)e[t].value=void 0;return e}function $2(n,e){const t={...n};for(const r in t){const i=e[r];i&&"value"in i?t[r].value=i.value:t[r].value=void 0}return t}function Bk(n){return n.stopPropagation()}function zk(n,e){return n+e}const Hk="_AText_1asz6_1",Wk={AText:Hk},X3=n=>{const e=Dn.c(12),{text:t,styled:r,style:i}=n;let o;if(e[0]!==i||e[1]!==r||e[2]!==t){e:{if(t)if(r)if(i){if(r===!0)if(i==="bold"){let h;e[4]!==t?(h=k.jsx("b",{children:t}),e[4]=t,e[5]=h):h=e[5],o=h;break e}else{let h;e[6]!==i||e[7]!==t?(h=k.jsx("span",{style:i,children:t}),e[6]=i,e[7]=t,e[8]=h):h=e[8],o=h;break e}else if(typeof r=="string"){const h=t.split(r);if(i==="bold"){o=h.map((y,x)=>k.jsxs(N.Fragment,{children:[g0(y),x<h.length-1?k.jsx("b",{children:g0(r)}):""]},x));break e}o=h.map((y,x)=>k.jsxs(N.Fragment,{children:[g0(y),x<h.length-1&&k.jsx("span",{style:i,children:g0(r)})]},x));break e}}else{o=t;break e}else{o=t;break e}else{o="";break e}o=void 0}e[0]=i,e[1]=r,e[2]=t,e[3]=o}else o=e[3];const l=o;let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a=gt.clsx("Body1Reading",Wk.AText,"NoSelect"),e[9]=a):a=e[9];let u;return e[10]!==l?(u=k.jsx("div",{className:a,children:l}),e[10]=l,e[11]=u):u=e[11],u};function g0(n){const e=n.split(`
|
|
287
|
-
`);return e.map((t,r)=>k.jsxs(N.Fragment,{children:[t,r!==e.length-1&&k.jsx("br",{})]},r))}const Uk="_Base_cpm4t_7",Gk="_ATextArea_cpm4t_11",Yk="_Primary_cpm4t_34",Vk="_UnAvailable_cpm4t_39",Zk="_Secondary_cpm4t_47",Xk="_ReadOnly_cpm4t_59",p0={Base:Uk,ATextArea:Gk,Primary:Yk,UnAvailable:Vk,Secondary:Zk,ReadOnly:Xk,Error:"_Error_cpm4t_66"},Kk=["Primary","Secondary","ReadOnly","Error"],Jk=n=>{const e=Dn.c(60);let t,r,i,o,l,a,u,h,y,x,w,_,S;if(e[0]!==n){const{onEnterPress:_e,errorMessage:Me,type:De,textAreaRef:Re,useValue:Le,rows:Oe,isReadonly:Ge,placeholder:Ve,maxLength:Pe,tabIndex:ot,autoFocus:Xe,textAreaProps:lt,...Ye}=n;a=_e,r=Me,_=Re,S=Le,h=Oe,i=Ge,u=Ve,l=Pe,x=ot,t=Xe,w=lt,o=De===void 0?"Primary":De,y=Bg(Ye),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13];const[R,I]=y;let O,P,Y,z;e[14]!==R?({wrapId:P,wrapProps:Y,labelProps:O,...z}=R,e[14]=R,e[15]=O,e[16]=P,e[17]=Y,e[18]=z):(O=e[15],P=e[16],Y=e[17],z=e[18]);let W;Qk(r)?W="Error":W=o;const B=W;let ee;B==="ReadOnly"?ee=!0:ee=i;const H=ee,V=I.isDisabled||I.isLoading,[de,Z]=Ho(S,"");let te;e[19]!==Z?(te=_e=>{Z&&Z(_e)},e[19]=Z,e[20]=te):te=e[20];const ne=te;let fe;e[21]!==ne||e[22]!==w||e[23]!==V?(fe=_e=>{var Me;V||(ne(_e.target.value),(Me=w==null?void 0:w.onChange)==null||Me.call(w,_e))},e[21]=ne,e[22]=w,e[23]=V,e[24]=fe):fe=e[24];const ae=fe;let j;e[25]!==a||e[26]!==w||e[27]!==V?(j=_e=>{var Me;if(!V){if((Me=w==null?void 0:w.onKeyDown)==null||Me.call(w,_e),_e.key==="Tab"){const De=_e.currentTarget.selectionStart,Re=_e.currentTarget.selectionEnd;_e.currentTarget.value=_e.currentTarget.value.substring(0,De)+" "+_e.currentTarget.value.substring(Re),_e.currentTarget.selectionStart=_e.currentTarget.selectionEnd=De+1,_e.preventDefault()}else _e.key==="Enter"&&(a==null||a(_e.currentTarget.value),_e.stopPropagation());_e.key!=="Escape"&&_e.stopPropagation()}},e[25]=a,e[26]=w,e[27]=V,e[28]=j):j=e[28];const re=j;let he;e[29]!==O||e[30]!==P||e[31]!==Y||e[32]!==z?(he={wrapId:P,wrapProps:Y,labelProps:O,...z},e[29]=O,e[30]=P,e[31]=Y,e[32]=z,e[33]=he):he=e[33];let be;e[34]!==I.className?(be=gt.clsx(p0.Base,I.className),e[34]=I.className,e[35]=be):be=e[35];let le;e[36]!==(w==null?void 0:w.className)||e[37]!==B||e[38]!==V?(le=gt.clsx(p0.ATextArea,p0[B],V&&p0.UnAvailable,w==null?void 0:w.className),e[36]=w==null?void 0:w.className,e[37]=B,e[38]=V,e[39]=le):le=e[39];const J=I.isDisabled||I.isLoading?-1:x;let pe;e[40]!==t||e[41]!==H||e[42]!==l||e[43]!==ae||e[44]!==re||e[45]!==u||e[46]!==h||e[47]!==J||e[48]!==le||e[49]!==w||e[50]!==_||e[51]!==de?(pe=k.jsx("textarea",{...w,ref:_,autoFocus:t,className:le,maxLength:l,placeholder:u,readOnly:H,rows:h,tabIndex:J,value:de,onChange:ae,onKeyDown:re}),e[40]=t,e[41]=H,e[42]=l,e[43]=ae,e[44]=re,e[45]=u,e[46]=h,e[47]=J,e[48]=le,e[49]=w,e[50]=_,e[51]=de,e[52]=pe):pe=e[52];let Te;e[53]!==I||e[54]!==pe||e[55]!==be?(Te=k.jsx(Gi,{...I,className:be,children:pe}),e[53]=I,e[54]=pe,e[55]=be,e[56]=Te):Te=e[56];let Fe;return e[57]!==Te||e[58]!==he?(Fe=k.jsx(lg,{...he,children:Te}),e[57]=Te,e[58]=he,e[59]=Fe):Fe=e[59],Fe};function Qk(n){return Array.isArray(n)?n.filter(Boolean).length>0:!!n}/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:K3,setPrototypeOf:ex,isFrozen:qk,getPrototypeOf:jk,getOwnPropertyDescriptor:$k}=Object;let{freeze:Ou,seal:bd,create:ky}=Object,{apply:My,construct:Ly}=typeof Reflect<"u"&&Reflect;Ou||(Ou=function(e){return e});bd||(bd=function(e){return e});My||(My=function(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return e.apply(t,i)});Ly||(Ly=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return new e(...r)});const v0=Pu(Array.prototype.forEach),e7=Pu(Array.prototype.lastIndexOf),tx=Pu(Array.prototype.pop),ep=Pu(Array.prototype.push),t7=Pu(Array.prototype.splice),G0=Pu(String.prototype.toLowerCase),sb=Pu(String.prototype.toString),ab=Pu(String.prototype.match),tp=Pu(String.prototype.replace),n7=Pu(String.prototype.indexOf),r7=Pu(String.prototype.trim),Rd=Pu(Object.prototype.hasOwnProperty),Mu=Pu(RegExp.prototype.test),np=i7(TypeError);function Pu(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return My(n,e,r)}}function i7(n){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ly(n,t)}}function Mi(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:G0;ex&&ex(n,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const o=t(i);o!==i&&(qk(e)||(e[r]=o),i=o)}n[i]=!0}return n}function o7(n){for(let e=0;e<n.length;e++)Rd(n,e)||(n[e]=null);return n}function Ch(n){const e=ky(null);for(const[t,r]of K3(n))Rd(n,t)&&(Array.isArray(r)?e[t]=o7(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=Ch(r):e[t]=r);return e}function rp(n,e){for(;n!==null;){const r=$k(n,e);if(r){if(r.get)return Pu(r.get);if(typeof r.value=="function")return Pu(r.value)}n=jk(n)}function t(){return null}return t}const nx=Ou(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cb=Ou(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ub=Ou(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),l7=Ou(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fb=Ou(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),s7=Ou(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rx=Ou(["#text"]),ix=Ou(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),db=Ou(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ox=Ou(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),b0=Ou(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),a7=bd(/\{\{[\w\W]*|[\w\W]*\}\}/gm),c7=bd(/<%[\w\W]*|[\w\W]*%>/gm),u7=bd(/\$\{[\w\W]*/gm),f7=bd(/^data-[\-\w.\u00B7-\uFFFF]+$/),d7=bd(/^aria-[\-\w]+$/),J3=bd(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),h7=bd(/^(?:\w+script|data):/i),g7=bd(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q3=bd(/^html$/i),p7=bd(/^[a-z][.\w]*(-[.\w]+)+$/i);var lx=Object.freeze({__proto__:null,ARIA_ATTR:d7,ATTR_WHITESPACE:g7,CUSTOM_ELEMENT:p7,DATA_ATTR:f7,DOCTYPE_NAME:Q3,ERB_EXPR:c7,IS_ALLOWED_URI:J3,IS_SCRIPT_OR_DATA:h7,MUSTACHE_EXPR:a7,TMPLIT_EXPR:u7});const ip={element:1,text:3,progressingInstruction:7,comment:8,document:9},v7=function(){return typeof window>"u"?null:window},b7=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(r=t.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},sx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function q3(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v7();const e=Dt=>q3(Dt);if(e.version="3.3.0",e.removed=[],!n||!n.document||n.document.nodeType!==ip.document||!n.Element)return e.isSupported=!1,e;let{document:t}=n;const r=t,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:a,Element:u,NodeFilter:h,NamedNodeMap:y=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:x,DOMParser:w,trustedTypes:_}=n,S=u.prototype,R=rp(S,"cloneNode"),I=rp(S,"remove"),O=rp(S,"nextSibling"),P=rp(S,"childNodes"),Y=rp(S,"parentNode");if(typeof l=="function"){const Dt=t.createElement("template");Dt.content&&Dt.content.ownerDocument&&(t=Dt.content.ownerDocument)}let z,W="";const{implementation:B,createNodeIterator:ee,createDocumentFragment:H,getElementsByTagName:V}=t,{importNode:de}=r;let Z=sx();e.isSupported=typeof K3=="function"&&typeof Y=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:te,ERB_EXPR:ne,TMPLIT_EXPR:fe,DATA_ATTR:ae,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:re,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:be}=lx;let{IS_ALLOWED_URI:le}=lx,J=null;const pe=Mi({},[...nx,...cb,...ub,...fb,...rx]);let Te=null;const Fe=Mi({},[...ix,...db,...ox,...b0]);let _e=Object.seal(ky(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Me=null,De=null;const Re=Object.seal(ky(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,Oe=!0,Ge=!1,Ve=!0,Pe=!1,ot=!0,Xe=!1,lt=!1,Ye=!1,mt=!1,bt=!1,Mt=!1,Nt=!0,_t=!1;const rn="user-content-";let pn=!0,Kt=!1,dn={},zt=null;const wn=Mi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $t=null;const vn=Mi({},["audio","video","img","source","image","track"]);let Pt=null;const Yt=Mi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ct="http://www.w3.org/1998/Math/MathML",Tt="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml";let ye=It,se=!1,He=null;const We=Mi({},[ct,Tt,It],sb);let pt=Mi({},["mi","mo","mn","ms","mtext"]),wt=Mi({},["annotation-xml"]);const qt=Mi({},["title","style","font","a","script"]);let Jt=null;const Vt=["application/xhtml+xml","text/html"],hn="text/html";let ln=null,kn=null;const Nn=t.createElement("form"),En=function(Se){return Se instanceof RegExp||Se instanceof Function},Cn=function(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kn&&kn===Se)){if((!Se||typeof Se!="object")&&(Se={}),Se=Ch(Se),Jt=Vt.indexOf(Se.PARSER_MEDIA_TYPE)===-1?hn:Se.PARSER_MEDIA_TYPE,ln=Jt==="application/xhtml+xml"?sb:G0,J=Rd(Se,"ALLOWED_TAGS")?Mi({},Se.ALLOWED_TAGS,ln):pe,Te=Rd(Se,"ALLOWED_ATTR")?Mi({},Se.ALLOWED_ATTR,ln):Fe,He=Rd(Se,"ALLOWED_NAMESPACES")?Mi({},Se.ALLOWED_NAMESPACES,sb):We,Pt=Rd(Se,"ADD_URI_SAFE_ATTR")?Mi(Ch(Yt),Se.ADD_URI_SAFE_ATTR,ln):Yt,$t=Rd(Se,"ADD_DATA_URI_TAGS")?Mi(Ch(vn),Se.ADD_DATA_URI_TAGS,ln):vn,zt=Rd(Se,"FORBID_CONTENTS")?Mi({},Se.FORBID_CONTENTS,ln):wn,Me=Rd(Se,"FORBID_TAGS")?Mi({},Se.FORBID_TAGS,ln):Ch({}),De=Rd(Se,"FORBID_ATTR")?Mi({},Se.FORBID_ATTR,ln):Ch({}),dn=Rd(Se,"USE_PROFILES")?Se.USE_PROFILES:!1,Le=Se.ALLOW_ARIA_ATTR!==!1,Oe=Se.ALLOW_DATA_ATTR!==!1,Ge=Se.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=Se.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Pe=Se.SAFE_FOR_TEMPLATES||!1,ot=Se.SAFE_FOR_XML!==!1,Xe=Se.WHOLE_DOCUMENT||!1,mt=Se.RETURN_DOM||!1,bt=Se.RETURN_DOM_FRAGMENT||!1,Mt=Se.RETURN_TRUSTED_TYPE||!1,Ye=Se.FORCE_BODY||!1,Nt=Se.SANITIZE_DOM!==!1,_t=Se.SANITIZE_NAMED_PROPS||!1,pn=Se.KEEP_CONTENT!==!1,Kt=Se.IN_PLACE||!1,le=Se.ALLOWED_URI_REGEXP||J3,ye=Se.NAMESPACE||It,pt=Se.MATHML_TEXT_INTEGRATION_POINTS||pt,wt=Se.HTML_INTEGRATION_POINTS||wt,_e=Se.CUSTOM_ELEMENT_HANDLING||{},Se.CUSTOM_ELEMENT_HANDLING&&En(Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&En(Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&typeof Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(_e.allowCustomizedBuiltInElements=Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pe&&(Oe=!1),bt&&(mt=!0),dn&&(J=Mi({},rx),Te=[],dn.html===!0&&(Mi(J,nx),Mi(Te,ix)),dn.svg===!0&&(Mi(J,cb),Mi(Te,db),Mi(Te,b0)),dn.svgFilters===!0&&(Mi(J,ub),Mi(Te,db),Mi(Te,b0)),dn.mathMl===!0&&(Mi(J,fb),Mi(Te,ox),Mi(Te,b0))),Se.ADD_TAGS&&(typeof Se.ADD_TAGS=="function"?Re.tagCheck=Se.ADD_TAGS:(J===pe&&(J=Ch(J)),Mi(J,Se.ADD_TAGS,ln))),Se.ADD_ATTR&&(typeof Se.ADD_ATTR=="function"?Re.attributeCheck=Se.ADD_ATTR:(Te===Fe&&(Te=Ch(Te)),Mi(Te,Se.ADD_ATTR,ln))),Se.ADD_URI_SAFE_ATTR&&Mi(Pt,Se.ADD_URI_SAFE_ATTR,ln),Se.FORBID_CONTENTS&&(zt===wn&&(zt=Ch(zt)),Mi(zt,Se.FORBID_CONTENTS,ln)),pn&&(J["#text"]=!0),Xe&&Mi(J,["html","head","body"]),J.table&&(Mi(J,["tbody"]),delete Me.tbody),Se.TRUSTED_TYPES_POLICY){if(typeof Se.TRUSTED_TYPES_POLICY.createHTML!="function")throw np('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Se.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw np('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');z=Se.TRUSTED_TYPES_POLICY,W=z.createHTML("")}else z===void 0&&(z=b7(_,i)),z!==null&&typeof W=="string"&&(W=z.createHTML(""));Ou&&Ou(Se),kn=Se}},rr=Mi({},[...cb,...ub,...l7]),Bt=Mi({},[...fb,...s7]),Ut=function(Se){let it=Y(Se);(!it||!it.tagName)&&(it={namespaceURI:ye,tagName:"template"});const St=G0(Se.tagName),mn=G0(it.tagName);return He[Se.namespaceURI]?Se.namespaceURI===Tt?it.namespaceURI===It?St==="svg":it.namespaceURI===ct?St==="svg"&&(mn==="annotation-xml"||pt[mn]):!!rr[St]:Se.namespaceURI===ct?it.namespaceURI===It?St==="math":it.namespaceURI===Tt?St==="math"&&wt[mn]:!!Bt[St]:Se.namespaceURI===It?it.namespaceURI===Tt&&!wt[mn]||it.namespaceURI===ct&&!pt[mn]?!1:!Bt[St]&&(qt[St]||!rr[St]):!!(Jt==="application/xhtml+xml"&&He[Se.namespaceURI]):!1},yn=function(Se){ep(e.removed,{element:Se});try{Y(Se).removeChild(Se)}catch{I(Se)}},Ft=function(Se,it){try{ep(e.removed,{attribute:it.getAttributeNode(Se),from:it})}catch{ep(e.removed,{attribute:null,from:it})}if(it.removeAttribute(Se),Se==="is")if(mt||bt)try{yn(it)}catch{}else try{it.setAttribute(Se,"")}catch{}},jn=function(Se){let it=null,St=null;if(Ye)Se="<remove></remove>"+Se;else{const Gn=ab(Se,/^[\r\n\t ]+/);St=Gn&&Gn[0]}Jt==="application/xhtml+xml"&&ye===It&&(Se='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Se+"</body></html>");const mn=z?z.createHTML(Se):Se;if(ye===It)try{it=new w().parseFromString(mn,Jt)}catch{}if(!it||!it.documentElement){it=B.createDocument(ye,"template",null);try{it.documentElement.innerHTML=se?W:mn}catch{}}const An=it.body||it.documentElement;return Se&&St&&An.insertBefore(t.createTextNode(St),An.childNodes[0]||null),ye===It?V.call(it,Xe?"html":"body")[0]:Xe?it.documentElement:An},Hn=function(Se){return ee.call(Se.ownerDocument||Se,Se,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Rn=function(Se){return Se instanceof x&&(typeof Se.nodeName!="string"||typeof Se.textContent!="string"||typeof Se.removeChild!="function"||!(Se.attributes instanceof y)||typeof Se.removeAttribute!="function"||typeof Se.setAttribute!="function"||typeof Se.namespaceURI!="string"||typeof Se.insertBefore!="function"||typeof Se.hasChildNodes!="function")},Et=function(Se){return typeof a=="function"&&Se instanceof a};function rt(Dt,Se,it){v0(Dt,St=>{St.call(e,Se,it,kn)})}const tn=function(Se){let it=null;if(rt(Z.beforeSanitizeElements,Se,null),Rn(Se))return yn(Se),!0;const St=ln(Se.nodeName);if(rt(Z.uponSanitizeElement,Se,{tagName:St,allowedTags:J}),ot&&Se.hasChildNodes()&&!Et(Se.firstElementChild)&&Mu(/<[/\w!]/g,Se.innerHTML)&&Mu(/<[/\w!]/g,Se.textContent)||Se.nodeType===ip.progressingInstruction||ot&&Se.nodeType===ip.comment&&Mu(/<[/\w]/g,Se.data))return yn(Se),!0;if(!(Re.tagCheck instanceof Function&&Re.tagCheck(St))&&(!J[St]||Me[St])){if(!Me[St]&&mr(St)&&(_e.tagNameCheck instanceof RegExp&&Mu(_e.tagNameCheck,St)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(St)))return!1;if(pn&&!zt[St]){const mn=Y(Se)||Se.parentNode,An=P(Se)||Se.childNodes;if(An&&mn){const Gn=An.length;for(let cr=Gn-1;cr>=0;--cr){const gr=R(An[cr],!0);gr.__removalCount=(Se.__removalCount||0)+1,mn.insertBefore(gr,O(Se))}}}return yn(Se),!0}return Se instanceof u&&!Ut(Se)||(St==="noscript"||St==="noembed"||St==="noframes")&&Mu(/<\/no(script|embed|frames)/i,Se.innerHTML)?(yn(Se),!0):(Pe&&Se.nodeType===ip.text&&(it=Se.textContent,v0([te,ne,fe],mn=>{it=tp(it,mn," ")}),Se.textContent!==it&&(ep(e.removed,{element:Se.cloneNode()}),Se.textContent=it)),rt(Z.afterSanitizeElements,Se,null),!1)},Ln=function(Se,it,St){if(Nt&&(it==="id"||it==="name")&&(St in t||St in Nn))return!1;if(!(Oe&&!De[it]&&Mu(ae,it))){if(!(Le&&Mu(j,it))){if(!(Re.attributeCheck instanceof Function&&Re.attributeCheck(it,Se))){if(!Te[it]||De[it]){if(!(mr(Se)&&(_e.tagNameCheck instanceof RegExp&&Mu(_e.tagNameCheck,Se)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(Se))&&(_e.attributeNameCheck instanceof RegExp&&Mu(_e.attributeNameCheck,it)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(it,Se))||it==="is"&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&Mu(_e.tagNameCheck,St)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(St))))return!1}else if(!Pt[it]){if(!Mu(le,tp(St,he,""))){if(!((it==="src"||it==="xlink:href"||it==="href")&&Se!=="script"&&n7(St,"data:")===0&&$t[Se])){if(!(Ge&&!Mu(re,tp(St,he,"")))){if(St)return!1}}}}}}}return!0},mr=function(Se){return Se!=="annotation-xml"&&ab(Se,be)},wr=function(Se){rt(Z.beforeSanitizeAttributes,Se,null);const{attributes:it}=Se;if(!it||Rn(Se))return;const St={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te,forceKeepAttr:void 0};let mn=it.length;for(;mn--;){const An=it[mn],{name:Gn,namespaceURI:cr,value:gr}=An,Sn=ln(Gn),Qn=gr;let xn=Gn==="value"?Qn:r7(Qn);if(St.attrName=Sn,St.attrValue=xn,St.keepAttr=!0,St.forceKeepAttr=void 0,rt(Z.uponSanitizeAttribute,Se,St),xn=St.attrValue,_t&&(Sn==="id"||Sn==="name")&&(Ft(Gn,Se),xn=rn+xn),ot&&Mu(/((--!?|])>)|<\/(style|title|textarea)/i,xn)){Ft(Gn,Se);continue}if(Sn==="attributename"&&ab(xn,"href")){Ft(Gn,Se);continue}if(St.forceKeepAttr)continue;if(!St.keepAttr){Ft(Gn,Se);continue}if(!Ve&&Mu(/\/>/i,xn)){Ft(Gn,Se);continue}Pe&&v0([te,ne,fe],si=>{xn=tp(xn,si," ")});const ur=ln(Se.nodeName);if(!Ln(ur,Sn,xn)){Ft(Gn,Se);continue}if(z&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!cr)switch(_.getAttributeType(ur,Sn)){case"TrustedHTML":{xn=z.createHTML(xn);break}case"TrustedScriptURL":{xn=z.createScriptURL(xn);break}}if(xn!==Qn)try{cr?Se.setAttributeNS(cr,Gn,xn):Se.setAttribute(Gn,xn),Rn(Se)?yn(Se):tx(e.removed)}catch{Ft(Gn,Se)}}rt(Z.afterSanitizeAttributes,Se,null)},gn=function Dt(Se){let it=null;const St=Hn(Se);for(rt(Z.beforeSanitizeShadowDOM,Se,null);it=St.nextNode();)rt(Z.uponSanitizeShadowNode,it,null),tn(it),wr(it),it.content instanceof o&&Dt(it.content);rt(Z.afterSanitizeShadowDOM,Se,null)};return e.sanitize=function(Dt){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},it=null,St=null,mn=null,An=null;if(se=!Dt,se&&(Dt="<!-->"),typeof Dt!="string"&&!Et(Dt))if(typeof Dt.toString=="function"){if(Dt=Dt.toString(),typeof Dt!="string")throw np("dirty is not a string, aborting")}else throw np("toString is not a function");if(!e.isSupported)return Dt;if(lt||Cn(Se),e.removed=[],typeof Dt=="string"&&(Kt=!1),Kt){if(Dt.nodeName){const gr=ln(Dt.nodeName);if(!J[gr]||Me[gr])throw np("root node is forbidden and cannot be sanitized in-place")}}else if(Dt instanceof a)it=jn("<!---->"),St=it.ownerDocument.importNode(Dt,!0),St.nodeType===ip.element&&St.nodeName==="BODY"||St.nodeName==="HTML"?it=St:it.appendChild(St);else{if(!mt&&!Pe&&!Xe&&Dt.indexOf("<")===-1)return z&&Mt?z.createHTML(Dt):Dt;if(it=jn(Dt),!it)return mt?null:Mt?W:""}it&&Ye&&yn(it.firstChild);const Gn=Hn(Kt?Dt:it);for(;mn=Gn.nextNode();)tn(mn),wr(mn),mn.content instanceof o&&gn(mn.content);if(Kt)return Dt;if(mt){if(bt)for(An=H.call(it.ownerDocument);it.firstChild;)An.appendChild(it.firstChild);else An=it;return(Te.shadowroot||Te.shadowrootmode)&&(An=de.call(r,An,!0)),An}let cr=Xe?it.outerHTML:it.innerHTML;return Xe&&J["!doctype"]&&it.ownerDocument&&it.ownerDocument.doctype&&it.ownerDocument.doctype.name&&Mu(Q3,it.ownerDocument.doctype.name)&&(cr="<!DOCTYPE "+it.ownerDocument.doctype.name+`>
|
|
288
|
-
`+cr),Pe&&v0([te,ne,fe],gr=>{cr=tp(cr,gr," ")}),z&&Mt?z.createHTML(cr):cr},e.setConfig=function(){let Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cn(Dt),lt=!0},e.clearConfig=function(){kn=null,lt=!1},e.isValidAttribute=function(Dt,Se,it){kn||Cn({});const St=ln(Dt),mn=ln(Se);return Ln(St,mn,it)},e.addHook=function(Dt,Se){typeof Se=="function"&&ep(Z[Dt],Se)},e.removeHook=function(Dt,Se){if(Se!==void 0){const it=e7(Z[Dt],Se);return it===-1?void 0:t7(Z[Dt],it,1)[0]}return tx(Z[Dt])},e.removeHooks=function(Dt){Z[Dt]=[]},e.removeAllHooks=function(){Z=sx()},e}var y7=q3(),y0={exports:{}},hb,ax;function m7(){if(ax)return hb;ax=1;var n=-1,e=1,t=0;function r(Z,te,ne,fe,ae){if(Z===te)return Z?[[t,Z]]:[];if(ne!=null){var j=V(Z,te,ne);if(j)return j}var re=a(Z,te),he=Z.substring(0,re);Z=Z.substring(re),te=te.substring(re),re=h(Z,te);var be=Z.substring(Z.length-re);Z=Z.substring(0,Z.length-re),te=te.substring(0,te.length-re);var le=i(Z,te);return he&&le.unshift([t,he]),be&&le.push([t,be]),P(le,ae),fe&&x(le),le}function i(Z,te){var ne;if(!Z)return[[e,te]];if(!te)return[[n,Z]];var fe=Z.length>te.length?Z:te,ae=Z.length>te.length?te:Z,j=fe.indexOf(ae);if(j!==-1)return ne=[[e,fe.substring(0,j)],[t,ae],[e,fe.substring(j+ae.length)]],Z.length>te.length&&(ne[0][0]=ne[2][0]=n),ne;if(ae.length===1)return[[n,Z],[e,te]];var re=y(Z,te);if(re){var he=re[0],be=re[1],le=re[2],J=re[3],pe=re[4],Te=r(he,le),Fe=r(be,J);return Te.concat([[t,pe]],Fe)}return o(Z,te)}function o(Z,te){for(var ne=Z.length,fe=te.length,ae=Math.ceil((ne+fe)/2),j=ae,re=2*ae,he=new Array(re),be=new Array(re),le=0;le<re;le++)he[le]=-1,be[le]=-1;he[j+1]=0,be[j+1]=0;for(var J=ne-fe,pe=J%2!==0,Te=0,Fe=0,_e=0,Me=0,De=0;De<ae;De++){for(var Re=-De+Te;Re<=De-Fe;Re+=2){var Le=j+Re,Oe;Re===-De||Re!==De&&he[Le-1]<he[Le+1]?Oe=he[Le+1]:Oe=he[Le-1]+1;for(var Ge=Oe-Re;Oe<ne&&Ge<fe&&Z.charAt(Oe)===te.charAt(Ge);)Oe++,Ge++;if(he[Le]=Oe,Oe>ne)Fe+=2;else if(Ge>fe)Te+=2;else if(pe){var Ve=j+J-Re;if(Ve>=0&&Ve<re&&be[Ve]!==-1){var Pe=ne-be[Ve];if(Oe>=Pe)return l(Z,te,Oe,Ge)}}}for(var ot=-De+_e;ot<=De-Me;ot+=2){var Ve=j+ot,Pe;ot===-De||ot!==De&&be[Ve-1]<be[Ve+1]?Pe=be[Ve+1]:Pe=be[Ve-1]+1;for(var Xe=Pe-ot;Pe<ne&&Xe<fe&&Z.charAt(ne-Pe-1)===te.charAt(fe-Xe-1);)Pe++,Xe++;if(be[Ve]=Pe,Pe>ne)Me+=2;else if(Xe>fe)_e+=2;else if(!pe){var Le=j+J-ot;if(Le>=0&&Le<re&&he[Le]!==-1){var Oe=he[Le],Ge=j+Oe-Le;if(Pe=ne-Pe,Oe>=Pe)return l(Z,te,Oe,Ge)}}}}return[[n,Z],[e,te]]}function l(Z,te,ne,fe){var ae=Z.substring(0,ne),j=te.substring(0,fe),re=Z.substring(ne),he=te.substring(fe),be=r(ae,j),le=r(re,he);return be.concat(le)}function a(Z,te){if(!Z||!te||Z.charAt(0)!==te.charAt(0))return 0;for(var ne=0,fe=Math.min(Z.length,te.length),ae=fe,j=0;ne<ae;)Z.substring(j,ae)==te.substring(j,ae)?(ne=ae,j=ne):fe=ae,ae=Math.floor((fe-ne)/2+ne);return Y(Z.charCodeAt(ae-1))&&ae--,ae}function u(Z,te){var ne=Z.length,fe=te.length;if(ne==0||fe==0)return 0;ne>fe?Z=Z.substring(ne-fe):ne<fe&&(te=te.substring(0,ne));var ae=Math.min(ne,fe);if(Z==te)return ae;for(var j=0,re=1;;){var he=Z.substring(ae-re),be=te.indexOf(he);if(be==-1)return j;re+=be,(be==0||Z.substring(ae-re)==te.substring(0,re))&&(j=re,re++)}}function h(Z,te){if(!Z||!te||Z.slice(-1)!==te.slice(-1))return 0;for(var ne=0,fe=Math.min(Z.length,te.length),ae=fe,j=0;ne<ae;)Z.substring(Z.length-ae,Z.length-j)==te.substring(te.length-ae,te.length-j)?(ne=ae,j=ne):fe=ae,ae=Math.floor((fe-ne)/2+ne);return z(Z.charCodeAt(Z.length-ae))&&ae--,ae}function y(Z,te){var ne=Z.length>te.length?Z:te,fe=Z.length>te.length?te:Z;if(ne.length<4||fe.length*2<ne.length)return null;function ae(Fe,_e,Me){for(var De=Fe.substring(Me,Me+Math.floor(Fe.length/4)),Re=-1,Le="",Oe,Ge,Ve,Pe;(Re=_e.indexOf(De,Re+1))!==-1;){var ot=a(Fe.substring(Me),_e.substring(Re)),Xe=h(Fe.substring(0,Me),_e.substring(0,Re));Le.length<Xe+ot&&(Le=_e.substring(Re-Xe,Re)+_e.substring(Re,Re+ot),Oe=Fe.substring(0,Me-Xe),Ge=Fe.substring(Me+ot),Ve=_e.substring(0,Re-Xe),Pe=_e.substring(Re+ot))}return Le.length*2>=Fe.length?[Oe,Ge,Ve,Pe,Le]:null}var j=ae(ne,fe,Math.ceil(ne.length/4)),re=ae(ne,fe,Math.ceil(ne.length/2)),he;if(!j&&!re)return null;re?j?he=j[4].length>re[4].length?j:re:he=re:he=j;var be,le,J,pe;Z.length>te.length?(be=he[0],le=he[1],J=he[2],pe=he[3]):(J=he[0],pe=he[1],be=he[2],le=he[3]);var Te=he[4];return[be,le,J,pe,Te]}function x(Z){for(var te=!1,ne=[],fe=0,ae=null,j=0,re=0,he=0,be=0,le=0;j<Z.length;)Z[j][0]==t?(ne[fe++]=j,re=be,he=le,be=0,le=0,ae=Z[j][1]):(Z[j][0]==e?be+=Z[j][1].length:le+=Z[j][1].length,ae&&ae.length<=Math.max(re,he)&&ae.length<=Math.max(be,le)&&(Z.splice(ne[fe-1],0,[n,ae]),Z[ne[fe-1]+1][0]=e,fe--,fe--,j=fe>0?ne[fe-1]:-1,re=0,he=0,be=0,le=0,ae=null,te=!0)),j++;for(te&&P(Z),O(Z),j=1;j<Z.length;){if(Z[j-1][0]==n&&Z[j][0]==e){var J=Z[j-1][1],pe=Z[j][1],Te=u(J,pe),Fe=u(pe,J);Te>=Fe?(Te>=J.length/2||Te>=pe.length/2)&&(Z.splice(j,0,[t,pe.substring(0,Te)]),Z[j-1][1]=J.substring(0,J.length-Te),Z[j+1][1]=pe.substring(Te),j++):(Fe>=J.length/2||Fe>=pe.length/2)&&(Z.splice(j,0,[t,J.substring(0,Fe)]),Z[j-1][0]=e,Z[j-1][1]=pe.substring(0,pe.length-Fe),Z[j+1][0]=n,Z[j+1][1]=J.substring(Fe),j++),j++}j++}}var w=/[^a-zA-Z0-9]/,_=/\s/,S=/[\r\n]/,R=/\n\r?\n$/,I=/^\r?\n\r?\n/;function O(Z){function te(Fe,_e){if(!Fe||!_e)return 6;var Me=Fe.charAt(Fe.length-1),De=_e.charAt(0),Re=Me.match(w),Le=De.match(w),Oe=Re&&Me.match(_),Ge=Le&&De.match(_),Ve=Oe&&Me.match(S),Pe=Ge&&De.match(S),ot=Ve&&Fe.match(R),Xe=Pe&&_e.match(I);return ot||Xe?5:Ve||Pe?4:Re&&!Oe&&Ge?3:Oe||Ge?2:Re||Le?1:0}for(var ne=1;ne<Z.length-1;){if(Z[ne-1][0]==t&&Z[ne+1][0]==t){var fe=Z[ne-1][1],ae=Z[ne][1],j=Z[ne+1][1],re=h(fe,ae);if(re){var he=ae.substring(ae.length-re);fe=fe.substring(0,fe.length-re),ae=he+ae.substring(0,ae.length-re),j=he+j}for(var be=fe,le=ae,J=j,pe=te(fe,ae)+te(ae,j);ae.charAt(0)===j.charAt(0);){fe+=ae.charAt(0),ae=ae.substring(1)+j.charAt(0),j=j.substring(1);var Te=te(fe,ae)+te(ae,j);Te>=pe&&(pe=Te,be=fe,le=ae,J=j)}Z[ne-1][1]!=be&&(be?Z[ne-1][1]=be:(Z.splice(ne-1,1),ne--),Z[ne][1]=le,J?Z[ne+1][1]=J:(Z.splice(ne+1,1),ne--))}ne++}}function P(Z,te){Z.push([t,""]);for(var ne=0,fe=0,ae=0,j="",re="",he;ne<Z.length;){if(ne<Z.length-1&&!Z[ne][1]){Z.splice(ne,1);continue}switch(Z[ne][0]){case e:ae++,re+=Z[ne][1],ne++;break;case n:fe++,j+=Z[ne][1],ne++;break;case t:var be=ne-ae-fe-1;if(te){if(be>=0&&B(Z[be][1])){var le=Z[be][1].slice(-1);if(Z[be][1]=Z[be][1].slice(0,-1),j=le+j,re=le+re,!Z[be][1]){Z.splice(be,1),ne--;var J=be-1;Z[J]&&Z[J][0]===e&&(ae++,re=Z[J][1]+re,J--),Z[J]&&Z[J][0]===n&&(fe++,j=Z[J][1]+j,J--),be=J}}if(W(Z[ne][1])){var le=Z[ne][1].charAt(0);Z[ne][1]=Z[ne][1].slice(1),j+=le,re+=le}}if(ne<Z.length-1&&!Z[ne][1]){Z.splice(ne,1);break}if(j.length>0||re.length>0){j.length>0&&re.length>0&&(he=a(re,j),he!==0&&(be>=0?Z[be][1]+=re.substring(0,he):(Z.splice(0,0,[t,re.substring(0,he)]),ne++),re=re.substring(he),j=j.substring(he)),he=h(re,j),he!==0&&(Z[ne][1]=re.substring(re.length-he)+Z[ne][1],re=re.substring(0,re.length-he),j=j.substring(0,j.length-he)));var pe=ae+fe;j.length===0&&re.length===0?(Z.splice(ne-pe,pe),ne=ne-pe):j.length===0?(Z.splice(ne-pe,pe,[e,re]),ne=ne-pe+1):re.length===0?(Z.splice(ne-pe,pe,[n,j]),ne=ne-pe+1):(Z.splice(ne-pe,pe,[n,j],[e,re]),ne=ne-pe+2)}ne!==0&&Z[ne-1][0]===t?(Z[ne-1][1]+=Z[ne][1],Z.splice(ne,1)):ne++,ae=0,fe=0,j="",re="";break}}Z[Z.length-1][1]===""&&Z.pop();var Te=!1;for(ne=1;ne<Z.length-1;)Z[ne-1][0]===t&&Z[ne+1][0]===t&&(Z[ne][1].substring(Z[ne][1].length-Z[ne-1][1].length)===Z[ne-1][1]?(Z[ne][1]=Z[ne-1][1]+Z[ne][1].substring(0,Z[ne][1].length-Z[ne-1][1].length),Z[ne+1][1]=Z[ne-1][1]+Z[ne+1][1],Z.splice(ne-1,1),Te=!0):Z[ne][1].substring(0,Z[ne+1][1].length)==Z[ne+1][1]&&(Z[ne-1][1]+=Z[ne+1][1],Z[ne][1]=Z[ne][1].substring(Z[ne+1][1].length)+Z[ne+1][1],Z.splice(ne+1,1),Te=!0)),ne++;Te&&P(Z,te)}function Y(Z){return Z>=55296&&Z<=56319}function z(Z){return Z>=56320&&Z<=57343}function W(Z){return z(Z.charCodeAt(0))}function B(Z){return Y(Z.charCodeAt(Z.length-1))}function ee(Z){for(var te=[],ne=0;ne<Z.length;ne++)Z[ne][1].length>0&&te.push(Z[ne]);return te}function H(Z,te,ne,fe){return B(Z)||W(fe)?null:ee([[t,Z],[n,te],[e,ne],[t,fe]])}function V(Z,te,ne){var fe=typeof ne=="number"?{index:ne,length:0}:ne.oldRange,ae=typeof ne=="number"?null:ne.newRange,j=Z.length,re=te.length;if(fe.length===0&&(ae===null||ae.length===0)){var he=fe.index,be=Z.slice(0,he),le=Z.slice(he),J=ae?ae.index:null;e:{var pe=he+re-j;if(J!==null&&J!==pe||pe<0||pe>re)break e;var Te=te.slice(0,pe),Fe=te.slice(pe);if(Fe!==le)break e;var _e=Math.min(he,pe),Me=be.slice(0,_e),De=Te.slice(0,_e);if(Me!==De)break e;var Re=be.slice(_e),Le=Te.slice(_e);return H(Me,Re,Le,le)}e:{if(J!==null&&J!==he)break e;var Oe=he,Te=te.slice(0,Oe),Fe=te.slice(Oe);if(Te!==be)break e;var Ge=Math.min(j-Oe,re-Oe),Ve=le.slice(le.length-Ge),Pe=Fe.slice(Fe.length-Ge);if(Ve!==Pe)break e;var Re=le.slice(0,le.length-Ge),Le=Fe.slice(0,Fe.length-Ge);return H(be,Re,Le,Ve)}}if(fe.length>0&&ae&&ae.length===0)e:{var Me=Z.slice(0,fe.index),Ve=Z.slice(fe.index+fe.length),_e=Me.length,Ge=Ve.length;if(re<_e+Ge)break e;var De=te.slice(0,_e),Pe=te.slice(re-Ge);if(Me!==De||Ve!==Pe)break e;var Re=Z.slice(_e,j-Ge),Le=te.slice(_e,re-Ge);return H(Me,Re,Le,Ve)}return null}function de(Z,te,ne,fe){return r(Z,te,ne,fe,!0)}return de.INSERT=e,de.DELETE=n,de.EQUAL=t,hb=de,hb}var pp={exports:{}};pp.exports;var cx;function j3(){return cx||(cx=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",l="[object Array]",a="[object Boolean]",u="[object Date]",h="[object Error]",y="[object Function]",x="[object GeneratorFunction]",w="[object Map]",_="[object Number]",S="[object Object]",R="[object Promise]",I="[object RegExp]",O="[object Set]",P="[object String]",Y="[object Symbol]",z="[object WeakMap]",W="[object ArrayBuffer]",B="[object DataView]",ee="[object Float32Array]",H="[object Float64Array]",V="[object Int8Array]",de="[object Int16Array]",Z="[object Int32Array]",te="[object Uint8Array]",ne="[object Uint8ClampedArray]",fe="[object Uint16Array]",ae="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,re=/\w*$/,he=/^\[object .+?Constructor\]$/,be=/^(?:0|[1-9]\d*)$/,le={};le[o]=le[l]=le[W]=le[B]=le[a]=le[u]=le[ee]=le[H]=le[V]=le[de]=le[Z]=le[w]=le[_]=le[S]=le[I]=le[O]=le[P]=le[Y]=le[te]=le[ne]=le[fe]=le[ae]=!0,le[h]=le[y]=le[z]=!1;var J=typeof jd=="object"&&jd&&jd.Object===Object&&jd,pe=typeof self=="object"&&self&&self.Object===Object&&self,Te=J||pe||Function("return this")(),Fe=e&&!e.nodeType&&e,_e=Fe&&!0&&n&&!n.nodeType&&n,Me=_e&&_e.exports===Fe;function De(we,at){return we.set(at[0],at[1]),we}function Re(we,at){return we.add(at),we}function Le(we,at){for(var Rt=-1,Qe=we?we.length:0;++Rt<Qe&&at(we[Rt],Rt,we)!==!1;);return we}function Oe(we,at){for(var Rt=-1,Qe=at.length,on=we.length;++Rt<Qe;)we[on+Rt]=at[Rt];return we}function Ge(we,at,Rt,Qe){for(var on=-1,Wn=we?we.length:0;++on<Wn;)Rt=at(Rt,we[on],on,we);return Rt}function Ve(we,at){for(var Rt=-1,Qe=Array(we);++Rt<we;)Qe[Rt]=at(Rt);return Qe}function Pe(we,at){return we==null?void 0:we[at]}function ot(we){var at=!1;if(we!=null&&typeof we.toString!="function")try{at=!!(we+"")}catch{}return at}function Xe(we){var at=-1,Rt=Array(we.size);return we.forEach(function(Qe,on){Rt[++at]=[on,Qe]}),Rt}function lt(we,at){return function(Rt){return we(at(Rt))}}function Ye(we){var at=-1,Rt=Array(we.size);return we.forEach(function(Qe){Rt[++at]=Qe}),Rt}var mt=Array.prototype,bt=Function.prototype,Mt=Object.prototype,Nt=Te["__core-js_shared__"],_t=(function(){var we=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return we?"Symbol(src)_1."+we:""})(),rn=bt.toString,pn=Mt.hasOwnProperty,Kt=Mt.toString,dn=RegExp("^"+rn.call(pn).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=Me?Te.Buffer:void 0,wn=Te.Symbol,$t=Te.Uint8Array,vn=lt(Object.getPrototypeOf,Object),Pt=Object.create,Yt=Mt.propertyIsEnumerable,ct=mt.splice,Tt=Object.getOwnPropertySymbols,It=zt?zt.isBuffer:void 0,ye=lt(Object.keys,Object),se=mi(Te,"DataView"),He=mi(Te,"Map"),We=mi(Te,"Promise"),pt=mi(Te,"Set"),wt=mi(Te,"WeakMap"),qt=mi(Object,"create"),Jt=Si(se),Vt=Si(He),hn=Si(We),ln=Si(pt),kn=Si(wt),Nn=wn?wn.prototype:void 0,En=Nn?Nn.valueOf:void 0;function Cn(we){var at=-1,Rt=we?we.length:0;for(this.clear();++at<Rt;){var Qe=we[at];this.set(Qe[0],Qe[1])}}function rr(){this.__data__=qt?qt(null):{}}function Bt(we){return this.has(we)&&delete this.__data__[we]}function Ut(we){var at=this.__data__;if(qt){var Rt=at[we];return Rt===r?void 0:Rt}return pn.call(at,we)?at[we]:void 0}function yn(we){var at=this.__data__;return qt?at[we]!==void 0:pn.call(at,we)}function Ft(we,at){var Rt=this.__data__;return Rt[we]=qt&&at===void 0?r:at,this}Cn.prototype.clear=rr,Cn.prototype.delete=Bt,Cn.prototype.get=Ut,Cn.prototype.has=yn,Cn.prototype.set=Ft;function jn(we){var at=-1,Rt=we?we.length:0;for(this.clear();++at<Rt;){var Qe=we[at];this.set(Qe[0],Qe[1])}}function Hn(){this.__data__=[]}function Rn(we){var at=this.__data__,Rt=Qn(at,we);if(Rt<0)return!1;var Qe=at.length-1;return Rt==Qe?at.pop():ct.call(at,Rt,1),!0}function Et(we){var at=this.__data__,Rt=Qn(at,we);return Rt<0?void 0:at[Rt][1]}function rt(we){return Qn(this.__data__,we)>-1}function tn(we,at){var Rt=this.__data__,Qe=Qn(Rt,we);return Qe<0?Rt.push([we,at]):Rt[Qe][1]=at,this}jn.prototype.clear=Hn,jn.prototype.delete=Rn,jn.prototype.get=Et,jn.prototype.has=rt,jn.prototype.set=tn;function Ln(we){var at=-1,Rt=we?we.length:0;for(this.clear();++at<Rt;){var Qe=we[at];this.set(Qe[0],Qe[1])}}function mr(){this.__data__={hash:new Cn,map:new(He||jn),string:new Cn}}function wr(we){return Tr(this,we).delete(we)}function gn(we){return Tr(this,we).get(we)}function Dt(we){return Tr(this,we).has(we)}function Se(we,at){return Tr(this,we).set(we,at),this}Ln.prototype.clear=mr,Ln.prototype.delete=wr,Ln.prototype.get=gn,Ln.prototype.has=Dt,Ln.prototype.set=Se;function it(we){this.__data__=new jn(we)}function St(){this.__data__=new jn}function mn(we){return this.__data__.delete(we)}function An(we){return this.__data__.get(we)}function Gn(we){return this.__data__.has(we)}function cr(we,at){var Rt=this.__data__;if(Rt instanceof jn){var Qe=Rt.__data__;if(!He||Qe.length<t-1)return Qe.push([we,at]),this;Rt=this.__data__=new Ln(Qe)}return Rt.set(we,at),this}it.prototype.clear=St,it.prototype.delete=mn,it.prototype.get=An,it.prototype.has=Gn,it.prototype.set=cr;function gr(we,at){var Rt=$i(we)||Io(we)?Ve(we.length,String):[],Qe=Rt.length,on=!!Qe;for(var Wn in we)pn.call(we,Wn)&&!(on&&(Wn=="length"||Oi(Wn,Qe)))&&Rt.push(Wn);return Rt}function Sn(we,at,Rt){var Qe=we[at];(!(pn.call(we,at)&&cl(Qe,Rt))||Rt===void 0&&!(at in we))&&(we[at]=Rt)}function Qn(we,at){for(var Rt=we.length;Rt--;)if(cl(we[Rt][0],at))return Rt;return-1}function xn(we,at){return we&&tr(at,Lo(at),we)}function ur(we,at,Rt,Qe,on,Wn,zr){var Hr;if(Qe&&(Hr=Wn?Qe(we,on,Wn,zr):Qe(we)),Hr!==void 0)return Hr;if(!po(we))return we;var Ei=$i(we);if(Ei){if(Hr=Uo(we),!at)return Fr(we,Hr)}else{var ao=Br(we),Ll=ao==y||ao==x;if(go(we))return qi(we,at);if(ao==S||ao==o||Ll&&!Wn){if(ot(we))return Wn?we:{};if(Hr=To(Ll?{}:we),!at)return fr(we,xn(Hr,we))}else{if(!le[ao])return Wn?we:{};Hr=Ro(we,ao,ur,at)}}zr||(zr=new it);var Ql=zr.get(we);if(Ql)return Ql;if(zr.set(we,Hr),!Ei)var ac=Rt?ir(we):Lo(we);return Le(ac||we,function(ul,Ha){ac&&(Ha=ul,ul=we[Ha]),Sn(Hr,Ha,ur(ul,at,Rt,Qe,Ha,we,zr))}),Hr}function si(we){return po(we)?Pt(we):{}}function xo(we,at,Rt){var Qe=at(we);return $i(we)?Qe:Oe(Qe,Rt(we))}function wo(we){return Kt.call(we)}function so(we){if(!po(we)||Cr(we))return!1;var at=Mo(we)||ot(we)?dn:he;return at.test(Si(we))}function ai(we){if(!al(we))return ye(we);var at=[];for(var Rt in Object(we))pn.call(we,Rt)&&Rt!="constructor"&&at.push(Rt);return at}function qi(we,at){if(at)return we.slice();var Rt=new we.constructor(we.length);return we.copy(Rt),Rt}function Yi(we){var at=new we.constructor(we.byteLength);return new $t(at).set(new $t(we)),at}function Jl(we,at){var Rt=at?Yi(we.buffer):we.buffer;return new we.constructor(Rt,we.byteOffset,we.byteLength)}function Wo(we,at,Rt){var Qe=at?Rt(Xe(we),!0):Xe(we);return Ge(Qe,De,new we.constructor)}function Co(we){var at=new we.constructor(we.source,re.exec(we));return at.lastIndex=we.lastIndex,at}function ri(we,at,Rt){var Qe=at?Rt(Ye(we),!0):Ye(we);return Ge(Qe,Re,new we.constructor)}function an(we){return En?Object(En.call(we)):{}}function On(we,at){var Rt=at?Yi(we.buffer):we.buffer;return new we.constructor(Rt,we.byteOffset,we.length)}function Fr(we,at){var Rt=-1,Qe=we.length;for(at||(at=Array(Qe));++Rt<Qe;)at[Rt]=we[Rt];return at}function tr(we,at,Rt,Qe){Rt||(Rt={});for(var on=-1,Wn=at.length;++on<Wn;){var zr=at[on],Hr=void 0;Sn(Rt,zr,Hr===void 0?we[zr]:Hr)}return Rt}function fr(we,at){return tr(we,Li(we),at)}function ir(we){return xo(we,Lo,Li)}function Tr(we,at){var Rt=we.__data__;return Kr(at)?Rt[typeof at=="string"?"string":"hash"]:Rt.map}function mi(we,at){var Rt=Pe(we,at);return so(Rt)?Rt:void 0}var Li=Tt?lt(Tt,Object):Vn,Br=wo;(se&&Br(new se(new ArrayBuffer(1)))!=B||He&&Br(new He)!=w||We&&Br(We.resolve())!=R||pt&&Br(new pt)!=O||wt&&Br(new wt)!=z)&&(Br=function(we){var at=Kt.call(we),Rt=at==S?we.constructor:void 0,Qe=Rt?Si(Rt):void 0;if(Qe)switch(Qe){case Jt:return B;case Vt:return w;case hn:return R;case ln:return O;case kn:return z}return at});function Uo(we){var at=we.length,Rt=we.constructor(at);return at&&typeof we[0]=="string"&&pn.call(we,"index")&&(Rt.index=we.index,Rt.input=we.input),Rt}function To(we){return typeof we.constructor=="function"&&!al(we)?si(vn(we)):{}}function Ro(we,at,Rt,Qe){var on=we.constructor;switch(at){case W:return Yi(we);case a:case u:return new on(+we);case B:return Jl(we,Qe);case ee:case H:case V:case de:case Z:case te:case ne:case fe:case ae:return On(we,Qe);case w:return Wo(we,Qe,Rt);case _:case P:return new on(we);case I:return Co(we);case O:return ri(we,Qe,Rt);case Y:return an(we)}}function Oi(we,at){return at=at??i,!!at&&(typeof we=="number"||be.test(we))&&we>-1&&we%1==0&&we<at}function Kr(we){var at=typeof we;return at=="string"||at=="number"||at=="symbol"||at=="boolean"?we!=="__proto__":we===null}function Cr(we){return!!_t&&_t in we}function al(we){var at=we&&we.constructor,Rt=typeof at=="function"&&at.prototype||Mt;return we===Rt}function Si(we){if(we!=null){try{return rn.call(we)}catch{}try{return we+""}catch{}}return""}function ji(we){return ur(we,!0,!0)}function cl(we,at){return we===at||we!==we&&at!==at}function Io(we){return _o(we)&&pn.call(we,"callee")&&(!Yt.call(we,"callee")||Kt.call(we)==o)}var $i=Array.isArray;function ko(we){return we!=null&&nr(we.length)&&!Mo(we)}function _o(we){return hi(we)&&ko(we)}var go=It||Rr;function Mo(we){var at=po(we)?Kt.call(we):"";return at==y||at==x}function nr(we){return typeof we=="number"&&we>-1&&we%1==0&&we<=i}function po(we){var at=typeof we;return!!we&&(at=="object"||at=="function")}function hi(we){return!!we&&typeof we=="object"}function Lo(we){return ko(we)?gr(we):ai(we)}function Vn(){return[]}function Rr(){return!1}n.exports=ji})(pp,pp.exports)),pp.exports}var gb,ux;function $3(){return ux||(ux=1,gb=function n(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!n(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){var l=o[i];if(!n(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}),gb}var m0={},fx;function x7(){if(fx)return m0;fx=1,Object.defineProperty(m0,"__esModule",{value:!0});const n=j3(),e=$3();var t;return(function(r){function i(u={},h={},y=!1){typeof u!="object"&&(u={}),typeof h!="object"&&(h={});let x=n(h);y||(x=Object.keys(x).reduce((w,_)=>(x[_]!=null&&(w[_]=x[_]),w),{}));for(const w in u)u[w]!==void 0&&h[w]===void 0&&(x[w]=u[w]);return Object.keys(x).length>0?x:void 0}r.compose=i;function o(u={},h={}){typeof u!="object"&&(u={}),typeof h!="object"&&(h={});const y=Object.keys(u).concat(Object.keys(h)).reduce((x,w)=>(e(u[w],h[w])||(x[w]=h[w]===void 0?null:h[w]),x),{});return Object.keys(y).length>0?y:void 0}r.diff=o;function l(u={},h={}){u=u||{};const y=Object.keys(h).reduce((x,w)=>(h[w]!==u[w]&&u[w]!==void 0&&(x[w]=h[w]),x),{});return Object.keys(u).reduce((x,w)=>(u[w]!==h[w]&&h[w]===void 0&&(x[w]=null),x),y)}r.invert=l;function a(u,h,y=!1){if(typeof u!="object")return h;if(typeof h!="object")return;if(!y)return h;const x=Object.keys(h).reduce((w,_)=>(u[_]===void 0&&(w[_]=h[_]),w),{});return Object.keys(x).length>0?x:void 0}r.transform=a})(t||(t={})),m0.default=t,m0}var x0={},dx;function e_(){if(dx)return x0;dx=1,Object.defineProperty(x0,"__esModule",{value:!0});var n;return(function(e){function t(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}e.length=t})(n||(n={})),x0.default=n,x0}var w0={},hx;function w7(){if(hx)return w0;hx=1,Object.defineProperty(w0,"__esModule",{value:!0});const n=e_();class e{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const i=this.ops[this.index];if(i){const o=this.offset,l=n.default.length(i);if(r>=l-o?(r=l-o,this.index+=1,this.offset=0):this.offset+=r,typeof i.delete=="number")return{delete:r};{const a={};return i.attributes&&(a.attributes=i.attributes),typeof i.retain=="number"?a.retain=r:typeof i.retain=="object"&&i.retain!==null?a.retain=i.retain:typeof i.insert=="string"?a.insert=i.insert.substr(o,r):a.insert=i.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,i=this.index,o=this.next(),l=this.ops.slice(this.index);return this.offset=r,this.index=i,[o].concat(l)}}else return[]}}return w0.default=e,w0}var gx;function C7(){return gx||(gx=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=m7(),r=j3(),i=$3(),o=x7();e.AttributeMap=o.default;const l=e_();e.Op=l.default;const a=w7();e.OpIterator=a.default;const u="\0",h=(x,w)=>{if(typeof x!="object"||x===null)throw new Error(`cannot retain a ${typeof x}`);if(typeof w!="object"||w===null)throw new Error(`cannot retain a ${typeof w}`);const _=Object.keys(x)[0];if(!_||_!==Object.keys(w)[0])throw new Error(`embed types not matched: ${_} != ${Object.keys(w)[0]}`);return[_,x[_],w[_]]};class y{constructor(w){Array.isArray(w)?this.ops=w:w!=null&&Array.isArray(w.ops)?this.ops=w.ops:this.ops=[]}static registerEmbed(w,_){this.handlers[w]=_}static unregisterEmbed(w){delete this.handlers[w]}static getHandler(w){const _=this.handlers[w];if(!_)throw new Error(`no handlers for embed type "${w}"`);return _}insert(w,_){const S={};return typeof w=="string"&&w.length===0?this:(S.insert=w,_!=null&&typeof _=="object"&&Object.keys(_).length>0&&(S.attributes=_),this.push(S))}delete(w){return w<=0?this:this.push({delete:w})}retain(w,_){if(typeof w=="number"&&w<=0)return this;const S={retain:w};return _!=null&&typeof _=="object"&&Object.keys(_).length>0&&(S.attributes=_),this.push(S)}push(w){let _=this.ops.length,S=this.ops[_-1];if(w=r(w),typeof S=="object"){if(typeof w.delete=="number"&&typeof S.delete=="number")return this.ops[_-1]={delete:S.delete+w.delete},this;if(typeof S.delete=="number"&&w.insert!=null&&(_-=1,S=this.ops[_-1],typeof S!="object"))return this.ops.unshift(w),this;if(i(w.attributes,S.attributes)){if(typeof w.insert=="string"&&typeof S.insert=="string")return this.ops[_-1]={insert:S.insert+w.insert},typeof w.attributes=="object"&&(this.ops[_-1].attributes=w.attributes),this;if(typeof w.retain=="number"&&typeof S.retain=="number")return this.ops[_-1]={retain:S.retain+w.retain},typeof w.attributes=="object"&&(this.ops[_-1].attributes=w.attributes),this}}return _===this.ops.length?this.ops.push(w):this.ops.splice(_,0,w),this}chop(){const w=this.ops[this.ops.length-1];return w&&typeof w.retain=="number"&&!w.attributes&&this.ops.pop(),this}filter(w){return this.ops.filter(w)}forEach(w){this.ops.forEach(w)}map(w){return this.ops.map(w)}partition(w){const _=[],S=[];return this.forEach(R=>{(w(R)?_:S).push(R)}),[_,S]}reduce(w,_){return this.ops.reduce(w,_)}changeLength(){return this.reduce((w,_)=>_.insert?w+l.default.length(_):_.delete?w-_.delete:w,0)}length(){return this.reduce((w,_)=>w+l.default.length(_),0)}slice(w=0,_=1/0){const S=[],R=new a.default(this.ops);let I=0;for(;I<_&&R.hasNext();){let O;I<w?O=R.next(w-I):(O=R.next(_-I),S.push(O)),I+=l.default.length(O)}return new y(S)}compose(w){const _=new a.default(this.ops),S=new a.default(w.ops),R=[],I=S.peek();if(I!=null&&typeof I.retain=="number"&&I.attributes==null){let P=I.retain;for(;_.peekType()==="insert"&&_.peekLength()<=P;)P-=_.peekLength(),R.push(_.next());I.retain-P>0&&S.next(I.retain-P)}const O=new y(R);for(;_.hasNext()||S.hasNext();)if(S.peekType()==="insert")O.push(S.next());else if(_.peekType()==="delete")O.push(_.next());else{const P=Math.min(_.peekLength(),S.peekLength()),Y=_.next(P),z=S.next(P);if(z.retain){const W={};if(typeof Y.retain=="number")W.retain=typeof z.retain=="number"?P:z.retain;else if(typeof z.retain=="number")Y.retain==null?W.insert=Y.insert:W.retain=Y.retain;else{const ee=Y.retain==null?"insert":"retain",[H,V,de]=h(Y[ee],z.retain),Z=y.getHandler(H);W[ee]={[H]:Z.compose(V,de,ee==="retain")}}const B=o.default.compose(Y.attributes,z.attributes,typeof Y.retain=="number");if(B&&(W.attributes=B),O.push(W),!S.hasNext()&&i(O.ops[O.ops.length-1],W)){const ee=new y(_.rest());return O.concat(ee).chop()}}else typeof z.delete=="number"&&(typeof Y.retain=="number"||typeof Y.retain=="object"&&Y.retain!==null)&&O.push(z)}return O.chop()}concat(w){const _=new y(this.ops.slice());return w.ops.length>0&&(_.push(w.ops[0]),_.ops=_.ops.concat(w.ops.slice(1))),_}diff(w,_){if(this.ops===w.ops)return new y;const S=[this,w].map(Y=>Y.map(z=>{if(z.insert!=null)return typeof z.insert=="string"?z.insert:u;const W=Y===w?"on":"with";throw new Error("diff() called "+W+" non-document")}).join("")),R=new y,I=t(S[0],S[1],_,!0),O=new a.default(this.ops),P=new a.default(w.ops);return I.forEach(Y=>{let z=Y[1].length;for(;z>0;){let W=0;switch(Y[0]){case t.INSERT:W=Math.min(P.peekLength(),z),R.push(P.next(W));break;case t.DELETE:W=Math.min(z,O.peekLength()),O.next(W),R.delete(W);break;case t.EQUAL:W=Math.min(O.peekLength(),P.peekLength(),z);const B=O.next(W),ee=P.next(W);i(B.insert,ee.insert)?R.retain(W,o.default.diff(B.attributes,ee.attributes)):R.push(ee).delete(W);break}z-=W}}),R.chop()}eachLine(w,_=`
|
|
289
|
-
`){const S=new a.default(this.ops);let R=new y,I=0;for(;S.hasNext();){if(S.peekType()!=="insert")return;const O=S.peek(),P=l.default.length(O)-S.peekLength(),Y=typeof O.insert=="string"?O.insert.indexOf(_,P)-P:-1;if(Y<0)R.push(S.next());else if(Y>0)R.push(S.next(Y));else{if(w(R,S.next(1).attributes||{},I)===!1)return;I+=1,R=new y}}R.length()>0&&w(R,{},I)}invert(w){const _=new y;return this.reduce((S,R)=>{if(R.insert)_.delete(l.default.length(R));else{if(typeof R.retain=="number"&&R.attributes==null)return _.retain(R.retain),S+R.retain;if(R.delete||typeof R.retain=="number"){const I=R.delete||R.retain;return w.slice(S,S+I).forEach(P=>{R.delete?_.push(P):R.retain&&R.attributes&&_.retain(l.default.length(P),o.default.invert(R.attributes,P.attributes))}),S+I}else if(typeof R.retain=="object"&&R.retain!==null){const I=w.slice(S,S+1),O=new a.default(I.ops).next(),[P,Y,z]=h(R.retain,O.insert),W=y.getHandler(P);return _.retain({[P]:W.invert(Y,z)},o.default.invert(R.attributes,O.attributes)),S+1}}return S},0),_.chop()}transform(w,_=!1){if(_=!!_,typeof w=="number")return this.transformPosition(w,_);const S=w,R=new a.default(this.ops),I=new a.default(S.ops),O=new y;for(;R.hasNext()||I.hasNext();)if(R.peekType()==="insert"&&(_||I.peekType()!=="insert"))O.retain(l.default.length(R.next()));else if(I.peekType()==="insert")O.push(I.next());else{const P=Math.min(R.peekLength(),I.peekLength()),Y=R.next(P),z=I.next(P);if(Y.delete)continue;if(z.delete)O.push(z);else{const W=Y.retain,B=z.retain;let ee=typeof B=="object"&&B!==null?B:P;if(typeof W=="object"&&W!==null&&typeof B=="object"&&B!==null){const H=Object.keys(W)[0];if(H===Object.keys(B)[0]){const V=y.getHandler(H);V&&(ee={[H]:V.transform(W[H],B[H],_)})}}O.retain(ee,o.default.transform(Y.attributes,z.attributes,_))}}return O.chop()}transformPosition(w,_=!1){_=!!_;const S=new a.default(this.ops);let R=0;for(;S.hasNext()&&R<=w;){const I=S.peekLength(),O=S.peekType();if(S.next(),O==="delete"){w-=Math.min(I,w-R);continue}else O==="insert"&&(R<w||!_)&&(w+=I);R+=I}return w}}y.Op=l.default,y.OpIterator=a.default,y.AttributeMap=o.default,y.handlers={},e.default=y,n.exports=y,n.exports.default=y})(y0,y0.exports)),y0.exports}var pd=C7();const Kn=M1(pd);var t_=typeof global=="object"&&global&&global.Object===Object&&global,_7=typeof self=="object"&&self&&self.Object===Object&&self,sh=t_||_7||Function("return this")(),ag=sh.Symbol,n_=Object.prototype,S7=n_.hasOwnProperty,E7=n_.toString,op=ag?ag.toStringTag:void 0;function A7(n){var e=S7.call(n,op),t=n[op];try{n[op]=void 0;var r=!0}catch{}var i=E7.call(n);return r&&(e?n[op]=t:delete n[op]),i}var T7=Object.prototype,R7=T7.toString;function I7(n){return R7.call(n)}var k7="[object Null]",M7="[object Undefined]",px=ag?ag.toStringTag:void 0;function O1(n){return n==null?n===void 0?M7:k7:px&&px in Object(n)?A7(n):I7(n)}function Th(n){return n!=null&&typeof n=="object"}var Pg=Array.isArray;function fg(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function r_(n){return n}var L7="[object AsyncFunction]",O7="[object Function]",P7="[object GeneratorFunction]",D7="[object Proxy]";function Tm(n){if(!fg(n))return!1;var e=O1(n);return e==O7||e==P7||e==L7||e==D7}var pb=sh["__core-js_shared__"],vx=(function(){var n=/[^.]+$/.exec(pb&&pb.keys&&pb.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function N7(n){return!!vx&&vx in n}var F7=Function.prototype,B7=F7.toString;function Hg(n){if(n!=null){try{return B7.call(n)}catch{}try{return n+""}catch{}}return""}var z7=/[\\^$.*+?()[\]{}|]/g,H7=/^\[object .+?Constructor\]$/,W7=Function.prototype,U7=Object.prototype,G7=W7.toString,Y7=U7.hasOwnProperty,V7=RegExp("^"+G7.call(Y7).replace(z7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z7(n){if(!fg(n)||N7(n))return!1;var e=Tm(n)?V7:H7;return e.test(Hg(n))}function X7(n,e){return n==null?void 0:n[e]}function Wg(n,e){var t=X7(n,e);return Z7(t)?t:void 0}var Oy=Wg(sh,"WeakMap"),bx=Object.create,K7=(function(){function n(){}return function(e){if(!fg(e))return{};if(bx)return bx(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}})();function J7(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function Q7(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var q7=800,j7=16,$7=Date.now;function eM(n){var e=0,t=0;return function(){var r=$7(),i=j7-(r-t);if(t=r,i>0){if(++e>=q7)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function tM(n){return function(){return n}}var rv=(function(){try{var n=Wg(Object,"defineProperty");return n({},"",{}),n}catch{}})(),nM=rv?function(n,e){return rv(n,"toString",{configurable:!0,enumerable:!1,value:tM(e),writable:!0})}:r_,rM=eM(nM);function iM(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var oM=9007199254740991,lM=/^(?:0|[1-9]\d*)$/;function i_(n,e){var t=typeof n;return e=e??oM,!!e&&(t=="number"||t!="symbol"&&lM.test(n))&&n>-1&&n%1==0&&n<e}function Rm(n,e,t){e=="__proto__"&&rv?rv(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function Hp(n,e){return n===e||n!==n&&e!==e}var sM=Object.prototype,aM=sM.hasOwnProperty;function o_(n,e,t){var r=n[e];(!(aM.call(n,e)&&Hp(r,t))||t===void 0&&!(e in n))&&Rm(n,e,t)}function cM(n,e,t,r){var i=!t;t||(t={});for(var o=-1,l=e.length;++o<l;){var a=e[o],u=void 0;u===void 0&&(u=n[a]),i?Rm(t,a,u):o_(t,a,u)}return t}var yx=Math.max;function uM(n,e,t){return e=yx(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=yx(r.length-e,0),l=Array(o);++i<o;)l[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(l),J7(n,this,a)}}function fM(n,e){return rM(uM(n,e,r_),n+"")}var dM=9007199254740991;function l_(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=dM}function Av(n){return n!=null&&l_(n.length)&&!Tm(n)}function hM(n,e,t){if(!fg(t))return!1;var r=typeof e;return(r=="number"?Av(t)&&i_(e,t.length):r=="string"&&e in t)?Hp(t[e],n):!1}function gM(n){return fM(function(e,t){var r=-1,i=t.length,o=i>1?t[i-1]:void 0,l=i>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(i--,o):void 0,l&&hM(t[0],t[1],l)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=t[r];a&&n(e,a,r,o)}return e})}var pM=Object.prototype;function Im(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||pM;return n===t}function vM(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var bM="[object Arguments]";function mx(n){return Th(n)&&O1(n)==bM}var s_=Object.prototype,yM=s_.hasOwnProperty,mM=s_.propertyIsEnumerable,Py=mx((function(){return arguments})())?mx:function(n){return Th(n)&&yM.call(n,"callee")&&!mM.call(n,"callee")};function xM(){return!1}var a_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xx=a_&&typeof module=="object"&&module&&!module.nodeType&&module,wM=xx&&xx.exports===a_,wx=wM?sh.Buffer:void 0,CM=wx?wx.isBuffer:void 0,Tp=CM||xM,_M="[object Arguments]",SM="[object Array]",EM="[object Boolean]",AM="[object Date]",TM="[object Error]",RM="[object Function]",IM="[object Map]",kM="[object Number]",MM="[object Object]",LM="[object RegExp]",OM="[object Set]",PM="[object String]",DM="[object WeakMap]",NM="[object ArrayBuffer]",FM="[object DataView]",BM="[object Float32Array]",zM="[object Float64Array]",HM="[object Int8Array]",WM="[object Int16Array]",UM="[object Int32Array]",GM="[object Uint8Array]",YM="[object Uint8ClampedArray]",VM="[object Uint16Array]",ZM="[object Uint32Array]",Xl={};Xl[BM]=Xl[zM]=Xl[HM]=Xl[WM]=Xl[UM]=Xl[GM]=Xl[YM]=Xl[VM]=Xl[ZM]=!0;Xl[_M]=Xl[SM]=Xl[NM]=Xl[EM]=Xl[FM]=Xl[AM]=Xl[TM]=Xl[RM]=Xl[IM]=Xl[kM]=Xl[MM]=Xl[LM]=Xl[OM]=Xl[PM]=Xl[DM]=!1;function XM(n){return Th(n)&&l_(n.length)&&!!Xl[O1(n)]}function km(n){return function(e){return n(e)}}var c_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bp=c_&&typeof module=="object"&&module&&!module.nodeType&&module,KM=bp&&bp.exports===c_,vb=KM&&t_.process,w1=(function(){try{var n=bp&&bp.require&&bp.require("util").types;return n||vb&&vb.binding&&vb.binding("util")}catch{}})(),Cx=w1&&w1.isTypedArray,Mm=Cx?km(Cx):XM,JM=Object.prototype,QM=JM.hasOwnProperty;function u_(n,e){var t=Pg(n),r=!t&&Py(n),i=!t&&!r&&Tp(n),o=!t&&!r&&!i&&Mm(n),l=t||r||i||o,a=l?vM(n.length,String):[],u=a.length;for(var h in n)(e||QM.call(n,h))&&!(l&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||i_(h,u)))&&a.push(h);return a}function f_(n,e){return function(t){return n(e(t))}}var qM=f_(Object.keys,Object),jM=Object.prototype,$M=jM.hasOwnProperty;function eL(n){if(!Im(n))return qM(n);var e=[];for(var t in Object(n))$M.call(n,t)&&t!="constructor"&&e.push(t);return e}function tL(n){return Av(n)?u_(n):eL(n)}function nL(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var rL=Object.prototype,iL=rL.hasOwnProperty;function oL(n){if(!fg(n))return nL(n);var e=Im(n),t=[];for(var r in n)r=="constructor"&&(e||!iL.call(n,r))||t.push(r);return t}function d_(n){return Av(n)?u_(n,!0):oL(n)}var Rp=Wg(Object,"create");function lL(){this.__data__=Rp?Rp(null):{},this.size=0}function sL(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var aL="__lodash_hash_undefined__",cL=Object.prototype,uL=cL.hasOwnProperty;function fL(n){var e=this.__data__;if(Rp){var t=e[n];return t===aL?void 0:t}return uL.call(e,n)?e[n]:void 0}var dL=Object.prototype,hL=dL.hasOwnProperty;function gL(n){var e=this.__data__;return Rp?e[n]!==void 0:hL.call(e,n)}var pL="__lodash_hash_undefined__";function vL(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Rp&&e===void 0?pL:e,this}function Dg(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Dg.prototype.clear=lL;Dg.prototype.delete=sL;Dg.prototype.get=fL;Dg.prototype.has=gL;Dg.prototype.set=vL;function bL(){this.__data__=[],this.size=0}function Tv(n,e){for(var t=n.length;t--;)if(Hp(n[t][0],e))return t;return-1}var yL=Array.prototype,mL=yL.splice;function xL(n){var e=this.__data__,t=Tv(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():mL.call(e,t,1),--this.size,!0}function wL(n){var e=this.__data__,t=Tv(e,n);return t<0?void 0:e[t][1]}function CL(n){return Tv(this.__data__,n)>-1}function _L(n,e){var t=this.__data__,r=Tv(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function kh(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}kh.prototype.clear=bL;kh.prototype.delete=xL;kh.prototype.get=wL;kh.prototype.has=CL;kh.prototype.set=_L;var Ip=Wg(sh,"Map");function SL(){this.size=0,this.__data__={hash:new Dg,map:new(Ip||kh),string:new Dg}}function EL(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Rv(n,e){var t=n.__data__;return EL(e)?t[typeof e=="string"?"string":"hash"]:t.map}function AL(n){var e=Rv(this,n).delete(n);return this.size-=e?1:0,e}function TL(n){return Rv(this,n).get(n)}function RL(n){return Rv(this,n).has(n)}function IL(n,e){var t=Rv(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Ug(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Ug.prototype.clear=SL;Ug.prototype.delete=AL;Ug.prototype.get=TL;Ug.prototype.has=RL;Ug.prototype.set=IL;function kL(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var h_=f_(Object.getPrototypeOf,Object),ML="[object Object]",LL=Function.prototype,OL=Object.prototype,g_=LL.toString,PL=OL.hasOwnProperty,DL=g_.call(Object);function NL(n){if(!Th(n)||O1(n)!=ML)return!1;var e=h_(n);if(e===null)return!0;var t=PL.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&g_.call(t)==DL}function FL(){this.__data__=new kh,this.size=0}function BL(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function zL(n){return this.__data__.get(n)}function HL(n){return this.__data__.has(n)}var WL=200;function UL(n,e){var t=this.__data__;if(t instanceof kh){var r=t.__data__;if(!Ip||r.length<WL-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Ug(r)}return t.set(n,e),this.size=t.size,this}function $d(n){var e=this.__data__=new kh(n);this.size=e.size}$d.prototype.clear=FL;$d.prototype.delete=BL;$d.prototype.get=zL;$d.prototype.has=HL;$d.prototype.set=UL;var p_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_x=p_&&typeof module=="object"&&module&&!module.nodeType&&module,GL=_x&&_x.exports===p_,Sx=GL?sh.Buffer:void 0,Ex=Sx?Sx.allocUnsafe:void 0;function v_(n,e){if(e)return n.slice();var t=n.length,r=Ex?Ex(t):new n.constructor(t);return n.copy(r),r}function YL(n,e){for(var t=-1,r=n==null?0:n.length,i=0,o=[];++t<r;){var l=n[t];e(l,t,n)&&(o[i++]=l)}return o}function VL(){return[]}var ZL=Object.prototype,XL=ZL.propertyIsEnumerable,Ax=Object.getOwnPropertySymbols,KL=Ax?function(n){return n==null?[]:(n=Object(n),YL(Ax(n),function(e){return XL.call(n,e)}))}:VL;function JL(n,e,t){var r=e(n);return Pg(n)?r:kL(r,t(n))}function Dy(n){return JL(n,tL,KL)}var Ny=Wg(sh,"DataView"),Fy=Wg(sh,"Promise"),By=Wg(sh,"Set"),Tx="[object Map]",QL="[object Object]",Rx="[object Promise]",Ix="[object Set]",kx="[object WeakMap]",Mx="[object DataView]",qL=Hg(Ny),jL=Hg(Ip),$L=Hg(Fy),eO=Hg(By),tO=Hg(Oy),kd=O1;(Ny&&kd(new Ny(new ArrayBuffer(1)))!=Mx||Ip&&kd(new Ip)!=Tx||Fy&&kd(Fy.resolve())!=Rx||By&&kd(new By)!=Ix||Oy&&kd(new Oy)!=kx)&&(kd=function(n){var e=O1(n),t=e==QL?n.constructor:void 0,r=t?Hg(t):"";if(r)switch(r){case qL:return Mx;case jL:return Tx;case $L:return Rx;case eO:return Ix;case tO:return kx}return e});var nO=Object.prototype,rO=nO.hasOwnProperty;function iO(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&rO.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var iv=sh.Uint8Array;function Lm(n){var e=new n.constructor(n.byteLength);return new iv(e).set(new iv(n)),e}function oO(n,e){var t=Lm(n.buffer);return new n.constructor(t,n.byteOffset,n.byteLength)}var lO=/\w*$/;function sO(n){var e=new n.constructor(n.source,lO.exec(n));return e.lastIndex=n.lastIndex,e}var Lx=ag?ag.prototype:void 0,Ox=Lx?Lx.valueOf:void 0;function aO(n){return Ox?Object(Ox.call(n)):{}}function b_(n,e){var t=e?Lm(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var cO="[object Boolean]",uO="[object Date]",fO="[object Map]",dO="[object Number]",hO="[object RegExp]",gO="[object Set]",pO="[object String]",vO="[object Symbol]",bO="[object ArrayBuffer]",yO="[object DataView]",mO="[object Float32Array]",xO="[object Float64Array]",wO="[object Int8Array]",CO="[object Int16Array]",_O="[object Int32Array]",SO="[object Uint8Array]",EO="[object Uint8ClampedArray]",AO="[object Uint16Array]",TO="[object Uint32Array]";function RO(n,e,t){var r=n.constructor;switch(e){case bO:return Lm(n);case cO:case uO:return new r(+n);case yO:return oO(n);case mO:case xO:case wO:case CO:case _O:case SO:case EO:case AO:case TO:return b_(n,t);case fO:return new r;case dO:case pO:return new r(n);case hO:return sO(n);case gO:return new r;case vO:return aO(n)}}function y_(n){return typeof n.constructor=="function"&&!Im(n)?K7(h_(n)):{}}var IO="[object Map]";function kO(n){return Th(n)&&kd(n)==IO}var Px=w1&&w1.isMap,MO=Px?km(Px):kO,LO="[object Set]";function OO(n){return Th(n)&&kd(n)==LO}var Dx=w1&&w1.isSet,PO=Dx?km(Dx):OO,DO=1,m_="[object Arguments]",NO="[object Array]",FO="[object Boolean]",BO="[object Date]",zO="[object Error]",x_="[object Function]",HO="[object GeneratorFunction]",WO="[object Map]",UO="[object Number]",w_="[object Object]",GO="[object RegExp]",YO="[object Set]",VO="[object String]",ZO="[object Symbol]",XO="[object WeakMap]",KO="[object ArrayBuffer]",JO="[object DataView]",QO="[object Float32Array]",qO="[object Float64Array]",jO="[object Int8Array]",$O="[object Int16Array]",eP="[object Int32Array]",tP="[object Uint8Array]",nP="[object Uint8ClampedArray]",rP="[object Uint16Array]",iP="[object Uint32Array]",Ml={};Ml[m_]=Ml[NO]=Ml[KO]=Ml[JO]=Ml[FO]=Ml[BO]=Ml[QO]=Ml[qO]=Ml[jO]=Ml[$O]=Ml[eP]=Ml[WO]=Ml[UO]=Ml[w_]=Ml[GO]=Ml[YO]=Ml[VO]=Ml[ZO]=Ml[tP]=Ml[nP]=Ml[rP]=Ml[iP]=!0;Ml[zO]=Ml[x_]=Ml[XO]=!1;function Y0(n,e,t,r,i,o){var l,a=e&DO;if(l!==void 0)return l;if(!fg(n))return n;var u=Pg(n);if(u)l=iO(n);else{var h=kd(n),y=h==x_||h==HO;if(Tp(n))return v_(n,a);if(h==w_||h==m_||y&&!i)l=y?{}:y_(n);else{if(!Ml[h])return i?n:{};l=RO(n,h,a)}}o||(o=new $d);var x=o.get(n);if(x)return x;o.set(n,l),PO(n)?n.forEach(function(S){l.add(Y0(S,e,t,S,n,o))}):MO(n)&&n.forEach(function(S,R){l.set(R,Y0(S,e,t,R,n,o))});var w=Dy,_=u?void 0:w(n);return iM(_||n,function(S,R){_&&(R=S,S=n[R]),o_(l,R,Y0(S,e,t,R,n,o))}),l}var oP=1,lP=4;function h1(n){return Y0(n,oP|lP)}var sP="__lodash_hash_undefined__";function aP(n){return this.__data__.set(n,sP),this}function cP(n){return this.__data__.has(n)}function ov(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Ug;++e<t;)this.add(n[e])}ov.prototype.add=ov.prototype.push=aP;ov.prototype.has=cP;function uP(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function fP(n,e){return n.has(e)}var dP=1,hP=2;function C_(n,e,t,r,i,o){var l=t&dP,a=n.length,u=e.length;if(a!=u&&!(l&&u>a))return!1;var h=o.get(n),y=o.get(e);if(h&&y)return h==e&&y==n;var x=-1,w=!0,_=t&hP?new ov:void 0;for(o.set(n,e),o.set(e,n);++x<a;){var S=n[x],R=e[x];if(r)var I=l?r(R,S,x,e,n,o):r(S,R,x,n,e,o);if(I!==void 0){if(I)continue;w=!1;break}if(_){if(!uP(e,function(O,P){if(!fP(_,P)&&(S===O||i(S,O,t,r,o)))return _.push(P)})){w=!1;break}}else if(!(S===R||i(S,R,t,r,o))){w=!1;break}}return o.delete(n),o.delete(e),w}function gP(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function pP(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var vP=1,bP=2,yP="[object Boolean]",mP="[object Date]",xP="[object Error]",wP="[object Map]",CP="[object Number]",_P="[object RegExp]",SP="[object Set]",EP="[object String]",AP="[object Symbol]",TP="[object ArrayBuffer]",RP="[object DataView]",Nx=ag?ag.prototype:void 0,bb=Nx?Nx.valueOf:void 0;function IP(n,e,t,r,i,o,l){switch(t){case RP:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case TP:return!(n.byteLength!=e.byteLength||!o(new iv(n),new iv(e)));case yP:case mP:case CP:return Hp(+n,+e);case xP:return n.name==e.name&&n.message==e.message;case _P:case EP:return n==e+"";case wP:var a=gP;case SP:var u=r&vP;if(a||(a=pP),n.size!=e.size&&!u)return!1;var h=l.get(n);if(h)return h==e;r|=bP,l.set(n,e);var y=C_(a(n),a(e),r,i,o,l);return l.delete(n),y;case AP:if(bb)return bb.call(n)==bb.call(e)}return!1}var kP=1,MP=Object.prototype,LP=MP.hasOwnProperty;function OP(n,e,t,r,i,o){var l=t&kP,a=Dy(n),u=a.length,h=Dy(e),y=h.length;if(u!=y&&!l)return!1;for(var x=u;x--;){var w=a[x];if(!(l?w in e:LP.call(e,w)))return!1}var _=o.get(n),S=o.get(e);if(_&&S)return _==e&&S==n;var R=!0;o.set(n,e),o.set(e,n);for(var I=l;++x<u;){w=a[x];var O=n[w],P=e[w];if(r)var Y=l?r(P,O,w,e,n,o):r(O,P,w,n,e,o);if(!(Y===void 0?O===P||i(O,P,t,r,o):Y)){R=!1;break}I||(I=w=="constructor")}if(R&&!I){var z=n.constructor,W=e.constructor;z!=W&&"constructor"in n&&"constructor"in e&&!(typeof z=="function"&&z instanceof z&&typeof W=="function"&&W instanceof W)&&(R=!1)}return o.delete(n),o.delete(e),R}var PP=1,Fx="[object Arguments]",Bx="[object Array]",C0="[object Object]",DP=Object.prototype,zx=DP.hasOwnProperty;function NP(n,e,t,r,i,o){var l=Pg(n),a=Pg(e),u=l?Bx:kd(n),h=a?Bx:kd(e);u=u==Fx?C0:u,h=h==Fx?C0:h;var y=u==C0,x=h==C0,w=u==h;if(w&&Tp(n)){if(!Tp(e))return!1;l=!0,y=!1}if(w&&!y)return o||(o=new $d),l||Mm(n)?C_(n,e,t,r,i,o):IP(n,e,u,t,r,i,o);if(!(t&PP)){var _=y&&zx.call(n,"__wrapped__"),S=x&&zx.call(e,"__wrapped__");if(_||S){var R=_?n.value():n,I=S?e.value():e;return o||(o=new $d),i(R,I,t,r,o)}}return w?(o||(o=new $d),OP(n,e,t,r,i,o)):!1}function __(n,e,t,r,i){return n===e?!0:n==null||e==null||!Th(n)&&!Th(e)?n!==n&&e!==e:NP(n,e,t,r,__,i)}function FP(n){return function(e,t,r){for(var i=-1,o=Object(e),l=r(e),a=l.length;a--;){var u=l[++i];if(t(o[u],u,o)===!1)break}return e}}var BP=FP();function zy(n,e,t){(t!==void 0&&!Hp(n[e],t)||t===void 0&&!(e in n))&&Rm(n,e,t)}function zP(n){return Th(n)&&Av(n)}function Hy(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function HP(n){return cM(n,d_(n))}function WP(n,e,t,r,i,o,l){var a=Hy(n,t),u=Hy(e,t),h=l.get(u);if(h){zy(n,t,h);return}var y=o?o(a,u,t+"",n,e,l):void 0,x=y===void 0;if(x){var w=Pg(u),_=!w&&Tp(u),S=!w&&!_&&Mm(u);y=u,w||_||S?Pg(a)?y=a:zP(a)?y=Q7(a):_?(x=!1,y=v_(u,!0)):S?(x=!1,y=b_(u,!0)):y=[]:NL(u)||Py(u)?(y=a,Py(a)?y=HP(a):(!fg(a)||Tm(a))&&(y=y_(u))):x=!1}x&&(l.set(u,y),i(y,u,r,o,l),l.delete(u)),zy(n,t,y)}function S_(n,e,t,r,i){n!==e&&BP(e,function(o,l){if(i||(i=new $d),fg(o))WP(n,e,l,t,S_,r,i);else{var a=r?r(Hy(n,l),o,l+"",n,e,i):void 0;a===void 0&&(a=o),zy(n,l,a)}},d_)}function $h(n,e){return __(n,e)}var og=gM(function(n,e,t){S_(n,e,t)}),Jn=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(Jn||{});class rh{constructor(e,t,r={}){this.attrName=e,this.keyName=t;const i=Jn.TYPE&Jn.ATTRIBUTE;this.scope=r.scope!=null?r.scope&Jn.LEVEL|i:Jn.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class g1 extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const E_=class Wy{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,t)}return null}create(e,t,r){const i=this.query(t);if(i==null)throw new g1(`Unable to create ${t} blot`);const o=i,l=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:o.create(r),a=new o(e,l,r);return Wy.blots.set(a.domNode,a),a}find(e,t=!1){return Wy.find(e,t)}query(e,t=Jn.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&Jn.LEVEL&Jn.BLOCK?r=this.types.block:e&Jn.LEVEL&Jn.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&t&Jn.LEVEL&r.scope&&t&Jn.TYPE&r.scope?r:null}register(...e){return e.map(t=>{const r="blotName"in t,i="attrName"in t;if(!r&&!i)throw new g1("Invalid definition");if(r&&t.blotName==="abstract")throw new g1("Cannot register abstract class");const o=r?t.blotName:i?t.attrName:void 0;return this.types[o]=t,i?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(l=>l.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(l=>{(this.tags[l]==null||t.className==null)&&(this.tags[l]=t)}))),t})}};E_.blots=new WeakMap;let C1=E_;function Hx(n,e){return(n.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class UP extends rh{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){Hx(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(Hx(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const zd=UP;function yb(n){const e=n.split("-"),t=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+t}class GP extends rh{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[yb(this.keyName)]=t,!0):!1}remove(e){e.style[yb(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[yb(this.keyName)];return this.canAdd(e,t)?t:""}}const dg=GP;class YP{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=C1.find(this.domNode);if(e==null)return;const t=rh.keys(this.domNode),r=zd.keys(this.domNode),i=dg.keys(this.domNode);t.concat(r).concat(i).forEach(o=>{const l=e.scroll.query(o,Jn.ATTRIBUTE);l instanceof rh&&(this.attributes[l.attrName]=l)})}copy(e){Object.keys(this.attributes).forEach(t=>{const r=this.attributes[t].value(this.domNode);e.format(t,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Iv=YP,A_=class{constructor(e,t){this.scroll=e,this.domNode=t,C1.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new g1("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),C1.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,r,i){const o=this.isolate(e,t);if(this.scroll.query(r,Jn.BLOT)!=null&&i)o.wrap(r,i);else if(this.scroll.query(r,Jn.ATTRIBUTE)!=null){const l=this.scroll.create(this.statics.scope);o.wrap(l),l.format(r,i)}}insertAt(e,t,r){const i=r==null?this.scroll.create("text",t):this.scroll.create(t,r),o=this.split(e);this.parent.insertBefore(i,o||void 0)}isolate(e,t){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new g1(`Cannot wrap ${e}`);return r.appendChild(this),r}};A_.blotName="abstract";let T_=A_;const R_=class extends T_{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};R_.scope=Jn.INLINE_BLOT;let VP=R_;const lu=VP;class ZP{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let r=t();for(;r&&e>0;)e-=1,r=t();return r}contains(e){const t=this.iterator();let r=t();for(;r;){if(r===e)return!0;r=t()}return!1}indexOf(e){const t=this.iterator();let r=t(),i=0;for(;r;){if(r===e)return i;i+=1,r=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,r=this.head;for(;r!=null;){if(r===e)return t;t+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const r=this.iterator();let i=r();for(;i;){const o=i.length();if(e<o||t&&e===o&&(i.next==null||i.next.length()!==0))return[i,e];e-=o,i=r()}return[null,0]}forEach(e){const t=this.iterator();let r=t();for(;r;)e(r),r=t()}forEachAt(e,t,r){if(t<=0)return;const[i,o]=this.find(e);let l=e-o;const a=this.iterator(i);let u=a();for(;u&&l<e+t;){const h=u.length();e>l?r(u,e-l,Math.min(t,l+h-e)):r(u,0,Math.min(h,e+t-l)),l+=h,u=a()}}map(e){return this.reduce((t,r)=>(t.push(e(r)),t),[])}reduce(e,t){const r=this.iterator();let i=r();for(;i;)t=e(t,i),i=r();return t}}function Wx(n,e){const t=e.find(n);if(t)return t;try{return e.create(n)}catch{const r=e.create(Jn.INLINE);return Array.from(n.childNodes).forEach(i=>{r.domNode.appendChild(i)}),n.parentNode&&n.parentNode.replaceChild(r.domNode,n),r.attach(),r}}const I_=class Kh extends T_{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,Kh.uiClass&&this.uiNode.classList.add(Kh.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new ZP,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Wx(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof g1)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(r,i,o)=>{r.deleteAt(i,o)})}descendant(e,t=0){const[r,i]=this.children.find(t);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof Kh?r.descendant(e,i):[null,-1]}descendants(e,t=0,r=Number.MAX_VALUE){let i=[],o=r;return this.children.forEachAt(t,r,(l,a,u)=>{(e.blotName==null&&e(l)||e.blotName!=null&&l instanceof e)&&i.push(l),l instanceof Kh&&(i=i.concat(l.descendants(e,a,o))),o-=u}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===Jn.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof Kh?t.unwrap():t.remove())})}formatAt(e,t,r,i){this.children.forEachAt(e,t,(o,l,a)=>{o.formatAt(l,a,r,i)})}insertAt(e,t,r){const[i,o]=this.children.find(e);if(i)i.insertAt(o,t,r);else{const l=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(l)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(r=>{e.insertBefore(r,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[r,i]=this.children.find(e,t),o=[[this,e]];return r instanceof Kh?o.concat(r.path(i,t)):(r!=null&&o.push([r,i]),o)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return r instanceof Kh&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,o,l)=>{const a=i.split(o,t);a!=null&&r.appendChild(a)}),r}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const r=[],i=[];e.forEach(o=>{o.target===this.domNode&&o.type==="childList"&&(r.push(...o.addedNodes),i.push(...o.removedNodes))}),i.forEach(o=>{if(o.parentNode!=null&&o.tagName!=="IFRAME"&&document.body.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const l=this.scroll.find(o);l!=null&&(l.domNode.parentNode==null||l.domNode.parentNode===this.domNode)&&l.detach()}),r.filter(o=>o.parentNode===this.domNode&&o!==this.uiNode).sort((o,l)=>o===l?0:o.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(o=>{let l=null;o.nextSibling!=null&&(l=this.scroll.find(o.nextSibling));const a=Wx(o,this.scroll);(a.next!==l||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,l||void 0))}),this.enforceAllowedChildren()}};I_.uiClass="";let XP=I_;const Od=XP;function KP(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}const t1=class n1 extends Od{static create(e){return super.create(e)}static formats(e,t){const r=t.query(n1.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Iv(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof n1||(r=r.wrap(n1.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,Jn.INLINE);if(r==null)return;r instanceof rh?this.attributes.attribute(r,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,i){this.formats()[r]!=null||this.scroll.query(r,Jn.ATTRIBUTE)?this.isolate(e,t).format(r,i):super.formatAt(e,t,r,i)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const r=this.next;r instanceof n1&&r.prev===this&&KP(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,t){const r=super.wrap(e,t);return r instanceof n1&&this.attributes.move(r),r}};t1.allowedChildren=[t1,lu],t1.blotName="inline",t1.scope=Jn.INLINE_BLOT,t1.tagName="SPAN";let JP=t1;const Om=JP,r1=class Uy extends Od{static create(e){return super.create(e)}static formats(e,t){const r=t.query(Uy.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Iv(this.domNode)}format(e,t){const r=this.scroll.query(e,Jn.BLOCK);r!=null&&(r instanceof rh?this.attributes.attribute(r,t):e===this.statics.blotName&&!t?this.replaceWith(Uy.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,i){this.scroll.query(r,Jn.BLOCK)!=null?this.format(r,i):super.formatAt(e,t,r,i)}insertAt(e,t,r){if(r==null||this.scroll.query(t,Jn.INLINE)!=null)super.insertAt(e,t,r);else{const i=this.split(e);if(i!=null){const o=this.scroll.create(t,r);i.parent.insertBefore(o,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};r1.blotName="block",r1.scope=Jn.BLOCK_BLOT,r1.tagName="P",r1.allowedChildren=[Om,r1,lu];let QP=r1;const kp=QP,Gy=class extends Od{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,r,i){super.formatAt(e,t,r,i),this.enforceAllowedChildren()}insertAt(e,t,r){super.insertAt(e,t,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Gy.blotName="container",Gy.scope=Jn.BLOCK_BLOT;let qP=Gy;const kv=qP;class jP extends lu{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,r,i){e===0&&t===this.length()?this.format(r,i):super.formatAt(e,t,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Bf=jP,$P={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},eD=100,i1=class extends Od{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,$P),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const r=this.registry.find(e,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,t=Jn.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,t)}formatAt(e,t,r,i){this.update(),super.formatAt(e,t,r,i)}insertAt(e,t,r){this.update(),super.insertAt(e,t,r)}optimize(e=[],t={}){super.optimize(t);const r=t.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const o=(u,h=!0)=>{u==null||u===this||u.domNode.parentNode!=null&&(r.has(u.domNode)||r.set(u.domNode,[]),h&&o(u.parent))},l=u=>{r.has(u.domNode)&&(u instanceof Od&&u.children.forEach(l),r.delete(u.domNode),u.optimize(t))};let a=e;for(let u=0;a.length>0;u+=1){if(u>=eD)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(h=>{const y=this.find(h.target,!0);y!=null&&(y.domNode===h.target&&(h.type==="childList"?(o(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(x=>{const w=this.find(x,!1);o(w,!1),w instanceof Od&&w.children.forEach(_=>{o(_,!1)})})):h.type==="attributes"&&o(y.prev)),o(y))}),this.children.forEach(l),a=Array.from(this.observer.takeRecords()),i=a.slice();i.length>0;)e.push(i.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const o=this.find(i.target,!0);return o==null?null:r.has(o.domNode)?(r.get(o.domNode).push(i),null):(r.set(o.domNode,[i]),o)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(e,t)}};i1.blotName="scroll",i1.defaultChild=kp,i1.allowedChildren=[kp,kv],i1.scope=Jn.BLOCK_BLOT,i1.tagName="DIV";let tD=i1;const Pm=tD,Yy=class k_ extends lu{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,r){r==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof k_&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,t){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Yy.blotName="text",Yy.scope=Jn.INLINE_BLOT;let nD=Yy;const lv=nD,rD=Object.freeze(Object.defineProperty({__proto__:null,Attributor:rh,AttributorStore:Iv,BlockBlot:kp,ClassAttributor:zd,ContainerBlot:kv,EmbedBlot:Bf,InlineBlot:Om,LeafBlot:lu,ParentBlot:Od,Registry:C1,Scope:Jn,ScrollBlot:Pm,StyleAttributor:dg,TextBlot:lv},Symbol.toStringTag,{value:"Module"}));class Hd extends Bf{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Hd.blotName="break";Hd.tagName="BR";let Dd=class extends lv{};const iD={"&":"&","<":"<",">":">",'"':""","'":"'"};function Mv(n){return n.replace(/[&<>"']/g,e=>iD[e])}const Kd=class Kd extends Om{static compare(e,t){const r=Kd.order.indexOf(e),i=Kd.order.indexOf(t);return r>=0||i>=0?r-i:e===t?0:e<t?-1:1}formatAt(e,t,r,i){if(Kd.compare(this.statics.blotName,r)<0&&this.scroll.query(r,Jn.BLOT)){const o=this.isolate(e,t);i&&o.wrap(r,i)}else super.formatAt(e,t,r,i)}optimize(e){if(super.optimize(e),this.parent instanceof Kd&&Kd.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};Ae(Kd,"allowedChildren",[Kd,Hd,Bf,Dd]),Ae(Kd,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let ih=Kd;const Ux=1;class kc extends kp{constructor(){super(...arguments);Ae(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=M_(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,i,o){r<=0||(this.scroll.query(i,Jn.BLOCK)?t+r===this.length()&&this.format(i,o):super.formatAt(t,Math.min(r,this.length()-t-1),i,o),this.cache={})}insertAt(t,r,i){if(i!=null){super.insertAt(t,r,i),this.cache={};return}if(r.length===0)return;const o=r.split(`
|
|
285
|
+
`+We:""}`)}Tt.length>0&&(de([...V||[],...Tt]),u==="Upload"&&o&&(Tt.forEach(He=>{J.current.push(He),Me(Re(He),"Pending")}),mt()))}},[de,_e,r,t,H,V,x,u,o,Me,Re,mt]),Mt=N.useCallback(()=>{be.current&&(be.current.value="",be.current.click())},[]),Nt=N.useCallback(ct=>ct.target.files&&bt(ct.target.files),[bt]),_t=N.useCallback((ct,Tt=!1)=>{const It=Re(ct);if(!de)return Promise.resolve();const ye=Le(ct);if(!Tt&&ye==="Loading")return Promise.resolve();if(ye==="Pending"){const pt=J.current.findIndex(wt=>wt===ct);return pt!==-1&&J.current.splice(pt,1),Ye(ct),Promise.resolve()}if(!ct.uniqueId||!a)return Ye(ct),Promise.resolve();ye!=="Loading"&&Me(It,"Loading");let He=!1;const We=pt=>{pt==="Error"&&(He=!0),Me(It,pt)};return Promise.resolve(a(ct,We)).then(()=>{He||Ye(ct)}).catch(()=>Me(It,"Error"))},[a,de,Me,Re,Le,Ye]),rn=N.useCallback(()=>{if(!(!de||!(V!=null&&V.length))&&!(typeof window<"u"&&!window.confirm(H["Are you sure you want to delete all files?"]))){if(u==="Upload"&&a){const ct=[...V];ct.forEach(Tt=>{const It=Re(Tt);Le(Tt)!=="Pending"&&Me(It,"Loading")}),(async()=>{for(const Tt of ct)await _t(Tt,!0)})();return}de([]),Xe()}},[de,V,u,a,Xe,H,Re,Le,Me,_t]),pn=N.useCallback(ct=>{if(!i)return Promise.resolve();const Tt=Re(ct);return ne[Tt]==="Loading"?Promise.resolve():(Me(Tt,"Loading"),new Promise(It=>{i(ct,(ye,se)=>{Me(Tt,ye,se),It()})}))},[i,Me,Re,ne]),Kt=N.useCallback(async()=>{if(V!=null&&V.length){if(V.forEach(ct=>{const Tt=Re(ct);Me(Tt,"Loading")}),I){I(V,(ct,Tt)=>Object.entries(ct).forEach(([It,ye])=>Me(It,ye,Tt==null?void 0:Tt[It])));return}if(i)for(const ct of V){const Tt=Re(ct);await new Promise(It=>{i(ct,(ye,se)=>{Me(Tt,ye,se),It()})})}}},[V,i,I,Me,Re]),dn=N.useCallback(()=>{!(V!=null&&V.length)||!l||l(V)},[V,l]),zt=N.useMemo(()=>{const ct=Tt=>{Tt.preventDefault(),Tt.stopPropagation()};return{onDragEnter:Tt=>{ct(Tt),!Z&&!_&&he(!0)},onDragOver:Tt=>{ct(Tt),!Z&&!_&&Tt.dataTransfer&&(Tt.dataTransfer.dropEffect="copy")},onDragLeave:Tt=>{var ye;ct(Tt),((ye=le.current)==null?void 0:ye.contains(Tt.relatedTarget))||he(!1)},onDrop:Tt=>{var It;ct(Tt),he(!1),!Z&&!_&&((It=Tt.dataTransfer.files)!=null&&It.length)&&bt(Tt.dataTransfer.files)}}},[Z,_,bt]),wn=N.useCallback(ct=>{Z||_||lt||ct.clipboardData.files.length&&(ct.preventDefault(),bt(ct.clipboardData.files))},[Z,_,lt,bt]),$t=N.useMemo(()=>{const ct=gt.clsx(vl.ButtonRenderer,"NoSelect");return{upload:Tt=>k.jsx(d9,{baseClass:ct,file:Tt,resources:H,onDelete:_t}),pending:Tt=>k.jsx(u9,{baseClass:ct,file:Tt,resources:H,onDelete:_t}),loading:Tt=>k.jsx(g9,{baseClass:ct,file:Tt,getFileProgress:Oe,mode:u,resources:H,onDelete:a}),error:Tt=>k.jsx(a9,{baseClass:ct,errorClass:vl.ErrorColor,errorCursorClass:vl.ErrorCursor,file:Tt,mode:u,resources:H,onDelete:_t,onDownload:pn}),download:Tt=>k.jsx(ba,{className:ct,icon:"FileDownload",iconSize:"sm",style:{color:"var(--AFileUploader_brand_color)"},tooltip:H.Download,type:"Raw",onClick:()=>pn(Tt)}),view:()=>null}},[H,_t,pn,Oe,u,a]),vn=N.useCallback((ct,Tt)=>{const It=Ge(ct),ye=Ve(ct),se=Pe(ct),He=()=>u==="Upload"?It?$t.loading(ct):ye?$t.pending(ct):se?$t.error(ct):$t.upload(ct):u==="View"?$t.view():It?$t.loading(ct):se?$t.error(ct):$t.download(ct);return k.jsx(xm,{ButtonRenderer:He,className:gt.clsx(vl.FileChip,se&&vl.ErrorBorder),label:k.jsx("div",{className:vl.FileChipContent,children:k.jsxs(bl,{className:vl.FileNameContainer,children:[k.jsx(nh,{children:ct.name,className:gt.clsx(se&&vl.ErrorColor)}),k.jsx("span",{children:Mg(ct.size),className:vl.FileSize})]})})},`${Re(ct)}-${Tt}`)},[Ge,Ve,Pe,u,$t,Re]),Pt=N.useCallback(()=>k.jsx("div",{className:gt.clsx(vl.FileBox,Z&&vl.ErrorBorder,Z&&vl.ErrorColor,Z&&vl.ErrorCursor,lt&&vl.Disabled,re&&!(V!=null&&V.length)&&vl.FileBoxFullSize),onPaste:wn,...zt,children:re?k.jsxs(bl,{className:gt.clsx("NoSelect"),style:{gap:4,display:V!=null&&V.length?"flex":"none"},children:[k.jsx(ho,{icon:"FileDownload"}),k.jsx("span",{children:H["Drop file to select"]})]}):k.jsxs(Ic,{className:gt.clsx(vl.SelectRenderer,"NoSelect"),isDisabled:Z||_||lt,type:"Raw",onClick:Mt,children:[H["Insert File"],x&&` ${(V==null?void 0:V.length)||0} / ${x}`]})}),[Z,lt,re,V==null?void 0:V.length,zt,H,_,Mt,x,wn]),Yt=N.useMemo(()=>{const ct=u==="Upload",Tt=u==="View",It=ct?H["Delete All"]:H["Download All"],ye=ct?rn:Kt,se=(V==null?void 0:V.some(He=>Ge(He)))||!1;return k.jsxs(bl,{className:vl.LabelContainer,children:[B.label,k.jsx(N.Activity,{mode:u==="Upload"?"visible":"hidden",children:k.jsxs(nh,{className:gt.clsx(vl.TotalFileSize,"NoSelect"),children:["(",k.jsx("span",{className:gt.clsx(Z&&vl.ErrorColor),children:Mg(Fe)})," / ",Mg(y),")"]})}),k.jsx(N.Activity,{mode:Tt?"hidden":"visible",children:k.jsx(bl,{style:{gap:4,alignItems:"center"},children:k.jsx("span",{children:It,style:{opacity:se?.6:1},className:gt.clsx(vl.LabelButton,"Label1",(ot||se)&&vl.Disabled,ct&&vl.Delete),onClick:!ot&&!se?ye:void 0})})}),k.jsx(N.Activity,{mode:l?"visible":"hidden",children:k.jsx("span",{children:H["Download List"]||"Download List",className:gt.clsx(vl.LabelButton,"Label1",!(V!=null&&V.length)&&vl.Disabled),style:{marginLeft:"auto",opacity:V!=null&&V.length?1:.6},onClick:V!=null&&V.length?dn:void 0})})]})},[u,H,rn,Kt,V,B.label,Z,Fe,y,ot,l,dn,Ge]);return u!=="Upload"&&!(V!=null&&V.length)?null:k.jsxs(lg,{wrapId:Y,wrapProps:z,labelProps:W,...B,label:Yt,children:[k.jsx("input",{ref:be,multiple:!0,accept:t||"",style:{display:"none"},type:"file",onChange:Nt}),k.jsxs(Gi,{...ee,className:gt.clsx(vl.AFileUploader,R),children:[k.jsxs(bl,{className:vl.ChipsContainer,children:[k.jsx(N.Activity,{mode:u==="Upload"?"visible":"hidden",children:Pt()}),V==null?void 0:V.map(vn)]}),k.jsx(N.Activity,{mode:u==="Upload"?"visible":"hidden",children:k.jsx(Gi,{abaseRef:le,className:gt.clsx(vl.DropIdle,"Title1","NoSelect"),style:{color:re?"var(--AFileUploader_brand_color)":"var(--AFileUploader_disabled_color)",opacity:re?1:.4},onPaste:wn,...zt,onClick:ct=>ct.preventDefault(),children:k.jsx(N.Activity,{mode:V!=null&&V.length?"hidden":"visible",children:k.jsxs(bl,{style:{gap:4},children:[k.jsx(ho,{icon:"FileDownload",size:"2xl"}),k.jsx("span",{children:H["Drop file to select"]})]})})})})]})]})},v9="_AFloatMenu_xco8u_1",b9="_Content_xco8u_10",J2={AFloatMenu:v9,Content:b9},H3=n=>{const e=Dn.c(67),{defs:t,defaultDef:r,actionRef:i,offset:o,onClose:l,onClick:a,onPaperClick:u,position:h,width:y}=n,x=h===void 0?L1.ES:h,w=y===void 0?137:y;let _;e[0]!==r?(_={content:y9,...r},e[0]=r,e[1]=_):_=e[1];const S=_;let R;e[2]!==S||e[3]!==t?(R={},er.keys(t).forEach(Xe=>{const lt=t[Xe],Ye={...S,...lt};Ye.noDisplay||(R[Xe]=Ye)}),e[2]=S,e[3]=t,e[4]=R):R=e[4];const I=R,[O,P]=N.useState(null);let Y;e[5]!==o||e[6]!==x?(Y=Xe=>{KC(Xe,V,x,o),P(Xe)},e[5]=o,e[6]=x,e[7]=Y):Y=e[7];const z=Y,[W,B]=N.useState(!1),[ee,H]=N.useState(!1),V=N.useRef(null);let de;e[8]!==z?(de=Xe=>{H(!0),setTimeout(()=>B(!0),0),setTimeout(()=>z(Xe),0)},e[8]=z,e[9]=de):de=e[9];const Z=de;let te;e[10]!==l?(te=()=>{B(!1),H(!0),l==null||l()},e[10]=l,e[11]=te):te=e[11];const ne=te;let fe;e[12]===Symbol.for("react.memo_cache_sentinel")?(fe=()=>H(!1),e[12]=fe):fe=e[12];const ae=fe;let j;e[13]!==ne||e[14]!==u?(j=async Xe=>{const lt=document.getElementById("root"),Ye=Xe.target,mt=V.current;!lt||!mt||!Ye||!mt.contains(Ye)&<.contains(Ye)&&(await(u==null?void 0:u(Xe)),ne())},e[13]=ne,e[14]=u,e[15]=j):j=e[15];const re=j;let he,be;e[16]!==W||e[17]!==re?(he=()=>{if(W)return setTimeout(()=>document.addEventListener("mousedown",re),0),()=>document.removeEventListener("mousedown",re)},be=[W,re],e[16]=W,e[17]=re,e[18]=he,e[19]=be):(he=e[18],be=e[19]),N.useEffect(he,be);let le;e[20]!==z||e[21]!==O?(le=()=>{O&&z(O)},e[20]=z,e[21]=O,e[22]=le):le=e[22];const J=le;let pe,Te;e[23]!==W||e[24]!==O||e[25]!==J?(pe=()=>{if(!W||!O)return;let Xe=O.parentElement;for(;Xe;)Xe.addEventListener("scroll",J),Xe=Xe.parentElement;return()=>{let lt=O.parentElement;for(;lt;)lt.removeEventListener("scroll",J),lt=lt.parentElement}},Te=[O,W,J],e[23]=W,e[24]=O,e[25]=J,e[26]=pe,e[27]=Te):(pe=e[26],Te=e[27]),N.useEffect(pe,Te);let Fe,_e;e[28]!==W||e[29]!==J?(Fe=()=>{if(W)return window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)},_e=[W,J],e[28]=W,e[29]=J,e[30]=Fe,e[31]=_e):(Fe=e[30],_e=e[31]),N.useEffect(Fe,_e);let Me;e[32]!==ne?(Me=Xe=>{Xe[0].intersectionRatio===0&&ne()},e[32]=ne,e[33]=Me):Me=e[33];const De=Me;let Re;e[34]!==W||e[35]!==De?(Re=()=>{if(!W)return;const Xe=new IntersectionObserver(De,{threshold:0});return V.current&&Xe.observe(V.current),()=>Xe.disconnect()},e[34]=W,e[35]=De,e[36]=Re):Re=e[36];let Le;e[37]!==W||e[38]!==De?(Le=[V,W,De],e[37]=W,e[38]=De,e[39]=Le):Le=e[39],N.useEffect(Re,Le);let Oe,Ge;e[40]!==i||e[41]!==ne||e[42]!==Z?(Oe=()=>{i&&(i.current={open:Z,close:ne})},Ge=[i,Z,ne],e[40]=i,e[41]=ne,e[42]=Z,e[43]=Oe,e[44]=Ge):(Oe=e[43],Ge=e[44]),N.useEffect(Oe,Ge);let Ve;e[45]!==ne||e[46]!==I||e[47]!==a||e[48]!==W?(Ve=Xe=>{var lt;if(W){if((lt=I[Xe])!=null&<.isDisabled)return}else return;a==null||a(Xe),ne()},e[45]=ne,e[46]=I,e[47]=a,e[48]=W,e[49]=Ve):Ve=e[49];const Pe=Ve;if(!W&&!ee)return null;let ot;if(e[50]!==S||e[51]!==I||e[52]!==W||e[53]!==Pe||e[54]!==w){const Xe=+W,lt=W&&Object.keys(I).length>0?"visible":"hidden";let Ye;e[56]!==Xe||e[57]!==lt||e[58]!==w?(Ye={opacity:Xe,visibility:lt,minWidth:w},e[56]=Xe,e[57]=lt,e[58]=w,e[59]=Ye):Ye=e[59];let mt;e[60]!==S||e[61]!==I||e[62]!==Pe?(mt=er.map(I,(Mt,Nt)=>{const[_t]=Mt,rn={...S,...I[_t]};let{content:pn,noDisplay:Kt,tooltipDirection:dn,...zt}=rn;const wn=dn===void 0?oc.E:dn;return Kt?null:(pn=Zr.getContent(rn.content,{defKey:_t,def:rn}),N.createElement(Gi,{...zt,key:Nt,className:gt.clsx(J2.Content,"Label2","IsClickable",zt.className),tooltipDirection:wn,onClick:$t=>{var vn;Pe==null||Pe(_t),(vn=zt.onClick)==null||vn.call(zt,$t)}},pn))}),e[60]=S,e[61]=I,e[62]=Pe,e[63]=mt):mt=e[63];let bt;e[64]!==Ye||e[65]!==mt?(bt=k.jsx("div",{ref:V,className:J2.AFloatMenu,style:Ye,onTransitionEnd:ae,children:mt}),e[64]=Ye,e[65]=mt,e[66]=bt):bt=e[66],ot=su.createPortal(bt,document.body),e[50]=S,e[51]=I,e[52]=W,e[53]=Pe,e[54]=w,e[55]=ot}else ot=e[55];return ot},y9=n=>n.defKey;function m9(n){try{const e=Number.parseInt(n);return isNaN(e)?void 0:e}catch{return}}const U0={parseInt:m9},x9=`${Number.MAX_SAFE_INTEGER}`.length-1,w9=n=>{const e=Dn.c(58);let t,r,i,o,l,a,u,h,y,x,w,_,S;if(e[0]!==n){const{unit:Re,unitMargin:Le,unitOptions:Oe,useSelectUnit:Ge,type:Ve,min:Pe,max:ot,unitSelectWidth:Xe,unitOptionsRenderer:lt,useValue:Ye,onEnterPress:mt,canAsterisk:bt,onFocus:Mt,...Nt}=n;h=Re,l=Le,y=Oe,_=Ge,a=Ve,o=Pe,i=ot,w=Xe,x=lt,S=Ye,r=mt,u=bt,t=Nt,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13];const R=l===void 0?4:l,I=a===void 0?"Secondary":a,O=i!==void 0&&o!==void 0?Math.max(`${i}`.length+1,`${o}`.length+1):x9,[P,Y]=Ho(S,""),[z,W]=N.useState(!1),[B,ee]=N.useState(""),H=N.useRef(null);let V;e:{if(!P||!Y){V=String(P);break e}const Re=String(P),Le=U0.parseInt(Re);if(Le!==void 0){if(o!==void 0&&Le<o){const Oe=`${o}`;Y(Oe),V=Oe;break e}if(i!==void 0&&Le>i){const Oe=`${i}`;Y(Oe),V=Oe;break e}}V=Re}const de=V;let Z;e[14]!==z||e[15]!==i||e[16]!==Y?(Z=Re=>{if(z){if(i!==void 0&&Re!==""){const Le=U0.parseInt(Re);if(Le!==void 0&&Le>i){ee(`${i}`);return}}ee(Re)}else Y&&Y(Re)},e[14]=z,e[15]=i,e[16]=Y,e[17]=Z):Z=e[17];const te=Z;let ne;e[18]!==de?(ne=()=>{W(!0),ee(de)},e[18]=de,e[19]=ne):ne=e[19];const fe=ne;let ae;e[20]!==i||e[21]!==o||e[22]!==Y?(ae=Re=>{if(W(!1),!Y)return;const Le=Re.target.value;let Oe=Le;if(Le===""||Le==="-")Oe=o!==void 0?`${o}`:Le;else{const Ge=U0.parseInt(Le);Ge===void 0?Oe=o!==void 0?`${o}`:Le:o!==void 0&&Ge<o?Oe=`${o}`:i!==void 0&&Ge>i&&(Oe=`${i}`)}Oe!==Le&&(Re.target.value=Oe),Y(Oe)},e[20]=i,e[21]=o,e[22]=Y,e[23]=ae):ae=e[23];const j=ae;let re;e[24]!==r?(re=Re=>{var Le;(Le=H.current)==null||Le.blur(),r==null||r(Re)},e[24]=r,e[25]=re):re=e[25];const he=re,be=o===void 0&&i===void 0?h??"number":`${o??""}~${i??""}`,[le,J]=Ho(_,(y==null?void 0:y[0])??"");let pe;if(y){const Re=w||"fit-content";let Le;e[26]!==Re?(Le={maxWidth:Re},e[26]=Re,e[27]=Le):Le=e[27];let Oe;e[28]!==J||e[29]!==le?(Oe=[le,J],e[28]=J,e[29]=le,e[30]=Oe):Oe=e[30];let Ge;e[31]!==R?(Ge={style:{color:"var(--label-normal)",marginLeft:4,marginRight:R}},e[31]=R,e[32]=Ge):Ge=e[32];let Ve;e[33]!==Le||e[34]!==Oe||e[35]!==Ge||e[36]!==y||e[37]!==x?(Ve=k.jsx(Ah,{className:ou.ANumInputUnitSelect,OptionRenderer:x,options:y,style:Le,type:"Raw",useSelect:Oe,arrowProps:Ge}),e[33]=Le,e[34]=Oe,e[35]=Ge,e[36]=y,e[37]=x,e[38]=Ve):Ve=e[38],pe=Ve}else{let Re;e[39]!==h||e[40]!==R?(Re=h&&k.jsx("span",{style:{marginRight:R},children:h}),e[39]=h,e[40]=R,e[41]=Re):Re=e[41],pe=Re}const Te=pe;let Fe;e[42]!==n.className?(Fe=gt.clsx(ou.ANumInput,n.className),e[42]=n.className,e[43]=Fe):Fe=e[43];const _e=z?B:de;let Me;e[44]!==te||e[45]!==_e?(Me=[_e,te],e[44]=te,e[45]=_e,e[46]=Me):Me=e[46];let De;return e[47]!==t||e[48]!==O||e[49]!==j||e[50]!==he||e[51]!==fe||e[52]!==be||e[53]!==Me||e[54]!==Fe||e[55]!==I||e[56]!==Te?(De=k.jsx(sg,{...t,autoComplete:"off",className:Fe,inputRef:H,maxLength:O,placeholder:be,RightAddon:Te,type:I,useValue:Me,onBlur:j,onEnterPress:he,onFocus:fe}),e[47]=t,e[48]=O,e[49]=j,e[50]=he,e[51]=fe,e[52]=be,e[53]=Me,e[54]=Fe,e[55]=I,e[56]=Te,e[57]=De):De=e[57],De},C9="_AListView_1nv5l_1",_9="_Row_1nv5l_10",S9="_Label_1nv5l_19",E9="_Content_1nv5l_29",f0={AListView:C9,Row:_9,Label:S9,Content:E9},A9=n=>{const e=Dn.c(50);let t,r,i,o,l,a,u,h,y,x,w,_,S,R,I,O,P,Y,z;if(e[0]!==n){const{defs:H,defaultDef:V,item:de,rowHeight:Z,labelWidth:te,noBorder:ne,onlyMiddleBorder:fe,rowGap:ae,middleBorder:j,rowBottomBorder:re,outerBorder:he,style:be,labelClassName:le,contentClassName:J,labelStyle:pe,contentStyle:Te,isPending:Fe,..._e}=n;h=de,O=Z,w=te,I=ae,P=be,y=le,i=J,x=pe,o=Te,u=Fe,S=ne||fe,r=S?"":re||"var(--AListView_border-thin)",R=S?"":he||"var(--AListView_border-thick)",_=ne?"":j||"var(--AListView_border-thick)";let Me;e[20]!==V?(Me={content:R9,label:T9,...V},e[20]=V,e[21]=Me):Me=e[21],l=Me;let De;e[22]!==l||e[23]!==H?(De={},er.keys(H).forEach(Re=>{const Le=H[Re],Oe={...l,...Le};De[Re]=Oe}),e[22]=l,e[23]=H,e[24]=De):De=e[24],a=De,t=Gi,Y=_e,z=gt.clsx(f0.AListView,_e.className),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S,e[14]=R,e[15]=I,e[16]=O,e[17]=P,e[18]=Y,e[19]=z}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13],R=e[14],I=e[15],O=e[16],P=e[17],Y=e[18],z=e[19];let W;e[25]!==r||e[26]!==P?(W={...P,borderTop:r},e[25]=r,e[26]=P,e[27]=W):W=e[27];let B;e[28]!==r||e[29]!==i||e[30]!==o||e[31]!==l||e[32]!==a||e[33]!==u||e[34]!==h||e[35]!==y||e[36]!==x||e[37]!==w||e[38]!==_||e[39]!==S||e[40]!==R||e[41]!==I||e[42]!==O?(B=er.map(a,(H,V)=>{const[de]=H,Z={...l,...a[de]},te=Zr.getContent(Z.label,{defKey:de,item:h,def:Z}),ne=Zr.getContent(Z.content,{defKey:de,item:h||{[de]:""},def:Z}),fe=Zr.getContent(Z.bold||"label",{defKey:de,item:h,def:Z}),ae=Z.height??O,j=Z.height===void 0;return k.jsxs("div",{className:f0.Row,style:{minHeight:ae,...!j&&{height:ae,maxHeight:ae},borderBottom:r,marginTop:V===0?0:typeof I=="number"?`${I}px`:I},children:[k.jsx("div",{className:gt.clsx(f0.Label,"NoSelect",fe!=="content"&&"Bold",y),style:{width:w,minWidth:w,maxWidth:w,borderLeft:R,paddingLeft:S?0:10,...x},children:k.jsx(nh,{children:te})}),k.jsx("div",{className:gt.clsx(f0.Content,fe!=="label"&&"Bold",i),style:{borderLeft:_,borderRight:R,...o},children:k.jsx(nh,{isPending:u,style:{width:"100%",padding:S?0:10},children:u?null:ne})})]},de)}),e[28]=r,e[29]=i,e[30]=o,e[31]=l,e[32]=a,e[33]=u,e[34]=h,e[35]=y,e[36]=x,e[37]=w,e[38]=_,e[39]=S,e[40]=R,e[41]=I,e[42]=O,e[43]=B):B=e[43];let ee;return e[44]!==t||e[45]!==Y||e[46]!==z||e[47]!==W||e[48]!==B?(ee=k.jsx(t,{...Y,className:z,style:W,children:B}),e[44]=t,e[45]=Y,e[46]=z,e[47]=W,e[48]=B,e[49]=ee):ee=e[49],ee},T9=n=>n.defKey,R9=n=>{const{defKey:e,item:t}=n;if(t)if(er.hasKey(t,e)){const r=t[e];return er.isReactNode(r)?r:null}else return null;else return null},I9="_ALoadingBorder_kwc1g_1",k9="_ProgressBar_kwc1g_9",M9="_IsLoading_kwc1g_15",L9="_Cover_kwc1g_19",$1={ALoadingBorder:I9,ProgressBar:k9,IsLoading:M9,Cover:L9},Am=n=>{const e=Dn.c(15),{isLoading:t}=n,[r,i]=N.useState(!1),o=N.useRef(null);let l,a;e[0]!==t?(l=()=>{t?(i(!0),o.current&&clearTimeout(o.current)):o.current=setTimeout(()=>i(!1),300)},a=[t],e[0]=t,e[1]=l,e[2]=a):(l=e[1],a=e[2]),N.useEffect(l,a);let u;e[3]!==r?(u=gt.clsx($1.ProgressBar,r&&$1.IsLoading),e[3]=r,e[4]=u):u=e[4];let h;e[5]!==u?(h=k.jsx("div",{className:u}),e[5]=u,e[6]=h):h=e[6];let y;e[7]!==t?(y=gt.clsx($1.Cover,t&&$1.IsLoading),e[7]=t,e[8]=y):y=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x={transition:"all 300ms"},e[9]=x):x=e[9];let w;e[10]!==y?(w=k.jsx("div",{className:y,style:x}),e[10]=y,e[11]=w):w=e[11];let _;return e[12]!==h||e[13]!==w?(_=k.jsxs("div",{className:$1.ALoadingBorder,children:[h,w]}),e[12]=h,e[13]=w,e[14]=_):_=e[14],_},O9="_Container_ez8dc_1",P9="_Option_ez8dc_7",D9="_RadioButton_ez8dc_14",N9="_InnerCircle_ez8dc_24",F9="_isChecked_ez8dc_29",a1={Container:O9,Option:P9,RadioButton:D9,InnerCircle:N9,isChecked:F9},B9=n=>{const{options:e,useSelect:t,selectDisabled:r,radius:i=23,innerRadius:o=i*.6,OptionRenderer:l=W3}=n,[a,u]=Ho(t,e[0]);return k.jsx("div",{className:a1.Container,children:e.map((h,y)=>{const x=r==null?void 0:r(h),w=()=>x?null:u==null?void 0:u(h);return k.jsxs(bl,{className:gt.clsx(a1.Option,"IsClickable"),isDisabled:x,onClick:w,children:[k.jsx(z9,{innerRadius:o,isChecked:a===h,radius:i},y),k.jsx(l,{option:h})]},y)})})},W3=({option:n})=>n,z9=n=>{const e=Dn.c(15),{isChecked:t,radius:r,innerRadius:i}=n;let o;e[0]!==t?(o=gt.clsx(a1.RadioButton,t&&a1.isChecked),e[0]=t,e[1]=o):o=e[1];let l;e[2]!==r?(l={width:r,height:r},e[2]=r,e[3]=l):l=e[3];let a;e[4]!==t?(a=gt.clsx(a1.InnerCircle,t&&a1.isChecked),e[4]=t,e[5]=a):a=e[5];let u;e[6]!==i?(u={width:i,height:i},e[6]=i,e[7]=u):u=e[7];let h;e[8]!==a||e[9]!==u?(h=k.jsx(Gi,{className:a,style:u}),e[8]=a,e[9]=u,e[10]=h):h=e[10];let y;return e[11]!==o||e[12]!==l||e[13]!==h?(y=k.jsx(Gi,{className:o,style:l,children:h}),e[11]=o,e[12]=l,e[13]=h,e[14]=y):y=e[14],y},H9="_AMultiSelect_19uuu_1",W9="_Arrow_19uuu_15",U9="_Primary_19uuu_24",G9="_UnAvailable_19uuu_35",Y9="_IsOpen_19uuu_35",V9="_Secondary_19uuu_42",Z9="_Placeholder_19uuu_58",X9="_ValuesContainer_19uuu_63",K9="_Values_19uuu_63",J9="_Options_19uuu_82",Q9="_Option_19uuu_82",q9="_Selected_19uuu_124",j9="_CheckBox_19uuu_131",sf={AMultiSelect:H9,Arrow:W9,Primary:U9,UnAvailable:G9,IsOpen:Y9,Secondary:V9,Placeholder:Z9,ValuesContainer:X9,Values:K9,Options:J9,Option:Q9,Selected:q9,CheckBox:j9},$9=n=>{const{options:e,useSelect:t,type:r="Primary",placeholder:i=Nr.AMultiSelect["Select(Placeholder)"],onClose:o,SelectedRenderer:l=tI,OptionRenderer:a=nI,minShowRows:u=2,maxShowRows:h=6,arrowProps:y,isAutoWidth:x=!1,...w}=n,_=N.useRef(null),S=N.useMemo(()=>w.abaseRef??_,[w.abaseRef]),R=N.useRef(null),[I,O]=Ho(t,[]),[P,Y]=N.useState(void 0),z=N.useRef(e),W=N.useRef(null),[B,ee]=N.useState(!1),[H,V]=N.useState(!1),de=N.useCallback(()=>V(!1),[]),Z=N.useCallback(()=>{w.isDisabled||w.isLoading||e.length<1||(V(!0),setTimeout(()=>ee(!0),0),setTimeout(()=>ob(R,S,e,u,h),0))},[S,w.isDisabled,w.isLoading,e,u,h]),te=N.useCallback(()=>{ee(!1),V(!0),o==null||o()},[o]),ne=N.useCallback(le=>{var J;B?te():Z(),setTimeout(()=>ob(R,S,e,u,h),0),(J=w.onClick)==null||J.call(w,le)},[S,w,e,B,te,Z,u,h]),fe=N.useCallback(()=>{ob(R,S,e,u,h)},[S,e,u,h]);N.useEffect(()=>{if(!B||!S.current)return;const le=S.current;let J=le.parentElement;for(;J;)J.addEventListener("scroll",fe),J=J.parentElement;return()=>{let pe=le.parentElement;for(;pe;)pe.removeEventListener("scroll",fe),pe=pe.parentElement}},[S,B,fe]),N.useEffect(()=>{if(B)return window.addEventListener("resize",fe),()=>window.removeEventListener("resize",fe)},[B,fe]);const ae=N.useCallback(le=>{le[0].intersectionRatio===0&&te()},[te]);N.useEffect(()=>{if(!B)return;const le=new IntersectionObserver(ae,{threshold:0});return S.current&&le.observe(S.current),()=>le.disconnect()},[S,B,ae]);const j=N.useCallback(le=>{const J=le.target,pe=S.current,Te=R.current;!pe||!J||!Te||!pe.contains(J)&&!Te.contains(J)&&te()},[S,te]),re=N.useMemo(()=>w.isDisabled||w.isLoading||e.length<1,[w.isDisabled,w.isLoading,e]);N.useEffect(()=>{if(B)return setTimeout(()=>document.addEventListener("mousedown",j),0),()=>document.removeEventListener("mousedown",j)},[B,j]);const he=N.useCallback((le,J)=>{le.stopPropagation(),le.preventDefault();let pe=[...I];pe.includes(J)?pe=pe.filter(Te=>Te!==J):pe.push(J),O==null||O(pe)},[I,O]),be=N.useCallback(()=>{if(!x||!S.current)return;const le=kg.calculateOptimalSelectWidth({elementRef:S,options:e,selectedOptions:I,placeholder:i,optionRenderer:J=>a({option:J}),type:r,isMulti:!0});Y(le)},[x,S,e,I,i,a,r]);return N.useEffect(()=>x?((e!==z.current||P===void 0)&&(W.current!==null&&cancelAnimationFrame(W.current),W.current=requestAnimationFrame(()=>{be(),W.current=null,z.current=[...e]})),()=>{W.current!==null&&(cancelAnimationFrame(W.current),W.current=null)}):void 0,[x,e,be,P]),N.useEffect(()=>()=>{typeof kg.clearCache=="function"&&kg.clearCache()},[]),k.jsxs(k.Fragment,{children:[k.jsxs(Gi,{...w,abaseRef:S,isDisabled:w.isDisabled||e.length<1,className:gt.clsx(w.className,sf.AMultiSelect,"NoSelect",B&&sf.IsOpen,re&&sf.UnAvailable,sf[r]),style:{padding:r==="Secondary"?"8px 8px 8px 0":0,width:P?`${P}px`:x?"100px":void 0,...w.style},onClick:ne,children:[k.jsx("div",{className:sf.ValuesContainer,children:k.jsx("div",{className:gt.clsx(sf.Values,I.length<1&&sf.Placeholder),children:k.jsx(l,{OptionRenderer:a,placeholder:i,selectedOptions:I})})}),k.jsx("div",{...y,className:gt.clsx(sf.Arrow,y==null?void 0:y.className),children:k.jsx(ho,{icon:"TriangleDown",style:{transform:B?"rotate(180deg)":"",transition:"var(--Transition)"}})})]}),e.length>0&&(B||H)&&su.createPortal(k.jsx("div",{ref:R,className:gt.clsx(sf.Options,sf[r]),style:{opacity:+B,visibility:B?"visible":"hidden",pointerEvents:B?void 0:"none",width:P?`${P}px`:x?"100px":void 0,borderRadius:S.current?window.getComputedStyle(S.current).borderRadius:void 0},onTransitionEnd:de,children:e.map((le,J)=>{var Te;const pe=I.includes(le);return k.jsxs("div",{className:gt.clsx(sf.Option,pe&&sf.Selected,"NoSelect",sf[r]),style:{height:(Te=S.current)==null?void 0:Te.getBoundingClientRect().height},onClick:Fe=>he(Fe,le),children:[k.jsx(x1,{className:sf.CheckBox,useCheck:[+pe,void 0]}),k.jsx(a,{option:le})]},J)})}),document.body)]})};function ob(n,e,t,r,i){if(!e.current||!n.current||!t||t.length<1)return;const o=e.current.getBoundingClientRect(),l=eI(o,t.length,r,i),a=window.getComputedStyle(e.current);n.current.style.top=`calc(${l.top??0}px - ${a.borderTopWidth})`,n.current.style.bottom=l.bottom?l.bottom+"px":"",n.current.style.left=l.left+"px",n.current.style.width||(n.current.style.minWidth=l.minWidth+"px"),n.current.style.minHeight=l.minHeight+"px",n.current.style.maxHeight=l.maxHeight+"px",n.current.style.visibility="visible"}function eI(n,e,t,r){const i={top:n.bottom,bottom:void 0,left:n.left,height:"fit-content",minWidth:n.width,minHeight:n.height*Math.min(t,e),maxHeight:n.height*r>window.innerHeight-n.bottom-10?window.innerHeight-n.bottom-10:n.height*r};return window.innerHeight-n.bottom-10<i.height&&(window.innerHeight-n.bottom-10<i.minHeight?(i.top=n.top-e*n.height,i.top<0&&(i.top=10,i.minHeight=n.top-10,i.height=n.top-10)):i.height=window.innerHeight-n.bottom-10),i}const tI=n=>{const e=Dn.c(3),{OptionRenderer:t,selectedOptions:r,placeholder:i}=n;if(r.length<1)return i;if(r.length===1){let o;return e[0]!==t||e[1]!==r[0]?(o=k.jsx(t,{option:r[0]}),e[0]=t,e[1]=r[0],e[2]=o):o=e[2],o}else return`${r.length} selected`},nI=n=>{const{option:e}=n;return er.isReactNode(e)?e:null},rI="_Container_10ion_1",iI="_Steps_10ion_9",oI="_Step_10ion_9",lI="_OutCircle_10ion_26",sI="_IsOver_10ion_37",aI="_InCircle_10ion_41",cI="_Line_10ion_54",uI="_Left_10ion_66",fI="_Right_10ion_69",dI="_ContentContainer_10ion_73",hI="_Content_10ion_73",ku={Container:rI,Steps:iI,Step:oI,OutCircle:lI,IsOver:sI,InCircle:aI,Line:cI,Left:uI,Right:fI,ContentContainer:dI,Content:hI},gI=n=>{const e=Dn.c(26),{useSelect:t,steps:r,StepRenderer:i,ContentRenderer:o}=n,l=i===void 0?Q2:i,a=o===void 0?Q2:o;if(r.length===0)throw new Error("steps should have at least one element");const u=N.useRef(null),[h,y]=Ho(t,r[0]);let x;e[0]!==y?(x=W=>y==null?void 0:y(W),e[0]=y,e[1]=x):x=e[1];const w=x,_=r.indexOf(h);let S;e[2]!==_||e[3]!==w||e[4]!==r[0]?(S=()=>{_<0&&w(r[0])},e[2]=_,e[3]=w,e[4]=r[0],e[5]=S):S=e[5];let R;e[6]!==_||e[7]!==w||e[8]!==r?(R=[_,r,w],e[6]=_,e[7]=w,e[8]=r,e[9]=R):R=e[9],N.useEffect(S,R);let I;e[10]!==l||e[11]!==_||e[12]!==w||e[13]!==r?(I=r.map((W,B)=>{const ee=r.indexOf(W),H=_>=B,V=_>B;return k.jsxs("div",{className:ku.Step,children:[B!==0&&k.jsx("div",{className:gt.clsx(ku.Line,ku.Left,H&&ku.IsOver)}),B!==r.length-1&&k.jsx("div",{className:gt.clsx(ku.Line,ku.Right,V&&ku.IsOver)}),k.jsx(Ic,{className:gt.clsx(ku.OutCircle,H&&ku.IsOver),type:"Raw",onClick:()=>w(W),children:k.jsx("div",{className:gt.clsx(ku.InCircle,H&&ku.IsOver)})}),k.jsx(l,{step:W,stepIdx:ee})]},B)}),e[10]=l,e[11]=_,e[12]=w,e[13]=r,e[14]=I):I=e[14];let O;e[15]!==I?(O=k.jsx("div",{className:ku.Steps,children:I}),e[15]=I,e[16]=O):O=e[16];let P;e[17]!==a||e[18]!==_||e[19]!==r?(P=r.map((W,B)=>{const ee=r.indexOf(W);return k.jsx("div",{className:ku.Content,style:B===0?{marginLeft:`${_*-100}%`}:{},children:k.jsx(a,{step:W,stepIdx:ee})},B)}),e[17]=a,e[18]=_,e[19]=r,e[20]=P):P=e[20];let Y;e[21]!==P?(Y=k.jsx("div",{ref:u,className:ku.ContentContainer,children:P}),e[21]=P,e[22]=Y):Y=e[22];let z;return e[23]!==O||e[24]!==Y?(z=k.jsxs("div",{className:ku.Container,children:[O,Y]}),e[23]=O,e[24]=Y,e[25]=z):z=e[25],z},Q2=n=>{const{step:e}=n;return typeof e=="object"?er.stringify(e):e},pI="_ATab_9eg6z_1",vI="_Addon_9eg6z_9",bI="_Option_9eg6z_14",yI="_Underline_9eg6z_26",mI="_IsSelected_9eg6z_26",xI="_IndicatorTrack_9eg6z_37",wI="_Indicator_9eg6z_37",CI="_Primary_9eg6z_54",_I="_Secondary_9eg6z_57",SI="_IsDisabled_9eg6z_63",EI="_Tertiary_9eg6z_77",AI="_Quaternary_9eg6z_101",Xd={ATab:pI,Addon:vI,Option:bI,Underline:yI,IsSelected:mI,IndicatorTrack:xI,Indicator:wI,Primary:CI,Secondary:_I,IsDisabled:SI,Tertiary:EI,Quaternary:AI},TI=["Primary","Secondary","Tertiary","Quaternary"],U3=n=>{const{options:e,useSelect:t,selectDisabled:r,type:i="Primary",tabProps:o,optionProps:l,optionWidth:a,OptionRenderer:u=RI,RightAddon:h,LeftAddon:y,color:x,selectedColor:w,underline:_,indicatorProps:S,indicatorTrackProps:R,height:I=40}=n;if(e.length===0)throw new Error("options should have at least one element");const O=N.useMemo(()=>e.findIndex(De=>!(r!=null&&r(De))),[e,r]),P=i==="Tertiary",Y=i==="Secondary",z=P?I*.1:0,W=Y?8:0,B=N.useMemo(()=>z+W,[z,W]),ee=N.useMemo(()=>(W-z)/e.length,[e.length,z,W]),[H,V]=Ho(t,e[O]),de=N.useRef([]),Z=N.useCallback(De=>V==null?void 0:V(De),[V]),te=N.useMemo(()=>typeof a=="number"?a+"px":a,[a]),ne=N.useMemo(()=>e.indexOf(H),[e,H]),fe=N.useMemo(()=>`calc(${100/e.length}% + ${ee}px)`,[e.length,ee]),ae=N.useMemo(()=>te||`calc(${fe} - ${B}px)`,[fe,B,te]),[j,re]=N.useState(0),[he,be]=N.useState(0),[le,J]=N.useState(ae),pe=N.useRef(null),Te=N.useRef(null),Fe=XC(Te,pe),_e=N.useMemo(()=>{let De;switch(te){case void 0:De=`calc(${fe} * ${ne})`;break;case"fit-content":De=`calc(${j}px)`;break;default:De=`calc((${te} + ${B}px) * ${ne})`;break}return De},[te,fe,ne,j,B]),Me=N.useMemo(()=>{switch(te){case void 0:return;case"fit-content":return`calc(${he}px)`;default:return`calc((${te} + ${B}px - ${ee}px) * ${e.length})`}},[te,ee,B,e,he]);return N.useEffect(()=>{var Re,Le;if(e.includes(H)||V==null||V(e[O]),te!=="fit-content"){J(ae);return}let De=0;de.current.forEach((Oe,Ge)=>{Ge<ne&&Oe.current&&(De+=Oe.current.offsetWidth+B)}),re(De),J(`calc(${((Le=(Re=de.current[ne])==null?void 0:Re.current)==null?void 0:Le.offsetWidth)||0}px)`),be(de.current.reduce((Oe,Ge)=>{var Ve;return Oe+((((Ve=Ge.current)==null?void 0:Ve.offsetWidth)||0)+B-ee)},0))},[te,de,e,H,V,O,ee,B,ne,ae]),k.jsxs("div",{ref:pe,...o,className:gt.clsx(Xd.ATab,"Headline2",Xd[i],o==null?void 0:o.className),style:{minHeight:I,height:I,maxHeight:I},children:[y&&k.jsx("div",{ref:Te,className:Xd.Addon,children:y}),k.jsx("div",{...S,className:gt.clsx(Xd.Indicator,S==null?void 0:S.className),style:{minWidth:le,left:_e,marginLeft:z,transform:`translate(${Fe??0}px, ${P?"-50%":"0"})`,height:P?I-z*2:void 0,...S==null?void 0:S.style}}),k.jsx("div",{...R,className:gt.clsx(Xd.IndicatorTrack,R==null?void 0:R.className),style:{width:Me,marginLeft:P?Fe:0,height:I,...R==null?void 0:R.style}}),e.map((De,Re)=>{const Le=r==null?void 0:r(De);return de.current[Re]||(de.current[Re]=N.createRef()),k.jsx(Gi,{abaseRef:de.current[Re],...l,isDisabled:Le,className:gt.clsx(Xd.Option,Le&&Xd.IsDiabled,De===H&&Xd.IsSelected,"IsClickable",_&&Xd.Underline,l==null?void 0:l.className),style:{minWidth:ae,maxWidth:ae,marginLeft:z,marginRight:W,"--color":De===H&&w||x,height:I,...l==null?void 0:l.style},onClick:Oe=>{!Le&&Z(De),l&&l.onClick&&l.onClick(Oe)},children:k.jsx(u,{option:De})},Re)}),k.jsx(cs,{w:z}),h&&k.jsxs(k.Fragment,{children:[k.jsx(zg,{}),k.jsx("div",{className:Xd.Addon,children:h})]})]})},RI=n=>{const{option:e}=n;if(typeof e=="string")return e;if(typeof e=="number")return e;if(typeof e=="object"){if(e===null)return"";const t=er.keys(e);return"name"in t?e.name:"label"in t?e.label:"value"in t?e.value:JSON.stringify(e)}else return JSON.stringify(e)};function G3(...n){const e=Dn.c(3),t=n,r=N.useRef(!1);let i,o;e[0]!==t?(i=()=>{r.current||(r.current=!0,t.forEach(II))},o=[t],e[0]=t,e[1]=i,e[2]=o):(i=e[1],o=e[2]),N.useEffect(i,o)}function II(n){return n()}const Y3={String:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;if(t==="")return er.keys(e).some(y=>{const x=e[y],w=Zr.getContent(x.asText,{defKey:y,def:x,item:n});if(w!==void 0)return w.toString().toLowerCase().includes(i.toLowerCase());const _=Zr.getContent(x.content,{defKey:y,def:x,item:n});return["string","number"].includes(typeof _)&&_!==void 0&&_!==null?_.toString().toLowerCase().includes(i.toLowerCase()):!1});const o=er.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Zr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0)return u.toString().toLowerCase().includes(i.toLowerCase());const h=Zr.getContent(a.content,{defKey:l,def:a,item:n});return["string","number"].includes(typeof h)&&h!==void 0&&h!==null?h.toString().toLowerCase().includes(i.toLowerCase()):!1},Select:(n,e,t,r)=>{const{value:i}=r;if(i==null)return!1;const o=er.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Zr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0)return i.toString().toLowerCase()===u.toString().toLowerCase();const h=Zr.getContent(a.content,{defKey:l,def:a,item:n});return["string","number"].includes(typeof h)&&h!==void 0&&h!==null?i.toString().toLowerCase()===h.toString().toLowerCase():!1},Date:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;const o=er.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Zr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0){const y=Yn.toDate(u.toString());return y&&Yn.eq(y,i)}const h=Zr.getContent(a.content,{defKey:l,def:a,item:n});if(["string","number"].includes(typeof h)&&h!==void 0&&h!==null){const y=Yn.toDate(h.toString());return y&&Yn.eq(y,i)}return!1},DateRange:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;const o=er.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Zr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0){const y=Yn.toDate(u.toString());return y&&Yn.be(i.sDate,y,i.eDate)}const h=Zr.getContent(a.content,{defKey:l,def:a,item:n});if(["string","number"].includes(typeof h)&&h!==void 0&&h!==null){const y=Yn.toDate(h.toString());return y&&Yn.be(i.sDate,y,i.eDate)}return!1}},kI=(n,e,t)=>{let r=n;return er.keys(t).forEach(o=>{const l=t[o];l.value===void 0||l.value===null||l.value===""||(r=r.filter(a=>{var u;return(u=l.predicate??Y3[l.type])==null?void 0:u(a,e,o,l)}))}),r},MI=(n,e,t)=>{if(!t)return n;const r=t.defKey,i=e[r];if(r===void 0)return n;const o=t.sortF??((l,a)=>{const u=Zr.getContent(i.content,{defKey:r,def:i,item:l}),h=Zr.getContent(i.content,{defKey:r,def:i,item:a});return typeof u=="string"&&typeof h=="string"?u<h?-1:u>h?1:0:typeof u=="number"&&typeof h=="number"?u-h:typeof u=="string"&&typeof h=="number"?-1:typeof u=="number"&&typeof h=="string"||u===void 0&&h!==void 0?1:u!==void 0&&h===void 0?-1:0});return typeof o=="function"&&o.length>=3?n.slice().sort((l,a)=>o(l,a,t.isAsc)):n.slice().sort((l,a)=>{const u=o(l,a);return t.isAsc?u:-u})},LI=(n,e,t)=>n.slice((e-1)*t,e*t),V3=(n,e)=>{const t=Math.max(Math.ceil(n/e),1);return Array.from({length:t},(r,i)=>i+1)},OI=(n,e,t,r)=>{const i=V3(e,t),o=Math.floor((n-1)/r),l=o*r+1,a=(o+1)*r,u=i.slice(l-1,a);return{pages:i,rangedPages:u}},PI=(n,e,t)=>{const r=[],i=Object.keys(t),o=[];i.forEach(w=>{const _=t[w],S=Zr.getContent(_.hContent,{defKey:w,def:_});if(S!==void 0){if(typeof S=="string"){o.push(S);return}else if(typeof S=="number"){o.push(S.toString());return}}const R=Zr.getContent(_.name,{defKey:w,def:_});if(R!==void 0&&typeof R=="string"){o.push(R);return}o.push(w)});const l=o.map(w=>`"${w.replaceAll('"','""')}"`);r.push(l.join(",")),e.forEach(w=>{const _=[];i.forEach(R=>{const I=t[R],O=Zr.getContent(I.content,{defKey:R,def:I,item:w});if(O!==void 0){if(typeof O=="string"){_.push(O);return}else if(typeof O=="number"){_.push(O.toString());return}}const P=w[R];typeof P=="string"?_.push(P):typeof P=="number"?_.push(P.toString()):_.push("")});const S=_.map(R=>`"${R.replaceAll('"','""')}"`);r.push(S.join(","))});const a=`${n}.csv`,u="\uFEFF"+r.join(`
|
|
286
|
+
`),h=new Blob([u],{type:"text/csv;charset=UTF-8"}),y=URL.createObjectURL(h),x=document.createElement("a");x.href=y,x.download=a,x.click(),URL.revokeObjectURL(y)},DI=n=>{const e=er.keys(n);if(e.length!==1)return;const t=e[0];if(t!=="")return;const r=n[t];if(r.type==="String")return r.value},NI=n=>{const e=Object.entries(n);let t={};return e.forEach(([r,i])=>{!i||i.value===void 0||i.value===null||i.value===""||(i.type==="DateRange"?(t[i.sFilterKey]=i.value.sDate,t[i.eFilterKey]=i.value.eDate):t[i.filterKey??r]=i.value)}),t},FI=n=>{const e=er.keys(n).filter(i=>i!=="");if(e.length!==1)return;const t=e[0],r=n[t];return!r||r.value===void 0||r.value===null||r.value===""?{selectedKey:t,value:void 0}:{selectedKey:t,value:r.value}},_h={applyFilteration:kI,applySortation:MI,applyPagination:LI,getPages:V3,getRangedPages:OI,downloadCsv:PI,getSingleFilterValue:DI,getMultiFilterValues:NI,getSelectFilterValue:FI},BI="_ATable_12zow_1",zI={ATable:BI};function Z3(n,e,t,r){const i=Dn.c(6);let o,l;i[0]!==e||i[1]!==n||i[2]!==t||i[3]!==r?(o=()=>{if(n)return n.addEventListener(e,t,r),()=>{n.removeEventListener(e,t,r)}},l=[n,e,t,r],i[0]=e,i[1]=n,i[2]=t,i[3]=r,i[4]=o,i[5]=l):(o=i[4],l=i[5]),N.useEffect(o,l)}const HI="_BodyHeader_ys4y0_1",WI="_TRow_ys4y0_7",UI="_OverflowSpace_ys4y0_11",GI="_BodyBody_ys4y0_16",YI="_IsSelected_ys4y0_35",VI="_IsSelectable_ys4y0_39",ZI="_IsRowMarked_ys4y0_47",XI="_TH_ys4y0_52",KI="_TD_ys4y0_57",JI="_IsMarked_ys4y0_57",QI="_Resizer_ys4y0_76",qI="_IsMoving_ys4y0_88",jI="_IsResizable_ys4y0_91",$I="_ResizerCenter_ys4y0_94",ek="_ResizerOut_ys4y0_100",tk="_ResizerIn_ys4y0_104",nk="_IsClicked_ys4y0_139",rk="_NoItems_ys4y0_146",ik="_Content_ys4y0_152",Zl={BodyHeader:HI,TRow:WI,OverflowSpace:UI,BodyBody:GI,IsSelected:YI,IsSelectable:VI,IsRowMarked:ZI,TH:XI,TD:KI,IsMarked:JI,Resizer:QI,IsMoving:qI,IsResizable:jI,ResizerCenter:$I,ResizerOut:ek,ResizerIn:tk,IsClicked:nk,NoItems:rk,Content:ik},jh=25,lb=50,ok=n=>{const e=Dn.c(119),{defs:t,isEqual:r,rProps:i,useSelect:o,isTableDisabled:l,isSelectMulti:a,selectDisabled:u,appliedFilteration:h,useSortation:y,pagination:x,pagedItems:w,noMarking:_,noDefHeader:S,isLoading:R,onScrollToSelectedReady:I,showRows:O,RowRenderer:P,isRowRendered:Y,rowHeight:z,resources:W}=n,B=P===void 0?ak:P;let ee;e[0]!==o?(ee=o??[],e[0]=o,e[1]=ee):ee=e[1];const[H,V]=ee;let de;e[2]!==r||e[3]!==a||e[4]!==l||e[5]!==u||e[6]!==H||e[7]!==V?(de=Se=>{l||!V||!H||u!=null&&u(Se)||(a?H.some(it=>r(it,Se))?V(H.filter(it=>!r(it,Se))):V([...H,Se]):V([Se]))},e[2]=r,e[3]=a,e[4]=l,e[5]=u,e[6]=H,e[7]=V,e[8]=de):de=e[8];const Z=de;let te,ne;e[9]!==a||e[10]!==H||e[11]!==V?(te=()=>{a||!H||!V||H.length>1&&V([H[H.length-1]])},ne=[H,V,a],e[9]=a,e[10]=H,e[11]=V,e[12]=te,e[13]=ne):(te=e[12],ne=e[13]),N.useEffect(te,ne);let fe,ae;e[14]!==u||e[15]!==H||e[16]!==V?(fe=()=>{if(!H||!V)return;H.filter(it=>u==null?void 0:u(it)).length>0&&V(H.filter(it=>!(u!=null&&u(it))))},ae=[H,V,u],e[14]=u,e[15]=H,e[16]=V,e[17]=fe,e[18]=ae):(fe=e[17],ae=e[18]),N.useEffect(fe,ae);const[j,re]=y;let he;e[19]!==re||e[20]!==j?(he=(Se,it)=>{re&&((j==null?void 0:j.defKey)===Se?j.isAsc===!0?re({defKey:Se,isAsc:!1,sortF:it}):j.isAsc===!1?re(void 0):re({defKey:Se,isAsc:!0,sortF:it}):re({defKey:Se,isAsc:!0,sortF:it}))},e[19]=re,e[20]=j,e[21]=he):he=e[21];const be=he;let le;e[22]===Symbol.for("react.memo_cache_sentinel")?(le={elem:null,row:null},e[22]=le):le=e[22];const[J,pe]=N.useState(le),Te=N.useRef(null),Fe=N.useRef(null);let _e;e[23]===Symbol.for("react.memo_cache_sentinel")?(_e=()=>pe({elem:Te.current,row:Fe.current}),e[23]=_e):_e=e[23];const Me=_e;let De;e[24]===Symbol.for("react.memo_cache_sentinel")?(De=()=>Me(),e[24]=De):De=e[24];let Re;e[25]!==w.length?(Re=[w.length,Me],e[25]=w.length,e[26]=Re):Re=e[26],N.useEffect(De,Re),Z3(window,"resize",Me);const[Le,Oe]=N.useState(z);let Ge;e[27]!==J?(Ge=()=>{const{row:Se}=J;Se!=null&&Oe(Se.clientHeight)},e[27]=J,e[28]=Ge):Ge=e[28];let Ve;e[29]!==J||e[30]!==Le?(Ve=[J,Le],e[29]=J,e[30]=Le,e[31]=Ve):Ve=e[31],N.useEffect(Ge,Ve);let Pe;e:{const{elem:Se}=J;if(!Se){Pe=0;break e}Pe=Math.floor(Se.clientHeight/Le)}const ot=Pe;let Xe;O?Xe=O:w.length<=ot?Xe=ot:Xe=w.length;const lt=Xe;let Ye;O===void 0?Ye=void 0:Ye=O*Le;const mt=Ye,bt=mt;let Mt;e:{const{elem:Se}=J;if(!Se){Mt=!1;break e}let it;e[32]!==Se?(it=Se.getBoundingClientRect(),e[32]=Se,e[33]=it):it=e[33],Mt=it.height/Le<w.length}const Nt=Mt,[_t,rn]=N.useState();let pn;const{elem:Kt}=J;!_t||!Kt?pn="100%":pn=Kt.clientHeight+(Y?0:50);const dn=pn,zt=N.useRef(null);let wn;e[34]===Symbol.for("react.memo_cache_sentinel")?(wn={},e[34]=wn):wn=e[34];const[$t,vn]=N.useState(wn);let Pt;e[35]===Symbol.for("react.memo_cache_sentinel")?(Pt={x:0,y:0},e[35]=Pt):Pt=e[35];const Yt=N.useRef(Pt);let ct;e[36]===Symbol.for("react.memo_cache_sentinel")?(ct={},e[36]=ct):ct=e[36];const Tt=N.useRef(ct);let It;e[37]!==$t?(It=er.keys($t),e[37]=$t,e[38]=It):It=e[38];const ye=It;let se;e[39]!==t?(se=(Se,it)=>{const St=zt.current;if(!St)return;const mn=[];St.childNodes.forEach(gr=>{gr.classList.contains(Zl.TH)&&mn.push(gr)});const An={};er.keys(t).forEach((gr,Sn)=>{const Qn=mn[Sn];if(!Qn)return;const xn=Qn.getBoundingClientRect().width;An[gr]=xn}),Tt.current=An,rn(it),Yt.current={x:Se.clientX,y:Se.clientY};const Gn=gr=>{if(!zt.current)return;const Qn=gr.clientX-Yt.current.x,xn=sk(t,it,Tt.current,Qn);vn(xn)};document.addEventListener("mousemove",Gn);const cr=()=>{rn(void 0),document.removeEventListener("mousemove",Gn),document.removeEventListener("mouseup",cr)};document.addEventListener("mouseup",cr)},e[39]=t,e[40]=se):se=e[40];const He=se;let We;e[41]===Symbol.for("react.memo_cache_sentinel")?(We=()=>{rn(void 0),vn({})},e[41]=We):We=e[41];const pt=We;let wt;e:{if(ye.length===0){let it;if(e[42]!==t){it={};const St=er.keys(t);for(let mn=0;mn<St.length;mn++){const An=St[mn],Gn=t[An],cr=Zr.getContent(Gn.colSpan,{defKey:An,def:Gn}),gr=Gn.width??80,Sn=Gn.minWidth??jh,Qn=Gn.maxWidth,xn={width:gr,minWidth:Sn,maxWidth:Qn,flexGrow:cr??1};if(it[An]=xn,cr!==void 0){for(let ur=1;ur<Math.min(cr,St.length-mn);ur++){const si=t[St[mn+ur]],xo=si.width??80,wo=si.minWidth??jh,so=si.maxWidth;xn.width=xn.width+xo,xn.minWidth=xn.minWidth+wo,xn.maxWidth!==void 0&&(so!==void 0?xn.maxWidth=xn.maxWidth+so:xn.maxWidth=void 0)}mn=mn+(cr-1)}}e[42]=t,e[43]=it}else it=e[43];wt=it;break e}let Se;if(e[44]!==t||e[45]!==$t){Se={};const it=er.keys(t);for(let St=0;St<it.length;St++){const mn=it[St],An=t[mn],Gn=$t[mn],cr=Zr.getContent(An.colSpan,{defKey:mn,def:An}),gr=An.minWidth??jh,Sn=An.maxWidth,Qn={width:Gn,minWidth:gr,maxWidth:Sn,flexGrow:cr??1};if(Se[mn]=Qn,cr!==void 0){for(let xn=1;xn<Math.min(cr,it.length-St);xn++){const ur=t[it[St+xn]],si=$t[it[St+xn]],xo=ur.minWidth??jh,wo=ur.maxWidth;Qn.width=Qn.width+si,Qn.minWidth=Qn.minWidth+xo,Qn.maxWidth!==void 0&&(wo!==void 0?Qn.maxWidth=Qn.maxWidth+wo:Qn.maxWidth=void 0)}St=St+(cr-1)}}e[44]=t,e[45]=$t,e[46]=Se}else Se=e[46];wt=Se}const qt=wt,Jt=N.useRef(null);let Vt;e[47]!==h?(Vt=_h.getSingleFilterValue(h),e[47]=h,e[48]=Vt):Vt=e[48];const hn=Vt;let ln;e[49]===Symbol.for("react.memo_cache_sentinel")?(ln=()=>{Te.current&&Te.current.scrollTo({top:0})},e[49]=ln):ln=e[49];let kn;e[50]!==x.page?(kn=[x.page],e[50]=x.page,e[51]=kn):kn=e[51],N.useEffect(ln,kn);let Nn;e[52]!==H?(Nn=Se=>{const it=Se===void 0?"center":Se;H&&H.length>0&&requestAnimationFrame(()=>{var St;return(St=Fe.current)==null?void 0:St.scrollIntoView({behavior:"auto",block:it})})},e[52]=H,e[53]=Nn):Nn=e[53];const En=Nn;let Cn,rr;e[54]!==I||e[55]!==En?(Cn=()=>{I==null||I(En)},rr=[I,En],e[54]=I,e[55]=En,e[56]=Cn,e[57]=rr):(Cn=e[56],rr=e[57]),N.useEffect(Cn,rr);let Bt;e[58]!==R?(Bt=k.jsx(Am,{isLoading:R}),e[58]=R,e[59]=Bt):Bt=e[59];let Ut;e[60]!==_t?(Ut=gt.clsx(Zl.BodyHeader,_t!==void 0&&Zl.IsClicked),e[60]=_t,e[61]=Ut):Ut=e[61];const yn=S||Y?"none":"flex";let Ft;e[62]!==yn?(Ft={display:yn},e[62]=yn,e[63]=Ft):Ft=e[63];let jn;e[64]===Symbol.for("react.memo_cache_sentinel")?(jn={minHeight:lb,maxHeight:lb},e[64]=jn):jn=e[64];let Hn;e[65]!==_t||e[66]!==t||e[67]!==$t||e[68]!==dn||e[69]!==He||e[70]!==be||e[71]!==(j==null?void 0:j.defKey)||e[72]!==(j==null?void 0:j.isAsc)||e[73]!==ye?(Hn=er.map(t,(Se,it)=>{const[St]=Se,mn=t[St],An=Zr.getContent(mn.hContent,{defKey:St,def:mn}),Gn=mn.name,cr=it===er.keys(t).length-1,gr=mn.width??80,Sn=mn.minWidth??jh,Qn=mn.maxWidth,xn={width:gr,minWidth:Sn,maxWidth:Qn,justifyContent:Zr.getContent(mn.hAlign,{defKey:St,def:mn})??"flex-start",...Zr.getContent(mn.hStyle,{defKey:St,def:mn})};ye.includes(St)&&(xn.width=$t[St]);const ur=mn.isSortable,si=(j==null?void 0:j.defKey)===St,xo=j==null?void 0:j.isAsc;return k.jsxs(N.Fragment,{children:[k.jsxs("div",{className:gt.clsx(Zl.TH,"Label1",ur?"IsClickable":"NoSelect"),style:xn,onClick:()=>ur&&be(St,mn.sortF),children:[k.jsx(nh,{children:An??Gn,className:Zl.Content}),ur&&k.jsx(ho,{icon:si?xo?"SortUp":"SortDown":"SortBoth",style:{width:16,height:16}})]}),!cr&&k.jsxs("div",{className:gt.sclsx(Zl,"Resizer","IsResizable","NoSelect",_t!==void 0&&"IsMoving"),onDoubleClick:pt,onMouseDown:wo=>He(wo,St),children:[k.jsx("div",{className:Zl.ResizerOut}),k.jsx("div",{className:Zl.ResizerIn}),k.jsx("div",{className:Zl.ResizerCenter,style:{height:dn}}),k.jsx("div",{className:Zl.ResizerIn}),k.jsx("div",{className:Zl.ResizerOut})]}),cr&&k.jsx(cs,{className:Zl.OverflowSpace,h:lb,style:{color:xn.color,backgroundColor:xn.backgroundColor,transition:xn.transition},w:"var(--Scrollbar-width)"})]},St)}),e[65]=_t,e[66]=t,e[67]=$t,e[68]=dn,e[69]=He,e[70]=be,e[71]=j==null?void 0:j.defKey,e[72]=j==null?void 0:j.isAsc,e[73]=ye,e[74]=Hn):Hn=e[74];let Rn;e[75]!==Hn?(Rn=k.jsx("div",{ref:zt,className:Zl.TRow,style:jn,children:Hn}),e[75]=Hn,e[76]=Rn):Rn=e[76];let Et;e[77]!==Ut||e[78]!==Ft||e[79]!==Rn?(Et=k.jsx("div",{ref:Jt,className:Ut,style:Ft,children:Rn}),e[77]=Ut,e[78]=Ft,e[79]=Rn,e[80]=Et):Et=e[80];let rt;e[81]!==_t?(rt=gt.clsx(Zl.BodyBody,_t!==void 0&&Zl.IsClicked),e[81]=_t,e[82]=rt):rt=e[82];const tn=Nt?"scroll":"hidden";let Ln;e[83]!==bt||e[84]!==mt||e[85]!==tn?(Ln={overflowY:tn,minHeight:mt,maxHeight:bt},e[83]=bt,e[84]=mt,e[85]=tn,e[86]=Ln):Ln=e[86];let mr;e[87]!==B||e[88]!==t||e[89]!==z||e[90]!==Nt||e[91]!==r||e[92]!==Y||e[93]!==l||e[94]!==_||e[95]!==Z||e[96]!==w||e[97]!==i||e[98]!==u||e[99]!==H||e[100]!==V||e[101]!==hn||e[102]!==qt?(mr=w.map((Se,it)=>{const St=Zr.getContent(i,{item:Se}),mn=V&&!l,An=H==null?void 0:H.some(Sn=>r(Sn,Se)),Gn=H&&(u==null?void 0:u(Se)),cr=typeof Gn=="string"?Gn:void 0,gr={...Se};return Y&&er.keys(t).forEach(Sn=>{const Qn=t[Sn],xn=Zr.getContent(Qn.content,{defKey:Sn,def:Qn,item:Se});let ur=!1;if(hn&&!_){const si=Zr.getContent(Qn.asText,{defKey:Sn,def:Qn,item:Se});si!==void 0?ur=si.toString().toLowerCase().includes(hn.toLowerCase()):["string","number"].includes(typeof xn)&&xn!==void 0&&xn!==null&&(ur=xn.toString().toLowerCase().includes(hn.toLowerCase()))}gr[Sn]=k.jsx("span",{className:gt.clsx(ur&&Zl.IsRowMarked),children:gr[Sn]})}),k.jsx(Gi,{isDisabled:Gn,tooltip:cr,...St,abaseRef:An?Fe:void 0,className:gt.clsx(St==null?void 0:St.className,mn&&Zl.IsSelectable,An&&Zl.IsSelected),onClick:Sn=>{var Qn;Z(Se),(Qn=St==null?void 0:St.onClick)==null||Qn.call(St,Sn)},children:k.jsx(B,{defs:t,isBodyBodyOverflowed:Nt,item:Se,markedItem:gr,noMarking:_,rowHeight:z,singleFilterValue:hn,spanWidths:qt})},it)}),e[87]=B,e[88]=t,e[89]=z,e[90]=Nt,e[91]=r,e[92]=Y,e[93]=l,e[94]=_,e[95]=Z,e[96]=w,e[97]=i,e[98]=u,e[99]=H,e[100]=V,e[101]=hn,e[102]=qt,e[103]=mr):mr=e[103];let wr;e[104]!==Y||e[105]!==w.length||e[106]!==W||e[107]!==Le||e[108]!==lt?(wr=k.jsx(lk,{isRowRendered:Y,itemsLength:w.length,resources:W,rowHeight:Le,showRows:lt}),e[104]=Y,e[105]=w.length,e[106]=W,e[107]=Le,e[108]=lt,e[109]=wr):wr=e[109];let gn;e[110]!==rt||e[111]!==Ln||e[112]!==mr||e[113]!==wr?(gn=k.jsxs("div",{ref:Te,className:rt,style:Ln,children:[mr,wr]}),e[110]=rt,e[111]=Ln,e[112]=mr,e[113]=wr,e[114]=gn):gn=e[114];let Dt;return e[115]!==Bt||e[116]!==Et||e[117]!==gn?(Dt=k.jsxs(k.Fragment,{children:[Bt,Et,gn]}),e[115]=Bt,e[116]=Et,e[117]=gn,e[118]=Dt):Dt=e[118],Dt},lk=n=>{const e=Dn.c(13),{showRows:t,itemsLength:r,resources:i,isRowRendered:o,rowHeight:l}=n;let a;e:{if(r===0){a=t;break e}a=t-r}const u=a;let h;if(e[0]!==o||e[1]!==r||e[2]!==u||e[3]!==i||e[4]!==l||e[5]!==t){let y;e[7]!==o||e[8]!==r||e[9]!==i||e[10]!==l||e[11]!==t?(y=(x,w)=>k.jsx("div",{className:gt.clsx(Zl.TRow,"NoSelect"),style:{minHeight:l,maxHeight:l,...o&&{border:"none"}},children:r===0&&w===Math.floor(t/2)&&k.jsx(bl,{className:Zl.NoItems,children:i["No Items"]})},w),e[7]=o,e[8]=r,e[9]=i,e[10]=l,e[11]=t,e[12]=y):y=e[12],h=Array.from({length:u},y),e[0]=o,e[1]=r,e[2]=u,e[3]=i,e[4]=l,e[5]=t,e[6]=h}else h=e[6];return h};function sk(n,e,t,r){const i={...t},o=er.keys(n).findIndex(h=>h===e)+1,l=Object.entries(n);let a=o-1,u=o;if(r<0){for(;r<0&&!(a<0||u>=l.length);){const[h,y]=[l[a][0],l[a][1]],[x,w]=[l[u][0],l[u][1]],_=y.minWidth??jh,S=w.maxWidth,R=i[h],I=i[x];let O=R-_;S!==void 0&&(O=Math.min(O,S-I));let P=-r;P=Math.min(P,O),R-P<=_&&a--,S!==void 0&&I+P>=S&&u++,i[h]=R-P,i[x]=I+P,r+=P}return i}else if(r>0){for(;r>0&&!(a<0||u>=l.length);){const[h,y]=[l[a][0],l[a][1]],[x,w]=[l[u][0],l[u][1]],_=w.minWidth??jh,S=y.maxWidth,R=i[x],I=i[h];let O=R-_;S!==void 0&&(O=Math.min(O,S-I));let P=r;P=Math.min(P,O),R-P<=_&&u++,S!==void 0&&I+P>=S&&a--,i[x]=R-P,i[h]=I+P,r-=P}return i}return i}const ak=n=>{const e=Dn.c(14),{defs:t,item:r,noMarking:i,spanWidths:o,singleFilterValue:l,isBodyBodyOverflowed:a,rowHeight:u}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=gt.clsx(Zl.TRow),e[0]=h):h=e[0];let y;e[1]!==u?(y={minHeight:u,maxHeight:u},e[1]=u,e[2]=y):y=e[2];let x;e[3]!==t||e[4]!==a||e[5]!==r||e[6]!==i||e[7]!==u||e[8]!==l||e[9]!==o?(x=er.map(t,(_,S)=>{const[R]=_,I=o[R];if(I===void 0)return null;const O=S===er.keys(t).length-1,P=t[R],Y=Zr.getContent(P.content,{defKey:R,def:P,item:r}),z={width:I.width,minWidth:I.minWidth,maxWidth:I.maxWidth,flexGrow:I.flexGrow,justifyContent:Zr.getContent(P.align,{defKey:R,def:P,item:r})??"flex-start",...Zr.getContent(P.style,{defKey:R,def:P,item:r})};let W=!1;if(l&&!i){const B=Zr.getContent(P.asText,{defKey:R,def:P,item:r});B!==void 0?W=B.toString().toLowerCase().includes(l.toLowerCase()):["string","number"].includes(typeof Y)&&Y!==void 0&&Y!==null&&(W=Y.toString().toLowerCase().includes(l.toLowerCase()))}return k.jsxs(N.Fragment,{children:[k.jsx("div",{className:gt.clsx(Zl.TD,"Label1",W&&Zl.IsMarked),style:z,children:k.jsx(nh,{children:Y,className:Zl.Content})}),!a&&O&&k.jsx(cs,{className:Zl.OverflowSpace,h:u,style:{color:z.color,backgroundColor:z.backgroundColor},w:"var(--Scrollbar-width)"})]},R)}),e[3]=t,e[4]=a,e[5]=r,e[6]=i,e[7]=u,e[8]=l,e[9]=o,e[10]=x):x=e[10];let w;return e[11]!==y||e[12]!==x?(w=k.jsx("div",{className:h,style:y,children:x}),e[11]=y,e[12]=x,e[13]=w):w=e[13],w},ck="_ATableFooter_w090q_1",uk="_Button_w090q_10",fk="_IsSelected_w090q_26",dk="_IsDisabled_w090q_31",Ed={ATableFooter:ck,Button:uk,IsSelected:fk,IsDisabled:dk},hk=n=>{const e=Dn.c(35),{pages:t,rangedPages:r,pageF:i,pagination:o}=n,l=t[t.length-1];let a;e[0]!==o.page?(a=gt.clsx(Ed.Button,o.page===1&&Ed.IsDisabled),e[0]=o.page,e[1]=a):a=e[1];let u;e[2]!==i.moveFirst||e[3]!==a?(u=k.jsx(ho,{className:a,icon:"FirstPage",onClick:i.moveFirst}),e[2]=i.moveFirst,e[3]=a,e[4]=u):u=e[4];let h;e[5]!==o.page?(h=gt.clsx(Ed.Button,o.page===1&&Ed.IsDisabled),e[5]=o.page,e[6]=h):h=e[6];let y;e[7]!==i.movePrev||e[8]!==h?(y=k.jsx(ho,{className:h,icon:"NavigateBefore",onClick:i.movePrev}),e[7]=i.movePrev,e[8]=h,e[9]=y):y=e[9];let x;if(e[10]!==i||e[11]!==o.page||e[12]!==r){let O;e[14]!==i||e[15]!==o.page?(O=P=>k.jsx("div",{className:gt.clsx(Ed.Button,"NoSelect",o.page===P&&Ed.IsSelected),onClick:()=>i.move(P),children:P},P),e[14]=i,e[15]=o.page,e[16]=O):O=e[16],x=r.map(O),e[10]=i,e[11]=o.page,e[12]=r,e[13]=x}else x=e[13];let w;e[17]!==l||e[18]!==o.page?(w=gt.clsx(Ed.Button,o.page===l&&Ed.IsDisabled),e[17]=l,e[18]=o.page,e[19]=w):w=e[19];let _;e[20]!==i.moveNext||e[21]!==w?(_=k.jsx(ho,{className:w,icon:"NavigateNext",onClick:i.moveNext}),e[20]=i.moveNext,e[21]=w,e[22]=_):_=e[22];let S;e[23]!==l||e[24]!==o.page?(S=gt.clsx(Ed.Button,o.page===l&&Ed.IsDisabled),e[23]=l,e[24]=o.page,e[25]=S):S=e[25];let R;e[26]!==i.moveLast||e[27]!==S?(R=k.jsx(ho,{className:S,icon:"LastPage",onClick:i.moveLast}),e[26]=i.moveLast,e[27]=S,e[28]=R):R=e[28];let I;return e[29]!==u||e[30]!==y||e[31]!==x||e[32]!==_||e[33]!==R?(I=k.jsxs(bl,{className:Ed.ATableFooter,children:[u,y,x,_,R]}),e[29]=u,e[30]=y,e[31]=x,e[32]=_,e[33]=R,e[34]=I):I=e[34],I},gk="_Filter_1b9j0_1",pk="_SelectFilter_1b9j0_11",vk="_MainFilter_1b9j0_15",bk="_IsOpen_1b9j0_26",yk="_SubFilters_1b9j0_30",mk="_Input_1b9j0_44",xk="_Main_1b9j0_15",wk="_Sub_1b9j0_30",Ck="_Actions_1b9j0_62",_k="_Icon_1b9j0_67",Sk="_LeftIcon_1b9j0_74",Ek="_CircleAlertOutline_1b9j0_79",Ak="_Rotate_1b9j0_87",li={Filter:gk,SelectFilter:pk,MainFilter:vk,IsOpen:bk,SubFilters:yk,Input:mk,Main:xk,Sub:wk,Actions:Ck,Icon:_k,LeftIcon:Sk,CircleAlertOutline:Ek,Rotate:Ak},Tk=n=>{const e=Dn.c(79),{defs:t,useFilteration:r,hasToggleFilteration:i,filterF:o,isRowRendered:l,isFilterSort:a,filterType:u,resources:h,placeholder:y}=n;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=[],e[0]=x):x=e[0];const[w,_]=N.useState(x),[S,R]=r,I=u==="Select";let O;e[1]!==S?(O=er.keys(S).map(kk),e[1]=S,e[2]=O):O=e[2];const P=O,[Y,z]=N.useState(I&&P.length>0?P[0]:null);let W;e[3]!==S||e[4]!==R?(W=(vn,Pt,Yt)=>{if(!R)return;const ct={...S};vn.value=Pt,R(ct),_(Tt=>Tt.map((It,ye)=>ye===(Yt?Yt+1:0)?"":It))},e[3]=S,e[4]=R,e[5]=W):W=e[5];const B=W;let ee;if(e[6]!==t||e[7]!==S||e[8]!==I||e[9]!==Y){ee=[];let vn=er.keys(S);if(I&&Y){let Pt;e[11]!==Y?(Pt=Yt=>Yt===Y,e[11]=Y,e[12]=Pt):Pt=e[12],vn=vn.filter(Pt)}for(const Pt of vn)ee.push({key:Pt,def:t[Pt],filter:S[Pt]});e[6]=t,e[7]=S,e[8]=I,e[9]=Y,e[10]=ee}else ee=e[10];const H=ee,V=H.length>0?H[0]:null,de=w.length>0?w[0]:"";let Z;e[13]!==H?(Z=H.length>1?H.slice(1):[],e[13]=H,e[14]=Z):Z=e[14];const te=Z;let ne;e[15]!==w?(ne=w.length>1?w.slice(1):[],e[15]=w,e[16]=ne):ne=e[16];const fe=ne,ae=te.length>0,[j,re]=N.useState(!1),[he,be]=N.useState(!1),le=N.useRef(null);let J;e[17]===Symbol.for("react.memo_cache_sentinel")?(J=()=>re(!1),e[17]=J):J=e[17];const pe=J,Te=N.useRef(null);let Fe;e[18]===Symbol.for("react.memo_cache_sentinel")?(Fe=()=>{be(!1),re(!0),Te.current&&(document.removeEventListener("mousedown",Te.current),Te.current=null)},e[18]=Fe):Fe=e[18];const _e=Fe;let Me;e[19]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>{const vn=Pt=>{const Yt=document.getElementById("root"),ct=Pt.target,Tt=le.current;!Yt||!Tt||!ct||!Tt.contains(ct)&&Yt.contains(ct)&&_e()};return Te.current=vn,vn},e[19]=Me):Me=e[19];const De=Me;let Re;e[20]===Symbol.for("react.memo_cache_sentinel")?(Re=()=>{re(!0),be(!0),setTimeout(()=>{const vn=De();document.addEventListener("mousedown",vn)},0)},e[20]=Re):Re=e[20];const Le=Re,Oe=he?_e:Le;let Ge;e[21]!==w||e[22]!==H?(Ge=()=>{const vn=H.map((Pt,Yt)=>Pt.filter.type==="String"&&Pt.filter.validation?Pt.filter.validation(Pt.filter.value||""):Pt.filter.type==="Date"&&Pt.filter.validation||Pt.filter.type==="DateRange"&&Pt.filter.validation?Pt.filter.validation(Pt.filter.value):w[Yt]);return _(vn),vn.every(Mk)},e[21]=w,e[22]=H,e[23]=Ge):Ge=e[23];const Ve=Ge;let Pe;e[24]!==o||e[25]!==Ve?(Pe=vn=>{vn.key==="Enter"?(Ve()&&o.apply(),vn.stopPropagation()):vn.key==="Escape"&&(be(!1),vn.currentTarget.focus(),vn.currentTarget.blur(),vn.stopPropagation())},e[24]=o,e[25]=Ve,e[26]=Pe):Pe=e[26];const ot=Pe;let Xe;e[27]!==Oe||e[28]!==Ve?(Xe={open:Le,close:_e,toggle:Oe,validate:Ve},e[27]=Oe,e[28]=Ve,e[29]=Xe):Xe=e[29];const lt=Xe;let Ye;e[30]!==o?(Ye=()=>{o.clear()},e[30]=o,e[31]=Ye):Ye=e[31];const mt=Ye;let bt;e[32]!==o||e[33]!==S||e[34]!==R?(bt=vn=>{if(!R||!vn)return;z(vn);const Pt={...S};er.keys(Pt).forEach(Yt=>{if(Yt!==vn&&Pt[Yt])e:switch(Pt[Yt].type){case"String":{Pt[Yt].value="";break e}case"Select":{Pt[Yt].value=null;break e}case"Date":{Pt[Yt].value=void 0;break e}case"DateRange":Pt[Yt].value=void 0}}),_([]),R(Pt),o.clear(),setTimeout(()=>{var ct;const Yt=(ct=le.current)==null?void 0:ct.querySelector("input");Yt&&Yt.focus()},0)},e[32]=o,e[33]=S,e[34]=R,e[35]=bt):bt=e[35];const Mt=bt;if(!V)return null;let Nt;e[36]!==t||e[37]!==P||e[38]!==S||e[39]!==Mt||e[40]!==I||e[41]!==Y?(Nt=I&&k.jsx(Ah,{isAutoWidth:!0,className:gt.clsx(li.SelectFilter),options:P,type:"Secondary",useSelect:[Y,Mt],OptionRenderer:vn=>{const{option:Pt}=vn,Yt=t[Pt];let ct;if(Yt!=null&&Yt.hContent){const Tt={defKey:Pt,def:Yt};ct=typeof Yt.hContent=="function"?Yt.hContent(Tt):Yt.hContent}else{const Tt=S[Pt],It=(Yt==null?void 0:Yt.name)||(Tt==null?void 0:Tt.placeholder)||String(Pt);ct=k.jsx("span",{children:It})}return ct}}),e[36]=t,e[37]=P,e[38]=S,e[39]=Mt,e[40]=I,e[41]=Y,e[42]=Nt):Nt=e[42];let _t;e[43]===Symbol.for("react.memo_cache_sentinel")?(_t=gt.clsx(li.Filter),e[43]=_t):_t=e[43];const rn=l?a?180:void 0:180,pn=l?a?300:void 0:300;let Kt;e[44]!==rn||e[45]!==pn?(Kt={minWidth:rn,maxWidth:pn},e[44]=rn,e[45]=pn,e[46]=Kt):Kt=e[46];let dn;e[47]!==o||e[48]!==I||e[49]!==ae||e[50]!==i||e[51]!==he||e[52]!==de||e[53]!==V||e[54]!==B||e[55]!==y||e[56]!==lt||e[57]!==h?(dn=k.jsx(Rk,{errorMessage:de,filterF:o,filterSet:V,hasSelectFilterType:I,hasSubFilters:ae,hasToggleFilteration:i,isOpen:he,placeholder:y,popupF:lt,resources:h,onChange:B}),e[47]=o,e[48]=I,e[49]=ae,e[50]=i,e[51]=he,e[52]=de,e[53]=V,e[54]=B,e[55]=y,e[56]=lt,e[57]=h,e[58]=dn):dn=e[58];let zt;e[59]!==o||e[60]!==I||e[61]!==he||e[62]!==j||e[63]!==B||e[64]!==mt||e[65]!==y||e[66]!==h||e[67]!==fe||e[68]!==te||e[69]!==Ve?(zt=!I&&k.jsx(Ik,{errorMessages:fe,filterF:o,isOpen:he,isTransitioning:j,placeholder:y,resources:h,subFilterSets:te,validate:Ve,onChange:B,onClearClick:mt,onTransitionEnd:pe}),e[59]=o,e[60]=I,e[61]=he,e[62]=j,e[63]=B,e[64]=mt,e[65]=y,e[66]=h,e[67]=fe,e[68]=te,e[69]=Ve,e[70]=zt):zt=e[70];let wn;e[71]!==ot||e[72]!==Kt||e[73]!==dn||e[74]!==zt?(wn=k.jsxs("div",{ref:le,className:_t,tabIndex:-1,style:Kt,onKeyDown:ot,onClick:Lk,children:[dn,zt]}),e[71]=ot,e[72]=Kt,e[73]=dn,e[74]=zt,e[75]=wn):wn=e[75];let $t;return e[76]!==Nt||e[77]!==wn?($t=k.jsxs(k.Fragment,{children:[Nt,wn]}),e[76]=Nt,e[77]=wn,e[78]=$t):$t=e[78],$t},Rk=n=>{var _,S,R,I;const e=Dn.c(182),{filterSet:t,hasToggleFilteration:r,hasSelectFilterType:i,onChange:o,filterF:l,hasSubFilters:a,popupF:u,isOpen:h,resources:y,errorMessage:x,placeholder:w}=n;if(t.filter.type==="String"){const O=t.filter.value??"";let P;e[0]!==t.filter||e[1]!==o?(P=le=>o(t.filter,le),e[0]=t.filter,e[1]=o,e[2]=P):P=e[2];let Y;e[3]!==O||e[4]!==P?(Y=[O,P],e[3]=O,e[4]=P,e[5]=Y):Y=e[5];const z=Y,W=w??t.filter.placeholder??((_=t.def)==null?void 0:_.name),B=t.filter.icon,ee=t.filter.iconTooltip??W;let H;e[6]!==h?(H=gt.clsx(li.MainFilter,h&&li.IsOpen),e[6]=h,e[7]=H):H=e[7];const V=B??"Type";let de;e[8]!==ee||e[9]!==h||e[10]!==V?(de=k.jsx(Jd,{icon:V,isOpen:h,tooltip:ee}),e[8]=ee,e[9]=h,e[10]=V,e[11]=de):de=e[11];const Z=t.filter.autoFocus;let te;e[12]===Symbol.for("react.memo_cache_sentinel")?(te=gt.clsx(li.Input,li.Main),e[12]=te):te=e[12];let ne;e[13]!==l||e[14]!==r||e[15]!==h||e[16]!==u||e[17]!==y?(ne=r&&k.jsx(d0,{isOpen:h,filterF:l,popupF:u,resources:y}),e[13]=l,e[14]=r,e[15]=h,e[16]=u,e[17]=y,e[18]=ne):ne=e[18];const fe=W??y["Search(Placeholder)"],ae=x?"Error":"Primary";let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j={style:{width:"100%",boxSizing:"border-box"}},e[19]=j):j=e[19];let re;e[20]!==x||e[21]!==l||e[22]!==i||e[23]!==a||e[24]!==h||e[25]!==u||e[26]!==y?(re=k.jsx(h0,{errorMessage:x,filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:h,popupF:u,resources:y}),e[20]=x,e[21]=l,e[22]=i,e[23]=a,e[24]=h,e[25]=u,e[26]=y,e[27]=re):re=e[27];let he;e[28]!==t.filter.autoFocus||e[29]!==t.filter.dataList||e[30]!==t.filter.maxLength||e[31]!==t.filter.pattern||e[32]!==ae||e[33]!==re||e[34]!==ne||e[35]!==fe||e[36]!==z?(he=k.jsx(sg,{autoFocus:Z,className:te,dataList:t.filter.dataList,LeftAddon:ne,maxLength:t.filter.maxLength,pattern:t.filter.pattern,placeholder:fe,type:ae,useValue:z,wrapProps:j,RightAddon:re}),e[28]=t.filter.autoFocus,e[29]=t.filter.dataList,e[30]=t.filter.maxLength,e[31]=t.filter.pattern,e[32]=ae,e[33]=re,e[34]=ne,e[35]=fe,e[36]=z,e[37]=he):he=e[37];let be;return e[38]!==he||e[39]!==H||e[40]!==de?(be=k.jsxs("div",{className:H,children:[de,he]}),e[38]=he,e[39]=H,e[40]=de,e[41]=be):be=e[41],be}else if(t.filter.type==="Select"){const O=t.filter.value??null;let P;e[42]!==l||e[43]!==t.filter||e[44]!==i||e[45]!==o||e[46]!==u?(P=ae=>{o(t.filter,ae),i&&setTimeout(()=>{u.validate()&&l.apply()},0)},e[42]=l,e[43]=t.filter,e[44]=i,e[45]=o,e[46]=u,e[47]=P):P=e[47];let Y;e[48]!==O||e[49]!==P?(Y=[O,P],e[48]=O,e[49]=P,e[50]=Y):Y=e[50];const z=Y,W=w??t.filter.placeholder??((S=t.def)==null?void 0:S.name),B=t.filter.icon,ee=t.filter.iconTooltip??W;let H;e[51]!==h?(H=gt.clsx(li.MainFilter,h&&li.IsOpen),e[51]=h,e[52]=H):H=e[52];const V=B??"Menu";let de;e[53]!==ee||e[54]!==h||e[55]!==V?(de=k.jsx(Jd,{icon:V,isOpen:h,tooltip:ee}),e[53]=ee,e[54]=h,e[55]=V,e[56]=de):de=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=gt.clsx(li.Input,li.Main),e[57]=Z):Z=e[57];let te;e[58]!==l||e[59]!==t.filter.placeholder||e[60]!==i||e[61]!==a||e[62]!==r||e[63]!==h||e[64]!==W||e[65]!==u||e[66]!==y?(te=ae=>{const{OptionRenderer:j,selectedOption:re}=ae;return re===null?W||t.filter.placeholder:k.jsxs(k.Fragment,{children:[r&&k.jsx(d0,{isOpen:h,filterF:l,popupF:u,resources:y}),k.jsx(j,{option:re}),k.jsx(h0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,hideSearchButton:!0,isOpen:h,popupF:u,resources:y})]})},e[58]=l,e[59]=t.filter.placeholder,e[60]=i,e[61]=a,e[62]=r,e[63]=h,e[64]=W,e[65]=u,e[66]=y,e[67]=te):te=e[67];let ne;e[68]!==t.filter.OptionRenderer||e[69]!==t.filter.options||e[70]!==W||e[71]!==te||e[72]!==z?(ne=k.jsx(Ah,{className:Z,OptionRenderer:t.filter.OptionRenderer,options:t.filter.options,placeholder:W,useSelect:z,SelectedRenderer:te}),e[68]=t.filter.OptionRenderer,e[69]=t.filter.options,e[70]=W,e[71]=te,e[72]=z,e[73]=ne):ne=e[73];let fe;return e[74]!==H||e[75]!==de||e[76]!==ne?(fe=k.jsxs("div",{className:H,children:[de,ne]}),e[74]=H,e[75]=de,e[76]=ne,e[77]=fe):fe=e[77],fe}else if(t.filter.type==="Date"){let O;e[78]!==t.filter||e[79]!==o?(O=pe=>o(t.filter,pe),e[78]=t.filter,e[79]=o,e[80]=O):O=e[80];let P;e[81]!==t.filter.value||e[82]!==O?(P=[t.filter.value,O],e[81]=t.filter.value,e[82]=O,e[83]=P):P=e[83];const Y=P,z=w??t.filter.placeholder??((R=t.def)==null?void 0:R.name),W=t.filter.icon,B=t.filter.iconTooltip??z;let ee;e[84]!==h?(ee=gt.clsx(li.MainFilter,h&&li.IsOpen),e[84]=h,e[85]=ee):ee=e[85];const H=W??"CalendarDay";let V;e[86]!==B||e[87]!==h||e[88]!==H?(V=k.jsx(Jd,{icon:H,isOpen:h,tooltip:B}),e[86]=B,e[87]=h,e[88]=H,e[89]=V):V=e[89];let de;e[90]===Symbol.for("react.memo_cache_sentinel")?(de=gt.clsx(li.DatePicker,li.Input,li.Main),e[90]=de):de=e[90];let Z;e[91]!==l||e[92]!==r||e[93]!==h||e[94]!==u||e[95]!==y?(Z=r&&k.jsx(d0,{isOpen:h,filterF:l,popupF:u,resources:y}),e[91]=l,e[92]=r,e[93]=h,e[94]=u,e[95]=y,e[96]=Z):Z=e[96];let te;e[97]!==r||e[98]!==h?(te=!r&&k.jsx(cs,{w:h?0:6}),e[97]=r,e[98]=h,e[99]=te):te=e[99];const ne=W??"CalendarDay",fe=!h;let ae;e[100]!==B||e[101]!==ne||e[102]!==fe?(ae=k.jsx(Jd,{icon:ne,isOpen:fe,tooltip:B}),e[100]=B,e[101]=ne,e[102]=fe,e[103]=ae):ae=e[103];const j=h?8:0;let re;e[104]!==j?(re=k.jsx(cs,{w:j}),e[104]=j,e[105]=re):re=e[105];let he;e[106]!==ae||e[107]!==re||e[108]!==Z||e[109]!==te?(he=k.jsxs(k.Fragment,{children:[Z,te,ae,re]}),e[106]=ae,e[107]=re,e[108]=Z,e[109]=te,e[110]=he):he=e[110];let be;e[111]!==l||e[112]!==i||e[113]!==a||e[114]!==h||e[115]!==u||e[116]!==y?(be=k.jsx(h0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:h,popupF:u,resources:y}),e[111]=l,e[112]=i,e[113]=a,e[114]=h,e[115]=u,e[116]=y,e[117]=be):be=e[117];let le;e[118]!==t.filter.maxDate||e[119]!==t.filter.minDate||e[120]!==z||e[121]!==he||e[122]!==be||e[123]!==Y?(le=k.jsx(Sm,{className:de,maxDate:t.filter.maxDate,minDate:t.filter.minDate,placeholder:z,type:"Raw",useDate:Y,LeftAddon:he,RightAddon:be}),e[118]=t.filter.maxDate,e[119]=t.filter.minDate,e[120]=z,e[121]=he,e[122]=be,e[123]=Y,e[124]=le):le=e[124];let J;return e[125]!==le||e[126]!==ee||e[127]!==V?(J=k.jsxs("div",{className:ee,children:[V,le]}),e[125]=le,e[126]=ee,e[127]=V,e[128]=J):J=e[128],J}else if(t.filter.type==="DateRange"){let O;e[129]!==t.filter||e[130]!==o?(O=Fe=>o(t.filter,Fe),e[129]=t.filter,e[130]=o,e[131]=O):O=e[131];let P;e[132]!==t.filter.value||e[133]!==O?(P=[t.filter.value,O],e[132]=t.filter.value,e[133]=O,e[134]=P):P=e[134];const Y=P,{noDefaultChoices:z,noClearButton:W}=t.filter,B=w??t.filter.placeholder??((I=t.def)==null?void 0:I.name),ee=t.filter.icon,H=t.filter.iconTooltip??B;let V;e[135]!==h?(V=gt.clsx(li.MainFilter,h&&li.IsOpen),e[135]=h,e[136]=V):V=e[136];const de=ee??"CalendarDay";let Z;e[137]!==H||e[138]!==h||e[139]!==de?(Z=k.jsx(Jd,{icon:de,isOpen:h,tooltip:H}),e[137]=H,e[138]=h,e[139]=de,e[140]=Z):Z=e[140];let te;e[141]===Symbol.for("react.memo_cache_sentinel")?(te=gt.clsx(li.DatePicker,li.Input,li.Main),e[141]=te):te=e[141];let ne;e[142]!==l||e[143]!==r||e[144]!==h||e[145]!==u||e[146]!==y?(ne=r&&k.jsx(d0,{isOpen:h,filterF:l,popupF:u,resources:y}),e[142]=l,e[143]=r,e[144]=h,e[145]=u,e[146]=y,e[147]=ne):ne=e[147];let fe;e[148]!==r||e[149]!==h?(fe=!r&&k.jsx(cs,{w:h?0:6}),e[148]=r,e[149]=h,e[150]=fe):fe=e[150];const ae=ee??"CalendarDay",j=!h;let re;e[151]!==H||e[152]!==ae||e[153]!==j?(re=k.jsx(Jd,{icon:ae,isOpen:j,tooltip:H}),e[151]=H,e[152]=ae,e[153]=j,e[154]=re):re=e[154];const he=h?8:0;let be;e[155]!==he?(be=k.jsx(cs,{w:he}),e[155]=he,e[156]=be):be=e[156];let le;e[157]!==re||e[158]!==be||e[159]!==ne||e[160]!==fe?(le=k.jsxs(k.Fragment,{children:[ne,fe,re,be]}),e[157]=re,e[158]=be,e[159]=ne,e[160]=fe,e[161]=le):le=e[161];let J;e[162]!==l||e[163]!==i||e[164]!==a||e[165]!==h||e[166]!==u||e[167]!==y?(J=k.jsx(h0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:h,popupF:u,resources:y}),e[162]=l,e[163]=i,e[164]=a,e[165]=h,e[166]=u,e[167]=y,e[168]=J):J=e[168];let pe;e[169]!==t.filter.maxDate||e[170]!==t.filter.minDate||e[171]!==W||e[172]!==z||e[173]!==B||e[174]!==le||e[175]!==J||e[176]!==Y?(pe=k.jsx(Cm,{className:te,maxDate:t.filter.maxDate,minDate:t.filter.minDate,noClearButton:W,noDefaultChoices:z,placeholder:B,type:"Raw",useDateRange:Y,LeftAddon:le,RightAddon:J}),e[169]=t.filter.maxDate,e[170]=t.filter.minDate,e[171]=W,e[172]=z,e[173]=B,e[174]=le,e[175]=J,e[176]=Y,e[177]=pe):pe=e[177];let Te;return e[178]!==pe||e[179]!==V||e[180]!==Z?(Te=k.jsxs("div",{className:V,children:[Z,pe]}),e[178]=pe,e[179]=V,e[180]=Z,e[181]=Te):Te=e[181],Te}return null},d0=n=>{const e=Dn.c(10),{filterF:t,popupF:r,resources:i,isOpen:o}=n,l=o?0:24,a=o?0:8;let u;e[0]!==l||e[1]!==a?(u={width:l,marginLeft:a},e[0]=l,e[1]=a,e[2]=u):u=e[2];const h=i["Toggle Filter"];let y;e[3]!==t||e[4]!==r?(y=w=>{w.currentTarget.classList.add(li.Rotate),t.toggle(),r.close(),w.stopPropagation()},e[3]=t,e[4]=r,e[5]=y):y=e[5];let x;return e[6]!==u||e[7]!==h||e[8]!==y?(x=k.jsx(ba,{className:li.Icon,icon:"Convert",style:u,tooltip:h,type:"Raw",onMouseDown:Ok,onClick:y}),e[6]=u,e[7]=h,e[8]=y,e[9]=x):x=e[9],x},h0=n=>{const e=Dn.c(29),{hasSubFilters:t,popupF:r,isOpen:i,resources:o,errorMessage:l,hideSearchButton:a,hasSelectFilterType:u,filterF:h}=n;let y;e[0]!==r?(y=W=>{W.stopPropagation(),r.open()},e[0]=r,e[1]=y):y=e[1];const x=y;let w;e[2]!==r?(w=W=>{W.stopPropagation(),r.close()},e[2]=r,e[3]=w):w=e[3];const _=w;let S;e[4]!==h||e[5]!==r?(S=W=>{W.stopPropagation(),r.validate()&&h.apply()},e[4]=h,e[5]=r,e[6]=S):S=e[6];const R=S;let I;e[7]!==l?(I=l&&k.jsx(ba,{className:li.CircleAlertOutline,icon:"CircleAlertOutline",iconSize:"xs",tooltip:l,type:"Raw"}),e[7]=l,e[8]=I):I=e[8];let O;e[9]!==u||e[10]!==t||e[11]!==i||e[12]!==x?(O=t&&!u&&k.jsx(ba,{className:li.Icon,icon:"ListAdd",type:"Raw",style:{opacity:+!i,visibility:+!i?"visible":"hidden",marginRight:-24,pointerEvents:i?"none":void 0},onClick:x}),e[9]=u,e[10]=t,e[11]=i,e[12]=x,e[13]=O):O=e[13];let P;e[14]!==u||e[15]!==t||e[16]!==i||e[17]!==_?(P=t&&!u&&k.jsx(ba,{className:li.Icon,icon:"ListRemove",type:"Raw",style:{opacity:+i,visibility:+i?"visible":"hidden",marginRight:i?-24:0,pointerEvents:i?void 0:"none"},onClick:_}),e[14]=u,e[15]=t,e[16]=i,e[17]=_,e[18]=P):P=e[18];let Y;e[19]!==a||e[20]!==i||e[21]!==R||e[22]!==o?(Y=!a&&k.jsx(ba,{className:li.Icon,icon:"Search",tooltip:o["Search(Button)"],type:"Raw",style:{opacity:+!i,visibility:+!i?"visible":"hidden",pointerEvents:i?"none":void 0,marginRight:4},onClick:R}),e[19]=a,e[20]=i,e[21]=R,e[22]=o,e[23]=Y):Y=e[23];let z;return e[24]!==I||e[25]!==O||e[26]!==P||e[27]!==Y?(z=k.jsxs(N.Fragment,{children:[I,O,P,Y]}),e[24]=I,e[25]=O,e[26]=P,e[27]=Y,e[28]=z):z=e[28],z},Ik=n=>{const e=Dn.c(31),{subFilterSets:t,onChange:r,onClearClick:i,isOpen:o,isTransitioning:l,onTransitionEnd:a,resources:u,errorMessages:h,placeholder:y,filterF:x,validate:w}=n;if(!o&&!l)return null;const _=+o,S=+o?"visible":"hidden";let R;e[0]!==_||e[1]!==S?(R={opacity:_,visibility:S},e[0]=_,e[1]=S,e[2]=R):R=e[2];let I;if(e[3]!==h||e[4]!==y||e[5]!==r||e[6]!==u||e[7]!==t){let H;e[9]!==h||e[10]!==y||e[11]!==r||e[12]!==u?(H=(V,de)=>{var Z,te,ne,fe;if(V.filter.type==="String"){const ae=[V.filter.value??"",le=>r(V.filter,le,de)],j=h[de],re=y??V.filter.placeholder??((Z=V.def)==null?void 0:Z.name),he=V.filter.icon,be=V.filter.iconTooltip??re;return k.jsxs(bl,{style:{marginBottom:6},children:[k.jsx(Jd,{icon:he??"Type",tooltip:be}),k.jsx(sg,{autoFocus:V.filter.autoFocus,className:gt.clsx(li.Input,li.Sub),dataList:V.filter.dataList,maxLength:V.filter.maxLength,pattern:V.filter.pattern,placeholder:re??u["Search(Placeholder)"],type:j?"Error":"Secondary",useValue:ae,wrapProps:{style:{width:"100%"}},RightAddon:j&&k.jsx(ba,{className:li.CircleAlertOutline,icon:"CircleAlertOutline",iconSize:"xs",tooltip:j,type:"Raw"})}),k.jsx(cs,{h:8})]},de)}else if(V.filter.type==="Select"){const ae=[V.filter.value??null,be=>r(V.filter,be)],j=y??V.filter.placeholder??((te=V.def)==null?void 0:te.name),re=V.filter.icon,he=V.filter.iconTooltip??j;return k.jsxs(bl,{style:{marginBottom:6},children:[k.jsx(Jd,{icon:re??"Menu",tooltip:he}),k.jsx(Ah,{arrowProps:{style:{marginRight:4}},className:gt.clsx(li.Input,li.Sub),OptionRenderer:V.filter.OptionRenderer,options:V.filter.options,placeholder:j,type:"Secondary",useSelect:ae}),k.jsx(cs,{h:8})]},de)}else if(V.filter.type==="Date"){const ae=[V.filter.value,be=>r(V.filter,be)],j=y??V.filter.placeholder??((ne=V.def)==null?void 0:ne.name),re=V.filter.icon,he=V.filter.iconTooltip??j;return k.jsxs(bl,{style:{marginBottom:6},children:[k.jsx(Jd,{icon:re??"CalendarDay",tooltip:he}),k.jsx(Sm,{className:gt.clsx(li.DatePicker,li.Input,li.Sub),LeftAddon:k.jsx(cs,{w:12}),maxDate:V.filter.maxDate,minDate:V.filter.minDate,placeholder:j,type:"Raw",useDate:ae}),k.jsx(cs,{h:8})]},de)}else if(V.filter.type==="DateRange"){const ae=[V.filter.value,J=>r(V.filter,J)],{noDefaultChoices:j,noClearButton:re}=V.filter,he=y??V.filter.placeholder??((fe=V.def)==null?void 0:fe.name),be=V.filter.icon,le=V.filter.iconTooltip??he;return k.jsxs(bl,{style:{marginBottom:6},children:[k.jsx(Jd,{icon:be??"CalendarDay",tooltip:le}),k.jsx(Cm,{className:gt.clsx(li.DatePicker,li.Input,li.Sub),LeftAddon:k.jsx(cs,{w:12}),maxDate:V.filter.maxDate,minDate:V.filter.minDate,noClearButton:re,noDefaultChoices:j,placeholder:he,type:"Raw",useDateRange:ae})]},de)}else return null},e[9]=h,e[10]=y,e[11]=r,e[12]=u,e[13]=H):H=e[13],I=t.map(H),e[3]=h,e[4]=y,e[5]=r,e[6]=u,e[7]=t,e[8]=I}else I=e[8];const O=u["Clear(Button)"];let P;e[14]!==i||e[15]!==O?(P=k.jsx(Ic,{type:"Secondary",onClick:i,children:O}),e[14]=i,e[15]=O,e[16]=P):P=e[16];let Y;e[17]!==x||e[18]!==w?(Y=()=>{w()&&x.apply()},e[17]=x,e[18]=w,e[19]=Y):Y=e[19];const z=u["Search(Button)"];let W;e[20]!==Y||e[21]!==z?(W=k.jsx(Ic,{onClick:Y,children:z}),e[20]=Y,e[21]=z,e[22]=W):W=e[22];let B;e[23]!==P||e[24]!==W?(B=k.jsxs(bl,{className:li.Actions,children:[P,W]}),e[23]=P,e[24]=W,e[25]=B):B=e[25];let ee;return e[26]!==a||e[27]!==R||e[28]!==I||e[29]!==B?(ee=k.jsxs("div",{className:li.SubFilters,style:R,onTransitionEnd:a,children:[I,B]}),e[26]=a,e[27]=R,e[28]=I,e[29]=B,e[30]=ee):ee=e[30],ee},Jd=n=>{const e=Dn.c(8),{icon:t,tooltip:r,isOpen:i}=n,o=i===void 0?!0:i,l=o?24:0,a=o?4:0,u=+o;let h;e[0]!==l||e[1]!==a||e[2]!==u?(h={width:l,marginRight:a,opacity:u},e[0]=l,e[1]=a,e[2]=u,e[3]=h):h=e[3];let y;return e[4]!==t||e[5]!==h||e[6]!==r?(y=k.jsx(ba,{className:li.LeftIcon,icon:t,tooltip:r,type:"Raw",style:h}),e[4]=t,e[5]=h,e[6]=r,e[7]=y):y=e[7],y};function kk(n){return String(n)}function Mk(n){return!n}function Lk(n){n.preventDefault(),n.stopPropagation()}function Ok(n){return n.currentTarget.classList.remove(li.Rotate)}const Pk="_ATableHeader_1hzfz_1",Dk="_LeftHeaderContent_1hzfz_11",Nk="_RightHeaderContent_1hzfz_19",Fk="_TopRightAddon_1hzfz_27",Bk="_HItem_1hzfz_32",Eg={ATableHeader:Pk,LeftHeaderContent:Dk,RightHeaderContent:Nk,TopRightAddon:Fk,HItem:Bk},zk=n=>{const{defs:e,title:t,totalCount:r,useCheck:i,useFilteration:o,hasToggleFilteration:l,filterF:a,noFilter:u,noCount:h,isFiltered:y,TopLeftAddon:x,TopRightAddon:w,useSortation:_,resources:S=Nr.ATable,filterType:R,placeholder:I}=n,[O]=N.useMemo(()=>i||[],[i]),P=N.useMemo(()=>y?S["Searched n items"](r):S["Total n items"](r),[S,y,r]),[Y]=o,[z,W]=_,[B,ee]=N.useState(!1),H=N.useMemo(()=>{const re=er.values(Y).filter(le=>le.type==="DateRange"),he=er.keys(Y).filter(le=>re.includes(Y[le])),be=er.keys(e).filter(le=>e[le].isSortable);return he.length>0?(he.length>1&&ee(!0),be.map(J=>he.includes(J)?[J+"_Asc",J+"_Desc"]:J).flat()):be},[e,Y]),V=N.useMemo(()=>n.isRowRendered&&H.length>0,[H.length,n.isRowRendered]),de=N.useCallback((re,he)=>{W&&(z==null?void 0:z.defKey)===re&&(z.isAsc===!0?W({defKey:re,isAsc:!1,sortF:he}):W({defKey:re,isAsc:!0,sortF:he}))},[z,W]),Z=N.useRef(null),[te,ne]=N.useState(),[fe,ae]=N.useState(z?z.defKey:H[0]),j=N.useMemo(()=>{if(!te)return{};const re=e[te];return{SortUp:{onClick:()=>{W==null||W({defKey:te,isAsc:!0,sortF:re.sortF}),ae(te)},content:()=>S["Sort up"]},SortDown:{onClick:()=>{W==null||W({defKey:te,isAsc:!1,sortF:re.sortF}),ae(te)},content:()=>S["Sort down"]}}},[W,te,e,S]);return k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:gt.clsx(Eg.ATableHeader),children:[k.jsxs("div",{className:gt.clsx(Eg.LeftHeaderContent,"NoSelect"),children:[k.jsxs(bl,{style:{marginBottom:V?8:0},children:[t&&k.jsx("div",{className:gt.clsx(Eg.HItem),style:{whiteSpace:"nowrap"},children:t}),!h&&k.jsxs("div",{className:gt.clsx(Eg.HItem),style:{maxHeight:14,...V&&{minHeight:14,color:"var(--label-neutral)"}},children:[P,O&&O.length>0&&k.jsxs(k.Fragment,{children:[" / ",S["Checked n items"](O.length)]})]})]}),V&&k.jsx(U3,{options:H,optionWidth:"fit-content",tabProps:{style:{marginRight:8}},type:"Tertiary",useSelect:[fe,()=>{}],optionProps:{style:{cursor:"default"},onClick:re=>{var le;const he=re.currentTarget.textContent;if(he===S[he])return;re.currentTarget.querySelector("svg")===null&&((le=Z.current)==null||le.open(re.currentTarget))}},OptionRenderer:re=>{const he=/_Asc|_Desc/.test(re.option),be=(z==null?void 0:z.defKey)===re.option,le=fe===re.option,J=z==null?void 0:z.isAsc,pe=()=>{if(he){ne(void 0),ae(re.option);const[_e,Me]=re.option.split("_"),De=Me==="Asc";W==null||W({defKey:_e,isAsc:De,sortF:e[_e].sortF})}else le?de(re.option,e[re.option].sortF):ne(re.option)},Fe=he?(_e=>{const[Me,De]=_e.split("_");return(B?Me+" ":"")+S[De]})(re.option):S["Sort by x"](re.option);return k.jsxs(bl,{className:gt.clsx(!(he&&le)&&"IsClickable"),style:{height:"100%"},onClick:pe,children:[Fe,le&&!he&&k.jsx(ho,{icon:be?J?"RowSortUp":"RowSortDown":"RowSortBoth",style:{marginRight:-5,marginLeft:4}})]},re.option)}})]}),k.jsx(zg,{}),k.jsxs("div",{className:gt.clsx(Eg.RightHeaderContent,"NoSelect"),children:[x&&k.jsx("div",{className:gt.clsx(Eg.HItem),children:x}),!u&&k.jsx(Tk,{defs:e,filterF:a,filterType:R,hasToggleFilteration:l,isFilterSort:H.length>0,isRowRendered:n.isRowRendered,placeholder:I,resources:S,useFilteration:o}),w&&k.jsx(bl,{children:w,className:gt.clsx(Eg.TopRightAddon)})]})]}),k.jsx(H3,{actionRef:Z,defs:j,position:L1.S,width:100,onClose:()=>ne(void 0)})]})},q2={page:1,pageSize:50,pageRange:10},Hk=n=>{const e=Dn.c(259),{defs:t,pk:r,defaultDef:i,rProps:o,useSelect:l,isSelectMulti:a,selectDisabled:u,useCheck:h,checkDisabled:y,isLoading:x,isDisabled:w,title:_,entireItems:S,onStateChange:R,pagedItems:I,totalCount:O,useFilteration:P,useToggleFilteration:Y,filterType:z,placeholder:W,rowHeight:B,usePagination:ee,useSortation:H,showRows:V,noHeader:de,noDefHeader:Z,noFooter:te,noFilter:ne,noCount:fe,noMarking:ae,noStateChangeOnMount:j,TopLeftAddon:re,TopRightAddon:he,actionRef:be,RowRenderer:le,resources:J}=n,pe=z===void 0?"Default":z,Te=B===void 0?40:B;let Fe;e[0]!==J?(Fe={...Nr.ATable,...J},e[0]=J,e[1]=Fe):Fe=e[1];const _e=Fe,Me=N.useRef(null);let De;e[2]!==r?(De=(Qe,on)=>r!==void 0?Array.isArray(r)?r.every(Wn=>ud.isEqual(Qe[Wn],on[Wn])):ud.isEqual(Qe[r],on[r]):ud.isEqual(Qe,on),e[2]=r,e[3]=De):De=e[3];const Re=De;let Le;e[4]!==i?(Le={content:Wk,...i},e[4]=i,e[5]=Le):Le=e[5];const Oe=Le;let Ge;e[6]!==Oe||e[7]!==t?(Ge={},er.keys(t).forEach(Qe=>{const on=t[Qe],Wn={...Oe,...on};Ge[Qe]=Wn}),e[6]=Oe,e[7]=t,e[8]=Ge):Ge=e[8];const Ve=Ge;let Pe;e[9]!==P?(Pe=ud.cloneDeep(P),e[9]=P,e[10]=Pe):Pe=e[10];const ot=_e["Search(Placeholder)"];let Xe;e[11]!==ot?(Xe={"":{type:"String",placeholder:ot,value:""}},e[11]=ot,e[12]=Xe):Xe=e[12];const[lt,Ye]=Ho(Pe,Xe);let mt;e[13]!==Y?(mt=ud.cloneDeep(Y),e[13]=Y,e[14]=mt):mt=e[14];let bt;e[15]===Symbol.for("react.memo_cache_sentinel")?(bt={},e[15]=bt):bt=e[15];const[Mt,Nt]=Ho(mt,bt),[_t,rn]=N.useState(!1),pn=N.useRef(void 0),Kt=N.useRef(void 0);let dn,zt;e[16]!==lt?(dn=()=>{pn.current===void 0&&(pn.current=ud.cloneDeep(lt))},zt=[lt],e[16]=lt,e[17]=dn,e[18]=zt):(dn=e[17],zt=e[18]),N.useEffect(dn,zt);let wn,$t;e[19]!==Mt?(wn=()=>{Kt.current===void 0&&Mt&&(Kt.current=ud.cloneDeep(Mt))},$t=[Mt],e[19]=Mt,e[20]=wn,e[21]=$t):(wn=e[20],$t=e[21]),N.useEffect(wn,$t);let vn;e:{if(_t&&Mt){let on;e[22]!==Nt||e[23]!==Mt?(on=[Mt,Nt],e[22]=Nt,e[23]=Mt,e[24]=on):on=e[24],vn=on;break e}let Qe;e[25]!==lt||e[26]!==Ye?(Qe=[lt,Ye],e[25]=lt,e[26]=Ye,e[27]=Qe):Qe=e[27],vn=Qe}const[Pt,Yt]=vn,[ct,Tt]=N.useState(Pt);let It;e:{if(!S){let on;e[28]===Symbol.for("react.memo_cache_sentinel")?(on=[],e[28]=on):on=e[28],It=on;break e}let Qe;e[29]!==ct||e[30]!==Ve||e[31]!==S?(Qe=_h.applyFilteration(S,Ve,ct),e[29]=ct,e[30]=Ve,e[31]=S,e[32]=Qe):Qe=e[32],It=Qe}const ye=It;let se;e:{for(const Qe in ct){const on=ct[Qe];if(on.value!==void 0&&on.value!==null&&on.value!==""){se=!0;break e}}se=!1}const He=se,[We,pt]=Ho(H,void 0);let wt;e[33]!==Ve||e[34]!==ye||e[35]!==We?(wt=_h.applySortation(ye,Ve,We),e[33]=Ve,e[34]=ye,e[35]=We,e[36]=wt):wt=e[36];const qt=wt;let Jt;e:{if(I!==void 0){let Qe;e[37]!==Ve||e[38]!==I||e[39]!==We?(Qe=_h.applySortation(I,Ve,We),e[37]=Ve,e[38]=I,e[39]=We,e[40]=Qe):Qe=e[40],Jt=Qe;break e}Jt=void 0}const Vt=Jt,[hn,ln]=N.useState(!1),kn=x??hn,[Nn,En]=Ho(ee,q2);let Cn;e[41]!==Nn?(Cn={...q2,...Nn},e[41]=Nn,e[42]=Cn):Cn=e[42];const rr=Cn;let Bt;if(e[43]!==S||e[44]!==rr||e[45]!==O||e[46]!==kn||e[47]!==qt||e[48]!==Vt){const Qe={...rr};if(Vt!==void 0){const on=O??Vt.length,Wn=_h.getPages(on,Qe.pageSize);Qe.page<1&&(Qe.page=1),O!==void 0&&!kn&&Qe.page>Wn.length&&(Qe.page=Wn.length),Bt={pagedItems:Vt,totalCount:on,pagination:Qe}}else if(S!==void 0){const on=O??qt.length,Wn=_h.getPages(on,Qe.pageSize);Qe.page>Wn.length?Qe.page=Wn.length:Qe.page<1&&(Qe.page=1);const zr=_h.applyPagination(qt,Qe.page,Qe.pageSize);let Hr;e[50]!==zr||e[51]!==Qe||e[52]!==on?(Hr={pagedItems:zr,totalCount:on,pagination:Qe},e[50]=zr,e[51]=Qe,e[52]=on,e[53]=Hr):Hr=e[53],Bt=Hr}else{let on;e[54]===Symbol.for("react.memo_cache_sentinel")?(on=[],e[54]=on):on=e[54];const Wn=O??0;let zr;e[55]!==rr||e[56]!==Wn?(zr={pagedItems:on,totalCount:Wn,pagination:rr},e[55]=rr,e[56]=Wn,e[57]=zr):zr=e[57],Bt=zr}e[43]=S,e[44]=rr,e[45]=O,e[46]=kn,e[47]=qt,e[48]=Vt,e[49]=Bt}else Bt=e[49];const{pagedItems:Ut,totalCount:yn,pagination:Ft}=Bt;let jn;e[58]!==Ft.page||e[59]!==Ft.pageRange||e[60]!==Ft.pageSize||e[61]!==yn?(jn=_h.getRangedPages(Ft.page,yn,Ft.pageSize,Ft.pageRange),e[58]=Ft.page,e[59]=Ft.pageRange,e[60]=Ft.pageSize,e[61]=yn,e[62]=jn):jn=e[62];const{pages:Hn,rangedPages:Rn}=jn;let Et;e[63]!==h?(Et=h??[],e[63]=h,e[64]=Et):Et=e[64];const[rt,tn]=Et;let Ln;if(e[65]!==rt||e[66]!==Re||e[67]!==Ut){let Qe;e[69]!==rt||e[70]!==Re?(Qe=on=>rt==null?void 0:rt.some(Wn=>Re(Wn,on)),e[69]=rt,e[70]=Re,e[71]=Qe):Qe=e[71],Ln=Ut.filter(Qe),e[65]=rt,e[66]=Re,e[67]=Ut,e[68]=Ln}else Ln=e[68];const mr=Ln;let wr;if(e[72]!==y||e[73]!==Ut){let Qe;e[75]!==y?(Qe=on=>!(y!=null&&y(on)),e[75]=y,e[76]=Qe):Qe=e[76],wr=Ut.filter(Qe),e[72]=y,e[73]=Ut,e[74]=wr}else wr=e[74];const gn=wr;let Dt;e[77]!==Re||e[78]!==gn||e[79]!==mr?(Dt=gn.length>0&&gn.every(Qe=>mr.some(on=>Re(on,Qe))),e[77]=Re,e[78]=gn,e[79]=mr,e[80]=Dt):Dt=e[80];const Se=Dt;let it;e:{if(Se){it=!1;break e}let Qe;if(e[81]!==Re||e[82]!==gn||e[83]!==mr){let on;e[85]!==Re||e[86]!==mr?(on=Wn=>mr.some(zr=>Re(zr,Wn)),e[85]=Re,e[86]=mr,e[87]=on):on=e[87],Qe=gn.some(on),e[81]=Re,e[82]=gn,e[83]=mr,e[84]=Qe}else Qe=e[84];it=Qe}const St=it;let mn;e[88]!==rt||e[89]!==w||e[90]!==Re||e[91]!==Se||e[92]!==St||e[93]!==gn||e[94]!==tn?(mn=()=>{!rt||!tn||w||tn(Se||St?rt.filter(Qe=>!gn.some(on=>Re(on,Qe))):[...rt,...gn])},e[88]=rt,e[89]=w,e[90]=Re,e[91]=Se,e[92]=St,e[93]=gn,e[94]=tn,e[95]=mn):mn=e[95];const An=mn;let Gn;e[96]!==rt||e[97]!==w||e[98]!==Re||e[99]!==tn?(Gn=Qe=>{!rt||!tn||w||(rt.some(on=>Re(on,Qe))?tn(rt.filter(on=>!Re(on,Qe))):tn([...rt,Qe]))},e[96]=rt,e[97]=w,e[98]=Re,e[99]=tn,e[100]=Gn):Gn=e[100];const cr=Gn;let gr,Sn;e[101]!==y||e[102]!==rt||e[103]!==tn?(gr=()=>{if(!tn||!rt||!y)return;rt.filter(on=>y(on)).length>0&&tn(rt.filter(on=>!y(on)))},Sn=[y,rt,tn],e[101]=y,e[102]=rt,e[103]=tn,e[104]=gr,e[105]=Sn):(gr=e[104],Sn=e[105]),N.useEffect(gr,Sn);let Qn;e[106]!==rt||e[107]!==Se||e[108]!==St||e[109]!==An?(Qn=rt&&k.jsx(x1,{isIndeterminate:St,useCheck:[Se,An]}),e[106]=rt,e[107]=Se,e[108]=St,e[109]=An,e[110]=Qn):Qn=e[110];let xn;e[111]!==y||e[112]!==rt||e[113]!==Re||e[114]!==cr?(xn=Qe=>{const{item:on}=Qe,Wn=y==null?void 0:y(on),zr=typeof Wn=="string"?Wn:void 0,Hr=rt==null?void 0:rt.some(Ei=>Re(Ei,on));return k.jsx(x1,{isDisabled:Wn,style:{zIndex:1},tooltip:zr,useCheck:[Hr,()=>cr(on)],onClick:Uk})},e[111]=y,e[112]=rt,e[113]=Re,e[114]=cr,e[115]=xn):xn=e[115];let ur;e[116]!==Qn||e[117]!==xn?(ur={hContent:Qn,content:xn,minWidth:32,maxWidth:32},e[116]=Qn,e[117]=xn,e[118]=ur):ur=e[118];const si=ur;let xo;e:{if(!h){xo=Ve;break e}let Qe;e[119]!==si||e[120]!==Ve?(Qe={checkDef:si,...Ve},e[119]=si,e[120]=Ve,e[121]=Qe):Qe=e[121],xo=Qe}const wo=xo;let so;e[122]!==R||e[123]!==En||e[124]!==pt?(so=async Qe=>{R&&(ln(!0),await R(Qe),ln(!1)),En==null||En(Qe.pagination),pt==null||pt(Qe.sortation),Tt(Qe.filteration)},e[122]=R,e[123]=En,e[124]=pt,e[125]=so):so=e[125];const ai=so;let qi;e[126]===Symbol.for("react.memo_cache_sentinel")?(qi=Qe=>{var on;(on=Me.current)==null||on.call(Me,Qe)},e[126]=qi):qi=e[126];const Yi=qi;let Jl,Wo;e[127]!==be||e[128]!==S||e[129]!==Pt||e[130]!==ai||e[131]!==Ft||e[132]!==Yt||e[133]!==We?(Jl=()=>{if(!be)return;const Qe=Wn=>{const zr={entireItems:S,filteration:Pt,pagination:Ft,sortation:We},Hr=Wn?Wn(zr):zr;ai(Hr)},on=Wn=>{const zr={...Ft,page:1},Hr=Wn?Wn(Pt):Pt;Yt==null||Yt(Hr),ai({entireItems:S,filteration:Hr,pagination:zr,sortation:We})};be.current={fireOnStateChange:Qe,applyFilteration:on,scrollToSelected:Yi}},Wo=[be,ai,S,Yt,Pt,Ft,We,Yi],e[127]=be,e[128]=S,e[129]=Pt,e[130]=ai,e[131]=Ft,e[132]=Yt,e[133]=We,e[134]=Jl,e[135]=Wo):(Jl=e[134],Wo=e[135]),N.useEffect(Jl,Wo);let Co;e[136]!==ct||e[137]!==S||e[138]!==ai||e[139]!==Hn||e[140]!==Ft.page||e[141]!==Ft.pageSize||e[142]!==We?(Co=Qe=>{Qe.page===Ft.page&&Qe.pageSize===Ft.pageSize||(Qe.page<1?Qe.page=1:Qe.page>Hn[Hn.length-1]&&(Qe.page=Hn[Hn.length-1]),ai({entireItems:S,filteration:ct,pagination:Qe,sortation:We}))},e[136]=ct,e[137]=S,e[138]=ai,e[139]=Hn,e[140]=Ft.page,e[141]=Ft.pageSize,e[142]=We,e[143]=Co):Co=e[143];const ri=Co;let an;e[144]!==Yt?(an=Qe=>{Yt&&Yt(Qe)},e[144]=Yt,e[145]=an):an=e[145];const On=an;let Fr;e[146]!==ct||e[147]!==S||e[148]!==ai||e[149]!==Ft?(Fr=Qe=>{ai({entireItems:S,filteration:ct,pagination:Ft,sortation:Qe})},e[146]=ct,e[147]=S,e[148]=ai,e[149]=Ft,e[150]=Fr):Fr=e[150];const tr=Fr;let fr;e[151]!==ri||e[152]!==Ft?(fr=Qe=>{ri({...Ft,page:Qe})},e[151]=ri,e[152]=Ft,e[153]=fr):fr=e[153];const ir=fr;let Tr;e[154]!==ir||e[155]!==Ft.page?(Tr=()=>{ir(Ft.page-1)},e[154]=ir,e[155]=Ft.page,e[156]=Tr):Tr=e[156];const mi=Tr;let Li;e[157]!==ir||e[158]!==Ft.page?(Li=()=>{ir(Ft.page+1)},e[157]=ir,e[158]=Ft.page,e[159]=Li):Li=e[159];const Br=Li;let Uo;e[160]!==ir?(Uo=()=>{ir(1)},e[160]=ir,e[161]=Uo):Uo=e[161];const To=Uo;let Ro;e[162]!==ir||e[163]!==Hn?(Ro=()=>{ir(Hn[Hn.length-1])},e[162]=ir,e[163]=Hn,e[164]=Ro):Ro=e[164];const Oi=Ro;let Kr;e[165]!==ir||e[166]!==To||e[167]!==Oi||e[168]!==Br||e[169]!==mi?(Kr={move:ir,movePrev:mi,moveNext:Br,moveFirst:To,moveLast:Oi},e[165]=ir,e[166]=To,e[167]=Oi,e[168]=Br,e[169]=mi,e[170]=Kr):Kr=e[170];const Cr=Kr;let al;e[171]!==S||e[172]!==Pt||e[173]!==ai||e[174]!==Ft||e[175]!==We?(al=()=>{const Qe={...Ft,page:1};ai({entireItems:S,filteration:Pt,pagination:Qe,sortation:We})},e[171]=S,e[172]=Pt,e[173]=ai,e[174]=Ft,e[175]=We,e[176]=al):al=e[176];const Si=al;let ji;e[177]!==_t?(ji=()=>{rn(!_t)},e[177]=_t,e[178]=ji):ji=e[178];const cl=ji;let Io;e[179]!==lt||e[180]!==_t||e[181]!==Yt||e[182]!==Nt||e[183]!==Mt?(Io=()=>{if(_t&&Mt){const Qe=Kt.current;Qe?Nt==null||Nt($2(Mt,Qe)):Nt==null||Nt(j2(Mt))}else{const Qe=pn.current;Qe?Yt==null||Yt($2(lt,Qe)):Yt==null||Yt(j2(lt))}},e[179]=lt,e[180]=_t,e[181]=Yt,e[182]=Nt,e[183]=Mt,e[184]=Io):Io=e[184];const $i=Io;let ko;e[185]!==Si||e[186]!==$i||e[187]!==cl?(ko={apply:Si,toggle:cl,clear:$i},e[185]=Si,e[186]=$i,e[187]=cl,e[188]=ko):ko=e[188];const _o=ko;let go;e[189]!==S||e[190]!==Pt||e[191]!==j||e[192]!==ai||e[193]!==Ft||e[194]!==We?(go=()=>{j||ai({entireItems:S,filteration:Pt,pagination:Ft,sortation:We})},e[189]=S,e[190]=Pt,e[191]=j,e[192]=ai,e[193]=Ft,e[194]=We,e[195]=go):go=e[195],G3(go);let Mo;e[196]!==Ve?(Mo=er.map(Ve,on=>{const[Wn]=on;return Ve[Wn].minWidth??jh}).reduce(Gk,0),e[196]=Ve,e[197]=Mo):Mo=e[197];const nr=Mo,po=le!==void 0;let hi;e[198]!==nr?(hi={minWidth:nr},e[198]=nr,e[199]=hi):hi=e[199];let Lo;e[200]!==re||e[201]!==he||e[202]!==rt||e[203]!==Ve||e[204]!==_o||e[205]!==pe||e[206]!==Pt||e[207]!==He||e[208]!==po||e[209]!==fe||e[210]!==ne||e[211]!==de||e[212]!==On||e[213]!==tr||e[214]!==W||e[215]!==_e||e[216]!==tn||e[217]!==We||e[218]!==_||e[219]!==Mt||e[220]!==yn||e[221]!==h?(Lo=!de&&k.jsx(zk,{defs:Ve,filterF:_o,filterType:pe,hasToggleFilteration:Mt!==void 0,isFiltered:He,isRowRendered:po,noCount:fe,noFilter:ne,placeholder:W,resources:_e,title:_,TopLeftAddon:re,TopRightAddon:he,totalCount:yn,useCheck:h&&rt?[rt,tn]:void 0,useFilteration:[Pt,On],useSortation:[We,tr]}),e[200]=re,e[201]=he,e[202]=rt,e[203]=Ve,e[204]=_o,e[205]=pe,e[206]=Pt,e[207]=He,e[208]=po,e[209]=fe,e[210]=ne,e[211]=de,e[212]=On,e[213]=tr,e[214]=W,e[215]=_e,e[216]=tn,e[217]=We,e[218]=_,e[219]=Mt,e[220]=yn,e[221]=h,e[222]=Lo):Lo=e[222];let Vn;e[223]!==tr||e[224]!==We?(Vn=[We,tr],e[223]=tr,e[224]=We,e[225]=Vn):Vn=e[225];let Rr;e[226]===Symbol.for("react.memo_cache_sentinel")?(Rr=Qe=>Me.current=Qe,e[226]=Rr):Rr=e[226];let we;e[227]!==le||e[228]!==ct||e[229]!==wo||e[230]!==w||e[231]!==Re||e[232]!==kn||e[233]!==po||e[234]!==a||e[235]!==Z||e[236]!==ae||e[237]!==Ut||e[238]!==Ft||e[239]!==o||e[240]!==_e||e[241]!==Te||e[242]!==u||e[243]!==V||e[244]!==Vn||e[245]!==l?(we=k.jsx(ok,{appliedFilteration:ct,defs:wo,isEqual:Re,isLoading:kn,isRowRendered:po,isSelectMulti:a,isTableDisabled:w,noDefHeader:Z,noMarking:ae,pagedItems:Ut,pagination:Ft,resources:_e,rowHeight:Te,RowRenderer:le,rProps:o,selectDisabled:u,showRows:V,useSelect:l,useSortation:Vn,onScrollToSelectedReady:Rr}),e[227]=le,e[228]=ct,e[229]=wo,e[230]=w,e[231]=Re,e[232]=kn,e[233]=po,e[234]=a,e[235]=Z,e[236]=ae,e[237]=Ut,e[238]=Ft,e[239]=o,e[240]=_e,e[241]=Te,e[242]=u,e[243]=V,e[244]=Vn,e[245]=l,e[246]=we):we=e[246];let at;e[247]!==te||e[248]!==Cr||e[249]!==Hn||e[250]!==Ft||e[251]!==Rn?(at=!te&&k.jsx(hk,{pageF:Cr,pages:Hn,pagination:Ft,rangedPages:Rn}),e[247]=te,e[248]=Cr,e[249]=Hn,e[250]=Ft,e[251]=Rn,e[252]=at):at=e[252];let Rt;return e[253]!==w||e[254]!==hi||e[255]!==Lo||e[256]!==we||e[257]!==at?(Rt=k.jsxs(Gi,{className:zI.ATable,isDisabled:w,style:hi,children:[Lo,we,at]}),e[253]=w,e[254]=hi,e[255]=Lo,e[256]=we,e[257]=at,e[258]=Rt):Rt=e[258],Rt},Wk=n=>{const{defKey:e,item:t}=n;if(er.hasKey(t,e)){const r=t[e];return er.isReactNode(r)?r:null}else return null};function j2(n){const e={...n};for(const t in e)e[t].value=void 0;return e}function $2(n,e){const t={...n};for(const r in t){const i=e[r];i&&"value"in i?t[r].value=i.value:t[r].value=void 0}return t}function Uk(n){return n.stopPropagation()}function Gk(n,e){return n+e}const Yk="_AText_1asz6_1",Vk={AText:Yk},X3=n=>{const e=Dn.c(12),{text:t,styled:r,style:i}=n;let o;if(e[0]!==i||e[1]!==r||e[2]!==t){e:{if(t)if(r)if(i){if(r===!0)if(i==="bold"){let h;e[4]!==t?(h=k.jsx("b",{children:t}),e[4]=t,e[5]=h):h=e[5],o=h;break e}else{let h;e[6]!==i||e[7]!==t?(h=k.jsx("span",{style:i,children:t}),e[6]=i,e[7]=t,e[8]=h):h=e[8],o=h;break e}else if(typeof r=="string"){const h=t.split(r);if(i==="bold"){o=h.map((y,x)=>k.jsxs(N.Fragment,{children:[g0(y),x<h.length-1?k.jsx("b",{children:g0(r)}):""]},x));break e}o=h.map((y,x)=>k.jsxs(N.Fragment,{children:[g0(y),x<h.length-1&&k.jsx("span",{style:i,children:g0(r)})]},x));break e}}else{o=t;break e}else{o=t;break e}else{o="";break e}o=void 0}e[0]=i,e[1]=r,e[2]=t,e[3]=o}else o=e[3];const l=o;let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a=gt.clsx("Body1Reading",Vk.AText,"NoSelect"),e[9]=a):a=e[9];let u;return e[10]!==l?(u=k.jsx("div",{className:a,children:l}),e[10]=l,e[11]=u):u=e[11],u};function g0(n){const e=n.split(`
|
|
287
|
+
`);return e.map((t,r)=>k.jsxs(N.Fragment,{children:[t,r!==e.length-1&&k.jsx("br",{})]},r))}const Zk="_Base_cpm4t_7",Xk="_ATextArea_cpm4t_11",Kk="_Primary_cpm4t_34",Jk="_UnAvailable_cpm4t_39",Qk="_Secondary_cpm4t_47",qk="_ReadOnly_cpm4t_59",p0={Base:Zk,ATextArea:Xk,Primary:Kk,UnAvailable:Jk,Secondary:Qk,ReadOnly:qk,Error:"_Error_cpm4t_66"},jk=["Primary","Secondary","ReadOnly","Error"],$k=n=>{const e=Dn.c(60);let t,r,i,o,l,a,u,h,y,x,w,_,S;if(e[0]!==n){const{onEnterPress:_e,errorMessage:Me,type:De,textAreaRef:Re,useValue:Le,rows:Oe,isReadonly:Ge,placeholder:Ve,maxLength:Pe,tabIndex:ot,autoFocus:Xe,textAreaProps:lt,...Ye}=n;a=_e,r=Me,_=Re,S=Le,h=Oe,i=Ge,u=Ve,l=Pe,x=ot,t=Xe,w=lt,o=De===void 0?"Primary":De,y=Bg(Ye),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=h,e[9]=y,e[10]=x,e[11]=w,e[12]=_,e[13]=S}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],h=e[8],y=e[9],x=e[10],w=e[11],_=e[12],S=e[13];const[R,I]=y;let O,P,Y,z;e[14]!==R?({wrapId:P,wrapProps:Y,labelProps:O,...z}=R,e[14]=R,e[15]=O,e[16]=P,e[17]=Y,e[18]=z):(O=e[15],P=e[16],Y=e[17],z=e[18]);let W;e7(r)?W="Error":W=o;const B=W;let ee;B==="ReadOnly"?ee=!0:ee=i;const H=ee,V=I.isDisabled||I.isLoading,[de,Z]=Ho(S,"");let te;e[19]!==Z?(te=_e=>{Z&&Z(_e)},e[19]=Z,e[20]=te):te=e[20];const ne=te;let fe;e[21]!==ne||e[22]!==w||e[23]!==V?(fe=_e=>{var Me;V||(ne(_e.target.value),(Me=w==null?void 0:w.onChange)==null||Me.call(w,_e))},e[21]=ne,e[22]=w,e[23]=V,e[24]=fe):fe=e[24];const ae=fe;let j;e[25]!==a||e[26]!==w||e[27]!==V?(j=_e=>{var Me;if(!V){if((Me=w==null?void 0:w.onKeyDown)==null||Me.call(w,_e),_e.key==="Tab"){const De=_e.currentTarget.selectionStart,Re=_e.currentTarget.selectionEnd;_e.currentTarget.value=_e.currentTarget.value.substring(0,De)+" "+_e.currentTarget.value.substring(Re),_e.currentTarget.selectionStart=_e.currentTarget.selectionEnd=De+1,_e.preventDefault()}else _e.key==="Enter"&&(a==null||a(_e.currentTarget.value),_e.stopPropagation());_e.key!=="Escape"&&_e.stopPropagation()}},e[25]=a,e[26]=w,e[27]=V,e[28]=j):j=e[28];const re=j;let he;e[29]!==O||e[30]!==P||e[31]!==Y||e[32]!==z?(he={wrapId:P,wrapProps:Y,labelProps:O,...z},e[29]=O,e[30]=P,e[31]=Y,e[32]=z,e[33]=he):he=e[33];let be;e[34]!==I.className?(be=gt.clsx(p0.Base,I.className),e[34]=I.className,e[35]=be):be=e[35];let le;e[36]!==(w==null?void 0:w.className)||e[37]!==B||e[38]!==V?(le=gt.clsx(p0.ATextArea,p0[B],V&&p0.UnAvailable,w==null?void 0:w.className),e[36]=w==null?void 0:w.className,e[37]=B,e[38]=V,e[39]=le):le=e[39];const J=I.isDisabled||I.isLoading?-1:x;let pe;e[40]!==t||e[41]!==H||e[42]!==l||e[43]!==ae||e[44]!==re||e[45]!==u||e[46]!==h||e[47]!==J||e[48]!==le||e[49]!==w||e[50]!==_||e[51]!==de?(pe=k.jsx("textarea",{...w,ref:_,autoFocus:t,className:le,maxLength:l,placeholder:u,readOnly:H,rows:h,tabIndex:J,value:de,onChange:ae,onKeyDown:re}),e[40]=t,e[41]=H,e[42]=l,e[43]=ae,e[44]=re,e[45]=u,e[46]=h,e[47]=J,e[48]=le,e[49]=w,e[50]=_,e[51]=de,e[52]=pe):pe=e[52];let Te;e[53]!==I||e[54]!==pe||e[55]!==be?(Te=k.jsx(Gi,{...I,className:be,children:pe}),e[53]=I,e[54]=pe,e[55]=be,e[56]=Te):Te=e[56];let Fe;return e[57]!==Te||e[58]!==he?(Fe=k.jsx(lg,{...he,children:Te}),e[57]=Te,e[58]=he,e[59]=Fe):Fe=e[59],Fe};function e7(n){return Array.isArray(n)?n.filter(Boolean).length>0:!!n}/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:K3,setPrototypeOf:ex,isFrozen:t7,getPrototypeOf:n7,getOwnPropertyDescriptor:r7}=Object;let{freeze:Ou,seal:bd,create:ky}=Object,{apply:My,construct:Ly}=typeof Reflect<"u"&&Reflect;Ou||(Ou=function(e){return e});bd||(bd=function(e){return e});My||(My=function(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return e.apply(t,i)});Ly||(Ly=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return new e(...r)});const v0=Pu(Array.prototype.forEach),i7=Pu(Array.prototype.lastIndexOf),tx=Pu(Array.prototype.pop),ep=Pu(Array.prototype.push),o7=Pu(Array.prototype.splice),G0=Pu(String.prototype.toLowerCase),sb=Pu(String.prototype.toString),ab=Pu(String.prototype.match),tp=Pu(String.prototype.replace),l7=Pu(String.prototype.indexOf),s7=Pu(String.prototype.trim),Rd=Pu(Object.prototype.hasOwnProperty),Mu=Pu(RegExp.prototype.test),np=a7(TypeError);function Pu(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return My(n,e,r)}}function a7(n){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ly(n,t)}}function Mi(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:G0;ex&&ex(n,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const o=t(i);o!==i&&(t7(e)||(e[r]=o),i=o)}n[i]=!0}return n}function c7(n){for(let e=0;e<n.length;e++)Rd(n,e)||(n[e]=null);return n}function Ch(n){const e=ky(null);for(const[t,r]of K3(n))Rd(n,t)&&(Array.isArray(r)?e[t]=c7(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=Ch(r):e[t]=r);return e}function rp(n,e){for(;n!==null;){const r=r7(n,e);if(r){if(r.get)return Pu(r.get);if(typeof r.value=="function")return Pu(r.value)}n=n7(n)}function t(){return null}return t}const nx=Ou(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cb=Ou(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ub=Ou(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),u7=Ou(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fb=Ou(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),f7=Ou(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rx=Ou(["#text"]),ix=Ou(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),db=Ou(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ox=Ou(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),b0=Ou(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),d7=bd(/\{\{[\w\W]*|[\w\W]*\}\}/gm),h7=bd(/<%[\w\W]*|[\w\W]*%>/gm),g7=bd(/\$\{[\w\W]*/gm),p7=bd(/^data-[\-\w.\u00B7-\uFFFF]+$/),v7=bd(/^aria-[\-\w]+$/),J3=bd(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),b7=bd(/^(?:\w+script|data):/i),y7=bd(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q3=bd(/^html$/i),m7=bd(/^[a-z][.\w]*(-[.\w]+)+$/i);var lx=Object.freeze({__proto__:null,ARIA_ATTR:v7,ATTR_WHITESPACE:y7,CUSTOM_ELEMENT:m7,DATA_ATTR:p7,DOCTYPE_NAME:Q3,ERB_EXPR:h7,IS_ALLOWED_URI:J3,IS_SCRIPT_OR_DATA:b7,MUSTACHE_EXPR:d7,TMPLIT_EXPR:g7});const ip={element:1,text:3,progressingInstruction:7,comment:8,document:9},x7=function(){return typeof window>"u"?null:window},w7=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(r=t.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},sx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function q3(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x7();const e=Dt=>q3(Dt);if(e.version="3.3.0",e.removed=[],!n||!n.document||n.document.nodeType!==ip.document||!n.Element)return e.isSupported=!1,e;let{document:t}=n;const r=t,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:a,Element:u,NodeFilter:h,NamedNodeMap:y=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:x,DOMParser:w,trustedTypes:_}=n,S=u.prototype,R=rp(S,"cloneNode"),I=rp(S,"remove"),O=rp(S,"nextSibling"),P=rp(S,"childNodes"),Y=rp(S,"parentNode");if(typeof l=="function"){const Dt=t.createElement("template");Dt.content&&Dt.content.ownerDocument&&(t=Dt.content.ownerDocument)}let z,W="";const{implementation:B,createNodeIterator:ee,createDocumentFragment:H,getElementsByTagName:V}=t,{importNode:de}=r;let Z=sx();e.isSupported=typeof K3=="function"&&typeof Y=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:te,ERB_EXPR:ne,TMPLIT_EXPR:fe,DATA_ATTR:ae,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:re,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:be}=lx;let{IS_ALLOWED_URI:le}=lx,J=null;const pe=Mi({},[...nx,...cb,...ub,...fb,...rx]);let Te=null;const Fe=Mi({},[...ix,...db,...ox,...b0]);let _e=Object.seal(ky(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Me=null,De=null;const Re=Object.seal(ky(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,Oe=!0,Ge=!1,Ve=!0,Pe=!1,ot=!0,Xe=!1,lt=!1,Ye=!1,mt=!1,bt=!1,Mt=!1,Nt=!0,_t=!1;const rn="user-content-";let pn=!0,Kt=!1,dn={},zt=null;const wn=Mi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $t=null;const vn=Mi({},["audio","video","img","source","image","track"]);let Pt=null;const Yt=Mi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ct="http://www.w3.org/1998/Math/MathML",Tt="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml";let ye=It,se=!1,He=null;const We=Mi({},[ct,Tt,It],sb);let pt=Mi({},["mi","mo","mn","ms","mtext"]),wt=Mi({},["annotation-xml"]);const qt=Mi({},["title","style","font","a","script"]);let Jt=null;const Vt=["application/xhtml+xml","text/html"],hn="text/html";let ln=null,kn=null;const Nn=t.createElement("form"),En=function(Se){return Se instanceof RegExp||Se instanceof Function},Cn=function(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kn&&kn===Se)){if((!Se||typeof Se!="object")&&(Se={}),Se=Ch(Se),Jt=Vt.indexOf(Se.PARSER_MEDIA_TYPE)===-1?hn:Se.PARSER_MEDIA_TYPE,ln=Jt==="application/xhtml+xml"?sb:G0,J=Rd(Se,"ALLOWED_TAGS")?Mi({},Se.ALLOWED_TAGS,ln):pe,Te=Rd(Se,"ALLOWED_ATTR")?Mi({},Se.ALLOWED_ATTR,ln):Fe,He=Rd(Se,"ALLOWED_NAMESPACES")?Mi({},Se.ALLOWED_NAMESPACES,sb):We,Pt=Rd(Se,"ADD_URI_SAFE_ATTR")?Mi(Ch(Yt),Se.ADD_URI_SAFE_ATTR,ln):Yt,$t=Rd(Se,"ADD_DATA_URI_TAGS")?Mi(Ch(vn),Se.ADD_DATA_URI_TAGS,ln):vn,zt=Rd(Se,"FORBID_CONTENTS")?Mi({},Se.FORBID_CONTENTS,ln):wn,Me=Rd(Se,"FORBID_TAGS")?Mi({},Se.FORBID_TAGS,ln):Ch({}),De=Rd(Se,"FORBID_ATTR")?Mi({},Se.FORBID_ATTR,ln):Ch({}),dn=Rd(Se,"USE_PROFILES")?Se.USE_PROFILES:!1,Le=Se.ALLOW_ARIA_ATTR!==!1,Oe=Se.ALLOW_DATA_ATTR!==!1,Ge=Se.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=Se.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Pe=Se.SAFE_FOR_TEMPLATES||!1,ot=Se.SAFE_FOR_XML!==!1,Xe=Se.WHOLE_DOCUMENT||!1,mt=Se.RETURN_DOM||!1,bt=Se.RETURN_DOM_FRAGMENT||!1,Mt=Se.RETURN_TRUSTED_TYPE||!1,Ye=Se.FORCE_BODY||!1,Nt=Se.SANITIZE_DOM!==!1,_t=Se.SANITIZE_NAMED_PROPS||!1,pn=Se.KEEP_CONTENT!==!1,Kt=Se.IN_PLACE||!1,le=Se.ALLOWED_URI_REGEXP||J3,ye=Se.NAMESPACE||It,pt=Se.MATHML_TEXT_INTEGRATION_POINTS||pt,wt=Se.HTML_INTEGRATION_POINTS||wt,_e=Se.CUSTOM_ELEMENT_HANDLING||{},Se.CUSTOM_ELEMENT_HANDLING&&En(Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&En(Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&typeof Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(_e.allowCustomizedBuiltInElements=Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pe&&(Oe=!1),bt&&(mt=!0),dn&&(J=Mi({},rx),Te=[],dn.html===!0&&(Mi(J,nx),Mi(Te,ix)),dn.svg===!0&&(Mi(J,cb),Mi(Te,db),Mi(Te,b0)),dn.svgFilters===!0&&(Mi(J,ub),Mi(Te,db),Mi(Te,b0)),dn.mathMl===!0&&(Mi(J,fb),Mi(Te,ox),Mi(Te,b0))),Se.ADD_TAGS&&(typeof Se.ADD_TAGS=="function"?Re.tagCheck=Se.ADD_TAGS:(J===pe&&(J=Ch(J)),Mi(J,Se.ADD_TAGS,ln))),Se.ADD_ATTR&&(typeof Se.ADD_ATTR=="function"?Re.attributeCheck=Se.ADD_ATTR:(Te===Fe&&(Te=Ch(Te)),Mi(Te,Se.ADD_ATTR,ln))),Se.ADD_URI_SAFE_ATTR&&Mi(Pt,Se.ADD_URI_SAFE_ATTR,ln),Se.FORBID_CONTENTS&&(zt===wn&&(zt=Ch(zt)),Mi(zt,Se.FORBID_CONTENTS,ln)),pn&&(J["#text"]=!0),Xe&&Mi(J,["html","head","body"]),J.table&&(Mi(J,["tbody"]),delete Me.tbody),Se.TRUSTED_TYPES_POLICY){if(typeof Se.TRUSTED_TYPES_POLICY.createHTML!="function")throw np('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Se.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw np('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');z=Se.TRUSTED_TYPES_POLICY,W=z.createHTML("")}else z===void 0&&(z=w7(_,i)),z!==null&&typeof W=="string"&&(W=z.createHTML(""));Ou&&Ou(Se),kn=Se}},rr=Mi({},[...cb,...ub,...u7]),Bt=Mi({},[...fb,...f7]),Ut=function(Se){let it=Y(Se);(!it||!it.tagName)&&(it={namespaceURI:ye,tagName:"template"});const St=G0(Se.tagName),mn=G0(it.tagName);return He[Se.namespaceURI]?Se.namespaceURI===Tt?it.namespaceURI===It?St==="svg":it.namespaceURI===ct?St==="svg"&&(mn==="annotation-xml"||pt[mn]):!!rr[St]:Se.namespaceURI===ct?it.namespaceURI===It?St==="math":it.namespaceURI===Tt?St==="math"&&wt[mn]:!!Bt[St]:Se.namespaceURI===It?it.namespaceURI===Tt&&!wt[mn]||it.namespaceURI===ct&&!pt[mn]?!1:!Bt[St]&&(qt[St]||!rr[St]):!!(Jt==="application/xhtml+xml"&&He[Se.namespaceURI]):!1},yn=function(Se){ep(e.removed,{element:Se});try{Y(Se).removeChild(Se)}catch{I(Se)}},Ft=function(Se,it){try{ep(e.removed,{attribute:it.getAttributeNode(Se),from:it})}catch{ep(e.removed,{attribute:null,from:it})}if(it.removeAttribute(Se),Se==="is")if(mt||bt)try{yn(it)}catch{}else try{it.setAttribute(Se,"")}catch{}},jn=function(Se){let it=null,St=null;if(Ye)Se="<remove></remove>"+Se;else{const Gn=ab(Se,/^[\r\n\t ]+/);St=Gn&&Gn[0]}Jt==="application/xhtml+xml"&&ye===It&&(Se='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Se+"</body></html>");const mn=z?z.createHTML(Se):Se;if(ye===It)try{it=new w().parseFromString(mn,Jt)}catch{}if(!it||!it.documentElement){it=B.createDocument(ye,"template",null);try{it.documentElement.innerHTML=se?W:mn}catch{}}const An=it.body||it.documentElement;return Se&&St&&An.insertBefore(t.createTextNode(St),An.childNodes[0]||null),ye===It?V.call(it,Xe?"html":"body")[0]:Xe?it.documentElement:An},Hn=function(Se){return ee.call(Se.ownerDocument||Se,Se,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Rn=function(Se){return Se instanceof x&&(typeof Se.nodeName!="string"||typeof Se.textContent!="string"||typeof Se.removeChild!="function"||!(Se.attributes instanceof y)||typeof Se.removeAttribute!="function"||typeof Se.setAttribute!="function"||typeof Se.namespaceURI!="string"||typeof Se.insertBefore!="function"||typeof Se.hasChildNodes!="function")},Et=function(Se){return typeof a=="function"&&Se instanceof a};function rt(Dt,Se,it){v0(Dt,St=>{St.call(e,Se,it,kn)})}const tn=function(Se){let it=null;if(rt(Z.beforeSanitizeElements,Se,null),Rn(Se))return yn(Se),!0;const St=ln(Se.nodeName);if(rt(Z.uponSanitizeElement,Se,{tagName:St,allowedTags:J}),ot&&Se.hasChildNodes()&&!Et(Se.firstElementChild)&&Mu(/<[/\w!]/g,Se.innerHTML)&&Mu(/<[/\w!]/g,Se.textContent)||Se.nodeType===ip.progressingInstruction||ot&&Se.nodeType===ip.comment&&Mu(/<[/\w]/g,Se.data))return yn(Se),!0;if(!(Re.tagCheck instanceof Function&&Re.tagCheck(St))&&(!J[St]||Me[St])){if(!Me[St]&&mr(St)&&(_e.tagNameCheck instanceof RegExp&&Mu(_e.tagNameCheck,St)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(St)))return!1;if(pn&&!zt[St]){const mn=Y(Se)||Se.parentNode,An=P(Se)||Se.childNodes;if(An&&mn){const Gn=An.length;for(let cr=Gn-1;cr>=0;--cr){const gr=R(An[cr],!0);gr.__removalCount=(Se.__removalCount||0)+1,mn.insertBefore(gr,O(Se))}}}return yn(Se),!0}return Se instanceof u&&!Ut(Se)||(St==="noscript"||St==="noembed"||St==="noframes")&&Mu(/<\/no(script|embed|frames)/i,Se.innerHTML)?(yn(Se),!0):(Pe&&Se.nodeType===ip.text&&(it=Se.textContent,v0([te,ne,fe],mn=>{it=tp(it,mn," ")}),Se.textContent!==it&&(ep(e.removed,{element:Se.cloneNode()}),Se.textContent=it)),rt(Z.afterSanitizeElements,Se,null),!1)},Ln=function(Se,it,St){if(Nt&&(it==="id"||it==="name")&&(St in t||St in Nn))return!1;if(!(Oe&&!De[it]&&Mu(ae,it))){if(!(Le&&Mu(j,it))){if(!(Re.attributeCheck instanceof Function&&Re.attributeCheck(it,Se))){if(!Te[it]||De[it]){if(!(mr(Se)&&(_e.tagNameCheck instanceof RegExp&&Mu(_e.tagNameCheck,Se)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(Se))&&(_e.attributeNameCheck instanceof RegExp&&Mu(_e.attributeNameCheck,it)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(it,Se))||it==="is"&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&Mu(_e.tagNameCheck,St)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(St))))return!1}else if(!Pt[it]){if(!Mu(le,tp(St,he,""))){if(!((it==="src"||it==="xlink:href"||it==="href")&&Se!=="script"&&l7(St,"data:")===0&&$t[Se])){if(!(Ge&&!Mu(re,tp(St,he,"")))){if(St)return!1}}}}}}}return!0},mr=function(Se){return Se!=="annotation-xml"&&ab(Se,be)},wr=function(Se){rt(Z.beforeSanitizeAttributes,Se,null);const{attributes:it}=Se;if(!it||Rn(Se))return;const St={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te,forceKeepAttr:void 0};let mn=it.length;for(;mn--;){const An=it[mn],{name:Gn,namespaceURI:cr,value:gr}=An,Sn=ln(Gn),Qn=gr;let xn=Gn==="value"?Qn:s7(Qn);if(St.attrName=Sn,St.attrValue=xn,St.keepAttr=!0,St.forceKeepAttr=void 0,rt(Z.uponSanitizeAttribute,Se,St),xn=St.attrValue,_t&&(Sn==="id"||Sn==="name")&&(Ft(Gn,Se),xn=rn+xn),ot&&Mu(/((--!?|])>)|<\/(style|title|textarea)/i,xn)){Ft(Gn,Se);continue}if(Sn==="attributename"&&ab(xn,"href")){Ft(Gn,Se);continue}if(St.forceKeepAttr)continue;if(!St.keepAttr){Ft(Gn,Se);continue}if(!Ve&&Mu(/\/>/i,xn)){Ft(Gn,Se);continue}Pe&&v0([te,ne,fe],si=>{xn=tp(xn,si," ")});const ur=ln(Se.nodeName);if(!Ln(ur,Sn,xn)){Ft(Gn,Se);continue}if(z&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!cr)switch(_.getAttributeType(ur,Sn)){case"TrustedHTML":{xn=z.createHTML(xn);break}case"TrustedScriptURL":{xn=z.createScriptURL(xn);break}}if(xn!==Qn)try{cr?Se.setAttributeNS(cr,Gn,xn):Se.setAttribute(Gn,xn),Rn(Se)?yn(Se):tx(e.removed)}catch{Ft(Gn,Se)}}rt(Z.afterSanitizeAttributes,Se,null)},gn=function Dt(Se){let it=null;const St=Hn(Se);for(rt(Z.beforeSanitizeShadowDOM,Se,null);it=St.nextNode();)rt(Z.uponSanitizeShadowNode,it,null),tn(it),wr(it),it.content instanceof o&&Dt(it.content);rt(Z.afterSanitizeShadowDOM,Se,null)};return e.sanitize=function(Dt){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},it=null,St=null,mn=null,An=null;if(se=!Dt,se&&(Dt="<!-->"),typeof Dt!="string"&&!Et(Dt))if(typeof Dt.toString=="function"){if(Dt=Dt.toString(),typeof Dt!="string")throw np("dirty is not a string, aborting")}else throw np("toString is not a function");if(!e.isSupported)return Dt;if(lt||Cn(Se),e.removed=[],typeof Dt=="string"&&(Kt=!1),Kt){if(Dt.nodeName){const gr=ln(Dt.nodeName);if(!J[gr]||Me[gr])throw np("root node is forbidden and cannot be sanitized in-place")}}else if(Dt instanceof a)it=jn("<!---->"),St=it.ownerDocument.importNode(Dt,!0),St.nodeType===ip.element&&St.nodeName==="BODY"||St.nodeName==="HTML"?it=St:it.appendChild(St);else{if(!mt&&!Pe&&!Xe&&Dt.indexOf("<")===-1)return z&&Mt?z.createHTML(Dt):Dt;if(it=jn(Dt),!it)return mt?null:Mt?W:""}it&&Ye&&yn(it.firstChild);const Gn=Hn(Kt?Dt:it);for(;mn=Gn.nextNode();)tn(mn),wr(mn),mn.content instanceof o&&gn(mn.content);if(Kt)return Dt;if(mt){if(bt)for(An=H.call(it.ownerDocument);it.firstChild;)An.appendChild(it.firstChild);else An=it;return(Te.shadowroot||Te.shadowrootmode)&&(An=de.call(r,An,!0)),An}let cr=Xe?it.outerHTML:it.innerHTML;return Xe&&J["!doctype"]&&it.ownerDocument&&it.ownerDocument.doctype&&it.ownerDocument.doctype.name&&Mu(Q3,it.ownerDocument.doctype.name)&&(cr="<!DOCTYPE "+it.ownerDocument.doctype.name+`>
|
|
288
|
+
`+cr),Pe&&v0([te,ne,fe],gr=>{cr=tp(cr,gr," ")}),z&&Mt?z.createHTML(cr):cr},e.setConfig=function(){let Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cn(Dt),lt=!0},e.clearConfig=function(){kn=null,lt=!1},e.isValidAttribute=function(Dt,Se,it){kn||Cn({});const St=ln(Dt),mn=ln(Se);return Ln(St,mn,it)},e.addHook=function(Dt,Se){typeof Se=="function"&&ep(Z[Dt],Se)},e.removeHook=function(Dt,Se){if(Se!==void 0){const it=i7(Z[Dt],Se);return it===-1?void 0:o7(Z[Dt],it,1)[0]}return tx(Z[Dt])},e.removeHooks=function(Dt){Z[Dt]=[]},e.removeAllHooks=function(){Z=sx()},e}var C7=q3(),y0={exports:{}},hb,ax;function _7(){if(ax)return hb;ax=1;var n=-1,e=1,t=0;function r(Z,te,ne,fe,ae){if(Z===te)return Z?[[t,Z]]:[];if(ne!=null){var j=V(Z,te,ne);if(j)return j}var re=a(Z,te),he=Z.substring(0,re);Z=Z.substring(re),te=te.substring(re),re=h(Z,te);var be=Z.substring(Z.length-re);Z=Z.substring(0,Z.length-re),te=te.substring(0,te.length-re);var le=i(Z,te);return he&&le.unshift([t,he]),be&&le.push([t,be]),P(le,ae),fe&&x(le),le}function i(Z,te){var ne;if(!Z)return[[e,te]];if(!te)return[[n,Z]];var fe=Z.length>te.length?Z:te,ae=Z.length>te.length?te:Z,j=fe.indexOf(ae);if(j!==-1)return ne=[[e,fe.substring(0,j)],[t,ae],[e,fe.substring(j+ae.length)]],Z.length>te.length&&(ne[0][0]=ne[2][0]=n),ne;if(ae.length===1)return[[n,Z],[e,te]];var re=y(Z,te);if(re){var he=re[0],be=re[1],le=re[2],J=re[3],pe=re[4],Te=r(he,le),Fe=r(be,J);return Te.concat([[t,pe]],Fe)}return o(Z,te)}function o(Z,te){for(var ne=Z.length,fe=te.length,ae=Math.ceil((ne+fe)/2),j=ae,re=2*ae,he=new Array(re),be=new Array(re),le=0;le<re;le++)he[le]=-1,be[le]=-1;he[j+1]=0,be[j+1]=0;for(var J=ne-fe,pe=J%2!==0,Te=0,Fe=0,_e=0,Me=0,De=0;De<ae;De++){for(var Re=-De+Te;Re<=De-Fe;Re+=2){var Le=j+Re,Oe;Re===-De||Re!==De&&he[Le-1]<he[Le+1]?Oe=he[Le+1]:Oe=he[Le-1]+1;for(var Ge=Oe-Re;Oe<ne&&Ge<fe&&Z.charAt(Oe)===te.charAt(Ge);)Oe++,Ge++;if(he[Le]=Oe,Oe>ne)Fe+=2;else if(Ge>fe)Te+=2;else if(pe){var Ve=j+J-Re;if(Ve>=0&&Ve<re&&be[Ve]!==-1){var Pe=ne-be[Ve];if(Oe>=Pe)return l(Z,te,Oe,Ge)}}}for(var ot=-De+_e;ot<=De-Me;ot+=2){var Ve=j+ot,Pe;ot===-De||ot!==De&&be[Ve-1]<be[Ve+1]?Pe=be[Ve+1]:Pe=be[Ve-1]+1;for(var Xe=Pe-ot;Pe<ne&&Xe<fe&&Z.charAt(ne-Pe-1)===te.charAt(fe-Xe-1);)Pe++,Xe++;if(be[Ve]=Pe,Pe>ne)Me+=2;else if(Xe>fe)_e+=2;else if(!pe){var Le=j+J-ot;if(Le>=0&&Le<re&&he[Le]!==-1){var Oe=he[Le],Ge=j+Oe-Le;if(Pe=ne-Pe,Oe>=Pe)return l(Z,te,Oe,Ge)}}}}return[[n,Z],[e,te]]}function l(Z,te,ne,fe){var ae=Z.substring(0,ne),j=te.substring(0,fe),re=Z.substring(ne),he=te.substring(fe),be=r(ae,j),le=r(re,he);return be.concat(le)}function a(Z,te){if(!Z||!te||Z.charAt(0)!==te.charAt(0))return 0;for(var ne=0,fe=Math.min(Z.length,te.length),ae=fe,j=0;ne<ae;)Z.substring(j,ae)==te.substring(j,ae)?(ne=ae,j=ne):fe=ae,ae=Math.floor((fe-ne)/2+ne);return Y(Z.charCodeAt(ae-1))&&ae--,ae}function u(Z,te){var ne=Z.length,fe=te.length;if(ne==0||fe==0)return 0;ne>fe?Z=Z.substring(ne-fe):ne<fe&&(te=te.substring(0,ne));var ae=Math.min(ne,fe);if(Z==te)return ae;for(var j=0,re=1;;){var he=Z.substring(ae-re),be=te.indexOf(he);if(be==-1)return j;re+=be,(be==0||Z.substring(ae-re)==te.substring(0,re))&&(j=re,re++)}}function h(Z,te){if(!Z||!te||Z.slice(-1)!==te.slice(-1))return 0;for(var ne=0,fe=Math.min(Z.length,te.length),ae=fe,j=0;ne<ae;)Z.substring(Z.length-ae,Z.length-j)==te.substring(te.length-ae,te.length-j)?(ne=ae,j=ne):fe=ae,ae=Math.floor((fe-ne)/2+ne);return z(Z.charCodeAt(Z.length-ae))&&ae--,ae}function y(Z,te){var ne=Z.length>te.length?Z:te,fe=Z.length>te.length?te:Z;if(ne.length<4||fe.length*2<ne.length)return null;function ae(Fe,_e,Me){for(var De=Fe.substring(Me,Me+Math.floor(Fe.length/4)),Re=-1,Le="",Oe,Ge,Ve,Pe;(Re=_e.indexOf(De,Re+1))!==-1;){var ot=a(Fe.substring(Me),_e.substring(Re)),Xe=h(Fe.substring(0,Me),_e.substring(0,Re));Le.length<Xe+ot&&(Le=_e.substring(Re-Xe,Re)+_e.substring(Re,Re+ot),Oe=Fe.substring(0,Me-Xe),Ge=Fe.substring(Me+ot),Ve=_e.substring(0,Re-Xe),Pe=_e.substring(Re+ot))}return Le.length*2>=Fe.length?[Oe,Ge,Ve,Pe,Le]:null}var j=ae(ne,fe,Math.ceil(ne.length/4)),re=ae(ne,fe,Math.ceil(ne.length/2)),he;if(!j&&!re)return null;re?j?he=j[4].length>re[4].length?j:re:he=re:he=j;var be,le,J,pe;Z.length>te.length?(be=he[0],le=he[1],J=he[2],pe=he[3]):(J=he[0],pe=he[1],be=he[2],le=he[3]);var Te=he[4];return[be,le,J,pe,Te]}function x(Z){for(var te=!1,ne=[],fe=0,ae=null,j=0,re=0,he=0,be=0,le=0;j<Z.length;)Z[j][0]==t?(ne[fe++]=j,re=be,he=le,be=0,le=0,ae=Z[j][1]):(Z[j][0]==e?be+=Z[j][1].length:le+=Z[j][1].length,ae&&ae.length<=Math.max(re,he)&&ae.length<=Math.max(be,le)&&(Z.splice(ne[fe-1],0,[n,ae]),Z[ne[fe-1]+1][0]=e,fe--,fe--,j=fe>0?ne[fe-1]:-1,re=0,he=0,be=0,le=0,ae=null,te=!0)),j++;for(te&&P(Z),O(Z),j=1;j<Z.length;){if(Z[j-1][0]==n&&Z[j][0]==e){var J=Z[j-1][1],pe=Z[j][1],Te=u(J,pe),Fe=u(pe,J);Te>=Fe?(Te>=J.length/2||Te>=pe.length/2)&&(Z.splice(j,0,[t,pe.substring(0,Te)]),Z[j-1][1]=J.substring(0,J.length-Te),Z[j+1][1]=pe.substring(Te),j++):(Fe>=J.length/2||Fe>=pe.length/2)&&(Z.splice(j,0,[t,J.substring(0,Fe)]),Z[j-1][0]=e,Z[j-1][1]=pe.substring(0,pe.length-Fe),Z[j+1][0]=n,Z[j+1][1]=J.substring(Fe),j++),j++}j++}}var w=/[^a-zA-Z0-9]/,_=/\s/,S=/[\r\n]/,R=/\n\r?\n$/,I=/^\r?\n\r?\n/;function O(Z){function te(Fe,_e){if(!Fe||!_e)return 6;var Me=Fe.charAt(Fe.length-1),De=_e.charAt(0),Re=Me.match(w),Le=De.match(w),Oe=Re&&Me.match(_),Ge=Le&&De.match(_),Ve=Oe&&Me.match(S),Pe=Ge&&De.match(S),ot=Ve&&Fe.match(R),Xe=Pe&&_e.match(I);return ot||Xe?5:Ve||Pe?4:Re&&!Oe&&Ge?3:Oe||Ge?2:Re||Le?1:0}for(var ne=1;ne<Z.length-1;){if(Z[ne-1][0]==t&&Z[ne+1][0]==t){var fe=Z[ne-1][1],ae=Z[ne][1],j=Z[ne+1][1],re=h(fe,ae);if(re){var he=ae.substring(ae.length-re);fe=fe.substring(0,fe.length-re),ae=he+ae.substring(0,ae.length-re),j=he+j}for(var be=fe,le=ae,J=j,pe=te(fe,ae)+te(ae,j);ae.charAt(0)===j.charAt(0);){fe+=ae.charAt(0),ae=ae.substring(1)+j.charAt(0),j=j.substring(1);var Te=te(fe,ae)+te(ae,j);Te>=pe&&(pe=Te,be=fe,le=ae,J=j)}Z[ne-1][1]!=be&&(be?Z[ne-1][1]=be:(Z.splice(ne-1,1),ne--),Z[ne][1]=le,J?Z[ne+1][1]=J:(Z.splice(ne+1,1),ne--))}ne++}}function P(Z,te){Z.push([t,""]);for(var ne=0,fe=0,ae=0,j="",re="",he;ne<Z.length;){if(ne<Z.length-1&&!Z[ne][1]){Z.splice(ne,1);continue}switch(Z[ne][0]){case e:ae++,re+=Z[ne][1],ne++;break;case n:fe++,j+=Z[ne][1],ne++;break;case t:var be=ne-ae-fe-1;if(te){if(be>=0&&B(Z[be][1])){var le=Z[be][1].slice(-1);if(Z[be][1]=Z[be][1].slice(0,-1),j=le+j,re=le+re,!Z[be][1]){Z.splice(be,1),ne--;var J=be-1;Z[J]&&Z[J][0]===e&&(ae++,re=Z[J][1]+re,J--),Z[J]&&Z[J][0]===n&&(fe++,j=Z[J][1]+j,J--),be=J}}if(W(Z[ne][1])){var le=Z[ne][1].charAt(0);Z[ne][1]=Z[ne][1].slice(1),j+=le,re+=le}}if(ne<Z.length-1&&!Z[ne][1]){Z.splice(ne,1);break}if(j.length>0||re.length>0){j.length>0&&re.length>0&&(he=a(re,j),he!==0&&(be>=0?Z[be][1]+=re.substring(0,he):(Z.splice(0,0,[t,re.substring(0,he)]),ne++),re=re.substring(he),j=j.substring(he)),he=h(re,j),he!==0&&(Z[ne][1]=re.substring(re.length-he)+Z[ne][1],re=re.substring(0,re.length-he),j=j.substring(0,j.length-he)));var pe=ae+fe;j.length===0&&re.length===0?(Z.splice(ne-pe,pe),ne=ne-pe):j.length===0?(Z.splice(ne-pe,pe,[e,re]),ne=ne-pe+1):re.length===0?(Z.splice(ne-pe,pe,[n,j]),ne=ne-pe+1):(Z.splice(ne-pe,pe,[n,j],[e,re]),ne=ne-pe+2)}ne!==0&&Z[ne-1][0]===t?(Z[ne-1][1]+=Z[ne][1],Z.splice(ne,1)):ne++,ae=0,fe=0,j="",re="";break}}Z[Z.length-1][1]===""&&Z.pop();var Te=!1;for(ne=1;ne<Z.length-1;)Z[ne-1][0]===t&&Z[ne+1][0]===t&&(Z[ne][1].substring(Z[ne][1].length-Z[ne-1][1].length)===Z[ne-1][1]?(Z[ne][1]=Z[ne-1][1]+Z[ne][1].substring(0,Z[ne][1].length-Z[ne-1][1].length),Z[ne+1][1]=Z[ne-1][1]+Z[ne+1][1],Z.splice(ne-1,1),Te=!0):Z[ne][1].substring(0,Z[ne+1][1].length)==Z[ne+1][1]&&(Z[ne-1][1]+=Z[ne+1][1],Z[ne][1]=Z[ne][1].substring(Z[ne+1][1].length)+Z[ne+1][1],Z.splice(ne+1,1),Te=!0)),ne++;Te&&P(Z,te)}function Y(Z){return Z>=55296&&Z<=56319}function z(Z){return Z>=56320&&Z<=57343}function W(Z){return z(Z.charCodeAt(0))}function B(Z){return Y(Z.charCodeAt(Z.length-1))}function ee(Z){for(var te=[],ne=0;ne<Z.length;ne++)Z[ne][1].length>0&&te.push(Z[ne]);return te}function H(Z,te,ne,fe){return B(Z)||W(fe)?null:ee([[t,Z],[n,te],[e,ne],[t,fe]])}function V(Z,te,ne){var fe=typeof ne=="number"?{index:ne,length:0}:ne.oldRange,ae=typeof ne=="number"?null:ne.newRange,j=Z.length,re=te.length;if(fe.length===0&&(ae===null||ae.length===0)){var he=fe.index,be=Z.slice(0,he),le=Z.slice(he),J=ae?ae.index:null;e:{var pe=he+re-j;if(J!==null&&J!==pe||pe<0||pe>re)break e;var Te=te.slice(0,pe),Fe=te.slice(pe);if(Fe!==le)break e;var _e=Math.min(he,pe),Me=be.slice(0,_e),De=Te.slice(0,_e);if(Me!==De)break e;var Re=be.slice(_e),Le=Te.slice(_e);return H(Me,Re,Le,le)}e:{if(J!==null&&J!==he)break e;var Oe=he,Te=te.slice(0,Oe),Fe=te.slice(Oe);if(Te!==be)break e;var Ge=Math.min(j-Oe,re-Oe),Ve=le.slice(le.length-Ge),Pe=Fe.slice(Fe.length-Ge);if(Ve!==Pe)break e;var Re=le.slice(0,le.length-Ge),Le=Fe.slice(0,Fe.length-Ge);return H(be,Re,Le,Ve)}}if(fe.length>0&&ae&&ae.length===0)e:{var Me=Z.slice(0,fe.index),Ve=Z.slice(fe.index+fe.length),_e=Me.length,Ge=Ve.length;if(re<_e+Ge)break e;var De=te.slice(0,_e),Pe=te.slice(re-Ge);if(Me!==De||Ve!==Pe)break e;var Re=Z.slice(_e,j-Ge),Le=te.slice(_e,re-Ge);return H(Me,Re,Le,Ve)}return null}function de(Z,te,ne,fe){return r(Z,te,ne,fe,!0)}return de.INSERT=e,de.DELETE=n,de.EQUAL=t,hb=de,hb}var pp={exports:{}};pp.exports;var cx;function j3(){return cx||(cx=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",l="[object Array]",a="[object Boolean]",u="[object Date]",h="[object Error]",y="[object Function]",x="[object GeneratorFunction]",w="[object Map]",_="[object Number]",S="[object Object]",R="[object Promise]",I="[object RegExp]",O="[object Set]",P="[object String]",Y="[object Symbol]",z="[object WeakMap]",W="[object ArrayBuffer]",B="[object DataView]",ee="[object Float32Array]",H="[object Float64Array]",V="[object Int8Array]",de="[object Int16Array]",Z="[object Int32Array]",te="[object Uint8Array]",ne="[object Uint8ClampedArray]",fe="[object Uint16Array]",ae="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,re=/\w*$/,he=/^\[object .+?Constructor\]$/,be=/^(?:0|[1-9]\d*)$/,le={};le[o]=le[l]=le[W]=le[B]=le[a]=le[u]=le[ee]=le[H]=le[V]=le[de]=le[Z]=le[w]=le[_]=le[S]=le[I]=le[O]=le[P]=le[Y]=le[te]=le[ne]=le[fe]=le[ae]=!0,le[h]=le[y]=le[z]=!1;var J=typeof jd=="object"&&jd&&jd.Object===Object&&jd,pe=typeof self=="object"&&self&&self.Object===Object&&self,Te=J||pe||Function("return this")(),Fe=e&&!e.nodeType&&e,_e=Fe&&!0&&n&&!n.nodeType&&n,Me=_e&&_e.exports===Fe;function De(we,at){return we.set(at[0],at[1]),we}function Re(we,at){return we.add(at),we}function Le(we,at){for(var Rt=-1,Qe=we?we.length:0;++Rt<Qe&&at(we[Rt],Rt,we)!==!1;);return we}function Oe(we,at){for(var Rt=-1,Qe=at.length,on=we.length;++Rt<Qe;)we[on+Rt]=at[Rt];return we}function Ge(we,at,Rt,Qe){for(var on=-1,Wn=we?we.length:0;++on<Wn;)Rt=at(Rt,we[on],on,we);return Rt}function Ve(we,at){for(var Rt=-1,Qe=Array(we);++Rt<we;)Qe[Rt]=at(Rt);return Qe}function Pe(we,at){return we==null?void 0:we[at]}function ot(we){var at=!1;if(we!=null&&typeof we.toString!="function")try{at=!!(we+"")}catch{}return at}function Xe(we){var at=-1,Rt=Array(we.size);return we.forEach(function(Qe,on){Rt[++at]=[on,Qe]}),Rt}function lt(we,at){return function(Rt){return we(at(Rt))}}function Ye(we){var at=-1,Rt=Array(we.size);return we.forEach(function(Qe){Rt[++at]=Qe}),Rt}var mt=Array.prototype,bt=Function.prototype,Mt=Object.prototype,Nt=Te["__core-js_shared__"],_t=(function(){var we=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return we?"Symbol(src)_1."+we:""})(),rn=bt.toString,pn=Mt.hasOwnProperty,Kt=Mt.toString,dn=RegExp("^"+rn.call(pn).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=Me?Te.Buffer:void 0,wn=Te.Symbol,$t=Te.Uint8Array,vn=lt(Object.getPrototypeOf,Object),Pt=Object.create,Yt=Mt.propertyIsEnumerable,ct=mt.splice,Tt=Object.getOwnPropertySymbols,It=zt?zt.isBuffer:void 0,ye=lt(Object.keys,Object),se=mi(Te,"DataView"),He=mi(Te,"Map"),We=mi(Te,"Promise"),pt=mi(Te,"Set"),wt=mi(Te,"WeakMap"),qt=mi(Object,"create"),Jt=Si(se),Vt=Si(He),hn=Si(We),ln=Si(pt),kn=Si(wt),Nn=wn?wn.prototype:void 0,En=Nn?Nn.valueOf:void 0;function Cn(we){var at=-1,Rt=we?we.length:0;for(this.clear();++at<Rt;){var Qe=we[at];this.set(Qe[0],Qe[1])}}function rr(){this.__data__=qt?qt(null):{}}function Bt(we){return this.has(we)&&delete this.__data__[we]}function Ut(we){var at=this.__data__;if(qt){var Rt=at[we];return Rt===r?void 0:Rt}return pn.call(at,we)?at[we]:void 0}function yn(we){var at=this.__data__;return qt?at[we]!==void 0:pn.call(at,we)}function Ft(we,at){var Rt=this.__data__;return Rt[we]=qt&&at===void 0?r:at,this}Cn.prototype.clear=rr,Cn.prototype.delete=Bt,Cn.prototype.get=Ut,Cn.prototype.has=yn,Cn.prototype.set=Ft;function jn(we){var at=-1,Rt=we?we.length:0;for(this.clear();++at<Rt;){var Qe=we[at];this.set(Qe[0],Qe[1])}}function Hn(){this.__data__=[]}function Rn(we){var at=this.__data__,Rt=Qn(at,we);if(Rt<0)return!1;var Qe=at.length-1;return Rt==Qe?at.pop():ct.call(at,Rt,1),!0}function Et(we){var at=this.__data__,Rt=Qn(at,we);return Rt<0?void 0:at[Rt][1]}function rt(we){return Qn(this.__data__,we)>-1}function tn(we,at){var Rt=this.__data__,Qe=Qn(Rt,we);return Qe<0?Rt.push([we,at]):Rt[Qe][1]=at,this}jn.prototype.clear=Hn,jn.prototype.delete=Rn,jn.prototype.get=Et,jn.prototype.has=rt,jn.prototype.set=tn;function Ln(we){var at=-1,Rt=we?we.length:0;for(this.clear();++at<Rt;){var Qe=we[at];this.set(Qe[0],Qe[1])}}function mr(){this.__data__={hash:new Cn,map:new(He||jn),string:new Cn}}function wr(we){return Tr(this,we).delete(we)}function gn(we){return Tr(this,we).get(we)}function Dt(we){return Tr(this,we).has(we)}function Se(we,at){return Tr(this,we).set(we,at),this}Ln.prototype.clear=mr,Ln.prototype.delete=wr,Ln.prototype.get=gn,Ln.prototype.has=Dt,Ln.prototype.set=Se;function it(we){this.__data__=new jn(we)}function St(){this.__data__=new jn}function mn(we){return this.__data__.delete(we)}function An(we){return this.__data__.get(we)}function Gn(we){return this.__data__.has(we)}function cr(we,at){var Rt=this.__data__;if(Rt instanceof jn){var Qe=Rt.__data__;if(!He||Qe.length<t-1)return Qe.push([we,at]),this;Rt=this.__data__=new Ln(Qe)}return Rt.set(we,at),this}it.prototype.clear=St,it.prototype.delete=mn,it.prototype.get=An,it.prototype.has=Gn,it.prototype.set=cr;function gr(we,at){var Rt=$i(we)||Io(we)?Ve(we.length,String):[],Qe=Rt.length,on=!!Qe;for(var Wn in we)pn.call(we,Wn)&&!(on&&(Wn=="length"||Oi(Wn,Qe)))&&Rt.push(Wn);return Rt}function Sn(we,at,Rt){var Qe=we[at];(!(pn.call(we,at)&&cl(Qe,Rt))||Rt===void 0&&!(at in we))&&(we[at]=Rt)}function Qn(we,at){for(var Rt=we.length;Rt--;)if(cl(we[Rt][0],at))return Rt;return-1}function xn(we,at){return we&&tr(at,Lo(at),we)}function ur(we,at,Rt,Qe,on,Wn,zr){var Hr;if(Qe&&(Hr=Wn?Qe(we,on,Wn,zr):Qe(we)),Hr!==void 0)return Hr;if(!po(we))return we;var Ei=$i(we);if(Ei){if(Hr=Uo(we),!at)return Fr(we,Hr)}else{var ao=Br(we),Ll=ao==y||ao==x;if(go(we))return qi(we,at);if(ao==S||ao==o||Ll&&!Wn){if(ot(we))return Wn?we:{};if(Hr=To(Ll?{}:we),!at)return fr(we,xn(Hr,we))}else{if(!le[ao])return Wn?we:{};Hr=Ro(we,ao,ur,at)}}zr||(zr=new it);var Ql=zr.get(we);if(Ql)return Ql;if(zr.set(we,Hr),!Ei)var ac=Rt?ir(we):Lo(we);return Le(ac||we,function(ul,Ha){ac&&(Ha=ul,ul=we[Ha]),Sn(Hr,Ha,ur(ul,at,Rt,Qe,Ha,we,zr))}),Hr}function si(we){return po(we)?Pt(we):{}}function xo(we,at,Rt){var Qe=at(we);return $i(we)?Qe:Oe(Qe,Rt(we))}function wo(we){return Kt.call(we)}function so(we){if(!po(we)||Cr(we))return!1;var at=Mo(we)||ot(we)?dn:he;return at.test(Si(we))}function ai(we){if(!al(we))return ye(we);var at=[];for(var Rt in Object(we))pn.call(we,Rt)&&Rt!="constructor"&&at.push(Rt);return at}function qi(we,at){if(at)return we.slice();var Rt=new we.constructor(we.length);return we.copy(Rt),Rt}function Yi(we){var at=new we.constructor(we.byteLength);return new $t(at).set(new $t(we)),at}function Jl(we,at){var Rt=at?Yi(we.buffer):we.buffer;return new we.constructor(Rt,we.byteOffset,we.byteLength)}function Wo(we,at,Rt){var Qe=at?Rt(Xe(we),!0):Xe(we);return Ge(Qe,De,new we.constructor)}function Co(we){var at=new we.constructor(we.source,re.exec(we));return at.lastIndex=we.lastIndex,at}function ri(we,at,Rt){var Qe=at?Rt(Ye(we),!0):Ye(we);return Ge(Qe,Re,new we.constructor)}function an(we){return En?Object(En.call(we)):{}}function On(we,at){var Rt=at?Yi(we.buffer):we.buffer;return new we.constructor(Rt,we.byteOffset,we.length)}function Fr(we,at){var Rt=-1,Qe=we.length;for(at||(at=Array(Qe));++Rt<Qe;)at[Rt]=we[Rt];return at}function tr(we,at,Rt,Qe){Rt||(Rt={});for(var on=-1,Wn=at.length;++on<Wn;){var zr=at[on],Hr=void 0;Sn(Rt,zr,Hr===void 0?we[zr]:Hr)}return Rt}function fr(we,at){return tr(we,Li(we),at)}function ir(we){return xo(we,Lo,Li)}function Tr(we,at){var Rt=we.__data__;return Kr(at)?Rt[typeof at=="string"?"string":"hash"]:Rt.map}function mi(we,at){var Rt=Pe(we,at);return so(Rt)?Rt:void 0}var Li=Tt?lt(Tt,Object):Vn,Br=wo;(se&&Br(new se(new ArrayBuffer(1)))!=B||He&&Br(new He)!=w||We&&Br(We.resolve())!=R||pt&&Br(new pt)!=O||wt&&Br(new wt)!=z)&&(Br=function(we){var at=Kt.call(we),Rt=at==S?we.constructor:void 0,Qe=Rt?Si(Rt):void 0;if(Qe)switch(Qe){case Jt:return B;case Vt:return w;case hn:return R;case ln:return O;case kn:return z}return at});function Uo(we){var at=we.length,Rt=we.constructor(at);return at&&typeof we[0]=="string"&&pn.call(we,"index")&&(Rt.index=we.index,Rt.input=we.input),Rt}function To(we){return typeof we.constructor=="function"&&!al(we)?si(vn(we)):{}}function Ro(we,at,Rt,Qe){var on=we.constructor;switch(at){case W:return Yi(we);case a:case u:return new on(+we);case B:return Jl(we,Qe);case ee:case H:case V:case de:case Z:case te:case ne:case fe:case ae:return On(we,Qe);case w:return Wo(we,Qe,Rt);case _:case P:return new on(we);case I:return Co(we);case O:return ri(we,Qe,Rt);case Y:return an(we)}}function Oi(we,at){return at=at??i,!!at&&(typeof we=="number"||be.test(we))&&we>-1&&we%1==0&&we<at}function Kr(we){var at=typeof we;return at=="string"||at=="number"||at=="symbol"||at=="boolean"?we!=="__proto__":we===null}function Cr(we){return!!_t&&_t in we}function al(we){var at=we&&we.constructor,Rt=typeof at=="function"&&at.prototype||Mt;return we===Rt}function Si(we){if(we!=null){try{return rn.call(we)}catch{}try{return we+""}catch{}}return""}function ji(we){return ur(we,!0,!0)}function cl(we,at){return we===at||we!==we&&at!==at}function Io(we){return _o(we)&&pn.call(we,"callee")&&(!Yt.call(we,"callee")||Kt.call(we)==o)}var $i=Array.isArray;function ko(we){return we!=null&&nr(we.length)&&!Mo(we)}function _o(we){return hi(we)&&ko(we)}var go=It||Rr;function Mo(we){var at=po(we)?Kt.call(we):"";return at==y||at==x}function nr(we){return typeof we=="number"&&we>-1&&we%1==0&&we<=i}function po(we){var at=typeof we;return!!we&&(at=="object"||at=="function")}function hi(we){return!!we&&typeof we=="object"}function Lo(we){return ko(we)?gr(we):ai(we)}function Vn(){return[]}function Rr(){return!1}n.exports=ji})(pp,pp.exports)),pp.exports}var gb,ux;function $3(){return ux||(ux=1,gb=function n(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!n(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){var l=o[i];if(!n(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}),gb}var m0={},fx;function S7(){if(fx)return m0;fx=1,Object.defineProperty(m0,"__esModule",{value:!0});const n=j3(),e=$3();var t;return(function(r){function i(u={},h={},y=!1){typeof u!="object"&&(u={}),typeof h!="object"&&(h={});let x=n(h);y||(x=Object.keys(x).reduce((w,_)=>(x[_]!=null&&(w[_]=x[_]),w),{}));for(const w in u)u[w]!==void 0&&h[w]===void 0&&(x[w]=u[w]);return Object.keys(x).length>0?x:void 0}r.compose=i;function o(u={},h={}){typeof u!="object"&&(u={}),typeof h!="object"&&(h={});const y=Object.keys(u).concat(Object.keys(h)).reduce((x,w)=>(e(u[w],h[w])||(x[w]=h[w]===void 0?null:h[w]),x),{});return Object.keys(y).length>0?y:void 0}r.diff=o;function l(u={},h={}){u=u||{};const y=Object.keys(h).reduce((x,w)=>(h[w]!==u[w]&&u[w]!==void 0&&(x[w]=h[w]),x),{});return Object.keys(u).reduce((x,w)=>(u[w]!==h[w]&&h[w]===void 0&&(x[w]=null),x),y)}r.invert=l;function a(u,h,y=!1){if(typeof u!="object")return h;if(typeof h!="object")return;if(!y)return h;const x=Object.keys(h).reduce((w,_)=>(u[_]===void 0&&(w[_]=h[_]),w),{});return Object.keys(x).length>0?x:void 0}r.transform=a})(t||(t={})),m0.default=t,m0}var x0={},dx;function e_(){if(dx)return x0;dx=1,Object.defineProperty(x0,"__esModule",{value:!0});var n;return(function(e){function t(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}e.length=t})(n||(n={})),x0.default=n,x0}var w0={},hx;function E7(){if(hx)return w0;hx=1,Object.defineProperty(w0,"__esModule",{value:!0});const n=e_();class e{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const i=this.ops[this.index];if(i){const o=this.offset,l=n.default.length(i);if(r>=l-o?(r=l-o,this.index+=1,this.offset=0):this.offset+=r,typeof i.delete=="number")return{delete:r};{const a={};return i.attributes&&(a.attributes=i.attributes),typeof i.retain=="number"?a.retain=r:typeof i.retain=="object"&&i.retain!==null?a.retain=i.retain:typeof i.insert=="string"?a.insert=i.insert.substr(o,r):a.insert=i.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,i=this.index,o=this.next(),l=this.ops.slice(this.index);return this.offset=r,this.index=i,[o].concat(l)}}else return[]}}return w0.default=e,w0}var gx;function A7(){return gx||(gx=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=_7(),r=j3(),i=$3(),o=S7();e.AttributeMap=o.default;const l=e_();e.Op=l.default;const a=E7();e.OpIterator=a.default;const u="\0",h=(x,w)=>{if(typeof x!="object"||x===null)throw new Error(`cannot retain a ${typeof x}`);if(typeof w!="object"||w===null)throw new Error(`cannot retain a ${typeof w}`);const _=Object.keys(x)[0];if(!_||_!==Object.keys(w)[0])throw new Error(`embed types not matched: ${_} != ${Object.keys(w)[0]}`);return[_,x[_],w[_]]};class y{constructor(w){Array.isArray(w)?this.ops=w:w!=null&&Array.isArray(w.ops)?this.ops=w.ops:this.ops=[]}static registerEmbed(w,_){this.handlers[w]=_}static unregisterEmbed(w){delete this.handlers[w]}static getHandler(w){const _=this.handlers[w];if(!_)throw new Error(`no handlers for embed type "${w}"`);return _}insert(w,_){const S={};return typeof w=="string"&&w.length===0?this:(S.insert=w,_!=null&&typeof _=="object"&&Object.keys(_).length>0&&(S.attributes=_),this.push(S))}delete(w){return w<=0?this:this.push({delete:w})}retain(w,_){if(typeof w=="number"&&w<=0)return this;const S={retain:w};return _!=null&&typeof _=="object"&&Object.keys(_).length>0&&(S.attributes=_),this.push(S)}push(w){let _=this.ops.length,S=this.ops[_-1];if(w=r(w),typeof S=="object"){if(typeof w.delete=="number"&&typeof S.delete=="number")return this.ops[_-1]={delete:S.delete+w.delete},this;if(typeof S.delete=="number"&&w.insert!=null&&(_-=1,S=this.ops[_-1],typeof S!="object"))return this.ops.unshift(w),this;if(i(w.attributes,S.attributes)){if(typeof w.insert=="string"&&typeof S.insert=="string")return this.ops[_-1]={insert:S.insert+w.insert},typeof w.attributes=="object"&&(this.ops[_-1].attributes=w.attributes),this;if(typeof w.retain=="number"&&typeof S.retain=="number")return this.ops[_-1]={retain:S.retain+w.retain},typeof w.attributes=="object"&&(this.ops[_-1].attributes=w.attributes),this}}return _===this.ops.length?this.ops.push(w):this.ops.splice(_,0,w),this}chop(){const w=this.ops[this.ops.length-1];return w&&typeof w.retain=="number"&&!w.attributes&&this.ops.pop(),this}filter(w){return this.ops.filter(w)}forEach(w){this.ops.forEach(w)}map(w){return this.ops.map(w)}partition(w){const _=[],S=[];return this.forEach(R=>{(w(R)?_:S).push(R)}),[_,S]}reduce(w,_){return this.ops.reduce(w,_)}changeLength(){return this.reduce((w,_)=>_.insert?w+l.default.length(_):_.delete?w-_.delete:w,0)}length(){return this.reduce((w,_)=>w+l.default.length(_),0)}slice(w=0,_=1/0){const S=[],R=new a.default(this.ops);let I=0;for(;I<_&&R.hasNext();){let O;I<w?O=R.next(w-I):(O=R.next(_-I),S.push(O)),I+=l.default.length(O)}return new y(S)}compose(w){const _=new a.default(this.ops),S=new a.default(w.ops),R=[],I=S.peek();if(I!=null&&typeof I.retain=="number"&&I.attributes==null){let P=I.retain;for(;_.peekType()==="insert"&&_.peekLength()<=P;)P-=_.peekLength(),R.push(_.next());I.retain-P>0&&S.next(I.retain-P)}const O=new y(R);for(;_.hasNext()||S.hasNext();)if(S.peekType()==="insert")O.push(S.next());else if(_.peekType()==="delete")O.push(_.next());else{const P=Math.min(_.peekLength(),S.peekLength()),Y=_.next(P),z=S.next(P);if(z.retain){const W={};if(typeof Y.retain=="number")W.retain=typeof z.retain=="number"?P:z.retain;else if(typeof z.retain=="number")Y.retain==null?W.insert=Y.insert:W.retain=Y.retain;else{const ee=Y.retain==null?"insert":"retain",[H,V,de]=h(Y[ee],z.retain),Z=y.getHandler(H);W[ee]={[H]:Z.compose(V,de,ee==="retain")}}const B=o.default.compose(Y.attributes,z.attributes,typeof Y.retain=="number");if(B&&(W.attributes=B),O.push(W),!S.hasNext()&&i(O.ops[O.ops.length-1],W)){const ee=new y(_.rest());return O.concat(ee).chop()}}else typeof z.delete=="number"&&(typeof Y.retain=="number"||typeof Y.retain=="object"&&Y.retain!==null)&&O.push(z)}return O.chop()}concat(w){const _=new y(this.ops.slice());return w.ops.length>0&&(_.push(w.ops[0]),_.ops=_.ops.concat(w.ops.slice(1))),_}diff(w,_){if(this.ops===w.ops)return new y;const S=[this,w].map(Y=>Y.map(z=>{if(z.insert!=null)return typeof z.insert=="string"?z.insert:u;const W=Y===w?"on":"with";throw new Error("diff() called "+W+" non-document")}).join("")),R=new y,I=t(S[0],S[1],_,!0),O=new a.default(this.ops),P=new a.default(w.ops);return I.forEach(Y=>{let z=Y[1].length;for(;z>0;){let W=0;switch(Y[0]){case t.INSERT:W=Math.min(P.peekLength(),z),R.push(P.next(W));break;case t.DELETE:W=Math.min(z,O.peekLength()),O.next(W),R.delete(W);break;case t.EQUAL:W=Math.min(O.peekLength(),P.peekLength(),z);const B=O.next(W),ee=P.next(W);i(B.insert,ee.insert)?R.retain(W,o.default.diff(B.attributes,ee.attributes)):R.push(ee).delete(W);break}z-=W}}),R.chop()}eachLine(w,_=`
|
|
289
|
+
`){const S=new a.default(this.ops);let R=new y,I=0;for(;S.hasNext();){if(S.peekType()!=="insert")return;const O=S.peek(),P=l.default.length(O)-S.peekLength(),Y=typeof O.insert=="string"?O.insert.indexOf(_,P)-P:-1;if(Y<0)R.push(S.next());else if(Y>0)R.push(S.next(Y));else{if(w(R,S.next(1).attributes||{},I)===!1)return;I+=1,R=new y}}R.length()>0&&w(R,{},I)}invert(w){const _=new y;return this.reduce((S,R)=>{if(R.insert)_.delete(l.default.length(R));else{if(typeof R.retain=="number"&&R.attributes==null)return _.retain(R.retain),S+R.retain;if(R.delete||typeof R.retain=="number"){const I=R.delete||R.retain;return w.slice(S,S+I).forEach(P=>{R.delete?_.push(P):R.retain&&R.attributes&&_.retain(l.default.length(P),o.default.invert(R.attributes,P.attributes))}),S+I}else if(typeof R.retain=="object"&&R.retain!==null){const I=w.slice(S,S+1),O=new a.default(I.ops).next(),[P,Y,z]=h(R.retain,O.insert),W=y.getHandler(P);return _.retain({[P]:W.invert(Y,z)},o.default.invert(R.attributes,O.attributes)),S+1}}return S},0),_.chop()}transform(w,_=!1){if(_=!!_,typeof w=="number")return this.transformPosition(w,_);const S=w,R=new a.default(this.ops),I=new a.default(S.ops),O=new y;for(;R.hasNext()||I.hasNext();)if(R.peekType()==="insert"&&(_||I.peekType()!=="insert"))O.retain(l.default.length(R.next()));else if(I.peekType()==="insert")O.push(I.next());else{const P=Math.min(R.peekLength(),I.peekLength()),Y=R.next(P),z=I.next(P);if(Y.delete)continue;if(z.delete)O.push(z);else{const W=Y.retain,B=z.retain;let ee=typeof B=="object"&&B!==null?B:P;if(typeof W=="object"&&W!==null&&typeof B=="object"&&B!==null){const H=Object.keys(W)[0];if(H===Object.keys(B)[0]){const V=y.getHandler(H);V&&(ee={[H]:V.transform(W[H],B[H],_)})}}O.retain(ee,o.default.transform(Y.attributes,z.attributes,_))}}return O.chop()}transformPosition(w,_=!1){_=!!_;const S=new a.default(this.ops);let R=0;for(;S.hasNext()&&R<=w;){const I=S.peekLength(),O=S.peekType();if(S.next(),O==="delete"){w-=Math.min(I,w-R);continue}else O==="insert"&&(R<w||!_)&&(w+=I);R+=I}return w}}y.Op=l.default,y.OpIterator=a.default,y.AttributeMap=o.default,y.handlers={},e.default=y,n.exports=y,n.exports.default=y})(y0,y0.exports)),y0.exports}var pd=A7();const Kn=M1(pd);var t_=typeof global=="object"&&global&&global.Object===Object&&global,T7=typeof self=="object"&&self&&self.Object===Object&&self,sh=t_||T7||Function("return this")(),ag=sh.Symbol,n_=Object.prototype,R7=n_.hasOwnProperty,I7=n_.toString,op=ag?ag.toStringTag:void 0;function k7(n){var e=R7.call(n,op),t=n[op];try{n[op]=void 0;var r=!0}catch{}var i=I7.call(n);return r&&(e?n[op]=t:delete n[op]),i}var M7=Object.prototype,L7=M7.toString;function O7(n){return L7.call(n)}var P7="[object Null]",D7="[object Undefined]",px=ag?ag.toStringTag:void 0;function O1(n){return n==null?n===void 0?D7:P7:px&&px in Object(n)?k7(n):O7(n)}function Th(n){return n!=null&&typeof n=="object"}var Pg=Array.isArray;function fg(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function r_(n){return n}var N7="[object AsyncFunction]",F7="[object Function]",B7="[object GeneratorFunction]",z7="[object Proxy]";function Tm(n){if(!fg(n))return!1;var e=O1(n);return e==F7||e==B7||e==N7||e==z7}var pb=sh["__core-js_shared__"],vx=(function(){var n=/[^.]+$/.exec(pb&&pb.keys&&pb.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function H7(n){return!!vx&&vx in n}var W7=Function.prototype,U7=W7.toString;function Hg(n){if(n!=null){try{return U7.call(n)}catch{}try{return n+""}catch{}}return""}var G7=/[\\^$.*+?()[\]{}|]/g,Y7=/^\[object .+?Constructor\]$/,V7=Function.prototype,Z7=Object.prototype,X7=V7.toString,K7=Z7.hasOwnProperty,J7=RegExp("^"+X7.call(K7).replace(G7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q7(n){if(!fg(n)||H7(n))return!1;var e=Tm(n)?J7:Y7;return e.test(Hg(n))}function q7(n,e){return n==null?void 0:n[e]}function Wg(n,e){var t=q7(n,e);return Q7(t)?t:void 0}var Oy=Wg(sh,"WeakMap"),bx=Object.create,j7=(function(){function n(){}return function(e){if(!fg(e))return{};if(bx)return bx(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}})();function $7(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function eM(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var tM=800,nM=16,rM=Date.now;function iM(n){var e=0,t=0;return function(){var r=rM(),i=nM-(r-t);if(t=r,i>0){if(++e>=tM)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function oM(n){return function(){return n}}var rv=(function(){try{var n=Wg(Object,"defineProperty");return n({},"",{}),n}catch{}})(),lM=rv?function(n,e){return rv(n,"toString",{configurable:!0,enumerable:!1,value:oM(e),writable:!0})}:r_,sM=iM(lM);function aM(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var cM=9007199254740991,uM=/^(?:0|[1-9]\d*)$/;function i_(n,e){var t=typeof n;return e=e??cM,!!e&&(t=="number"||t!="symbol"&&uM.test(n))&&n>-1&&n%1==0&&n<e}function Rm(n,e,t){e=="__proto__"&&rv?rv(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function Hp(n,e){return n===e||n!==n&&e!==e}var fM=Object.prototype,dM=fM.hasOwnProperty;function o_(n,e,t){var r=n[e];(!(dM.call(n,e)&&Hp(r,t))||t===void 0&&!(e in n))&&Rm(n,e,t)}function hM(n,e,t,r){var i=!t;t||(t={});for(var o=-1,l=e.length;++o<l;){var a=e[o],u=void 0;u===void 0&&(u=n[a]),i?Rm(t,a,u):o_(t,a,u)}return t}var yx=Math.max;function gM(n,e,t){return e=yx(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=yx(r.length-e,0),l=Array(o);++i<o;)l[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(l),$7(n,this,a)}}function pM(n,e){return sM(gM(n,e,r_),n+"")}var vM=9007199254740991;function l_(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=vM}function Av(n){return n!=null&&l_(n.length)&&!Tm(n)}function bM(n,e,t){if(!fg(t))return!1;var r=typeof e;return(r=="number"?Av(t)&&i_(e,t.length):r=="string"&&e in t)?Hp(t[e],n):!1}function yM(n){return pM(function(e,t){var r=-1,i=t.length,o=i>1?t[i-1]:void 0,l=i>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(i--,o):void 0,l&&bM(t[0],t[1],l)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=t[r];a&&n(e,a,r,o)}return e})}var mM=Object.prototype;function Im(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||mM;return n===t}function xM(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var wM="[object Arguments]";function mx(n){return Th(n)&&O1(n)==wM}var s_=Object.prototype,CM=s_.hasOwnProperty,_M=s_.propertyIsEnumerable,Py=mx((function(){return arguments})())?mx:function(n){return Th(n)&&CM.call(n,"callee")&&!_M.call(n,"callee")};function SM(){return!1}var a_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xx=a_&&typeof module=="object"&&module&&!module.nodeType&&module,EM=xx&&xx.exports===a_,wx=EM?sh.Buffer:void 0,AM=wx?wx.isBuffer:void 0,Tp=AM||SM,TM="[object Arguments]",RM="[object Array]",IM="[object Boolean]",kM="[object Date]",MM="[object Error]",LM="[object Function]",OM="[object Map]",PM="[object Number]",DM="[object Object]",NM="[object RegExp]",FM="[object Set]",BM="[object String]",zM="[object WeakMap]",HM="[object ArrayBuffer]",WM="[object DataView]",UM="[object Float32Array]",GM="[object Float64Array]",YM="[object Int8Array]",VM="[object Int16Array]",ZM="[object Int32Array]",XM="[object Uint8Array]",KM="[object Uint8ClampedArray]",JM="[object Uint16Array]",QM="[object Uint32Array]",Xl={};Xl[UM]=Xl[GM]=Xl[YM]=Xl[VM]=Xl[ZM]=Xl[XM]=Xl[KM]=Xl[JM]=Xl[QM]=!0;Xl[TM]=Xl[RM]=Xl[HM]=Xl[IM]=Xl[WM]=Xl[kM]=Xl[MM]=Xl[LM]=Xl[OM]=Xl[PM]=Xl[DM]=Xl[NM]=Xl[FM]=Xl[BM]=Xl[zM]=!1;function qM(n){return Th(n)&&l_(n.length)&&!!Xl[O1(n)]}function km(n){return function(e){return n(e)}}var c_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bp=c_&&typeof module=="object"&&module&&!module.nodeType&&module,jM=bp&&bp.exports===c_,vb=jM&&t_.process,w1=(function(){try{var n=bp&&bp.require&&bp.require("util").types;return n||vb&&vb.binding&&vb.binding("util")}catch{}})(),Cx=w1&&w1.isTypedArray,Mm=Cx?km(Cx):qM,$M=Object.prototype,eL=$M.hasOwnProperty;function u_(n,e){var t=Pg(n),r=!t&&Py(n),i=!t&&!r&&Tp(n),o=!t&&!r&&!i&&Mm(n),l=t||r||i||o,a=l?xM(n.length,String):[],u=a.length;for(var h in n)(e||eL.call(n,h))&&!(l&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||i_(h,u)))&&a.push(h);return a}function f_(n,e){return function(t){return n(e(t))}}var tL=f_(Object.keys,Object),nL=Object.prototype,rL=nL.hasOwnProperty;function iL(n){if(!Im(n))return tL(n);var e=[];for(var t in Object(n))rL.call(n,t)&&t!="constructor"&&e.push(t);return e}function oL(n){return Av(n)?u_(n):iL(n)}function lL(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var sL=Object.prototype,aL=sL.hasOwnProperty;function cL(n){if(!fg(n))return lL(n);var e=Im(n),t=[];for(var r in n)r=="constructor"&&(e||!aL.call(n,r))||t.push(r);return t}function d_(n){return Av(n)?u_(n,!0):cL(n)}var Rp=Wg(Object,"create");function uL(){this.__data__=Rp?Rp(null):{},this.size=0}function fL(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var dL="__lodash_hash_undefined__",hL=Object.prototype,gL=hL.hasOwnProperty;function pL(n){var e=this.__data__;if(Rp){var t=e[n];return t===dL?void 0:t}return gL.call(e,n)?e[n]:void 0}var vL=Object.prototype,bL=vL.hasOwnProperty;function yL(n){var e=this.__data__;return Rp?e[n]!==void 0:bL.call(e,n)}var mL="__lodash_hash_undefined__";function xL(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Rp&&e===void 0?mL:e,this}function Dg(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Dg.prototype.clear=uL;Dg.prototype.delete=fL;Dg.prototype.get=pL;Dg.prototype.has=yL;Dg.prototype.set=xL;function wL(){this.__data__=[],this.size=0}function Tv(n,e){for(var t=n.length;t--;)if(Hp(n[t][0],e))return t;return-1}var CL=Array.prototype,_L=CL.splice;function SL(n){var e=this.__data__,t=Tv(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():_L.call(e,t,1),--this.size,!0}function EL(n){var e=this.__data__,t=Tv(e,n);return t<0?void 0:e[t][1]}function AL(n){return Tv(this.__data__,n)>-1}function TL(n,e){var t=this.__data__,r=Tv(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function kh(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}kh.prototype.clear=wL;kh.prototype.delete=SL;kh.prototype.get=EL;kh.prototype.has=AL;kh.prototype.set=TL;var Ip=Wg(sh,"Map");function RL(){this.size=0,this.__data__={hash:new Dg,map:new(Ip||kh),string:new Dg}}function IL(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Rv(n,e){var t=n.__data__;return IL(e)?t[typeof e=="string"?"string":"hash"]:t.map}function kL(n){var e=Rv(this,n).delete(n);return this.size-=e?1:0,e}function ML(n){return Rv(this,n).get(n)}function LL(n){return Rv(this,n).has(n)}function OL(n,e){var t=Rv(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Ug(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Ug.prototype.clear=RL;Ug.prototype.delete=kL;Ug.prototype.get=ML;Ug.prototype.has=LL;Ug.prototype.set=OL;function PL(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var h_=f_(Object.getPrototypeOf,Object),DL="[object Object]",NL=Function.prototype,FL=Object.prototype,g_=NL.toString,BL=FL.hasOwnProperty,zL=g_.call(Object);function HL(n){if(!Th(n)||O1(n)!=DL)return!1;var e=h_(n);if(e===null)return!0;var t=BL.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&g_.call(t)==zL}function WL(){this.__data__=new kh,this.size=0}function UL(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function GL(n){return this.__data__.get(n)}function YL(n){return this.__data__.has(n)}var VL=200;function ZL(n,e){var t=this.__data__;if(t instanceof kh){var r=t.__data__;if(!Ip||r.length<VL-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Ug(r)}return t.set(n,e),this.size=t.size,this}function $d(n){var e=this.__data__=new kh(n);this.size=e.size}$d.prototype.clear=WL;$d.prototype.delete=UL;$d.prototype.get=GL;$d.prototype.has=YL;$d.prototype.set=ZL;var p_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_x=p_&&typeof module=="object"&&module&&!module.nodeType&&module,XL=_x&&_x.exports===p_,Sx=XL?sh.Buffer:void 0,Ex=Sx?Sx.allocUnsafe:void 0;function v_(n,e){if(e)return n.slice();var t=n.length,r=Ex?Ex(t):new n.constructor(t);return n.copy(r),r}function KL(n,e){for(var t=-1,r=n==null?0:n.length,i=0,o=[];++t<r;){var l=n[t];e(l,t,n)&&(o[i++]=l)}return o}function JL(){return[]}var QL=Object.prototype,qL=QL.propertyIsEnumerable,Ax=Object.getOwnPropertySymbols,jL=Ax?function(n){return n==null?[]:(n=Object(n),KL(Ax(n),function(e){return qL.call(n,e)}))}:JL;function $L(n,e,t){var r=e(n);return Pg(n)?r:PL(r,t(n))}function Dy(n){return $L(n,oL,jL)}var Ny=Wg(sh,"DataView"),Fy=Wg(sh,"Promise"),By=Wg(sh,"Set"),Tx="[object Map]",eO="[object Object]",Rx="[object Promise]",Ix="[object Set]",kx="[object WeakMap]",Mx="[object DataView]",tO=Hg(Ny),nO=Hg(Ip),rO=Hg(Fy),iO=Hg(By),oO=Hg(Oy),kd=O1;(Ny&&kd(new Ny(new ArrayBuffer(1)))!=Mx||Ip&&kd(new Ip)!=Tx||Fy&&kd(Fy.resolve())!=Rx||By&&kd(new By)!=Ix||Oy&&kd(new Oy)!=kx)&&(kd=function(n){var e=O1(n),t=e==eO?n.constructor:void 0,r=t?Hg(t):"";if(r)switch(r){case tO:return Mx;case nO:return Tx;case rO:return Rx;case iO:return Ix;case oO:return kx}return e});var lO=Object.prototype,sO=lO.hasOwnProperty;function aO(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&sO.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var iv=sh.Uint8Array;function Lm(n){var e=new n.constructor(n.byteLength);return new iv(e).set(new iv(n)),e}function cO(n,e){var t=Lm(n.buffer);return new n.constructor(t,n.byteOffset,n.byteLength)}var uO=/\w*$/;function fO(n){var e=new n.constructor(n.source,uO.exec(n));return e.lastIndex=n.lastIndex,e}var Lx=ag?ag.prototype:void 0,Ox=Lx?Lx.valueOf:void 0;function dO(n){return Ox?Object(Ox.call(n)):{}}function b_(n,e){var t=e?Lm(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var hO="[object Boolean]",gO="[object Date]",pO="[object Map]",vO="[object Number]",bO="[object RegExp]",yO="[object Set]",mO="[object String]",xO="[object Symbol]",wO="[object ArrayBuffer]",CO="[object DataView]",_O="[object Float32Array]",SO="[object Float64Array]",EO="[object Int8Array]",AO="[object Int16Array]",TO="[object Int32Array]",RO="[object Uint8Array]",IO="[object Uint8ClampedArray]",kO="[object Uint16Array]",MO="[object Uint32Array]";function LO(n,e,t){var r=n.constructor;switch(e){case wO:return Lm(n);case hO:case gO:return new r(+n);case CO:return cO(n);case _O:case SO:case EO:case AO:case TO:case RO:case IO:case kO:case MO:return b_(n,t);case pO:return new r;case vO:case mO:return new r(n);case bO:return fO(n);case yO:return new r;case xO:return dO(n)}}function y_(n){return typeof n.constructor=="function"&&!Im(n)?j7(h_(n)):{}}var OO="[object Map]";function PO(n){return Th(n)&&kd(n)==OO}var Px=w1&&w1.isMap,DO=Px?km(Px):PO,NO="[object Set]";function FO(n){return Th(n)&&kd(n)==NO}var Dx=w1&&w1.isSet,BO=Dx?km(Dx):FO,zO=1,m_="[object Arguments]",HO="[object Array]",WO="[object Boolean]",UO="[object Date]",GO="[object Error]",x_="[object Function]",YO="[object GeneratorFunction]",VO="[object Map]",ZO="[object Number]",w_="[object Object]",XO="[object RegExp]",KO="[object Set]",JO="[object String]",QO="[object Symbol]",qO="[object WeakMap]",jO="[object ArrayBuffer]",$O="[object DataView]",eP="[object Float32Array]",tP="[object Float64Array]",nP="[object Int8Array]",rP="[object Int16Array]",iP="[object Int32Array]",oP="[object Uint8Array]",lP="[object Uint8ClampedArray]",sP="[object Uint16Array]",aP="[object Uint32Array]",Ml={};Ml[m_]=Ml[HO]=Ml[jO]=Ml[$O]=Ml[WO]=Ml[UO]=Ml[eP]=Ml[tP]=Ml[nP]=Ml[rP]=Ml[iP]=Ml[VO]=Ml[ZO]=Ml[w_]=Ml[XO]=Ml[KO]=Ml[JO]=Ml[QO]=Ml[oP]=Ml[lP]=Ml[sP]=Ml[aP]=!0;Ml[GO]=Ml[x_]=Ml[qO]=!1;function Y0(n,e,t,r,i,o){var l,a=e&zO;if(l!==void 0)return l;if(!fg(n))return n;var u=Pg(n);if(u)l=aO(n);else{var h=kd(n),y=h==x_||h==YO;if(Tp(n))return v_(n,a);if(h==w_||h==m_||y&&!i)l=y?{}:y_(n);else{if(!Ml[h])return i?n:{};l=LO(n,h,a)}}o||(o=new $d);var x=o.get(n);if(x)return x;o.set(n,l),BO(n)?n.forEach(function(S){l.add(Y0(S,e,t,S,n,o))}):DO(n)&&n.forEach(function(S,R){l.set(R,Y0(S,e,t,R,n,o))});var w=Dy,_=u?void 0:w(n);return aM(_||n,function(S,R){_&&(R=S,S=n[R]),o_(l,R,Y0(S,e,t,R,n,o))}),l}var cP=1,uP=4;function h1(n){return Y0(n,cP|uP)}var fP="__lodash_hash_undefined__";function dP(n){return this.__data__.set(n,fP),this}function hP(n){return this.__data__.has(n)}function ov(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Ug;++e<t;)this.add(n[e])}ov.prototype.add=ov.prototype.push=dP;ov.prototype.has=hP;function gP(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function pP(n,e){return n.has(e)}var vP=1,bP=2;function C_(n,e,t,r,i,o){var l=t&vP,a=n.length,u=e.length;if(a!=u&&!(l&&u>a))return!1;var h=o.get(n),y=o.get(e);if(h&&y)return h==e&&y==n;var x=-1,w=!0,_=t&bP?new ov:void 0;for(o.set(n,e),o.set(e,n);++x<a;){var S=n[x],R=e[x];if(r)var I=l?r(R,S,x,e,n,o):r(S,R,x,n,e,o);if(I!==void 0){if(I)continue;w=!1;break}if(_){if(!gP(e,function(O,P){if(!pP(_,P)&&(S===O||i(S,O,t,r,o)))return _.push(P)})){w=!1;break}}else if(!(S===R||i(S,R,t,r,o))){w=!1;break}}return o.delete(n),o.delete(e),w}function yP(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function mP(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var xP=1,wP=2,CP="[object Boolean]",_P="[object Date]",SP="[object Error]",EP="[object Map]",AP="[object Number]",TP="[object RegExp]",RP="[object Set]",IP="[object String]",kP="[object Symbol]",MP="[object ArrayBuffer]",LP="[object DataView]",Nx=ag?ag.prototype:void 0,bb=Nx?Nx.valueOf:void 0;function OP(n,e,t,r,i,o,l){switch(t){case LP:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case MP:return!(n.byteLength!=e.byteLength||!o(new iv(n),new iv(e)));case CP:case _P:case AP:return Hp(+n,+e);case SP:return n.name==e.name&&n.message==e.message;case TP:case IP:return n==e+"";case EP:var a=yP;case RP:var u=r&xP;if(a||(a=mP),n.size!=e.size&&!u)return!1;var h=l.get(n);if(h)return h==e;r|=wP,l.set(n,e);var y=C_(a(n),a(e),r,i,o,l);return l.delete(n),y;case kP:if(bb)return bb.call(n)==bb.call(e)}return!1}var PP=1,DP=Object.prototype,NP=DP.hasOwnProperty;function FP(n,e,t,r,i,o){var l=t&PP,a=Dy(n),u=a.length,h=Dy(e),y=h.length;if(u!=y&&!l)return!1;for(var x=u;x--;){var w=a[x];if(!(l?w in e:NP.call(e,w)))return!1}var _=o.get(n),S=o.get(e);if(_&&S)return _==e&&S==n;var R=!0;o.set(n,e),o.set(e,n);for(var I=l;++x<u;){w=a[x];var O=n[w],P=e[w];if(r)var Y=l?r(P,O,w,e,n,o):r(O,P,w,n,e,o);if(!(Y===void 0?O===P||i(O,P,t,r,o):Y)){R=!1;break}I||(I=w=="constructor")}if(R&&!I){var z=n.constructor,W=e.constructor;z!=W&&"constructor"in n&&"constructor"in e&&!(typeof z=="function"&&z instanceof z&&typeof W=="function"&&W instanceof W)&&(R=!1)}return o.delete(n),o.delete(e),R}var BP=1,Fx="[object Arguments]",Bx="[object Array]",C0="[object Object]",zP=Object.prototype,zx=zP.hasOwnProperty;function HP(n,e,t,r,i,o){var l=Pg(n),a=Pg(e),u=l?Bx:kd(n),h=a?Bx:kd(e);u=u==Fx?C0:u,h=h==Fx?C0:h;var y=u==C0,x=h==C0,w=u==h;if(w&&Tp(n)){if(!Tp(e))return!1;l=!0,y=!1}if(w&&!y)return o||(o=new $d),l||Mm(n)?C_(n,e,t,r,i,o):OP(n,e,u,t,r,i,o);if(!(t&BP)){var _=y&&zx.call(n,"__wrapped__"),S=x&&zx.call(e,"__wrapped__");if(_||S){var R=_?n.value():n,I=S?e.value():e;return o||(o=new $d),i(R,I,t,r,o)}}return w?(o||(o=new $d),FP(n,e,t,r,i,o)):!1}function __(n,e,t,r,i){return n===e?!0:n==null||e==null||!Th(n)&&!Th(e)?n!==n&&e!==e:HP(n,e,t,r,__,i)}function WP(n){return function(e,t,r){for(var i=-1,o=Object(e),l=r(e),a=l.length;a--;){var u=l[++i];if(t(o[u],u,o)===!1)break}return e}}var UP=WP();function zy(n,e,t){(t!==void 0&&!Hp(n[e],t)||t===void 0&&!(e in n))&&Rm(n,e,t)}function GP(n){return Th(n)&&Av(n)}function Hy(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function YP(n){return hM(n,d_(n))}function VP(n,e,t,r,i,o,l){var a=Hy(n,t),u=Hy(e,t),h=l.get(u);if(h){zy(n,t,h);return}var y=o?o(a,u,t+"",n,e,l):void 0,x=y===void 0;if(x){var w=Pg(u),_=!w&&Tp(u),S=!w&&!_&&Mm(u);y=u,w||_||S?Pg(a)?y=a:GP(a)?y=eM(a):_?(x=!1,y=v_(u,!0)):S?(x=!1,y=b_(u,!0)):y=[]:HL(u)||Py(u)?(y=a,Py(a)?y=YP(a):(!fg(a)||Tm(a))&&(y=y_(u))):x=!1}x&&(l.set(u,y),i(y,u,r,o,l),l.delete(u)),zy(n,t,y)}function S_(n,e,t,r,i){n!==e&&UP(e,function(o,l){if(i||(i=new $d),fg(o))VP(n,e,l,t,S_,r,i);else{var a=r?r(Hy(n,l),o,l+"",n,e,i):void 0;a===void 0&&(a=o),zy(n,l,a)}},d_)}function $h(n,e){return __(n,e)}var og=yM(function(n,e,t){S_(n,e,t)}),Jn=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(Jn||{});class rh{constructor(e,t,r={}){this.attrName=e,this.keyName=t;const i=Jn.TYPE&Jn.ATTRIBUTE;this.scope=r.scope!=null?r.scope&Jn.LEVEL|i:Jn.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class g1 extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const E_=class Wy{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,t)}return null}create(e,t,r){const i=this.query(t);if(i==null)throw new g1(`Unable to create ${t} blot`);const o=i,l=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:o.create(r),a=new o(e,l,r);return Wy.blots.set(a.domNode,a),a}find(e,t=!1){return Wy.find(e,t)}query(e,t=Jn.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&Jn.LEVEL&Jn.BLOCK?r=this.types.block:e&Jn.LEVEL&Jn.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&t&Jn.LEVEL&r.scope&&t&Jn.TYPE&r.scope?r:null}register(...e){return e.map(t=>{const r="blotName"in t,i="attrName"in t;if(!r&&!i)throw new g1("Invalid definition");if(r&&t.blotName==="abstract")throw new g1("Cannot register abstract class");const o=r?t.blotName:i?t.attrName:void 0;return this.types[o]=t,i?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(l=>l.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(l=>{(this.tags[l]==null||t.className==null)&&(this.tags[l]=t)}))),t})}};E_.blots=new WeakMap;let C1=E_;function Hx(n,e){return(n.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class ZP extends rh{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){Hx(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(Hx(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const zd=ZP;function yb(n){const e=n.split("-"),t=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+t}class XP extends rh{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[yb(this.keyName)]=t,!0):!1}remove(e){e.style[yb(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[yb(this.keyName)];return this.canAdd(e,t)?t:""}}const dg=XP;class KP{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=C1.find(this.domNode);if(e==null)return;const t=rh.keys(this.domNode),r=zd.keys(this.domNode),i=dg.keys(this.domNode);t.concat(r).concat(i).forEach(o=>{const l=e.scroll.query(o,Jn.ATTRIBUTE);l instanceof rh&&(this.attributes[l.attrName]=l)})}copy(e){Object.keys(this.attributes).forEach(t=>{const r=this.attributes[t].value(this.domNode);e.format(t,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Iv=KP,A_=class{constructor(e,t){this.scroll=e,this.domNode=t,C1.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new g1("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),C1.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,r,i){const o=this.isolate(e,t);if(this.scroll.query(r,Jn.BLOT)!=null&&i)o.wrap(r,i);else if(this.scroll.query(r,Jn.ATTRIBUTE)!=null){const l=this.scroll.create(this.statics.scope);o.wrap(l),l.format(r,i)}}insertAt(e,t,r){const i=r==null?this.scroll.create("text",t):this.scroll.create(t,r),o=this.split(e);this.parent.insertBefore(i,o||void 0)}isolate(e,t){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new g1(`Cannot wrap ${e}`);return r.appendChild(this),r}};A_.blotName="abstract";let T_=A_;const R_=class extends T_{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};R_.scope=Jn.INLINE_BLOT;let JP=R_;const lu=JP;class QP{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let r=t();for(;r&&e>0;)e-=1,r=t();return r}contains(e){const t=this.iterator();let r=t();for(;r;){if(r===e)return!0;r=t()}return!1}indexOf(e){const t=this.iterator();let r=t(),i=0;for(;r;){if(r===e)return i;i+=1,r=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,r=this.head;for(;r!=null;){if(r===e)return t;t+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const r=this.iterator();let i=r();for(;i;){const o=i.length();if(e<o||t&&e===o&&(i.next==null||i.next.length()!==0))return[i,e];e-=o,i=r()}return[null,0]}forEach(e){const t=this.iterator();let r=t();for(;r;)e(r),r=t()}forEachAt(e,t,r){if(t<=0)return;const[i,o]=this.find(e);let l=e-o;const a=this.iterator(i);let u=a();for(;u&&l<e+t;){const h=u.length();e>l?r(u,e-l,Math.min(t,l+h-e)):r(u,0,Math.min(h,e+t-l)),l+=h,u=a()}}map(e){return this.reduce((t,r)=>(t.push(e(r)),t),[])}reduce(e,t){const r=this.iterator();let i=r();for(;i;)t=e(t,i),i=r();return t}}function Wx(n,e){const t=e.find(n);if(t)return t;try{return e.create(n)}catch{const r=e.create(Jn.INLINE);return Array.from(n.childNodes).forEach(i=>{r.domNode.appendChild(i)}),n.parentNode&&n.parentNode.replaceChild(r.domNode,n),r.attach(),r}}const I_=class Kh extends T_{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,Kh.uiClass&&this.uiNode.classList.add(Kh.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new QP,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Wx(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof g1)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(r,i,o)=>{r.deleteAt(i,o)})}descendant(e,t=0){const[r,i]=this.children.find(t);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof Kh?r.descendant(e,i):[null,-1]}descendants(e,t=0,r=Number.MAX_VALUE){let i=[],o=r;return this.children.forEachAt(t,r,(l,a,u)=>{(e.blotName==null&&e(l)||e.blotName!=null&&l instanceof e)&&i.push(l),l instanceof Kh&&(i=i.concat(l.descendants(e,a,o))),o-=u}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===Jn.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof Kh?t.unwrap():t.remove())})}formatAt(e,t,r,i){this.children.forEachAt(e,t,(o,l,a)=>{o.formatAt(l,a,r,i)})}insertAt(e,t,r){const[i,o]=this.children.find(e);if(i)i.insertAt(o,t,r);else{const l=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(l)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(r=>{e.insertBefore(r,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[r,i]=this.children.find(e,t),o=[[this,e]];return r instanceof Kh?o.concat(r.path(i,t)):(r!=null&&o.push([r,i]),o)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return r instanceof Kh&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,o,l)=>{const a=i.split(o,t);a!=null&&r.appendChild(a)}),r}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const r=[],i=[];e.forEach(o=>{o.target===this.domNode&&o.type==="childList"&&(r.push(...o.addedNodes),i.push(...o.removedNodes))}),i.forEach(o=>{if(o.parentNode!=null&&o.tagName!=="IFRAME"&&document.body.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const l=this.scroll.find(o);l!=null&&(l.domNode.parentNode==null||l.domNode.parentNode===this.domNode)&&l.detach()}),r.filter(o=>o.parentNode===this.domNode&&o!==this.uiNode).sort((o,l)=>o===l?0:o.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(o=>{let l=null;o.nextSibling!=null&&(l=this.scroll.find(o.nextSibling));const a=Wx(o,this.scroll);(a.next!==l||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,l||void 0))}),this.enforceAllowedChildren()}};I_.uiClass="";let qP=I_;const Od=qP;function jP(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}const t1=class n1 extends Od{static create(e){return super.create(e)}static formats(e,t){const r=t.query(n1.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Iv(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof n1||(r=r.wrap(n1.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,Jn.INLINE);if(r==null)return;r instanceof rh?this.attributes.attribute(r,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,i){this.formats()[r]!=null||this.scroll.query(r,Jn.ATTRIBUTE)?this.isolate(e,t).format(r,i):super.formatAt(e,t,r,i)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const r=this.next;r instanceof n1&&r.prev===this&&jP(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,t){const r=super.wrap(e,t);return r instanceof n1&&this.attributes.move(r),r}};t1.allowedChildren=[t1,lu],t1.blotName="inline",t1.scope=Jn.INLINE_BLOT,t1.tagName="SPAN";let $P=t1;const Om=$P,r1=class Uy extends Od{static create(e){return super.create(e)}static formats(e,t){const r=t.query(Uy.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Iv(this.domNode)}format(e,t){const r=this.scroll.query(e,Jn.BLOCK);r!=null&&(r instanceof rh?this.attributes.attribute(r,t):e===this.statics.blotName&&!t?this.replaceWith(Uy.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,i){this.scroll.query(r,Jn.BLOCK)!=null?this.format(r,i):super.formatAt(e,t,r,i)}insertAt(e,t,r){if(r==null||this.scroll.query(t,Jn.INLINE)!=null)super.insertAt(e,t,r);else{const i=this.split(e);if(i!=null){const o=this.scroll.create(t,r);i.parent.insertBefore(o,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};r1.blotName="block",r1.scope=Jn.BLOCK_BLOT,r1.tagName="P",r1.allowedChildren=[Om,r1,lu];let eD=r1;const kp=eD,Gy=class extends Od{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,r,i){super.formatAt(e,t,r,i),this.enforceAllowedChildren()}insertAt(e,t,r){super.insertAt(e,t,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Gy.blotName="container",Gy.scope=Jn.BLOCK_BLOT;let tD=Gy;const kv=tD;class nD extends lu{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,r,i){e===0&&t===this.length()?this.format(r,i):super.formatAt(e,t,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Bf=nD,rD={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},iD=100,i1=class extends Od{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,rD),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const r=this.registry.find(e,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,t=Jn.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,t)}formatAt(e,t,r,i){this.update(),super.formatAt(e,t,r,i)}insertAt(e,t,r){this.update(),super.insertAt(e,t,r)}optimize(e=[],t={}){super.optimize(t);const r=t.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const o=(u,h=!0)=>{u==null||u===this||u.domNode.parentNode!=null&&(r.has(u.domNode)||r.set(u.domNode,[]),h&&o(u.parent))},l=u=>{r.has(u.domNode)&&(u instanceof Od&&u.children.forEach(l),r.delete(u.domNode),u.optimize(t))};let a=e;for(let u=0;a.length>0;u+=1){if(u>=iD)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(h=>{const y=this.find(h.target,!0);y!=null&&(y.domNode===h.target&&(h.type==="childList"?(o(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(x=>{const w=this.find(x,!1);o(w,!1),w instanceof Od&&w.children.forEach(_=>{o(_,!1)})})):h.type==="attributes"&&o(y.prev)),o(y))}),this.children.forEach(l),a=Array.from(this.observer.takeRecords()),i=a.slice();i.length>0;)e.push(i.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const o=this.find(i.target,!0);return o==null?null:r.has(o.domNode)?(r.get(o.domNode).push(i),null):(r.set(o.domNode,[i]),o)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(e,t)}};i1.blotName="scroll",i1.defaultChild=kp,i1.allowedChildren=[kp,kv],i1.scope=Jn.BLOCK_BLOT,i1.tagName="DIV";let oD=i1;const Pm=oD,Yy=class k_ extends lu{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,r){r==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof k_&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,t){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Yy.blotName="text",Yy.scope=Jn.INLINE_BLOT;let lD=Yy;const lv=lD,sD=Object.freeze(Object.defineProperty({__proto__:null,Attributor:rh,AttributorStore:Iv,BlockBlot:kp,ClassAttributor:zd,ContainerBlot:kv,EmbedBlot:Bf,InlineBlot:Om,LeafBlot:lu,ParentBlot:Od,Registry:C1,Scope:Jn,ScrollBlot:Pm,StyleAttributor:dg,TextBlot:lv},Symbol.toStringTag,{value:"Module"}));class Hd extends Bf{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Hd.blotName="break";Hd.tagName="BR";let Dd=class extends lv{};const aD={"&":"&","<":"<",">":">",'"':""","'":"'"};function Mv(n){return n.replace(/[&<>"']/g,e=>aD[e])}const Kd=class Kd extends Om{static compare(e,t){const r=Kd.order.indexOf(e),i=Kd.order.indexOf(t);return r>=0||i>=0?r-i:e===t?0:e<t?-1:1}formatAt(e,t,r,i){if(Kd.compare(this.statics.blotName,r)<0&&this.scroll.query(r,Jn.BLOT)){const o=this.isolate(e,t);i&&o.wrap(r,i)}else super.formatAt(e,t,r,i)}optimize(e){if(super.optimize(e),this.parent instanceof Kd&&Kd.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};Ae(Kd,"allowedChildren",[Kd,Hd,Bf,Dd]),Ae(Kd,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let ih=Kd;const Ux=1;class kc extends kp{constructor(){super(...arguments);Ae(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=M_(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,i,o){r<=0||(this.scroll.query(i,Jn.BLOCK)?t+r===this.length()&&this.format(i,o):super.formatAt(t,Math.min(r,this.length()-t-1),i,o),this.cache={})}insertAt(t,r,i){if(i!=null){super.insertAt(t,r,i),this.cache={};return}if(r.length===0)return;const o=r.split(`
|
|
290
290
|
`),l=o.shift();l.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),this.cache={});let a=this;o.reduce((u,h)=>(a=a.split(u,!0),a.insertAt(0,h),h.length),t+l.length)}insertBefore(t,r){const{head:i}=this.children;super.insertBefore(t,r),i instanceof Hd&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Ux),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-Ux)){const o=this.clone();return t===0?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}const i=super.split(t,r);return this.cache={},i}}kc.blotName="block";kc.tagName="P";kc.defaultChild=Hd;kc.allowedChildren=[Hd,ih,Bf,Dd];let gd=class extends Bf{attach(){super.attach(),this.attributes=new Iv(this.domNode)}delta(){return new Kn().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const r=this.scroll.query(e,Jn.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(e,t,r,i){this.format(r,i)}insertAt(e,t,r){if(r!=null){super.insertAt(e,t,r);return}const i=t.split(`
|
|
291
291
|
`),o=i.pop(),l=i.map(u=>{const h=this.scroll.create(kc.blotName);return h.insertAt(0,u),h}),a=this.split(e);l.forEach(u=>{this.parent.insertBefore(u,a)}),o&&this.parent.insertBefore(this.scroll.create("text",o),a)}};gd.scope=Jn.BLOCK_BLOT;function M_(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.descendants(lu).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),dd(r,{},e)),new Kn).insert(`
|
|
292
|
-
`,dd(n))}function dd(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return n==null||("formats"in n&&typeof n.formats=="function"&&(e={...e,...n.formats()},t&&delete e["code-token"]),n.parent==null||n.parent.statics.blotName==="scroll"||n.parent.statics.scope!==n.statics.scope)?e:dd(n.parent,e,t)}const ad=class ad extends Bf{static value(){}constructor(e,t,r){super(e,t),this.selection=r,this.textNode=document.createTextNode(ad.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let r=this,i=0;for(;r!=null&&r.statics.scope!==Jn.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=ad.CONTENTS.length,r.optimize(),r.formatAt(i,ad.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof Dd?this.prev:null,r=t?t.length():0,i=this.next instanceof Dd?this.next:null,o=i?i.text:"",{textNode:l}=this,a=l.data.split(ad.CONTENTS).join("");l.data=ad.CONTENTS;let u;if(t)u=t,(a||i)&&(t.insertAt(t.length(),a+o),i&&i.remove());else if(i)u=i,i.insertAt(0,a);else{const h=document.createTextNode(a);u=this.scroll.create(h),this.parent.insertBefore(u,this)}if(this.remove(),e){const h=(w,_)=>t&&w===t.domNode?_:w===l?r+_-1:i&&w===i.domNode?r+a.length+_:null,y=h(e.start.node,e.start.offset),x=h(e.end.node,e.end.offset);if(y!==null&&x!==null)return{startNode:u.domNode,startOffset:y,endNode:u.domNode,endOffset:x}}return null}update(e,t){if(e.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(t.range=r)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=ad.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};Ae(ad,"blotName","cursor"),Ae(ad,"className","ql-cursor"),Ae(ad,"tagName","span"),Ae(ad,"CONTENTS","\uFEFF");let _1=ad;var mb={exports:{}},Gx;function oD(){return Gx||(Gx=1,(function(n){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function i(u,h,y){this.fn=u,this.context=h,this.once=y||!1}function o(u,h,y,x,w){if(typeof y!="function")throw new TypeError("The listener must be a function");var _=new i(y,x||u,w),S=t?t+h:h;return u._events[S]?u._events[S].fn?u._events[S]=[u._events[S],_]:u._events[S].push(_):(u._events[S]=_,u._eventsCount++),u}function l(u,h){--u._eventsCount===0?u._events=new r:delete u._events[h]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],y,x;if(this._eventsCount===0)return h;for(x in y=this._events)e.call(y,x)&&h.push(t?x.slice(1):x);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(y)):h},a.prototype.listeners=function(h){var y=t?t+h:h,x=this._events[y];if(!x)return[];if(x.fn)return[x.fn];for(var w=0,_=x.length,S=new Array(_);w<_;w++)S[w]=x[w].fn;return S},a.prototype.listenerCount=function(h){var y=t?t+h:h,x=this._events[y];return x?x.fn?1:x.length:0},a.prototype.emit=function(h,y,x,w,_,S){var R=t?t+h:h;if(!this._events[R])return!1;var I=this._events[R],O=arguments.length,P,Y;if(I.fn){switch(I.once&&this.removeListener(h,I.fn,void 0,!0),O){case 1:return I.fn.call(I.context),!0;case 2:return I.fn.call(I.context,y),!0;case 3:return I.fn.call(I.context,y,x),!0;case 4:return I.fn.call(I.context,y,x,w),!0;case 5:return I.fn.call(I.context,y,x,w,_),!0;case 6:return I.fn.call(I.context,y,x,w,_,S),!0}for(Y=1,P=new Array(O-1);Y<O;Y++)P[Y-1]=arguments[Y];I.fn.apply(I.context,P)}else{var z=I.length,W;for(Y=0;Y<z;Y++)switch(I[Y].once&&this.removeListener(h,I[Y].fn,void 0,!0),O){case 1:I[Y].fn.call(I[Y].context);break;case 2:I[Y].fn.call(I[Y].context,y);break;case 3:I[Y].fn.call(I[Y].context,y,x);break;case 4:I[Y].fn.call(I[Y].context,y,x,w);break;default:if(!P)for(W=1,P=new Array(O-1);W<O;W++)P[W-1]=arguments[W];I[Y].fn.apply(I[Y].context,P)}}return!0},a.prototype.on=function(h,y,x){return o(this,h,y,x,!1)},a.prototype.once=function(h,y,x){return o(this,h,y,x,!0)},a.prototype.removeListener=function(h,y,x,w){var _=t?t+h:h;if(!this._events[_])return this;if(!y)return l(this,_),this;var S=this._events[_];if(S.fn)S.fn===y&&(!w||S.once)&&(!x||S.context===x)&&l(this,_);else{for(var R=0,I=[],O=S.length;R<O;R++)(S[R].fn!==y||w&&!S[R].once||x&&S[R].context!==x)&&I.push(S[R]);I.length?this._events[_]=I.length===1?I[0]:I:l(this,_)}return this},a.prototype.removeAllListeners=function(h){var y;return h?(y=t?t+h:h,this._events[y]&&l(this,y)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})(mb)),mb.exports}var lD=oD();const sD=M1(lD),Vy=new WeakMap,Zy=["error","warn","log","info"];let Xy="warn";function L_(n){if(Xy&&Zy.indexOf(n)<=Zy.indexOf(Xy)){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];console[n](...t)}}function Mh(n){return Zy.reduce((e,t)=>(e[t]=L_.bind(console,t,n),e),{})}Mh.level=n=>{Xy=n};L_.level=Mh.level;const xb=Mh("quill:events"),aD=["selectionchange","mousedown","mouseup","click"];aD.forEach(n=>{document.addEventListener(n,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(i=>{const o=Vy.get(i);o&&o.emitter&&o.emitter.handleDOM(...t)})})});class zn extends sD{constructor(){super(),this.domListeners={},this.on("error",xb.error)}emit(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return xb.log.call(xb,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];(this.domListeners[e.type]||[]).forEach(o=>{let{node:l,handler:a}=o;(e.target===l||l.contains(e.target))&&a(e,...r)})}listenDOM(e,t,r){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:r})}}Ae(zn,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),Ae(zn,"sources",{API:"api",SILENT:"silent",USER:"user"});const wb=Mh("quill:selection");class Ng{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class cD{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Ng(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,zn.sources.USER),1)}),this.emitter.on(zn.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(zn.events.SCROLL_UPDATE,(i,o)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const l=o.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(l?zn.sources.SILENT:i)}catch{}})}),this.emitter.on(zn.events.SCROLL_OPTIMIZE,(r,i)=>{if(i.range){const{startNode:o,startOffset:l,endNode:a,endOffset:u}=i.range;this.setNativeRange(o,l,a,u),this.update(zn.sources.SILENT)}}),this.update(zn.sources.SILENT)}handleComposition(){this.emitter.on(zn.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(zn.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(zn.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(e,Jn.BLOCK))){if(r.start.node!==this.cursor.textNode){const i=this.scroll.find(r.start.node,!1);if(i==null)return;if(i instanceof lu){const o=i.split(r.start.offset);i.parent.insertBefore(this.cursor,o)}else i.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();e=Math.min(e,r-1),t=Math.min(e+t,r-1)-e;let i,[o,l]=this.scroll.leaf(e);if(o==null)return null;if(t>0&&l===o.length()){const[y]=this.scroll.leaf(e+1);if(y){const[x]=this.scroll.line(e),[w]=this.scroll.line(e+1);x===w&&(o=y,l=0)}}[i,l]=o.position(l,!0);const a=document.createRange();if(t>0)return a.setStart(i,l),[o,l]=this.scroll.leaf(e+t),o==null?null:([i,l]=o.position(l,!0),a.setEnd(i,l),a.getBoundingClientRect());let u="left",h;if(i instanceof Text){if(!i.data.length)return null;l<i.data.length?(a.setStart(i,l),a.setEnd(i,l+1)):(a.setStart(i,l-1),a.setEnd(i,l),u="right"),h=a.getBoundingClientRect()}else{if(!(o.domNode instanceof Element))return null;h=o.domNode.getBoundingClientRect(),l>0&&(u="right")}return{bottom:h.top+h.height,height:h.height,left:h[u],right:h[u],top:h.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const r=this.normalizeNative(t);return wb.info("getNativeRange",r),r}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Cb(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const r=t.map(l=>{const[a,u]=l,h=this.scroll.find(a,!0),y=h.offset(this.scroll);return u===0?y:h instanceof lu?y+h.index(a,u):y+h.length()}),i=Math.min(Math.max(...r),this.scroll.length()-1),o=Math.min(i,...r);return new Ng(o,i-o)}normalizeNative(e){if(!Cb(this.root,e.startContainer)||!e.collapsed&&!Cb(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(r=>{let{node:i,offset:o}=r;for(;!(i instanceof Text)&&i.childNodes.length>0;)if(i.childNodes.length>o)i=i.childNodes[o],o=0;else if(i.childNodes.length===o)i=i.lastChild,i instanceof Text?o=i.data.length:i.childNodes.length>0?o=i.childNodes.length:o=i.childNodes.length+1;else break;r.node=i,r.offset=o}),t}rangeToNative(e){const t=this.scroll.length(),r=(i,o)=>{i=Math.min(t-1,i);const[l,a]=this.scroll.leaf(i);return l?l.position(a,o):[null,-1]};return[...r(e.index,!1),...r(e.index+e.length,!0)]}setNativeRange(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(wb.info("setNativeRange",e,t,r,i),e!=null&&(this.root.parentNode==null||e.parentNode==null||r.parentNode==null))return;const l=document.getSelection();if(l!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||o||e!==a.startContainer||t!==a.startOffset||r!==a.endContainer||i!==a.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),r instanceof Element&&r.tagName==="BR"&&(i=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const u=document.createRange();u.setStart(e,t),u.setEnd(r,i),l.removeAllRanges(),l.addRange(u)}}else l.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zn.sources.API;if(typeof t=="string"&&(r=t,t=!1),wb.info("setRange",e),e!=null){const i=this.rangeToNative(e);this.setNativeRange(...i,t)}else this.setNativeRange(null);this.update(r)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zn.sources.USER;const t=this.lastRange,[r,i]=this.getRange();if(this.lastRange=r,this.lastNative=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!$h(t,this.lastRange)){if(!this.composing&&i!=null&&i.native.collapsed&&i.start.node!==this.cursor.textNode){const l=this.cursor.restore();l&&this.setNativeRange(l.startNode,l.startOffset,l.endNode,l.endOffset)}const o=[zn.events.SELECTION_CHANGE,h1(this.lastRange),h1(t),e];this.emitter.emit(zn.events.EDITOR_CHANGE,...o),e!==zn.sources.SILENT&&this.emitter.emit(...o)}}}function Cb(n,e){try{e.parentNode}catch{return!1}return n.contains(e)}const uD=/^[ -~]*$/;class fD{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const r=Yx(e),i=new Kn;return hD(r.ops.slice()).reduce((l,a)=>{const u=pd.Op.length(a);let h=a.attributes||{},y=!1,x=!1;if(a.insert!=null){if(i.retain(u),typeof a.insert=="string"){const S=a.insert;x=!S.endsWith(`
|
|
292
|
+
`,dd(n))}function dd(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return n==null||("formats"in n&&typeof n.formats=="function"&&(e={...e,...n.formats()},t&&delete e["code-token"]),n.parent==null||n.parent.statics.blotName==="scroll"||n.parent.statics.scope!==n.statics.scope)?e:dd(n.parent,e,t)}const ad=class ad extends Bf{static value(){}constructor(e,t,r){super(e,t),this.selection=r,this.textNode=document.createTextNode(ad.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let r=this,i=0;for(;r!=null&&r.statics.scope!==Jn.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=ad.CONTENTS.length,r.optimize(),r.formatAt(i,ad.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof Dd?this.prev:null,r=t?t.length():0,i=this.next instanceof Dd?this.next:null,o=i?i.text:"",{textNode:l}=this,a=l.data.split(ad.CONTENTS).join("");l.data=ad.CONTENTS;let u;if(t)u=t,(a||i)&&(t.insertAt(t.length(),a+o),i&&i.remove());else if(i)u=i,i.insertAt(0,a);else{const h=document.createTextNode(a);u=this.scroll.create(h),this.parent.insertBefore(u,this)}if(this.remove(),e){const h=(w,_)=>t&&w===t.domNode?_:w===l?r+_-1:i&&w===i.domNode?r+a.length+_:null,y=h(e.start.node,e.start.offset),x=h(e.end.node,e.end.offset);if(y!==null&&x!==null)return{startNode:u.domNode,startOffset:y,endNode:u.domNode,endOffset:x}}return null}update(e,t){if(e.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(t.range=r)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=ad.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};Ae(ad,"blotName","cursor"),Ae(ad,"className","ql-cursor"),Ae(ad,"tagName","span"),Ae(ad,"CONTENTS","\uFEFF");let _1=ad;var mb={exports:{}},Gx;function cD(){return Gx||(Gx=1,(function(n){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function i(u,h,y){this.fn=u,this.context=h,this.once=y||!1}function o(u,h,y,x,w){if(typeof y!="function")throw new TypeError("The listener must be a function");var _=new i(y,x||u,w),S=t?t+h:h;return u._events[S]?u._events[S].fn?u._events[S]=[u._events[S],_]:u._events[S].push(_):(u._events[S]=_,u._eventsCount++),u}function l(u,h){--u._eventsCount===0?u._events=new r:delete u._events[h]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],y,x;if(this._eventsCount===0)return h;for(x in y=this._events)e.call(y,x)&&h.push(t?x.slice(1):x);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(y)):h},a.prototype.listeners=function(h){var y=t?t+h:h,x=this._events[y];if(!x)return[];if(x.fn)return[x.fn];for(var w=0,_=x.length,S=new Array(_);w<_;w++)S[w]=x[w].fn;return S},a.prototype.listenerCount=function(h){var y=t?t+h:h,x=this._events[y];return x?x.fn?1:x.length:0},a.prototype.emit=function(h,y,x,w,_,S){var R=t?t+h:h;if(!this._events[R])return!1;var I=this._events[R],O=arguments.length,P,Y;if(I.fn){switch(I.once&&this.removeListener(h,I.fn,void 0,!0),O){case 1:return I.fn.call(I.context),!0;case 2:return I.fn.call(I.context,y),!0;case 3:return I.fn.call(I.context,y,x),!0;case 4:return I.fn.call(I.context,y,x,w),!0;case 5:return I.fn.call(I.context,y,x,w,_),!0;case 6:return I.fn.call(I.context,y,x,w,_,S),!0}for(Y=1,P=new Array(O-1);Y<O;Y++)P[Y-1]=arguments[Y];I.fn.apply(I.context,P)}else{var z=I.length,W;for(Y=0;Y<z;Y++)switch(I[Y].once&&this.removeListener(h,I[Y].fn,void 0,!0),O){case 1:I[Y].fn.call(I[Y].context);break;case 2:I[Y].fn.call(I[Y].context,y);break;case 3:I[Y].fn.call(I[Y].context,y,x);break;case 4:I[Y].fn.call(I[Y].context,y,x,w);break;default:if(!P)for(W=1,P=new Array(O-1);W<O;W++)P[W-1]=arguments[W];I[Y].fn.apply(I[Y].context,P)}}return!0},a.prototype.on=function(h,y,x){return o(this,h,y,x,!1)},a.prototype.once=function(h,y,x){return o(this,h,y,x,!0)},a.prototype.removeListener=function(h,y,x,w){var _=t?t+h:h;if(!this._events[_])return this;if(!y)return l(this,_),this;var S=this._events[_];if(S.fn)S.fn===y&&(!w||S.once)&&(!x||S.context===x)&&l(this,_);else{for(var R=0,I=[],O=S.length;R<O;R++)(S[R].fn!==y||w&&!S[R].once||x&&S[R].context!==x)&&I.push(S[R]);I.length?this._events[_]=I.length===1?I[0]:I:l(this,_)}return this},a.prototype.removeAllListeners=function(h){var y;return h?(y=t?t+h:h,this._events[y]&&l(this,y)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})(mb)),mb.exports}var uD=cD();const fD=M1(uD),Vy=new WeakMap,Zy=["error","warn","log","info"];let Xy="warn";function L_(n){if(Xy&&Zy.indexOf(n)<=Zy.indexOf(Xy)){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];console[n](...t)}}function Mh(n){return Zy.reduce((e,t)=>(e[t]=L_.bind(console,t,n),e),{})}Mh.level=n=>{Xy=n};L_.level=Mh.level;const xb=Mh("quill:events"),dD=["selectionchange","mousedown","mouseup","click"];dD.forEach(n=>{document.addEventListener(n,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(i=>{const o=Vy.get(i);o&&o.emitter&&o.emitter.handleDOM(...t)})})});class zn extends fD{constructor(){super(),this.domListeners={},this.on("error",xb.error)}emit(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return xb.log.call(xb,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];(this.domListeners[e.type]||[]).forEach(o=>{let{node:l,handler:a}=o;(e.target===l||l.contains(e.target))&&a(e,...r)})}listenDOM(e,t,r){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:r})}}Ae(zn,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),Ae(zn,"sources",{API:"api",SILENT:"silent",USER:"user"});const wb=Mh("quill:selection");class Ng{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class hD{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Ng(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,zn.sources.USER),1)}),this.emitter.on(zn.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(zn.events.SCROLL_UPDATE,(i,o)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const l=o.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(l?zn.sources.SILENT:i)}catch{}})}),this.emitter.on(zn.events.SCROLL_OPTIMIZE,(r,i)=>{if(i.range){const{startNode:o,startOffset:l,endNode:a,endOffset:u}=i.range;this.setNativeRange(o,l,a,u),this.update(zn.sources.SILENT)}}),this.update(zn.sources.SILENT)}handleComposition(){this.emitter.on(zn.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(zn.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(zn.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(e,Jn.BLOCK))){if(r.start.node!==this.cursor.textNode){const i=this.scroll.find(r.start.node,!1);if(i==null)return;if(i instanceof lu){const o=i.split(r.start.offset);i.parent.insertBefore(this.cursor,o)}else i.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();e=Math.min(e,r-1),t=Math.min(e+t,r-1)-e;let i,[o,l]=this.scroll.leaf(e);if(o==null)return null;if(t>0&&l===o.length()){const[y]=this.scroll.leaf(e+1);if(y){const[x]=this.scroll.line(e),[w]=this.scroll.line(e+1);x===w&&(o=y,l=0)}}[i,l]=o.position(l,!0);const a=document.createRange();if(t>0)return a.setStart(i,l),[o,l]=this.scroll.leaf(e+t),o==null?null:([i,l]=o.position(l,!0),a.setEnd(i,l),a.getBoundingClientRect());let u="left",h;if(i instanceof Text){if(!i.data.length)return null;l<i.data.length?(a.setStart(i,l),a.setEnd(i,l+1)):(a.setStart(i,l-1),a.setEnd(i,l),u="right"),h=a.getBoundingClientRect()}else{if(!(o.domNode instanceof Element))return null;h=o.domNode.getBoundingClientRect(),l>0&&(u="right")}return{bottom:h.top+h.height,height:h.height,left:h[u],right:h[u],top:h.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const r=this.normalizeNative(t);return wb.info("getNativeRange",r),r}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Cb(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const r=t.map(l=>{const[a,u]=l,h=this.scroll.find(a,!0),y=h.offset(this.scroll);return u===0?y:h instanceof lu?y+h.index(a,u):y+h.length()}),i=Math.min(Math.max(...r),this.scroll.length()-1),o=Math.min(i,...r);return new Ng(o,i-o)}normalizeNative(e){if(!Cb(this.root,e.startContainer)||!e.collapsed&&!Cb(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(r=>{let{node:i,offset:o}=r;for(;!(i instanceof Text)&&i.childNodes.length>0;)if(i.childNodes.length>o)i=i.childNodes[o],o=0;else if(i.childNodes.length===o)i=i.lastChild,i instanceof Text?o=i.data.length:i.childNodes.length>0?o=i.childNodes.length:o=i.childNodes.length+1;else break;r.node=i,r.offset=o}),t}rangeToNative(e){const t=this.scroll.length(),r=(i,o)=>{i=Math.min(t-1,i);const[l,a]=this.scroll.leaf(i);return l?l.position(a,o):[null,-1]};return[...r(e.index,!1),...r(e.index+e.length,!0)]}setNativeRange(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(wb.info("setNativeRange",e,t,r,i),e!=null&&(this.root.parentNode==null||e.parentNode==null||r.parentNode==null))return;const l=document.getSelection();if(l!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||o||e!==a.startContainer||t!==a.startOffset||r!==a.endContainer||i!==a.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),r instanceof Element&&r.tagName==="BR"&&(i=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const u=document.createRange();u.setStart(e,t),u.setEnd(r,i),l.removeAllRanges(),l.addRange(u)}}else l.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zn.sources.API;if(typeof t=="string"&&(r=t,t=!1),wb.info("setRange",e),e!=null){const i=this.rangeToNative(e);this.setNativeRange(...i,t)}else this.setNativeRange(null);this.update(r)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zn.sources.USER;const t=this.lastRange,[r,i]=this.getRange();if(this.lastRange=r,this.lastNative=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!$h(t,this.lastRange)){if(!this.composing&&i!=null&&i.native.collapsed&&i.start.node!==this.cursor.textNode){const l=this.cursor.restore();l&&this.setNativeRange(l.startNode,l.startOffset,l.endNode,l.endOffset)}const o=[zn.events.SELECTION_CHANGE,h1(this.lastRange),h1(t),e];this.emitter.emit(zn.events.EDITOR_CHANGE,...o),e!==zn.sources.SILENT&&this.emitter.emit(...o)}}}function Cb(n,e){try{e.parentNode}catch{return!1}return n.contains(e)}const gD=/^[ -~]*$/;class pD{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const r=Yx(e),i=new Kn;return bD(r.ops.slice()).reduce((l,a)=>{const u=pd.Op.length(a);let h=a.attributes||{},y=!1,x=!1;if(a.insert!=null){if(i.retain(u),typeof a.insert=="string"){const S=a.insert;x=!S.endsWith(`
|
|
293
293
|
`)&&(t<=l||!!this.scroll.descendant(gd,l)[0]),this.scroll.insertAt(l,S);const[R,I]=this.scroll.line(l);let O=og({},dd(R));if(R instanceof kc){const[P]=R.descendant(lu,I);P&&(O=og(O,dd(P)))}h=pd.AttributeMap.diff(O,h)||{}}else if(typeof a.insert=="object"){const S=Object.keys(a.insert)[0];if(S==null)return l;const R=this.scroll.query(S,Jn.INLINE)!=null;if(R)(t<=l||this.scroll.descendant(gd,l)[0])&&(x=!0);else if(l>0){const[I,O]=this.scroll.descendant(lu,l-1);I instanceof Dd?I.value()[O]!==`
|
|
294
|
-
`&&(y=!0):I instanceof Bf&&I.statics.scope===Jn.INLINE_BLOT&&(y=!0)}if(this.scroll.insertAt(l,S,a.insert[S]),R){const[I]=this.scroll.descendant(lu,l);if(I){const O=og({},dd(I));h=pd.AttributeMap.diff(O,h)||{}}}}t+=u}else if(i.push(a),a.retain!==null&&typeof a.retain=="object"){const S=Object.keys(a.retain)[0];if(S==null)return l;this.scroll.updateEmbedAt(l,S,a.retain[S])}Object.keys(h).forEach(S=>{this.scroll.formatAt(l,u,S,h[S])});const w=y?1:0,_=x?1:0;return t+=w+_,i.retain(w),i.delete(_),l+u+w+_},0),i.reduce((l,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(l,a.delete),l):l+pd.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new Kn().retain(e).delete(t))}formatLine(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(o=>{this.scroll.lines(e,Math.max(t,1)).forEach(l=>{l.format(o,r[o])})}),this.scroll.optimize();const i=new Kn().retain(e).retain(t,h1(r));return this.update(i)}formatText(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(o=>{this.scroll.formatAt(e,t,o,r[o])});const i=new Kn().retain(e).retain(t,h1(r));return this.update(i)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new Kn)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],i=[];t===0?this.scroll.path(e).forEach(a=>{const[u]=a;u instanceof kc?r.push(u):u instanceof lu&&i.push(u)}):(r=this.scroll.lines(e,t),i=this.scroll.descendants(lu,e,t));const[o,l]=[r,i].map(a=>{const u=a.shift();if(u==null)return{};let h=dd(u);for(;Object.keys(h).length>0;){const y=a.shift();if(y==null)return h;h=
|
|
294
|
+
`&&(y=!0):I instanceof Bf&&I.statics.scope===Jn.INLINE_BLOT&&(y=!0)}if(this.scroll.insertAt(l,S,a.insert[S]),R){const[I]=this.scroll.descendant(lu,l);if(I){const O=og({},dd(I));h=pd.AttributeMap.diff(O,h)||{}}}}t+=u}else if(i.push(a),a.retain!==null&&typeof a.retain=="object"){const S=Object.keys(a.retain)[0];if(S==null)return l;this.scroll.updateEmbedAt(l,S,a.retain[S])}Object.keys(h).forEach(S=>{this.scroll.formatAt(l,u,S,h[S])});const w=y?1:0,_=x?1:0;return t+=w+_,i.retain(w),i.delete(_),l+u+w+_},0),i.reduce((l,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(l,a.delete),l):l+pd.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new Kn().retain(e).delete(t))}formatLine(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(o=>{this.scroll.lines(e,Math.max(t,1)).forEach(l=>{l.format(o,r[o])})}),this.scroll.optimize();const i=new Kn().retain(e).retain(t,h1(r));return this.update(i)}formatText(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(o=>{this.scroll.formatAt(e,t,o,r[o])});const i=new Kn().retain(e).retain(t,h1(r));return this.update(i)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new Kn)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],i=[];t===0?this.scroll.path(e).forEach(a=>{const[u]=a;u instanceof kc?r.push(u):u instanceof lu&&i.push(u)}):(r=this.scroll.lines(e,t),i=this.scroll.descendants(lu,e,t));const[o,l]=[r,i].map(a=>{const u=a.shift();if(u==null)return{};let h=dd(u);for(;Object.keys(h).length>0;){const y=a.shift();if(y==null)return h;h=vD(dd(y),h)}return h});return{...o,...l}}getHTML(e,t){const[r,i]=this.scroll.line(e);if(r){const o=r.length();return r.length()>=i+t&&!(i===0&&t===o)?Mp(r,i,t,!0):Mp(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(e,t){const r=Yx(t),i=new Kn().retain(e).concat(r);return this.scroll.insertContents(e,r),this.update(i)}insertEmbed(e,t,r){return this.scroll.insertAt(e,t,r),this.update(new Kn().retain(e).insert({[t]:r}))}insertText(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
|
|
295
295
|
`).replace(/\r/g,`
|
|
296
296
|
`),this.scroll.insertAt(e,t),Object.keys(r).forEach(i=>{this.scroll.formatAt(e,t.length,i,r[i])}),this.update(new Kn().retain(e).insert(t,h1(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if((e==null?void 0:e.statics.blotName)!==kc.blotName)return!1;const t=e;return t.children.length>1?!1:t.children.head instanceof Hd}removeFormat(e,t){const r=this.getText(e,t),[i,o]=this.scroll.line(e+t);let l=0,a=new Kn;i!=null&&(l=i.length()-o,a=i.delta().slice(o,o+l-1).insert(`
|
|
297
|
-
`));const h=this.getContents(e,t+l).diff(new Kn().insert(r).concat(a)),y=new Kn().retain(e).concat(h);return this.applyDelta(y)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const i=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(
|
|
297
|
+
`));const h=this.getContents(e,t+l).diff(new Kn().insert(r).concat(a)),y=new Kn().retain(e).concat(h);return this.applyDelta(y)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const i=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(gD)&&this.scroll.find(t[0].target)){const o=this.scroll.find(t[0].target),l=dd(o),a=o.offset(this.scroll),u=t[0].oldValue.replace(_1.CONTENTS,""),h=new Kn().insert(u),y=new Kn().insert(o.value()),x=r&&{oldRange:Vx(r.oldRange,-a),newRange:Vx(r.newRange,-a)};e=new Kn().retain(a).concat(h.diff(y,x)).reduce((_,S)=>S.insert?_.insert(S.insert,l):_.push(S),new Kn),this.delta=i.compose(e)}else this.delta=this.getDelta(),(!e||!$h(i.compose(e),this.delta))&&(e=i.diff(this.delta,r));return e}}function o1(n,e,t){if(n.length===0){const[_]=_b(t.pop());return e<=0?`</li></${_}>`:`</li></${_}>${o1([],e-1,t)}`}const[{child:r,offset:i,length:o,indent:l,type:a},...u]=n,[h,y]=_b(a);if(l>e)return t.push(a),l===e+1?`<${h}><li${y}>${Mp(r,i,o)}${o1(u,l,t)}`:`<${h}><li>${o1(n,e+1,t)}`;const x=t[t.length-1];if(l===e&&a===x)return`</li><li${y}>${Mp(r,i,o)}${o1(u,l,t)}`;const[w]=_b(t.pop());return`</li></${w}>${o1(n,e-1,t)}`}function Mp(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in n&&typeof n.html=="function")return n.html(e,t);if(n instanceof Dd)return Mv(n.value().slice(e,e+t)).replaceAll(" "," ");if(n instanceof Od){if(n.statics.blotName==="list-container"){const h=[];return n.children.forEachAt(e,t,(y,x,w)=>{const _="formats"in y&&typeof y.formats=="function"?y.formats():{};h.push({child:y,offset:x,length:w,indent:_.indent||0,type:_.list})}),o1(h,-1,[])}const i=[];if(n.children.forEachAt(e,t,(h,y,x)=>{i.push(Mp(h,y,x))}),r||n.statics.blotName==="list")return i.join("");const{outerHTML:o,innerHTML:l}=n.domNode,[a,u]=o.split(`>${l}<`);return a==="<table"?`<table style="border: 1px solid #000;">${i.join("")}<${u}`:`${a}>${i.join("")}<${u}`}return n.domNode instanceof Element?n.domNode.outerHTML:""}function vD(n,e){return Object.keys(e).reduce((t,r)=>{if(n[r]==null)return t;const i=e[r];return i===n[r]?t[r]=i:Array.isArray(i)?i.indexOf(n[r])<0?t[r]=i.concat([n[r]]):t[r]=i:t[r]=[i,n[r]],t},{})}function _b(n){const e=n==="ordered"?"ol":"ul";switch(n){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function Yx(n){return n.reduce((e,t)=>{if(typeof t.insert=="string"){const r=t.insert.replace(/\r\n/g,`
|
|
298
298
|
`).replace(/\r/g,`
|
|
299
|
-
`);return e.insert(r,t.attributes)}return e.push(t)},new Kn)}function Vx(n,e){let{index:t,length:r}=n;return new Ng(t+e,r)}function
|
|
299
|
+
`);return e.insert(r,t.attributes)}return e.push(t)},new Kn)}function Vx(n,e){let{index:t,length:r}=n;return new Ng(t+e,r)}function bD(n){const e=[];return n.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
|
|
300
300
|
`).forEach((i,o)=>{o&&e.push({insert:`
|
|
301
|
-
`,attributes:t.attributes}),i&&e.push({insert:i,attributes:t.attributes})}):e.push(t)}),e}class Wd{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}Ae(Wd,"DEFAULTS",{});const _0="\uFEFF";class Dm extends Bf{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(_0),this.rightGuard=document.createTextNode(_0),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,r;const i=e.data.split(_0).join("");if(e===this.leftGuard)if(this.prev instanceof Dd){const o=this.prev.length();this.prev.insertAt(o,i),t={startNode:this.prev.domNode,startOffset:o+i.length}}else r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:i.length};else e===this.rightGuard&&(this.next instanceof Dd?(this.next.insertAt(0,i),t={startNode:this.next.domNode,startOffset:i.length}):(r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:i.length}));return e.data=_0,t}update(e,t){e.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const i=this.restore(r.target);i&&(t.range=i)}})}}class
|
|
302
|
-
`});this.setContents(l)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const r=e;e=document.createElement("div"),e.classList.add(r)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,r){return[e,t,,r]=wh(e,t,r),Ad.call(this,()=>this.editor.deleteText(e,t),r,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zn.sources.API;return Ad.call(this,()=>{const i=this.getSelection(!0);let o=new Kn;if(i==null)return o;if(this.scroll.query(e,Jn.BLOCK))o=this.editor.formatLine(i.index,i.length,{[e]:t});else{if(i.length===0)return this.selection.format(e,t),o;o=this.editor.formatText(i.index,i.length,{[e]:t})}return this.setSelection(i,zn.sources.SILENT),o},r)}formatLine(e,t,r,i,o){let l;return[e,t,l,o]=wh(e,t,r,i,o),Ad.call(this,()=>this.editor.formatLine(e,t,l),o,e,0)}formatText(e,t,r,i,o){let l;return[e,t,l,o]=wh(e,t,r,i,o),Ad.call(this,()=>this.editor.formatText(e,t,l),o,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof e=="number"?r=this.selection.getBounds(e,t):r=this.selection.getBounds(e.index,e.length),!r)return null;const i=this.container.getBoundingClientRect();return{bottom:r.bottom-i.top,height:r.height,left:r.left-i.left,right:r.right-i.left,top:r.top-i.top,width:r.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=wh(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=wh(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=wh(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Id.sources.API;return Ad.call(this,()=>this.editor.insertEmbed(e,t,r),i,e)}insertText(e,t,r,i,o){let l;return[e,,l,o]=wh(e,0,r,i,o),Ad.call(this,()=>this.editor.insertText(e,t,l),o,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,r){return[e,t,,r]=wh(e,t,r),Ad.call(this,()=>this.editor.removeFormat(e,t),r,e)}scrollRectIntoView(e){
|
|
301
|
+
`,attributes:t.attributes}),i&&e.push({insert:i,attributes:t.attributes})}):e.push(t)}),e}class Wd{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}Ae(Wd,"DEFAULTS",{});const _0="\uFEFF";class Dm extends Bf{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(_0),this.rightGuard=document.createTextNode(_0),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,r;const i=e.data.split(_0).join("");if(e===this.leftGuard)if(this.prev instanceof Dd){const o=this.prev.length();this.prev.insertAt(o,i),t={startNode:this.prev.domNode,startOffset:o+i.length}}else r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:i.length};else e===this.rightGuard&&(this.next instanceof Dd?(this.next.insertAt(0,i),t={startNode:this.next.domNode,startOffset:i.length}):(r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:i.length}));return e.data=_0,t}update(e,t){e.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const i=this.restore(r.target);i&&(t.range=i)}})}}class yD{constructor(e,t){Ae(this,"isComposing",!1);this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof Dm)&&(this.emitter.emit(zn.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(zn.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(zn.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(zn.events.COMPOSITION_END,e),this.isComposing=!1}}const Cp=class Cp{constructor(e,t){Ae(this,"modules",{});this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}};Ae(Cp,"DEFAULTS",{modules:{}}),Ae(Cp,"themes",{default:Cp});let S1=Cp;const mD=n=>n.parentElement||n.getRootNode().host||null,xD=n=>{const e=n.getBoundingClientRect(),t="offsetWidth"in n&&Math.abs(e.width)/n.offsetWidth||1,r="offsetHeight"in n&&Math.abs(e.height)/n.offsetHeight||1;return{top:e.top,right:e.left+n.clientWidth*t,bottom:e.top+n.clientHeight*r,left:e.left}},S0=n=>{const e=parseInt(n,10);return Number.isNaN(e)?0:e},Zx=(n,e,t,r,i,o)=>n<t&&e>r?0:n<t?-(t-n+i):e>r?e-n>r-t?n+i-t:e-r+o:0,wD=(n,e)=>{var o,l,a;const t=n.ownerDocument;let r=e,i=n;for(;i;){const u=i===t.body,h=u?{top:0,right:((o=window.visualViewport)==null?void 0:o.width)??t.documentElement.clientWidth,bottom:((l=window.visualViewport)==null?void 0:l.height)??t.documentElement.clientHeight,left:0}:xD(i),y=getComputedStyle(i),x=Zx(r.left,r.right,h.left,h.right,S0(y.scrollPaddingLeft),S0(y.scrollPaddingRight)),w=Zx(r.top,r.bottom,h.top,h.bottom,S0(y.scrollPaddingTop),S0(y.scrollPaddingBottom));if(x||w)if(u)(a=t.defaultView)==null||a.scrollBy(x,w);else{const{scrollLeft:_,scrollTop:S}=i;w&&(i.scrollTop+=w),x&&(i.scrollLeft+=x);const R=i.scrollLeft-_,I=i.scrollTop-S;r={left:r.left-R,top:r.top-I,right:r.right-R,bottom:r.bottom-I}}i=u||y.position==="fixed"?null:mD(i)}},CD=100,_D=["block","break","cursor","inline","scroll","text"],SD=(n,e,t)=>{const r=new C1;return _D.forEach(i=>{const o=e.query(i);o&&r.register(o)}),n.forEach(i=>{let o=e.query(i);o||t.error(`Cannot register "${i}" specified in "formats" config. Are you sure it was registered?`);let l=0;for(;o;)if(r.register(o),o="blotName"in o?o.requiredContainer??null:null,l+=1,l>CD){t.error(`Cycle detected in registering blot requiredContainer: "${i}"`);break}}),r},p1=Mh("quill"),E0=new C1;Od.uiClass="ql-ui";const Id=class Id{static debug(e){e===!0&&(e="log"),Mh.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Vy.get(e)||E0.find(e,t)}static import(e){return this.imports[e]==null&&p1.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in e?e.attrName:e.blotName;typeof r=="string"?this.register(`formats/${r}`,e,t):Object.keys(e).forEach(i=>{this.register(i,e[i],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!r&&p1.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&E0.register(t),typeof t.register=="function"&&t.register(E0)}}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=ED(e,t),this.container=this.options.container,this.container==null){p1.error("Invalid Quill container",e);return}this.options.debug&&Id.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Vy.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new zn;const i=Pm.blotName,o=this.options.registry.query(i);if(!o||!("blotName"in o))throw new Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new o(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new pD(this.scroll),this.selection=new hD(this.scroll,this.emitter),this.composition=new yD(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(zn.events.EDITOR_CHANGE,l=>{l===zn.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(zn.events.SCROLL_UPDATE,(l,a)=>{const u=this.selection.lastRange,[h]=this.selection.getRange(),y=u&&h?{oldRange:u,newRange:h}:void 0;Ad.call(this,()=>this.editor.update(null,a,y),l)}),this.emitter.on(zn.events.SCROLL_EMBED_UPDATE,(l,a)=>{const u=this.selection.lastRange,[h]=this.selection.getRange(),y=u&&h?{oldRange:u,newRange:h}:void 0;Ad.call(this,()=>{const x=new Kn().retain(l.offset(this)).retain({[l.statics.blotName]:a});return this.editor.update(x,[],y)},Id.sources.USER)}),r){const l=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
|
|
302
|
+
`});this.setContents(l)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const r=e;e=document.createElement("div"),e.classList.add(r)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,r){return[e,t,,r]=wh(e,t,r),Ad.call(this,()=>this.editor.deleteText(e,t),r,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zn.sources.API;return Ad.call(this,()=>{const i=this.getSelection(!0);let o=new Kn;if(i==null)return o;if(this.scroll.query(e,Jn.BLOCK))o=this.editor.formatLine(i.index,i.length,{[e]:t});else{if(i.length===0)return this.selection.format(e,t),o;o=this.editor.formatText(i.index,i.length,{[e]:t})}return this.setSelection(i,zn.sources.SILENT),o},r)}formatLine(e,t,r,i,o){let l;return[e,t,l,o]=wh(e,t,r,i,o),Ad.call(this,()=>this.editor.formatLine(e,t,l),o,e,0)}formatText(e,t,r,i,o){let l;return[e,t,l,o]=wh(e,t,r,i,o),Ad.call(this,()=>this.editor.formatText(e,t,l),o,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof e=="number"?r=this.selection.getBounds(e,t):r=this.selection.getBounds(e.index,e.length),!r)return null;const i=this.container.getBoundingClientRect();return{bottom:r.bottom-i.top,height:r.height,left:r.left-i.left,right:r.right-i.left,top:r.top-i.top,width:r.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=wh(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=wh(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=wh(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Id.sources.API;return Ad.call(this,()=>this.editor.insertEmbed(e,t,r),i,e)}insertText(e,t,r,i,o){let l;return[e,,l,o]=wh(e,0,r,i,o),Ad.call(this,()=>this.editor.insertText(e,t,l),o,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,r){return[e,t,,r]=wh(e,t,r),Ad.call(this,()=>this.editor.removeFormat(e,t),r,e)}scrollRectIntoView(e){wD(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zn.sources.API;return Ad.call(this,()=>{e=new Kn(e);const r=this.getLength(),i=this.editor.deleteText(0,r),o=this.editor.insertContents(0,e),l=this.editor.deleteText(this.getLength()-1,1);return i.compose(o).compose(l)},t)}setSelection(e,t,r){e==null?this.selection.setRange(null,t||Id.sources.API):([e,t,,r]=wh(e,t,r),this.selection.setRange(new Ng(Math.max(0,e),t),r),r!==zn.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zn.sources.API;const r=new Kn().insert(e);return this.setContents(r,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zn.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zn.sources.API;return Ad.call(this,()=>(e=new Kn(e),this.editor.applyDelta(e)),t,!0)}};Ae(Id,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:E0,theme:"default"}),Ae(Id,"events",zn.events),Ae(Id,"sources",zn.sources),Ae(Id,"version","2.0.3"),Ae(Id,"imports",{delta:Kn,parchment:sD,"core/module":Wd,"core/theme":S1});let qe=Id;function Xx(n){return typeof n=="string"?document.querySelector(n):n}function Sb(n){return Object.entries(n??{}).reduce((e,t)=>{let[r,i]=t;return{...e,[r]:i===!0?{}:i}},{})}function Kx(n){return Object.fromEntries(Object.entries(n).filter(e=>e[1]!==void 0))}function ED(n,e){const t=Xx(n);if(!t)throw new Error("Invalid Quill container");const i=!e.theme||e.theme===qe.DEFAULTS.theme?S1:qe.import(`themes/${e.theme}`);if(!i)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:o,...l}=qe.DEFAULTS,{modules:a,...u}=i.DEFAULTS;let h=Sb(e.modules);h!=null&&h.toolbar&&h.toolbar.constructor!==Object&&(h={...h,toolbar:{container:h.toolbar}});const y=og({},Sb(o),Sb(a),h),x={...l,...Kx(u),...Kx(e)};let w=e.registry;return w?e.formats&&p1.warn('Ignoring "formats" option because "registry" is specified'):w=e.formats?SD(e.formats,x.registry,p1):x.registry,{...x,registry:w,container:t,theme:i,modules:Object.entries(y).reduce((_,S)=>{let[R,I]=S;if(!I)return _;const O=qe.import(`modules/${R}`);return O==null?(p1.error(`Cannot load ${R} module. Are you sure you registered it?`),_):{..._,[R]:og({},O.DEFAULTS||{},I)}},{}),bounds:Xx(x.bounds)}}function Ad(n,e,t,r){if(!this.isEnabled()&&e===zn.sources.USER&&!this.allowReadOnlyEdits)return new Kn;let i=t==null?null:this.getSelection();const o=this.editor.delta,l=n();if(i!=null&&(t===!0&&(t=i.index),r==null?i=Jx(i,l,e):r!==0&&(i=Jx(i,t,r,e)),this.setSelection(i,zn.sources.SILENT)),l.length()>0){const a=[zn.events.TEXT_CHANGE,l,o,e];this.emitter.emit(zn.events.EDITOR_CHANGE,...a),e!==zn.sources.SILENT&&this.emitter.emit(...a)}return l}function wh(n,e,t,r,i){let o={};return typeof n.index=="number"&&typeof n.length=="number"?typeof e!="number"?(i=r,r=t,t=e,e=n.length,n=n.index):(e=n.length,n=n.index):typeof e!="number"&&(i=r,r=t,t=e,e=0),typeof t=="object"?(o=t,i=r):typeof t=="string"&&(r!=null?o[t]=r:i=t),i=i||zn.sources.API,[n,e,o,i]}function Jx(n,e,t,r){const i=typeof t=="number"?t:0;if(n==null)return null;let o,l;return e&&typeof e.transformPosition=="function"?[o,l]=[n.index,n.index+n.length].map(a=>e.transformPosition(a,r!==zn.sources.USER)):[o,l]=[n.index,n.index+n.length].map(a=>a<e||a===e&&r===zn.sources.USER?a:i>=0?a+i:Math.max(e,a+i)),new Ng(o,l-o)}class Gg extends kv{}function Qx(n){return n instanceof kc||n instanceof gd}function qx(n){return typeof n.updateContent=="function"}class l1 extends Pm{constructor(e,t,r){let{emitter:i}=r;super(e,t),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",o=>this.handleDragStart(o))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(zn.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(zn.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(zn.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[r,i]=this.line(e),[o]=this.line(e+t);if(super.deleteAt(e,t),o!=null&&r!==o&&i>0){if(r instanceof gd||o instanceof gd){this.optimize();return}const l=o.children.head instanceof Hd?null:o.children.head;r.moveChildren(o,l),r.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,r,i){super.formatAt(e,t,r,i),this.optimize()}insertAt(e,t,r){if(e>=this.length())if(r==null||this.scroll.query(t,Jn.BLOCK)==null){const i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),r==null&&t.endsWith(`
|
|
303
303
|
`)?i.insertAt(0,t.slice(0,-1),r):i.insertAt(0,t,r)}else{const i=this.scroll.create(t,r);this.appendChild(i)}else super.insertAt(e,t,r);this.optimize()}insertBefore(e,t){if(e.statics.scope===Jn.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(e),super.insertBefore(r,t)}else super.insertBefore(e,t)}insertContents(e,t){const r=this.deltaToRenderBlocks(t.concat(new Kn().insert(`
|
|
304
304
|
`))),i=r.pop();if(i==null)return;this.batchStart();const o=r.shift();if(o){const u=o.type==="block"&&(o.delta.length()===0||!this.descendant(gd,e)[0]&&e<this.length()),h=o.type==="block"?o.delta:new Kn().insert({[o.key]:o.value});Eb(this,e,h);const y=o.type==="block"?1:0,x=e+h.length()+y;u&&this.insertAt(x-1,`
|
|
305
305
|
`);const w=dd(this.line(e)[0]),_=pd.AttributeMap.diff(w,o.attributes)||{};Object.keys(_).forEach(S=>{this.formatAt(x-1,1,S,_[S])}),e=x}let[l,a]=this.children.find(e);if(r.length&&(l&&(l=l.split(a),a=0),r.forEach(u=>{if(u.type==="block"){const h=this.createBlock(u.attributes,l||void 0);Eb(h,0,u.delta)}else{const h=this.create(u.key,u.value);this.insertBefore(h,l||void 0),Object.keys(u.attributes).forEach(y=>{h.format(y,u.attributes[y])})}})),i.type==="block"&&i.delta.length()){const u=l?l.offset(l.scroll)+a:this.length();Eb(this,u,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[r,i]=t;return r instanceof lu?[r,i]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(Qx,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(i,o,l)=>{let a=[],u=l;return i.children.forEachAt(o,l,(h,y,x)=>{Qx(h)?a.push(h):h instanceof kv&&(a=a.concat(r(h,y,u))),u-=x}),a};return r(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(zn.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=zn.sources.USER;typeof e=="string"&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(r=>{let{target:i}=r;const o=this.find(i,!0);return o&&!qx(o)}),e.length>0&&this.emitter.emit(zn.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(zn.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,r){const[i]=this.descendant(o=>o instanceof gd,e);i&&i.statics.blotName===t&&qx(i)&&i.updateContent(r)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let r=new Kn;return e.forEach(i=>{const o=i==null?void 0:i.insert;if(o)if(typeof o=="string"){const l=o.split(`
|
|
306
|
-
`);l.slice(0,-1).forEach(u=>{r.insert(u,i.attributes),t.push({type:"block",delta:r,attributes:i.attributes??{}}),r=new Kn});const a=l[l.length-1];a&&r.insert(a,i.attributes)}else{const l=Object.keys(o)[0];if(!l)return;this.query(l,Jn.INLINE)?r.push(i):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new Kn,t.push({type:"blockEmbed",key:l,value:o[l],attributes:i.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(e,t){let r;const i={};Object.entries(e).forEach(a=>{let[u,h]=a;this.query(u,Jn.BLOCK&Jn.BLOT)!=null?r=u:i[u]=h});const o=this.create(r||this.statics.defaultChild.blotName,r?e[r]:void 0);this.insertBefore(o,t||void 0);const l=o.length();return Object.entries(i).forEach(a=>{let[u,h]=a;o.formatAt(0,l,u,h)}),o}}Ae(l1,"blotName","scroll"),Ae(l1,"className","ql-editor"),Ae(l1,"tagName","DIV"),Ae(l1,"defaultChild",kc),Ae(l1,"allowedChildren",[kc,gd,Gg]);function Eb(n,e,t){t.reduce((r,i)=>{const o=pd.Op.length(i);let l=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const a=i.insert;n.insertAt(r,a);const[u]=n.descendant(lu,r),h=dd(u);l=pd.AttributeMap.diff(h,l)||{}}else if(typeof i.insert=="object"){const a=Object.keys(i.insert)[0];if(a==null)return r;if(n.insertAt(r,a,i.insert[a]),n.scroll.query(a,Jn.INLINE)!=null){const[h]=n.descendant(lu,r),y=dd(h);l=pd.AttributeMap.diff(y,l)||{}}}}return Object.keys(l).forEach(a=>{n.formatAt(r,o,a,l[a])}),r+o},e)}const Nm={scope:Jn.BLOCK,whitelist:["right","center","justify"]},
|
|
306
|
+
`);l.slice(0,-1).forEach(u=>{r.insert(u,i.attributes),t.push({type:"block",delta:r,attributes:i.attributes??{}}),r=new Kn});const a=l[l.length-1];a&&r.insert(a,i.attributes)}else{const l=Object.keys(o)[0];if(!l)return;this.query(l,Jn.INLINE)?r.push(i):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new Kn,t.push({type:"blockEmbed",key:l,value:o[l],attributes:i.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(e,t){let r;const i={};Object.entries(e).forEach(a=>{let[u,h]=a;this.query(u,Jn.BLOCK&Jn.BLOT)!=null?r=u:i[u]=h});const o=this.create(r||this.statics.defaultChild.blotName,r?e[r]:void 0);this.insertBefore(o,t||void 0);const l=o.length();return Object.entries(i).forEach(a=>{let[u,h]=a;o.formatAt(0,l,u,h)}),o}}Ae(l1,"blotName","scroll"),Ae(l1,"className","ql-editor"),Ae(l1,"tagName","DIV"),Ae(l1,"defaultChild",kc),Ae(l1,"allowedChildren",[kc,gd,Gg]);function Eb(n,e,t){t.reduce((r,i)=>{const o=pd.Op.length(i);let l=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const a=i.insert;n.insertAt(r,a);const[u]=n.descendant(lu,r),h=dd(u);l=pd.AttributeMap.diff(h,l)||{}}else if(typeof i.insert=="object"){const a=Object.keys(i.insert)[0];if(a==null)return r;if(n.insertAt(r,a,i.insert[a]),n.scroll.query(a,Jn.INLINE)!=null){const[h]=n.descendant(lu,r),y=dd(h);l=pd.AttributeMap.diff(y,l)||{}}}}return Object.keys(l).forEach(a=>{n.formatAt(r,o,a,l[a])}),r+o},e)}const Nm={scope:Jn.BLOCK,whitelist:["right","center","justify"]},AD=new rh("align","align",Nm),O_=new zd("align","ql-align",Nm),P_=new dg("align","text-align",Nm);class D_ extends dg{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(i=>`00${parseInt(i,10).toString(16)}`.slice(-2)).join("")}`):t}}const TD=new zd("color","ql-color",{scope:Jn.INLINE}),Fm=new D_("color","color",{scope:Jn.INLINE}),RD=new zd("background","ql-bg",{scope:Jn.INLINE}),Bm=new D_("background","background-color",{scope:Jn.INLINE});class Yg extends Gg{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
|
|
307
307
|
`).slice(e,e+t)}html(e,t){return`<pre>
|
|
308
308
|
${Mv(this.code(e,t))}
|
|
309
|
-
</pre>`}}class au extends kc{static register(){qe.register(Yg)}}Ae(au,"TAB"," ");class zm extends ih{}zm.blotName="code";zm.tagName="CODE";au.blotName="code-block";au.className="ql-code-block";au.tagName="DIV";Yg.blotName="code-block-container";Yg.className="ql-code-block-container";Yg.tagName="DIV";Yg.allowedChildren=[au];au.allowedChildren=[Dd,Hd,_1];au.requiredContainer=Yg;const Hm={scope:Jn.BLOCK,whitelist:["rtl"]},N_=new rh("direction","dir",Hm),F_=new zd("direction","ql-direction",Hm),B_=new dg("direction","direction",Hm),z_={scope:Jn.INLINE,whitelist:["serif","monospace"]},H_=new zd("font","ql-font",z_);class
|
|
310
|
-
`,r);this.quill.updateContents(i,qe.sources.USER),this.quill.setSelection(e.index+1,qe.sources.SILENT),this.quill.focus()}};const
|
|
309
|
+
</pre>`}}class au extends kc{static register(){qe.register(Yg)}}Ae(au,"TAB"," ");class zm extends ih{}zm.blotName="code";zm.tagName="CODE";au.blotName="code-block";au.className="ql-code-block";au.tagName="DIV";Yg.blotName="code-block-container";Yg.className="ql-code-block-container";Yg.tagName="DIV";Yg.allowedChildren=[au];au.allowedChildren=[Dd,Hd,_1];au.requiredContainer=Yg;const Hm={scope:Jn.BLOCK,whitelist:["rtl"]},N_=new rh("direction","dir",Hm),F_=new zd("direction","ql-direction",Hm),B_=new dg("direction","direction",Hm),z_={scope:Jn.INLINE,whitelist:["serif","monospace"]},H_=new zd("font","ql-font",z_);class ID extends dg{value(e){return super.value(e).replace(/["']/g,"")}}const W_=new ID("font","font-family",z_),U_=new zd("size","ql-size",{scope:Jn.INLINE,whitelist:["small","large","huge"]}),G_=new dg("size","font-size",{scope:Jn.INLINE,whitelist:["10px","18px","32px"]}),kD=Mh("quill:keyboard"),MD=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";let Y_=class V_ extends Wd{static match(e,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!t[r]!==e[r]&&t[r]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=OD(e);if(i==null){kD.warn("Attempted to add invalid keyboard binding",i);return}typeof t=="function"&&(t={handler:t}),typeof r=="function"&&(r={handler:r}),(Array.isArray(i.key)?i.key:[i.key]).forEach(l=>{const a={...i,key:l,...t,...r};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const i=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(O=>V_.match(e,O));if(i.length===0)return;const o=qe.find(e.target,!0);if(o&&o.scroll!==this.quill.scroll)return;const l=this.quill.getSelection();if(l==null||!this.quill.hasFocus())return;const[a,u]=this.quill.getLine(l.index),[h,y]=this.quill.getLeaf(l.index),[x,w]=l.length===0?[h,y]:this.quill.getLeaf(l.index+l.length),_=h instanceof lv?h.value().slice(0,y):"",S=x instanceof lv?x.value().slice(w):"",R={collapsed:l.length===0,empty:l.length===0&&a.length()<=1,format:this.quill.getFormat(l),line:a,offset:u,prefix:_,suffix:S,event:e};i.some(O=>{if(O.collapsed!=null&&O.collapsed!==R.collapsed||O.empty!=null&&O.empty!==R.empty||O.offset!=null&&O.offset!==R.offset)return!1;if(Array.isArray(O.format)){if(O.format.every(P=>R.format[P]==null))return!1}else if(typeof O.format=="object"&&!Object.keys(O.format).every(P=>O.format[P]===!0?R.format[P]!=null:O.format[P]===!1?R.format[P]==null:$h(O.format[P],R.format[P])))return!1;return O.prefix!=null&&!O.prefix.test(R.prefix)||O.suffix!=null&&!O.suffix.test(R.suffix)?!1:O.handler.call(this,l,R,O)!==!0})&&e.preventDefault()})}handleBackspace(e,t){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let i={};const[o]=this.quill.getLine(e.index);let l=new Kn().retain(e.index-r).delete(r);if(t.offset===0){const[a]=this.quill.getLine(e.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const h=o.formats(),y=this.quill.getFormat(e.index-1,1);if(i=pd.AttributeMap.diff(h,y)||{},Object.keys(i).length>0){const x=new Kn().retain(e.index+o.length()-2).retain(1,i);l=l.compose(x)}}}this.quill.updateContents(l,qe.sources.USER),this.quill.focus()}handleDelete(e,t){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-r)return;let i={};const[o]=this.quill.getLine(e.index);let l=new Kn().retain(e.index).delete(r);if(t.offset>=o.length()-1){const[a]=this.quill.getLine(e.index+1);if(a){const u=o.formats(),h=this.quill.getFormat(e.index,1);i=pd.AttributeMap.diff(u,h)||{},Object.keys(i).length>0&&(l=l.retain(a.length()-1).retain(1,i))}}this.quill.updateContents(l,qe.sources.USER),this.quill.focus()}handleDeleteRange(e){Wm({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const r=Object.keys(t.format).reduce((o,l)=>(this.quill.scroll.query(l,Jn.BLOCK)&&!Array.isArray(t.format[l])&&(o[l]=t.format[l]),o),{}),i=new Kn().retain(e.index).delete(e.length).insert(`
|
|
310
|
+
`,r);this.quill.updateContents(i,qe.sources.USER),this.quill.setSelection(e.index+1,qe.sources.SILENT),this.quill.focus()}};const LD={bindings:{bold:Ab("bold"),italic:Ab("italic"),underline:Ab("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(n,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",qe.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(n,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",qe.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(n,e){e.format.indent!=null?this.quill.format("indent","-1",qe.sources.USER):e.format.list!=null&&this.quill.format("list",!1,qe.sources.USER)}},"indent code-block":jx(!0),"outdent code-block":jx(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(n){this.quill.deleteText(n.index-1,1,qe.sources.USER)}},tab:{key:"Tab",handler(n,e){if(e.format.table)return!0;this.quill.history.cutoff();const t=new Kn().retain(n.index).delete(n.length).insert(" ");return this.quill.updateContents(t,qe.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index+1,qe.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,qe.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(n,e){const t={list:!1};e.format.indent&&(t.indent=!1),this.quill.formatLine(n.index,n.length,t,qe.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(n){const[e,t]=this.quill.getLine(n.index),r={...e.formats(),list:"checked"},i=new Kn().retain(n.index).insert(`
|
|
311
311
|
`,r).retain(e.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,qe.sources.USER),this.quill.setSelection(n.index+1,qe.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(n,e){const[t,r]=this.quill.getLine(n.index),i=new Kn().retain(n.index).insert(`
|
|
312
|
-
`,e.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,qe.sources.USER),this.quill.setSelection(n.index+1,qe.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(n){const e=this.quill.getModule("table");if(e){const[t,r,i,o]=e.getTable(n),l=
|
|
312
|
+
`,e.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,qe.sources.USER),this.quill.setSelection(n.index+1,qe.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(n){const e=this.quill.getModule("table");if(e){const[t,r,i,o]=e.getTable(n),l=PD(t,r,i,o);if(l==null)return;let a=t.offset();if(l<0){const u=new Kn().retain(a).insert(`
|
|
313
313
|
`);this.quill.updateContents(u,qe.sources.USER),this.quill.setSelection(n.index+1,n.length,qe.sources.SILENT)}else if(l>0){a+=t.length();const u=new Kn().retain(a).insert(`
|
|
314
|
-
`);this.quill.updateContents(u,qe.sources.USER),this.quill.setSelection(a,qe.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(n,e){const{event:t,line:r}=e,i=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(i-1,qe.sources.USER):this.quill.setSelection(i+r.length(),qe.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(n,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[r,i]=this.quill.getLine(n.index);if(i>t)return!0;let o;switch(e.prefix.trim()){case"[]":case"[ ]":o="unchecked";break;case"[x]":o="checked";break;case"-":case"*":o="bullet";break;default:o="ordered"}this.quill.insertText(n.index," ",qe.sources.USER),this.quill.history.cutoff();const l=new Kn().retain(n.index-i).delete(t+1).retain(r.length()-2-i).retain(1,{list:o});return this.quill.updateContents(l,qe.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index-t,qe.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(n){const[e,t]=this.quill.getLine(n.index);let r=2,i=e;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,r-=1,r<=0){const o=new Kn().retain(n.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(o,qe.sources.USER),this.quill.setSelection(n.index-1,qe.sources.SILENT),!1}return!0}},"embed left":A0("ArrowLeft",!1),"embed left shift":A0("ArrowLeft",!0),"embed right":A0("ArrowRight",!1),"embed right shift":A0("ArrowRight",!0),"table down":$x(!1),"table up":$x(!0)}};Y_.DEFAULTS=
|
|
315
|
-
`)&&(o.ops[o.ops.length-1].attributes==null||i.table)?o.compose(new Kn().retain(o.length()-1).delete(1)):o}normalizeHTML(e){
|
|
316
|
-
`)}onCapturePaste(e){var l,a,u,h,y;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(t==null)return;const r=(l=e.clipboardData)==null?void 0:l.getData("text/html");let i=(a=e.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!i){const x=(u=e.clipboardData)==null?void 0:u.getData("text/uri-list");x&&(i=this.normalizeURIList(x))}const o=Array.from(((h=e.clipboardData)==null?void 0:h.files)||[]);if(!r&&o.length>0){this.quill.uploader.upload(t,o);return}if(r&&o.length>0){const x=new DOMParser().parseFromString(r,"text/html");if(x.body.childElementCount===1&&((y=x.body.firstElementChild)==null?void 0:y.tagName)==="IMG"){this.quill.uploader.upload(t,o);return}}this.onPaste(t,{html:r,text:i})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:r,html:i}=t;const o=this.quill.getFormat(e.index),l=this.convert({text:r,html:i},o);
|
|
314
|
+
`);this.quill.updateContents(u,qe.sources.USER),this.quill.setSelection(a,qe.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(n,e){const{event:t,line:r}=e,i=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(i-1,qe.sources.USER):this.quill.setSelection(i+r.length(),qe.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(n,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[r,i]=this.quill.getLine(n.index);if(i>t)return!0;let o;switch(e.prefix.trim()){case"[]":case"[ ]":o="unchecked";break;case"[x]":o="checked";break;case"-":case"*":o="bullet";break;default:o="ordered"}this.quill.insertText(n.index," ",qe.sources.USER),this.quill.history.cutoff();const l=new Kn().retain(n.index-i).delete(t+1).retain(r.length()-2-i).retain(1,{list:o});return this.quill.updateContents(l,qe.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index-t,qe.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(n){const[e,t]=this.quill.getLine(n.index);let r=2,i=e;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,r-=1,r<=0){const o=new Kn().retain(n.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(o,qe.sources.USER),this.quill.setSelection(n.index-1,qe.sources.SILENT),!1}return!0}},"embed left":A0("ArrowLeft",!1),"embed left shift":A0("ArrowLeft",!0),"embed right":A0("ArrowRight",!1),"embed right shift":A0("ArrowRight",!0),"table down":$x(!1),"table up":$x(!0)}};Y_.DEFAULTS=LD;function jx(n){return{key:"Tab",shiftKey:!n,format:{"code-block":!0},handler(e,t){let{event:r}=t;const i=this.quill.scroll.query("code-block"),{TAB:o}=i;if(e.length===0&&!r.shiftKey){this.quill.insertText(e.index,o,qe.sources.USER),this.quill.setSelection(e.index+o.length,qe.sources.SILENT);return}const l=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:u}=e;l.forEach((h,y)=>{n?(h.insertAt(0,o),y===0?a+=o.length:u+=o.length):h.domNode.textContent.startsWith(o)&&(h.deleteAt(0,o.length),y===0?a-=o.length:u-=o.length)}),this.quill.update(qe.sources.USER),this.quill.setSelection(a,u,qe.sources.SILENT)}}}function A0(n,e){return{key:n,shiftKey:e,altKey:null,[n==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:i}=r;n==="ArrowRight"&&(i+=r.length+1);const[o]=this.quill.getLeaf(i);return o instanceof Bf?(n==="ArrowLeft"?e?this.quill.setSelection(r.index-1,r.length+1,qe.sources.USER):this.quill.setSelection(r.index-1,qe.sources.USER):e?this.quill.setSelection(r.index,r.length+1,qe.sources.USER):this.quill.setSelection(r.index+r.length+1,qe.sources.USER),!1):!0}}}function Ab(n){return{key:n[0],shortKey:!0,handler(e,t){this.quill.format(n,!t.format[n],qe.sources.USER)}}}function $x(n){return{key:n?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,t){const r=n?"prev":"next",i=t.line,o=i.parent[r];if(o!=null){if(o.statics.blotName==="table-row"){let l=o.children.head,a=i;for(;a.prev!=null;)a=a.prev,l=l.next;const u=l.offset(this.quill.scroll)+Math.min(t.offset,l.length()-1);this.quill.setSelection(u,0,qe.sources.USER)}}else{const l=i.table()[r];l!=null&&(n?this.quill.setSelection(l.offset(this.quill.scroll)+l.length()-1,0,qe.sources.USER):this.quill.setSelection(l.offset(this.quill.scroll),0,qe.sources.USER))}return!1}}}function OD(n){if(typeof n=="string"||typeof n=="number")n={key:n};else if(typeof n=="object")n=h1(n);else return null;return n.shortKey&&(n[MD]=n.shortKey,delete n.shortKey),n}function Wm(n){let{quill:e,range:t}=n;const r=e.getLines(t);let i={};if(r.length>1){const o=r[0].formats(),l=r[r.length-1].formats();i=pd.AttributeMap.diff(l,o)||{}}e.deleteText(t,qe.sources.USER),Object.keys(i).length>0&&e.formatLine(t.index,1,i,qe.sources.USER),e.setSelection(t.index,qe.sources.SILENT)}function PD(n,e,t,r){return e.prev==null&&e.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const DD=/font-weight:\s*normal/,ND=["P","OL","UL"],ew=n=>n&&ND.includes(n.tagName),FD=n=>{Array.from(n.querySelectorAll("br")).filter(e=>ew(e.previousElementSibling)&&ew(e.nextElementSibling)).forEach(e=>{var t;(t=e.parentNode)==null||t.removeChild(e)})},BD=n=>{Array.from(n.querySelectorAll('b[style*="font-weight"]')).filter(e=>{var t;return(t=e.getAttribute("style"))==null?void 0:t.match(DD)}).forEach(e=>{var r;const t=n.createDocumentFragment();t.append(...e.childNodes),(r=e.parentNode)==null||r.replaceChild(t,e)})};function zD(n){n.querySelector('[id^="docs-internal-guid-"]')&&(BD(n),FD(n))}const HD=/\bmso-list:[^;]*ignore/i,WD=/\bmso-list:[^;]*\bl(\d+)/i,UD=/\bmso-list:[^;]*\blevel(\d+)/i,GD=(n,e)=>{const t=n.getAttribute("style"),r=t==null?void 0:t.match(WD);if(!r)return null;const i=Number(r[1]),o=t==null?void 0:t.match(UD),l=o?Number(o[1]):1,a=new RegExp(`@list l${i}:level${l}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),u=e.match(a),h=u&&u[1]==="bullet"?"bullet":"ordered";return{id:i,indent:l,type:h,element:n}},YD=n=>{var l,a;const e=Array.from(n.querySelectorAll("[style*=mso-list]")),t=[],r=[];e.forEach(u=>{(u.getAttribute("style")||"").match(HD)?t.push(u):r.push(u)}),t.forEach(u=>{var h;return(h=u.parentNode)==null?void 0:h.removeChild(u)});const i=n.documentElement.innerHTML,o=r.map(u=>GD(u,i)).filter(u=>u);for(;o.length;){const u=[];let h=o.shift();for(;h;)u.push(h),h=o.length&&((l=o[0])==null?void 0:l.element)===h.element.nextElementSibling&&o[0].id===h.id?o.shift():null;const y=document.createElement("ul");u.forEach(_=>{const S=document.createElement("li");S.setAttribute("data-list",_.type),_.indent>1&&S.setAttribute("class",`ql-indent-${_.indent-1}`),S.innerHTML=_.element.innerHTML,y.appendChild(S)});const x=(a=u[0])==null?void 0:a.element,{parentNode:w}=x??{};x&&(w==null||w.replaceChild(y,x)),u.slice(1).forEach(_=>{let{element:S}=_;w==null||w.removeChild(S)})}};function VD(n){n.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&YD(n)}const ZD=[VD,zD],XD=n=>{n.documentElement&&ZD.forEach(e=>{e(n)})},KD=Mh("quill:clipboard"),JD=[[Node.TEXT_NODE,aN],[Node.TEXT_NODE,nw],["br",tN],[Node.ELEMENT_NODE,nw],[Node.ELEMENT_NODE,eN],[Node.ELEMENT_NODE,$D],[Node.ELEMENT_NODE,lN],["li",iN],["ol, ul",oN],["pre",nN],["tr",sN],["b",Tb("bold")],["i",Tb("italic")],["strike",Tb("strike")],["style",rN]],QD=[AD,N_].reduce((n,e)=>(n[e.keyName]=e,n),{}),tw=[P_,Bm,Fm,B_,W_,G_].reduce((n,e)=>(n[e.keyName]=e,n),{});var Ry;let qD=(Ry=class extends Wd{constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],JD.concat(this.options.matchers??[]).forEach(r=>{let[i,o]=r;this.addMatcher(i,o)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:r}=e,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[au.blotName])return new Kn().insert(r||"",{[au.blotName]:i[au.blotName]});if(!t)return new Kn().insert(r||"",i);const o=this.convertHTML(t);return Wp(o,`
|
|
315
|
+
`)&&(o.ops[o.ops.length-1].attributes==null||i.table)?o.compose(new Kn().retain(o.length()-1).delete(1)):o}normalizeHTML(e){XD(e)}convertHTML(e){const t=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(t);const r=t.body,i=new WeakMap,[o,l]=this.prepareMatching(r,i);return Um(this.quill.scroll,r,o,l,i)}dangerouslyPasteHTML(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qe.sources.API;if(typeof e=="string"){const i=this.convert({html:e,text:""});this.quill.setContents(i,t),this.quill.setSelection(0,qe.sources.SILENT)}else{const i=this.convert({html:t,text:""});this.quill.updateContents(new Kn().retain(e).concat(i),r),this.quill.setSelection(e+i.length(),qe.sources.SILENT)}}onCaptureCopy(e){var l,a;let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:i,text:o}=this.onCopy(r,t);(l=e.clipboardData)==null||l.setData("text/plain",o),(a=e.clipboardData)==null||a.setData("text/html",i),t&&Wm({range:r,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
|
|
316
|
+
`)}onCapturePaste(e){var l,a,u,h,y;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(t==null)return;const r=(l=e.clipboardData)==null?void 0:l.getData("text/html");let i=(a=e.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!i){const x=(u=e.clipboardData)==null?void 0:u.getData("text/uri-list");x&&(i=this.normalizeURIList(x))}const o=Array.from(((h=e.clipboardData)==null?void 0:h.files)||[]);if(!r&&o.length>0){this.quill.uploader.upload(t,o);return}if(r&&o.length>0){const x=new DOMParser().parseFromString(r,"text/html");if(x.body.childElementCount===1&&((y=x.body.firstElementChild)==null?void 0:y.tagName)==="IMG"){this.quill.uploader.upload(t,o);return}}this.onPaste(t,{html:r,text:i})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:r,html:i}=t;const o=this.quill.getFormat(e.index),l=this.convert({text:r,html:i},o);KD.log("onPaste",l,{text:r,html:i});const a=new Kn().retain(e.index).delete(e.length).concat(l);this.quill.updateContents(a,qe.sources.USER),this.quill.setSelection(a.length()-e.length,qe.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const r=[],i=[];return this.matchers.forEach(o=>{const[l,a]=o;switch(l){case Node.TEXT_NODE:i.push(a);break;case Node.ELEMENT_NODE:r.push(a);break;default:Array.from(e.querySelectorAll(l)).forEach(u=>{if(t.has(u)){const h=t.get(u);h==null||h.push(a)}else t.set(u,[a])});break}}),[r,i]}},Ae(Ry,"DEFAULTS",{matchers:[]}),Ry);function Vg(n,e,t,r){return r.query(e)?n.reduce((i,o)=>{if(!o.insert)return i;if(o.attributes&&o.attributes[e])return i.push(o);const l=t?{[e]:t}:{};return i.insert(o.insert,{...l,...o.attributes})},new Kn):n}function Wp(n,e){let t="";for(let r=n.ops.length-1;r>=0&&t.length<e.length;--r){const i=n.ops[r];if(typeof i.insert!="string")break;t=i.insert+t}return t.slice(-1*e.length)===e}function ng(n,e){if(!(n instanceof Element))return!1;const t=e.query(n);return t&&t.prototype instanceof Bf?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(n.tagName.toLowerCase())}function jD(n,e){return n.previousElementSibling&&n.nextElementSibling&&!ng(n.previousElementSibling,e)&&!ng(n.nextElementSibling,e)}const T0=new WeakMap;function Z_(n){return n==null?!1:(T0.has(n)||(n.tagName==="PRE"?T0.set(n,!0):T0.set(n,Z_(n.parentNode))),T0.get(n))}function Um(n,e,t,r,i){return e.nodeType===e.TEXT_NODE?r.reduce((o,l)=>l(e,o,n),new Kn):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((o,l)=>{let a=Um(n,l,t,r,i);return l.nodeType===e.ELEMENT_NODE&&(a=t.reduce((u,h)=>h(l,u,n),a),a=(i.get(l)||[]).reduce((u,h)=>h(l,u,n),a)),o.concat(a)},new Kn):new Kn}function Tb(n){return(e,t,r)=>Vg(t,n,!0,r)}function $D(n,e,t){const r=rh.keys(n),i=zd.keys(n),o=dg.keys(n),l={};return r.concat(i).concat(o).forEach(a=>{let u=t.query(a,Jn.ATTRIBUTE);u!=null&&(l[u.attrName]=u.value(n),l[u.attrName])||(u=QD[a],u!=null&&(u.attrName===a||u.keyName===a)&&(l[u.attrName]=u.value(n)||void 0),u=tw[a],u!=null&&(u.attrName===a||u.keyName===a)&&(u=tw[a],l[u.attrName]=u.value(n)||void 0))}),Object.entries(l).reduce((a,u)=>{let[h,y]=u;return Vg(a,h,y,t)},e)}function eN(n,e,t){const r=t.query(n);if(r==null)return e;if(r.prototype instanceof Bf){const i={},o=r.value(n);if(o!=null)return i[r.blotName]=o,new Kn().insert(i,r.formats(n,t))}else if(r.prototype instanceof kp&&!Wp(e,`
|
|
317
317
|
`)&&e.insert(`
|
|
318
|
-
`),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return Vg(e,r.blotName,r.formats(n,t),t);return e}function
|
|
318
|
+
`),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return Vg(e,r.blotName,r.formats(n,t),t);return e}function tN(n,e){return Wp(e,`
|
|
319
319
|
`)||e.insert(`
|
|
320
|
-
`),e}function
|
|
321
|
-
`))return e;let i=-1,o=n.parentNode;for(;o!=null;)["OL","UL"].includes(o.tagName)&&(i+=1),o=o.parentNode;return i<=0?e:e.reduce((l,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?l.push(a):l.insert(a.insert,{indent:i,...a.attributes||{}}):l,new Kn)}function
|
|
320
|
+
`),e}function nN(n,e,t){const r=t.query("code-block"),i=r&&"formats"in r&&typeof r.formats=="function"?r.formats(n,t):!0;return Vg(e,"code-block",i,t)}function rN(){return new Kn}function iN(n,e,t){const r=t.query(n);if(r==null||r.blotName!=="list"||!Wp(e,`
|
|
321
|
+
`))return e;let i=-1,o=n.parentNode;for(;o!=null;)["OL","UL"].includes(o.tagName)&&(i+=1),o=o.parentNode;return i<=0?e:e.reduce((l,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?l.push(a):l.insert(a.insert,{indent:i,...a.attributes||{}}):l,new Kn)}function oN(n,e,t){const r=n;let i=r.tagName==="OL"?"ordered":"bullet";const o=r.getAttribute("data-checked");return o&&(i=o==="true"?"checked":"unchecked"),Vg(e,"list",i,t)}function nw(n,e,t){if(!Wp(e,`
|
|
322
322
|
`)){if(ng(n,t)&&(n.childNodes.length>0||n instanceof HTMLParagraphElement))return e.insert(`
|
|
323
323
|
`);if(e.length()>0&&n.nextSibling){let r=n.nextSibling;for(;r!=null;){if(ng(r,t))return e.insert(`
|
|
324
324
|
`);const i=t.query(r);if(i&&i.prototype instanceof gd)return e.insert(`
|
|
325
|
-
`);r=r.firstChild}}}return e}function
|
|
326
|
-
`)&&!
|
|
327
|
-
`):t.attributes!=null?Object.keys(t.attributes).some(r=>n.query(r,Jn.BLOCK)!=null):!1}function lN(n,e){const t=e.reduce((i,o)=>i+(o.delete||0),0);let r=e.length()-t;return oN(n,e)&&(r-=1),r}function Ky(n,e){if(!n)return n;const t=e.transformPosition(n.index),r=e.transformPosition(n.index+n.length);return{index:t,length:r-t}}class K_ extends Wd{constructor(e,t){super(e,t),e.root.addEventListener("drop",r=>{var l;r.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}const o=i&&e.selection.normalizeNative(i);if(o){const a=e.selection.normalizedToRange(o);(l=r.dataTransfer)!=null&&l.files&&this.upload(a,r.dataTransfer.files)}})}upload(e,t){const r=[];Array.from(t).forEach(i=>{var o;i&&((o=this.options.mimetypes)!=null&&o.includes(i.type))&&r.push(i)}),r.length>0&&this.options.handler.call(this,e,r)}}K_.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(n,e){if(!this.quill.scroll.query("image"))return;const t=e.map(r=>new Promise(i=>{const o=new FileReader;o.onload=()=>{i(o.result)},o.readAsDataURL(r)}));Promise.all(t).then(r=>{const i=r.reduce((o,l)=>o.insert({image:l}),new Kn().retain(n.index).delete(n.length));this.quill.updateContents(i,zn.sources.USER),this.quill.setSelection(n.index+r.length,zn.sources.SILENT)})}};const sN=["insertText","insertReplacementText"];class aN extends Wd{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||e.on(qe.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){Wm({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const r=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new Kn().retain(e.index).insert(t,r),qe.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,qe.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!sN.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const r=cN(e);if(r==null)return;const i=this.quill.selection.normalizeNative(t),o=i?this.quill.selection.normalizedToRange(i):null;o&&this.replaceText(o,r)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function cN(n){var e;return typeof n.data=="string"?n.data:(e=n.dataTransfer)!=null&&e.types.includes("text/plain")?n.dataTransfer.getData("text/plain"):null}const uN=/Mac/i.test(navigator.platform),fN=100,dN=n=>!!(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"||n.key==="Home"||uN&&n.key==="a"&&n.ctrlKey===!0);class hN extends Wd{constructor(t,r){super(t,r);Ae(this,"isListening",!1);Ae(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:i,event:o}=r;if(!(i instanceof Od)||!i.uiNode)return!0;const l=getComputedStyle(i.domNode).direction==="rtl";return l&&o.key!=="ArrowRight"||!l&&o.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(o.shiftKey?1:0),qe.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&dN(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+fN,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const i=this.quill.scroll.find(r.startContainer);if(!(i instanceof Od)||!i.uiNode)return;const o=document.createRange();o.setStartAfter(i.uiNode),o.setEndAfter(i.uiNode),t.removeAllRanges(),t.addRange(o)}}qe.register({"blots/block":kc,"blots/block/embed":gd,"blots/break":Hd,"blots/container":Gg,"blots/cursor":_1,"blots/embed":Dm,"blots/inline":ih,"blots/scroll":l1,"blots/text":Dd,"modules/clipboard":XD,"modules/history":X_,"modules/keyboard":Y_,"modules/uploader":K_,"modules/input":aN,"modules/uiNode":hN});class gN extends zd{add(e,t){let r=0;if(t==="+1"||t==="-1"){const i=this.value(e)||0;r=t==="+1"?i+1:i-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(e),!0):super.add(e,r.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const pN=new gN("indent","ql-indent",{scope:Jn.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Jy extends kc{}Ae(Jy,"blotName","blockquote"),Ae(Jy,"tagName","blockquote");class Qy extends kc{static formats(e){return this.tagName.indexOf(e.tagName)+1}}Ae(Qy,"blotName","header"),Ae(Qy,"tagName",["H1","H2","H3","H4","H5","H6"]);class Up extends Gg{}Up.blotName="list-container";Up.tagName="OL";class Gp extends kc{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){qe.register(Up)}constructor(e,t){super(e,t);const r=t.ownerDocument.createElement("span"),i=o=>{if(!e.isEnabled())return;const l=this.statics.formats(t,e);l==="checked"?(this.format("list","unchecked"),o.preventDefault()):l==="unchecked"&&(this.format("list","checked"),o.preventDefault())};r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),this.attachUI(r)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}Gp.blotName="list";Gp.tagName="LI";Up.allowedChildren=[Gp];Gp.requiredContainer=Up;class Lp extends ih{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}Ae(Lp,"blotName","bold"),Ae(Lp,"tagName",["STRONG","B"]);class qy extends Lp{}Ae(qy,"blotName","italic"),Ae(qy,"tagName",["EM","I"]);class rg extends ih{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return J_(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}Ae(rg,"blotName","link"),Ae(rg,"tagName","A"),Ae(rg,"SANITIZED_URL","about:blank"),Ae(rg,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function J_(n,e){const t=document.createElement("a");t.href=n;const r=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(r)>-1}class jy extends ih{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}Ae(jy,"blotName","script"),Ae(jy,"tagName",["SUB","SUP"]);class $y extends Lp{}Ae($y,"blotName","strike"),Ae($y,"tagName",["S","STRIKE"]);class em extends ih{}Ae(em,"blotName","underline"),Ae(em,"tagName","U");class V0 extends Dm{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}Ae(V0,"blotName","formula"),Ae(V0,"className","ql-formula"),Ae(V0,"tagName","SPAN");const iw=["alt","height","width"];var B0;let vN=(B0=class extends Bf{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return iw.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return J_(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){iw.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}},Ae(B0,"blotName","image"),Ae(B0,"tagName","IMG"),B0);const ow=["height","width"];class Z0 extends gd{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return ow.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static sanitize(e){return rg.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){ow.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}Ae(Z0,"blotName","video"),Ae(Z0,"className","ql-video"),Ae(Z0,"tagName","IFRAME");const vp=new zd("code-token","hljs",{scope:Jn.INLINE});class Rh extends ih{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(au.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,r){super(e,t,r),vp.add(this.domNode,r)}format(e,t){e!==Rh.blotName?super.format(e,t):t?vp.add(this.domNode,t):(vp.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),vp.value(this.domNode)||this.unwrap()}}Rh.blotName="code-token";Rh.className="ql-token";class hd extends au{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),Rh.blotName,!1),super.replaceWith(e,t)}}class yp extends Yg{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===hd.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(e,t)}))}formatAt(e,t,r,i){r===hd.blotName&&(this.forceNext=!0),super.formatAt(e,t,r,i)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(l=>l!==this.uiNode).map(l=>l.textContent).join(`
|
|
325
|
+
`);r=r.firstChild}}}return e}function lN(n,e,t){var o;const r={},i=n.style||{};return i.fontStyle==="italic"&&(r.italic=!0),i.textDecoration==="underline"&&(r.underline=!0),i.textDecoration==="line-through"&&(r.strike=!0),((o=i.fontWeight)!=null&&o.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),e=Object.entries(r).reduce((l,a)=>{let[u,h]=a;return Vg(l,u,h,t)},e),parseFloat(i.textIndent||0)>0?new Kn().insert(" ").concat(e):e}function sN(n,e,t){var i,o;const r=((i=n.parentElement)==null?void 0:i.tagName)==="TABLE"?n.parentElement:(o=n.parentElement)==null?void 0:o.parentElement;if(r!=null){const a=Array.from(r.querySelectorAll("tr")).indexOf(n)+1;return Vg(e,"table",a,t)}return e}function aN(n,e,t){var i;let r=n.data;if(((i=n.parentElement)==null?void 0:i.tagName)==="O:P")return e.insert(r.trim());if(!Z_(n)){if(r.trim().length===0&&r.includes(`
|
|
326
|
+
`)&&!jD(n,t))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(n.previousSibling==null&&n.parentElement!=null&&ng(n.parentElement,t)||n.previousSibling instanceof Element&&ng(n.previousSibling,t))&&(r=r.replace(/^ /,"")),(n.nextSibling==null&&n.parentElement!=null&&ng(n.parentElement,t)||n.nextSibling instanceof Element&&ng(n.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}class X_ extends Wd{constructor(t,r){super(t,r);Ae(this,"lastRecorded",0);Ae(this,"ignoreChange",!1);Ae(this,"stack",{undo:[],redo:[]});Ae(this,"currentRange",null);this.quill.on(qe.events.EDITOR_CHANGE,(i,o,l,a)=>{i===qe.events.SELECTION_CHANGE?o&&a!==qe.sources.SILENT&&(this.currentRange=o):i===qe.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===qe.sources.USER?this.record(o,l):this.transform(o)),this.currentRange=Ky(this.currentRange,o))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",i=>{i.inputType==="historyUndo"?(this.undo(),i.preventDefault()):i.inputType==="historyRedo"&&(this.redo(),i.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;const i=this.stack[t].pop();if(!i)return;const o=this.quill.getContents(),l=i.delta.invert(o);this.stack[r].push({delta:l,range:Ky(i.range,l)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i.delta,qe.sources.USER),this.ignoreChange=!1,this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let i=t.invert(r),o=this.currentRange;const l=Date.now();if(this.lastRecorded+this.options.delay>l&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(i=i.compose(a.delta),o=a.range)}else this.lastRecorded=l;i.length()!==0&&(this.stack.undo.push({delta:i,range:o}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){rw(this.stack.undo,t),rw(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,qe.sources.USER);else{const r=uN(this.quill.scroll,t.delta);this.quill.setSelection(r,qe.sources.USER)}}}Ae(X_,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function rw(n,e){let t=e;for(let r=n.length-1;r>=0;r-=1){const i=n[r];n[r]={delta:t.transform(i.delta,!0),range:i.range&&Ky(i.range,t)},t=i.delta.transform(t),n[r].delta.length()===0&&n.splice(r,1)}}function cN(n,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
|
|
327
|
+
`):t.attributes!=null?Object.keys(t.attributes).some(r=>n.query(r,Jn.BLOCK)!=null):!1}function uN(n,e){const t=e.reduce((i,o)=>i+(o.delete||0),0);let r=e.length()-t;return cN(n,e)&&(r-=1),r}function Ky(n,e){if(!n)return n;const t=e.transformPosition(n.index),r=e.transformPosition(n.index+n.length);return{index:t,length:r-t}}class K_ extends Wd{constructor(e,t){super(e,t),e.root.addEventListener("drop",r=>{var l;r.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}const o=i&&e.selection.normalizeNative(i);if(o){const a=e.selection.normalizedToRange(o);(l=r.dataTransfer)!=null&&l.files&&this.upload(a,r.dataTransfer.files)}})}upload(e,t){const r=[];Array.from(t).forEach(i=>{var o;i&&((o=this.options.mimetypes)!=null&&o.includes(i.type))&&r.push(i)}),r.length>0&&this.options.handler.call(this,e,r)}}K_.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(n,e){if(!this.quill.scroll.query("image"))return;const t=e.map(r=>new Promise(i=>{const o=new FileReader;o.onload=()=>{i(o.result)},o.readAsDataURL(r)}));Promise.all(t).then(r=>{const i=r.reduce((o,l)=>o.insert({image:l}),new Kn().retain(n.index).delete(n.length));this.quill.updateContents(i,zn.sources.USER),this.quill.setSelection(n.index+r.length,zn.sources.SILENT)})}};const fN=["insertText","insertReplacementText"];class dN extends Wd{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||e.on(qe.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){Wm({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const r=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new Kn().retain(e.index).insert(t,r),qe.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,qe.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!fN.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const r=hN(e);if(r==null)return;const i=this.quill.selection.normalizeNative(t),o=i?this.quill.selection.normalizedToRange(i):null;o&&this.replaceText(o,r)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function hN(n){var e;return typeof n.data=="string"?n.data:(e=n.dataTransfer)!=null&&e.types.includes("text/plain")?n.dataTransfer.getData("text/plain"):null}const gN=/Mac/i.test(navigator.platform),pN=100,vN=n=>!!(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"||n.key==="Home"||gN&&n.key==="a"&&n.ctrlKey===!0);class bN extends Wd{constructor(t,r){super(t,r);Ae(this,"isListening",!1);Ae(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:i,event:o}=r;if(!(i instanceof Od)||!i.uiNode)return!0;const l=getComputedStyle(i.domNode).direction==="rtl";return l&&o.key!=="ArrowRight"||!l&&o.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(o.shiftKey?1:0),qe.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&vN(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+pN,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const i=this.quill.scroll.find(r.startContainer);if(!(i instanceof Od)||!i.uiNode)return;const o=document.createRange();o.setStartAfter(i.uiNode),o.setEndAfter(i.uiNode),t.removeAllRanges(),t.addRange(o)}}qe.register({"blots/block":kc,"blots/block/embed":gd,"blots/break":Hd,"blots/container":Gg,"blots/cursor":_1,"blots/embed":Dm,"blots/inline":ih,"blots/scroll":l1,"blots/text":Dd,"modules/clipboard":qD,"modules/history":X_,"modules/keyboard":Y_,"modules/uploader":K_,"modules/input":dN,"modules/uiNode":bN});class yN extends zd{add(e,t){let r=0;if(t==="+1"||t==="-1"){const i=this.value(e)||0;r=t==="+1"?i+1:i-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(e),!0):super.add(e,r.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const mN=new yN("indent","ql-indent",{scope:Jn.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Jy extends kc{}Ae(Jy,"blotName","blockquote"),Ae(Jy,"tagName","blockquote");class Qy extends kc{static formats(e){return this.tagName.indexOf(e.tagName)+1}}Ae(Qy,"blotName","header"),Ae(Qy,"tagName",["H1","H2","H3","H4","H5","H6"]);class Up extends Gg{}Up.blotName="list-container";Up.tagName="OL";class Gp extends kc{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){qe.register(Up)}constructor(e,t){super(e,t);const r=t.ownerDocument.createElement("span"),i=o=>{if(!e.isEnabled())return;const l=this.statics.formats(t,e);l==="checked"?(this.format("list","unchecked"),o.preventDefault()):l==="unchecked"&&(this.format("list","checked"),o.preventDefault())};r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),this.attachUI(r)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}Gp.blotName="list";Gp.tagName="LI";Up.allowedChildren=[Gp];Gp.requiredContainer=Up;class Lp extends ih{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}Ae(Lp,"blotName","bold"),Ae(Lp,"tagName",["STRONG","B"]);class qy extends Lp{}Ae(qy,"blotName","italic"),Ae(qy,"tagName",["EM","I"]);class rg extends ih{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return J_(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}Ae(rg,"blotName","link"),Ae(rg,"tagName","A"),Ae(rg,"SANITIZED_URL","about:blank"),Ae(rg,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function J_(n,e){const t=document.createElement("a");t.href=n;const r=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(r)>-1}class jy extends ih{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}Ae(jy,"blotName","script"),Ae(jy,"tagName",["SUB","SUP"]);class $y extends Lp{}Ae($y,"blotName","strike"),Ae($y,"tagName",["S","STRIKE"]);class em extends ih{}Ae(em,"blotName","underline"),Ae(em,"tagName","U");class V0 extends Dm{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}Ae(V0,"blotName","formula"),Ae(V0,"className","ql-formula"),Ae(V0,"tagName","SPAN");const iw=["alt","height","width"];var B0;let xN=(B0=class extends Bf{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return iw.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return J_(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){iw.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}},Ae(B0,"blotName","image"),Ae(B0,"tagName","IMG"),B0);const ow=["height","width"];class Z0 extends gd{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return ow.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static sanitize(e){return rg.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){ow.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}Ae(Z0,"blotName","video"),Ae(Z0,"className","ql-video"),Ae(Z0,"tagName","IFRAME");const vp=new zd("code-token","hljs",{scope:Jn.INLINE});class Rh extends ih{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(au.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,r){super(e,t,r),vp.add(this.domNode,r)}format(e,t){e!==Rh.blotName?super.format(e,t):t?vp.add(this.domNode,t):(vp.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),vp.value(this.domNode)||this.unwrap()}}Rh.blotName="code-token";Rh.className="ql-token";class hd extends au{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),Rh.blotName,!1),super.replaceWith(e,t)}}class yp extends Yg{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===hd.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(e,t)}))}formatAt(e,t,r,i){r===hd.blotName&&(this.forceNext=!0),super.formatAt(e,t,r,i)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(l=>l!==this.uiNode).map(l=>l.textContent).join(`
|
|
328
328
|
`)}
|
|
329
329
|
`,o=hd.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){const l=this.children.reduce((u,h)=>u.concat(M_(h,!1)),new Kn),a=e(i,o);l.diff(a).reduce((u,h)=>{let{retain:y,attributes:x}=h;return y?(x&&Object.keys(x).forEach(w=>{[hd.blotName,Rh.blotName].includes(w)&&this.formatAt(u,y,w,x[w])}),u+y):u},0)}this.cachedText=i,this.forceNext=!1}}html(e,t){const[r]=this.children.find(e);return`<pre data-language="${r?hd.formats(r.domNode):"plain"}">
|
|
330
330
|
${Mv(this.code(e,t))}
|
|
331
|
-
</pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=hd.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}yp.allowedChildren=[hd];hd.requiredContainer=yp;hd.allowedChildren=[Rh,_1,Dd,Hd];const
|
|
331
|
+
</pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=hd.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}yp.allowedChildren=[hd];hd.requiredContainer=yp;hd.allowedChildren=[Rh,_1,Dd,Hd];const wN=(n,e,t)=>{if(typeof n.versionString=="string"){const r=n.versionString.split(".")[0];if(parseInt(r,10)>=11)return n.highlight(t,{language:e}).value}return n.highlight(e,t).value};class Q_ extends Wd{static register(){qe.register(Rh,!0),qe.register(hd,!0),qe.register(yp,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,i)=>{let{key:o}=i;return r[o]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(qe.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof yp))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:i,label:o}=r;const l=t.ownerDocument.createElement("option");l.textContent=o,l.setAttribute("value",i),t.appendChild(l)}),t.addEventListener("change",()=>{e.format(hd.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=hd.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(qe.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(qe.sources.USER);const r=this.quill.getSelection();(e==null?this.quill.scroll.descendants(yp):[e]).forEach(o=>{o.highlight(this.highlightBlot,t)}),this.quill.update(qe.sources.SILENT),r!=null&&this.quill.setSelection(r,qe.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return Mv(e).split(`
|
|
332
332
|
`).reduce((i,o,l)=>(l!==0&&i.insert(`
|
|
333
|
-
`,{[au.blotName]:t}),i.insert(o)),new Kn);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(au.className),r.innerHTML=
|
|
333
|
+
`,{[au.blotName]:t}),i.insert(o)),new Kn);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(au.className),r.innerHTML=wN(this.options.hljs,t,e),Um(this.quill.scroll,r,[(i,o)=>{const l=vp.value(i);return l?o.compose(new Kn().retain(o.length(),{[Rh.blotName]:l})):o}],[(i,o)=>i.data.split(`
|
|
334
334
|
`).reduce((l,a,u)=>(u!==0&&l.insert(`
|
|
335
|
-
`,{[au.blotName]:t}),l.insert(a)),o)],new WeakMap)}}Q_.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const _p=class _p extends kc{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",Gm()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===_p.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Ae(_p,"blotName","table"),Ae(_p,"tagName","TD");let Ld=_p;class Ih extends Gg{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),i=this.next.children.tail.formats();return e.table===t.table&&e.table===r.table&&e.table===i.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const r=t.formats(),i=t.next.formats();if(r.table!==i.table){const o=this.splitAfter(t);o&&o.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Ae(Ih,"blotName","table-row"),Ae(Ih,"tagName","TR");class eh extends Gg{}Ae(eh,"blotName","table-body"),Ae(eh,"tagName","TBODY");class E1 extends Gg{balanceCells(){const e=this.descendants(Ih),t=e.reduce((r,i)=>Math.max(i.children.length,r),0);e.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let i;r.children.head!=null&&(i=Ld.formats(r.children.head.domNode));const o=this.scroll.create(Ld.blotName,i);r.appendChild(o),o.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(eh);t==null||t.children.head==null||t.children.forEach(r=>{const i=r.children.at(e);i!=null&&i.remove()})}insertColumn(e){const[t]=this.descendant(eh);t==null||t.children.head==null||t.children.forEach(r=>{const i=r.children.at(e),o=Ld.formats(r.children.head.domNode),l=this.scroll.create(Ld.blotName,o);r.insertBefore(l,i)})}insertRow(e){const[t]=this.descendant(eh);if(t==null||t.children.head==null)return;const r=Gm(),i=this.scroll.create(Ih.blotName);t.children.head.children.forEach(()=>{const l=this.scroll.create(Ld.blotName,r);i.appendChild(l)});const o=t.children.at(e);t.insertBefore(i,o)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Ae(E1,"blotName","table-container"),Ae(E1,"tagName","TABLE");E1.allowedChildren=[eh];eh.requiredContainer=E1;eh.allowedChildren=[Ih];Ih.requiredContainer=eh;Ih.allowedChildren=[Ld];Ld.requiredContainer=Ih;function Gm(){return`row-${Math.random().toString(36).slice(2,6)}`}class
|
|
336
|
-
`).join("");return o.insert(l,{table:Gm()})},new Kn().retain(r.index));this.quill.updateContents(i,qe.sources.USER),this.quill.setSelection(r.index,qe.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(qe.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(qe.events.TEXT_CHANGE,(r,i,o)=>{o===qe.sources.USER&&this.balanceTables()}),!0):!1)})}}const lw=Mh("quill:toolbar");let Ym=class extends Wd{constructor(e,t){var r,i;if(super(e,t),Array.isArray(this.options.container)){const o=document.createElement("div");o.setAttribute("role","toolbar"),mN(o,this.options.container),(i=(r=e.container)==null?void 0:r.parentNode)==null||i.insertBefore(o,e.container),this.container=o}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){lw.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(o=>{var a;const l=(a=this.options.handlers)==null?void 0:a[o];l&&this.addHandler(o,l)}),Array.from(this.container.querySelectorAll("button, select")).forEach(o=>{this.attach(o)}),this.quill.on(qe.events.EDITOR_CHANGE,()=>{const[o]=this.quill.selection.getRange();this.update(o)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(i=>i.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){lw.warn("ignoring attaching to nonexistent format",t,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,i=>{let o;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?o=!1:o=a.value||!1}else e.classList.contains("ql-active")?o=!1:o=e.value||!e.hasAttribute("value"),i.preventDefault();this.quill.focus();const[l]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,o);else if(this.quill.scroll.query(t).prototype instanceof Bf){if(o=prompt(`Enter ${t}`),!o)return;this.quill.updateContents(new Kn().retain(l.index).delete(l.length).insert({[t]:o}),qe.sources.USER)}else this.quill.format(t,o,qe.sources.USER);this.update(l)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[i,o]=r;if(o.tagName==="SELECT"){let l=null;if(e==null)l=null;else if(t[i]==null)l=o.querySelector("option[selected]");else if(!Array.isArray(t[i])){let a=t[i];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),l=o.querySelector(`option[value="${a}"]`)}l==null?(o.value="",o.selectedIndex=-1):l.selected=!0}else if(e==null)o.classList.remove("ql-active"),o.setAttribute("aria-pressed","false");else if(o.hasAttribute("value")){const l=t[i],a=l===o.getAttribute("value")||l!=null&&l.toString()===o.getAttribute("value")||l==null&&!o.getAttribute("value");o.classList.toggle("ql-active",a),o.setAttribute("aria-pressed",a.toString())}else{const l=t[i]!=null;o.classList.toggle("ql-active",l),o.setAttribute("aria-pressed",l.toString())}})}};Ym.DEFAULTS={};function sw(n,e,t){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${e}: ${t}`)):r.setAttribute("aria-label",e),n.appendChild(r)}function mN(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(i=>{if(typeof i=="string")sw(r,i);else{const o=Object.keys(i)[0],l=i[o];Array.isArray(l)?xN(r,o,l):sw(r,o,l)}}),n.appendChild(r)})}function xN(n,e,t){const r=document.createElement("select");r.classList.add(`ql-${e}`),t.forEach(i=>{const o=document.createElement("option");i!==!1?o.setAttribute("value",String(i)):o.setAttribute("selected","selected"),r.appendChild(o)}),n.appendChild(r)}Ym.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,Jn.INLINE)!=null&&this.quill.format(t,!1,qe.sources.USER)})}else this.quill.removeFormat(n.index,n.length,qe.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",qe.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,qe.sources.USER),this.quill.format("direction",n,qe.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),r=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let i=n==="+1"?1:-1;t.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,qe.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,qe.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,qe.sources.USER):this.quill.format("list","unchecked",qe.sources.USER):this.quill.format("list",n,qe.sources.USER)}}};const wN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',CN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',_N='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',SN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',EN='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',AN='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',TN='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',RN='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',aw='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',IN='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',kN='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',MN='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',LN='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',ON='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',PN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',DN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',NN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',FN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',BN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',zN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',HN='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',WN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',UN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',GN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',YN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',VN='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ZN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',XN='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',KN='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',JN='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',QN='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',qN='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',jN='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Op={align:{"":wN,center:CN,right:_N,justify:SN},background:EN,blockquote:AN,bold:TN,clean:RN,code:aw,"code-block":aw,color:IN,direction:{"":kN,rtl:MN},formula:LN,header:{1:ON,2:PN,3:DN,4:NN,5:FN,6:BN},italic:zN,image:HN,indent:{"+1":WN,"-1":UN},link:GN,list:{bullet:YN,check:VN,ordered:ZN},script:{sub:XN,super:KN},strike:JN,table:QN,underline:qN,video:jN},$N='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let cw=0;function uw(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class Lv{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),uw(this.label,"aria-expanded"),uw(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const r=e.getAttribute("value");return r&&t.setAttribute("data-value",r),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(t,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=$N,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${cw}`,cw+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const r=this.buildItem(t);e.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class q_ extends Lv{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const r=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class j_ extends Lv{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const eF=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class $_{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,eF(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect();let l=0;if(o.right>i.right&&(l=i.right-o.right,this.root.style.left=`${t+l}px`),o.left<i.left&&(l=i.left-o.left,this.root.style.left=`${t+l}px`),o.bottom>i.bottom){const a=o.bottom-o.top,u=e.bottom-e.top+a;this.root.style.top=`${r-u}px`,this.root.classList.add("ql-flip")}return l}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const tF=[!1,"center","right","justify"],nF=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],rF=[!1,"serif","monospace"],iF=["1","2","3",!1],oF=["small",!1,"large","huge"];class Yp extends S1{constructor(e,t){super(e,t);const r=i=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(o=>{o.container.contains(i.target)||o.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(o=>{if(o.startsWith("ql-")&&(o=o.slice(3),t[o]!=null))if(o==="direction")r.innerHTML=t[o][""]+t[o].rtl;else if(typeof t[o]=="string")r.innerHTML=t[o];else{const l=r.value||"";l!=null&&t[o][l]&&(r.innerHTML=t[o][l])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&lp(i,tF),typeof t.align=="object"))return new j_(i,t.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const o=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&lp(i,nF,o==="background"?"#ffffff":"#000000"),new q_(i,t[o])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?lp(i,rF):i.classList.contains("ql-header")?lp(i,iF):i.classList.contains("ql-size")&&lp(i,oF)),new Lv(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(zn.events.EDITOR_CHANGE,r)}}Yp.DEFAULTS=og({},S1.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class e4 extends $_{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,zn.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,zn.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=lF(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,zn.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",zn.sources.USER),this.quill.setSelection(r+2,zn.sources.USER)}break}}this.textbox.value="",this.hide()}}function lF(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function lp(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const i=document.createElement("option");r===t?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),n.appendChild(i)})}const sF=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class t4 extends e4{constructor(e,t){super(e,t),this.quill.on(zn.events.EDITOR_CHANGE,(r,i,o,l)=>{if(r===zn.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&l===zn.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(i.index,i.length);if(a.length===1){const u=this.quill.getBounds(i);u!=null&&this.position(u)}else{const u=a[a.length-1],h=this.quill.getIndex(u),y=Math.min(u.length()-1,i.index+i.length-h),x=this.quill.getBounds(new Ng(h,y));x!=null&&this.position(x)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(zn.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}}Ae(t4,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class n4 extends Yp{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=sF),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new t4(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Op),this.buildPickers(e.container.querySelectorAll("select"),Op))}}n4.DEFAULTS=og({},Yp.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,qe.sources.USER)}}}}});const aF=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class r4 extends e4{constructor(){super(...arguments);Ae(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,zn.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(zn.events.SELECTION_CHANGE,(t,r,i)=>{if(t!=null){if(t.length===0&&i===zn.sources.USER){const[o,l]=this.quill.scroll.descendant(rg,t.index);if(o!=null){this.linkRange=new Ng(t.index-l,o.length());const a=rg.formats(o.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const u=this.quill.getBounds(this.linkRange);u!=null&&this.position(u);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Ae(r4,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class i4 extends Yp{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=aF),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Op),this.buildPickers(e.container.querySelectorAll("select"),Op),this.tooltip=new r4(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{e.handlers.link.call(e,!r.format.link)}))}}i4.DEFAULTS=og({},Yp.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,qe.sources.USER)}}}}});qe.register({"attributors/attribute/direction":N_,"attributors/class/align":O_,"attributors/class/background":SD,"attributors/class/color":_D,"attributors/class/direction":F_,"attributors/class/font":H_,"attributors/class/size":U_,"attributors/style/align":P_,"attributors/style/background":Bm,"attributors/style/color":Fm,"attributors/style/direction":B_,"attributors/style/font":W_,"attributors/style/size":G_},!0);qe.register({"formats/align":O_,"formats/direction":F_,"formats/indent":pN,"formats/background":Bm,"formats/color":Fm,"formats/font":H_,"formats/size":U_,"formats/blockquote":Jy,"formats/code-block":au,"formats/header":Qy,"formats/list":Gp,"formats/bold":Lp,"formats/code":zm,"formats/italic":qy,"formats/link":rg,"formats/script":jy,"formats/strike":$y,"formats/underline":em,"formats/formula":V0,"formats/image":vN,"formats/video":Z0,"modules/syntax":Q_,"modules/table":yN,"modules/toolbar":Ym,"themes/bubble":n4,"themes/snow":i4,"ui/icons":Op,"ui/picker":Lv,"ui/icon-picker":j_,"ui/color-picker":q_,"ui/tooltip":$_},!0);class Ov extends N.Component{constructor(e){super(e),this.editingAreaRef=N.createRef(),this.containerRef=N.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(r,i,o,l)=>{var a,u;r==="text-change"?(a=this.onEditorChangeText)==null||a.call(this,this.editor.root.innerHTML,i,l,this.unprivilegedEditor):r==="selection-change"&&((u=this.onEditorChangeSelection)==null||u.call(this,i,l,this.unprivilegedEditor))};const t=this.isControlled()?e.value:e.defaultValue;this.value=t??""}validateProps(e){if(N.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(N.Children.count(e.children)){const t=N.Children.only(e.children);if((t==null?void 0:t.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(e,t){if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){const r=this.getEditorContents(),i=e.value??"";this.isEqualValue(i,r)||this.setEditorContents(this.editor,i)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),[...this.cleanProps,...this.dirtyProps].some(r=>!$h(e[r],this.props[r]))}shouldComponentRegenerate(e){return this.dirtyProps.some(t=>!$h(e[t],this.props[t]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(e,t){if(this.editor&&this.shouldComponentRegenerate(e)){const r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.editor&&e.placeholder!==this.props.placeholder&&(this.editor.root.dataset.placeholder=this.props.placeholder||""),this.state.generation!==t.generation){const{delta:r,selection:i}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const o=this.editor;o.setContents(r),fw(()=>this.setEditorSelection(o,i))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){var r,i;if(!this.editor)return;this.unhookEditor(this.editor);const e=(r=this.props.modules)==null?void 0:r.toolbar;if(!(typeof e=="object"&&e&&"container"in e&&typeof e.container=="string"||typeof e=="string")){const o=(i=this.containerRef.current)==null?void 0:i.querySelector(".ql-toolbar");o&&o.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(e,t){const r=new qe(e,t);return t.tabIndex!=null&&this.setEditorTabIndex(r,t.tabIndex),this.hookEditor(r),r}hookEditor(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)}unhookEditor(e){e.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(e){return e&&e.ops}isEqualValue(e,t){return this.isDelta(e)&&this.isDelta(t)?$h(e.ops,t.ops):$h(e,t)}setEditorContents(e,t){this.value=t;const r=this.getEditorSelection();typeof t=="string"?e.setContents(e.clipboard.convert({html:t})):e.setContents(t),fw(()=>this.setEditorSelection(e,r))}setEditorSelection(e,t){if(this.selection=t,t){const r=e.getLength();t.index=Math.max(0,Math.min(t.index,r-1)),t.length=Math.max(0,Math.min(t.length,r-1-t.index)),e.setSelection(t)}}setEditorTabIndex(e,t){var r;(r=e==null?void 0:e.scroll)!=null&&r.domNode&&(e.scroll.domNode.tabIndex=t)}setEditorReadOnly(e,t){t?e.disable():e.enable()}makeUnprivilegedEditor(e){const t=e;return{getHTML:()=>t.root.innerHTML,getSemanticHTML:t.getSemanticHTML.bind(t),getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}}getEditingArea(){const e=this.editingAreaRef.current;if(!e)throw new Error("Cannot find element for editing area");if(e.nodeType===3)throw new Error("Editing area cannot be a text node");return e}renderEditingArea(){const{children:e,preserveWhitespace:t}=this.props,{generation:r}=this.state,i={key:r,ref:this.editingAreaRef};return N.Children.count(e)?N.cloneElement(N.Children.only(e),i):t?N.createElement("pre",{...i}):N.createElement("div",{...i})}render(){return N.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(e,t,r,i){var l,a;if(!this.editor)return;const o=this.isDelta(this.value)?i.getContents():i.getHTML();o!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=o,(a=(l=this.props).onChange)==null||a.call(l,e,t,r,i))}onEditorChangeSelection(e,t,r){var a,u,h,y,x,w;if(!this.editor)return;const i=this.getEditorSelection(),o=!i&&e,l=i&&!e;$h(e,i)||(this.selection=e,(u=(a=this.props).onChangeSelection)==null||u.call(a,e,t,r),o?(y=(h=this.props).onFocus)==null||y.call(h,e,t,r):l&&((w=(x=this.props).onBlur)==null||w.call(x,i,t,r)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}Ov.displayName="React Quill";Ov.Quill=qe;Ov.defaultProps={theme:"snow",modules:{},readOnly:!1};function fw(n){Promise.resolve().then(n)}class o4{constructor(e,t={}){Ae(this,"quill");Ae(this,"options");Ae(this,"_toolbarEl",null);Ae(this,"_button",null);Ae(this,"_resizeObserver",null);Ae(this,"_placeholder",null);Ae(this,"_keyboardHandler",null);if(this.quill=e,this.options=t,this.options.type==="Raw")return;if(this.options.type==="ReadOnly"){this._createButton();return}const r=e.getModule("toolbar");if(!r){console.warn("Toolbar module not found");return}if(this._toolbarEl=r.container,!this._toolbarEl){console.warn("Toolbar container not found");return}this._createButton()}_createButton(){switch(this.options.type){case"ReadOnly":this._createReadOnlyButton();break;case"Error":case"Primary":this._createToolbarButton();break}}_createToolbarButton(){this._toolbarEl&&(!this.options.maximize||!this.options.minimize||(this._button=document.createElement("button"),this._button.type="button",this._button.classList.add("ql-fullscreen","ql-right-action"),this._button.onclick=this._toggleFullscreen.bind(this),this._button.innerHTML=this.options.maximize??"",this._button.title=this.options.buttonTitle||"",this._toolbarEl.classList.add("ql-toolbar-has-right-action"),this._toolbarEl.append(this._button)))}_createReadOnlyButton(){var i;const e=(i=this.quill.root)==null?void 0:i.closest(".ql-container");if(!e||!this.options.maximize||!this.options.minimize)return;this._button=document.createElement("button"),this._button.type="button",this._button.classList.add("ql-fullscreen","ql-readonly-fullscreen"),this._button.onclick=this._toggleFullscreen.bind(this),this._button.innerHTML=this.options.maximize??"",this._button.title=this.options.buttonTitle||"",e.appendChild(this._button),this._checkScrollbar(),this._checkVisibility(),requestAnimationFrame(()=>{this._checkScrollbar(),this._checkVisibility()});const t=this.quill.root,r=t.closest(".ql-container");this._resizeObserver=new ResizeObserver(()=>{this._checkScrollbar(),this._checkVisibility()}),this._resizeObserver.observe(t),r&&this._resizeObserver.observe(r)}_checkScrollbar(){const e=this.quill.root,t=e==null?void 0:e.closest(".ql-container");if(!e||!t||!this._button)return;e.scrollHeight>e.clientHeight?(t.classList.add("ql-has-v-scrollbar"),this._button.style.removeProperty("right")):(t.classList.remove("ql-has-v-scrollbar"),this._button.style.removeProperty("right"))}_checkVisibility(){var I;const e=(I=this.quill.root)==null?void 0:I.closest(".ql-container"),t=this.quill.root;if(!e||!this._button||!t)return;const o=window.getComputedStyle(t).getPropertyValue("padding").split(" ").map(O=>parseFloat(O)||0);let l=0;o.length===1||o.length===2?l=o[0]*2:o.length===4&&(l=o[0]+o[2]);const h=2*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16)+l,y=e.offsetHeight,w=(this._button.offsetWidth||this._button.scrollWidth)+12+12,_=e.offsetWidth,S=y>=h,R=_>=w;!S||!R?e.classList.add("ql-no-space"):e.classList.remove("ql-no-space")}_toggleFullscreen(e){var o;e.preventDefault();const t=(o=this.quill.root)==null?void 0:o.closest(".ql-container");if(!t)throw new Error("Quill editor container not exist");let r=t.closest(".ql-editor-wrap");if(r){if(t instanceof HTMLElement&&(t.classList.remove("is-fullscreen"),t.style.height=""),this._placeholder){const l=t.parentElement;this._placeholder.after(l),this._placeholder.remove(),this._placeholder=null}r.remove(),this._button&&(this._button.classList.remove("ql-active"),this._button.innerHTML=this.options.maximize??""),document.documentElement.style.removeProperty("overflow"),this._removeKeyboardHandler();return}r=document.createElement("div"),r.classList.add("ql-editor-wrap"),t instanceof HTMLElement&&(t.style.height="100%",t.classList.add("is-fullscreen"));const i=t.parentElement;this._placeholder=document.createComment("ql-fullscreen-placeholder"),i.after(this._placeholder),r.append(i),document.body.append(r),this._button&&(this._button.classList.add("ql-active"),this._button.innerHTML=this.options.minimize??""),document.documentElement.style.overflow="hidden",this._setupKeyboardHandler()}_setupKeyboardHandler(){this._keyboardHandler||(this._keyboardHandler=e=>{var i;if(e.key!=="Escape")return;const t=(i=this.quill.root)==null?void 0:i.closest(".ql-container");!t||!t.closest(".ql-editor-wrap")||this._exitFullscreen()},document.addEventListener("keydown",this._keyboardHandler))}_removeKeyboardHandler(){this._keyboardHandler&&(document.removeEventListener("keydown",this._keyboardHandler),this._keyboardHandler=null)}_exitFullscreen(){var r;const e=(r=this.quill.root)==null?void 0:r.closest(".ql-container");if(!e)return;const t=e.closest(".ql-editor-wrap");if(t){if(e instanceof HTMLElement&&(e.classList.remove("is-fullscreen"),e.style.height=""),this._placeholder){const i=e.parentElement;this._placeholder.after(i),this._placeholder.remove(),this._placeholder=null}t.remove(),this._button&&(this._button.classList.remove("ql-active"),this._button.innerHTML=this.options.maximize??""),document.documentElement.style.removeProperty("overflow"),this._removeKeyboardHandler()}}}window.QuillToggleFullscreenButton=o4;var Rb={exports:{}},dw;function cF(){return dw||(dw=1,(function(n,e){(function(t,r){n.exports=r()})(window,(function(){return(function(t){var r={};function i(o){if(r[o])return r[o].exports;var l=r[o]={i:o,l:!1,exports:{}};return t[o].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=t,i.c=r,i.d=function(o,l,a){i.o(o,l)||Object.defineProperty(o,l,{enumerable:!0,get:a})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,l){if(1&l&&(o=i(o)),8&l||4&l&&typeof o=="object"&&o&&o.__esModule)return o;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:o}),2&l&&typeof o!="string")for(var u in o)i.d(a,u,(function(h){return o[h]}).bind(null,u));return a},i.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(l,"a",l),l},i.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},i.p="",i(i.s=17)})([function(t,r,i){var o=i(7),l=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",a=Object.prototype.toString,u=Array.prototype.concat,h=Object.defineProperty,y=i(25)(),x=h&&y,w=function(S,R,I,O){var P;(!(R in S)||typeof(P=O)=="function"&&a.call(P)==="[object Function]"&&O())&&(x?h(S,R,{configurable:!0,enumerable:!1,value:I,writable:!0}):S[R]=I)},_=function(S,R){var I=arguments.length>2?arguments[2]:{},O=o(R);l&&(O=u.call(O,Object.getOwnPropertySymbols(R)));for(var P=0;P<O.length;P+=1)w(S,O[P],R[O[P]],I[O[P]])};_.supportsDescriptors=!!x,t.exports=_},function(t,r,i){var o=i(9);t.exports=function(){return o()&&!!Symbol.toStringTag}},function(t,r,i){var o=SyntaxError,l=Function,a=TypeError,u=function(ne){try{return l('"use strict"; return ('+ne+").constructor;")()}catch{}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch{h=null}var y=function(){throw new a},x=h?(function(){try{return y}catch{try{return h(arguments,"callee").get}catch{return y}}})():y,w=i(21)(),_=Object.getPrototypeOf||function(ne){return ne.__proto__},S={},R=typeof Uint8Array>"u"?void 0:_(Uint8Array),I={"%AggregateError%":typeof AggregateError>"u"?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":w?_([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?void 0:Atomics,"%BigInt%":typeof BigInt>"u"?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?void 0:Float32Array,"%Float64Array%":typeof Float64Array>"u"?void 0:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?void 0:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?void 0:Int8Array,"%Int16Array%":typeof Int16Array>"u"?void 0:Int16Array,"%Int32Array%":typeof Int32Array>"u"?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w?_(_([][Symbol.iterator]())):void 0,"%JSON%":typeof JSON=="object"?JSON:void 0,"%Map%":typeof Map>"u"?void 0:Map,"%MapIteratorPrototype%":typeof Map<"u"&&w?_(new Map()[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?void 0:Promise,"%Proxy%":typeof Proxy>"u"?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?void 0:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?void 0:Set,"%SetIteratorPrototype%":typeof Set<"u"&&w?_(new Set()[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w?_(""[Symbol.iterator]()):void 0,"%Symbol%":w?Symbol:void 0,"%SyntaxError%":o,"%ThrowTypeError%":x,"%TypedArray%":R,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?void 0:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?void 0:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?void 0:WeakMap,"%WeakRef%":typeof WeakRef>"u"?void 0:WeakRef,"%WeakSet%":typeof WeakSet>"u"?void 0:WeakSet},O={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=i(3),Y=i(23),z=P.call(Function.call,Array.prototype.concat),W=P.call(Function.apply,Array.prototype.splice),B=P.call(Function.call,String.prototype.replace),ee=P.call(Function.call,String.prototype.slice),H=P.call(Function.call,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,de=/\\(\\)?/g,Z=function(ne){var fe=ee(ne,0,1),ae=ee(ne,-1);if(fe==="%"&&ae!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(ae==="%"&&fe!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var j=[];return B(ne,V,(function(re,he,be,le){j[j.length]=be?B(le,de,"$1"):he||re})),j},te=function(ne,fe){var ae,j=ne;if(Y(O,j)&&(j="%"+(ae=O[j])[0]+"%"),Y(I,j)){var re=I[j];if(re===S&&(re=(function he(be){var le;if(be==="%AsyncFunction%")le=u("async function () {}");else if(be==="%GeneratorFunction%")le=u("function* () {}");else if(be==="%AsyncGeneratorFunction%")le=u("async function* () {}");else if(be==="%AsyncGenerator%"){var J=he("%AsyncGeneratorFunction%");J&&(le=J.prototype)}else if(be==="%AsyncIteratorPrototype%"){var pe=he("%AsyncGenerator%");pe&&(le=_(pe.prototype))}return I[be]=le,le})(j)),re===void 0&&!fe)throw new a("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:ae,name:j,value:re}}throw new o("intrinsic "+ne+" does not exist!")};t.exports=function(ne,fe){if(typeof ne!="string"||ne.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof fe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/g,ne)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ae=Z(ne),j=ae.length>0?ae[0]:"",re=te("%"+j+"%",fe),he=re.name,be=re.value,le=!1,J=re.alias;J&&(j=J[0],W(ae,z([0,1],J)));for(var pe=1,Te=!0;pe<ae.length;pe+=1){var Fe=ae[pe],_e=ee(Fe,0,1),Me=ee(Fe,-1);if((_e==='"'||_e==="'"||_e==="`"||Me==='"'||Me==="'"||Me==="`")&&_e!==Me)throw new o("property names with quotes must have matching quotes");if(Fe!=="constructor"&&Te||(le=!0),Y(I,he="%"+(j+="."+Fe)+"%"))be=I[he];else if(be!=null){if(!(Fe in be)){if(!fe)throw new a("base intrinsic for "+ne+" exists, but the property is not available.");return}if(h&&pe+1>=ae.length){var De=h(be,Fe);be=(Te=!!De)&&"get"in De&&!("originalValue"in De.get)?De.get:be[Fe]}else Te=Y(be,Fe),be=be[Fe];Te&&!le&&(I[he]=be)}}return be}},function(t,r,i){var o=i(22);t.exports=Function.prototype.bind||o},function(t,r,i){var o=i(3),l=i(2),a=l("%Function.prototype.apply%"),u=l("%Function.prototype.call%"),h=l("%Reflect.apply%",!0)||o.call(u,a),y=l("%Object.getOwnPropertyDescriptor%",!0),x=l("%Object.defineProperty%",!0),w=l("%Math.max%");if(x)try{x({},"a",{value:1})}catch{x=null}t.exports=function(S){var R=h(o,u,arguments);if(y&&x){var I=y(R,"length");I.configurable&&x(R,"length",{value:1+w(0,S.length-(arguments.length-1))})}return R};var _=function(){return h(o,a,arguments)};x?x(t.exports,"apply",{value:_}):t.exports.apply=_},function(t,r,i){var o=i(18),l=i(6),a=i(15),u=i(32),h="\0",y=function(x){Array.isArray(x)?this.ops=x:x!=null&&Array.isArray(x.ops)?this.ops=x.ops:this.ops=[]};y.prototype.insert=function(x,w){var _={};return x.length===0?this:(_.insert=x,w!=null&&typeof w=="object"&&Object.keys(w).length>0&&(_.attributes=w),this.push(_))},y.prototype.delete=function(x){return x<=0?this:this.push({delete:x})},y.prototype.retain=function(x,w){if(x<=0)return this;var _={retain:x};return w!=null&&typeof w=="object"&&Object.keys(w).length>0&&(_.attributes=w),this.push(_)},y.prototype.push=function(x){var w=this.ops.length,_=this.ops[w-1];if(x=a(!0,{},x),typeof _=="object"){if(typeof x.delete=="number"&&typeof _.delete=="number")return this.ops[w-1]={delete:_.delete+x.delete},this;if(typeof _.delete=="number"&&x.insert!=null&&(w-=1,typeof(_=this.ops[w-1])!="object"))return this.ops.unshift(x),this;if(l(x.attributes,_.attributes)){if(typeof x.insert=="string"&&typeof _.insert=="string")return this.ops[w-1]={insert:_.insert+x.insert},typeof x.attributes=="object"&&(this.ops[w-1].attributes=x.attributes),this;if(typeof x.retain=="number"&&typeof _.retain=="number")return this.ops[w-1]={retain:_.retain+x.retain},typeof x.attributes=="object"&&(this.ops[w-1].attributes=x.attributes),this}}return w===this.ops.length?this.ops.push(x):this.ops.splice(w,0,x),this},y.prototype.chop=function(){var x=this.ops[this.ops.length-1];return x&&x.retain&&!x.attributes&&this.ops.pop(),this},y.prototype.filter=function(x){return this.ops.filter(x)},y.prototype.forEach=function(x){this.ops.forEach(x)},y.prototype.map=function(x){return this.ops.map(x)},y.prototype.partition=function(x){var w=[],_=[];return this.forEach((function(S){(x(S)?w:_).push(S)})),[w,_]},y.prototype.reduce=function(x,w){return this.ops.reduce(x,w)},y.prototype.changeLength=function(){return this.reduce((function(x,w){return w.insert?x+u.length(w):w.delete?x-w.delete:x}),0)},y.prototype.length=function(){return this.reduce((function(x,w){return x+u.length(w)}),0)},y.prototype.slice=function(x,w){x=x||0,typeof w!="number"&&(w=1/0);for(var _=[],S=u.iterator(this.ops),R=0;R<w&&S.hasNext();){var I;R<x?I=S.next(x-R):(I=S.next(w-R),_.push(I)),R+=u.length(I)}return new y(_)},y.prototype.compose=function(x){var w=u.iterator(this.ops),_=u.iterator(x.ops),S=[],R=_.peek();if(R!=null&&typeof R.retain=="number"&&R.attributes==null){for(var I=R.retain;w.peekType()==="insert"&&w.peekLength()<=I;)I-=w.peekLength(),S.push(w.next());R.retain-I>0&&_.next(R.retain-I)}for(var O=new y(S);w.hasNext()||_.hasNext();)if(_.peekType()==="insert")O.push(_.next());else if(w.peekType()==="delete")O.push(w.next());else{var P=Math.min(w.peekLength(),_.peekLength()),Y=w.next(P),z=_.next(P);if(typeof z.retain=="number"){var W={};typeof Y.retain=="number"?W.retain=P:W.insert=Y.insert;var B=u.attributes.compose(Y.attributes,z.attributes,typeof Y.retain=="number");if(B&&(W.attributes=B),O.push(W),!_.hasNext()&&l(O.ops[O.ops.length-1],W)){var ee=new y(w.rest());return O.concat(ee).chop()}}else typeof z.delete=="number"&&typeof Y.retain=="number"&&O.push(z)}return O.chop()},y.prototype.concat=function(x){var w=new y(this.ops.slice());return x.ops.length>0&&(w.push(x.ops[0]),w.ops=w.ops.concat(x.ops.slice(1))),w},y.prototype.diff=function(x,w){if(this.ops===x.ops)return new y;var _=[this,x].map((function(P){return P.map((function(Y){if(Y.insert!=null)return typeof Y.insert=="string"?Y.insert:h;throw new Error("diff() called "+(P===x?"on":"with")+" non-document")})).join("")})),S=new y,R=o(_[0],_[1],w),I=u.iterator(this.ops),O=u.iterator(x.ops);return R.forEach((function(P){for(var Y=P[1].length;Y>0;){var z=0;switch(P[0]){case o.INSERT:z=Math.min(O.peekLength(),Y),S.push(O.next(z));break;case o.DELETE:z=Math.min(Y,I.peekLength()),I.next(z),S.delete(z);break;case o.EQUAL:z=Math.min(I.peekLength(),O.peekLength(),Y);var W=I.next(z),B=O.next(z);l(W.insert,B.insert)?S.retain(z,u.attributes.diff(W.attributes,B.attributes)):S.push(B).delete(z)}Y-=z}})),S.chop()},y.prototype.eachLine=function(x,w){w=w||`
|
|
335
|
+
`,{[au.blotName]:t}),l.insert(a)),o)],new WeakMap)}}Q_.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const _p=class _p extends kc{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",Gm()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===_p.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Ae(_p,"blotName","table"),Ae(_p,"tagName","TD");let Ld=_p;class Ih extends Gg{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),i=this.next.children.tail.formats();return e.table===t.table&&e.table===r.table&&e.table===i.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const r=t.formats(),i=t.next.formats();if(r.table!==i.table){const o=this.splitAfter(t);o&&o.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Ae(Ih,"blotName","table-row"),Ae(Ih,"tagName","TR");class eh extends Gg{}Ae(eh,"blotName","table-body"),Ae(eh,"tagName","TBODY");class E1 extends Gg{balanceCells(){const e=this.descendants(Ih),t=e.reduce((r,i)=>Math.max(i.children.length,r),0);e.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let i;r.children.head!=null&&(i=Ld.formats(r.children.head.domNode));const o=this.scroll.create(Ld.blotName,i);r.appendChild(o),o.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(eh);t==null||t.children.head==null||t.children.forEach(r=>{const i=r.children.at(e);i!=null&&i.remove()})}insertColumn(e){const[t]=this.descendant(eh);t==null||t.children.head==null||t.children.forEach(r=>{const i=r.children.at(e),o=Ld.formats(r.children.head.domNode),l=this.scroll.create(Ld.blotName,o);r.insertBefore(l,i)})}insertRow(e){const[t]=this.descendant(eh);if(t==null||t.children.head==null)return;const r=Gm(),i=this.scroll.create(Ih.blotName);t.children.head.children.forEach(()=>{const l=this.scroll.create(Ld.blotName,r);i.appendChild(l)});const o=t.children.at(e);t.insertBefore(i,o)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Ae(E1,"blotName","table-container"),Ae(E1,"tagName","TABLE");E1.allowedChildren=[eh];eh.requiredContainer=E1;eh.allowedChildren=[Ih];Ih.requiredContainer=eh;Ih.allowedChildren=[Ld];Ld.requiredContainer=Ih;function Gm(){return`row-${Math.random().toString(36).slice(2,6)}`}class CN extends Wd{static register(){qe.register(Ld),qe.register(Ih),qe.register(eh),qe.register(E1)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(E1).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(qe.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(qe.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(qe.sources.USER),this.quill.setSelection(t,qe.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,r]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==Ld.blotName)return[null,null,null,-1];const i=t.parent;return[i.parent.parent,i,t,r]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[r,i,o]=this.getTable(t);if(o==null)return;const l=o.cellOffset();r.insertColumn(l+e),this.quill.update(qe.sources.USER);let a=i.rowOffset();e===0&&(a+=1),this.quill.setSelection(t.index+a,t.length,qe.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[r,i,o]=this.getTable(t);if(o==null)return;const l=i.rowOffset();r.insertRow(l+e),this.quill.update(qe.sources.USER),e>0?this.quill.setSelection(t,qe.sources.SILENT):this.quill.setSelection(t.index+i.children.length,t.length,qe.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const r=this.quill.getSelection();if(r==null)return;const i=new Array(e).fill(0).reduce(o=>{const l=new Array(t).fill(`
|
|
336
|
+
`).join("");return o.insert(l,{table:Gm()})},new Kn().retain(r.index));this.quill.updateContents(i,qe.sources.USER),this.quill.setSelection(r.index,qe.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(qe.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(qe.events.TEXT_CHANGE,(r,i,o)=>{o===qe.sources.USER&&this.balanceTables()}),!0):!1)})}}const lw=Mh("quill:toolbar");let Ym=class extends Wd{constructor(e,t){var r,i;if(super(e,t),Array.isArray(this.options.container)){const o=document.createElement("div");o.setAttribute("role","toolbar"),_N(o,this.options.container),(i=(r=e.container)==null?void 0:r.parentNode)==null||i.insertBefore(o,e.container),this.container=o}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){lw.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(o=>{var a;const l=(a=this.options.handlers)==null?void 0:a[o];l&&this.addHandler(o,l)}),Array.from(this.container.querySelectorAll("button, select")).forEach(o=>{this.attach(o)}),this.quill.on(qe.events.EDITOR_CHANGE,()=>{const[o]=this.quill.selection.getRange();this.update(o)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(i=>i.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){lw.warn("ignoring attaching to nonexistent format",t,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,i=>{let o;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?o=!1:o=a.value||!1}else e.classList.contains("ql-active")?o=!1:o=e.value||!e.hasAttribute("value"),i.preventDefault();this.quill.focus();const[l]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,o);else if(this.quill.scroll.query(t).prototype instanceof Bf){if(o=prompt(`Enter ${t}`),!o)return;this.quill.updateContents(new Kn().retain(l.index).delete(l.length).insert({[t]:o}),qe.sources.USER)}else this.quill.format(t,o,qe.sources.USER);this.update(l)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[i,o]=r;if(o.tagName==="SELECT"){let l=null;if(e==null)l=null;else if(t[i]==null)l=o.querySelector("option[selected]");else if(!Array.isArray(t[i])){let a=t[i];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),l=o.querySelector(`option[value="${a}"]`)}l==null?(o.value="",o.selectedIndex=-1):l.selected=!0}else if(e==null)o.classList.remove("ql-active"),o.setAttribute("aria-pressed","false");else if(o.hasAttribute("value")){const l=t[i],a=l===o.getAttribute("value")||l!=null&&l.toString()===o.getAttribute("value")||l==null&&!o.getAttribute("value");o.classList.toggle("ql-active",a),o.setAttribute("aria-pressed",a.toString())}else{const l=t[i]!=null;o.classList.toggle("ql-active",l),o.setAttribute("aria-pressed",l.toString())}})}};Ym.DEFAULTS={};function sw(n,e,t){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${e}: ${t}`)):r.setAttribute("aria-label",e),n.appendChild(r)}function _N(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(i=>{if(typeof i=="string")sw(r,i);else{const o=Object.keys(i)[0],l=i[o];Array.isArray(l)?SN(r,o,l):sw(r,o,l)}}),n.appendChild(r)})}function SN(n,e,t){const r=document.createElement("select");r.classList.add(`ql-${e}`),t.forEach(i=>{const o=document.createElement("option");i!==!1?o.setAttribute("value",String(i)):o.setAttribute("selected","selected"),r.appendChild(o)}),n.appendChild(r)}Ym.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,Jn.INLINE)!=null&&this.quill.format(t,!1,qe.sources.USER)})}else this.quill.removeFormat(n.index,n.length,qe.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",qe.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,qe.sources.USER),this.quill.format("direction",n,qe.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),r=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let i=n==="+1"?1:-1;t.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,qe.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,qe.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,qe.sources.USER):this.quill.format("list","unchecked",qe.sources.USER):this.quill.format("list",n,qe.sources.USER)}}};const EN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',AN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',TN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',RN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',IN='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',kN='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',MN='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',LN='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',aw='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',ON='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',PN='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',DN='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',NN='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',FN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',BN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',zN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',HN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',WN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',UN='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',GN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',YN='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',VN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',ZN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',XN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',KN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',JN='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',QN='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',qN='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',jN='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',$N='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',eF='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',tF='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',nF='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Op={align:{"":EN,center:AN,right:TN,justify:RN},background:IN,blockquote:kN,bold:MN,clean:LN,code:aw,"code-block":aw,color:ON,direction:{"":PN,rtl:DN},formula:NN,header:{1:FN,2:BN,3:zN,4:HN,5:WN,6:UN},italic:GN,image:YN,indent:{"+1":VN,"-1":ZN},link:XN,list:{bullet:KN,check:JN,ordered:QN},script:{sub:qN,super:jN},strike:$N,table:eF,underline:tF,video:nF},rF='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let cw=0;function uw(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class Lv{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),uw(this.label,"aria-expanded"),uw(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const r=e.getAttribute("value");return r&&t.setAttribute("data-value",r),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(t,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=rF,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${cw}`,cw+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const r=this.buildItem(t);e.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class q_ extends Lv{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const r=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class j_ extends Lv{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const iF=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class $_{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,iF(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect();let l=0;if(o.right>i.right&&(l=i.right-o.right,this.root.style.left=`${t+l}px`),o.left<i.left&&(l=i.left-o.left,this.root.style.left=`${t+l}px`),o.bottom>i.bottom){const a=o.bottom-o.top,u=e.bottom-e.top+a;this.root.style.top=`${r-u}px`,this.root.classList.add("ql-flip")}return l}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const oF=[!1,"center","right","justify"],lF=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],sF=[!1,"serif","monospace"],aF=["1","2","3",!1],cF=["small",!1,"large","huge"];class Yp extends S1{constructor(e,t){super(e,t);const r=i=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(o=>{o.container.contains(i.target)||o.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(o=>{if(o.startsWith("ql-")&&(o=o.slice(3),t[o]!=null))if(o==="direction")r.innerHTML=t[o][""]+t[o].rtl;else if(typeof t[o]=="string")r.innerHTML=t[o];else{const l=r.value||"";l!=null&&t[o][l]&&(r.innerHTML=t[o][l])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&lp(i,oF),typeof t.align=="object"))return new j_(i,t.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const o=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&lp(i,lF,o==="background"?"#ffffff":"#000000"),new q_(i,t[o])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?lp(i,sF):i.classList.contains("ql-header")?lp(i,aF):i.classList.contains("ql-size")&&lp(i,cF)),new Lv(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(zn.events.EDITOR_CHANGE,r)}}Yp.DEFAULTS=og({},S1.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class e4 extends $_{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,zn.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,zn.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=uF(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,zn.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",zn.sources.USER),this.quill.setSelection(r+2,zn.sources.USER)}break}}this.textbox.value="",this.hide()}}function uF(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function lp(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const i=document.createElement("option");r===t?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),n.appendChild(i)})}const fF=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class t4 extends e4{constructor(e,t){super(e,t),this.quill.on(zn.events.EDITOR_CHANGE,(r,i,o,l)=>{if(r===zn.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&l===zn.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(i.index,i.length);if(a.length===1){const u=this.quill.getBounds(i);u!=null&&this.position(u)}else{const u=a[a.length-1],h=this.quill.getIndex(u),y=Math.min(u.length()-1,i.index+i.length-h),x=this.quill.getBounds(new Ng(h,y));x!=null&&this.position(x)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(zn.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}}Ae(t4,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class n4 extends Yp{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=fF),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new t4(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Op),this.buildPickers(e.container.querySelectorAll("select"),Op))}}n4.DEFAULTS=og({},Yp.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,qe.sources.USER)}}}}});const dF=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class r4 extends e4{constructor(){super(...arguments);Ae(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,zn.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(zn.events.SELECTION_CHANGE,(t,r,i)=>{if(t!=null){if(t.length===0&&i===zn.sources.USER){const[o,l]=this.quill.scroll.descendant(rg,t.index);if(o!=null){this.linkRange=new Ng(t.index-l,o.length());const a=rg.formats(o.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const u=this.quill.getBounds(this.linkRange);u!=null&&this.position(u);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Ae(r4,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class i4 extends Yp{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=dF),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Op),this.buildPickers(e.container.querySelectorAll("select"),Op),this.tooltip=new r4(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{e.handlers.link.call(e,!r.format.link)}))}}i4.DEFAULTS=og({},Yp.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,qe.sources.USER)}}}}});qe.register({"attributors/attribute/direction":N_,"attributors/class/align":O_,"attributors/class/background":RD,"attributors/class/color":TD,"attributors/class/direction":F_,"attributors/class/font":H_,"attributors/class/size":U_,"attributors/style/align":P_,"attributors/style/background":Bm,"attributors/style/color":Fm,"attributors/style/direction":B_,"attributors/style/font":W_,"attributors/style/size":G_},!0);qe.register({"formats/align":O_,"formats/direction":F_,"formats/indent":mN,"formats/background":Bm,"formats/color":Fm,"formats/font":H_,"formats/size":U_,"formats/blockquote":Jy,"formats/code-block":au,"formats/header":Qy,"formats/list":Gp,"formats/bold":Lp,"formats/code":zm,"formats/italic":qy,"formats/link":rg,"formats/script":jy,"formats/strike":$y,"formats/underline":em,"formats/formula":V0,"formats/image":xN,"formats/video":Z0,"modules/syntax":Q_,"modules/table":CN,"modules/toolbar":Ym,"themes/bubble":n4,"themes/snow":i4,"ui/icons":Op,"ui/picker":Lv,"ui/icon-picker":j_,"ui/color-picker":q_,"ui/tooltip":$_},!0);class Ov extends N.Component{constructor(e){super(e),this.editingAreaRef=N.createRef(),this.containerRef=N.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(r,i,o,l)=>{var a,u;r==="text-change"?(a=this.onEditorChangeText)==null||a.call(this,this.editor.root.innerHTML,i,l,this.unprivilegedEditor):r==="selection-change"&&((u=this.onEditorChangeSelection)==null||u.call(this,i,l,this.unprivilegedEditor))};const t=this.isControlled()?e.value:e.defaultValue;this.value=t??""}validateProps(e){if(N.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(N.Children.count(e.children)){const t=N.Children.only(e.children);if((t==null?void 0:t.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(e,t){if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){const r=this.getEditorContents(),i=e.value??"";this.isEqualValue(i,r)||this.setEditorContents(this.editor,i)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),[...this.cleanProps,...this.dirtyProps].some(r=>!$h(e[r],this.props[r]))}shouldComponentRegenerate(e){return this.dirtyProps.some(t=>!$h(e[t],this.props[t]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(e,t){if(this.editor&&this.shouldComponentRegenerate(e)){const r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.editor&&e.placeholder!==this.props.placeholder&&(this.editor.root.dataset.placeholder=this.props.placeholder||""),this.state.generation!==t.generation){const{delta:r,selection:i}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const o=this.editor;o.setContents(r),fw(()=>this.setEditorSelection(o,i))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){var r,i;if(!this.editor)return;this.unhookEditor(this.editor);const e=(r=this.props.modules)==null?void 0:r.toolbar;if(!(typeof e=="object"&&e&&"container"in e&&typeof e.container=="string"||typeof e=="string")){const o=(i=this.containerRef.current)==null?void 0:i.querySelector(".ql-toolbar");o&&o.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(e,t){const r=new qe(e,t);return t.tabIndex!=null&&this.setEditorTabIndex(r,t.tabIndex),this.hookEditor(r),r}hookEditor(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)}unhookEditor(e){e.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(e){return e&&e.ops}isEqualValue(e,t){return this.isDelta(e)&&this.isDelta(t)?$h(e.ops,t.ops):$h(e,t)}setEditorContents(e,t){this.value=t;const r=this.getEditorSelection();typeof t=="string"?e.setContents(e.clipboard.convert({html:t})):e.setContents(t),fw(()=>this.setEditorSelection(e,r))}setEditorSelection(e,t){if(this.selection=t,t){const r=e.getLength();t.index=Math.max(0,Math.min(t.index,r-1)),t.length=Math.max(0,Math.min(t.length,r-1-t.index)),e.setSelection(t)}}setEditorTabIndex(e,t){var r;(r=e==null?void 0:e.scroll)!=null&&r.domNode&&(e.scroll.domNode.tabIndex=t)}setEditorReadOnly(e,t){t?e.disable():e.enable()}makeUnprivilegedEditor(e){const t=e;return{getHTML:()=>t.root.innerHTML,getSemanticHTML:t.getSemanticHTML.bind(t),getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}}getEditingArea(){const e=this.editingAreaRef.current;if(!e)throw new Error("Cannot find element for editing area");if(e.nodeType===3)throw new Error("Editing area cannot be a text node");return e}renderEditingArea(){const{children:e,preserveWhitespace:t}=this.props,{generation:r}=this.state,i={key:r,ref:this.editingAreaRef};return N.Children.count(e)?N.cloneElement(N.Children.only(e),i):t?N.createElement("pre",{...i}):N.createElement("div",{...i})}render(){return N.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(e,t,r,i){var l,a;if(!this.editor)return;const o=this.isDelta(this.value)?i.getContents():i.getHTML();o!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=o,(a=(l=this.props).onChange)==null||a.call(l,e,t,r,i))}onEditorChangeSelection(e,t,r){var a,u,h,y,x,w;if(!this.editor)return;const i=this.getEditorSelection(),o=!i&&e,l=i&&!e;$h(e,i)||(this.selection=e,(u=(a=this.props).onChangeSelection)==null||u.call(a,e,t,r),o?(y=(h=this.props).onFocus)==null||y.call(h,e,t,r):l&&((w=(x=this.props).onBlur)==null||w.call(x,i,t,r)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}Ov.displayName="React Quill";Ov.Quill=qe;Ov.defaultProps={theme:"snow",modules:{},readOnly:!1};function fw(n){Promise.resolve().then(n)}class o4{constructor(e,t={}){Ae(this,"quill");Ae(this,"options");Ae(this,"_toolbarEl",null);Ae(this,"_button",null);Ae(this,"_resizeObserver",null);Ae(this,"_placeholder",null);Ae(this,"_keyboardHandler",null);if(this.quill=e,this.options=t,this.options.type==="Raw")return;if(this.options.type==="ReadOnly"){this._createButton();return}const r=e.getModule("toolbar");if(!r){console.warn("Toolbar module not found");return}if(this._toolbarEl=r.container,!this._toolbarEl){console.warn("Toolbar container not found");return}this._createButton()}_createButton(){switch(this.options.type){case"ReadOnly":this._createReadOnlyButton();break;case"Error":case"Primary":this._createToolbarButton();break}}_createToolbarButton(){this._toolbarEl&&(!this.options.maximize||!this.options.minimize||(this._button=document.createElement("button"),this._button.type="button",this._button.classList.add("ql-fullscreen","ql-right-action"),this._button.onclick=this._toggleFullscreen.bind(this),this._button.innerHTML=this.options.maximize??"",this._button.title=this.options.buttonTitle||"",this._toolbarEl.classList.add("ql-toolbar-has-right-action"),this._toolbarEl.append(this._button)))}_createReadOnlyButton(){var i;const e=(i=this.quill.root)==null?void 0:i.closest(".ql-container");if(!e||!this.options.maximize||!this.options.minimize)return;this._button=document.createElement("button"),this._button.type="button",this._button.classList.add("ql-fullscreen","ql-readonly-fullscreen"),this._button.onclick=this._toggleFullscreen.bind(this),this._button.innerHTML=this.options.maximize??"",this._button.title=this.options.buttonTitle||"",e.appendChild(this._button),this._checkScrollbar(),this._checkVisibility(),requestAnimationFrame(()=>{this._checkScrollbar(),this._checkVisibility()});const t=this.quill.root,r=t.closest(".ql-container");this._resizeObserver=new ResizeObserver(()=>{this._checkScrollbar(),this._checkVisibility()}),this._resizeObserver.observe(t),r&&this._resizeObserver.observe(r)}_checkScrollbar(){const e=this.quill.root,t=e==null?void 0:e.closest(".ql-container");if(!e||!t||!this._button)return;e.scrollHeight>e.clientHeight?(t.classList.add("ql-has-v-scrollbar"),this._button.style.removeProperty("right")):(t.classList.remove("ql-has-v-scrollbar"),this._button.style.removeProperty("right"))}_checkVisibility(){var I;const e=(I=this.quill.root)==null?void 0:I.closest(".ql-container"),t=this.quill.root;if(!e||!this._button||!t)return;const o=window.getComputedStyle(t).getPropertyValue("padding").split(" ").map(O=>parseFloat(O)||0);let l=0;o.length===1||o.length===2?l=o[0]*2:o.length===4&&(l=o[0]+o[2]);const h=2*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16)+l,y=e.offsetHeight,w=(this._button.offsetWidth||this._button.scrollWidth)+12+12,_=e.offsetWidth,S=y>=h,R=_>=w;!S||!R?e.classList.add("ql-no-space"):e.classList.remove("ql-no-space")}_toggleFullscreen(e){var o;e.preventDefault();const t=(o=this.quill.root)==null?void 0:o.closest(".ql-container");if(!t)throw new Error("Quill editor container not exist");let r=t.closest(".ql-editor-wrap");if(r){if(t instanceof HTMLElement&&(t.classList.remove("is-fullscreen"),t.style.height=""),this._placeholder){const l=t.parentElement;this._placeholder.after(l),this._placeholder.remove(),this._placeholder=null}r.remove(),this._button&&(this._button.classList.remove("ql-active"),this._button.innerHTML=this.options.maximize??""),document.documentElement.style.removeProperty("overflow"),this._removeKeyboardHandler();return}r=document.createElement("div"),r.classList.add("ql-editor-wrap"),t instanceof HTMLElement&&(t.style.height="100%",t.classList.add("is-fullscreen"));const i=t.parentElement;this._placeholder=document.createComment("ql-fullscreen-placeholder"),i.after(this._placeholder),r.append(i),document.body.append(r),this._button&&(this._button.classList.add("ql-active"),this._button.innerHTML=this.options.minimize??""),document.documentElement.style.overflow="hidden",this._setupKeyboardHandler()}_setupKeyboardHandler(){this._keyboardHandler||(this._keyboardHandler=e=>{var i;if(e.key!=="Escape")return;const t=(i=this.quill.root)==null?void 0:i.closest(".ql-container");!t||!t.closest(".ql-editor-wrap")||this._exitFullscreen()},document.addEventListener("keydown",this._keyboardHandler))}_removeKeyboardHandler(){this._keyboardHandler&&(document.removeEventListener("keydown",this._keyboardHandler),this._keyboardHandler=null)}_exitFullscreen(){var r;const e=(r=this.quill.root)==null?void 0:r.closest(".ql-container");if(!e)return;const t=e.closest(".ql-editor-wrap");if(t){if(e instanceof HTMLElement&&(e.classList.remove("is-fullscreen"),e.style.height=""),this._placeholder){const i=e.parentElement;this._placeholder.after(i),this._placeholder.remove(),this._placeholder=null}t.remove(),this._button&&(this._button.classList.remove("ql-active"),this._button.innerHTML=this.options.maximize??""),document.documentElement.style.removeProperty("overflow"),this._removeKeyboardHandler()}}}window.QuillToggleFullscreenButton=o4;var Rb={exports:{}},dw;function hF(){return dw||(dw=1,(function(n,e){(function(t,r){n.exports=r()})(window,(function(){return(function(t){var r={};function i(o){if(r[o])return r[o].exports;var l=r[o]={i:o,l:!1,exports:{}};return t[o].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=t,i.c=r,i.d=function(o,l,a){i.o(o,l)||Object.defineProperty(o,l,{enumerable:!0,get:a})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,l){if(1&l&&(o=i(o)),8&l||4&l&&typeof o=="object"&&o&&o.__esModule)return o;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:o}),2&l&&typeof o!="string")for(var u in o)i.d(a,u,(function(h){return o[h]}).bind(null,u));return a},i.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(l,"a",l),l},i.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},i.p="",i(i.s=17)})([function(t,r,i){var o=i(7),l=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",a=Object.prototype.toString,u=Array.prototype.concat,h=Object.defineProperty,y=i(25)(),x=h&&y,w=function(S,R,I,O){var P;(!(R in S)||typeof(P=O)=="function"&&a.call(P)==="[object Function]"&&O())&&(x?h(S,R,{configurable:!0,enumerable:!1,value:I,writable:!0}):S[R]=I)},_=function(S,R){var I=arguments.length>2?arguments[2]:{},O=o(R);l&&(O=u.call(O,Object.getOwnPropertySymbols(R)));for(var P=0;P<O.length;P+=1)w(S,O[P],R[O[P]],I[O[P]])};_.supportsDescriptors=!!x,t.exports=_},function(t,r,i){var o=i(9);t.exports=function(){return o()&&!!Symbol.toStringTag}},function(t,r,i){var o=SyntaxError,l=Function,a=TypeError,u=function(ne){try{return l('"use strict"; return ('+ne+").constructor;")()}catch{}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch{h=null}var y=function(){throw new a},x=h?(function(){try{return y}catch{try{return h(arguments,"callee").get}catch{return y}}})():y,w=i(21)(),_=Object.getPrototypeOf||function(ne){return ne.__proto__},S={},R=typeof Uint8Array>"u"?void 0:_(Uint8Array),I={"%AggregateError%":typeof AggregateError>"u"?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":w?_([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?void 0:Atomics,"%BigInt%":typeof BigInt>"u"?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?void 0:Float32Array,"%Float64Array%":typeof Float64Array>"u"?void 0:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?void 0:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?void 0:Int8Array,"%Int16Array%":typeof Int16Array>"u"?void 0:Int16Array,"%Int32Array%":typeof Int32Array>"u"?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w?_(_([][Symbol.iterator]())):void 0,"%JSON%":typeof JSON=="object"?JSON:void 0,"%Map%":typeof Map>"u"?void 0:Map,"%MapIteratorPrototype%":typeof Map<"u"&&w?_(new Map()[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?void 0:Promise,"%Proxy%":typeof Proxy>"u"?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?void 0:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?void 0:Set,"%SetIteratorPrototype%":typeof Set<"u"&&w?_(new Set()[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w?_(""[Symbol.iterator]()):void 0,"%Symbol%":w?Symbol:void 0,"%SyntaxError%":o,"%ThrowTypeError%":x,"%TypedArray%":R,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?void 0:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?void 0:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?void 0:WeakMap,"%WeakRef%":typeof WeakRef>"u"?void 0:WeakRef,"%WeakSet%":typeof WeakSet>"u"?void 0:WeakSet},O={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=i(3),Y=i(23),z=P.call(Function.call,Array.prototype.concat),W=P.call(Function.apply,Array.prototype.splice),B=P.call(Function.call,String.prototype.replace),ee=P.call(Function.call,String.prototype.slice),H=P.call(Function.call,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,de=/\\(\\)?/g,Z=function(ne){var fe=ee(ne,0,1),ae=ee(ne,-1);if(fe==="%"&&ae!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(ae==="%"&&fe!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var j=[];return B(ne,V,(function(re,he,be,le){j[j.length]=be?B(le,de,"$1"):he||re})),j},te=function(ne,fe){var ae,j=ne;if(Y(O,j)&&(j="%"+(ae=O[j])[0]+"%"),Y(I,j)){var re=I[j];if(re===S&&(re=(function he(be){var le;if(be==="%AsyncFunction%")le=u("async function () {}");else if(be==="%GeneratorFunction%")le=u("function* () {}");else if(be==="%AsyncGeneratorFunction%")le=u("async function* () {}");else if(be==="%AsyncGenerator%"){var J=he("%AsyncGeneratorFunction%");J&&(le=J.prototype)}else if(be==="%AsyncIteratorPrototype%"){var pe=he("%AsyncGenerator%");pe&&(le=_(pe.prototype))}return I[be]=le,le})(j)),re===void 0&&!fe)throw new a("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:ae,name:j,value:re}}throw new o("intrinsic "+ne+" does not exist!")};t.exports=function(ne,fe){if(typeof ne!="string"||ne.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof fe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/g,ne)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ae=Z(ne),j=ae.length>0?ae[0]:"",re=te("%"+j+"%",fe),he=re.name,be=re.value,le=!1,J=re.alias;J&&(j=J[0],W(ae,z([0,1],J)));for(var pe=1,Te=!0;pe<ae.length;pe+=1){var Fe=ae[pe],_e=ee(Fe,0,1),Me=ee(Fe,-1);if((_e==='"'||_e==="'"||_e==="`"||Me==='"'||Me==="'"||Me==="`")&&_e!==Me)throw new o("property names with quotes must have matching quotes");if(Fe!=="constructor"&&Te||(le=!0),Y(I,he="%"+(j+="."+Fe)+"%"))be=I[he];else if(be!=null){if(!(Fe in be)){if(!fe)throw new a("base intrinsic for "+ne+" exists, but the property is not available.");return}if(h&&pe+1>=ae.length){var De=h(be,Fe);be=(Te=!!De)&&"get"in De&&!("originalValue"in De.get)?De.get:be[Fe]}else Te=Y(be,Fe),be=be[Fe];Te&&!le&&(I[he]=be)}}return be}},function(t,r,i){var o=i(22);t.exports=Function.prototype.bind||o},function(t,r,i){var o=i(3),l=i(2),a=l("%Function.prototype.apply%"),u=l("%Function.prototype.call%"),h=l("%Reflect.apply%",!0)||o.call(u,a),y=l("%Object.getOwnPropertyDescriptor%",!0),x=l("%Object.defineProperty%",!0),w=l("%Math.max%");if(x)try{x({},"a",{value:1})}catch{x=null}t.exports=function(S){var R=h(o,u,arguments);if(y&&x){var I=y(R,"length");I.configurable&&x(R,"length",{value:1+w(0,S.length-(arguments.length-1))})}return R};var _=function(){return h(o,a,arguments)};x?x(t.exports,"apply",{value:_}):t.exports.apply=_},function(t,r,i){var o=i(18),l=i(6),a=i(15),u=i(32),h="\0",y=function(x){Array.isArray(x)?this.ops=x:x!=null&&Array.isArray(x.ops)?this.ops=x.ops:this.ops=[]};y.prototype.insert=function(x,w){var _={};return x.length===0?this:(_.insert=x,w!=null&&typeof w=="object"&&Object.keys(w).length>0&&(_.attributes=w),this.push(_))},y.prototype.delete=function(x){return x<=0?this:this.push({delete:x})},y.prototype.retain=function(x,w){if(x<=0)return this;var _={retain:x};return w!=null&&typeof w=="object"&&Object.keys(w).length>0&&(_.attributes=w),this.push(_)},y.prototype.push=function(x){var w=this.ops.length,_=this.ops[w-1];if(x=a(!0,{},x),typeof _=="object"){if(typeof x.delete=="number"&&typeof _.delete=="number")return this.ops[w-1]={delete:_.delete+x.delete},this;if(typeof _.delete=="number"&&x.insert!=null&&(w-=1,typeof(_=this.ops[w-1])!="object"))return this.ops.unshift(x),this;if(l(x.attributes,_.attributes)){if(typeof x.insert=="string"&&typeof _.insert=="string")return this.ops[w-1]={insert:_.insert+x.insert},typeof x.attributes=="object"&&(this.ops[w-1].attributes=x.attributes),this;if(typeof x.retain=="number"&&typeof _.retain=="number")return this.ops[w-1]={retain:_.retain+x.retain},typeof x.attributes=="object"&&(this.ops[w-1].attributes=x.attributes),this}}return w===this.ops.length?this.ops.push(x):this.ops.splice(w,0,x),this},y.prototype.chop=function(){var x=this.ops[this.ops.length-1];return x&&x.retain&&!x.attributes&&this.ops.pop(),this},y.prototype.filter=function(x){return this.ops.filter(x)},y.prototype.forEach=function(x){this.ops.forEach(x)},y.prototype.map=function(x){return this.ops.map(x)},y.prototype.partition=function(x){var w=[],_=[];return this.forEach((function(S){(x(S)?w:_).push(S)})),[w,_]},y.prototype.reduce=function(x,w){return this.ops.reduce(x,w)},y.prototype.changeLength=function(){return this.reduce((function(x,w){return w.insert?x+u.length(w):w.delete?x-w.delete:x}),0)},y.prototype.length=function(){return this.reduce((function(x,w){return x+u.length(w)}),0)},y.prototype.slice=function(x,w){x=x||0,typeof w!="number"&&(w=1/0);for(var _=[],S=u.iterator(this.ops),R=0;R<w&&S.hasNext();){var I;R<x?I=S.next(x-R):(I=S.next(w-R),_.push(I)),R+=u.length(I)}return new y(_)},y.prototype.compose=function(x){var w=u.iterator(this.ops),_=u.iterator(x.ops),S=[],R=_.peek();if(R!=null&&typeof R.retain=="number"&&R.attributes==null){for(var I=R.retain;w.peekType()==="insert"&&w.peekLength()<=I;)I-=w.peekLength(),S.push(w.next());R.retain-I>0&&_.next(R.retain-I)}for(var O=new y(S);w.hasNext()||_.hasNext();)if(_.peekType()==="insert")O.push(_.next());else if(w.peekType()==="delete")O.push(w.next());else{var P=Math.min(w.peekLength(),_.peekLength()),Y=w.next(P),z=_.next(P);if(typeof z.retain=="number"){var W={};typeof Y.retain=="number"?W.retain=P:W.insert=Y.insert;var B=u.attributes.compose(Y.attributes,z.attributes,typeof Y.retain=="number");if(B&&(W.attributes=B),O.push(W),!_.hasNext()&&l(O.ops[O.ops.length-1],W)){var ee=new y(w.rest());return O.concat(ee).chop()}}else typeof z.delete=="number"&&typeof Y.retain=="number"&&O.push(z)}return O.chop()},y.prototype.concat=function(x){var w=new y(this.ops.slice());return x.ops.length>0&&(w.push(x.ops[0]),w.ops=w.ops.concat(x.ops.slice(1))),w},y.prototype.diff=function(x,w){if(this.ops===x.ops)return new y;var _=[this,x].map((function(P){return P.map((function(Y){if(Y.insert!=null)return typeof Y.insert=="string"?Y.insert:h;throw new Error("diff() called "+(P===x?"on":"with")+" non-document")})).join("")})),S=new y,R=o(_[0],_[1],w),I=u.iterator(this.ops),O=u.iterator(x.ops);return R.forEach((function(P){for(var Y=P[1].length;Y>0;){var z=0;switch(P[0]){case o.INSERT:z=Math.min(O.peekLength(),Y),S.push(O.next(z));break;case o.DELETE:z=Math.min(Y,I.peekLength()),I.next(z),S.delete(z);break;case o.EQUAL:z=Math.min(I.peekLength(),O.peekLength(),Y);var W=I.next(z),B=O.next(z);l(W.insert,B.insert)?S.retain(z,u.attributes.diff(W.attributes,B.attributes)):S.push(B).delete(z)}Y-=z}})),S.chop()},y.prototype.eachLine=function(x,w){w=w||`
|
|
337
337
|
`;for(var _=u.iterator(this.ops),S=new y,R=0;_.hasNext();){if(_.peekType()!=="insert")return;var I=_.peek(),O=u.length(I)-_.peekLength(),P=typeof I.insert=="string"?I.insert.indexOf(w,O)-O:-1;if(P<0)S.push(_.next());else if(P>0)S.push(_.next(P));else{if(x(S,_.next(1).attributes||{},R)===!1)return;R+=1,S=new y}}S.length()>0&&x(S,{},R)},y.prototype.transform=function(x,w){if(w=!!w,typeof x=="number")return this.transformPosition(x,w);for(var _=u.iterator(this.ops),S=u.iterator(x.ops),R=new y;_.hasNext()||S.hasNext();)if(_.peekType()!=="insert"||!w&&S.peekType()==="insert")if(S.peekType()==="insert")R.push(S.next());else{var I=Math.min(_.peekLength(),S.peekLength()),O=_.next(I),P=S.next(I);if(O.delete)continue;P.delete?R.push(P):R.retain(I,u.attributes.transform(O.attributes,P.attributes,w))}else R.retain(u.length(_.next()));return R.chop()},y.prototype.transformPosition=function(x,w){w=!!w;for(var _=u.iterator(this.ops),S=0;_.hasNext()&&S<=x;){var R=_.peekLength(),I=_.peekType();_.next(),I!=="delete"?(I==="insert"&&(S<x||!w)&&(x+=R),S+=R):x-=Math.min(R,x-S)}return x},t.exports=y},function(t,r,i){var o=i(7),l=i(20),a=i(24),u=i(27),h=i(28),y=i(31),x=Date.prototype.getTime;function w(R,I,O){var P=O||{};return!!(P.strict?a(R,I):R===I)||(!R||!I||typeof R!="object"&&typeof I!="object"?P.strict?a(R,I):R==I:(function(Y,z,W){var B,ee;if(typeof Y!=typeof z||_(Y)||_(z)||Y.prototype!==z.prototype||l(Y)!==l(z))return!1;var H=u(Y),V=u(z);if(H!==V)return!1;if(H||V)return Y.source===z.source&&h(Y)===h(z);if(y(Y)&&y(z))return x.call(Y)===x.call(z);var de=S(Y),Z=S(z);if(de!==Z)return!1;if(de||Z){if(Y.length!==z.length)return!1;for(B=0;B<Y.length;B++)if(Y[B]!==z[B])return!1;return!0}if(typeof Y!=typeof z)return!1;try{var te=o(Y),ne=o(z)}catch{return!1}if(te.length!==ne.length)return!1;for(te.sort(),ne.sort(),B=te.length-1;B>=0;B--)if(te[B]!=ne[B])return!1;for(B=te.length-1;B>=0;B--)if(ee=te[B],!w(Y[ee],z[ee],W))return!1;return!0})(R,I,P))}function _(R){return R==null}function S(R){return!(!R||typeof R!="object"||typeof R.length!="number")&&typeof R.copy=="function"&&typeof R.slice=="function"&&!(R.length>0&&typeof R[0]!="number")}t.exports=w},function(t,r,i){var o=Array.prototype.slice,l=i(8),a=Object.keys,u=a?function(y){return a(y)}:i(19),h=Object.keys;u.shim=function(){return Object.keys?(function(){var y=Object.keys(arguments);return y&&y.length===arguments.length})(1,2)||(Object.keys=function(y){return l(y)?h(o.call(y)):h(y)}):Object.keys=u,Object.keys||u},t.exports=u},function(t,r,i){var o=Object.prototype.toString;t.exports=function(l){var a=o.call(l),u=a==="[object Arguments]";return u||(u=a!=="[object Array]"&&l!==null&&typeof l=="object"&&typeof l.length=="number"&&l.length>=0&&o.call(l.callee)==="[object Function]"),u}},function(t,r,i){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var o={},l=Symbol("test"),a=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;for(l in o[l]=42,o)return!1;if(typeof Object.keys=="function"&&Object.keys(o).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(o).length!==0)return!1;var u=Object.getOwnPropertySymbols(o);if(u.length!==1||u[0]!==l||!Object.prototype.propertyIsEnumerable.call(o,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var h=Object.getOwnPropertyDescriptor(o,l);if(h.value!==42||h.enumerable!==!0)return!1}return!0}},function(t,r,i){var o=i(2),l=i(4),a=l(o("String.prototype.indexOf"));t.exports=function(u,h){var y=o(u,!!h);return typeof y=="function"&&a(u,".prototype.")>-1?l(y):y}},function(t,r,i){var o=function(l){return l!=l};t.exports=function(l,a){return l===0&&a===0?1/l==1/a:l===a||!(!o(l)||!o(a))}},function(t,r,i){var o=i(11);t.exports=function(){return typeof Object.is=="function"?Object.is:o}},function(t,r,i){var o=i(29).functionsHaveConfigurableNames(),l=Object,a=TypeError;t.exports=function(){if(this!=null&&this!==l(this))throw new a("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.sticky&&(u+="y"),u},o&&Object.defineProperty&&Object.defineProperty(t.exports,"name",{value:"get flags"})},function(t,r,i){var o=i(13),l=i(0).supportsDescriptors,a=Object.getOwnPropertyDescriptor;t.exports=function(){if(l&&/a/gim.flags==="gim"){var u=a(RegExp.prototype,"flags");if(u&&typeof u.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var h="",y={};if(Object.defineProperty(y,"hasIndices",{get:function(){h+="d"}}),Object.defineProperty(y,"sticky",{get:function(){h+="y"}}),h==="dy")return u.get}}return o}},function(t,r,i){var o=Object.prototype.hasOwnProperty,l=Object.prototype.toString,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h=function(_){return typeof Array.isArray=="function"?Array.isArray(_):l.call(_)==="[object Array]"},y=function(_){if(!_||l.call(_)!=="[object Object]")return!1;var S,R=o.call(_,"constructor"),I=_.constructor&&_.constructor.prototype&&o.call(_.constructor.prototype,"isPrototypeOf");if(_.constructor&&!R&&!I)return!1;for(S in _);return S===void 0||o.call(_,S)},x=function(_,S){a&&S.name==="__proto__"?a(_,S.name,{enumerable:!0,configurable:!0,value:S.newValue,writable:!0}):_[S.name]=S.newValue},w=function(_,S){if(S==="__proto__"){if(!o.call(_,S))return;if(u)return u(_,S).value}return _[S]};t.exports=function _(){var S,R,I,O,P,Y,z=arguments[0],W=1,B=arguments.length,ee=!1;for(typeof z=="boolean"&&(ee=z,z=arguments[1]||{},W=2),(z==null||typeof z!="object"&&typeof z!="function")&&(z={});W<B;++W)if((S=arguments[W])!=null)for(R in S)I=w(z,R),z!==(O=w(S,R))&&(ee&&O&&(y(O)||(P=h(O)))?(P?(P=!1,Y=I&&h(I)?I:[]):Y=I&&y(I)?I:{},x(z,{name:R,newValue:_(ee,Y,O)})):O!==void 0&&x(z,{name:R,newValue:O}));return z}},function(t,r,i){const o=typeof URL>"u"?i(33).URL:URL,l=(u,h)=>h.some(y=>y instanceof RegExp?y.test(u):y===u),a=(u,h)=>{if(h={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...h},Reflect.has(h,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(h,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(h,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(u=u.trim(),/^data:/i.test(u))return((w,{stripHash:_})=>{const S=w.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!S)throw new Error("Invalid URL: "+w);const R=S[1].split(";"),I=S[2],O=_?"":S[3];let P=!1;R[R.length-1]==="base64"&&(R.pop(),P=!0);const Y=(R.shift()||"").toLowerCase(),z=[...R.map(W=>{let[B,ee=""]=W.split("=").map(H=>H.trim());return B==="charset"&&(ee=ee.toLowerCase(),ee==="us-ascii")?"":`${B}${ee?"="+ee:""}`}).filter(Boolean)];return P&&z.push("base64"),(z.length!==0||Y&&Y!=="text/plain")&&z.unshift(Y),`data:${z.join(";")},${P?I.trim():I}${O?"#"+O:""}`})(u,h);const y=u.startsWith("//");!y&&/^\.*\//.test(u)||(u=u.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,h.defaultProtocol));const x=new o(u);if(h.forceHttp&&h.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(h.forceHttp&&x.protocol==="https:"&&(x.protocol="http:"),h.forceHttps&&x.protocol==="http:"&&(x.protocol="https:"),h.stripAuthentication&&(x.username="",x.password=""),h.stripHash&&(x.hash=""),x.pathname&&(x.pathname=x.pathname.replace(/((?!:).|^)\/{2,}/g,(w,_)=>/^(?!\/)/g.test(_)?_+"/":"/")),x.pathname&&(x.pathname=decodeURI(x.pathname)),h.removeDirectoryIndex===!0&&(h.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(h.removeDirectoryIndex)&&h.removeDirectoryIndex.length>0){let w=x.pathname.split("/");const _=w[w.length-1];l(_,h.removeDirectoryIndex)&&(w=w.slice(0,w.length-1),x.pathname=w.slice(1).join("/")+"/")}if(x.hostname&&(x.hostname=x.hostname.replace(/\.$/,""),h.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(x.hostname)&&(x.hostname=x.hostname.replace(/^www\./,""))),Array.isArray(h.removeQueryParameters))for(const w of[...x.searchParams.keys()])l(w,h.removeQueryParameters)&&x.searchParams.delete(w);return h.sortQueryParameters&&x.searchParams.sort(),h.removeTrailingSlash&&(x.pathname=x.pathname.replace(/\/$/,"")),u=x.toString(),!h.removeTrailingSlash&&x.pathname!=="/"||x.hash!==""||(u=u.replace(/\/$/,"")),y&&!h.normalizeProtocol&&(u=u.replace(/^http:\/\//,"//")),h.stripProtocol&&(u=u.replace(/^(?:https?:)?\/\//,"")),u};t.exports=a,t.exports.default=a},function(t,r,i){i.r(r),i.d(r,"default",(function(){return I}));var o=i(5),l=i.n(o),a=i(16),u=i.n(a);function h(O,P){return(function(Y){if(Array.isArray(Y))return Y})(O)||(function(Y,z){var W=Y==null?null:typeof Symbol<"u"&&Y[Symbol.iterator]||Y["@@iterator"];if(W!=null){var B,ee,H=[],V=!0,de=!1;try{for(W=W.call(Y);!(V=(B=W.next()).done)&&(H.push(B.value),!z||H.length!==z);V=!0);}catch(Z){de=!0,ee=Z}finally{try{V||W.return==null||W.return()}finally{if(de)throw ee}}return H}})(O,P)||(function(Y,z){if(Y){if(typeof Y=="string")return y(Y,z);var W=Object.prototype.toString.call(Y).slice(8,-1);if(W==="Object"&&Y.constructor&&(W=Y.constructor.name),W==="Map"||W==="Set")return Array.from(Y);if(W==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W))return y(Y,z)}})(O,P)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
338
338
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function y(O,P){(P==null||P>O.length)&&(P=O.length);for(var Y=0,z=new Array(P);Y<P;Y++)z[Y]=O[Y];return z}function x(O,P){var Y=Object.keys(O);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(O);P&&(z=z.filter((function(W){return Object.getOwnPropertyDescriptor(O,W).enumerable}))),Y.push.apply(Y,z)}return Y}function w(O){for(var P=1;P<arguments.length;P++){var Y=arguments[P]!=null?arguments[P]:{};P%2?x(Object(Y),!0).forEach((function(z){_(O,z,Y[z])})):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(Y)):x(Object(Y)).forEach((function(z){Object.defineProperty(O,z,Object.getOwnPropertyDescriptor(Y,z))}))}return O}function _(O,P,Y){return P in O?Object.defineProperty(O,P,{value:Y,enumerable:!0,configurable:!0,writable:!0}):O[P]=Y,O}function S(O,P){for(var Y=0;Y<P.length;Y++){var z=P[Y];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(O,z.key,z)}}var R={globalRegularExpression:/(https?:\/\/|www\.)[\w-\.]+\.[\w-\.]+(\/([\S]+)?)?/gi,urlRegularExpression:/(https?:\/\/|www\.)[\w-\.]+\.[\w-\.]+(\/([\S]+)?)?/gi,globalMailRegularExpression:/([\w-\.]+@[\w-\.]+\.[\w-\.]+)/gi,mailRegularExpression:/([\w-\.]+@[\w-\.]+\.[\w-\.]+)/gi,normalizeRegularExpression:/(https?:\/\/|www\.)[\S]+/i,normalizeUrlOptions:{stripWWW:!1}},I=(function(){function O(z,W){var B=this;(function(ee,H){if(!(ee instanceof H))throw new TypeError("Cannot call a class as a function")})(this,O),this.quill=z,W=W||{},this.options=w(w({},R),W),this.urlNormalizer=function(ee){return B.normalize(ee)},this.mailNormalizer=function(ee){return"mailto:".concat(ee)},this.registerTypeListener(),this.registerPasteListener(),this.registerBlurListener()}var P,Y;return P=O,(Y=[{key:"registerPasteListener",value:function(){var z=this;this.quill.clipboard.addMatcher("A",(function(W,B){var ee,H=W.getAttribute("href"),V=(ee=B.ops[0])===null||ee===void 0?void 0:ee.attributes;return(V==null?void 0:V.link)!=null&&(V.link=H),B})),this.quill.clipboard.addMatcher(Node.TEXT_NODE,(function(W,B){if(typeof W.data=="string"){var ee=z.options.globalRegularExpression,H=z.options.globalMailRegularExpression;ee.lastIndex=0,H.lastIndex=0;for(var V=new l.a,de=0,Z=ee.exec(W.data),te=H.exec(W.data),ne=function(ae,j,re){var he=W.data.substring(de,ae.index);V.insert(he);var be=ae[0];return V.insert(be,{link:re(be)}),de=j.lastIndex,j.exec(W.data)};Z!==null||te!==null;)if(Z===null)te=ne(te,H,z.mailNormalizer);else if(te===null)Z=ne(Z,ee,z.urlNormalizer);else if(te.index<=Z.index){for(;Z!==null&&Z.index<H.lastIndex;)Z=ee.exec(W.data);te=ne(te,H,z.mailNormalizer)}else{for(;te!==null&&te.index<ee.lastIndex;)te=H.exec(W.data);Z=ne(Z,ee,z.urlNormalizer)}if(de>0){var fe=W.data.substring(de);V.insert(fe),B.ops=V.ops}return B}}))}},{key:"registerTypeListener",value:function(){var z=this;this.quill.on("text-change",(function(W){var B=W.ops;if(!(!B||B.length<1||B.length>2)){var ee=B[B.length-1];ee.insert&&typeof ee.insert=="string"&&ee.insert.match(/\s/)&&z.checkTextForUrl(!!ee.insert.match(/ |\t/))}}))}},{key:"registerBlurListener",value:function(){var z=this;this.quill.root.addEventListener("blur",(function(){z.checkTextForUrl()}))}},{key:"checkTextForUrl",value:function(){var z=arguments.length>0&&arguments[0]!==void 0&&arguments[0],W=this.quill.getSelection();if(W){var B=this.quill.getLeaf(W.index),ee=h(B,1),H=ee[0],V=this.quill.getIndex(H);if(H.text){var de=W.index-V,Z=H.text.slice(0,de);if(Z&&H.parent.domNode.localName!=="a"){var te=H.text[de];if(te==null||!te.match(/\S/)){var ne=z?/\s\s$/:/\s$/;if(!Z.match(ne)){var fe=Z.match(this.options.urlRegularExpression),ae=Z.match(this.options.mailRegularExpression);fe?this.handleMatches(V,Z,fe,this.urlNormalizer):ae&&this.handleMatches(V,Z,ae,this.mailNormalizer)}}}}}}},{key:"handleMatches",value:function(z,W,B,ee){var H=B.pop(),V=W.lastIndexOf(H);W.split(H).pop().match(/\S/)||this.updateText(z+V,H.trim(),ee)}},{key:"updateText",value:function(z,W,B){var ee=new l.a().retain(z).retain(W.length,{link:B(W)});this.quill.updateContents(ee)}},{key:"normalize",value:function(z){if(this.options.normalizeRegularExpression.test(z))try{return u()(z,this.options.normalizeUrlOptions)}catch(W){console.error(W)}return z}}])&&S(P.prototype,Y),Object.defineProperty(P,"prototype",{writable:!1}),O})();window!=null&&window.Quill&&window.Quill.register("modules/magicUrl",I)},function(t,r){function i(y,x,w){if(y==x)return y?[[0,y]]:[];(w<0||y.length<w)&&(w=null);var _=l(y,x),S=y.substring(0,_);_=a(y=y.substring(_),x=x.substring(_));var R=y.substring(y.length-_),I=(function(O,P){var Y;if(!O)return[[1,P]];if(!P)return[[-1,O]];var z=O.length>P.length?O:P,W=O.length>P.length?P:O,B=z.indexOf(W);if(B!=-1)return Y=[[1,z.substring(0,B)],[0,W],[1,z.substring(B+W.length)]],O.length>P.length&&(Y[0][0]=Y[2][0]=-1),Y;if(W.length==1)return[[-1,O],[1,P]];var ee=(function(ae,j){var re=ae.length>j.length?ae:j,he=ae.length>j.length?j:ae;if(re.length<4||2*he.length<re.length)return null;function be(Re,Le,Oe){for(var Ge,Ve,Pe,ot,Xe=Re.substring(Oe,Oe+Math.floor(Re.length/4)),lt=-1,Ye="";(lt=Le.indexOf(Xe,lt+1))!=-1;){var mt=l(Re.substring(Oe),Le.substring(lt)),bt=a(Re.substring(0,Oe),Le.substring(0,lt));Ye.length<bt+mt&&(Ye=Le.substring(lt-bt,lt)+Le.substring(lt,lt+mt),Ge=Re.substring(0,Oe-bt),Ve=Re.substring(Oe+mt),Pe=Le.substring(0,lt-bt),ot=Le.substring(lt+mt))}return 2*Ye.length>=Re.length?[Ge,Ve,Pe,ot,Ye]:null}var le,J,pe,Te,Fe,_e=be(re,he,Math.ceil(re.length/4)),Me=be(re,he,Math.ceil(re.length/2));if(!_e&&!Me)return null;le=Me?_e&&_e[4].length>Me[4].length?_e:Me:_e,ae.length>j.length?(J=le[0],pe=le[1],Te=le[2],Fe=le[3]):(Te=le[0],Fe=le[1],J=le[2],pe=le[3]);var De=le[4];return[J,pe,Te,Fe,De]})(O,P);if(ee){var H=ee[0],V=ee[1],de=ee[2],Z=ee[3],te=ee[4],ne=i(H,de),fe=i(V,Z);return ne.concat([[0,te]],fe)}return(function(ae,j){for(var re=ae.length,he=j.length,be=Math.ceil((re+he)/2),le=be,J=2*be,pe=new Array(J),Te=new Array(J),Fe=0;Fe<J;Fe++)pe[Fe]=-1,Te[Fe]=-1;pe[le+1]=0,Te[le+1]=0;for(var _e=re-he,Me=_e%2!=0,De=0,Re=0,Le=0,Oe=0,Ge=0;Ge<be;Ge++){for(var Ve=-Ge+De;Ve<=Ge-Re;Ve+=2){for(var Pe=le+Ve,ot=(bt=Ve==-Ge||Ve!=Ge&&pe[Pe-1]<pe[Pe+1]?pe[Pe+1]:pe[Pe-1]+1)-Ve;bt<re&&ot<he&&ae.charAt(bt)==j.charAt(ot);)bt++,ot++;if(pe[Pe]=bt,bt>re)Re+=2;else if(ot>he)De+=2;else if(Me&&(Ye=le+_e-Ve)>=0&&Ye<J&&Te[Ye]!=-1){var Xe=re-Te[Ye];if(bt>=Xe)return o(ae,j,bt,ot)}}for(var lt=-Ge+Le;lt<=Ge-Oe;lt+=2){for(var Ye=le+lt,mt=(Xe=lt==-Ge||lt!=Ge&&Te[Ye-1]<Te[Ye+1]?Te[Ye+1]:Te[Ye-1]+1)-lt;Xe<re&&mt<he&&ae.charAt(re-Xe-1)==j.charAt(he-mt-1);)Xe++,mt++;if(Te[Ye]=Xe,Xe>re)Oe+=2;else if(mt>he)Le+=2;else if(!Me&&(Pe=le+_e-lt)>=0&&Pe<J&&pe[Pe]!=-1){var bt=pe[Pe];if(ot=le+bt-Pe,bt>=(Xe=re-Xe))return o(ae,j,bt,ot)}}}return[[-1,ae],[1,j]]})(O,P)})(y=y.substring(0,y.length-_),x=x.substring(0,x.length-_));return S&&I.unshift([0,S]),R&&I.push([0,R]),(function O(P){P.push([0,""]);for(var Y,z=0,W=0,B=0,ee="",H="";z<P.length;)switch(P[z][0]){case 1:B++,H+=P[z][1],z++;break;case-1:W++,ee+=P[z][1],z++;break;case 0:W+B>1?(W!==0&&B!==0&&((Y=l(H,ee))!==0&&(z-W-B>0&&P[z-W-B-1][0]==0?P[z-W-B-1][1]+=H.substring(0,Y):(P.splice(0,0,[0,H.substring(0,Y)]),z++),H=H.substring(Y),ee=ee.substring(Y)),(Y=a(H,ee))!==0&&(P[z][1]=H.substring(H.length-Y)+P[z][1],H=H.substring(0,H.length-Y),ee=ee.substring(0,ee.length-Y))),W===0?P.splice(z-B,W+B,[1,H]):B===0?P.splice(z-W,W+B,[-1,ee]):P.splice(z-W-B,W+B,[-1,ee],[1,H]),z=z-W-B+(W?1:0)+(B?1:0)+1):z!==0&&P[z-1][0]==0?(P[z-1][1]+=P[z][1],P.splice(z,1)):z++,B=0,W=0,ee="",H=""}P[P.length-1][1]===""&&P.pop();var V=!1;for(z=1;z<P.length-1;)P[z-1][0]==0&&P[z+1][0]==0&&(P[z][1].substring(P[z][1].length-P[z-1][1].length)==P[z-1][1]?(P[z][1]=P[z-1][1]+P[z][1].substring(0,P[z][1].length-P[z-1][1].length),P[z+1][1]=P[z-1][1]+P[z+1][1],P.splice(z-1,1),V=!0):P[z][1].substring(0,P[z+1][1].length)==P[z+1][1]&&(P[z-1][1]+=P[z+1][1],P[z][1]=P[z][1].substring(P[z+1][1].length)+P[z+1][1],P.splice(z+1,1),V=!0)),z++;V&&O(P)})(I),w!=null&&(I=(function(O,P){var Y=(function(V,de){if(de===0)return[0,V];for(var Z=0,te=0;te<V.length;te++){var ne=V[te];if(ne[0]===-1||ne[0]===0){var fe=Z+ne[1].length;if(de===fe)return[te+1,V];if(de<fe){V=V.slice();var ae=de-Z,j=[ne[0],ne[1].slice(0,ae)],re=[ne[0],ne[1].slice(ae)];return V.splice(te,1,j,re),[te+1,V]}Z=fe}}throw new Error("cursor_pos is out of bounds!")})(O,P),z=Y[1],W=Y[0],B=z[W],ee=z[W+1];if(B==null||B[0]!==0)return O;if(ee!=null&&B[1]+ee[1]===ee[1]+B[1])return z.splice(W,2,ee,B),h(z,W,2);if(ee!=null&&ee[1].indexOf(B[1])===0){z.splice(W,2,[ee[0],B[1]],[0,B[1]]);var H=ee[1].slice(B[1].length);return H.length>0&&z.splice(W+2,0,[ee[0],H]),h(z,W,3)}return O})(I,w)),I=(function(O){for(var P=!1,Y=function(ee){return ee.charCodeAt(0)>=56320&&ee.charCodeAt(0)<=57343},z=2;z<O.length;z+=1)O[z-2][0]===0&&(W=O[z-2][1]).charCodeAt(W.length-1)>=55296&&W.charCodeAt(W.length-1)<=56319&&O[z-1][0]===-1&&Y(O[z-1][1])&&O[z][0]===1&&Y(O[z][1])&&(P=!0,O[z-1][1]=O[z-2][1].slice(-1)+O[z-1][1],O[z][1]=O[z-2][1].slice(-1)+O[z][1],O[z-2][1]=O[z-2][1].slice(0,-1));var W;if(!P)return O;var B=[];for(z=0;z<O.length;z+=1)O[z][1].length>0&&B.push(O[z]);return B})(I)}function o(y,x,w,_){var S=y.substring(0,w),R=x.substring(0,_),I=y.substring(w),O=x.substring(_),P=i(S,R),Y=i(I,O);return P.concat(Y)}function l(y,x){if(!y||!x||y.charAt(0)!=x.charAt(0))return 0;for(var w=0,_=Math.min(y.length,x.length),S=_,R=0;w<S;)y.substring(R,S)==x.substring(R,S)?R=w=S:_=S,S=Math.floor((_-w)/2+w);return S}function a(y,x){if(!y||!x||y.charAt(y.length-1)!=x.charAt(x.length-1))return 0;for(var w=0,_=Math.min(y.length,x.length),S=_,R=0;w<S;)y.substring(y.length-S,y.length-R)==x.substring(x.length-S,x.length-R)?R=w=S:_=S,S=Math.floor((_-w)/2+w);return S}var u=i;function h(y,x,w){for(var _=x+w-1;_>=0&&_>=x-1;_--)if(_+1<y.length){var S=y[_],R=y[_+1];S[0]===R[1]&&y.splice(_,2,[S[0],S[1]+R[1]])}return y}u.INSERT=1,u.DELETE=-1,u.EQUAL=0,t.exports=u},function(t,r,i){var o;if(!Object.keys){var l=Object.prototype.hasOwnProperty,a=Object.prototype.toString,u=i(8),h=Object.prototype.propertyIsEnumerable,y=!h.call({toString:null},"toString"),x=h.call((function(){}),"prototype"),w=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],_=function(I){var O=I.constructor;return O&&O.prototype===I},S={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},R=(function(){if(typeof window>"u")return!1;for(var I in window)try{if(!S["$"+I]&&l.call(window,I)&&window[I]!==null&&typeof window[I]=="object")try{_(window[I])}catch{return!0}}catch{return!0}return!1})();o=function(I){var O=I!==null&&typeof I=="object",P=a.call(I)==="[object Function]",Y=u(I),z=O&&a.call(I)==="[object String]",W=[];if(!O&&!P&&!Y)throw new TypeError("Object.keys called on a non-object");var B=x&&P;if(z&&I.length>0&&!l.call(I,0))for(var ee=0;ee<I.length;++ee)W.push(String(ee));if(Y&&I.length>0)for(var H=0;H<I.length;++H)W.push(String(H));else for(var V in I)B&&V==="prototype"||!l.call(I,V)||W.push(String(V));if(y)for(var de=(function(te){if(typeof window>"u"||!R)return _(te);try{return _(te)}catch{return!1}})(I),Z=0;Z<w.length;++Z)de&&w[Z]==="constructor"||!l.call(I,w[Z])||W.push(w[Z]);return W}}t.exports=o},function(t,r,i){var o=i(1)(),l=i(10)("Object.prototype.toString"),a=function(y){return!(o&&y&&typeof y=="object"&&Symbol.toStringTag in y)&&l(y)==="[object Arguments]"},u=function(y){return!!a(y)||y!==null&&typeof y=="object"&&typeof y.length=="number"&&y.length>=0&&l(y)!=="[object Array]"&&l(y.callee)==="[object Function]"},h=(function(){return a(arguments)})();a.isLegacyArguments=u,t.exports=h?a:u},function(t,r,i){var o=typeof Symbol<"u"&&Symbol,l=i(9);t.exports=function(){return typeof o=="function"&&typeof Symbol=="function"&&typeof o("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&l()}},function(t,r,i){var o="Function.prototype.bind called on incompatible ",l=Array.prototype.slice,a=Object.prototype.toString;t.exports=function(u){var h=this;if(typeof h!="function"||a.call(h)!=="[object Function]")throw new TypeError(o+h);for(var y,x=l.call(arguments,1),w=function(){if(this instanceof y){var O=h.apply(this,x.concat(l.call(arguments)));return Object(O)===O?O:this}return h.apply(u,x.concat(l.call(arguments)))},_=Math.max(0,h.length-x.length),S=[],R=0;R<_;R++)S.push("$"+R);if(y=Function("binder","return function ("+S.join(",")+"){ return binder.apply(this,arguments); }")(w),h.prototype){var I=function(){};I.prototype=h.prototype,y.prototype=new I,I.prototype=null}return y}},function(t,r,i){var o=i(3);t.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},function(t,r,i){var o=i(0),l=i(4),a=i(11),u=i(12),h=i(26),y=l(u(),Object);o(y,{getPolyfill:u,implementation:a,shim:h}),t.exports=y},function(t,r,i){var o=i(2)("%Object.defineProperty%",!0),l=function(){if(o)try{return o({},"a",{value:1}),!0}catch{return!1}return!1};l.hasArrayLengthDefineBug=function(){if(!l())return null;try{return o([],"length",{value:1}).length!==1}catch{return!0}},t.exports=l},function(t,r,i){var o=i(12),l=i(0);t.exports=function(){var a=o();return l(Object,{is:a},{is:function(){return Object.is!==a}}),a}},function(t,r,i){var o,l,a,u,h=i(10),y=i(1)();if(y){o=h("Object.prototype.hasOwnProperty"),l=h("RegExp.prototype.exec"),a={};var x=function(){throw a};u={toString:x,valueOf:x},typeof Symbol.toPrimitive=="symbol"&&(u[Symbol.toPrimitive]=x)}var w=h("Object.prototype.toString"),_=Object.getOwnPropertyDescriptor;t.exports=y?function(S){if(!S||typeof S!="object")return!1;var R=_(S,"lastIndex");if(!(R&&o(R,"value")))return!1;try{l(S,u)}catch(I){return I===a}}:function(S){return!(!S||typeof S!="object"&&typeof S!="function")&&w(S)==="[object RegExp]"}},function(t,r,i){var o=i(0),l=i(4),a=i(13),u=i(14),h=i(30),y=l(u());o(y,{getPolyfill:u,implementation:a,shim:h}),t.exports=y},function(t,r,i){var o=function(){return typeof(function(){}).name=="string"},l=Object.getOwnPropertyDescriptor;if(l)try{l([],"length")}catch{l=null}o.functionsHaveConfigurableNames=function(){if(!o()||!l)return!1;var u=l((function(){}),"name");return!!u&&!!u.configurable};var a=Function.prototype.bind;o.boundFunctionsHaveNames=function(){return o()&&typeof a=="function"&&(function(){}).bind().name!==""},t.exports=o},function(t,r,i){var o=i(0).supportsDescriptors,l=i(14),a=Object.getOwnPropertyDescriptor,u=Object.defineProperty,h=TypeError,y=Object.getPrototypeOf,x=/a/;t.exports=function(){if(!o||!y)throw new h("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var w=l(),_=y(x),S=a(_,"flags");return S&&S.get===w||u(_,"flags",{configurable:!0,enumerable:!1,get:w}),w}},function(t,r,i){var o=Date.prototype.getDay,l=Object.prototype.toString,a=i(1)();t.exports=function(u){return typeof u=="object"&&u!==null&&(a?(function(h){try{return o.call(h),!0}catch{return!1}})(u):l.call(u)==="[object Date]")}},function(t,r,i){var o=i(6),l=i(15),a={attributes:{compose:function(h,y,x){typeof h!="object"&&(h={}),typeof y!="object"&&(y={});var w=l(!0,{},y);for(var _ in x||(w=Object.keys(w).reduce((function(S,R){return w[R]!=null&&(S[R]=w[R]),S}),{})),h)h[_]!==void 0&&y[_]===void 0&&(w[_]=h[_]);return Object.keys(w).length>0?w:void 0},diff:function(h,y){typeof h!="object"&&(h={}),typeof y!="object"&&(y={});var x=Object.keys(h).concat(Object.keys(y)).reduce((function(w,_){return o(h[_],y[_])||(w[_]=y[_]===void 0?null:y[_]),w}),{});return Object.keys(x).length>0?x:void 0},transform:function(h,y,x){if(typeof h!="object")return y;if(typeof y=="object"){if(!x)return y;var w=Object.keys(y).reduce((function(_,S){return h[S]===void 0&&(_[S]=y[S]),_}),{});return Object.keys(w).length>0?w:void 0}}},iterator:function(h){return new u(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function u(h){this.ops=h,this.index=0,this.offset=0}u.prototype.hasNext=function(){return this.peekLength()<1/0},u.prototype.next=function(h){h||(h=1/0);var y=this.ops[this.index];if(y){var x=this.offset,w=a.length(y);if(h>=w-x?(h=w-x,this.index+=1,this.offset=0):this.offset+=h,typeof y.delete=="number")return{delete:h};var _={};return y.attributes&&(_.attributes=y.attributes),typeof y.retain=="number"?_.retain=h:typeof y.insert=="string"?_.insert=y.insert.substr(x,h):_.insert=y.insert,_}return{retain:1/0}},u.prototype.peek=function(){return this.ops[this.index]},u.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},u.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},u.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,y=this.index,x=this.next(),w=this.ops.slice(this.index);return this.offset=h,this.index=y,[x].concat(w)}return[]},t.exports=a},function(t,r,i){var o=i(34),l=i(37);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=W,r.resolve=function(B,ee){return W(B,!1,!0).resolve(ee)},r.resolveObject=function(B,ee){return B?W(B,!1,!0).resolveObject(ee):ee},r.format=function(B){return l.isString(B)&&(B=W(B)),B instanceof a?B.format():a.prototype.format.call(B)},r.Url=a;var u=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,y=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,x=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
339
|
-
`," "]),w=["'"].concat(x),_=["%","/","?",";","#"].concat(w),S=["/","?","#"],R=/^[+a-z0-9A-Z_-]{0,63}$/,I=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,O={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},Y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},z=i(38);function W(B,ee,H){if(B&&l.isObject(B)&&B instanceof a)return B;var V=new a;return V.parse(B,ee,H),V}a.prototype.parse=function(B,ee,H){if(!l.isString(B))throw new TypeError("Parameter 'url' must be a string, not "+typeof B);var V=B.indexOf("?"),de=V!==-1&&V<B.indexOf("#")?"?":"#",Z=B.split(de);Z[0]=Z[0].replace(/\\/g,"/");var te=B=Z.join(de);if(te=te.trim(),!H&&B.split("#").length===1){var ne=y.exec(te);if(ne)return this.path=te,this.href=te,this.pathname=ne[1],ne[2]?(this.search=ne[2],this.query=ee?z.parse(this.search.substr(1)):this.search.substr(1)):ee&&(this.search="",this.query={}),this}var fe=u.exec(te);if(fe){var ae=(fe=fe[0]).toLowerCase();this.protocol=ae,te=te.substr(fe.length)}if(H||fe||te.match(/^\/\/[^@\/]+@[^@\/]+/)){var j=te.substr(0,2)==="//";!j||fe&&P[fe]||(te=te.substr(2),this.slashes=!0)}if(!P[fe]&&(j||fe&&!Y[fe])){for(var re,he,be=-1,le=0;le<S.length;le++)(J=te.indexOf(S[le]))!==-1&&(be===-1||J<be)&&(be=J);for((he=be===-1?te.lastIndexOf("@"):te.lastIndexOf("@",be))!==-1&&(re=te.slice(0,he),te=te.slice(he+1),this.auth=decodeURIComponent(re)),be=-1,le=0;le<_.length;le++){var J;(J=te.indexOf(_[le]))!==-1&&(be===-1||J<be)&&(be=J)}be===-1&&(be=te.length),this.host=te.slice(0,be),te=te.slice(be),this.parseHost(),this.hostname=this.hostname||"";var pe=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!pe)for(var Te=this.hostname.split(/\./),Fe=(le=0,Te.length);le<Fe;le++){var _e=Te[le];if(_e&&!_e.match(R)){for(var Me="",De=0,Re=_e.length;De<Re;De++)_e.charCodeAt(De)>127?Me+="x":Me+=_e[De];if(!Me.match(R)){var Le=Te.slice(0,le),Oe=Te.slice(le+1),Ge=_e.match(I);Ge&&(Le.push(Ge[1]),Oe.unshift(Ge[2])),Oe.length&&(te="/"+Oe.join(".")+te),this.hostname=Le.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),pe||(this.hostname=o.toASCII(this.hostname));var Ve=this.port?":"+this.port:"",Pe=this.hostname||"";this.host=Pe+Ve,this.href+=this.host,pe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),te[0]!=="/"&&(te="/"+te))}if(!O[ae])for(le=0,Fe=w.length;le<Fe;le++){var ot=w[le];if(te.indexOf(ot)!==-1){var Xe=encodeURIComponent(ot);Xe===ot&&(Xe=escape(ot)),te=te.split(ot).join(Xe)}}var lt=te.indexOf("#");lt!==-1&&(this.hash=te.substr(lt),te=te.slice(0,lt));var Ye=te.indexOf("?");if(Ye!==-1?(this.search=te.substr(Ye),this.query=te.substr(Ye+1),ee&&(this.query=z.parse(this.query)),te=te.slice(0,Ye)):ee&&(this.search="",this.query={}),te&&(this.pathname=te),Y[ae]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){Ve=this.pathname||"";var mt=this.search||"";this.path=Ve+mt}return this.href=this.format(),this},a.prototype.format=function(){var B=this.auth||"";B&&(B=(B=encodeURIComponent(B)).replace(/%3A/i,":"),B+="@");var ee=this.protocol||"",H=this.pathname||"",V=this.hash||"",de=!1,Z="";this.host?de=B+this.host:this.hostname&&(de=B+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(de+=":"+this.port)),this.query&&l.isObject(this.query)&&Object.keys(this.query).length&&(Z=z.stringify(this.query));var te=this.search||Z&&"?"+Z||"";return ee&&ee.substr(-1)!==":"&&(ee+=":"),this.slashes||(!ee||Y[ee])&&de!==!1?(de="//"+(de||""),H&&H.charAt(0)!=="/"&&(H="/"+H)):de||(de=""),V&&V.charAt(0)!=="#"&&(V="#"+V),te&&te.charAt(0)!=="?"&&(te="?"+te),ee+de+(H=H.replace(/[?#]/g,(function(ne){return encodeURIComponent(ne)})))+(te=te.replace("#","%23"))+V},a.prototype.resolve=function(B){return this.resolveObject(W(B,!1,!0)).format()},a.prototype.resolveObject=function(B){if(l.isString(B)){var ee=new a;ee.parse(B,!1,!0),B=ee}for(var H=new a,V=Object.keys(this),de=0;de<V.length;de++){var Z=V[de];H[Z]=this[Z]}if(H.hash=B.hash,B.href==="")return H.href=H.format(),H;if(B.slashes&&!B.protocol){for(var te=Object.keys(B),ne=0;ne<te.length;ne++){var fe=te[ne];fe!=="protocol"&&(H[fe]=B[fe])}return Y[H.protocol]&&H.hostname&&!H.pathname&&(H.path=H.pathname="/"),H.href=H.format(),H}if(B.protocol&&B.protocol!==H.protocol){if(!Y[B.protocol]){for(var ae=Object.keys(B),j=0;j<ae.length;j++){var re=ae[j];H[re]=B[re]}return H.href=H.format(),H}if(H.protocol=B.protocol,B.host||P[B.protocol])H.pathname=B.pathname;else{for(var he=(B.pathname||"").split("/");he.length&&!(B.host=he.shift()););B.host||(B.host=""),B.hostname||(B.hostname=""),he[0]!==""&&he.unshift(""),he.length<2&&he.unshift(""),H.pathname=he.join("/")}if(H.search=B.search,H.query=B.query,H.host=B.host||"",H.auth=B.auth,H.hostname=B.hostname||B.host,H.port=B.port,H.pathname||H.search){var be=H.pathname||"",le=H.search||"";H.path=be+le}return H.slashes=H.slashes||B.slashes,H.href=H.format(),H}var J=H.pathname&&H.pathname.charAt(0)==="/",pe=B.host||B.pathname&&B.pathname.charAt(0)==="/",Te=pe||J||H.host&&B.pathname,Fe=Te,_e=H.pathname&&H.pathname.split("/")||[],Me=(he=B.pathname&&B.pathname.split("/")||[],H.protocol&&!Y[H.protocol]);if(Me&&(H.hostname="",H.port=null,H.host&&(_e[0]===""?_e[0]=H.host:_e.unshift(H.host)),H.host="",B.protocol&&(B.hostname=null,B.port=null,B.host&&(he[0]===""?he[0]=B.host:he.unshift(B.host)),B.host=null),Te=Te&&(he[0]===""||_e[0]==="")),pe)H.host=B.host||B.host===""?B.host:H.host,H.hostname=B.hostname||B.hostname===""?B.hostname:H.hostname,H.search=B.search,H.query=B.query,_e=he;else if(he.length)_e||(_e=[]),_e.pop(),_e=_e.concat(he),H.search=B.search,H.query=B.query;else if(!l.isNullOrUndefined(B.search))return Me&&(H.hostname=H.host=_e.shift(),(Ge=!!(H.host&&H.host.indexOf("@")>0)&&H.host.split("@"))&&(H.auth=Ge.shift(),H.host=H.hostname=Ge.shift())),H.search=B.search,H.query=B.query,l.isNull(H.pathname)&&l.isNull(H.search)||(H.path=(H.pathname?H.pathname:"")+(H.search?H.search:"")),H.href=H.format(),H;if(!_e.length)return H.pathname=null,H.search?H.path="/"+H.search:H.path=null,H.href=H.format(),H;for(var De=_e.slice(-1)[0],Re=(H.host||B.host||_e.length>1)&&(De==="."||De==="..")||De==="",Le=0,Oe=_e.length;Oe>=0;Oe--)(De=_e[Oe])==="."?_e.splice(Oe,1):De===".."?(_e.splice(Oe,1),Le++):Le&&(_e.splice(Oe,1),Le--);if(!Te&&!Fe)for(;Le--;Le)_e.unshift("..");!Te||_e[0]===""||_e[0]&&_e[0].charAt(0)==="/"||_e.unshift(""),Re&&_e.join("/").substr(-1)!=="/"&&_e.push("");var Ge,Ve=_e[0]===""||_e[0]&&_e[0].charAt(0)==="/";return Me&&(H.hostname=H.host=Ve?"":_e.length?_e.shift():"",(Ge=!!(H.host&&H.host.indexOf("@")>0)&&H.host.split("@"))&&(H.auth=Ge.shift(),H.host=H.hostname=Ge.shift())),(Te=Te||H.host&&_e.length)&&!Ve&&_e.unshift(""),_e.length?H.pathname=_e.join("/"):(H.pathname=null,H.path=null),l.isNull(H.pathname)&&l.isNull(H.search)||(H.path=(H.pathname?H.pathname:"")+(H.search?H.search:"")),H.auth=B.auth||H.auth,H.slashes=H.slashes||B.slashes,H.href=H.format(),H},a.prototype.parseHost=function(){var B=this.host,ee=h.exec(B);ee&&((ee=ee[0])!==":"&&(this.port=ee.substr(1)),B=B.substr(0,B.length-ee.length)),B&&(this.hostname=B)}},function(t,r,i){(function(o,l){var a;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(u){r&&r.nodeType,o&&o.nodeType;var h=typeof l=="object"&&l;h.global!==h&&h.window!==h&&h.self;var y,x=2147483647,w=/^xn--/,_=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=Math.floor,O=String.fromCharCode;function P(Z){throw new RangeError(R[Z])}function Y(Z,te){for(var ne=Z.length,fe=[];ne--;)fe[ne]=te(Z[ne]);return fe}function z(Z,te){var ne=Z.split("@"),fe="";return ne.length>1&&(fe=ne[0]+"@",Z=ne[1]),fe+Y((Z=Z.replace(S,".")).split("."),te).join(".")}function W(Z){for(var te,ne,fe=[],ae=0,j=Z.length;ae<j;)(te=Z.charCodeAt(ae++))>=55296&&te<=56319&&ae<j?(64512&(ne=Z.charCodeAt(ae++)))==56320?fe.push(((1023&te)<<10)+(1023&ne)+65536):(fe.push(te),ae--):fe.push(te);return fe}function B(Z){return Y(Z,(function(te){var ne="";return te>65535&&(ne+=O((te-=65536)>>>10&1023|55296),te=56320|1023&te),ne+=O(te)})).join("")}function ee(Z,te){return Z+22+75*(Z<26)-((te!=0)<<5)}function H(Z,te,ne){var fe=0;for(Z=ne?I(Z/700):Z>>1,Z+=I(Z/te);Z>455;fe+=36)Z=I(Z/35);return I(fe+36*Z/(Z+38))}function V(Z){var te,ne,fe,ae,j,re,he,be,le,J,pe,Te=[],Fe=Z.length,_e=0,Me=128,De=72;for((ne=Z.lastIndexOf("-"))<0&&(ne=0),fe=0;fe<ne;++fe)Z.charCodeAt(fe)>=128&&P("not-basic"),Te.push(Z.charCodeAt(fe));for(ae=ne>0?ne+1:0;ae<Fe;){for(j=_e,re=1,he=36;ae>=Fe&&P("invalid-input"),((be=(pe=Z.charCodeAt(ae++))-48<10?pe-22:pe-65<26?pe-65:pe-97<26?pe-97:36)>=36||be>I((x-_e)/re))&&P("overflow"),_e+=be*re,!(be<(le=he<=De?1:he>=De+26?26:he-De));he+=36)re>I(x/(J=36-le))&&P("overflow"),re*=J;De=H(_e-j,te=Te.length+1,j==0),I(_e/te)>x-Me&&P("overflow"),Me+=I(_e/te),_e%=te,Te.splice(_e++,0,Me)}return B(Te)}function de(Z){var te,ne,fe,ae,j,re,he,be,le,J,pe,Te,Fe,_e,Me,De=[];for(Te=(Z=W(Z)).length,te=128,ne=0,j=72,re=0;re<Te;++re)(pe=Z[re])<128&&De.push(O(pe));for(fe=ae=De.length,ae&&De.push("-");fe<Te;){for(he=x,re=0;re<Te;++re)(pe=Z[re])>=te&&pe<he&&(he=pe);for(he-te>I((x-ne)/(Fe=fe+1))&&P("overflow"),ne+=(he-te)*Fe,te=he,re=0;re<Te;++re)if((pe=Z[re])<te&&++ne>x&&P("overflow"),pe==te){for(be=ne,le=36;!(be<(J=le<=j?1:le>=j+26?26:le-j));le+=36)Me=be-J,_e=36-J,De.push(O(ee(J+Me%_e,0))),be=I(Me/_e);De.push(O(ee(be,0))),j=H(ne,Fe,fe==ae),ne=0,++fe}++ne,++te}return De.join("")}y={version:"1.4.1",ucs2:{decode:W,encode:B},decode:V,encode:de,toASCII:function(Z){return z(Z,(function(te){return _.test(te)?"xn--"+de(te):te}))},toUnicode:function(Z){return z(Z,(function(te){return w.test(te)?V(te.slice(4).toLowerCase()):te}))}},(a=(function(){return y}).call(r,i,r,o))===void 0||(o.exports=a)})()}).call(this,i(35)(t),i(36))},function(t,r){t.exports=function(i){return i.webpackPolyfill||(i.deprecate=function(){},i.paths=[],i.children||(i.children=[]),Object.defineProperty(i,"loaded",{enumerable:!0,get:function(){return i.l}}),Object.defineProperty(i,"id",{enumerable:!0,get:function(){return i.i}}),i.webpackPolyfill=1),i}},function(t,r){var i;i=(function(){return this})();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}t.exports=i},function(t,r,i){t.exports={isString:function(o){return typeof o=="string"},isObject:function(o){return typeof o=="object"&&o!==null},isNull:function(o){return o===null},isNullOrUndefined:function(o){return o==null}}},function(t,r,i){r.decode=r.parse=i(39),r.encode=r.stringify=i(40)},function(t,r,i){function o(a,u){return Object.prototype.hasOwnProperty.call(a,u)}t.exports=function(a,u,h,y){u=u||"&",h=h||"=";var x={};if(typeof a!="string"||a.length===0)return x;var w=/\+/g;a=a.split(u);var _=1e3;y&&typeof y.maxKeys=="number"&&(_=y.maxKeys);var S=a.length;_>0&&S>_&&(S=_);for(var R=0;R<S;++R){var I,O,P,Y,z=a[R].replace(w,"%20"),W=z.indexOf(h);W>=0?(I=z.substr(0,W),O=z.substr(W+1)):(I=z,O=""),P=decodeURIComponent(I),Y=decodeURIComponent(O),o(x,P)?l(x[P])?x[P].push(Y):x[P]=[x[P],Y]:x[P]=Y}return x};var l=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}},function(t,r,i){var o=function(h){switch(typeof h){case"string":return h;case"boolean":return h?"true":"false";case"number":return isFinite(h)?h:"";default:return""}};t.exports=function(h,y,x,w){return y=y||"&",x=x||"=",h===null&&(h=void 0),typeof h=="object"?a(u(h),(function(_){var S=encodeURIComponent(o(_))+x;return l(h[_])?a(h[_],(function(R){return S+encodeURIComponent(o(R))})).join(y):S+encodeURIComponent(o(h[_]))})).join(y):w?encodeURIComponent(o(w))+x+encodeURIComponent(o(h)):""};var l=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"};function a(h,y){if(h.map)return h.map(y);for(var x=[],w=0;w<h.length;w++)x.push(y(h[w],w));return x}var u=Object.keys||function(h){var y=[];for(var x in h)Object.prototype.hasOwnProperty.call(h,x)&&y.push(x);return y}}])}))})(Rb)),Rb.exports}var uF=cF();const fF=M1(uF),et={container:"table-up-container",tableCaption:"table-up-caption",tableWrapper:"table-up",tableMain:"table-up-main",tableColgroup:"table-up-colgroup",tableCol:"table-up-col",tableBody:"table-up-body",tableRow:"table-up-row",tableCell:"table-up-cell",tableCellInner:"table-up-cell-inner"},Ss={colMinWidthPre:5,colMinWidthPx:40,colDefaultWidth:100,rowMinHeightPx:36},sv={AFTER_TABLE_RESIZE:"after-table-resize"},Ib={moduleName:"table-up"},dF=[["rgb(255, 255, 255)","rgb(0, 0, 0)","rgb(72, 83, 104)","rgb(41, 114, 244)","rgb(0, 163, 245)","rgb(49, 155, 98)","rgb(222, 60, 54)","rgb(248, 136, 37)","rgb(245, 196, 0)","rgb(153, 56, 215)"],["rgb(242, 242, 242)","rgb(127, 127, 127)","rgb(243, 245, 247)","rgb(229, 239, 255)","rgb(229, 246, 255)","rgb(234, 250, 241)","rgb(254, 233, 232)","rgb(254, 243, 235)","rgb(254, 249, 227)","rgb(253, 235, 255)"],["rgb(216, 216, 216)","rgb(89, 89, 89)","rgb(197, 202, 211)","rgb(199, 220, 255)","rgb(199, 236, 255)","rgb(195, 234, 213)","rgb(255, 201, 199)","rgb(255, 220, 196)","rgb(255, 238, 173)","rgb(242, 199, 255)"],["rgb(191, 191, 191)","rgb(63, 63, 63)","rgb(128, 139, 158)","rgb(153, 190, 255)","rgb(153, 221, 255)","rgb(152, 215, 182)","rgb(255, 156, 153)","rgb(255, 186, 132)","rgb(255, 226, 112)","rgb(213, 142, 255)"],["rgb(165, 165, 165)","rgb(38, 38, 38)","rgb(53, 59, 69)","rgb(20, 80, 184)","rgb(18, 116, 165)","rgb(39, 124, 79)","rgb(158, 30, 26)","rgb(184, 96, 20)","rgb(163, 130, 0)","rgb(94, 34, 129)"],["rgb(147, 147, 147)","rgb(13, 13, 13)","rgb(36, 39, 46)","rgb(12, 48, 110)","rgb(10, 65, 92)","rgb(24, 78, 50)","rgb(88, 17, 14)","rgb(92, 48, 10)","rgb(102, 82, 0)","rgb(59, 21, 81)"]],hF="table-up",gF=new Set([et.tableCellInner]),pF=n=>gF.has(n.statics.blotName);function l4(n){return n&&n.parent?pF(n.parent)?!0:l4(n.parent):!1}function cu(n,e=hF){let t=e?`${e}-`:"";return{b:()=>`${t}${n}`,be:r=>r?`${t}${n}__${r}`:"",bm:r=>r?`${t}${n}--${r}`:"",bem:(r,i)=>r&&i?`${t}${n}__${r}--${i}`:"",ns:r=>r?`${t}${r}`:"",bs:r=>r?`${t}${n}-${r}`:"",cv:r=>r?`--${t}${r}`:"",is:r=>`is-${r}`}}function Kl(n,e){let t=n.parent;for(;t&&t.statics.blotName!==e&&t!==n.scroll;)t=t.parent;if(t===n.scroll)throw Error(`${n.statics.blotName} must be a child of ${e}`);return t}function A1(n,e){let t=Array(e.length),r=new Map(e.map((o,l)=>[o,l])),i=n.parent;for(;i&&i!==n.scroll&&r.size!==0;){if(r.has(i.statics.blotName)){let o=r.get(i.statics.blotName);t[o]=i,r.delete(i.statics.blotName)}i=i.parent}if(r.size>0)throw Error(`${n.statics.blotName} must be a child of ${Array.from(r.keys()).join(", ")}`);return t}function hw(n){let e=new Map,t=n;for(;t&&t.statics.blotName!=="scroll";)e.set(t.statics.blotName,t),t=t.parent;return e}function vF(n,e){let t=[],r=n.children.iterator(),i=null;for(;i=r();)i instanceof e&&t.push(i);return t}function bF(n,e,t){for(let r of Object.getOwnPropertyNames(e))t&&t.test(r)||Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r));return n}function yF(n,e){let t=class extends n{constructor(...r){super(...r)}};for(let r of e)bF(t.prototype,r.prototype,/^constructor$/);return t}function R0(n,e){return n.prototype instanceof e}function v1(n,e){return n=Math.min(e,Math.max(0,Number.parseFloat(`${n}`))),Math.abs(n-e)<1e-6?1:n%e/Number.parseFloat(e)}function gw(n){return{h:Math.min(360,Math.max(0,n.h)),s:Math.min(100,Math.max(0,n.s)),b:Math.min(100,Math.max(0,n.b)),a:Math.min(1,Math.max(0,n.a))}}function mF(n){n=n.startsWith("#")?n.slice(1):n;let e=Number.parseInt(n.slice(0,2),16),t=Number.parseInt(n.slice(2,4),16),r=Number.parseInt(n.slice(4,6),16),i=Number((Number.parseInt(n.slice(6,8)||"ff",16)/255).toFixed(2));return{r:e,g:t,b:r,a:i}}function pw(n){let{r:e,g:t,b:r,a:i}=n;e=v1(e,255),t=v1(t,255),r=v1(r,255);let o=Math.max(e,t,r),l=Math.min(e,t,r),a,u=o,h=o-l,y=o===0?0:h/o;if(o===l)a=0;else{switch(o){case e:a=(t-r)/h+(t<r?6:0);break;case t:a=(r-e)/h+2;break;case r:a=(e-t)/h+4;break}a/=6}return{h:a*360,s:y*100,b:u*100,a:i}}function X0(n){let{h:e,s:t,b:r,a:i}=n;e=v1(e,360)*6,t=v1(t,100),r=v1(r,100);let o=Math.floor(e),l=e-o,a=r*(1-t),u=r*(1-l*t),h=r*(1-(1-l)*t),y=o%6,x=[r,u,a,a,h,r][y],w=[h,r,r,u,a,a][y],_=[a,a,h,r,r,u][y];return{r:Math.round(x*255),g:Math.round(w*255),b:Math.round(_*255),a:i}}function s4(n){let e=[n.r.toString(16),n.g.toString(16),n.b.toString(16),Math.round(n.a*255).toString(16)];for(let t in e)e[t].length===1&&(e[t]=`0${e[t]}`);return e.join("")}const vw=n=>s4(X0(n)),tm=n=>typeof n=="function",a4=Array.isArray,Lg=n=>typeof n=="string",xF=n=>typeof n=="number",I0=n=>typeof n=="object"&&!!n,wF=n=>!Number.isNaN(n)&&Number(n)>0,CF=n=>a4(n)?n:[n];function av(n){let{type:e="default",content:t}=n||{},r=cu("button"),i=document.createElement("button");return i.classList.add(r.b(),e),t&&(Lg(t)?i.textContent=t:i.appendChild(t)),i}function _F(n={}){let e=230,t=150,r=10,i=pw(mF(n.color||"#ff0000")),o=cu("color-picker"),l=document.createElement("div");l.classList.add(o.b());let a=document.createElement("div");a.classList.add(o.be("content"));let u=document.createElement("div");u.classList.add(o.be("selector"));let h=document.createElement("div");h.classList.add(o.be("background")),u.appendChild(h);let y=document.createElement("div");y.classList.add(o.be("background-handle")),h.appendChild(y);let x=document.createElement("div");x.classList.add(o.be("alpha"));let w=document.createElement("div");w.classList.add(o.be("alpha-bg"));let _=document.createElement("div");_.classList.add(o.be("alpha-handle")),x.appendChild(w),x.appendChild(_);let S=document.createElement("div");S.classList.add(o.be("hue"));let R=document.createElement("div");R.classList.add(o.be("hue-handle")),S.appendChild(R);let I=document.createElement("div");I.classList.add(o.be("action"));let[O,P,Y,z]=["r","g","b","a"].map(Me=>{let De=document.createElement("div");De.classList.add(o.be("action-item"),Me);let Re=document.createElement("label");Re.textContent=Me.toUpperCase();let Le=document.createElement("input");return Le.classList.add(o.be("input")),Le.addEventListener("input",()=>{Le.value=Le.value.replaceAll(/[^0-9]/g,"")}),Le.addEventListener("change",()=>{let Oe=Math.round(Number(Le.value));Me==="a"&&(Oe/=100);let Ge=gw(pw(Object.assign({},X0(i),{[Me]:Oe})));ae(Ge),fe()}),De.appendChild(Re),De.appendChild(Le),I.appendChild(De),Le});a.appendChild(S),a.appendChild(u),a.appendChild(x),l.appendChild(a),l.appendChild(I);let W=!1,B=!1,ee=!1;function H(){let Me=vw(i);for(let[De,Re]of[O,P,Y].entries())Re.value=String(Number.parseInt(Me[De*2]+Me[De*2+1],16));z.value=String((i.a*100).toFixed(0))}function V(){Object.assign(y.style,{left:`${Math.floor(e*i.s/100)}px`,top:`${Math.floor(t*(100-i.b)/100)}px`})}function de(){u.style.backgroundColor=`#${s4(X0({h:i.h,s:100,b:100,a:1}))}`}function Z(){R.style.top=`${Math.floor(t-t*i.h/360)}px`}function te(){_.style.left=`${i.a*100}%`}function ne(){let{r:Me,g:De,b:Re}=X0(i);w.style.background=`linear-gradient(to right, rgba(${Me}, ${De}, ${Re}, 0) 0%, rgba(${Me}, ${De}, ${Re}, 1) 100%)`}function fe(){V(),de(),Z(),te(),ne(),H()}function ae(Me){i=gw(Object.assign({},i,Me)),H(),n.onChange&&n.onChange(`#${vw(i)}`)}function j(Me){let De=u.getBoundingClientRect(),Re=De.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),Le=De.left+document.body.scrollLeft,Oe=Math.floor(100*Math.max(0,Math.min(e,Me.pageX-Le))/e),Ge=Math.floor(100*(t-Math.max(0,Math.min(t,Me.pageY-Re)))/t);ae({s:Oe,b:Ge}),fe()}function re(Me){let De=S.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);ae({h:Math.floor(360*(t-Math.max(0,Math.min(t,Me.pageY-De)))/t)}),fe()}function he(Me){let{pageX:De}=Me,Re=x.getBoundingClientRect(),Le=De-Re.left;Le=Math.max(r/2,Le),Le=Math.min(Le,Re.width-r/2),ae({a:Math.round((Le-10/2)/(Re.width-10)*100)/100}),fe()}function be(Me){W&&(Me.preventDefault(),j(Me)),B&&(Me.preventDefault(),re(Me)),ee&&(Me.preventDefault(),he(Me))}function le(){document.removeEventListener("mousemove",be),document.removeEventListener("mouseup",le),W=!1}function J(Me){document.addEventListener("mousemove",be),document.addEventListener("mouseup",le),W=!0,j(Me)}u.addEventListener("mousedown",J);function pe(){document.removeEventListener("mousemove",be),document.removeEventListener("mouseup",pe),B=!1}function Te(Me){document.addEventListener("mousemove",be),document.addEventListener("mouseup",pe),B=!0,re(Me)}S.addEventListener("mousedown",Te);function Fe(){document.removeEventListener("mousemove",be),document.removeEventListener("mouseup",Fe),ee=!1}function _e(Me){document.addEventListener("mousemove",be),document.addEventListener("mouseup",Fe),ee=!0,he(Me)}return x.addEventListener("mousedown",_e),fe(),l}let bw=8e3;function c4({child:n,target:e=document.body,beforeClose:t=()=>{}}={}){let r=cu("dialog"),i=e,o=document.createElement("div");o.classList.add(r.b()),o.style.zIndex=String(bw);let l=document.createElement("div");if(l.classList.add(r.be("overlay")),o.appendChild(l),n){let h=document.createElement("div");h.classList.add(r.be("content")),h.appendChild(n),l.appendChild(h),h.addEventListener("click",y=>{y.stopPropagation()})}let a=getComputedStyle(i).overflow;i.style.overflow="hidden",i.appendChild(o);let u=()=>{t(),o.remove(),i.style.overflow=a};return o.addEventListener("click",u),bw+=1,{dialog:o,close:u}}function yw(n,e){let t=cu("input");e.type||(e.type="text"),e.value||(e.value="");let r=document.createElement("div");if(r.classList.add(t.be("item")),n){let a=document.createElement("span");a.classList.add(t.be("label")),a.textContent=n,r.appendChild(a)}let i=document.createElement("div");i.classList.add(t.be("input"));let o=document.createElement("input");for(let a in e)o.setAttribute(a,e[a]);return(e.max||e.min)&&o.addEventListener("blur",()=>{e.max&&e.max<=Number(o.value)&&(o.value=String(e.max)),e.min&&e.min>=Number(o.value)&&(o.value=String(e.min))}),i.appendChild(o),r.appendChild(i),o.addEventListener("focus",()=>{i.classList.add("focus")}),o.addEventListener("blur",()=>{i.classList.remove("focus")}),{item:r,input:o,errorTip:a=>{let u;return i.classList.contains("error")?u=i.querySelector(`.${t.be("error-tip")}`):(u=document.createElement("span"),u.classList.add(t.be("error-tip")),i.appendChild(u)),u.textContent=a,i.classList.add("error"),{removeError:()=>{i.classList.remove("error"),u.remove()}}}}}async function SF(n={}){let e=cu("creator"),t=document.createElement("div");t.classList.add(e.b());let r=document.createElement("div");r.classList.add(e.be("input"));let{item:i,input:o,errorTip:l}=yw(n.rowText||"Row",{type:"number",value:String(n.row||""),max:99}),{item:a,input:u,errorTip:h}=yw(n.colText||"Column",{type:"number",value:String(n.col||""),max:99});r.appendChild(i),r.appendChild(a),t.appendChild(r);let y=document.createElement("div");y.classList.add(e.be("control"));let x=av({type:"confirm",content:n.confirmText||"Confirm"}),w=av({type:"default",content:n.cancelText||"Cancel"});y.appendChild(x),y.appendChild(w),t.appendChild(y);let _=(R=Number(o.value),I=Number(u.value))=>{if(Number.isNaN(R)||R<=0){l(n.notPositiveNumberError||"Please enter a positive integer");return}if(Number.isNaN(I)||I<=0){h(n.notPositiveNumberError||"Please enter a positive integer");return}return{row:R,col:I}},S=R=>{R.key==="Escape"&&(close(),document.removeEventListener("keydown",S))};return new Promise((R,I)=>{let{close:O}=c4({child:t,beforeClose:I});o.focus();for(let P of[o,u])P.addEventListener("keydown",Y=>{if(Y.key==="Enter"){let z=_();z&&(R(z),O())}});x.addEventListener("click",async()=>{let P=_();P&&(R(P),O())}),document.addEventListener("keydown",S),w.addEventListener("click",O)})}function EF(n={}){let e=cu("select-box"),t=document.createElement("div");t.classList.add(e.b());let r=document.createElement("div");r.classList.add(e.be("block"));for(let o=0;o<(n.row||8);o++)for(let l=0;l<(n.col||8);l++){let a=document.createElement("div");a.classList.add(e.be("item")),a.dataset.row=String(o+1),a.dataset.col=String(l+1),r.appendChild(a)}let i=()=>{let{row:o,col:l}=t.dataset;for(let u of Array.from(r.querySelectorAll(".active")))u.classList.remove("active");if(!o||!l)return;let a=Array.from(r.children);for(let u=0;u<a.length;u++){let{row:h,col:y}=a[u].dataset;if(h>o&&y>l)return;h<=o&&y<=l?a[u].classList.add("active"):a[u].classList.remove("active")}};if(r.addEventListener("mousemove",o=>{if(!o.target)return;let{row:l,col:a}=o.target.dataset;!l||!a||(t.dataset.row=l,t.dataset.col=a,i())}),r.addEventListener("mouseleave",()=>{t.removeAttribute("data-row"),t.removeAttribute("data-col"),i()}),r.addEventListener("click",()=>{let{row:o,col:l}=t.dataset;!o||!l||n.onSelect&&n.onSelect(Number(o),Number(l))}),t.appendChild(r),n.customBtn){let o=n.texts||{},l=document.createElement("div");l.classList.add(e.be("custom")),l.textContent=o.customBtnText||"Custom",l.addEventListener("click",async()=>{let a=await SF(o);a&&n.onSelect&&n.onSelect(a.row,a.col)}),t.appendChild(l)}return t}const cv=Math.min,Og=Math.max,uv=Math.round,k0=Math.floor,th=n=>({x:n,y:n}),AF={left:"right",right:"left",bottom:"top",top:"bottom"},TF={start:"end",end:"start"};function mw(n,e,t){return Og(n,cv(e,t))}function T1(n,e){return typeof n=="function"?n(e):n}function cg(n){return n.split("-")[0]}function Pv(n){return n.split("-")[1]}function Vm(n){return n==="x"?"y":"x"}function u4(n){return n==="y"?"height":"width"}function Eh(n){return["top","bottom"].includes(cg(n))?"y":"x"}function f4(n){return Vm(Eh(n))}function RF(n,e,t){t===void 0&&(t=!1);let r=Pv(n),i=f4(n),o=u4(i),l=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(l=fv(l)),[l,fv(l)]}function IF(n){let e=fv(n);return[nm(n),e,nm(e)]}function nm(n){return n.replace(/start|end/g,e=>TF[e])}function kF(n,e,t){let r=["left","right"],i=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?o:l;default:return[]}}function MF(n,e,t,r){let i=Pv(n),o=kF(cg(n),t==="start",r);return i&&(o=o.map(l=>l+"-"+i),e&&(o=o.concat(o.map(nm)))),o}function fv(n){return n.replace(/left|right|bottom|top/g,e=>AF[e])}function LF(n){return{top:0,right:0,bottom:0,left:0,...n}}function OF(n){return typeof n=="number"?{top:n,right:n,bottom:n,left:n}:LF(n)}function dv(n){let{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function xw(n,e,t){let{reference:r,floating:i}=n,o=Eh(e),l=f4(e),a=u4(l),u=cg(e),h=o==="y",y=r.x+r.width/2-i.width/2,x=r.y+r.height/2-i.height/2,w=r[a]/2-i[a]/2,_;switch(u){case"top":_={x:y,y:r.y-i.height};break;case"bottom":_={x:y,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:x};break;case"left":_={x:r.x-i.width,y:x};break;default:_={x:r.x,y:r.y}}switch(Pv(e)){case"start":_[l]-=w*(t&&h?-1:1);break;case"end":_[l]+=w*(t&&h?-1:1);break}return _}const PF=async(n,e,t)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=t,a=o.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(e)),h=await l.getElementRects({reference:n,floating:e,strategy:i}),{x:y,y:x}=xw(h,r,u),w=r,_={},S=0;for(let R=0;R<a.length;R++){let{name:I,fn:O}=a[R],{x:P,y:Y,data:z,reset:W}=await O({x:y,y:x,initialPlacement:r,placement:w,strategy:i,middlewareData:_,rects:h,platform:l,elements:{reference:n,floating:e}});y=P??y,x=Y??x,_={..._,[I]:{..._[I],...z}},W&&S<=50&&(S++,typeof W=="object"&&(W.placement&&(w=W.placement),W.rects&&(h=W.rects===!0?await l.getElementRects({reference:n,floating:e,strategy:i}):W.rects),{x:y,y:x}=xw(h,w,u)),R=-1)}return{x:y,y:x,placement:w,strategy:i,middlewareData:_}};async function d4(n,e){e===void 0&&(e={});let{x:t,y:r,platform:i,rects:o,elements:l,strategy:a}=n,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:y="floating",altBoundary:x=!1,padding:w=0}=T1(e,n),_=OF(w),S=y==="floating"?"reference":"floating",R=l[x?S:y],I=dv(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(R))??!0?R:R.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:h,strategy:a})),O=y==="floating"?{x:t,y:r,width:o.floating.width,height:o.floating.height}:o.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),Y=await(i.isElement==null?void 0:i.isElement(P))&&await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1},z=dv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:O,offsetParent:P,strategy:a}):O);return{top:(I.top-z.top+_.top)/Y.y,bottom:(z.bottom-I.bottom+_.bottom)/Y.y,left:(I.left-z.left+_.left)/Y.x,right:(z.right-I.right+_.right)/Y.x}}const DF=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var de,Z,te,ne;var t;let{placement:r,middlewareData:i,rects:o,initialPlacement:l,platform:a,elements:u}=e,{mainAxis:h=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:S=!0,...R}=T1(n,e);if((t=i.arrow)!=null&&t.alignmentOffset)return{};let I=cg(r),O=Eh(l),P=cg(l)===l,Y=await(a.isRTL==null?void 0:a.isRTL(u.floating)),z=x||(P||!S?[fv(l)]:IF(l)),W=_!=="none";!x&&W&&z.push(...MF(l,S,_,Y));let B=[l,...z],ee=await d4(e,R),H=[],V=((de=i.flip)==null?void 0:de.overflows)||[];if(h&&H.push(ee[I]),y){let fe=RF(r,o,Y);H.push(ee[fe[0]],ee[fe[1]])}if(V=[...V,{placement:r,overflows:H}],!H.every(fe=>fe<=0)){let fe=(((Z=i.flip)==null?void 0:Z.index)||0)+1,ae=B[fe];if(ae&&(!(y==="alignment"?O!==Eh(ae):!1)||V.every(he=>he.overflows[0]>0&&Eh(he.placement)===O)))return{data:{index:fe,overflows:V},reset:{placement:ae}};let j=(te=V.filter(re=>re.overflows[0]<=0).sort((re,he)=>re.overflows[1]-he.overflows[1])[0])==null?void 0:te.placement;if(!j)switch(w){case"bestFit":{let re=(ne=V.filter(he=>{if(W){let be=Eh(he.placement);return be===O||be==="y"}return!0}).map(he=>[he.placement,he.overflows.filter(be=>be>0).reduce((be,le)=>be+le,0)]).sort((he,be)=>he[1]-be[1])[0])==null?void 0:ne[0];re&&(j=re);break}case"initialPlacement":j=l;break}if(r!==j)return{reset:{placement:j}}}return{}}}};async function NF(n,e){let{placement:t,platform:r,elements:i}=n,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=cg(t),a=Pv(t),u=Eh(t)==="y",h=["left","top"].includes(l)?-1:1,y=o&&u?-1:1,x=T1(e,n),{mainAxis:w,crossAxis:_,alignmentAxis:S}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return a&&typeof S=="number"&&(_=a==="end"?S*-1:S),u?{x:_*y,y:w*h}:{x:w*h,y:_*y}}const FF=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var u;var t;let{x:r,y:i,placement:o,middlewareData:l}=e,a=await NF(e,n);return o===((u=l.offset)==null?void 0:u.placement)&&(t=l.arrow)!=null&&t.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:o}}}}},BF=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:a={fn:I=>{let{x:O,y:P}=I;return{x:O,y:P}}},...u}=T1(n,e),h={x:t,y:r},y=await d4(e,u),x=Eh(cg(i)),w=Vm(x),_=h[w],S=h[x];if(o){let I=w==="y"?"top":"left",O=w==="y"?"bottom":"right",P=_+y[I],Y=_-y[O];_=mw(P,_,Y)}if(l){let I=x==="y"?"top":"left",O=x==="y"?"bottom":"right",P=S+y[I],Y=S-y[O];S=mw(P,S,Y)}let R=a.fn({...e,[w]:_,[x]:S});return{...R,data:{x:R.x-t,y:R.y-r,enabled:{[w]:o,[x]:l}}}}}},zF=function(n){return n===void 0&&(n={}),{options:n,fn(e){var O,P;let{x:t,y:r,placement:i,rects:o,middlewareData:l}=e,{offset:a=0,mainAxis:u=!0,crossAxis:h=!0}=T1(n,e),y={x:t,y:r},x=Eh(i),w=Vm(x),_=y[w],S=y[x],R=T1(a,e),I=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(u){let Y=w==="y"?"height":"width",z=o.reference[w]-o.floating[Y]+I.mainAxis,W=o.reference[w]+o.reference[Y]-I.mainAxis;_<z?_=z:_>W&&(_=W)}if(h){let Y=w==="y"?"width":"height",z=["top","left"].includes(cg(i)),W=o.reference[x]-o.floating[Y]+(z&&((O=l.offset)==null?void 0:O[x])||0)+(z?0:I.crossAxis),B=o.reference[x]+o.reference[Y]+(z?0:((P=l.offset)==null?void 0:P[x])||0)-(z?I.crossAxis:0);S<W?S=W:S>B&&(S=B)}return{[w]:_,[x]:S}}}};function Dv(){return typeof window<"u"}function P1(n){return h4(n)?(n.nodeName||"").toLowerCase():"#document"}function Ff(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function ah(n){var e;return(e=(h4(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function h4(n){return Dv()?n instanceof Node||n instanceof Ff(n).Node:!1}function Nd(n){return Dv()?n instanceof Element||n instanceof Ff(n).Element:!1}function oh(n){return Dv()?n instanceof HTMLElement||n instanceof Ff(n).HTMLElement:!1}function ww(n){return!Dv()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ff(n).ShadowRoot}function Vp(n){let{overflow:e,overflowX:t,overflowY:r,display:i}=Fd(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function HF(n){return["table","td","th"].includes(P1(n))}function Nv(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function Zm(n){let e=Xm(),t=Nd(n)?Fd(n):n;return["transform","translate","scale","rotate","perspective"].some(r=>t[r]?t[r]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function WF(n){let e=ug(n);for(;oh(e)&&!R1(e);){if(Zm(e))return e;if(Nv(e))return null;e=ug(e)}return null}function Xm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function R1(n){return["html","body","#document"].includes(P1(n))}function Fd(n){return Ff(n).getComputedStyle(n)}function Fv(n){return Nd(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function ug(n){if(P1(n)==="html")return n;let e=n.assignedSlot||n.parentNode||ww(n)&&n.host||ah(n);return ww(e)?e.host:e}function g4(n){let e=ug(n);return R1(e)?n.ownerDocument?n.ownerDocument.body:n.body:oh(e)&&Vp(e)?e:g4(e)}function Pp(n,e,t){var l;e===void 0&&(e=[]),t===void 0&&(t=!0);let r=g4(n),i=r===((l=n.ownerDocument)==null?void 0:l.body),o=Ff(r);if(i){let a=rm(o);return e.concat(o,o.visualViewport||[],Vp(r)?r:[],a&&t?Pp(a):[])}return e.concat(r,Pp(r,[],t))}function rm(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function p4(n){let e=Fd(n),t=parseFloat(e.width)||0,r=parseFloat(e.height)||0,i=oh(n),o=i?n.offsetWidth:t,l=i?n.offsetHeight:r,a=uv(t)!==o||uv(r)!==l;return a&&(t=o,r=l),{width:t,height:r,$:a}}function Km(n){return Nd(n)?n:n.contextElement}function b1(n){let e=Km(n);if(!oh(e))return th(1);let t=e.getBoundingClientRect(),{width:r,height:i,$:o}=p4(e),l=(o?uv(t.width):t.width)/r,a=(o?uv(t.height):t.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const UF=th(0);function v4(n){let e=Ff(n);return!Xm()||!e.visualViewport?UF:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function GF(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Ff(n)?!1:e}function Fg(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);let i=n.getBoundingClientRect(),o=Km(n),l=th(1);e&&(r?Nd(r)&&(l=b1(r)):l=b1(n));let a=GF(o,t,r)?v4(o):th(0),u=(i.left+a.x)/l.x,h=(i.top+a.y)/l.y,y=i.width/l.x,x=i.height/l.y;if(o){let w=Ff(o),_=r&&Nd(r)?Ff(r):r,S=w,R=rm(S);for(;R&&r&&_!==S;){let I=b1(R),O=R.getBoundingClientRect(),P=Fd(R),Y=O.left+(R.clientLeft+parseFloat(P.paddingLeft))*I.x,z=O.top+(R.clientTop+parseFloat(P.paddingTop))*I.y;u*=I.x,h*=I.y,y*=I.x,x*=I.y,u+=Y,h+=z,S=Ff(R),R=rm(S)}}return dv({width:y,height:x,x:u,y:h})}function Jm(n,e){let t=Fv(n).scrollLeft;return e?e.left+t:Fg(ah(n)).left+t}function b4(n,e,t){t===void 0&&(t=!1);let r=n.getBoundingClientRect(),i=r.left+e.scrollLeft-(t?0:Jm(n,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function YF(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n,o=i==="fixed",l=ah(r),a=e?Nv(e.floating):!1;if(r===l||a&&o)return t;let u={scrollLeft:0,scrollTop:0},h=th(1),y=th(0),x=oh(r);if((x||!x&&!o)&&((P1(r)!=="body"||Vp(l))&&(u=Fv(r)),oh(r))){let _=Fg(r);h=b1(r),y.x=_.x+r.clientLeft,y.y=_.y+r.clientTop}let w=l&&!x&&!o?b4(l,u,!0):th(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-u.scrollLeft*h.x+y.x+w.x,y:t.y*h.y-u.scrollTop*h.y+y.y+w.y}}function VF(n){return Array.from(n.getClientRects())}function ZF(n){let e=ah(n),t=Fv(n),r=n.ownerDocument.body,i=Og(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Og(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),l=-t.scrollLeft+Jm(n),a=-t.scrollTop;return Fd(r).direction==="rtl"&&(l+=Og(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:a}}function XF(n,e){let t=Ff(n),r=ah(n),i=t.visualViewport,o=r.clientWidth,l=r.clientHeight,a=0,u=0;if(i){o=i.width,l=i.height;let h=Xm();(!h||h&&e==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:l,x:a,y:u}}function KF(n,e){let t=Fg(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,o=oh(n)?b1(n):th(1),l=n.clientWidth*o.x,a=n.clientHeight*o.y,u=i*o.x,h=r*o.y;return{width:l,height:a,x:u,y:h}}function Cw(n,e,t){let r;if(e==="viewport")r=XF(n,t);else if(e==="document")r=ZF(ah(n));else if(Nd(e))r=KF(e,t);else{let i=v4(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return dv(r)}function y4(n,e){let t=ug(n);return t===e||!Nd(t)||R1(t)?!1:Fd(t).position==="fixed"||y4(t,e)}function JF(n,e){let t=e.get(n);if(t)return t;let r=Pp(n,[],!1).filter(a=>Nd(a)&&P1(a)!=="body"),i=null,o=Fd(n).position==="fixed",l=o?ug(n):n;for(;Nd(l)&&!R1(l);){let a=Fd(l),u=Zm(l);!u&&a.position==="fixed"&&(i=null),(o?!u&&!i:!u&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Vp(l)&&!u&&y4(n,l))?r=r.filter(y=>y!==l):i=a,l=ug(l)}return e.set(n,r),r}function QF(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n,o=t==="clippingAncestors"?Nv(e)?[]:JF(e,this._c):[].concat(t),l=[...o,r],a=l[0],u=l.reduce((h,y)=>{let x=Cw(e,y,i);return h.top=Og(x.top,h.top),h.right=cv(x.right,h.right),h.bottom=cv(x.bottom,h.bottom),h.left=Og(x.left,h.left),h},Cw(e,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function qF(n){let{width:e,height:t}=p4(n);return{width:e,height:t}}function jF(n,e,t){let r=oh(e),i=ah(e),o=t==="fixed",l=Fg(n,!0,o,e),a={scrollLeft:0,scrollTop:0},u=th(0);function h(){u.x=Jm(i)}if(r||!r&&!o)if((P1(e)!=="body"||Vp(i))&&(a=Fv(e)),r){let _=Fg(e,!0,o,e);u.x=_.x+e.clientLeft,u.y=_.y+e.clientTop}else i&&h();o&&!r&&i&&h();let y=i&&!r&&!o?b4(i,a):th(0),x=l.left+a.scrollLeft-u.x-y.x,w=l.top+a.scrollTop-u.y-y.y;return{x,y:w,width:l.width,height:l.height}}function kb(n){return Fd(n).position==="static"}function _w(n,e){if(!oh(n)||Fd(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return ah(n)===t&&(t=t.ownerDocument.body),t}function m4(n,e){let t=Ff(n);if(Nv(n))return t;if(!oh(n)){let i=ug(n);for(;i&&!R1(i);){if(Nd(i)&&!kb(i))return i;i=ug(i)}return t}let r=_w(n,e);for(;r&&HF(r)&&kb(r);)r=_w(r,e);return r&&R1(r)&&kb(r)&&!Zm(r)?t:r||WF(n)||t}const $F=async function(n){let e=this.getOffsetParent||m4,t=this.getDimensions,r=await t(n.floating);return{reference:jF(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eB(n){return Fd(n).direction==="rtl"}const tB={convertOffsetParentRelativeRectToViewportRelativeRect:YF,getDocumentElement:ah,getClippingRect:QF,getOffsetParent:m4,getElementRects:$F,getClientRects:VF,getDimensions:qF,getScale:b1,isElement:Nd,isRTL:eB};function x4(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function nB(n,e){let t=null,r,i=ah(n);function o(){var a;clearTimeout(r),(a=t)==null||a.disconnect(),t=null}function l(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();let h=n.getBoundingClientRect(),{left:y,top:x,width:w,height:_}=h;if(a||e(),!w||!_)return;let S=k0(x),R=k0(i.clientWidth-(y+w)),I=k0(i.clientHeight-(x+_)),O=k0(y),P=-S+"px "+-R+"px "+-I+"px "+-O+"px",Y={rootMargin:P,threshold:Og(0,cv(1,u))||1},z=!0;function W(B){let ee=B[0].intersectionRatio;if(ee!==u){if(!z)return l();ee?l(!1,ee):r=setTimeout(()=>{l(!1,1e-7)},1e3)}ee===1&&!x4(h,n.getBoundingClientRect())&&l(),z=!1}try{t=new IntersectionObserver(W,{...Y,root:i.ownerDocument})}catch{t=new IntersectionObserver(W,Y)}t.observe(n)}return l(!0),o}function rB(n,e,t,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,h=Km(n),y=i||o?[...h?Pp(h):[],...Pp(e)]:[];y.forEach(O=>{i&&O.addEventListener("scroll",t,{passive:!0}),o&&O.addEventListener("resize",t)});let x=h&&a?nB(h,t):null,w=-1,_=null;l&&(_=new ResizeObserver(O=>{let[P]=O;P&&P.target===h&&_&&(_.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var Y;(Y=_)==null||Y.observe(e)})),t()}),h&&!u&&_.observe(h),_.observe(e));let S,R=u?Fg(n):null;u&&I();function I(){let O=Fg(n);R&&!x4(R,O)&&t(),R=O,S=requestAnimationFrame(I)}return t(),()=>{var O;y.forEach(P=>{i&&P.removeEventListener("scroll",t),o&&P.removeEventListener("resize",t)}),x==null||x(),(O=_)==null||O.disconnect(),_=null,u&&cancelAnimationFrame(S)}}const w4=FF,C4=BF,_4=DF,S4=zF,E4=(n,e,t)=>{let r=new Map,i={platform:tB,...t},o={...i.platform,_c:r};return PF(n,e,{...i,platform:o})};function iB(n,e,t,r,i){return n.addEventListener("transitionend",t,r),setTimeout(()=>{t()},e)}const oB=4;let M0;function Mb(n,e={}){let{msg:t="",delay:r=150,content:i,direction:o="bottom",type:l="hover",container:a,onOpen:u,onClose:h,closed:y,onDestroy:x}=e,w=cu("tooltip");if(t||i){M0||(M0=document.createElement("div"),document.body.appendChild(M0));let _=a||M0,S=document.createElement("div");S.classList.add(w.b(),"hidden","transparent"),i?S.appendChild(i):t&&(S.textContent=t);let R,I,O,P=()=>{O&&O(),E4(n,S,{placement:o,middleware:[_4(),C4({limiter:S4()}),w4(oB)]}).then(({x:fe,y:ae})=>{Object.assign(S.style,{left:`${fe}px`,top:`${ae}px`})})},Y=()=>{S.classList.add("hidden"),_.contains(S)&&_.removeChild(S),O&&O(),y&&y()},z=(fe=!1)=>{I&&clearTimeout(I),R=setTimeout(()=>{if(u){let ae=u(fe);if(!fe&&ae)return}_.appendChild(S),S.removeEventListener("transitionend",Y),S.classList.remove("hidden"),O=rB(n,S,P),S.classList.remove("transparent")},r)},W=(fe=!1)=>{R&&clearTimeout(R),I=setTimeout(()=>{if(h){let ae=h(fe);if(!fe&&ae)return}iB(S,150,Y,{once:!0}),S.classList.add("transparent")},r)},B=()=>{let fe=[n,S],ae=W.bind(void 0,!1),j=z.bind(void 0,!1);return{prepare:()=>{for(let he of fe)he.addEventListener("mouseenter",j),he.addEventListener("mouseleave",ae)},show:z,hide:W,destroy:()=>{for(let he of fe)he.removeEventListener("mouseenter",j),he.removeEventListener("mouseleave",ae)}}},ee=()=>{let fe=j=>{j.stopPropagation(),W(!1)},ae=j=>{j.stopPropagation(),z(),document.removeEventListener("click",fe),document.addEventListener("click",fe,{once:!0})};return{prepare:()=>{S.addEventListener("click",j=>j.stopPropagation()),n.addEventListener("click",ae)},show:z,hide:(j=!1)=>{W(j),document.removeEventListener("click",fe)},destroy:()=>{n.removeEventListener("click",ae),document.removeEventListener("click",fe)}}},H={hover:B,click:ee},{prepare:V,show:de,hide:Z,destroy:te}=H[l]();return V(),{show:de,hide:Z,destroy:()=>{Z(!0),x&&x(),te(),O&&O(),S.remove()}}}return null}function lB(n,e,t=0,r=!0){let{x:i,y:o,x1:l,y1:a}=n,{x:u,y:h,x1:y,y1:x}=e,w,_;return r?(w=l<u+t||i-t>y,_=a<h+t||o-t>x):(w=l<=u+t||i-t>=y,_=a<=h+t||o-t>=x),!(w||_)}function sB(n,e){let t=e.getBoundingClientRect();return{x:n.x-t.x-e.scrollLeft,y:n.y-t.y-e.scrollTop,x1:n.x-t.x-e.scrollLeft+n.width,y1:n.y-t.y-e.scrollTop+n.height,width:n.width,height:n.height}}const L0=8;function aB(n){let{left:e,top:t,width:r,height:i}=n,{clientWidth:o,clientHeight:l}=document.documentElement,a=!1,u=!1;return e+r>o?(e=o-r-L0,a=!0):e<0&&(e=L0,a=!0),t+i>l?(t=l-i-L0,u=!0):t<0&&(t=L0,u=!0),{left:e,top:t,leftLimited:a,topLimited:u}}function cB(n,e={}){let t=Symbol("ignoreFirstBind"),r=new Set,i=new ResizeObserver(u=>{e.ignoreFirstBind&&u.some(h=>{let y=h.target,x=y[t];return y[t]=!0,!x})||n(u)}),o=i.observe;i.observe=(u,h)=>{r.add(u),o.call(i,u,h)};let l=i.unobserve;i.unobserve=u=>{r.has(u)&&(r.delete(u),u[t]=void 0),l.call(i,u)};let a=i.disconnect;return i.disconnect=()=>{for(let u of r.values())u[t]=void 0;a.call(i)},i}function hv(n,e){n.addEventListener("scroll",e),this.scrollHandler.push([n,e])}function K0(){for(let n=0;n<this.scrollHandler.length;n++){let[e,t]=this.scrollHandler[n];e.removeEventListener("scroll",t)}this.scrollHandler=[]}function sp(n){return{y:n.scrollTop,x:n.scrollLeft}}function gv(n){let e={},t=n.trim().split(";");for(let r=0;r<t.length;r++){let i=t[r].trim();if(!i)continue;let o=i.indexOf(":");if(o===-1)continue;let l=i.slice(0,Math.max(0,o)).trim(),a=i.slice(Math.max(0,o+1)).trim();e[I1(l)]=a}return e}function im(n){return Object.entries(n).map(([e,t])=>`${uB(e)}: ${t};`).join(" ")}function uB(n){return n.replaceAll(/([A-Z])/g," $1").trim().split(" ").join("-").toLowerCase()}function I1(n){return n.replaceAll(/-(\w)/g,(e,t)=>t.toUpperCase())}const Ba=()=>Math.random().toString(36).slice(2);function A4(n,e){let t;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{n.apply(this,r)},e)}}const Lb=qe.import("parchment"),Sw=qe.import("blots/container"),fB=qe.import("blots/block"),dB=qe.import("blots/block/embed");var cd,hg=(cd=class extends Sw{static create(e){let t=document.createElement(this.tagName);return this.className&&t.classList.add(this.className),t}optimize(e){if(this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove();this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}enforceAllowedChildren(){this.children.forEach(e=>{this.statics.allowedChildren.some(r=>e instanceof r)||(e.statics.scope===Lb.Scope.BLOCK_BLOT?(e.parent instanceof cd?(e.next!=null&&e.parent.splitAfter(e),e.prev!=null&&e.parent.splitAfter(e.prev)):(e.next!=null&&this.splitAfter(e),e.prev!=null&&this.splitAfter(e.prev)),e.parent.unwrap()):e instanceof Lb.ParentBlot?e.unwrap():e.remove())})}},Ae(cd,"tagName"),Ae(cd,"blotName",et.container),Ae(cd,"scope",Lb.Scope.BLOCK_BLOT),Ae(cd,"allowedChildren",[fB,dB,Sw]),Ae(cd,"requiredContainer"),Ae(cd,"defaultChild"),cd);const ig=n=>wF(n)?n:1,Ew=qe.import("blots/block"),hB=qe.import("blots/block/embed");var Zh,af=(Zh=class extends hg{static isAllowStyle(n){let e=I1(n);for(let t of this.allowStyle)if(e.startsWith(I1(t)))return!0;return!1}static create(n){let{tableId:e,rowId:t,colId:r,rowspan:i,colspan:o,style:l,emptyRow:a,tag:u="td"}=n,h=super.create();h.dataset.tableId=e,h.dataset.rowId=t,h.dataset.colId=r,h.dataset.rowspan=String(ig(i)),h.dataset.colspan=String(ig(o)),h.dataset.tag=u,l&&(h.dataset.style=l);try{a&&(h.dataset.emptyRow=JSON.stringify(a))}catch{}return h}static formats(n){let{tableId:e,rowId:t,colId:r,rowspan:i,colspan:o,style:l,emptyRow:a,tag:u="td"}=n.dataset,h={tableId:String(e),rowId:String(t),colId:String(r),rowspan:Number(ig(i)),colspan:Number(ig(o)),tag:u};l&&(h.style=l);try{a&&(h.emptyRow=JSON.parse(a))}catch{}return h}constructor(n,e,t){super(n,e),e.setAttribute("contenteditable",String(n.isEnabled()))}setFormatValue(n,e,t=!1){if(t){if(!this.statics.isAllowStyle(n))return;this.parent&&this.parent.statics.blotName===et.tableCell&&this.parent.setFormatValue(n,e)}else{if(!this.statics.allowDataAttrs.has(n))return;let r=`data-${n}`;e?this.domNode.setAttribute(r,e):this.domNode.removeAttribute(r),this.parent&&this.parent.statics.blotName===et.tableCell&&this.parent.setFormatValue(n,e)}this.clearCache()}clearCache(){let n=this.descendants(Ew,0);for(let e of n)e.cache={}}get tableId(){return this.domNode.dataset.tableId}get rowId(){return this.domNode.dataset.rowId}set rowId(n){this.setFormatValue("row-id",n)}get colId(){return this.domNode.dataset.colId}set colId(n){this.setFormatValue("col-id",n)}get rowspan(){return Number(this.domNode.dataset.rowspan)}set rowspan(n){this.setFormatValue("rowspan",n)}get colspan(){return Number(this.domNode.dataset.colspan)}set colspan(n){this.setFormatValue("colspan",n)}get emptyRow(){try{return JSON.parse(this.domNode.dataset.emptyRow)}catch{return[]}}set emptyRow(n){if(this.emptyRow.toString()!==n.toString())try{n.length>0?this.setFormatValue("empty-row",JSON.stringify(n),!1):this.setFormatValue("empty-row",null,!1)}catch{this.setFormatValue("empty-row",null,!1)}}getColumnIndex(){return Kl(this,et.tableMain).getColIds().indexOf(this.colId)}setStyleByString(n){let e=gv(n);for(let[t,r]of Object.entries(e))this.setFormatValue(t,r,!0)}convertTableCell(){this.parent.statics.blotName===et.tableCell&&(this.parent.convertTableCell(),this.clearCache())}formatAt(n,e,t,r){this.children.length===0&&(this.appendChild(this.scroll.create(this.statics.defaultChild.blotName)),e+=1),super.formatAt(n,e,t,r),r&&r.style&&this.setStyleByString(r.style)}insertAt(n,e,t){let[r]=this.children.find(n);if(!r&&this.statics.defaultChild){let i=this.scroll.create(this.statics.defaultChild.blotName||"block");this.appendChild(i)}super.insertAt(n,e,t)}formats(){let n=this.statics.formats(this.domNode);return{[this.statics.blotName]:n}}checkMerge(){let{colId:n,rowId:e,colspan:t,rowspan:r}=this,i=this.next;return i!==null&&i.statics.blotName===this.statics.blotName&&i.rowId===e&&i.colId===n&&i.colspan===t&&i.rowspan===r}optimize(){let n=this.parent,e=this.statics.formats(this.domNode);if(this.prev&&this.prev instanceof hB){let r=this.prev;if(this.insertBefore(r,this.children.head),this.length()<=1){let i=this.scroll.create("block");this.insertBefore(i,r.next)}}let t=n!==null&&n.statics.blotName!==et.tableCell;if(t&&(this.wrap(et.tableCell,e),this.children.length===0)){let r=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(r)}this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove()),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0?this.remove():this.domNode.dataset.style&&t&&n.domNode.style.cssText!==this.domNode.dataset.style&&this.setStyleByString(this.domNode.dataset.style)}insertBefore(n,e){if(n.statics.blotName===this.statics.blotName){let t=n,r=this.statics.formats(t.domNode),i=this.statics.formats(this.domNode);if(Object.entries(i).every(([l,a])=>String(a)===String(r[l]))){let l=this.split(e?e.offset():0);return this.parent.insertBefore(t,l)}else{let[l,a]=A1(this,[et.tableRow,et.tableCell]);if(e){let u=e.offset(),h=this.length();if(u+1<h){let y=this.scroll.create(et.tableCellInner,i);this.children.forEachAt(u+1,this.length(),x=>{y.appendChild(x)}),l.insertBefore(y.wrap(et.tableCell,i),a.next)}}if(this.rowId!==t.rowId){if(e){let y=e.offset(l);l.split(y)}else if(a.next){let y=a.next.offset(l);l.split(y)}let u=this.scroll.create(et.tableRow,r),h=this.scroll.create(et.tableCell,r);return h.appendChild(t),u.appendChild(h),l.parent.insertBefore(u,l.next)}return l.insertBefore(t.wrap(et.tableCell,r),e?a:a.next)}}else if(n.statics.blotName===et.tableCol){try{let t=Kl(this,et.tableBody),r=this.offset(t),i=t.split(r);t.parent.insertBefore(n,i),n.optimize({})}catch{console.warn("TableCellInner not in TableBody")}return}super.insertBefore(n,e)}},Ae(Zh,"blotName",et.tableCellInner),Ae(Zh,"tagName","div"),Ae(Zh,"className","ql-table-cell-inner"),Ae(Zh,"allowDataAttrs",new Set(["table-id","row-id","col-id","rowspan","colspan","empty-row"])),Ae(Zh,"defaultChild",Ew),Ae(Zh,"allowStyle",new Set(["background-color","border","height"])),Zh),cp,qd=(cp=class extends hg{static create(n){let e=super.create();return e.dataset.tableId=n.tableId,e.dataset.rowId=n.rowId,e}get rowId(){return this.domNode.dataset.rowId}get tableId(){return this.domNode.dataset.tableId}setHeight(n){this.foreachCellInner(e=>{e.setFormatValue("height",n,!0)})}getCellByColId(n,e){let t=Kl(this,et.tableMain),r=t.getColIds(),i=r.indexOf(n),o=this.children.iterator(),l=null;for(;l=o();){if(l.colId===n)return l;let a=r.indexOf(l.colId);if(a<i&&a+l.colspan>i)return l}return this[e]&&this[e].statics.blotName===et.tableRow?this[e].getCellByColId(n,e):null}insertCell(n,e){let t=[],r=this.children.iterator(),i=0,o;for(;(o=r())&&(i+=o.colspan,!(i>n));)if(o.rowspan!==1)for(let l=0;l<o.rowspan-1;l++)t[l]=(t[l]||0)+o.colspan;if(o&&i-o.colspan<n){let l=o.getCellInner();l.colspan+=1,o.rowspan!==1&&(t.skipRowNum=o.rowspan-1)}else{let l=this.scroll.create(et.tableCell,e),a=this.scroll.create(et.tableCellInner,e),u=this.scroll.create("block");u.appendChild(this.scroll.create("break")),a.appendChild(u),l.appendChild(a),this.insertBefore(l,o)}return t}getCellByColumIndex(n){let e=[],t=null,r=0;if(n<0)return[t,r,e];let i=this.children.iterator();for(;t=i();){if(r+=t.colspan,t.rowspan!==1)for(let o=0;o<t.rowspan-1;o++)e[o]=(e[o]||0)+t.colspan;if(r>n)break}return[t,r,e]}removeCell(n){if(n<0)return[];let e=this.getCellByColumIndex(n),[t,r]=e,i=e[2];if(!t)return i;if(r-t.colspan<n||t.colspan>1){let[o]=t.descendants(af);if(t.colspan!==1&&n===r-t.colspan){let l=Kl(this,et.tableMain),a=l.getColIds();o.colId=a[a.indexOf(o.colId)+1]}t.rowspan!==1&&(i.skipRowNum=t.rowspan-1),--o.colspan}else t.remove();return i}foreachCellInner(n){let e=this.children.iterator(),t=0,r;for(;r=e();){let[i]=r.descendants(af);if(n(i,t++))break}}checkMerge(){let n=this.next;return n!==null&&n.statics.blotName===this.statics.blotName&&n.rowId===this.rowId}optimize(n){let e=this.parent,{tableId:t}=this;e!==null&&e.statics.blotName!==et.tableBody&&this.wrap(et.tableBody,t),this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName),this.enforceAllowedChildren(),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}},Ae(cp,"blotName",et.tableRow),Ae(cp,"tagName","tr"),Ae(cp,"className","ql-table-row"),cp),z0,eg=(z0=class extends hg{static create(n){let e=super.create();return e.dataset.tableId=n,e}get tableId(){return this.domNode.dataset.tableId}insertRow(n){let e=Kl(this,et.tableMain);if(!e)return;let t=e.getColIds(),r=this.descendants(qd),i=new Set(t),o=0;for(let h of r){if(o===n)break;h.foreachCellInner(y=>{if(o+y.rowspan>n&&(y.rowspan+=1,i.delete(y.colId),y.colspan!==1)){let x=t.indexOf(y.colId);for(let w=0;w<y.colspan-1;w++)i.delete(t[x+w+1])}}),o+=1}let l=e.tableId,a=Ba(),u=this.scroll.create(et.tableRow,{tableId:l,rowId:a});for(let h of i){let y=this.scroll.create("break"),x=y.wrap("block"),w=x.wrap(et.tableCellInner,{tableId:l,rowId:a,colId:h,rowspan:1,colspan:1}),_=w.wrap(et.tableCell,{tableId:l,rowId:a,colId:h,rowspan:1,colspan:1});u.appendChild(_)}this.insertBefore(u,r[n]||null)}checkMerge(){let n=this.next;return n!==null&&n.statics.blotName===this.statics.blotName&&n.tableId===this.tableId}optimize(n){let e=this.parent;if(e!==null&&e.statics.blotName!==et.tableMain){let{tableId:t}=this;this.wrap(et.tableMain,{tableId:t})}super.optimize(n)}},Ae(z0,"blotName",et.tableBody),Ae(z0,"tagName","tbody"),z0);const gB=qe.import("parchment"),pB=qe.import("blots/block"),vB=qe.import("blots/container");var om=class extends pB{replaceWith(n,e){let t=Lg(n)?this.scroll.create(n,e):n;if(t instanceof gB.ParentBlot)if(t.statics.blotName===et.tableCellInner){try{let i=Kl(this,et.tableCellInner),o=i.formats(),l=t.formats();if(Object.keys(o).every(u=>JSON.stringify(o[u])===JSON.stringify(l[u])))return i}catch{}let r=this.parent;if(r.statics.blotName===et.tableCellInner){if(r==null||r.insertBefore(t,this.prev?null:this.next),r.statics.blotName===et.tableCellInner){let i=this;for(;i;){let o=i.next;t.appendChild(i),i=o}}else t.appendChild(this);if(r&&r.length()===0){r.remove(),r.parent.statics.blotName===et.tableCell&&r.parent.length()===0&&r.parent.remove();let i=r.parent.parent;i.statics.blotName===et.tableRow&&i.children.length===0&&i.remove()}}else r instanceof vB?r.parent.insertBefore(t,r):r==null||r.insertBefore(t,this.next),t.appendChild(this);return t}else this.moveChildren(t);return this.parent!=null&&(this.parent.insertBefore(t,this.next),this.remove()),this.attributes.copy(t),t}format(n,e){if(n===et.tableCellInner&&this.parent.statics.blotName===n&&!e)try{Kl(this,et.tableCellInner).unwrap()}catch{console.error("unwrap TableCellInner error")}else super.format(n,e)}};const bB=qe.import("blots/block/embed");var Aw=class extends bB{delta(){let n=super.delta(),e=lm(this);return e[et.tableCellInner]&&n.insert(`
|
|
340
|
-
`,{[et.tableCellInner]:e[et.tableCellInner]}),n}length(){return lm(this)[et.tableCellInner]&&(!this.next||this.next.length()<=1)?super.length()+1:super.length()}};function lm(n,e={},t=!0){return n==null||("formats"in n&&typeof n.formats=="function"&&(e={...e,...n.formats()},t&&delete e["code-token"]),n.parent==null||n.parent.statics.blotName==="scroll"||n.parent.statics.scope!==n.statics.scope)?e:lm(n.parent,e,t)}const Tw=qe.import("parchment"),
|
|
339
|
+
`," "]),w=["'"].concat(x),_=["%","/","?",";","#"].concat(w),S=["/","?","#"],R=/^[+a-z0-9A-Z_-]{0,63}$/,I=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,O={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},Y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},z=i(38);function W(B,ee,H){if(B&&l.isObject(B)&&B instanceof a)return B;var V=new a;return V.parse(B,ee,H),V}a.prototype.parse=function(B,ee,H){if(!l.isString(B))throw new TypeError("Parameter 'url' must be a string, not "+typeof B);var V=B.indexOf("?"),de=V!==-1&&V<B.indexOf("#")?"?":"#",Z=B.split(de);Z[0]=Z[0].replace(/\\/g,"/");var te=B=Z.join(de);if(te=te.trim(),!H&&B.split("#").length===1){var ne=y.exec(te);if(ne)return this.path=te,this.href=te,this.pathname=ne[1],ne[2]?(this.search=ne[2],this.query=ee?z.parse(this.search.substr(1)):this.search.substr(1)):ee&&(this.search="",this.query={}),this}var fe=u.exec(te);if(fe){var ae=(fe=fe[0]).toLowerCase();this.protocol=ae,te=te.substr(fe.length)}if(H||fe||te.match(/^\/\/[^@\/]+@[^@\/]+/)){var j=te.substr(0,2)==="//";!j||fe&&P[fe]||(te=te.substr(2),this.slashes=!0)}if(!P[fe]&&(j||fe&&!Y[fe])){for(var re,he,be=-1,le=0;le<S.length;le++)(J=te.indexOf(S[le]))!==-1&&(be===-1||J<be)&&(be=J);for((he=be===-1?te.lastIndexOf("@"):te.lastIndexOf("@",be))!==-1&&(re=te.slice(0,he),te=te.slice(he+1),this.auth=decodeURIComponent(re)),be=-1,le=0;le<_.length;le++){var J;(J=te.indexOf(_[le]))!==-1&&(be===-1||J<be)&&(be=J)}be===-1&&(be=te.length),this.host=te.slice(0,be),te=te.slice(be),this.parseHost(),this.hostname=this.hostname||"";var pe=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!pe)for(var Te=this.hostname.split(/\./),Fe=(le=0,Te.length);le<Fe;le++){var _e=Te[le];if(_e&&!_e.match(R)){for(var Me="",De=0,Re=_e.length;De<Re;De++)_e.charCodeAt(De)>127?Me+="x":Me+=_e[De];if(!Me.match(R)){var Le=Te.slice(0,le),Oe=Te.slice(le+1),Ge=_e.match(I);Ge&&(Le.push(Ge[1]),Oe.unshift(Ge[2])),Oe.length&&(te="/"+Oe.join(".")+te),this.hostname=Le.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),pe||(this.hostname=o.toASCII(this.hostname));var Ve=this.port?":"+this.port:"",Pe=this.hostname||"";this.host=Pe+Ve,this.href+=this.host,pe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),te[0]!=="/"&&(te="/"+te))}if(!O[ae])for(le=0,Fe=w.length;le<Fe;le++){var ot=w[le];if(te.indexOf(ot)!==-1){var Xe=encodeURIComponent(ot);Xe===ot&&(Xe=escape(ot)),te=te.split(ot).join(Xe)}}var lt=te.indexOf("#");lt!==-1&&(this.hash=te.substr(lt),te=te.slice(0,lt));var Ye=te.indexOf("?");if(Ye!==-1?(this.search=te.substr(Ye),this.query=te.substr(Ye+1),ee&&(this.query=z.parse(this.query)),te=te.slice(0,Ye)):ee&&(this.search="",this.query={}),te&&(this.pathname=te),Y[ae]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){Ve=this.pathname||"";var mt=this.search||"";this.path=Ve+mt}return this.href=this.format(),this},a.prototype.format=function(){var B=this.auth||"";B&&(B=(B=encodeURIComponent(B)).replace(/%3A/i,":"),B+="@");var ee=this.protocol||"",H=this.pathname||"",V=this.hash||"",de=!1,Z="";this.host?de=B+this.host:this.hostname&&(de=B+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(de+=":"+this.port)),this.query&&l.isObject(this.query)&&Object.keys(this.query).length&&(Z=z.stringify(this.query));var te=this.search||Z&&"?"+Z||"";return ee&&ee.substr(-1)!==":"&&(ee+=":"),this.slashes||(!ee||Y[ee])&&de!==!1?(de="//"+(de||""),H&&H.charAt(0)!=="/"&&(H="/"+H)):de||(de=""),V&&V.charAt(0)!=="#"&&(V="#"+V),te&&te.charAt(0)!=="?"&&(te="?"+te),ee+de+(H=H.replace(/[?#]/g,(function(ne){return encodeURIComponent(ne)})))+(te=te.replace("#","%23"))+V},a.prototype.resolve=function(B){return this.resolveObject(W(B,!1,!0)).format()},a.prototype.resolveObject=function(B){if(l.isString(B)){var ee=new a;ee.parse(B,!1,!0),B=ee}for(var H=new a,V=Object.keys(this),de=0;de<V.length;de++){var Z=V[de];H[Z]=this[Z]}if(H.hash=B.hash,B.href==="")return H.href=H.format(),H;if(B.slashes&&!B.protocol){for(var te=Object.keys(B),ne=0;ne<te.length;ne++){var fe=te[ne];fe!=="protocol"&&(H[fe]=B[fe])}return Y[H.protocol]&&H.hostname&&!H.pathname&&(H.path=H.pathname="/"),H.href=H.format(),H}if(B.protocol&&B.protocol!==H.protocol){if(!Y[B.protocol]){for(var ae=Object.keys(B),j=0;j<ae.length;j++){var re=ae[j];H[re]=B[re]}return H.href=H.format(),H}if(H.protocol=B.protocol,B.host||P[B.protocol])H.pathname=B.pathname;else{for(var he=(B.pathname||"").split("/");he.length&&!(B.host=he.shift()););B.host||(B.host=""),B.hostname||(B.hostname=""),he[0]!==""&&he.unshift(""),he.length<2&&he.unshift(""),H.pathname=he.join("/")}if(H.search=B.search,H.query=B.query,H.host=B.host||"",H.auth=B.auth,H.hostname=B.hostname||B.host,H.port=B.port,H.pathname||H.search){var be=H.pathname||"",le=H.search||"";H.path=be+le}return H.slashes=H.slashes||B.slashes,H.href=H.format(),H}var J=H.pathname&&H.pathname.charAt(0)==="/",pe=B.host||B.pathname&&B.pathname.charAt(0)==="/",Te=pe||J||H.host&&B.pathname,Fe=Te,_e=H.pathname&&H.pathname.split("/")||[],Me=(he=B.pathname&&B.pathname.split("/")||[],H.protocol&&!Y[H.protocol]);if(Me&&(H.hostname="",H.port=null,H.host&&(_e[0]===""?_e[0]=H.host:_e.unshift(H.host)),H.host="",B.protocol&&(B.hostname=null,B.port=null,B.host&&(he[0]===""?he[0]=B.host:he.unshift(B.host)),B.host=null),Te=Te&&(he[0]===""||_e[0]==="")),pe)H.host=B.host||B.host===""?B.host:H.host,H.hostname=B.hostname||B.hostname===""?B.hostname:H.hostname,H.search=B.search,H.query=B.query,_e=he;else if(he.length)_e||(_e=[]),_e.pop(),_e=_e.concat(he),H.search=B.search,H.query=B.query;else if(!l.isNullOrUndefined(B.search))return Me&&(H.hostname=H.host=_e.shift(),(Ge=!!(H.host&&H.host.indexOf("@")>0)&&H.host.split("@"))&&(H.auth=Ge.shift(),H.host=H.hostname=Ge.shift())),H.search=B.search,H.query=B.query,l.isNull(H.pathname)&&l.isNull(H.search)||(H.path=(H.pathname?H.pathname:"")+(H.search?H.search:"")),H.href=H.format(),H;if(!_e.length)return H.pathname=null,H.search?H.path="/"+H.search:H.path=null,H.href=H.format(),H;for(var De=_e.slice(-1)[0],Re=(H.host||B.host||_e.length>1)&&(De==="."||De==="..")||De==="",Le=0,Oe=_e.length;Oe>=0;Oe--)(De=_e[Oe])==="."?_e.splice(Oe,1):De===".."?(_e.splice(Oe,1),Le++):Le&&(_e.splice(Oe,1),Le--);if(!Te&&!Fe)for(;Le--;Le)_e.unshift("..");!Te||_e[0]===""||_e[0]&&_e[0].charAt(0)==="/"||_e.unshift(""),Re&&_e.join("/").substr(-1)!=="/"&&_e.push("");var Ge,Ve=_e[0]===""||_e[0]&&_e[0].charAt(0)==="/";return Me&&(H.hostname=H.host=Ve?"":_e.length?_e.shift():"",(Ge=!!(H.host&&H.host.indexOf("@")>0)&&H.host.split("@"))&&(H.auth=Ge.shift(),H.host=H.hostname=Ge.shift())),(Te=Te||H.host&&_e.length)&&!Ve&&_e.unshift(""),_e.length?H.pathname=_e.join("/"):(H.pathname=null,H.path=null),l.isNull(H.pathname)&&l.isNull(H.search)||(H.path=(H.pathname?H.pathname:"")+(H.search?H.search:"")),H.auth=B.auth||H.auth,H.slashes=H.slashes||B.slashes,H.href=H.format(),H},a.prototype.parseHost=function(){var B=this.host,ee=h.exec(B);ee&&((ee=ee[0])!==":"&&(this.port=ee.substr(1)),B=B.substr(0,B.length-ee.length)),B&&(this.hostname=B)}},function(t,r,i){(function(o,l){var a;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(u){r&&r.nodeType,o&&o.nodeType;var h=typeof l=="object"&&l;h.global!==h&&h.window!==h&&h.self;var y,x=2147483647,w=/^xn--/,_=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=Math.floor,O=String.fromCharCode;function P(Z){throw new RangeError(R[Z])}function Y(Z,te){for(var ne=Z.length,fe=[];ne--;)fe[ne]=te(Z[ne]);return fe}function z(Z,te){var ne=Z.split("@"),fe="";return ne.length>1&&(fe=ne[0]+"@",Z=ne[1]),fe+Y((Z=Z.replace(S,".")).split("."),te).join(".")}function W(Z){for(var te,ne,fe=[],ae=0,j=Z.length;ae<j;)(te=Z.charCodeAt(ae++))>=55296&&te<=56319&&ae<j?(64512&(ne=Z.charCodeAt(ae++)))==56320?fe.push(((1023&te)<<10)+(1023&ne)+65536):(fe.push(te),ae--):fe.push(te);return fe}function B(Z){return Y(Z,(function(te){var ne="";return te>65535&&(ne+=O((te-=65536)>>>10&1023|55296),te=56320|1023&te),ne+=O(te)})).join("")}function ee(Z,te){return Z+22+75*(Z<26)-((te!=0)<<5)}function H(Z,te,ne){var fe=0;for(Z=ne?I(Z/700):Z>>1,Z+=I(Z/te);Z>455;fe+=36)Z=I(Z/35);return I(fe+36*Z/(Z+38))}function V(Z){var te,ne,fe,ae,j,re,he,be,le,J,pe,Te=[],Fe=Z.length,_e=0,Me=128,De=72;for((ne=Z.lastIndexOf("-"))<0&&(ne=0),fe=0;fe<ne;++fe)Z.charCodeAt(fe)>=128&&P("not-basic"),Te.push(Z.charCodeAt(fe));for(ae=ne>0?ne+1:0;ae<Fe;){for(j=_e,re=1,he=36;ae>=Fe&&P("invalid-input"),((be=(pe=Z.charCodeAt(ae++))-48<10?pe-22:pe-65<26?pe-65:pe-97<26?pe-97:36)>=36||be>I((x-_e)/re))&&P("overflow"),_e+=be*re,!(be<(le=he<=De?1:he>=De+26?26:he-De));he+=36)re>I(x/(J=36-le))&&P("overflow"),re*=J;De=H(_e-j,te=Te.length+1,j==0),I(_e/te)>x-Me&&P("overflow"),Me+=I(_e/te),_e%=te,Te.splice(_e++,0,Me)}return B(Te)}function de(Z){var te,ne,fe,ae,j,re,he,be,le,J,pe,Te,Fe,_e,Me,De=[];for(Te=(Z=W(Z)).length,te=128,ne=0,j=72,re=0;re<Te;++re)(pe=Z[re])<128&&De.push(O(pe));for(fe=ae=De.length,ae&&De.push("-");fe<Te;){for(he=x,re=0;re<Te;++re)(pe=Z[re])>=te&&pe<he&&(he=pe);for(he-te>I((x-ne)/(Fe=fe+1))&&P("overflow"),ne+=(he-te)*Fe,te=he,re=0;re<Te;++re)if((pe=Z[re])<te&&++ne>x&&P("overflow"),pe==te){for(be=ne,le=36;!(be<(J=le<=j?1:le>=j+26?26:le-j));le+=36)Me=be-J,_e=36-J,De.push(O(ee(J+Me%_e,0))),be=I(Me/_e);De.push(O(ee(be,0))),j=H(ne,Fe,fe==ae),ne=0,++fe}++ne,++te}return De.join("")}y={version:"1.4.1",ucs2:{decode:W,encode:B},decode:V,encode:de,toASCII:function(Z){return z(Z,(function(te){return _.test(te)?"xn--"+de(te):te}))},toUnicode:function(Z){return z(Z,(function(te){return w.test(te)?V(te.slice(4).toLowerCase()):te}))}},(a=(function(){return y}).call(r,i,r,o))===void 0||(o.exports=a)})()}).call(this,i(35)(t),i(36))},function(t,r){t.exports=function(i){return i.webpackPolyfill||(i.deprecate=function(){},i.paths=[],i.children||(i.children=[]),Object.defineProperty(i,"loaded",{enumerable:!0,get:function(){return i.l}}),Object.defineProperty(i,"id",{enumerable:!0,get:function(){return i.i}}),i.webpackPolyfill=1),i}},function(t,r){var i;i=(function(){return this})();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}t.exports=i},function(t,r,i){t.exports={isString:function(o){return typeof o=="string"},isObject:function(o){return typeof o=="object"&&o!==null},isNull:function(o){return o===null},isNullOrUndefined:function(o){return o==null}}},function(t,r,i){r.decode=r.parse=i(39),r.encode=r.stringify=i(40)},function(t,r,i){function o(a,u){return Object.prototype.hasOwnProperty.call(a,u)}t.exports=function(a,u,h,y){u=u||"&",h=h||"=";var x={};if(typeof a!="string"||a.length===0)return x;var w=/\+/g;a=a.split(u);var _=1e3;y&&typeof y.maxKeys=="number"&&(_=y.maxKeys);var S=a.length;_>0&&S>_&&(S=_);for(var R=0;R<S;++R){var I,O,P,Y,z=a[R].replace(w,"%20"),W=z.indexOf(h);W>=0?(I=z.substr(0,W),O=z.substr(W+1)):(I=z,O=""),P=decodeURIComponent(I),Y=decodeURIComponent(O),o(x,P)?l(x[P])?x[P].push(Y):x[P]=[x[P],Y]:x[P]=Y}return x};var l=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}},function(t,r,i){var o=function(h){switch(typeof h){case"string":return h;case"boolean":return h?"true":"false";case"number":return isFinite(h)?h:"";default:return""}};t.exports=function(h,y,x,w){return y=y||"&",x=x||"=",h===null&&(h=void 0),typeof h=="object"?a(u(h),(function(_){var S=encodeURIComponent(o(_))+x;return l(h[_])?a(h[_],(function(R){return S+encodeURIComponent(o(R))})).join(y):S+encodeURIComponent(o(h[_]))})).join(y):w?encodeURIComponent(o(w))+x+encodeURIComponent(o(h)):""};var l=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"};function a(h,y){if(h.map)return h.map(y);for(var x=[],w=0;w<h.length;w++)x.push(y(h[w],w));return x}var u=Object.keys||function(h){var y=[];for(var x in h)Object.prototype.hasOwnProperty.call(h,x)&&y.push(x);return y}}])}))})(Rb)),Rb.exports}var gF=hF();const pF=M1(gF),et={container:"table-up-container",tableCaption:"table-up-caption",tableWrapper:"table-up",tableMain:"table-up-main",tableColgroup:"table-up-colgroup",tableCol:"table-up-col",tableBody:"table-up-body",tableRow:"table-up-row",tableCell:"table-up-cell",tableCellInner:"table-up-cell-inner"},Ss={colMinWidthPre:5,colMinWidthPx:40,colDefaultWidth:100,rowMinHeightPx:36},sv={AFTER_TABLE_RESIZE:"after-table-resize"},Ib={moduleName:"table-up"},vF=[["rgb(255, 255, 255)","rgb(0, 0, 0)","rgb(72, 83, 104)","rgb(41, 114, 244)","rgb(0, 163, 245)","rgb(49, 155, 98)","rgb(222, 60, 54)","rgb(248, 136, 37)","rgb(245, 196, 0)","rgb(153, 56, 215)"],["rgb(242, 242, 242)","rgb(127, 127, 127)","rgb(243, 245, 247)","rgb(229, 239, 255)","rgb(229, 246, 255)","rgb(234, 250, 241)","rgb(254, 233, 232)","rgb(254, 243, 235)","rgb(254, 249, 227)","rgb(253, 235, 255)"],["rgb(216, 216, 216)","rgb(89, 89, 89)","rgb(197, 202, 211)","rgb(199, 220, 255)","rgb(199, 236, 255)","rgb(195, 234, 213)","rgb(255, 201, 199)","rgb(255, 220, 196)","rgb(255, 238, 173)","rgb(242, 199, 255)"],["rgb(191, 191, 191)","rgb(63, 63, 63)","rgb(128, 139, 158)","rgb(153, 190, 255)","rgb(153, 221, 255)","rgb(152, 215, 182)","rgb(255, 156, 153)","rgb(255, 186, 132)","rgb(255, 226, 112)","rgb(213, 142, 255)"],["rgb(165, 165, 165)","rgb(38, 38, 38)","rgb(53, 59, 69)","rgb(20, 80, 184)","rgb(18, 116, 165)","rgb(39, 124, 79)","rgb(158, 30, 26)","rgb(184, 96, 20)","rgb(163, 130, 0)","rgb(94, 34, 129)"],["rgb(147, 147, 147)","rgb(13, 13, 13)","rgb(36, 39, 46)","rgb(12, 48, 110)","rgb(10, 65, 92)","rgb(24, 78, 50)","rgb(88, 17, 14)","rgb(92, 48, 10)","rgb(102, 82, 0)","rgb(59, 21, 81)"]],bF="table-up",yF=new Set([et.tableCellInner]),mF=n=>yF.has(n.statics.blotName);function l4(n){return n&&n.parent?mF(n.parent)?!0:l4(n.parent):!1}function cu(n,e=bF){let t=e?`${e}-`:"";return{b:()=>`${t}${n}`,be:r=>r?`${t}${n}__${r}`:"",bm:r=>r?`${t}${n}--${r}`:"",bem:(r,i)=>r&&i?`${t}${n}__${r}--${i}`:"",ns:r=>r?`${t}${r}`:"",bs:r=>r?`${t}${n}-${r}`:"",cv:r=>r?`--${t}${r}`:"",is:r=>`is-${r}`}}function Kl(n,e){let t=n.parent;for(;t&&t.statics.blotName!==e&&t!==n.scroll;)t=t.parent;if(t===n.scroll)throw Error(`${n.statics.blotName} must be a child of ${e}`);return t}function A1(n,e){let t=Array(e.length),r=new Map(e.map((o,l)=>[o,l])),i=n.parent;for(;i&&i!==n.scroll&&r.size!==0;){if(r.has(i.statics.blotName)){let o=r.get(i.statics.blotName);t[o]=i,r.delete(i.statics.blotName)}i=i.parent}if(r.size>0)throw Error(`${n.statics.blotName} must be a child of ${Array.from(r.keys()).join(", ")}`);return t}function hw(n){let e=new Map,t=n;for(;t&&t.statics.blotName!=="scroll";)e.set(t.statics.blotName,t),t=t.parent;return e}function xF(n,e){let t=[],r=n.children.iterator(),i=null;for(;i=r();)i instanceof e&&t.push(i);return t}function wF(n,e,t){for(let r of Object.getOwnPropertyNames(e))t&&t.test(r)||Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r));return n}function CF(n,e){let t=class extends n{constructor(...r){super(...r)}};for(let r of e)wF(t.prototype,r.prototype,/^constructor$/);return t}function R0(n,e){return n.prototype instanceof e}function v1(n,e){return n=Math.min(e,Math.max(0,Number.parseFloat(`${n}`))),Math.abs(n-e)<1e-6?1:n%e/Number.parseFloat(e)}function gw(n){return{h:Math.min(360,Math.max(0,n.h)),s:Math.min(100,Math.max(0,n.s)),b:Math.min(100,Math.max(0,n.b)),a:Math.min(1,Math.max(0,n.a))}}function _F(n){n=n.startsWith("#")?n.slice(1):n;let e=Number.parseInt(n.slice(0,2),16),t=Number.parseInt(n.slice(2,4),16),r=Number.parseInt(n.slice(4,6),16),i=Number((Number.parseInt(n.slice(6,8)||"ff",16)/255).toFixed(2));return{r:e,g:t,b:r,a:i}}function pw(n){let{r:e,g:t,b:r,a:i}=n;e=v1(e,255),t=v1(t,255),r=v1(r,255);let o=Math.max(e,t,r),l=Math.min(e,t,r),a,u=o,h=o-l,y=o===0?0:h/o;if(o===l)a=0;else{switch(o){case e:a=(t-r)/h+(t<r?6:0);break;case t:a=(r-e)/h+2;break;case r:a=(e-t)/h+4;break}a/=6}return{h:a*360,s:y*100,b:u*100,a:i}}function X0(n){let{h:e,s:t,b:r,a:i}=n;e=v1(e,360)*6,t=v1(t,100),r=v1(r,100);let o=Math.floor(e),l=e-o,a=r*(1-t),u=r*(1-l*t),h=r*(1-(1-l)*t),y=o%6,x=[r,u,a,a,h,r][y],w=[h,r,r,u,a,a][y],_=[a,a,h,r,r,u][y];return{r:Math.round(x*255),g:Math.round(w*255),b:Math.round(_*255),a:i}}function s4(n){let e=[n.r.toString(16),n.g.toString(16),n.b.toString(16),Math.round(n.a*255).toString(16)];for(let t in e)e[t].length===1&&(e[t]=`0${e[t]}`);return e.join("")}const vw=n=>s4(X0(n)),tm=n=>typeof n=="function",a4=Array.isArray,Lg=n=>typeof n=="string",SF=n=>typeof n=="number",I0=n=>typeof n=="object"&&!!n,EF=n=>!Number.isNaN(n)&&Number(n)>0,AF=n=>a4(n)?n:[n];function av(n){let{type:e="default",content:t}=n||{},r=cu("button"),i=document.createElement("button");return i.classList.add(r.b(),e),t&&(Lg(t)?i.textContent=t:i.appendChild(t)),i}function TF(n={}){let e=230,t=150,r=10,i=pw(_F(n.color||"#ff0000")),o=cu("color-picker"),l=document.createElement("div");l.classList.add(o.b());let a=document.createElement("div");a.classList.add(o.be("content"));let u=document.createElement("div");u.classList.add(o.be("selector"));let h=document.createElement("div");h.classList.add(o.be("background")),u.appendChild(h);let y=document.createElement("div");y.classList.add(o.be("background-handle")),h.appendChild(y);let x=document.createElement("div");x.classList.add(o.be("alpha"));let w=document.createElement("div");w.classList.add(o.be("alpha-bg"));let _=document.createElement("div");_.classList.add(o.be("alpha-handle")),x.appendChild(w),x.appendChild(_);let S=document.createElement("div");S.classList.add(o.be("hue"));let R=document.createElement("div");R.classList.add(o.be("hue-handle")),S.appendChild(R);let I=document.createElement("div");I.classList.add(o.be("action"));let[O,P,Y,z]=["r","g","b","a"].map(Me=>{let De=document.createElement("div");De.classList.add(o.be("action-item"),Me);let Re=document.createElement("label");Re.textContent=Me.toUpperCase();let Le=document.createElement("input");return Le.classList.add(o.be("input")),Le.addEventListener("input",()=>{Le.value=Le.value.replaceAll(/[^0-9]/g,"")}),Le.addEventListener("change",()=>{let Oe=Math.round(Number(Le.value));Me==="a"&&(Oe/=100);let Ge=gw(pw(Object.assign({},X0(i),{[Me]:Oe})));ae(Ge),fe()}),De.appendChild(Re),De.appendChild(Le),I.appendChild(De),Le});a.appendChild(S),a.appendChild(u),a.appendChild(x),l.appendChild(a),l.appendChild(I);let W=!1,B=!1,ee=!1;function H(){let Me=vw(i);for(let[De,Re]of[O,P,Y].entries())Re.value=String(Number.parseInt(Me[De*2]+Me[De*2+1],16));z.value=String((i.a*100).toFixed(0))}function V(){Object.assign(y.style,{left:`${Math.floor(e*i.s/100)}px`,top:`${Math.floor(t*(100-i.b)/100)}px`})}function de(){u.style.backgroundColor=`#${s4(X0({h:i.h,s:100,b:100,a:1}))}`}function Z(){R.style.top=`${Math.floor(t-t*i.h/360)}px`}function te(){_.style.left=`${i.a*100}%`}function ne(){let{r:Me,g:De,b:Re}=X0(i);w.style.background=`linear-gradient(to right, rgba(${Me}, ${De}, ${Re}, 0) 0%, rgba(${Me}, ${De}, ${Re}, 1) 100%)`}function fe(){V(),de(),Z(),te(),ne(),H()}function ae(Me){i=gw(Object.assign({},i,Me)),H(),n.onChange&&n.onChange(`#${vw(i)}`)}function j(Me){let De=u.getBoundingClientRect(),Re=De.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),Le=De.left+document.body.scrollLeft,Oe=Math.floor(100*Math.max(0,Math.min(e,Me.pageX-Le))/e),Ge=Math.floor(100*(t-Math.max(0,Math.min(t,Me.pageY-Re)))/t);ae({s:Oe,b:Ge}),fe()}function re(Me){let De=S.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);ae({h:Math.floor(360*(t-Math.max(0,Math.min(t,Me.pageY-De)))/t)}),fe()}function he(Me){let{pageX:De}=Me,Re=x.getBoundingClientRect(),Le=De-Re.left;Le=Math.max(r/2,Le),Le=Math.min(Le,Re.width-r/2),ae({a:Math.round((Le-10/2)/(Re.width-10)*100)/100}),fe()}function be(Me){W&&(Me.preventDefault(),j(Me)),B&&(Me.preventDefault(),re(Me)),ee&&(Me.preventDefault(),he(Me))}function le(){document.removeEventListener("mousemove",be),document.removeEventListener("mouseup",le),W=!1}function J(Me){document.addEventListener("mousemove",be),document.addEventListener("mouseup",le),W=!0,j(Me)}u.addEventListener("mousedown",J);function pe(){document.removeEventListener("mousemove",be),document.removeEventListener("mouseup",pe),B=!1}function Te(Me){document.addEventListener("mousemove",be),document.addEventListener("mouseup",pe),B=!0,re(Me)}S.addEventListener("mousedown",Te);function Fe(){document.removeEventListener("mousemove",be),document.removeEventListener("mouseup",Fe),ee=!1}function _e(Me){document.addEventListener("mousemove",be),document.addEventListener("mouseup",Fe),ee=!0,he(Me)}return x.addEventListener("mousedown",_e),fe(),l}let bw=8e3;function c4({child:n,target:e=document.body,beforeClose:t=()=>{}}={}){let r=cu("dialog"),i=e,o=document.createElement("div");o.classList.add(r.b()),o.style.zIndex=String(bw);let l=document.createElement("div");if(l.classList.add(r.be("overlay")),o.appendChild(l),n){let h=document.createElement("div");h.classList.add(r.be("content")),h.appendChild(n),l.appendChild(h),h.addEventListener("click",y=>{y.stopPropagation()})}let a=getComputedStyle(i).overflow;i.style.overflow="hidden",i.appendChild(o);let u=()=>{t(),o.remove(),i.style.overflow=a};return o.addEventListener("click",u),bw+=1,{dialog:o,close:u}}function yw(n,e){let t=cu("input");e.type||(e.type="text"),e.value||(e.value="");let r=document.createElement("div");if(r.classList.add(t.be("item")),n){let a=document.createElement("span");a.classList.add(t.be("label")),a.textContent=n,r.appendChild(a)}let i=document.createElement("div");i.classList.add(t.be("input"));let o=document.createElement("input");for(let a in e)o.setAttribute(a,e[a]);return(e.max||e.min)&&o.addEventListener("blur",()=>{e.max&&e.max<=Number(o.value)&&(o.value=String(e.max)),e.min&&e.min>=Number(o.value)&&(o.value=String(e.min))}),i.appendChild(o),r.appendChild(i),o.addEventListener("focus",()=>{i.classList.add("focus")}),o.addEventListener("blur",()=>{i.classList.remove("focus")}),{item:r,input:o,errorTip:a=>{let u;return i.classList.contains("error")?u=i.querySelector(`.${t.be("error-tip")}`):(u=document.createElement("span"),u.classList.add(t.be("error-tip")),i.appendChild(u)),u.textContent=a,i.classList.add("error"),{removeError:()=>{i.classList.remove("error"),u.remove()}}}}}async function RF(n={}){let e=cu("creator"),t=document.createElement("div");t.classList.add(e.b());let r=document.createElement("div");r.classList.add(e.be("input"));let{item:i,input:o,errorTip:l}=yw(n.rowText||"Row",{type:"number",value:String(n.row||""),max:99}),{item:a,input:u,errorTip:h}=yw(n.colText||"Column",{type:"number",value:String(n.col||""),max:99});r.appendChild(i),r.appendChild(a),t.appendChild(r);let y=document.createElement("div");y.classList.add(e.be("control"));let x=av({type:"confirm",content:n.confirmText||"Confirm"}),w=av({type:"default",content:n.cancelText||"Cancel"});y.appendChild(x),y.appendChild(w),t.appendChild(y);let _=(R=Number(o.value),I=Number(u.value))=>{if(Number.isNaN(R)||R<=0){l(n.notPositiveNumberError||"Please enter a positive integer");return}if(Number.isNaN(I)||I<=0){h(n.notPositiveNumberError||"Please enter a positive integer");return}return{row:R,col:I}},S=R=>{R.key==="Escape"&&(close(),document.removeEventListener("keydown",S))};return new Promise((R,I)=>{let{close:O}=c4({child:t,beforeClose:I});o.focus();for(let P of[o,u])P.addEventListener("keydown",Y=>{if(Y.key==="Enter"){let z=_();z&&(R(z),O())}});x.addEventListener("click",async()=>{let P=_();P&&(R(P),O())}),document.addEventListener("keydown",S),w.addEventListener("click",O)})}function IF(n={}){let e=cu("select-box"),t=document.createElement("div");t.classList.add(e.b());let r=document.createElement("div");r.classList.add(e.be("block"));for(let o=0;o<(n.row||8);o++)for(let l=0;l<(n.col||8);l++){let a=document.createElement("div");a.classList.add(e.be("item")),a.dataset.row=String(o+1),a.dataset.col=String(l+1),r.appendChild(a)}let i=()=>{let{row:o,col:l}=t.dataset;for(let u of Array.from(r.querySelectorAll(".active")))u.classList.remove("active");if(!o||!l)return;let a=Array.from(r.children);for(let u=0;u<a.length;u++){let{row:h,col:y}=a[u].dataset;if(h>o&&y>l)return;h<=o&&y<=l?a[u].classList.add("active"):a[u].classList.remove("active")}};if(r.addEventListener("mousemove",o=>{if(!o.target)return;let{row:l,col:a}=o.target.dataset;!l||!a||(t.dataset.row=l,t.dataset.col=a,i())}),r.addEventListener("mouseleave",()=>{t.removeAttribute("data-row"),t.removeAttribute("data-col"),i()}),r.addEventListener("click",()=>{let{row:o,col:l}=t.dataset;!o||!l||n.onSelect&&n.onSelect(Number(o),Number(l))}),t.appendChild(r),n.customBtn){let o=n.texts||{},l=document.createElement("div");l.classList.add(e.be("custom")),l.textContent=o.customBtnText||"Custom",l.addEventListener("click",async()=>{let a=await RF(o);a&&n.onSelect&&n.onSelect(a.row,a.col)}),t.appendChild(l)}return t}const cv=Math.min,Og=Math.max,uv=Math.round,k0=Math.floor,th=n=>({x:n,y:n}),kF={left:"right",right:"left",bottom:"top",top:"bottom"},MF={start:"end",end:"start"};function mw(n,e,t){return Og(n,cv(e,t))}function T1(n,e){return typeof n=="function"?n(e):n}function cg(n){return n.split("-")[0]}function Pv(n){return n.split("-")[1]}function Vm(n){return n==="x"?"y":"x"}function u4(n){return n==="y"?"height":"width"}function Eh(n){return["top","bottom"].includes(cg(n))?"y":"x"}function f4(n){return Vm(Eh(n))}function LF(n,e,t){t===void 0&&(t=!1);let r=Pv(n),i=f4(n),o=u4(i),l=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(l=fv(l)),[l,fv(l)]}function OF(n){let e=fv(n);return[nm(n),e,nm(e)]}function nm(n){return n.replace(/start|end/g,e=>MF[e])}function PF(n,e,t){let r=["left","right"],i=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?o:l;default:return[]}}function DF(n,e,t,r){let i=Pv(n),o=PF(cg(n),t==="start",r);return i&&(o=o.map(l=>l+"-"+i),e&&(o=o.concat(o.map(nm)))),o}function fv(n){return n.replace(/left|right|bottom|top/g,e=>kF[e])}function NF(n){return{top:0,right:0,bottom:0,left:0,...n}}function FF(n){return typeof n=="number"?{top:n,right:n,bottom:n,left:n}:NF(n)}function dv(n){let{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function xw(n,e,t){let{reference:r,floating:i}=n,o=Eh(e),l=f4(e),a=u4(l),u=cg(e),h=o==="y",y=r.x+r.width/2-i.width/2,x=r.y+r.height/2-i.height/2,w=r[a]/2-i[a]/2,_;switch(u){case"top":_={x:y,y:r.y-i.height};break;case"bottom":_={x:y,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:x};break;case"left":_={x:r.x-i.width,y:x};break;default:_={x:r.x,y:r.y}}switch(Pv(e)){case"start":_[l]-=w*(t&&h?-1:1);break;case"end":_[l]+=w*(t&&h?-1:1);break}return _}const BF=async(n,e,t)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=t,a=o.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(e)),h=await l.getElementRects({reference:n,floating:e,strategy:i}),{x:y,y:x}=xw(h,r,u),w=r,_={},S=0;for(let R=0;R<a.length;R++){let{name:I,fn:O}=a[R],{x:P,y:Y,data:z,reset:W}=await O({x:y,y:x,initialPlacement:r,placement:w,strategy:i,middlewareData:_,rects:h,platform:l,elements:{reference:n,floating:e}});y=P??y,x=Y??x,_={..._,[I]:{..._[I],...z}},W&&S<=50&&(S++,typeof W=="object"&&(W.placement&&(w=W.placement),W.rects&&(h=W.rects===!0?await l.getElementRects({reference:n,floating:e,strategy:i}):W.rects),{x:y,y:x}=xw(h,w,u)),R=-1)}return{x:y,y:x,placement:w,strategy:i,middlewareData:_}};async function d4(n,e){e===void 0&&(e={});let{x:t,y:r,platform:i,rects:o,elements:l,strategy:a}=n,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:y="floating",altBoundary:x=!1,padding:w=0}=T1(e,n),_=FF(w),S=y==="floating"?"reference":"floating",R=l[x?S:y],I=dv(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(R))??!0?R:R.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:h,strategy:a})),O=y==="floating"?{x:t,y:r,width:o.floating.width,height:o.floating.height}:o.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),Y=await(i.isElement==null?void 0:i.isElement(P))&&await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1},z=dv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:O,offsetParent:P,strategy:a}):O);return{top:(I.top-z.top+_.top)/Y.y,bottom:(z.bottom-I.bottom+_.bottom)/Y.y,left:(I.left-z.left+_.left)/Y.x,right:(z.right-I.right+_.right)/Y.x}}const zF=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var de,Z,te,ne;var t;let{placement:r,middlewareData:i,rects:o,initialPlacement:l,platform:a,elements:u}=e,{mainAxis:h=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:S=!0,...R}=T1(n,e);if((t=i.arrow)!=null&&t.alignmentOffset)return{};let I=cg(r),O=Eh(l),P=cg(l)===l,Y=await(a.isRTL==null?void 0:a.isRTL(u.floating)),z=x||(P||!S?[fv(l)]:OF(l)),W=_!=="none";!x&&W&&z.push(...DF(l,S,_,Y));let B=[l,...z],ee=await d4(e,R),H=[],V=((de=i.flip)==null?void 0:de.overflows)||[];if(h&&H.push(ee[I]),y){let fe=LF(r,o,Y);H.push(ee[fe[0]],ee[fe[1]])}if(V=[...V,{placement:r,overflows:H}],!H.every(fe=>fe<=0)){let fe=(((Z=i.flip)==null?void 0:Z.index)||0)+1,ae=B[fe];if(ae&&(!(y==="alignment"?O!==Eh(ae):!1)||V.every(he=>he.overflows[0]>0&&Eh(he.placement)===O)))return{data:{index:fe,overflows:V},reset:{placement:ae}};let j=(te=V.filter(re=>re.overflows[0]<=0).sort((re,he)=>re.overflows[1]-he.overflows[1])[0])==null?void 0:te.placement;if(!j)switch(w){case"bestFit":{let re=(ne=V.filter(he=>{if(W){let be=Eh(he.placement);return be===O||be==="y"}return!0}).map(he=>[he.placement,he.overflows.filter(be=>be>0).reduce((be,le)=>be+le,0)]).sort((he,be)=>he[1]-be[1])[0])==null?void 0:ne[0];re&&(j=re);break}case"initialPlacement":j=l;break}if(r!==j)return{reset:{placement:j}}}return{}}}};async function HF(n,e){let{placement:t,platform:r,elements:i}=n,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=cg(t),a=Pv(t),u=Eh(t)==="y",h=["left","top"].includes(l)?-1:1,y=o&&u?-1:1,x=T1(e,n),{mainAxis:w,crossAxis:_,alignmentAxis:S}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return a&&typeof S=="number"&&(_=a==="end"?S*-1:S),u?{x:_*y,y:w*h}:{x:w*h,y:_*y}}const WF=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var u;var t;let{x:r,y:i,placement:o,middlewareData:l}=e,a=await HF(e,n);return o===((u=l.offset)==null?void 0:u.placement)&&(t=l.arrow)!=null&&t.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:o}}}}},UF=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:a={fn:I=>{let{x:O,y:P}=I;return{x:O,y:P}}},...u}=T1(n,e),h={x:t,y:r},y=await d4(e,u),x=Eh(cg(i)),w=Vm(x),_=h[w],S=h[x];if(o){let I=w==="y"?"top":"left",O=w==="y"?"bottom":"right",P=_+y[I],Y=_-y[O];_=mw(P,_,Y)}if(l){let I=x==="y"?"top":"left",O=x==="y"?"bottom":"right",P=S+y[I],Y=S-y[O];S=mw(P,S,Y)}let R=a.fn({...e,[w]:_,[x]:S});return{...R,data:{x:R.x-t,y:R.y-r,enabled:{[w]:o,[x]:l}}}}}},GF=function(n){return n===void 0&&(n={}),{options:n,fn(e){var O,P;let{x:t,y:r,placement:i,rects:o,middlewareData:l}=e,{offset:a=0,mainAxis:u=!0,crossAxis:h=!0}=T1(n,e),y={x:t,y:r},x=Eh(i),w=Vm(x),_=y[w],S=y[x],R=T1(a,e),I=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(u){let Y=w==="y"?"height":"width",z=o.reference[w]-o.floating[Y]+I.mainAxis,W=o.reference[w]+o.reference[Y]-I.mainAxis;_<z?_=z:_>W&&(_=W)}if(h){let Y=w==="y"?"width":"height",z=["top","left"].includes(cg(i)),W=o.reference[x]-o.floating[Y]+(z&&((O=l.offset)==null?void 0:O[x])||0)+(z?0:I.crossAxis),B=o.reference[x]+o.reference[Y]+(z?0:((P=l.offset)==null?void 0:P[x])||0)-(z?I.crossAxis:0);S<W?S=W:S>B&&(S=B)}return{[w]:_,[x]:S}}}};function Dv(){return typeof window<"u"}function P1(n){return h4(n)?(n.nodeName||"").toLowerCase():"#document"}function Ff(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function ah(n){var e;return(e=(h4(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function h4(n){return Dv()?n instanceof Node||n instanceof Ff(n).Node:!1}function Nd(n){return Dv()?n instanceof Element||n instanceof Ff(n).Element:!1}function oh(n){return Dv()?n instanceof HTMLElement||n instanceof Ff(n).HTMLElement:!1}function ww(n){return!Dv()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ff(n).ShadowRoot}function Vp(n){let{overflow:e,overflowX:t,overflowY:r,display:i}=Fd(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function YF(n){return["table","td","th"].includes(P1(n))}function Nv(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function Zm(n){let e=Xm(),t=Nd(n)?Fd(n):n;return["transform","translate","scale","rotate","perspective"].some(r=>t[r]?t[r]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function VF(n){let e=ug(n);for(;oh(e)&&!R1(e);){if(Zm(e))return e;if(Nv(e))return null;e=ug(e)}return null}function Xm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function R1(n){return["html","body","#document"].includes(P1(n))}function Fd(n){return Ff(n).getComputedStyle(n)}function Fv(n){return Nd(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function ug(n){if(P1(n)==="html")return n;let e=n.assignedSlot||n.parentNode||ww(n)&&n.host||ah(n);return ww(e)?e.host:e}function g4(n){let e=ug(n);return R1(e)?n.ownerDocument?n.ownerDocument.body:n.body:oh(e)&&Vp(e)?e:g4(e)}function Pp(n,e,t){var l;e===void 0&&(e=[]),t===void 0&&(t=!0);let r=g4(n),i=r===((l=n.ownerDocument)==null?void 0:l.body),o=Ff(r);if(i){let a=rm(o);return e.concat(o,o.visualViewport||[],Vp(r)?r:[],a&&t?Pp(a):[])}return e.concat(r,Pp(r,[],t))}function rm(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function p4(n){let e=Fd(n),t=parseFloat(e.width)||0,r=parseFloat(e.height)||0,i=oh(n),o=i?n.offsetWidth:t,l=i?n.offsetHeight:r,a=uv(t)!==o||uv(r)!==l;return a&&(t=o,r=l),{width:t,height:r,$:a}}function Km(n){return Nd(n)?n:n.contextElement}function b1(n){let e=Km(n);if(!oh(e))return th(1);let t=e.getBoundingClientRect(),{width:r,height:i,$:o}=p4(e),l=(o?uv(t.width):t.width)/r,a=(o?uv(t.height):t.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const ZF=th(0);function v4(n){let e=Ff(n);return!Xm()||!e.visualViewport?ZF:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function XF(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Ff(n)?!1:e}function Fg(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);let i=n.getBoundingClientRect(),o=Km(n),l=th(1);e&&(r?Nd(r)&&(l=b1(r)):l=b1(n));let a=XF(o,t,r)?v4(o):th(0),u=(i.left+a.x)/l.x,h=(i.top+a.y)/l.y,y=i.width/l.x,x=i.height/l.y;if(o){let w=Ff(o),_=r&&Nd(r)?Ff(r):r,S=w,R=rm(S);for(;R&&r&&_!==S;){let I=b1(R),O=R.getBoundingClientRect(),P=Fd(R),Y=O.left+(R.clientLeft+parseFloat(P.paddingLeft))*I.x,z=O.top+(R.clientTop+parseFloat(P.paddingTop))*I.y;u*=I.x,h*=I.y,y*=I.x,x*=I.y,u+=Y,h+=z,S=Ff(R),R=rm(S)}}return dv({width:y,height:x,x:u,y:h})}function Jm(n,e){let t=Fv(n).scrollLeft;return e?e.left+t:Fg(ah(n)).left+t}function b4(n,e,t){t===void 0&&(t=!1);let r=n.getBoundingClientRect(),i=r.left+e.scrollLeft-(t?0:Jm(n,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function KF(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n,o=i==="fixed",l=ah(r),a=e?Nv(e.floating):!1;if(r===l||a&&o)return t;let u={scrollLeft:0,scrollTop:0},h=th(1),y=th(0),x=oh(r);if((x||!x&&!o)&&((P1(r)!=="body"||Vp(l))&&(u=Fv(r)),oh(r))){let _=Fg(r);h=b1(r),y.x=_.x+r.clientLeft,y.y=_.y+r.clientTop}let w=l&&!x&&!o?b4(l,u,!0):th(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-u.scrollLeft*h.x+y.x+w.x,y:t.y*h.y-u.scrollTop*h.y+y.y+w.y}}function JF(n){return Array.from(n.getClientRects())}function QF(n){let e=ah(n),t=Fv(n),r=n.ownerDocument.body,i=Og(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Og(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),l=-t.scrollLeft+Jm(n),a=-t.scrollTop;return Fd(r).direction==="rtl"&&(l+=Og(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:a}}function qF(n,e){let t=Ff(n),r=ah(n),i=t.visualViewport,o=r.clientWidth,l=r.clientHeight,a=0,u=0;if(i){o=i.width,l=i.height;let h=Xm();(!h||h&&e==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:l,x:a,y:u}}function jF(n,e){let t=Fg(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,o=oh(n)?b1(n):th(1),l=n.clientWidth*o.x,a=n.clientHeight*o.y,u=i*o.x,h=r*o.y;return{width:l,height:a,x:u,y:h}}function Cw(n,e,t){let r;if(e==="viewport")r=qF(n,t);else if(e==="document")r=QF(ah(n));else if(Nd(e))r=jF(e,t);else{let i=v4(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return dv(r)}function y4(n,e){let t=ug(n);return t===e||!Nd(t)||R1(t)?!1:Fd(t).position==="fixed"||y4(t,e)}function $F(n,e){let t=e.get(n);if(t)return t;let r=Pp(n,[],!1).filter(a=>Nd(a)&&P1(a)!=="body"),i=null,o=Fd(n).position==="fixed",l=o?ug(n):n;for(;Nd(l)&&!R1(l);){let a=Fd(l),u=Zm(l);!u&&a.position==="fixed"&&(i=null),(o?!u&&!i:!u&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Vp(l)&&!u&&y4(n,l))?r=r.filter(y=>y!==l):i=a,l=ug(l)}return e.set(n,r),r}function eB(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n,o=t==="clippingAncestors"?Nv(e)?[]:$F(e,this._c):[].concat(t),l=[...o,r],a=l[0],u=l.reduce((h,y)=>{let x=Cw(e,y,i);return h.top=Og(x.top,h.top),h.right=cv(x.right,h.right),h.bottom=cv(x.bottom,h.bottom),h.left=Og(x.left,h.left),h},Cw(e,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function tB(n){let{width:e,height:t}=p4(n);return{width:e,height:t}}function nB(n,e,t){let r=oh(e),i=ah(e),o=t==="fixed",l=Fg(n,!0,o,e),a={scrollLeft:0,scrollTop:0},u=th(0);function h(){u.x=Jm(i)}if(r||!r&&!o)if((P1(e)!=="body"||Vp(i))&&(a=Fv(e)),r){let _=Fg(e,!0,o,e);u.x=_.x+e.clientLeft,u.y=_.y+e.clientTop}else i&&h();o&&!r&&i&&h();let y=i&&!r&&!o?b4(i,a):th(0),x=l.left+a.scrollLeft-u.x-y.x,w=l.top+a.scrollTop-u.y-y.y;return{x,y:w,width:l.width,height:l.height}}function kb(n){return Fd(n).position==="static"}function _w(n,e){if(!oh(n)||Fd(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return ah(n)===t&&(t=t.ownerDocument.body),t}function m4(n,e){let t=Ff(n);if(Nv(n))return t;if(!oh(n)){let i=ug(n);for(;i&&!R1(i);){if(Nd(i)&&!kb(i))return i;i=ug(i)}return t}let r=_w(n,e);for(;r&&YF(r)&&kb(r);)r=_w(r,e);return r&&R1(r)&&kb(r)&&!Zm(r)?t:r||VF(n)||t}const rB=async function(n){let e=this.getOffsetParent||m4,t=this.getDimensions,r=await t(n.floating);return{reference:nB(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iB(n){return Fd(n).direction==="rtl"}const oB={convertOffsetParentRelativeRectToViewportRelativeRect:KF,getDocumentElement:ah,getClippingRect:eB,getOffsetParent:m4,getElementRects:rB,getClientRects:JF,getDimensions:tB,getScale:b1,isElement:Nd,isRTL:iB};function x4(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function lB(n,e){let t=null,r,i=ah(n);function o(){var a;clearTimeout(r),(a=t)==null||a.disconnect(),t=null}function l(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();let h=n.getBoundingClientRect(),{left:y,top:x,width:w,height:_}=h;if(a||e(),!w||!_)return;let S=k0(x),R=k0(i.clientWidth-(y+w)),I=k0(i.clientHeight-(x+_)),O=k0(y),P=-S+"px "+-R+"px "+-I+"px "+-O+"px",Y={rootMargin:P,threshold:Og(0,cv(1,u))||1},z=!0;function W(B){let ee=B[0].intersectionRatio;if(ee!==u){if(!z)return l();ee?l(!1,ee):r=setTimeout(()=>{l(!1,1e-7)},1e3)}ee===1&&!x4(h,n.getBoundingClientRect())&&l(),z=!1}try{t=new IntersectionObserver(W,{...Y,root:i.ownerDocument})}catch{t=new IntersectionObserver(W,Y)}t.observe(n)}return l(!0),o}function sB(n,e,t,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,h=Km(n),y=i||o?[...h?Pp(h):[],...Pp(e)]:[];y.forEach(O=>{i&&O.addEventListener("scroll",t,{passive:!0}),o&&O.addEventListener("resize",t)});let x=h&&a?lB(h,t):null,w=-1,_=null;l&&(_=new ResizeObserver(O=>{let[P]=O;P&&P.target===h&&_&&(_.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var Y;(Y=_)==null||Y.observe(e)})),t()}),h&&!u&&_.observe(h),_.observe(e));let S,R=u?Fg(n):null;u&&I();function I(){let O=Fg(n);R&&!x4(R,O)&&t(),R=O,S=requestAnimationFrame(I)}return t(),()=>{var O;y.forEach(P=>{i&&P.removeEventListener("scroll",t),o&&P.removeEventListener("resize",t)}),x==null||x(),(O=_)==null||O.disconnect(),_=null,u&&cancelAnimationFrame(S)}}const w4=WF,C4=UF,_4=zF,S4=GF,E4=(n,e,t)=>{let r=new Map,i={platform:oB,...t},o={...i.platform,_c:r};return BF(n,e,{...i,platform:o})};function aB(n,e,t,r,i){return n.addEventListener("transitionend",t,r),setTimeout(()=>{t()},e)}const cB=4;let M0;function Mb(n,e={}){let{msg:t="",delay:r=150,content:i,direction:o="bottom",type:l="hover",container:a,onOpen:u,onClose:h,closed:y,onDestroy:x}=e,w=cu("tooltip");if(t||i){M0||(M0=document.createElement("div"),document.body.appendChild(M0));let _=a||M0,S=document.createElement("div");S.classList.add(w.b(),"hidden","transparent"),i?S.appendChild(i):t&&(S.textContent=t);let R,I,O,P=()=>{O&&O(),E4(n,S,{placement:o,middleware:[_4(),C4({limiter:S4()}),w4(cB)]}).then(({x:fe,y:ae})=>{Object.assign(S.style,{left:`${fe}px`,top:`${ae}px`})})},Y=()=>{S.classList.add("hidden"),_.contains(S)&&_.removeChild(S),O&&O(),y&&y()},z=(fe=!1)=>{I&&clearTimeout(I),R=setTimeout(()=>{if(u){let ae=u(fe);if(!fe&&ae)return}_.appendChild(S),S.removeEventListener("transitionend",Y),S.classList.remove("hidden"),O=sB(n,S,P),S.classList.remove("transparent")},r)},W=(fe=!1)=>{R&&clearTimeout(R),I=setTimeout(()=>{if(h){let ae=h(fe);if(!fe&&ae)return}aB(S,150,Y,{once:!0}),S.classList.add("transparent")},r)},B=()=>{let fe=[n,S],ae=W.bind(void 0,!1),j=z.bind(void 0,!1);return{prepare:()=>{for(let he of fe)he.addEventListener("mouseenter",j),he.addEventListener("mouseleave",ae)},show:z,hide:W,destroy:()=>{for(let he of fe)he.removeEventListener("mouseenter",j),he.removeEventListener("mouseleave",ae)}}},ee=()=>{let fe=j=>{j.stopPropagation(),W(!1)},ae=j=>{j.stopPropagation(),z(),document.removeEventListener("click",fe),document.addEventListener("click",fe,{once:!0})};return{prepare:()=>{S.addEventListener("click",j=>j.stopPropagation()),n.addEventListener("click",ae)},show:z,hide:(j=!1)=>{W(j),document.removeEventListener("click",fe)},destroy:()=>{n.removeEventListener("click",ae),document.removeEventListener("click",fe)}}},H={hover:B,click:ee},{prepare:V,show:de,hide:Z,destroy:te}=H[l]();return V(),{show:de,hide:Z,destroy:()=>{Z(!0),x&&x(),te(),O&&O(),S.remove()}}}return null}function uB(n,e,t=0,r=!0){let{x:i,y:o,x1:l,y1:a}=n,{x:u,y:h,x1:y,y1:x}=e,w,_;return r?(w=l<u+t||i-t>y,_=a<h+t||o-t>x):(w=l<=u+t||i-t>=y,_=a<=h+t||o-t>=x),!(w||_)}function fB(n,e){let t=e.getBoundingClientRect();return{x:n.x-t.x-e.scrollLeft,y:n.y-t.y-e.scrollTop,x1:n.x-t.x-e.scrollLeft+n.width,y1:n.y-t.y-e.scrollTop+n.height,width:n.width,height:n.height}}const L0=8;function dB(n){let{left:e,top:t,width:r,height:i}=n,{clientWidth:o,clientHeight:l}=document.documentElement,a=!1,u=!1;return e+r>o?(e=o-r-L0,a=!0):e<0&&(e=L0,a=!0),t+i>l?(t=l-i-L0,u=!0):t<0&&(t=L0,u=!0),{left:e,top:t,leftLimited:a,topLimited:u}}function hB(n,e={}){let t=Symbol("ignoreFirstBind"),r=new Set,i=new ResizeObserver(u=>{e.ignoreFirstBind&&u.some(h=>{let y=h.target,x=y[t];return y[t]=!0,!x})||n(u)}),o=i.observe;i.observe=(u,h)=>{r.add(u),o.call(i,u,h)};let l=i.unobserve;i.unobserve=u=>{r.has(u)&&(r.delete(u),u[t]=void 0),l.call(i,u)};let a=i.disconnect;return i.disconnect=()=>{for(let u of r.values())u[t]=void 0;a.call(i)},i}function hv(n,e){n.addEventListener("scroll",e),this.scrollHandler.push([n,e])}function K0(){for(let n=0;n<this.scrollHandler.length;n++){let[e,t]=this.scrollHandler[n];e.removeEventListener("scroll",t)}this.scrollHandler=[]}function sp(n){return{y:n.scrollTop,x:n.scrollLeft}}function gv(n){let e={},t=n.trim().split(";");for(let r=0;r<t.length;r++){let i=t[r].trim();if(!i)continue;let o=i.indexOf(":");if(o===-1)continue;let l=i.slice(0,Math.max(0,o)).trim(),a=i.slice(Math.max(0,o+1)).trim();e[I1(l)]=a}return e}function im(n){return Object.entries(n).map(([e,t])=>`${gB(e)}: ${t};`).join(" ")}function gB(n){return n.replaceAll(/([A-Z])/g," $1").trim().split(" ").join("-").toLowerCase()}function I1(n){return n.replaceAll(/-(\w)/g,(e,t)=>t.toUpperCase())}const Ba=()=>Math.random().toString(36).slice(2);function A4(n,e){let t;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{n.apply(this,r)},e)}}const Lb=qe.import("parchment"),Sw=qe.import("blots/container"),pB=qe.import("blots/block"),vB=qe.import("blots/block/embed");var cd,hg=(cd=class extends Sw{static create(e){let t=document.createElement(this.tagName);return this.className&&t.classList.add(this.className),t}optimize(e){if(this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove();this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}enforceAllowedChildren(){this.children.forEach(e=>{this.statics.allowedChildren.some(r=>e instanceof r)||(e.statics.scope===Lb.Scope.BLOCK_BLOT?(e.parent instanceof cd?(e.next!=null&&e.parent.splitAfter(e),e.prev!=null&&e.parent.splitAfter(e.prev)):(e.next!=null&&this.splitAfter(e),e.prev!=null&&this.splitAfter(e.prev)),e.parent.unwrap()):e instanceof Lb.ParentBlot?e.unwrap():e.remove())})}},Ae(cd,"tagName"),Ae(cd,"blotName",et.container),Ae(cd,"scope",Lb.Scope.BLOCK_BLOT),Ae(cd,"allowedChildren",[pB,vB,Sw]),Ae(cd,"requiredContainer"),Ae(cd,"defaultChild"),cd);const ig=n=>EF(n)?n:1,Ew=qe.import("blots/block"),bB=qe.import("blots/block/embed");var Zh,af=(Zh=class extends hg{static isAllowStyle(n){let e=I1(n);for(let t of this.allowStyle)if(e.startsWith(I1(t)))return!0;return!1}static create(n){let{tableId:e,rowId:t,colId:r,rowspan:i,colspan:o,style:l,emptyRow:a,tag:u="td"}=n,h=super.create();h.dataset.tableId=e,h.dataset.rowId=t,h.dataset.colId=r,h.dataset.rowspan=String(ig(i)),h.dataset.colspan=String(ig(o)),h.dataset.tag=u,l&&(h.dataset.style=l);try{a&&(h.dataset.emptyRow=JSON.stringify(a))}catch{}return h}static formats(n){let{tableId:e,rowId:t,colId:r,rowspan:i,colspan:o,style:l,emptyRow:a,tag:u="td"}=n.dataset,h={tableId:String(e),rowId:String(t),colId:String(r),rowspan:Number(ig(i)),colspan:Number(ig(o)),tag:u};l&&(h.style=l);try{a&&(h.emptyRow=JSON.parse(a))}catch{}return h}constructor(n,e,t){super(n,e),e.setAttribute("contenteditable",String(n.isEnabled()))}setFormatValue(n,e,t=!1){if(t){if(!this.statics.isAllowStyle(n))return;this.parent&&this.parent.statics.blotName===et.tableCell&&this.parent.setFormatValue(n,e)}else{if(!this.statics.allowDataAttrs.has(n))return;let r=`data-${n}`;e?this.domNode.setAttribute(r,e):this.domNode.removeAttribute(r),this.parent&&this.parent.statics.blotName===et.tableCell&&this.parent.setFormatValue(n,e)}this.clearCache()}clearCache(){let n=this.descendants(Ew,0);for(let e of n)e.cache={}}get tableId(){return this.domNode.dataset.tableId}get rowId(){return this.domNode.dataset.rowId}set rowId(n){this.setFormatValue("row-id",n)}get colId(){return this.domNode.dataset.colId}set colId(n){this.setFormatValue("col-id",n)}get rowspan(){return Number(this.domNode.dataset.rowspan)}set rowspan(n){this.setFormatValue("rowspan",n)}get colspan(){return Number(this.domNode.dataset.colspan)}set colspan(n){this.setFormatValue("colspan",n)}get emptyRow(){try{return JSON.parse(this.domNode.dataset.emptyRow)}catch{return[]}}set emptyRow(n){if(this.emptyRow.toString()!==n.toString())try{n.length>0?this.setFormatValue("empty-row",JSON.stringify(n),!1):this.setFormatValue("empty-row",null,!1)}catch{this.setFormatValue("empty-row",null,!1)}}getColumnIndex(){return Kl(this,et.tableMain).getColIds().indexOf(this.colId)}setStyleByString(n){let e=gv(n);for(let[t,r]of Object.entries(e))this.setFormatValue(t,r,!0)}convertTableCell(){this.parent.statics.blotName===et.tableCell&&(this.parent.convertTableCell(),this.clearCache())}formatAt(n,e,t,r){this.children.length===0&&(this.appendChild(this.scroll.create(this.statics.defaultChild.blotName)),e+=1),super.formatAt(n,e,t,r),r&&r.style&&this.setStyleByString(r.style)}insertAt(n,e,t){let[r]=this.children.find(n);if(!r&&this.statics.defaultChild){let i=this.scroll.create(this.statics.defaultChild.blotName||"block");this.appendChild(i)}super.insertAt(n,e,t)}formats(){let n=this.statics.formats(this.domNode);return{[this.statics.blotName]:n}}checkMerge(){let{colId:n,rowId:e,colspan:t,rowspan:r}=this,i=this.next;return i!==null&&i.statics.blotName===this.statics.blotName&&i.rowId===e&&i.colId===n&&i.colspan===t&&i.rowspan===r}optimize(){let n=this.parent,e=this.statics.formats(this.domNode);if(this.prev&&this.prev instanceof bB){let r=this.prev;if(this.insertBefore(r,this.children.head),this.length()<=1){let i=this.scroll.create("block");this.insertBefore(i,r.next)}}let t=n!==null&&n.statics.blotName!==et.tableCell;if(t&&(this.wrap(et.tableCell,e),this.children.length===0)){let r=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(r)}this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove()),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0?this.remove():this.domNode.dataset.style&&t&&n.domNode.style.cssText!==this.domNode.dataset.style&&this.setStyleByString(this.domNode.dataset.style)}insertBefore(n,e){if(n.statics.blotName===this.statics.blotName){let t=n,r=this.statics.formats(t.domNode),i=this.statics.formats(this.domNode);if(Object.entries(i).every(([l,a])=>String(a)===String(r[l]))){let l=this.split(e?e.offset():0);return this.parent.insertBefore(t,l)}else{let[l,a]=A1(this,[et.tableRow,et.tableCell]);if(e){let u=e.offset(),h=this.length();if(u+1<h){let y=this.scroll.create(et.tableCellInner,i);this.children.forEachAt(u+1,this.length(),x=>{y.appendChild(x)}),l.insertBefore(y.wrap(et.tableCell,i),a.next)}}if(this.rowId!==t.rowId){if(e){let y=e.offset(l);l.split(y)}else if(a.next){let y=a.next.offset(l);l.split(y)}let u=this.scroll.create(et.tableRow,r),h=this.scroll.create(et.tableCell,r);return h.appendChild(t),u.appendChild(h),l.parent.insertBefore(u,l.next)}return l.insertBefore(t.wrap(et.tableCell,r),e?a:a.next)}}else if(n.statics.blotName===et.tableCol){try{let t=Kl(this,et.tableBody),r=this.offset(t),i=t.split(r);t.parent.insertBefore(n,i),n.optimize({})}catch{console.warn("TableCellInner not in TableBody")}return}super.insertBefore(n,e)}},Ae(Zh,"blotName",et.tableCellInner),Ae(Zh,"tagName","div"),Ae(Zh,"className","ql-table-cell-inner"),Ae(Zh,"allowDataAttrs",new Set(["table-id","row-id","col-id","rowspan","colspan","empty-row"])),Ae(Zh,"defaultChild",Ew),Ae(Zh,"allowStyle",new Set(["background-color","border","height"])),Zh),cp,qd=(cp=class extends hg{static create(n){let e=super.create();return e.dataset.tableId=n.tableId,e.dataset.rowId=n.rowId,e}get rowId(){return this.domNode.dataset.rowId}get tableId(){return this.domNode.dataset.tableId}setHeight(n){this.foreachCellInner(e=>{e.setFormatValue("height",n,!0)})}getCellByColId(n,e){let t=Kl(this,et.tableMain),r=t.getColIds(),i=r.indexOf(n),o=this.children.iterator(),l=null;for(;l=o();){if(l.colId===n)return l;let a=r.indexOf(l.colId);if(a<i&&a+l.colspan>i)return l}return this[e]&&this[e].statics.blotName===et.tableRow?this[e].getCellByColId(n,e):null}insertCell(n,e){let t=[],r=this.children.iterator(),i=0,o;for(;(o=r())&&(i+=o.colspan,!(i>n));)if(o.rowspan!==1)for(let l=0;l<o.rowspan-1;l++)t[l]=(t[l]||0)+o.colspan;if(o&&i-o.colspan<n){let l=o.getCellInner();l.colspan+=1,o.rowspan!==1&&(t.skipRowNum=o.rowspan-1)}else{let l=this.scroll.create(et.tableCell,e),a=this.scroll.create(et.tableCellInner,e),u=this.scroll.create("block");u.appendChild(this.scroll.create("break")),a.appendChild(u),l.appendChild(a),this.insertBefore(l,o)}return t}getCellByColumIndex(n){let e=[],t=null,r=0;if(n<0)return[t,r,e];let i=this.children.iterator();for(;t=i();){if(r+=t.colspan,t.rowspan!==1)for(let o=0;o<t.rowspan-1;o++)e[o]=(e[o]||0)+t.colspan;if(r>n)break}return[t,r,e]}removeCell(n){if(n<0)return[];let e=this.getCellByColumIndex(n),[t,r]=e,i=e[2];if(!t)return i;if(r-t.colspan<n||t.colspan>1){let[o]=t.descendants(af);if(t.colspan!==1&&n===r-t.colspan){let l=Kl(this,et.tableMain),a=l.getColIds();o.colId=a[a.indexOf(o.colId)+1]}t.rowspan!==1&&(i.skipRowNum=t.rowspan-1),--o.colspan}else t.remove();return i}foreachCellInner(n){let e=this.children.iterator(),t=0,r;for(;r=e();){let[i]=r.descendants(af);if(n(i,t++))break}}checkMerge(){let n=this.next;return n!==null&&n.statics.blotName===this.statics.blotName&&n.rowId===this.rowId}optimize(n){let e=this.parent,{tableId:t}=this;e!==null&&e.statics.blotName!==et.tableBody&&this.wrap(et.tableBody,t),this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName),this.enforceAllowedChildren(),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}},Ae(cp,"blotName",et.tableRow),Ae(cp,"tagName","tr"),Ae(cp,"className","ql-table-row"),cp),z0,eg=(z0=class extends hg{static create(n){let e=super.create();return e.dataset.tableId=n,e}get tableId(){return this.domNode.dataset.tableId}insertRow(n){let e=Kl(this,et.tableMain);if(!e)return;let t=e.getColIds(),r=this.descendants(qd),i=new Set(t),o=0;for(let h of r){if(o===n)break;h.foreachCellInner(y=>{if(o+y.rowspan>n&&(y.rowspan+=1,i.delete(y.colId),y.colspan!==1)){let x=t.indexOf(y.colId);for(let w=0;w<y.colspan-1;w++)i.delete(t[x+w+1])}}),o+=1}let l=e.tableId,a=Ba(),u=this.scroll.create(et.tableRow,{tableId:l,rowId:a});for(let h of i){let y=this.scroll.create("break"),x=y.wrap("block"),w=x.wrap(et.tableCellInner,{tableId:l,rowId:a,colId:h,rowspan:1,colspan:1}),_=w.wrap(et.tableCell,{tableId:l,rowId:a,colId:h,rowspan:1,colspan:1});u.appendChild(_)}this.insertBefore(u,r[n]||null)}checkMerge(){let n=this.next;return n!==null&&n.statics.blotName===this.statics.blotName&&n.tableId===this.tableId}optimize(n){let e=this.parent;if(e!==null&&e.statics.blotName!==et.tableMain){let{tableId:t}=this;this.wrap(et.tableMain,{tableId:t})}super.optimize(n)}},Ae(z0,"blotName",et.tableBody),Ae(z0,"tagName","tbody"),z0);const yB=qe.import("parchment"),mB=qe.import("blots/block"),xB=qe.import("blots/container");var om=class extends mB{replaceWith(n,e){let t=Lg(n)?this.scroll.create(n,e):n;if(t instanceof yB.ParentBlot)if(t.statics.blotName===et.tableCellInner){try{let i=Kl(this,et.tableCellInner),o=i.formats(),l=t.formats();if(Object.keys(o).every(u=>JSON.stringify(o[u])===JSON.stringify(l[u])))return i}catch{}let r=this.parent;if(r.statics.blotName===et.tableCellInner){if(r==null||r.insertBefore(t,this.prev?null:this.next),r.statics.blotName===et.tableCellInner){let i=this;for(;i;){let o=i.next;t.appendChild(i),i=o}}else t.appendChild(this);if(r&&r.length()===0){r.remove(),r.parent.statics.blotName===et.tableCell&&r.parent.length()===0&&r.parent.remove();let i=r.parent.parent;i.statics.blotName===et.tableRow&&i.children.length===0&&i.remove()}}else r instanceof xB?r.parent.insertBefore(t,r):r==null||r.insertBefore(t,this.next),t.appendChild(this);return t}else this.moveChildren(t);return this.parent!=null&&(this.parent.insertBefore(t,this.next),this.remove()),this.attributes.copy(t),t}format(n,e){if(n===et.tableCellInner&&this.parent.statics.blotName===n&&!e)try{Kl(this,et.tableCellInner).unwrap()}catch{console.error("unwrap TableCellInner error")}else super.format(n,e)}};const wB=qe.import("blots/block/embed");var Aw=class extends wB{delta(){let n=super.delta(),e=lm(this);return e[et.tableCellInner]&&n.insert(`
|
|
340
|
+
`,{[et.tableCellInner]:e[et.tableCellInner]}),n}length(){return lm(this)[et.tableCellInner]&&(!this.next||this.next.length()<=1)?super.length()+1:super.length()}};function lm(n,e={},t=!0){return n==null||("formats"in n&&typeof n.formats=="function"&&(e={...e,...n.formats()},t&&delete e["code-token"]),n.parent==null||n.parent.statics.blotName==="scroll"||n.parent.statics.scope!==n.statics.scope)?e:lm(n.parent,e,t)}const Tw=qe.import("parchment"),CB=qe.import("blots/scroll");var _B=class extends CB{enable(n=!0){let e=qe.import(`formats/${et.tableCellInner}`),t=this.domNode.querySelectorAll(`.${e.className}`);for(let o of Array.from(t))o.setAttribute("contenteditable",String(!!n));let r=qe.import(`formats/${et.tableCaption}`),i=this.domNode.querySelectorAll(`.${r.className}`);for(let o of Array.from(i))o.setAttribute("contenteditable",String(!!n));super.enable(n)}createBlock(n,e){let t,r={};if(n[et.tableCellInner])t=et.tableCellInner;else for(let[l,a]of Object.entries(n))this.query(l,Tw.Scope.BLOCK&Tw.Scope.BLOT)!=null?t=l:r[l]=a;t===et.tableCellInner&&(r={...n},delete r[t]);let i=this.create(t||this.statics.defaultChild.blotName,t?n[t]:void 0);this.insertBefore(i,e||void 0);let o=i.length();i instanceof af&&o===0&&(o+=1);for(let[l,a]of Object.entries(r))i.formatAt(0,o,l,a);return i}},SB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">\r
|
|
341
341
|
<!-- Icon from Tabler Icons by Paweł Kuna - https://github.com/tabler/tabler-icons/blob/master/LICENSE -->\r
|
|
342
342
|
<path\r
|
|
343
343
|
fill="none"\r
|
|
@@ -348,10 +348,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
348
348
|
d="M7 3v18m3-15L7 3L4 6m16 12l-3 3l-3-3m3 3V3"\r
|
|
349
349
|
/>\r
|
|
350
350
|
</svg>\r
|
|
351
|
-
`;const
|
|
352
|
-
`),i=r.pop(),o=Kl(this,et.tableColgroup),l=o.next,a=this.scroll,u=o.split(this.offset(o));if(l){let h=l.descendants(af);if(h.length>0){let y=h[0],x=af.formats(y.domNode),w=this.scroll.create(et.tableCellInner,x),_=w.wrap(et.tableCell,x),S=_.wrap(et.tableRow,x),R=S.wrap(et.tableBody,x.tableId);o.parent.insertBefore(R,u),a=w}}for(let h of r){let y=this.scroll.create("block");y.insertAt(0,h),a.appendChild(y)}if(i){let h=this.scroll.create("block");h.appendChild(this.scroll.create("text",i)),a.appendChild(h)}}catch{console.warn("TableCol not in TableColgroup")}}},Ae(H0,"blotName",et.tableCol),Ae(H0,"tagName","col"),H0),up,Nf=(up=class extends hg{static create(n){let e=super.create(),{tableId:t,full:r,align:i}=n;return e.dataset.tableId=t,i==="right"||i==="center"?e.dataset.align=i:e.removeAttribute("date-align"),r&&(e.dataset.full=String(r)),e.setAttribute("cellpadding","0"),e.setAttribute("cellspacing","0"),e}constructor(n,e,t){super(n,e),this.scroll=n,this.updateAlign()}colWidthFillTable(){if(this.full){Object.assign(this.domNode.style,{width:null});return}let n=this.getCols();if(!n)return;let e=n.reduce((t,r)=>r.width+t,0);if(!(e===0||Number.isNaN(e)))return this.domNode.style.width=`${e}px`,e}get tableId(){return this.domNode.dataset.tableId}get full(){return Object.hasOwn(this.domNode.dataset,"full")}set full(n){n?this.domNode.dataset.full="true":this.domNode.removeAttribute("data-full"),this.colWidthFillTable()}get align(){return this.domNode.dataset.align||""}set align(n){n==="right"||n==="center"?this.domNode.dataset.align=n:this.domNode.removeAttribute("data-align"),this.updateAlign()}setFull(){if(this.full)return;let n=this.getCols();if(n.length===0)return;let e=Math.floor(this.domNode.getBoundingClientRect().width);for(let t of n){let r=t.width/e*100;t.full=!0,t.width=r}}cancelFull(){if(!this.full)return;let n=this.getCols();if(n.length===0)return;let e=Math.floor(this.domNode.getBoundingClientRect().width);for(let t of n)t.full=!1,t.width=Math.max(t.width/100*e,Ss.colMinWidthPx)}updateAlign(){let n=this.align,e={marginLeft:null,marginRight:null};switch(n){case"center":e.marginLeft="auto",e.marginRight="auto";break;case"":case"left":e.marginRight="auto";break;case"right":e.marginLeft="auto";break}Object.assign(this.domNode.style,e)}getRows(){return Array.from(this.domNode.querySelectorAll(`${qd.tagName}`)).map(n=>this.scroll.find(n)).filter(Boolean)}getRowIds(){return this.getRows().map(n=>n.rowId)}getCols(){return this.descendants(Ig)}getColIds(){return this.getCols().map(n=>n.colId)}checkMerge(){let n=this.next;return n!==null&&n.statics.blotName===this.statics.blotName&&n.domNode.dataset.tableId===this.tableId}optimize(n){let e=this.parent;e!==null&&e.statics.blotName!==et.tableWrapper&&this.wrap(et.tableWrapper,this.tableId),super.optimize(n),this.mergeRow()}mergeRow(){if(!this.parent)return;let n=this.getRows(),e={};for(let t of n)e[t.rowId]||(e[t.rowId]=[]),e[t.rowId].push(t);for(let t of Object.values(e))for(let r=1;r<t.length;r++){let i=t[r];i.moveChildren(t[0]),i.remove()}}checkEmptyCol(n){if(n){let e=this.getRows().length,t=this.getCols(),r=this.descendants(af);for(let i of r)if(i.colspan>1&&i.rowspan>=e){let o=t.findIndex(a=>a.colId===i.colId),l=t[o];for(let a=o+1;a<o+i.colspan;a++)t[a].remove(),l.width+=t[a].width;i.colspan=1}}}checkEmptyRow(n){let e=this.getRows(),t=new Set(e.map(r=>r.rowId));for(let r=e.length-1;r>=0;r--){let i=e[r];if(n){if(i.children.length===0){for(let o=1,l=r-1;l>=0;l--,o++)e[l].foreachCellInner(u=>{if(u.rowspan>o){--u.rowspan;let h=new Set(u.emptyRow);h.delete(i.rowId),u.emptyRow=Array.from(h)}});i.remove()}}else{if(i.children.length===0&&i.prev){let o=i.prev;for(;o&&o.children.length===0;)o=o.prev;o.foreachCellInner(l=>{let a=new Set(l.emptyRow);a.has(i.rowId)||(l.emptyRow=[i.rowId,...a])})}i.foreachCellInner(o=>{for(let l of o.emptyRow)t.has(l)||i.parent.insertBefore(this.scroll.create(et.tableRow,{tableId:this.tableId,rowId:l}),i.next)})}}}sortMergeChildren(){let n={[et.tableCaption]:[],[et.tableColgroup]:[],[et.tableBody]:[]};this.children.forEach(u=>{n[u.statics.blotName]&&n[u.statics.blotName].push(u)});for(let u of Object.values(n))for(let h=1;h<u.length;h++)u[h].moveChildren(u[0]);let e=n[et.tableCaption][0],t=n[et.tableColgroup][0],r=n[et.tableBody][0],i=e&&this.children.head!==e,o=t&&e&&e.next!==t,l=t&&!e&&this.children.head!==t,a=r&&this.children.tail!==r;if(i||o||l||a){let u=this.clone();e&&u.appendChild(e),t&&u.appendChild(t),r&&u.appendChild(r),this.children.forEach(h=>h.remove()),u.moveChildren(this)}}},Ae(up,"blotName",et.tableMain),Ae(up,"tagName","table"),Ae(up,"className","ql-table"),up),W0,Tg=(W0=class extends hg{static create(n){let e=super.create();return e.dataset.tableId=n.tableId,n.full&&(e.dataset.full=String(n.full)),n.align&&n.align!=="left"&&(e.dataset.align=n.align),e.setAttribute("contenteditable","false"),e}get tableId(){return this.domNode.dataset.tableId}get full(){return Object.hasOwn(this.domNode.dataset,"full")}set full(n){n?this.domNode.dataset.full="true":this.domNode.removeAttribute("data-full"),this.parent&&this.parent instanceof Nf&&(this.parent.full=n)}get align(){return this.domNode.dataset.align||""}set align(n){n==="right"||n==="center"?this.domNode.dataset.align=n:this.domNode.removeAttribute("data-align")}findCol(n){let e=this.children.iterator(),t=0,r;for(;(r=e())&&t!==n;)t++;return r}insertColByIndex(n,e){let t=this.parent;if(!(t instanceof Nf))throw TypeError("TableColgroupFormat should be child of TableFormat");let r=this.findCol(n),i=this.scroll.create(et.tableCol,e);if(t.full){let o=this.children.iterator(),l;for(;l=o();)if(l.width-i.width>=Ss.colMinWidthPre){l.width-=i.width;break}}this.insertBefore(i,r)}removeColByIndex(n){let e=this.parent;if(!(e instanceof Nf))throw TypeError("TableColgroupFormat should be child of TableMainFormat");let t=this.findCol(n);t&&(e.full&&(t.next?t.next.width+=t.width:t.prev&&(t.prev.width+=t.width)),t.remove(),e.colWidthFillTable())}checkMerge(){let n=this.next,e=this.parent;return e instanceof Nf&&!e.full&&e.colWidthFillTable(),n!==null&&n.statics.blotName===this.statics.blotName&&n.tableId===this.tableId}optimize(n){let e=this.parent,{tableId:t,full:r,align:i}=this;e!=null&&e.statics.blotName!==et.tableMain&&this.wrap(et.tableMain,{tableId:t,full:r,align:i});let o=Kl(this,et.tableMain);o.align=i,super.optimize(n)}},Ae(W0,"blotName",et.tableColgroup),Ae(W0,"tagName","colgroup"),W0);const EB=qe.import("parchment");var fp,jg=(fp=class extends hg{constructor(e,t,r){super(e,t);Ae(this,"insertLineAround",()=>{(!this.prev||!this.isBlockLine(this.prev))&&this.parent.insertBefore(this.scroll.create("block"),this),(!this.next||!this.isBlockLine(this.next))&&this.parent.insertBefore(this.scroll.create("block"),this.next)});this.scroll=e,this.scroll.emitter.on(qe.events.TEXT_CHANGE,this.insertLineAround)}static create(e){let t=super.create();return t.dataset.tableId=e,t.addEventListener("dragstart",r=>{r.preventDefault(),r.stopPropagation()},!0),t.addEventListener("drop",r=>{r.preventDefault()}),t.addEventListener("dragover",r=>{r.preventDefault(),r.dataTransfer.dropEffect="none"}),t.setAttribute("contenteditable","false"),t}get tableId(){return this.domNode.dataset.tableId}checkMerge(){let e=this.next;return e!==null&&e.statics.blotName===this.statics.blotName&&e.tableId===this.tableId}deleteAt(e,t){super.deleteAt(e,t);let r=this.descendants(eg),i=this.descendants(Tg);(r.length===0||i.length===0)&&this.remove()}remove(){super.remove(),this.scroll.emitter.off(qe.events.TEXT_CHANGE,this.insertLineAround)}isBlockLine(e){return e instanceof EB.BlockBlot||new Set(["list-container","code-block-container"]).has(e.statics.blotName)}},Ae(fp,"blotName",et.tableWrapper),Ae(fp,"tagName","div"),Ae(fp,"className","ql-table-wrapper"),fp);function Qm(n){let[e]=vF(n,eg);return e?{body:e,rect:e.domNode.getBoundingClientRect()}:{body:null,rect:null}}const ap=qe.import("delta"),AB=qe.import("modules/clipboard");function TB(n){let e=Number.parseFloat(n.getAttribute("width")||String(Ss.colDefaultWidth));if(Number.isNaN(e)){let t=n.style.width;e=t?Number.parseFloat(t):n.offsetWidth}return e}function RB(n,e){let t=Array(e).fill(Ss.colDefaultWidth),r=Array.from(n.querySelectorAll("tr"));for(let i of r){let o=Array.from(i.querySelectorAll("td"));for(let[l,a]of o.entries())if(l<e){let u=TB(a);t[l]=u||t[l]}else break}return t}var IB=class extends AB{constructor(e,t){super(e,t);Ae(this,"tableId",Ba());Ae(this,"rowId",Ba());Ae(this,"colIds",[]);Ae(this,"rowspanCount",[]);Ae(this,"cellCount",0);Ae(this,"colCount",0);this.quill=e,this.addMatcher("table",this.matchTable.bind(this)),this.addMatcher("tbody",this.matchTbody.bind(this)),this.addMatcher("colgroup",this.matchColgroup.bind(this)),this.addMatcher("col",this.matchCol.bind(this)),this.addMatcher("tr",this.matchTr.bind(this)),this.addMatcher("td",this.matchTd.bind(this)),this.addMatcher("th",this.matchTd.bind(this)),this.addMatcher("caption",this.matchCaption.bind(this)),this.addMatcher(Node.ELEMENT_NODE,this.matchTdAttributor.bind(this))}matchTable(e,t){if(t.ops.length===0)return t;let r=[],i=[],o=-1;for(let u=0;u<t.ops.length;u++){let{attributes:h,insert:y}=t.ops[u];if(!I0(y)&&h&&!h[et.tableCellInner]&&!h[et.tableCaption]){t.ops.splice(u,1),--u;continue}let{table:x,[et.tableCell]:w,..._}=h||{},S=I0(y)&&y[et.tableCol];S?i.push({insert:y}):r.push({attributes:_,insert:y}),!(_!=null&&_[et.tableCellInner])&&!(_!=null&&_[et.tableCaption])&&!S&&Lg(y)&&y.trim().length>0&&(o=u)}let l=RB(e,this.colIds.length),a=l.reduce((u,h,y)=>(i[y]?u.push(i[y]):u.push({insert:{[et.tableCol]:{tableId:this.tableId,colId:this.colIds[y],width:h,full:!1}}}),u),[]);return r.splice(o+1,0,...a),this.tableId=Ba(),this.colIds=[],this.rowspanCount=[],this.cellCount=0,this.colCount=0,new ap(r)}matchTbody(e,t){var o;let r=e.style.backgroundColor;if(r){for(let l of t.ops)if((o=l.attributes)!=null&&o[et.tableCellInner]){let{style:a,...u}=l.attributes[et.tableCellInner],h=gv(a||"");h.backgroundColor||(h.backgroundColor=r,l.attributes[et.tableCellInner]={...u,style:im(h)})}}let i=[];for(let l=t.ops.length-1;l>=0;l--){let a=t.ops[l];a.attributes&&(a.attributes[et.tableCellInner]?a.attributes[et.tableCellInner].rowspan===1?i=[]:i.length>0&&(a.attributes[et.tableCellInner].emptyRow||(a.attributes[et.tableCellInner].emptyRow=[]),a.attributes[et.tableCellInner].emptyRow.push(...i)):(i=[],i.push(Ba())))}return t}matchColgroup(e,t){let r=[];for(let i=0;i<t.ops.length;i++){let o=t.ops[i];o&&I0(o.insert)&&o.insert[et.tableCol]&&r.push(o)}return new ap(r)}matchCol(e,t){let r=Number(e.getAttribute("span")||1);Number.isNaN(r)&&(r=1);let i=new ap;for(let o=0;o<r;o++)this.colIds[this.colCount]=Ba(),i.insert({[et.tableCol]:Object.assign(Ig.value(e),{tableId:this.tableId,colId:this.colIds[this.colCount]})}),this.colCount+=1;return i}matchTr(e,t){this.rowId=Ba(),this.cellCount=0;for(let[r,i]of this.rowspanCount.entries())i.rowspan>0&&--i.rowspan,i.rowspan<=0&&(this.rowspanCount[r]={rowspan:0,colspan:0});for(let r of t.ops)if(r.attributes){let{background:i,[et.tableCellInner]:o}=r.attributes;if(o&&i){let{style:l=""}=o,a=gv(l);a.backgroundColor=i,r.attributes[et.tableCellInner].style=im(a)}}return t}matchTd(e,t){let r=e,i=Df.formats(r);if(!this.colIds[this.cellCount]||!this.rowspanCount[this.cellCount])for(let u=this.cellCount;u>=0;u--)this.colIds[u]||(this.colIds[u]=Ba()),this.rowspanCount[u]||(this.rowspanCount[u]={rowspan:0,colspan:0});for(let u=this.cellCount;u<this.rowspanCount.length;u++){let{rowspan:h,colspan:y}=this.rowspanCount[u];if(h===0)break;this.cellCount+=y}i.rowspan>1&&(this.rowspanCount[this.cellCount]={rowspan:i.rowspan,colspan:i.colspan});let o=this.colIds[this.cellCount];this.cellCount+=i.colspan;let l=Object.assign(i,{tableId:this.tableId,rowId:this.rowId,colId:o});r.style.border==="none"&&(l.style=l.style.replaceAll(/border-(top|right|bottom|left)-style:none;?/g,""));let a=[];for(let u of t.ops){let{attributes:h={},...y}=u,{[et.tableCell]:x,...w}=h;a.push({...y,attributes:{...w,[et.tableCellInner]:l}})}return(a.length<=0||!Lg(a[a.length-1].insert)||!a[a.length-1].insert.endsWith(`
|
|
351
|
+
`;const EB=qe.import("parchment"),AB=qe.import("blots/inline"),TB=qe.import("blots/text");var e1,J0=(e1=class extends om{static create(n){let{tableId:e}=n,t=super.create();return t.dataset.tableId=e,n.side==="bottom"&&(t.style.captionSide="bottom"),t}static formats(n){let{tableId:e}=n.dataset;return{tableId:String(e),side:n.style.captionSide==="bottom"?"bottom":"top"}}constructor(n,e,t){super(n,e),e.setAttribute("contenteditable",String(n.isEnabled())),this.attachUI(this.createUI()),this.domNode.addEventListener("mouseenter",()=>{this.scroll.isEnabled()&&(this.uiNode.style.display="flex")}),this.domNode.addEventListener("mouseleave",()=>{this.scroll.isEnabled()&&(this.uiNode.style.display="none")}),this.uiNode.style.display="none"}createUI(){let n=document.createElement("i");return n.classList.add("ql-table-caption--switch"),n.innerHTML=SB,n.addEventListener("click",()=>{this.scroll.isEnabled()&&(this.side=this.side==="top"?"bottom":"top")}),n}get tableId(){return this.domNode.dataset.tableId}set side(n){this.domNode.style.captionSide=n==="bottom"?"bottom":"top"}get side(){return this.domNode.style.captionSide==="bottom"?"bottom":"top"}format(n,e){(!this.scroll.query(n,EB.Scope.BLOCK_BLOT)||n===this.statics.blotName)&&super.format(n,e)}checkMerge(){let n=this.next;return n!==null&&n.statics.blotName===this.statics.blotName&&n.tableId===this.tableId}optimize(n){let e=this.parent;if(e!==null&&e.statics.blotName!==et.tableMain){let{tableId:t}=this;this.wrap(et.tableMain,{tableId:t})}this.children.length===0?this.remove():(super.optimize(n),this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove()))}},Ae(e1,"blotName",et.tableCaption),Ae(e1,"tagName","caption"),Ae(e1,"className","ql-table-caption"),Ae(e1,"allowedChildren",[AB,TB]),e1),Xh,Df=(Xh=class extends hg{static isAllowStyle(n){let e=I1(n);for(let t of this.allowStyle)if(e.startsWith(I1(t)))return!0;return!1}static create(n){let{tableId:e,rowId:t,colId:r,rowspan:i,colspan:o,style:l,emptyRow:a,tag:u="td"}=n,h=document.createElement(u);h.classList.add(...AF(this.className)),h.dataset.tableId=e,h.dataset.rowId=t,h.dataset.colId=r,h.setAttribute("rowspan",String(ig(i))),h.setAttribute("colspan",String(ig(o))),l&&(h.style.cssText=l);try{a&&(h.dataset.emptyRow=JSON.stringify(a))}catch{}return h}static formats(n){let{tableId:e,rowId:t,colId:r,emptyRow:i}=n.dataset,o=Number(n.getAttribute("rowspan")),l=Number(n.getAttribute("colspan")),a={tableId:e,rowId:t,colId:r,rowspan:ig(o),colspan:ig(l),tag:n.tagName.toLowerCase()},u={};for(let y=0;y<n.style.length;y++){let x=n.style[y],w=n.style[x];this.isAllowStyle(String(x))&&!["initial","inherit"].includes(w)&&(u[x]=w)}let h=Object.entries(u);h.length>0&&(a.style=h.map(([y,x])=>`${y}: ${x}`).join(";"));try{i&&(a.emptyRow=JSON.parse(i))}catch{}return a}isChildHeadTableCellInner(){let n=this.children.head;return n&&n.statics.blotName===et.tableCellInner}setFormatValue(n,e){if(this.statics.allowAttrs.has(n)||this.statics.allowDataAttrs.has(n)){let r=n;this.statics.allowDataAttrs.has(n)&&(r=`data-${n}`),e?this.domNode.setAttribute(r,e):this.domNode.removeAttribute(r)}else this.statics.isAllowStyle(n)&&(Object.assign(this.domNode.style,{[n]:e}),n.startsWith("border")&&this.setStyleBoder(n,e));let t=this.children.head;this.isChildHeadTableCellInner()&&this.domNode.style.cssText&&this.domNode.style.cssText!==t.domNode.dataset.style&&(t.domNode.dataset.style=this.domNode.style.cssText)}setStyleBoder(n,e){let t=e||null;if(!(!["left","right","top","bottom"].some(l=>n.includes(l))&&n.startsWith("border-")))return;let i=this.getNearByCell("left").map(l=>l.descendant(af,0)[0]).filter(Boolean);for(let l of i)l.setFormatValue(n.replace("border-","border-right-"),t,!0);let o=this.getNearByCell("top").map(l=>l.descendant(af,0)[0]).filter(Boolean);for(let l of o)l.setFormatValue(n.replace("border-","border-bottom-"),t,!0)}getNearByCell(n){let e=[];try{let t=Kl(this,et.tableMain);e.push(...t.getColIds())}catch(t){console.error(`Cell is not in table! ${t}`)}if(e.length===0)return[];if(n==="left"){let t=new Set,r=this.parent;for(let i=0;i<this.rowspan&&r instanceof qd;i++){let o=r.children.iterator(),l=null;for(;l=o();){let a=e.indexOf(l.colId)+l.colspan;this.colId===e[a]&&t.add(l)}r=r.next}return Array.from(t)}else if(n==="top"){if(!(this.parent instanceof qd)||!this.parent.prev)return[];let t=new Set,r=this.getColumnIndex(),i=r+this.colspan,o=new Set(e.filter((u,h)=>h>=r&&h<i)),l=1,a=this.parent.prev;for(;a;){let u=!1,h=a.children.iterator(),y=null,x=0;for(;y=h();)o.has(y.colId)&&y.rowspan>=l&&(t.add(y),o.delete(y.colId)),x+=y.colspan,y.rowspan>=l&&(u=!0);if(!u&&x===e.length)break;a=a.prev,l+=1}return Array.from(t)}return[]}get tableId(){return this.domNode.dataset.tableId}get rowId(){return this.domNode.dataset.rowId}get colId(){return this.domNode.dataset.colId}get rowspan(){return Number(this.domNode.getAttribute("rowspan"))}get colspan(){return Number(this.domNode.getAttribute("colspan"))}get emptyRow(){try{return JSON.parse(this.domNode.dataset.emptyRow)}catch{return[]}}getColumnIndex(){return Kl(this,et.tableMain).getColIds().indexOf(this.colId)}getCellInner(){return this.children.head}convertTableCell(){let n=this.statics.formats(this.domNode),e=n.tag==="td"?"th":"td",t=this.children.head;this.isChildHeadTableCellInner()&&t.domNode.dataset.tag!==e&&(t.domNode.dataset.tag=e),this.replaceWith(et.tableCell,{...n,tag:e})}checkMerge(){let{colId:n,rowId:e,colspan:t,rowspan:r}=this,i=this.next;return i!==null&&i.statics.blotName===this.statics.blotName&&i.rowId===e&&i.colId===n&&i.colspan===t&&i.rowspan===r}optimize(n){let e=this.parent,{tableId:t,rowId:r}=this;if(e!==null&&e.statics.blotName!==et.tableRow&&this.wrap(et.tableRow,{tableId:t,rowId:r}),this.emptyRow.length>0)for(let i of this.emptyRow)this.parent.parent.insertBefore(this.scroll.create(et.tableRow,{tableId:this.tableId,rowId:i}),this.parent.next);super.optimize(n)}},Ae(Xh,"blotName",et.tableCell),Ae(Xh,"tagName","td"),Ae(Xh,"className","ql-table-cell"),Ae(Xh,"allowDataAttrs",new Set(["table-id","row-id","col-id","empty-row"])),Ae(Xh,"allowAttrs",new Set(["rowspan","colspan"])),Ae(Xh,"allowStyle",new Set(["background-color","border","height"])),Xh);const RB=qe.import("blots/block/embed");var H0,Ig=(H0=class extends RB{static validWidth(n,e){let t=Number.parseFloat(String(n));return Number.isNaN(t)&&(t=Ss[e?"colMinWidthPre":"colMinWidthPx"]),`${t}${e?"%":"px"}`}static create(n){let{width:e,tableId:t,colId:r,full:i,align:o}=n,l=super.create();return l.setAttribute("width",this.validWidth(e,!!i)),i&&(l.dataset.full=String(i)),o&&o!=="left"&&(l.dataset.align=o),l.dataset.tableId=t,l.dataset.colId=r,l}static value(n){let{tableId:e,colId:t}=n.dataset,r=n.getAttribute("width")||String(Ss.colDefaultWidth),i=n.dataset.align,o=Object.hasOwn(n.dataset,"full"),l={tableId:String(e),colId:String(t),full:o,width:Number.parseFloat(r)};return i&&(l.align=i),l}get width(){let n=this.domNode.getAttribute("width");if(!n){if(n=this.domNode.getBoundingClientRect().width,this.full){let e=this.domNode.closest("table");return e?n/100*e.getBoundingClientRect().width:Ss[this.full?"colMinWidthPre":"colMinWidthPx"]}return n}return Number.parseFloat(String(n))}set width(n){let e=Number.parseFloat(String(n));Number.isNaN(e)&&(e=Ss[this.full?"colMinWidthPre":"colMinWidthPx"]),this.domNode.setAttribute("width",this.statics.validWidth(e,!!this.full))}get tableId(){return this.domNode.dataset.tableId}get colId(){return this.domNode.dataset.colId}get full(){return Object.hasOwn(this.domNode.dataset,"full")}set full(n){n?this.domNode.dataset.full="true":this.domNode.removeAttribute("data-full")}get align(){return this.domNode.dataset.align||""}set align(n){n==="right"||n==="center"?this.domNode.dataset.align=n:this.domNode.removeAttribute("data-align")}checkMerge(){let n=this.next,{tableId:e,colId:t}=this;return n!==null&&n.statics.blotName===this.statics.blotName&&n.tableId===e&&n.colId===t}optimize(n){let e=this.parent;if(e!=null&&e.statics.blotName!==et.tableColgroup){let r=this.statics.value(this.domNode);this.wrap(et.tableColgroup,r)}let t=Kl(this,et.tableColgroup);t.align=this.align,this.next!=null&&this.checkMerge()&&this.next.remove(),super.optimize(n);try{let r=Kl(this,et.tableColgroup),i=!0;r.children.forEach(o=>{i&&(i=o.full)}),r.full=i}catch{}}insertAt(n,e,t){if(t!=null){super.insertAt(n,e,t);return}try{let r=e.split(`
|
|
352
|
+
`),i=r.pop(),o=Kl(this,et.tableColgroup),l=o.next,a=this.scroll,u=o.split(this.offset(o));if(l){let h=l.descendants(af);if(h.length>0){let y=h[0],x=af.formats(y.domNode),w=this.scroll.create(et.tableCellInner,x),_=w.wrap(et.tableCell,x),S=_.wrap(et.tableRow,x),R=S.wrap(et.tableBody,x.tableId);o.parent.insertBefore(R,u),a=w}}for(let h of r){let y=this.scroll.create("block");y.insertAt(0,h),a.appendChild(y)}if(i){let h=this.scroll.create("block");h.appendChild(this.scroll.create("text",i)),a.appendChild(h)}}catch{console.warn("TableCol not in TableColgroup")}}},Ae(H0,"blotName",et.tableCol),Ae(H0,"tagName","col"),H0),up,Nf=(up=class extends hg{static create(n){let e=super.create(),{tableId:t,full:r,align:i}=n;return e.dataset.tableId=t,i==="right"||i==="center"?e.dataset.align=i:e.removeAttribute("date-align"),r&&(e.dataset.full=String(r)),e.setAttribute("cellpadding","0"),e.setAttribute("cellspacing","0"),e}constructor(n,e,t){super(n,e),this.scroll=n,this.updateAlign()}colWidthFillTable(){if(this.full){Object.assign(this.domNode.style,{width:null});return}let n=this.getCols();if(!n)return;let e=n.reduce((t,r)=>r.width+t,0);if(!(e===0||Number.isNaN(e)))return this.domNode.style.width=`${e}px`,e}get tableId(){return this.domNode.dataset.tableId}get full(){return Object.hasOwn(this.domNode.dataset,"full")}set full(n){n?this.domNode.dataset.full="true":this.domNode.removeAttribute("data-full"),this.colWidthFillTable()}get align(){return this.domNode.dataset.align||""}set align(n){n==="right"||n==="center"?this.domNode.dataset.align=n:this.domNode.removeAttribute("data-align"),this.updateAlign()}setFull(){if(this.full)return;let n=this.getCols();if(n.length===0)return;let e=Math.floor(this.domNode.getBoundingClientRect().width);for(let t of n){let r=t.width/e*100;t.full=!0,t.width=r}}cancelFull(){if(!this.full)return;let n=this.getCols();if(n.length===0)return;let e=Math.floor(this.domNode.getBoundingClientRect().width);for(let t of n)t.full=!1,t.width=Math.max(t.width/100*e,Ss.colMinWidthPx)}updateAlign(){let n=this.align,e={marginLeft:null,marginRight:null};switch(n){case"center":e.marginLeft="auto",e.marginRight="auto";break;case"":case"left":e.marginRight="auto";break;case"right":e.marginLeft="auto";break}Object.assign(this.domNode.style,e)}getRows(){return Array.from(this.domNode.querySelectorAll(`${qd.tagName}`)).map(n=>this.scroll.find(n)).filter(Boolean)}getRowIds(){return this.getRows().map(n=>n.rowId)}getCols(){return this.descendants(Ig)}getColIds(){return this.getCols().map(n=>n.colId)}checkMerge(){let n=this.next;return n!==null&&n.statics.blotName===this.statics.blotName&&n.domNode.dataset.tableId===this.tableId}optimize(n){let e=this.parent;e!==null&&e.statics.blotName!==et.tableWrapper&&this.wrap(et.tableWrapper,this.tableId),super.optimize(n),this.mergeRow()}mergeRow(){if(!this.parent)return;let n=this.getRows(),e={};for(let t of n)e[t.rowId]||(e[t.rowId]=[]),e[t.rowId].push(t);for(let t of Object.values(e))for(let r=1;r<t.length;r++){let i=t[r];i.moveChildren(t[0]),i.remove()}}checkEmptyCol(n){if(n){let e=this.getRows().length,t=this.getCols(),r=this.descendants(af);for(let i of r)if(i.colspan>1&&i.rowspan>=e){let o=t.findIndex(a=>a.colId===i.colId),l=t[o];for(let a=o+1;a<o+i.colspan;a++)t[a].remove(),l.width+=t[a].width;i.colspan=1}}}checkEmptyRow(n){let e=this.getRows(),t=new Set(e.map(r=>r.rowId));for(let r=e.length-1;r>=0;r--){let i=e[r];if(n){if(i.children.length===0){for(let o=1,l=r-1;l>=0;l--,o++)e[l].foreachCellInner(u=>{if(u.rowspan>o){--u.rowspan;let h=new Set(u.emptyRow);h.delete(i.rowId),u.emptyRow=Array.from(h)}});i.remove()}}else{if(i.children.length===0&&i.prev){let o=i.prev;for(;o&&o.children.length===0;)o=o.prev;o.foreachCellInner(l=>{let a=new Set(l.emptyRow);a.has(i.rowId)||(l.emptyRow=[i.rowId,...a])})}i.foreachCellInner(o=>{for(let l of o.emptyRow)t.has(l)||i.parent.insertBefore(this.scroll.create(et.tableRow,{tableId:this.tableId,rowId:l}),i.next)})}}}sortMergeChildren(){let n={[et.tableCaption]:[],[et.tableColgroup]:[],[et.tableBody]:[]};this.children.forEach(u=>{n[u.statics.blotName]&&n[u.statics.blotName].push(u)});for(let u of Object.values(n))for(let h=1;h<u.length;h++)u[h].moveChildren(u[0]);let e=n[et.tableCaption][0],t=n[et.tableColgroup][0],r=n[et.tableBody][0],i=e&&this.children.head!==e,o=t&&e&&e.next!==t,l=t&&!e&&this.children.head!==t,a=r&&this.children.tail!==r;if(i||o||l||a){let u=this.clone();e&&u.appendChild(e),t&&u.appendChild(t),r&&u.appendChild(r),this.children.forEach(h=>h.remove()),u.moveChildren(this)}}},Ae(up,"blotName",et.tableMain),Ae(up,"tagName","table"),Ae(up,"className","ql-table"),up),W0,Tg=(W0=class extends hg{static create(n){let e=super.create();return e.dataset.tableId=n.tableId,n.full&&(e.dataset.full=String(n.full)),n.align&&n.align!=="left"&&(e.dataset.align=n.align),e.setAttribute("contenteditable","false"),e}get tableId(){return this.domNode.dataset.tableId}get full(){return Object.hasOwn(this.domNode.dataset,"full")}set full(n){n?this.domNode.dataset.full="true":this.domNode.removeAttribute("data-full"),this.parent&&this.parent instanceof Nf&&(this.parent.full=n)}get align(){return this.domNode.dataset.align||""}set align(n){n==="right"||n==="center"?this.domNode.dataset.align=n:this.domNode.removeAttribute("data-align")}findCol(n){let e=this.children.iterator(),t=0,r;for(;(r=e())&&t!==n;)t++;return r}insertColByIndex(n,e){let t=this.parent;if(!(t instanceof Nf))throw TypeError("TableColgroupFormat should be child of TableFormat");let r=this.findCol(n),i=this.scroll.create(et.tableCol,e);if(t.full){let o=this.children.iterator(),l;for(;l=o();)if(l.width-i.width>=Ss.colMinWidthPre){l.width-=i.width;break}}this.insertBefore(i,r)}removeColByIndex(n){let e=this.parent;if(!(e instanceof Nf))throw TypeError("TableColgroupFormat should be child of TableMainFormat");let t=this.findCol(n);t&&(e.full&&(t.next?t.next.width+=t.width:t.prev&&(t.prev.width+=t.width)),t.remove(),e.colWidthFillTable())}checkMerge(){let n=this.next,e=this.parent;return e instanceof Nf&&!e.full&&e.colWidthFillTable(),n!==null&&n.statics.blotName===this.statics.blotName&&n.tableId===this.tableId}optimize(n){let e=this.parent,{tableId:t,full:r,align:i}=this;e!=null&&e.statics.blotName!==et.tableMain&&this.wrap(et.tableMain,{tableId:t,full:r,align:i});let o=Kl(this,et.tableMain);o.align=i,super.optimize(n)}},Ae(W0,"blotName",et.tableColgroup),Ae(W0,"tagName","colgroup"),W0);const IB=qe.import("parchment");var fp,jg=(fp=class extends hg{constructor(e,t,r){super(e,t);Ae(this,"insertLineAround",()=>{(!this.prev||!this.isBlockLine(this.prev))&&this.parent.insertBefore(this.scroll.create("block"),this),(!this.next||!this.isBlockLine(this.next))&&this.parent.insertBefore(this.scroll.create("block"),this.next)});this.scroll=e,this.scroll.emitter.on(qe.events.TEXT_CHANGE,this.insertLineAround)}static create(e){let t=super.create();return t.dataset.tableId=e,t.addEventListener("dragstart",r=>{r.preventDefault(),r.stopPropagation()},!0),t.addEventListener("drop",r=>{r.preventDefault()}),t.addEventListener("dragover",r=>{r.preventDefault(),r.dataTransfer.dropEffect="none"}),t.setAttribute("contenteditable","false"),t}get tableId(){return this.domNode.dataset.tableId}checkMerge(){let e=this.next;return e!==null&&e.statics.blotName===this.statics.blotName&&e.tableId===this.tableId}deleteAt(e,t){super.deleteAt(e,t);let r=this.descendants(eg),i=this.descendants(Tg);(r.length===0||i.length===0)&&this.remove()}remove(){super.remove(),this.scroll.emitter.off(qe.events.TEXT_CHANGE,this.insertLineAround)}isBlockLine(e){return e instanceof IB.BlockBlot||new Set(["list-container","code-block-container"]).has(e.statics.blotName)}},Ae(fp,"blotName",et.tableWrapper),Ae(fp,"tagName","div"),Ae(fp,"className","ql-table-wrapper"),fp);function Qm(n){let[e]=xF(n,eg);return e?{body:e,rect:e.domNode.getBoundingClientRect()}:{body:null,rect:null}}const ap=qe.import("delta"),kB=qe.import("modules/clipboard");function MB(n){let e=Number.parseFloat(n.getAttribute("width")||String(Ss.colDefaultWidth));if(Number.isNaN(e)){let t=n.style.width;e=t?Number.parseFloat(t):n.offsetWidth}return e}function LB(n,e){let t=Array(e).fill(Ss.colDefaultWidth),r=Array.from(n.querySelectorAll("tr"));for(let i of r){let o=Array.from(i.querySelectorAll("td"));for(let[l,a]of o.entries())if(l<e){let u=MB(a);t[l]=u||t[l]}else break}return t}var OB=class extends kB{constructor(e,t){super(e,t);Ae(this,"tableId",Ba());Ae(this,"rowId",Ba());Ae(this,"colIds",[]);Ae(this,"rowspanCount",[]);Ae(this,"cellCount",0);Ae(this,"colCount",0);this.quill=e,this.addMatcher("table",this.matchTable.bind(this)),this.addMatcher("tbody",this.matchTbody.bind(this)),this.addMatcher("colgroup",this.matchColgroup.bind(this)),this.addMatcher("col",this.matchCol.bind(this)),this.addMatcher("tr",this.matchTr.bind(this)),this.addMatcher("td",this.matchTd.bind(this)),this.addMatcher("th",this.matchTd.bind(this)),this.addMatcher("caption",this.matchCaption.bind(this)),this.addMatcher(Node.ELEMENT_NODE,this.matchTdAttributor.bind(this))}matchTable(e,t){if(t.ops.length===0)return t;let r=[],i=[],o=-1;for(let u=0;u<t.ops.length;u++){let{attributes:h,insert:y}=t.ops[u];if(!I0(y)&&h&&!h[et.tableCellInner]&&!h[et.tableCaption]){t.ops.splice(u,1),--u;continue}let{table:x,[et.tableCell]:w,..._}=h||{},S=I0(y)&&y[et.tableCol];S?i.push({insert:y}):r.push({attributes:_,insert:y}),!(_!=null&&_[et.tableCellInner])&&!(_!=null&&_[et.tableCaption])&&!S&&Lg(y)&&y.trim().length>0&&(o=u)}let l=LB(e,this.colIds.length),a=l.reduce((u,h,y)=>(i[y]?u.push(i[y]):u.push({insert:{[et.tableCol]:{tableId:this.tableId,colId:this.colIds[y],width:h,full:!1}}}),u),[]);return r.splice(o+1,0,...a),this.tableId=Ba(),this.colIds=[],this.rowspanCount=[],this.cellCount=0,this.colCount=0,new ap(r)}matchTbody(e,t){var o;let r=e.style.backgroundColor;if(r){for(let l of t.ops)if((o=l.attributes)!=null&&o[et.tableCellInner]){let{style:a,...u}=l.attributes[et.tableCellInner],h=gv(a||"");h.backgroundColor||(h.backgroundColor=r,l.attributes[et.tableCellInner]={...u,style:im(h)})}}let i=[];for(let l=t.ops.length-1;l>=0;l--){let a=t.ops[l];a.attributes&&(a.attributes[et.tableCellInner]?a.attributes[et.tableCellInner].rowspan===1?i=[]:i.length>0&&(a.attributes[et.tableCellInner].emptyRow||(a.attributes[et.tableCellInner].emptyRow=[]),a.attributes[et.tableCellInner].emptyRow.push(...i)):(i=[],i.push(Ba())))}return t}matchColgroup(e,t){let r=[];for(let i=0;i<t.ops.length;i++){let o=t.ops[i];o&&I0(o.insert)&&o.insert[et.tableCol]&&r.push(o)}return new ap(r)}matchCol(e,t){let r=Number(e.getAttribute("span")||1);Number.isNaN(r)&&(r=1);let i=new ap;for(let o=0;o<r;o++)this.colIds[this.colCount]=Ba(),i.insert({[et.tableCol]:Object.assign(Ig.value(e),{tableId:this.tableId,colId:this.colIds[this.colCount]})}),this.colCount+=1;return i}matchTr(e,t){this.rowId=Ba(),this.cellCount=0;for(let[r,i]of this.rowspanCount.entries())i.rowspan>0&&--i.rowspan,i.rowspan<=0&&(this.rowspanCount[r]={rowspan:0,colspan:0});for(let r of t.ops)if(r.attributes){let{background:i,[et.tableCellInner]:o}=r.attributes;if(o&&i){let{style:l=""}=o,a=gv(l);a.backgroundColor=i,r.attributes[et.tableCellInner].style=im(a)}}return t}matchTd(e,t){let r=e,i=Df.formats(r);if(!this.colIds[this.cellCount]||!this.rowspanCount[this.cellCount])for(let u=this.cellCount;u>=0;u--)this.colIds[u]||(this.colIds[u]=Ba()),this.rowspanCount[u]||(this.rowspanCount[u]={rowspan:0,colspan:0});for(let u=this.cellCount;u<this.rowspanCount.length;u++){let{rowspan:h,colspan:y}=this.rowspanCount[u];if(h===0)break;this.cellCount+=y}i.rowspan>1&&(this.rowspanCount[this.cellCount]={rowspan:i.rowspan,colspan:i.colspan});let o=this.colIds[this.cellCount];this.cellCount+=i.colspan;let l=Object.assign(i,{tableId:this.tableId,rowId:this.rowId,colId:o});r.style.border==="none"&&(l.style=l.style.replaceAll(/border-(top|right|bottom|left)-style:none;?/g,""));let a=[];for(let u of t.ops){let{attributes:h={},...y}=u,{[et.tableCell]:x,...w}=h;a.push({...y,attributes:{...w,[et.tableCellInner]:l}})}return(a.length<=0||!Lg(a[a.length-1].insert)||!a[a.length-1].insert.endsWith(`
|
|
353
353
|
`))&&a.push({insert:`
|
|
354
|
-
`,attributes:{[et.tableCellInner]:l}}),new ap(a)}matchTdAttributor(e,t){if(e.tagName.toLocaleLowerCase()==="td"){let i=[];for(let o of t.ops){let{attributes:l,...a}=o,u=l==null?void 0:l[et.tableCellInner];if(l&&u&&u.style){let{background:h,...y}=l,x=document.createElement("div");x.style.background=h;let w=document.createElement("div");if(w.style.cssText=u.style,x.style.background===w.style.backgroundColor){i.push({...a,attributes:{...y}});continue}}i.push(o)}return new ap(i)}return t}convert({html:e,text:t},r={}){let i=super.convert({html:e,text:t},r);if(r[et.tableCellInner])for(let o of i.ops){if(I0(o.insert)&&o.insert[et.tableCol]){o.insert="";continue}o.attributes||(o.attributes={}),o.attributes[et.tableCellInner]=r[et.tableCellInner]}return i}matchCaption(e,t){for(let r=0;r<t.ops.length;r++){let i=t.ops[r],{attributes:o}=i;o&&o[et.tableCaption]&&(o[et.tableCaption].tableId=this.tableId,i.attributes=o)}return t}},
|
|
354
|
+
`,attributes:{[et.tableCellInner]:l}}),new ap(a)}matchTdAttributor(e,t){if(e.tagName.toLocaleLowerCase()==="td"){let i=[];for(let o of t.ops){let{attributes:l,...a}=o,u=l==null?void 0:l[et.tableCellInner];if(l&&u&&u.style){let{background:h,...y}=l,x=document.createElement("div");x.style.background=h;let w=document.createElement("div");if(w.style.cssText=u.style,x.style.background===w.style.backgroundColor){i.push({...a,attributes:{...y}});continue}}i.push(o)}return new ap(i)}return t}convert({html:e,text:t},r={}){let i=super.convert({html:e,text:t},r);if(r[et.tableCellInner])for(let o of i.ops){if(I0(o.insert)&&o.insert[et.tableCol]){o.insert="";continue}o.attributes||(o.attributes={}),o.attributes[et.tableCellInner]=r[et.tableCellInner]}return i}matchCaption(e,t){for(let r=0;r<t.ops.length;r++){let i=t.ops[r],{attributes:o}=i;o&&o[et.tableCaption]&&(o[et.tableCaption].tableId=this.tableId,i.attributes=o)}return t}},PB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
355
355
|
<!-- Icon from Tabler Icons by Paweł Kuna - https://github.com/tabler/tabler-icons/blob/master/LICENSE -->
|
|
356
356
|
<path
|
|
357
357
|
fill="none"
|
|
@@ -362,7 +362,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
362
362
|
d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6m-10 6H3m18 0h-7m-8-3l-3 3l3 3m12-6l3 3l-3 3"
|
|
363
363
|
/>
|
|
364
364
|
</svg>
|
|
365
|
-
`,
|
|
365
|
+
`,DB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
366
366
|
<path
|
|
367
367
|
fill="none"
|
|
368
368
|
stroke="currentColor"
|
|
@@ -372,7 +372,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
372
372
|
d="m4 8l4-4m6 0L4 14m0 6L20 4m0 6L10 20m10-4l-4 4"
|
|
373
373
|
/>
|
|
374
374
|
</svg>
|
|
375
|
-
`,
|
|
375
|
+
`,NB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
376
376
|
<path
|
|
377
377
|
fill="none"
|
|
378
378
|
stroke="currentColor"
|
|
@@ -382,7 +382,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
382
382
|
d="m12.01 16l-.01.011M12.01 12l-.01.011M12.01 8l-.01.011M8.01 12l-.01.011M16.01 12l-.01.011M21 3.6v16.8a.6.6 0 0 1-.6.6H3.6a.6.6 0 0 1-.6-.6V3.6a.6.6 0 0 1 .6-.6h16.8a.6.6 0 0 1 .6.6"
|
|
383
383
|
/>
|
|
384
384
|
</svg>
|
|
385
|
-
`,
|
|
385
|
+
`,FB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 256 256">
|
|
386
386
|
<g fill="currentColor">
|
|
387
387
|
<path d="M216 40v128h-48V88H88V40Z" opacity=".2" />
|
|
388
388
|
<path
|
|
@@ -390,73 +390,73 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
390
390
|
/>
|
|
391
391
|
</g>
|
|
392
392
|
</svg>
|
|
393
|
-
`,
|
|
393
|
+
`,BB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
|
|
394
394
|
<path
|
|
395
395
|
fill="currentColor"
|
|
396
396
|
d="m19.05 13.733l-1-1.733l-10.122 5.846l-.997-.576a3 3 0 0 0 .667-.769A3 3 0 1 0 3.5 17.599L5.928 19L3.5 20.402a3.034 3.034 0 1 0 3.44.323l.988-.57L14.59 24l1-1.73L9.928 19zM4.034 15.26a1 1 0 1 1 .466.607a1 1 0 0 1-.466-.607M5 22a1 1 0 1 1-.865 1.5A1 1 0 0 1 5 22m12 4h4v2h-4zm-7 0h4v2h-4z"
|
|
397
397
|
/>
|
|
398
398
|
<path fill="currentColor" d="M28 28h-4v-2h4V4H7v4H5V4a2 2 0 0 1 2-2h21a2 2 0 0 1 2 2v22a2 2 0 0 1-2 2" />
|
|
399
399
|
</svg>
|
|
400
|
-
`,
|
|
400
|
+
`,zB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
401
401
|
<path
|
|
402
402
|
fill="currentColor"
|
|
403
403
|
d="M4 3h14a2 2 0 0 1 2 2v7.08a6 6 0 0 0-4.32.92H12v4h1.08c-.11.68-.11 1.35 0 2H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2m0 4v4h6V7zm8 0v4h6V7zm-8 6v4h6v-4zm11.94 5.5h2v-4h2v4h2l-3 3z"
|
|
404
404
|
/>
|
|
405
405
|
</svg>
|
|
406
|
-
`,
|
|
406
|
+
`,HB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
407
407
|
<path
|
|
408
408
|
fill="currentColor"
|
|
409
409
|
d="M4 3h14a2 2 0 0 1 2 2v7.08a6 6 0 0 0-4.32.92H12v4h1.08c-.11.68-.11 1.35 0 2H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2m0 4v4h6V7zm8 0v4h6V7zm-8 6v4h6v-4zm14.44 2v2h4v2h-4v2l-3-3z"
|
|
410
410
|
/>
|
|
411
411
|
</svg>
|
|
412
|
-
`,
|
|
412
|
+
`,WB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
413
413
|
<path
|
|
414
414
|
fill="currentColor"
|
|
415
415
|
d="M4 3h14a2 2 0 0 1 2 2v7.08a6 6 0 0 0-4.32.92H12v4h1.08c-.11.68-.11 1.35 0 2H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2m0 4v4h6V7zm8 0v4h6V7zm-8 6v4h6v-4zm15.44 8v-2h-4v-2h4v-2l3 3z"
|
|
416
416
|
/>
|
|
417
417
|
</svg>
|
|
418
|
-
`,
|
|
418
|
+
`,UB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
419
419
|
<path
|
|
420
420
|
fill="currentColor"
|
|
421
421
|
d="M4 3h14a2 2 0 0 1 2 2v7.08a6 6 0 0 0-4.32.92H12v4h1.08c-.11.68-.11 1.35 0 2H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2m0 4v4h6V7zm8 0v4h6V7zm-8 6v4h6v-4zm17.94 4.5h-2v4h-2v-4h-2l3-3z"
|
|
422
422
|
/>
|
|
423
423
|
</svg>
|
|
424
|
-
`,
|
|
424
|
+
`,GB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
425
425
|
<path
|
|
426
426
|
fill="currentColor"
|
|
427
427
|
d="M5 10H3V4h8v2H5zm14 8h-6v2h8v-6h-2zM5 18v-4H3v6h8v-2zM21 4h-8v2h6v4h2zM8 13v2l3-3l-3-3v2H3v2zm8-2V9l-3 3l3 3v-2h5v-2z"
|
|
428
428
|
/>
|
|
429
429
|
</svg>
|
|
430
|
-
`,
|
|
430
|
+
`,YB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
431
431
|
<path
|
|
432
432
|
fill="currentColor"
|
|
433
433
|
d="M4 2h7a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m0 8v4h7v-4zm0 6v4h7v-4zM4 4v4h7V4zm13.59 8L15 9.41L16.41 8L19 10.59L21.59 8L23 9.41L20.41 12L23 14.59L21.59 16L19 13.41L16.41 16L15 14.59z"
|
|
434
434
|
/>
|
|
435
435
|
</svg>
|
|
436
|
-
`,
|
|
436
|
+
`,VB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
437
437
|
<path
|
|
438
438
|
fill="currentColor"
|
|
439
439
|
d="M9.41 13L12 15.59L14.59 13L16 14.41L13.41 17L16 19.59L14.59 21L12 18.41L9.41 21L8 19.59L10.59 17L8 14.41zM22 9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2zM4 9h4V6H4zm6 0h4V6h-4zm6 0h4V6h-4z"
|
|
440
440
|
/>
|
|
441
441
|
</svg>
|
|
442
|
-
`,
|
|
442
|
+
`,ZB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
443
443
|
<path
|
|
444
444
|
fill="currentColor"
|
|
445
445
|
d="m15.46 15.88l1.42-1.42L19 16.59l2.12-2.13l1.42 1.42L20.41 18l2.13 2.12l-1.42 1.42L19 19.41l-2.12 2.13l-1.42-1.42L17.59 18zM4 3h14a2 2 0 0 1 2 2v7.08a6 6 0 0 0-4.32.92H12v4h1.08c-.11.68-.11 1.35 0 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m0 4v4h6V7zm8 0v4h6V7zm-8 6v4h6v-4z"
|
|
446
446
|
/>
|
|
447
447
|
</svg>
|
|
448
|
-
`,
|
|
448
|
+
`,XB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
449
449
|
<path
|
|
450
450
|
fill="currentColor"
|
|
451
451
|
d="M19 14h2v6H3v-6h2v4h14zM3 4v6h2V6h14v4h2V4zm8 7v2H8v2l-3-3l3-3v2zm5 0V9l3 3l-3 3v-2h-3v-2z"
|
|
452
452
|
/>
|
|
453
453
|
</svg>
|
|
454
|
-
`,
|
|
454
|
+
`,KB=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
455
455
|
<!-- Icon from TDesign Icons by TDesign - https://github.com/Tencent/tdesign-icons/blob/main/LICENSE -->
|
|
456
456
|
<path fill="currentColor" d="M21 10v12h-2V12H5v10H3V10zm0-8v6H3V2zm-2 2H5v2h14z" />
|
|
457
457
|
</svg>
|
|
458
|
-
`;const VB="color-selector",lo={Break:{name:"break"},CopyCell:{name:"CopyCell",tip:"Copy cell",icon:OB,handle:(n,e)=>{let t=n.getTextByCell(e),r=n.getHTMLByCell(e),i=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([r],{type:"text/html"})});navigator.clipboard.write([i]),n.hideTableTools()}},CutCell:{name:"CutCell",tip:"Cut cell",icon:PB,handle:(n,e)=>{let t=n.getTextByCell(e),r=n.getHTMLByCell(e,!0),i=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([r],{type:"text/html"})});navigator.clipboard.write([i]),n.hideTableTools()}},InsertTop:{name:"InsertTop",icon:BB,tip:"Insert row above",handle:(n,e)=>{n.appendRow(e,!1),n.hideTableTools()}},InsertRight:{name:"InsertRight",icon:FB,tip:"Insert column right",handle:(n,e)=>{n.appendCol(e,!0),n.hideTableTools()}},InsertBottom:{name:"InsertBottom",icon:DB,tip:"Insert row below",handle:(n,e)=>{n.appendRow(e,!0),n.hideTableTools()}},InsertLeft:{name:"InsertLeft",icon:NB,tip:"Insert column Left",handle:(n,e)=>{n.appendCol(e,!1),n.hideTableTools()}},MergeCell:{name:"MergeCell",icon:zB,tip:"Merge Cell",handle:(n,e)=>{n.mergeCells(e),n.hideTableTools()}},SplitCell:{name:"SplitCell",icon:GB,tip:"Split Cell",handle:(n,e)=>{n.splitCell(e),n.hideTableTools()}},DeleteRow:{name:"DeleteRow",icon:WB,tip:"Delete Row",handle:(n,e)=>{n.removeRow(e),n.hideTableTools()}},DeleteColumn:{name:"DeleteColumn",icon:HB,tip:"Delete Column",handle:(n,e)=>{n.removeCol(e),n.hideTableTools()}},DeleteTable:{name:"DeleteTable",icon:UB,tip:"Delete table",handle:(n,e)=>{n.deleteTable(e)}},BackgroundColor:{name:"BackgroundColor",icon:MB,isColorChoose:!0,tip:"Set background color",key:"background-color",handle:(n,e,t)=>{n.setCellAttrs(e,"background-color",t,!0)}},BorderColor:{name:"BorderColor",icon:LB,isColorChoose:!0,tip:"Set border color",key:"border-color",handle:(n,e,t)=>{n.setCellAttrs(e,"border-color",t,!0)}},SwitchWidth:{name:"SwitchWidth",icon:kB,tip:"Switch table width",handle:n=>{if(!n.table)return;let e=qe.find(n.table);e&&(e.full?e.cancelFull():e.setFull())}},InsertCaption:{name:"InsertCaption",icon:YB,tip:"Insert table caption",handle:n=>{if(!n.table)return;let e=qe.find(n.table);if(!e)return;let t=n.quill.scroll.create("text","Table Caption").wrap(et.tableCaption,{tableId:e.tableId});e.insertBefore(t,e.children.head)}}},O0=10,$g=cu("color-map"),Lu={selectWrapper:$g.b(),used:$g.bm("used"),item:$g.be("item"),btn:$g.be("btn"),map:$g.be("content"),mapRow:$g.be("content-row")};var ZB=class{constructor(n,e,t){Ae(this,"usedColors",new Set);Ae(this,"options");Ae(this,"menu",null);Ae(this,"isMenuDisplay",!1);Ae(this,"isColorPicking",!1);Ae(this,"updateUsedColor");Ae(this,"tooltipItem",[]);Ae(this,"activeTooltip",null);Ae(this,"bem",cu("menu"));Ae(this,"colorItemClass",`color-${Ba()}`);Ae(this,"colorChooseTooltipOption",{direction:"top"});Ae(this,"updateWhenTextChange",()=>{this.isMenuDisplay&&this.update()});this.tableModule=n,this.quill=e,this.options=this.resolveOptions(t);try{let r=localStorage.getItem(this.options.localstorageKey)||"[]",i=JSON.parse(r);a4(i)||(i=[]),i.slice(-1*O0).map(o=>this.usedColors.add(o))}catch{}this.updateUsedColor=A4(r=>{if(!r)return;if(this.usedColors.add(r),this.usedColors.size>O0){let o=Array.from(this.usedColors).slice(-1*O0);this.usedColors.clear(),o.map(l=>this.usedColors.add(l))}localStorage.setItem(this.options.localstorageKey,JSON.stringify(Array.from(this.usedColors)));let i=Array.from(document.querySelectorAll(`.${this.colorItemClass}.${Lu.used}`));for(let o of i){let l=document.createElement("div");l.classList.add(Lu.item),l.style.backgroundColor=String(r),Array.from(o.querySelectorAll(`.${Lu.item}[style*="background-color: ${l.style.backgroundColor}"]`)).length<=0&&o.appendChild(l);let u=Array.from(o.querySelectorAll(`.${Lu.item}`)).slice(0,-1*O0);for(let h of u)h.remove()}},1e3),this.quill.on(qe.events.TEXT_CHANGE,this.updateWhenTextChange)}resolveOptions(n){return Object.assign({tipText:!0,tools:[lo.InsertTop,lo.InsertRight,lo.InsertBottom,lo.InsertLeft,lo.Break,lo.MergeCell,lo.SplitCell,lo.Break,lo.DeleteRow,lo.DeleteColumn,lo.DeleteTable,lo.Break,lo.BackgroundColor,lo.BorderColor],localstorageKey:"__table-bg-used-color",defaultColorMap:dF},n)}buildTools(){let n=document.createElement("div");n.classList.add(this.bem.b()),Object.assign(n.style,{display:"flex"});for(let e of this.options.tools){let{name:t,icon:r,handle:i,isColorChoose:o,key:l,tip:a=""}=e,u=document.createElement("span");if(u.classList.add(this.bem.be("item")),t==="break")u.classList.add(this.bem.is("break"));else{let h=document.createElement("i");if(h.classList.add("icon"),tm(r)?h.appendChild(r(this.tableModule)):h.innerHTML=r,u.appendChild(h),o&&l){let x=this.createColorChoose(u,{name:t,icon:r,handle:i,isColorChoose:o,key:l,tip:a});this.tooltipItem.push(x),u.classList.add(VB)}else tm(i)&&u.addEventListener("click",x=>{this.quill.focus(),i(this.tableModule,this.getSelectedTds(),x)},!1);let y=this.tableModule.options.texts[t]||a;this.options.tipText&&y&&a&&this.createTipText(u,y)}n.appendChild(u)}return n}createColorChoose(n,{handle:e,key:t}){let r=document.createElement("div");if(r.classList.add(Lu.selectWrapper),this.options.defaultColorMap.length>0){let _=document.createElement("div");_.classList.add(Lu.map);for(let S of this.options.defaultColorMap){let R=document.createElement("div");R.classList.add(Lu.mapRow);for(let I of S){let O=document.createElement("div");O.classList.add(Lu.item),O.style.backgroundColor=I,R.appendChild(O)}_.appendChild(R)}r.appendChild(_)}let i=document.createElement("div");i.classList.add(Lu.mapRow),Object.assign(i.style,{marginTop:"4px"});let o=document.createElement("div");o.classList.add(Lu.btn,"transparent"),o.textContent=this.tableModule.options.texts.transparent,o.addEventListener("click",()=>{e(this.tableModule,this.getSelectedTds(),"transparent")});let l=document.createElement("div");l.classList.add(Lu.btn,"clear"),l.textContent=this.tableModule.options.texts.clear,l.addEventListener("click",()=>{e(this.tableModule,this.getSelectedTds(),null)});let a=document.createElement("div");a.classList.add(Lu.btn,"custom"),a.textContent=this.tableModule.options.texts.custom;let u=_F({onChange:_=>{e(this.tableModule,this.getSelectedTds(),_),this.updateUsedColor(_)}}),{hide:h,destroy:y}=Mb(a,{direction:"right",type:"click",content:u,container:a});i.appendChild(o),i.appendChild(l),i.appendChild(a),r.appendChild(i);let x=document.createElement("div");x.classList.add(Lu.used,this.colorItemClass);for(let _ of this.usedColors){let S=document.createElement("div");S.classList.add(Lu.item),S.style.backgroundColor=_,x.appendChild(S)}r.appendChild(x),r.addEventListener("click",_=>{_.stopPropagation(),h();let S=_.target,R=S.style.backgroundColor,I=this.getSelectedTds();if(S&&R&&I.length>0){if(this.tableModule.setCellAttrs(I,t,R,!0),!S.closest(`.${Lu.item}`))return;this.updateUsedColor(R)}});let w=Mb(n,{type:"click",content:r,onOpen:()=>(this.isMenuDisplay&&this.tableModule.tableSelection&&this.tableModule.tableSelection.hideDisplay(),this.setActiveTooltip(w),!1),onClose:()=>(this.isMenuDisplay&&this.tableModule.tableSelection&&(this.tableModule.tableSelection.updateWithSelectedTds(),this.tableModule.tableSelection.showDisplay()),r.contains(u)&&h(),this.activeTooltip===w&&(this.activeTooltip=null),!1),onDestroy:()=>{y(),this.activeTooltip===w&&(this.activeTooltip=null)},...this.colorChooseTooltipOption});return w.isColorPick=!0,w}setActiveTooltip(n){this.activeTooltip&&this.activeTooltip!==n&&this.activeTooltip.hide(!0),this.activeTooltip=n}getSelectedTds(){var n;return((n=this.tableModule.tableSelection)==null?void 0:n.selectedTds)||[]}createTipText(n,e){let t=Mb(n,{msg:e});t&&this.tooltipItem.push(t)}show(){!this.menu||!this.tableModule.tableSelection||!this.tableModule.tableSelection.boundary||(Object.assign(this.menu.style,{display:"flex"}),this.isMenuDisplay=!0,this.update())}update(){}hide(){this.menu&&Object.assign(this.menu.style,{display:"none"});for(let n of this.tooltipItem)n.hide(!0);this.isMenuDisplay=!1}destroy(){this.quill.off(qe.events.TEXT_CHANGE,this.updateWhenTextChange),this.activeTooltip=null;for(let n of this.tooltipItem)n.destroy();this.menu&&(this.hide(),this.menu.remove(),this.menu=null)}},XB=class extends ZB{constructor(n,e,t){super(n,e,t),this.tableModule=n,this.quill=e,this.menu=this.buildTools(),this.tableModule.addContainer(this.menu),this.show(),this.update()}update(){!this.isMenuDisplay||!this.menu||!this.tableModule.tableSelection||!this.tableModule.tableSelection.isDisplaySelection||(super.update(),E4(this.tableModule.tableSelection.cellSelect,this.menu,{placement:"bottom",middleware:[_4(),C4({limiter:S4()}),w4(20)]}).then(({x:n,y:e})=>{Object.assign(this.menu.style,{left:`${n}px`,top:`${e}px`})}))}};const Dp=n=>!n.full&&n.align==="right";var KB=class{constructor(n,e){Ae(this,"colIndex",-1);Ae(this,"tableMain");Ae(this,"dragging",!1);Ae(this,"dragColBreak",null);Ae(this,"handleColMouseUpFunc",this.handleColMouseUp.bind(this));Ae(this,"handleColMouseMoveFunc",this.handleColMouseMove.bind(this));Ae(this,"handleColMouseDownFunc",this.handleColMouseDown.bind(this));Ae(this,"rowIndex",-1);Ae(this,"dragRowBreak",null);Ae(this,"handleRowMouseUpFunc",this.handleRowMouseUp.bind(this));Ae(this,"handleRowMouseMoveFunc",this.handleRowMouseMove.bind(this));Ae(this,"handleRowMouseDownFunc",this.handleRowMouseDown.bind(this));Ae(this,"dragBEM",cu("drag-line"));this.tableModule=n,this.quill=e}findCurrentColIndex(n){return-1}colWidthChange(n,e,t){}async createConfirmDialog({message:n,confirm:e,cancel:t}){return new Promise(r=>{let i=document.createElement("div");Object.assign(i.style,{padding:"8px 12px",fontSize:"14px",lineHeight:"1.5"});let o=document.createElement("p");o.textContent=n;let l=document.createElement("div");Object.assign(l.style,{display:"flex",justifyContent:"flex-end",gap:"6px"});let a=av({content:t}),u=av({type:"confirm",content:e});l.appendChild(a),l.appendChild(u),i.appendChild(o),i.appendChild(l);let{close:h}=c4({child:i});a.addEventListener("click",()=>{r(!1),h()}),u.addEventListener("click",()=>{r(!0),h()})})}async handleColMouseUp(){if(!this.dragColBreak||!this.tableMain||this.colIndex===-1)return;let n=this.tableMain.getCols(),e=Number.parseInt(this.dragColBreak.dataset.w||"0"),t=this.tableMain.full,r=!1,i=[];if(t){let o=this.tableMain.domNode.getBoundingClientRect().width,l=e/o*100,a=n[this.colIndex].width;if(l<a){if(l=Math.max(Ss.colMinWidthPre,l),n[this.colIndex+1]||n[this.colIndex-1]){let u=n[this.colIndex+1]?this.colIndex+1:this.colIndex-1;i.push({index:u,width:n[u].width+a-l})}else l=100;r=!0,i.push({index:this.colIndex,width:l})}else if(n[this.colIndex+1]){let u=a+n[this.colIndex+1].width;l=Math.min(u-Ss.colMinWidthPre,l),r=!0,i.push({index:this.colIndex,width:l},{index:this.colIndex+1,width:u-l})}}else this.tableMain.domNode.style.width=`${Number.parseFloat(this.tableMain.domNode.style.width)-n[this.colIndex].domNode.getBoundingClientRect().width+e}px`,r=!0,i.push({index:this.colIndex,width:e});if(document.body.removeChild(this.dragColBreak),this.dragColBreak=null,document.removeEventListener("mouseup",this.handleColMouseUpFunc),document.removeEventListener("mousemove",this.handleColMouseMoveFunc),this.dragging=!1,r){let o=this.tableMain.domNode.getBoundingClientRect().width;if(t){let l=0,a=new Set(i.map(({index:u,width:h})=>(l+=h,u)));for(let[u,h]of n.entries())a.has(u)||(l+=h.width);if(l>100){if(!await this.createConfirmDialog({message:this.tableModule.options.texts.perWidthInsufficient,confirm:this.tableModule.options.texts.confirmText,cancel:this.tableModule.options.texts.cancelText}))return;this.tableMain.cancelFull(),t=!1;for(let[u,h]of i.entries()){let{width:y,index:x}=h;i[u]={index:x,width:y/100*o}}}}for(let{index:l,width:a}of i)n[l].width=`${Math.round(a)}${t?"%":"px"}`,this.colWidthChange(l,{px:Math.round(a/100*o),pre:Math.round(a)},t)}this.quill.emitter.emit(sv.AFTER_TABLE_RESIZE)}getColumnRect(n){if(!this.tableMain)return null;let e=this.tableMain.getCols();if(n>=e.length)return null;let t=e[0].domNode.getBoundingClientRect().left;for(let o=0;o<n;o++){let l=e[o].domNode.getBoundingClientRect();t+=l.width}let r=e[n],i=r.domNode.getBoundingClientRect().width;return{left:t,right:t+i,width:i}}handleColMouseMove(n){if(n.preventDefault(),!this.dragColBreak||!this.tableMain||this.colIndex===-1)return;let e=this.tableMain.getCols(),t=this.getColumnRect(this.colIndex),r=this.tableMain.domNode.getBoundingClientRect(),i=n.clientX;if(this.tableMain.full){let l=Ss.colMinWidthPre/100*r.width,a=r.right;i>t.right&&e[this.colIndex+1]&&(a=Math.max(this.getColumnRect(this.colIndex+1).right-l,t.left+l));let u=t.left+l;i=Math.min(Math.max(i,u),a)}else Dp(this.tableMain)?t.right-i<Ss.colMinWidthPx&&(i=t.right-Ss.colMinWidthPx):i-t.left<Ss.colMinWidthPx&&(i=t.left+Ss.colMinWidthPx);let o=i-t.left;return Dp(this.tableMain)&&(o=t.right-i),this.dragColBreak.style.left=`${i}px`,this.dragColBreak.dataset.w=String(o),{left:i,width:o}}handleColMouseDown(n){if(n.button!==0||(n.preventDefault(),!this.tableMain))return;let{rect:e,body:t}=Qm(this.tableMain);if(!t||!e)return;let r=this.tableMain.getCols();if(this.colIndex=this.findCurrentColIndex(n),this.colIndex===-1)return;let i=r[this.colIndex].width,o=this.tableMain.full?i/100*e.width:i;document.addEventListener("mouseup",this.handleColMouseUpFunc),document.addEventListener("mousemove",this.handleColMouseMoveFunc),this.dragging=!0;let l=document.createElement("div");l.classList.add(this.dragBEM.b(),this.dragBEM.is("col")),l.dataset.w=String(o);let a={top:e.y,left:n.clientX,height:e.height};Object.assign(l.style,{top:`${a.top}px`,left:`${a.left}px`,height:`${a.height}px`});let u=document.body;return u.appendChild(l),this.dragColBreak&&u.removeChild(this.dragColBreak),this.dragColBreak=l,a}findCurrentRowIndex(n){return-1}rowHeightChange(n,e){}handleRowMouseUp(){if(!this.tableMain||!this.dragRowBreak||this.rowIndex===-1)return;let n=Number.parseInt(this.dragRowBreak.dataset.h||"0");this.tableMain.getRows()[this.rowIndex].setHeight(`${n}px`),this.rowHeightChange(this.rowIndex,n),document.body.removeChild(this.dragRowBreak),this.dragRowBreak=null,document.removeEventListener("mouseup",this.handleRowMouseUpFunc),document.removeEventListener("mousemove",this.handleRowMouseMoveFunc),this.dragging=!1,this.quill.emitter.emit(sv.AFTER_TABLE_RESIZE)}handleRowMouseMove(n){if(!this.tableMain||!this.dragRowBreak||this.rowIndex===-1)return;n.preventDefault();let e=this.tableMain.getRows(),t=e[this.rowIndex].domNode.getBoundingClientRect(),r=n.clientY;return r-t.y<Ss.rowMinHeightPx&&(r=t.y+Ss.rowMinHeightPx),this.dragRowBreak.style.top=`${r}px`,this.dragRowBreak.dataset.h=String(r-t.y),{top:r,height:r-t.y}}handleRowMouseDown(n){if(n.button!==0||(n.preventDefault(),!this.tableMain)||(this.rowIndex=this.findCurrentRowIndex(n),this.rowIndex===-1))return;this.dragging=!0,document.addEventListener("mouseup",this.handleRowMouseUpFunc),document.addEventListener("mousemove",this.handleRowMouseMoveFunc);let e=this.tableMain.getRows(),t=e[this.rowIndex].domNode.getBoundingClientRect().height,r=this.tableMain.domNode.getBoundingClientRect(),i=document.createElement("div");i.classList.add(this.dragBEM.b(),this.dragBEM.is("row")),i.dataset.h=String(t);let o={top:n.clientY,left:r.x,width:r.width};Object.assign(i.style,{top:`${o.top}px`,left:`${o.left}px`,width:`${o.width}px`});let l=document.body;return l.appendChild(i),this.dragRowBreak&&l.removeChild(this.dragRowBreak),this.dragRowBreak=i,o}update(){}destroy(){}},JB=class extends KB{constructor(e,t,r){super(e,r);Ae(this,"colResizer");Ae(this,"rowResizer");Ae(this,"currentTableCell");Ae(this,"dragging",!1);Ae(this,"curColIndex",-1);Ae(this,"curRowIndex",-1);Ae(this,"tableCellBlot");Ae(this,"bem",cu("resize-line"));Ae(this,"mousemoveHandler",e=>{if(this.dragging||this.tableModule.tableSelection&&this.tableModule.tableSelection.dragging)return;let t=this.findTableCell(e);if(!t)return this.hide();let r=qe.find(t);r&&this.currentTableCell!==t&&(this.show(),this.currentTableCell=t,this.tableCellBlot=r,this.tableMain=Kl(r,et.tableMain),this.tableMain.getCols().length>0&&this.updateColResizer(),this.updateRowResizer())});Ae(this,"hideWhenTextChange",()=>{this.hide()});Ae(this,"handleColMouseUpFunc",(async function(){await this.handleColMouseUp(),this.updateColResizer()}).bind(this));Ae(this,"handleRowMouseUpFunc",(function(){this.handleRowMouseUp(),this.updateRowResizer()}).bind(this));this.tableModule=e,this.table=t,this.colResizer=this.tableModule.addContainer(this.bem.be("col")),this.rowResizer=this.tableModule.addContainer(this.bem.be("row")),this.table.addEventListener("mousemove",this.mousemoveHandler),this.quill.on(qe.events.TEXT_CHANGE,this.hideWhenTextChange)}findTableCell(e){for(let t of e.composedPath()){if(t instanceof HTMLElement&&t.tagName==="TD")return t;if(t===document.body)return null}return null}findCurrentColIndex(){var e;return this.curColIndex+(((e=this.tableCellBlot)==null?void 0:e.colspan)||1)-1}updateColResizer(){if(!this.tableMain||!this.tableCellBlot)return;let e=this.tableCellBlot;this.tableModule.toolBox.removeChild(this.colResizer),this.colResizer=this.tableModule.addContainer(this.bem.be("col"));let[t]=A1(e,[et.tableBody]),r=t.domNode.getBoundingClientRect(),i=e.domNode.getBoundingClientRect(),o=this.quill.root.getBoundingClientRect(),l=i.right-o.x;Dp(this.tableMain)&&(l=i.left-o.x),Object.assign(this.colResizer.style,{top:`${r.y-o.y}px`,left:`${l}px`,height:`${r.height}px`});let a=this.tableMain.getCols();this.curColIndex=a.findIndex(u=>u.colId===e.colId),this.colResizer.addEventListener("mousedown",this.handleColMouseDownFunc),this.colResizer.addEventListener("dragstart",u=>{u.preventDefault()})}findCurrentRowIndex(){return this.curRowIndex}updateRowResizer(){if(!this.tableMain||!this.tableCellBlot)return;let e=this.tableCellBlot;this.tableModule.toolBox.removeChild(this.rowResizer),this.rowResizer=this.tableModule.addContainer(this.bem.be("row"));let t=e.parent;if(!(t instanceof qd))return;let[r]=A1(e,[et.tableBody]),i=r.domNode.getBoundingClientRect(),o=e.domNode.getBoundingClientRect(),l=this.quill.root.getBoundingClientRect();Object.assign(this.rowResizer.style,{top:`${o.bottom-l.y}px`,left:`${i.x-l.x}px`,width:`${i.width}px`});let a=this.tableMain.getRows();this.curRowIndex=a.indexOf(t),this.rowResizer.addEventListener("mousedown",this.handleRowMouseDownFunc),this.rowResizer.addEventListener("dragstart",u=>{u.preventDefault()})}show(){this.rowResizer.classList.remove(this.bem.is("hidden")),this.colResizer.classList.remove(this.bem.is("hidden"))}hide(){this.currentTableCell=void 0,this.rowResizer.classList.add(this.bem.is("hidden")),this.colResizer.classList.add(this.bem.is("hidden"))}update(){this.updateColResizer(),this.updateRowResizer()}destroy(){this.colResizer.remove(),this.rowResizer.remove(),this.table.removeEventListener("mousemove",this.mousemoveHandler),this.quill.off(qe.events.TEXT_CHANGE,this.hideWhenTextChange)}},QB=class{constructor(n,e,t,r){Ae(this,"scrollHandler",[]);Ae(this,"tableMainBlot",null);Ae(this,"tableWrapperBlot",null);Ae(this,"bem",cu("scale"));Ae(this,"startX",0);Ae(this,"startY",0);Ae(this,"offset",6);Ae(this,"options");Ae(this,"root");Ae(this,"block");Ae(this,"resizeobserver",new ResizeObserver(()=>this.update()));Ae(this,"updateWhenTextChange",()=>{this.update()});this.tableModule=n,this.table=e,this.quill=t,this.options=this.resolveOptions(r),this.tableMainBlot=qe.find(e),this.tableMainBlot&&!this.tableMainBlot.full&&(this.tableWrapperBlot=this.tableMainBlot.parent,this.buildResizer(),this.show()),this.quill.on(qe.events.TEXT_CHANGE,this.updateWhenTextChange)}resolveOptions(n){return Object.assign({blockSize:12},n)}buildResizer(){if(!this.tableMainBlot||!this.tableWrapperBlot)return;this.root=this.tableModule.addContainer(this.bem.b()),this.root.classList.add(this.bem.is("hidden")),this.block=document.createElement("div"),this.block.classList.add(this.bem.be("block")),Object.assign(this.block.style,{width:`${this.options.blockSize}px`,height:`${this.options.blockSize}px`}),this.root.appendChild(this.block);let n=[],e=[],t=i=>{if(!this.tableMainBlot)return;let o=Dp(this.tableMainBlot)?-1:1,l=(i.clientX-this.startX)*o,a=i.clientY-this.startY,u=Math.floor(l/n.length),h=Math.floor(a/e.length);for(let{blot:y,width:x}of n)y.width=Math.max(x+u,Ss.colMinWidthPx);for(let{blot:y,height:x}of e)y.setHeight(`${Math.max(x+h,Ss.rowMinHeightPx)}px`)},r=()=>{n=[],e=[],document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r)};this.block.addEventListener("mousedown",i=>{!this.tableMainBlot||this.isTableOutofEditor()||(this.startX=i.clientX,this.startY=i.clientY,n=this.tableMainBlot.getCols().map(o=>({blot:o,width:Math.floor(o.width)})),e=this.tableMainBlot.getRows().map(o=>({blot:o,height:Math.floor(o.domNode.getBoundingClientRect().height)})),document.addEventListener("mousemove",t),document.addEventListener("mouseup",r))}),this.block.addEventListener("dragstart",i=>i.preventDefault()),this.resizeobserver.observe(this.tableMainBlot.domNode),hv.call(this,this.quill.root,()=>this.update()),hv.call(this,this.tableWrapperBlot.domNode,()=>this.update())}isTableOutofEditor(){if(!this.tableMainBlot||!this.tableWrapperBlot||this.tableMainBlot.full)return!1;let n=this.tableMainBlot.domNode.getBoundingClientRect(),e=this.tableWrapperBlot.domNode.getBoundingClientRect();if(n.width>e.width){for(let t of this.tableMainBlot.getCols())t.width=Math.floor(t.width/n.width*e.width);return this.tableMainBlot.colWidthFillTable(),!0}return!1}update(){if(!this.block||!this.root||!this.tableMainBlot||!this.tableWrapperBlot)return;if(this.tableMainBlot.full){this.hide();return}let{rect:n,body:e}=Qm(this.tableMainBlot);if(!e||!n)return;let t=this.tableWrapperBlot.domNode.getBoundingClientRect(),r=this.quill.root.getBoundingClientRect(),{scrollTop:i,scrollLeft:o}=this.tableWrapperBlot.domNode,l=this.options.blockSize*2+this.offset,a=Math.min(n.width,t.width)+l,u=Math.min(n.height,t.height)+l;Object.assign(this.root.style,{width:`${a}px`,height:`${u}px`,left:`${Math.max(n.x,t.x)-r.x-this.options.blockSize}px`,top:`${Math.max(n.y,t.y)-r.y-this.options.blockSize}px`});let h={left:`${n.width+l-o}px`,top:`${u-i}px`};Dp(this.tableMainBlot)?(this.root.classList.add(this.bem.is("align-right")),h.left=`${this.options.blockSize+-1*o}px`):this.root.classList.remove(this.bem.is("align-right")),Object.assign(this.block.style,h)}show(){this.root&&(this.root.classList.remove(this.bem.is("hidden")),this.update())}hide(){this.root&&this.root.classList.add(this.bem.is("hidden"))}destroy(){this.hide(),this.quill.off(qe.events.TEXT_CHANGE,this.updateWhenTextChange),this.resizeobserver.disconnect(),this.root&&this.root.remove(),K0.call(this)}};const qB=0;var jB=class{constructor(n,e,t={}){Ae(this,"options");Ae(this,"boundary",null);Ae(this,"scrollRecordEls",[]);Ae(this,"startScrollRecordPosition",[]);Ae(this,"selectedTableScrollX",0);Ae(this,"selectedTableScrollY",0);Ae(this,"selectedEditorScrollX",0);Ae(this,"selectedEditorScrollY",0);Ae(this,"selectedTds",[]);Ae(this,"cellSelectWrap");Ae(this,"cellSelect");Ae(this,"dragging",!1);Ae(this,"scrollHandler",[]);Ae(this,"tableMenu");Ae(this,"resizeObserver");Ae(this,"table");Ae(this,"isDisplaySelection",!1);Ae(this,"bem",cu("selection"));Ae(this,"lastSelection",{anchorNode:null,anchorOffset:0,focusNode:null,focusOffset:0});Ae(this,"updateAfterEvent",()=>{this.updateWithSelectedTds()});Ae(this,"quillSelectionChangeHandler",(n,e,t)=>{if(t!==qe.sources.API&&n&&!this.quill.composition.isComposing&&this.selectedTds.length>0){let r=this.quill.getFormat(n),[i]=this.quill.getLine(n.index),o=!!r[et.tableCellInner]&&!!i,l=this.selectedTds.some(a=>a.children.contains(i));if(o&&!l)try{let a=Kl(i,et.tableCellInner);this.selectedTds=[a],this.updateWithSelectedTds()}catch{}else o&&l||this.hide()}});Ae(this,"selectionChangeHandler",()=>{let n=window.getSelection();if(!n)return;let{anchorNode:e,focusNode:t,anchorOffset:r,focusOffset:i}=n;if(!e||!t)return;let o=qe.find(e),l=qe.find(t);if(!o||!l||o.scroll!==this.quill.scroll||l.scroll!==this.quill.scroll)return;let a=hw(o),u=hw(l),h=a.has(et.tableColgroup),y=u.has(et.tableColgroup);if(h||y){let S=e,R=r,I=t,O=i;if(h){let P=a.get(et.tableWrapper),Y=P.descendants(af);Y.length>0&&(S=Y[0].domNode,R=0)}if(y){let P=u.get(et.tableWrapper),Y=P.descendants(af);Y.length>0&&(I=Y[0].domNode,O=0)}this.setSelectionData(n,{anchorNode:S,anchorOffset:R,focusNode:I,focusOffset:O});return}let x=a.has(et.tableCellInner),w=u.has(et.tableCellInner),_=x&&w;if(_){let S=a.get(et.tableCellInner),R=u.get(et.tableCellInner);_&&(_=S!==R)}if(x&&w&&_||!x&&w||!w&&x){this.setSelectionData(n,this.lastSelection),this.selectedTds.length>0&&this.hide();return}this.lastSelection={anchorNode:e,anchorOffset:r,focusNode:t,focusOffset:i}});Ae(this,"mouseDownHandler",n=>{let{button:e,target:t,clientX:r,clientY:i}=n,o=t.closest(".ql-table"),l=t.closest("caption");if(e!==0||!o||l)return;this.setSelectionTable(o);let a=o.dataset.tableId,u={x:r,y:i};this.recordScrollPosition(),this.selectedTds=this.computeSelectedTds(u,u),this.dragging=!0,this.show();let h=x=>{this.tableMenu&&this.tableMenu.hide(),this.tableModule.tableResize&&this.tableModule.tableResize.hide();let{button:w,target:_,clientX:S,clientY:R}=x,I=_.closest(".ql-table"),O=_.closest("caption");if(w!==0||O||!I||I.dataset.tableId!==a)return;let P={x:S,y:R};this.selectedTds=this.computeSelectedTds(u,P),this.selectedTds.length>1&&this.quill.blur(),this.update()},y=()=>{document.body.removeEventListener("mousemove",h,!1),document.body.removeEventListener("mouseup",y,!1),this.dragging=!1,this.clearRecordScrollPosition(),this.tableMenu&&this.selectedTds.length>0&&this.tableMenu.show()};document.body.addEventListener("mousemove",h,!1),document.body.addEventListener("mouseup",y,!1)});Ae(this,"removeCell",n=>{let e=this.quill.getSelection(),t=document.activeElement;if(!(e||n.key!=="Backspace"&&n.key!=="Delete"||!this.quill.root.contains(t))){if(this.table){let r=qe.find(this.table),i=r.descendants(af);if(this.selectedTds.length===i.length){r.remove();return}}for(let r of this.selectedTds)r.deleteAt(0,r.length()-1)}});this.tableModule=n,this.quill=e,this.options=this.resolveOptions(t),this.scrollRecordEls=[this.quill.root,document.documentElement],this.cellSelectWrap=n.addContainer(this.bem.b()),this.cellSelect=this.helpLinesInitial(),this.resizeObserver=cB(()=>this.updateAfterEvent(),{ignoreFirstBind:!0}),this.resizeObserver.observe(this.quill.root),this.quill.root.addEventListener("mousedown",this.mouseDownHandler,{passive:!1}),document.addEventListener("selectionchange",this.selectionChangeHandler,{passive:!1}),this.quill.on(sv.AFTER_TABLE_RESIZE,this.updateAfterEvent),this.quill.on(qe.events.SELECTION_CHANGE,this.quillSelectionChangeHandler),this.quill.on(qe.events.TEXT_CHANGE,this.updateAfterEvent),this.options.tableMenu&&(this.tableMenu=new this.options.tableMenu(n,e,this.options.tableMenuOptions)),this.hide()}getFirstTextNode(n){for(let e of Array.from(n.childNodes))if(e.nodeType===Node.TEXT_NODE)return e;return n}getLastTextNode(n){for(let e=n.childNodes.length-1;e>=0;e--){let t=n.childNodes[e];if(t.nodeType===Node.TEXT_NODE)return t}return n}getNodeTailOffset(n){let e=document.createRange();return e.selectNodeContents(n),e.collapse(!1),e.startOffset}setSelectionData(n,e){let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:o}=e;if(!t||!i)return;let l=document.createRange(),a=this.selectionDirectionUp(e);a?(l.setStart(t,r),l.setEnd(t,r)):(l.setStart(t,r),l.setEnd(i,o)),n.removeAllRanges(),n.addRange(l),a&&n.extend(i,o)}selectionDirectionUp(n){let{anchorNode:e,anchorOffset:t,focusNode:r,focusOffset:i}=n;if(!e||!r)return!1;if(e===r)return t>i;let o=e.compareDocumentPosition(r);return o&Node.DOCUMENT_POSITION_CONTAINS||o&Node.DOCUMENT_POSITION_CONTAINED_BY?(o&Node.DOCUMENT_POSITION_FOLLOWING)!==0:(o&Node.DOCUMENT_POSITION_PRECEDING)!==0}findWrapSelection(n){let e=null,t=0,r=null,i=0;for(let{node:o,offset:l}of n)o&&((!e||this.selectionDirectionUp({anchorNode:e,anchorOffset:t,focusNode:o,focusOffset:l}))&&(e=o,t=l),(!r||this.selectionDirectionUp({anchorNode:o,anchorOffset:l,focusNode:r,focusOffset:i}))&&(r=o,i=l));return{startNode:e,startOffset:t,endNode:r,endOffset:i}}resolveOptions(n){return Object.assign({selectColor:"#0589f340",tableMenuOptions:{}},n)}helpLinesInitial(){this.cellSelectWrap.style.setProperty("--select-color",this.options.selectColor);let n=document.createElement("div");return n.classList.add(this.bem.be("line")),this.cellSelectWrap.appendChild(n),n}computeSelectedTds(n,e){if(!this.table)return[];let t=qe.find(this.table);if(!t)return[];let r=t.descendants(eg)[0];if(!r)return[];let i=new Set(r.descendants(Df).map((w,_)=>(w.index=_,w))),o=this.getScrollPositionDiff(),{rect:l}=Qm(t);if(!l)return[];let a=n.x+o.x,u=n.y+o.y,h={x:Math.max(l.left,Math.min(e.x,a)),y:Math.max(l.top,Math.min(e.y,u)),x1:Math.min(l.right,Math.max(e.x,a)),y1:Math.min(l.bottom,Math.max(e.y,u))},y=new Set,x=!0;for(;x;){x=!1;for(let w of i){w.__rect||(w.__rect=w.domNode.getBoundingClientRect());let{x:_,y:S,right:R,bottom:I}=w.__rect;if(lB({x:Math.floor(h.x),y:Math.floor(h.y),x1:Math.floor(h.x1),y1:Math.floor(h.y1)},{x:Math.floor(_),y:Math.floor(S),x1:Math.floor(R),y1:Math.floor(I)},qB,y.size===0)){y.add(w),i.delete(w),h={x:Math.min(h.x,_),y:Math.min(h.y,S),x1:Math.max(h.x1,R),y1:Math.max(h.y1,I)},x=!0;break}}}for(let w of[...y,...i])delete w.__rect;return this.boundary=sB({...h,width:h.x1-h.x,height:h.y1-h.y},this.quill.root),Array.from(y).sort((w,_)=>w.index-_.index).map(w=>(delete w.index,w.getCellInner()))}getScrollPositionDiff(){let{x:n,y:e}=this.getTableViewScroll(),{x:t,y:r}=sp(this.quill.root);return this.selectedTableScrollX=n,this.selectedTableScrollY=e,this.selectedEditorScrollX=t,this.selectedEditorScrollY=r,this.startScrollRecordPosition.reduce((i,{x:o,y:l},a)=>{let{x:u,y:h}=sp(this.scrollRecordEls[a]);return i.x+=o-u,i.y+=l-h,i},{x:0,y:0})}recordScrollPosition(){this.clearRecordScrollPosition();for(let n of this.scrollRecordEls)this.startScrollRecordPosition.push(sp(n))}clearRecordScrollPosition(){this.startScrollRecordPosition=[]}updateWithSelectedTds(){if(this.selectedTds.length<=0)return;let n={x:1/0,y:1/0},e={x:-1/0,y:-1/0};for(let t of this.selectedTds){let r=t.domNode.getBoundingClientRect();n.x=Math.min(n.x,r.left),n.y=Math.min(n.y,r.top),e.x=Math.max(e.x,r.right),e.y=Math.max(e.y,r.bottom)}this.selectedTds=this.computeSelectedTds(n,e),this.selectedTds.length>0?this.update():this.hide()}update(){if(this.selectedTds.length===0||!this.boundary||!this.table)return;let{x:n,y:e}=sp(this.quill.root),{x:t,y:r}=this.getTableViewScroll(),i=this.table.parentElement.getBoundingClientRect(),o=this.quill.root.getBoundingClientRect(),l=i.x-o.x,a=i.y-o.y;Object.assign(this.cellSelect.style,{left:`${this.selectedEditorScrollX*2-n+this.boundary.x+this.selectedTableScrollX-t-l}px`,top:`${this.selectedEditorScrollY*2-e+this.boundary.y+this.selectedTableScrollY-r-a}px`,width:`${this.boundary.width}px`,height:`${this.boundary.height}px`}),Object.assign(this.cellSelectWrap.style,{left:`${l}px`,top:`${a}px`,width:`${i.width}px`,height:`${i.height}px`}),!this.dragging&&this.tableMenu&&this.tableMenu.update()}getTableViewScroll(){return this.table?sp(this.table.parentElement):{x:0,y:0}}setSelectionTable(n){this.table!==n&&(this.table=n,this.table?this.scrollRecordEls.push(this.table.parentElement):this.scrollRecordEls.pop())}showDisplay(){Object.assign(this.cellSelectWrap.style,{display:"block"}),this.isDisplaySelection=!0,this.table&&this.resizeObserver.observe(this.table)}show(){this.table&&(K0.call(this),this.update(),this.showDisplay(),document.addEventListener("keydown",this.removeCell),hv.call(this,this.quill.root,()=>{this.update()}),hv.call(this,this.table.parentElement,()=>{this.update()}))}hideDisplay(){Object.assign(this.cellSelectWrap.style,{display:"none"}),this.isDisplaySelection=!1,this.table&&this.resizeObserver.unobserve(this.table)}hide(){K0.call(this),document.removeEventListener("keydown",this.removeCell),this.hideDisplay(),this.boundary=null,this.selectedTds=[],this.setSelectionTable(void 0),this.tableMenu&&this.tableMenu.hide()}destroy(){this.resizeObserver.disconnect(),this.hide(),this.cellSelectWrap.remove(),this.tableMenu&&this.tableMenu.destroy(),K0.call(this),this.quill.root.removeEventListener("mousedown",this.mouseDownHandler),document.removeEventListener("selectionchange",this.selectionChangeHandler),this.quill.off(qe.events.SELECTION_CHANGE,this.quillSelectionChangeHandler),this.quill.off(qe.events.TEXT_CHANGE,this.updateAfterEvent),this.quill.on(sv.AFTER_TABLE_RESIZE,this.updateAfterEvent)}};const Rw=qe.import("parchment"),Yh=qe.import("delta"),$B=qe.import("ui/icons"),ez=qe.import("blots/break"),tz=qe.import("blots/block"),Iw=qe.import("blots/block/embed");function nz(n,{tableId:e,rowId:t,colId:r}){let i={tableId:e,rowId:t,colId:r,colspan:1,rowspan:1},o=n.create(et.tableCell,i),l=n.create(et.tableCellInner,i),a=n.create("block");return a.appendChild(n.create("break")),l.appendChild(a),o.appendChild(l),o}function rz(n,e){return EF({onSelect:(t,r)=>{n.insertTable(t,r),e&&e.close()},customBtn:n.options.customBtn,texts:n.options.texts})}function kw(n){return{bindInHead:!1,key:n?"ArrowUp":"ArrowDown",collapsed:!0,format:[et.tableCellInner],handler(e,t){let r=n?"prev":"next",i=n?"tail":"head";if(t.line[r])return!0;let o=this.quill.selection.getBounds(e.index),l=t.line.domNode.getBoundingClientRect();if(!o||!l)return!0;if(n){if(o.top-l.top>3)return!0}else if(l.bottom-o.bottom>3)return!0;let a,u,h,y;try{[a,u,h,y]=A1(t.line,[et.tableWrapper,et.tableMain,et.tableRow,et.tableCell])}catch{return!0}let x=u.getColIds(),w=a.descendants(J0,0)[0],_;if(w){let R=window.getComputedStyle(w.domNode);_=r==="next"&&R.captionSide==="bottom"?w:r==="next"?a.next:w}else _=a[r];if(t.line[r]||!_)return!0;let S=h[r];if(S){let R=x.indexOf(y.colId),I=S.getCellByColId(x[R],r);if(!I)return!0;let O=I.children[i];O.children&&(O=O.children[i]);let P=O.offset(this.quill.scroll)+Math.min(t.offset,O.length()-1);this.quill.setSelection(P,0,qe.sources.USER)}else{let R=_.offset(this.quill.scroll)+(n?_.length()-1:0);this.quill.setSelection(R,0,qe.sources.USER)}return!1}}}var Sh,iz=(Sh=class{constructor(e,t){Ae(this,"quill");Ae(this,"options");Ae(this,"toolBox");Ae(this,"fixTableByLisenter",A4(this.balanceTables,100));Ae(this,"selector");Ae(this,"table");Ae(this,"tableSelection");Ae(this,"tableResize");Ae(this,"tableScrollbar");Ae(this,"tableAlign");Ae(this,"tableResizeScale");Ae(this,"resizeOb");if(this.quill=e,this.options=this.resolveOptions(t||{}),this.toolBox=this.initialContainer(),!this.options.scrollbar){let o=cu("scrollbar");this.quill.container.classList.add(o.bm("origin"))}this.options.selection&&(this.tableSelection=new this.options.selection(this,this.quill,this.options.selectionOptions));let r=this.quill.getModule("toolbar");if(r&&this.quill.theme.pickers){let[,o]=(r.controls||[]).find(([l])=>l===this.statics.toolName)||[];if(o&&o.tagName.toLocaleLowerCase()==="select"){let l=this.quill.theme.pickers.find(a=>a.select===o);l&&(l.label.innerHTML=this.options.icon,this.buildCustomSelect(this.options.customSelect,l),l.label.addEventListener("mousedown",()=>{if(!this.selector||!l)return;let a=this.selector.getBoundingClientRect(),{leftLimited:u}=aB(a);if(u){let h=l.label.getBoundingClientRect();Object.assign(l.options.style,{transform:`translateX(calc(-100% + ${h.width}px))`})}else Object.assign(l.options.style,{transform:void 0})}))}}let i=this.quill.getModule("keyboard");for(let o of Object.values(Sh.keyboradHandler))o.bindInHead?i.bindings[o.key].unshift(o):i.addBinding(o.key,o);this.quill.root.addEventListener("click",o=>{let l=o.composedPath();if(!l||l.length<=0)return;let a=l.find(u=>u.tagName&&u.tagName.toUpperCase()==="TABLE"&&u.classList.contains("ql-table"));if(a){if(this.table===a){this.tableSelection&&this.tableSelection.show(),this.tableAlign&&this.tableAlign.update(),this.tableResize&&this.tableResize.update(),this.tableScrollbar&&this.tableScrollbar.update();return}this.table&&this.hideTableTools(),this.showTableTools(a)}else this.table&&this.hideTableTools()},!1),this.quill.on(qe.events.EDITOR_CHANGE,o=>{o===qe.events.TEXT_CHANGE&&(!this.table||!this.quill.root.contains(this.table))&&this.hideTableTools()}),this.quillHack(),this.listenBalanceCells()}static register(){jg.allowedChildren=[Nf],Nf.allowedChildren=[eg,Tg,J0],Nf.requiredContainer=jg,J0.requiredContainer=Nf,Tg.allowedChildren=[Ig],Tg.requiredContainer=Nf,eg.allowedChildren=[qd],eg.requiredContainer=Nf,qd.allowedChildren=[Df],Df.requiredContainer=eg,Df.allowedChildren=[af,ez],Df.requiredContainer=qd,af.requiredContainer=Df;let e=new Set(["table"]),t=Object.entries(qe.imports).filter(([i,o])=>{let l=i.split("formats/")[1];return i.startsWith("formats/")&&!e.has(l)&&!R0(o,Rw.Attributor)&&(R0(o,tz)||R0(o,Iw))}),r=t.reduce((i,[o,l])=>{let a=R0(l,Iw)?Aw:om;return i[o]=class extends yF(l,[a]){static register(){}},i},{});qe.register({"blots/scroll":mB,"blots/block":om,"blots/block/embed":Aw,...r,[`blots/${et.container}`]:hg,[`formats/${et.tableCell}`]:Df,[`formats/${et.tableCellInner}`]:af,[`formats/${et.tableRow}`]:qd,[`formats/${et.tableBody}`]:eg,[`formats/${et.tableCol}`]:Ig,[`formats/${et.tableColgroup}`]:Tg,[`formats/${et.tableCaption}`]:J0,[`formats/${et.tableMain}`]:Nf,[`formats/${et.tableWrapper}`]:jg,"modules/clipboard":IB},!0)}get statics(){return this.constructor}initialContainer(){let e=cu("toolbox"),t=this.quill.addContainer(e.b()),r=()=>{let i=this.quill.root.getBoundingClientRect(),{offsetLeft:o,offsetTop:l}=this.quill.root;Object.assign(t.style,{top:`${l}px`,left:`${o}px`,width:`${i.width}px`,height:`${i.height}px`})};return this.resizeOb=new ResizeObserver(r),this.resizeOb.observe(this.quill.root),t}addContainer(e){if(Lg(e)){let t=document.createElement("div");for(let r of e.split(" "))t.classList.add(r);return this.toolBox.appendChild(t),t}else return this.toolBox.appendChild(e),e}resolveOptions(e){return Object.assign({customBtn:!1,texts:this.resolveTexts(e.texts||{}),full:!1,fullSwitch:!0,icon:$B.table,selectionOptions:{},alignOptions:{},scrollbarOptions:{},resizeOptions:{},resizeScaleOptions:{},autoMergeCell:!0},e)}resolveTexts(e){return Object.assign({fullCheckboxText:"Insert full width table",customBtnText:"Custom",confirmText:"Confirm",cancelText:"Cancel",rowText:"Row",colText:"Column",notPositiveNumberError:"Please enter a positive integer",custom:"Custom",clear:"Clear",transparent:"Transparent",perWidthInsufficient:"The percentage width is insufficient. To complete the operation, the table needs to be converted to a fixed width. Do you want to continue?",CopyCell:"Copy cell",CutCell:"Cut cell",InsertTop:"Insert row above",InsertRight:"Insert column right",InsertBottom:"Insert row below",InsertLeft:"Insert column Left",MergeCell:"Merge Cell",SplitCell:"Split Cell",DeleteRow:"Delete Row",DeleteColumn:"Delete Column",DeleteTable:"Delete table",BackgroundColor:"Set background color",BorderColor:"Set border color"},e)}quillHack(){var i;let e=this.quill.getSemanticHTML;this.quill.getSemanticHTML=(o=0,l)=>{let a=e.call(this.quill,o,l),u=qe.import(`formats/${et.tableWrapper}`),h=new DOMParser,y=h.parseFromString(a,"text/html");for(let x of Array.from(y.querySelectorAll(`.${u.className} caption[contenteditable], .${u.className} td > [contenteditable]`)))x.removeAttribute("contenteditable");return y.body.innerHTML};let t=this.quill.format;this.quill.format=function(o,l,a=qe.sources.API){if(!(this.scroll.query(o).prototype instanceof Rw.EmbedBlot)){let h=this.getModule(Ib.moduleName),y=this.getSelection(!0);if(!this.getFormat(y)[et.tableCellInner]||y.length>0||h&&h.tableSelection&&h.tableSelection.selectedTds.length<=1)return t.call(this,o,l,a);if(h&&h.tableSelection&&h.tableSelection.selectedTds.length>0){let w=h.tableSelection.selectedTds,_=!1,S=[];for(let P of w){let Y=P.offset(this.scroll),z=P.length();S.push({index:Y,length:z}),this.getFormat(Y,z)[o]!==l&&(_=!0)}let R=_?l:!1,I=new Yh;for(let[P,{index:Y,length:z}]of S.entries()){let W=P===0?0:S[P-1].index+S[P-1].length;I.retain(Y-W).retain(z,{[o]:R})}let O=this.updateContents(I,a);return this.blur(),O}}return t.call(this,o,l,a)};let r=this.quill.theme.modules.toolbar;if(r){let o=(i=r.handlers)==null?void 0:i.clean;if(o){let l=(a,u,h=()=>"")=>{let y=this.quill.getText(a,u),[x,w]=this.quill.getLine(a+u),_=0,S=new Yh;x!=null&&(_=x.length()-w,S=x.delta().slice(w,w+_-1).insert(`
|
|
459
|
-
`));let R=this.quill.getContents(a,u+_),I=R.diff(new Yh().insert(y).concat(S)),O=0,P=I.ops.map(Y=>{let{attributes:z,...W}=Y;if(Y.insert?O-=Lg(Y.insert)?Y.insert.length:1:Y.retain?O+=
|
|
458
|
+
`;const JB="color-selector",lo={Break:{name:"break"},CopyCell:{name:"CopyCell",tip:"Copy cell",icon:FB,handle:(n,e)=>{let t=n.getTextByCell(e),r=n.getHTMLByCell(e),i=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([r],{type:"text/html"})});navigator.clipboard.write([i]),n.hideTableTools()}},CutCell:{name:"CutCell",tip:"Cut cell",icon:BB,handle:(n,e)=>{let t=n.getTextByCell(e),r=n.getHTMLByCell(e,!0),i=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([r],{type:"text/html"})});navigator.clipboard.write([i]),n.hideTableTools()}},InsertTop:{name:"InsertTop",icon:UB,tip:"Insert row above",handle:(n,e)=>{n.appendRow(e,!1),n.hideTableTools()}},InsertRight:{name:"InsertRight",icon:WB,tip:"Insert column right",handle:(n,e)=>{n.appendCol(e,!0),n.hideTableTools()}},InsertBottom:{name:"InsertBottom",icon:zB,tip:"Insert row below",handle:(n,e)=>{n.appendRow(e,!0),n.hideTableTools()}},InsertLeft:{name:"InsertLeft",icon:HB,tip:"Insert column Left",handle:(n,e)=>{n.appendCol(e,!1),n.hideTableTools()}},MergeCell:{name:"MergeCell",icon:GB,tip:"Merge Cell",handle:(n,e)=>{n.mergeCells(e),n.hideTableTools()}},SplitCell:{name:"SplitCell",icon:XB,tip:"Split Cell",handle:(n,e)=>{n.splitCell(e),n.hideTableTools()}},DeleteRow:{name:"DeleteRow",icon:VB,tip:"Delete Row",handle:(n,e)=>{n.removeRow(e),n.hideTableTools()}},DeleteColumn:{name:"DeleteColumn",icon:YB,tip:"Delete Column",handle:(n,e)=>{n.removeCol(e),n.hideTableTools()}},DeleteTable:{name:"DeleteTable",icon:ZB,tip:"Delete table",handle:(n,e)=>{n.deleteTable(e)}},BackgroundColor:{name:"BackgroundColor",icon:DB,isColorChoose:!0,tip:"Set background color",key:"background-color",handle:(n,e,t)=>{n.setCellAttrs(e,"background-color",t,!0)}},BorderColor:{name:"BorderColor",icon:NB,isColorChoose:!0,tip:"Set border color",key:"border-color",handle:(n,e,t)=>{n.setCellAttrs(e,"border-color",t,!0)}},SwitchWidth:{name:"SwitchWidth",icon:PB,tip:"Switch table width",handle:n=>{if(!n.table)return;let e=qe.find(n.table);e&&(e.full?e.cancelFull():e.setFull())}},InsertCaption:{name:"InsertCaption",icon:KB,tip:"Insert table caption",handle:n=>{if(!n.table)return;let e=qe.find(n.table);if(!e)return;let t=n.quill.scroll.create("text","Table Caption").wrap(et.tableCaption,{tableId:e.tableId});e.insertBefore(t,e.children.head)}}},O0=10,$g=cu("color-map"),Lu={selectWrapper:$g.b(),used:$g.bm("used"),item:$g.be("item"),btn:$g.be("btn"),map:$g.be("content"),mapRow:$g.be("content-row")};var QB=class{constructor(n,e,t){Ae(this,"usedColors",new Set);Ae(this,"options");Ae(this,"menu",null);Ae(this,"isMenuDisplay",!1);Ae(this,"isColorPicking",!1);Ae(this,"updateUsedColor");Ae(this,"tooltipItem",[]);Ae(this,"activeTooltip",null);Ae(this,"bem",cu("menu"));Ae(this,"colorItemClass",`color-${Ba()}`);Ae(this,"colorChooseTooltipOption",{direction:"top"});Ae(this,"updateWhenTextChange",()=>{this.isMenuDisplay&&this.update()});this.tableModule=n,this.quill=e,this.options=this.resolveOptions(t);try{let r=localStorage.getItem(this.options.localstorageKey)||"[]",i=JSON.parse(r);a4(i)||(i=[]),i.slice(-1*O0).map(o=>this.usedColors.add(o))}catch{}this.updateUsedColor=A4(r=>{if(!r)return;if(this.usedColors.add(r),this.usedColors.size>O0){let o=Array.from(this.usedColors).slice(-1*O0);this.usedColors.clear(),o.map(l=>this.usedColors.add(l))}localStorage.setItem(this.options.localstorageKey,JSON.stringify(Array.from(this.usedColors)));let i=Array.from(document.querySelectorAll(`.${this.colorItemClass}.${Lu.used}`));for(let o of i){let l=document.createElement("div");l.classList.add(Lu.item),l.style.backgroundColor=String(r),Array.from(o.querySelectorAll(`.${Lu.item}[style*="background-color: ${l.style.backgroundColor}"]`)).length<=0&&o.appendChild(l);let u=Array.from(o.querySelectorAll(`.${Lu.item}`)).slice(0,-1*O0);for(let h of u)h.remove()}},1e3),this.quill.on(qe.events.TEXT_CHANGE,this.updateWhenTextChange)}resolveOptions(n){return Object.assign({tipText:!0,tools:[lo.InsertTop,lo.InsertRight,lo.InsertBottom,lo.InsertLeft,lo.Break,lo.MergeCell,lo.SplitCell,lo.Break,lo.DeleteRow,lo.DeleteColumn,lo.DeleteTable,lo.Break,lo.BackgroundColor,lo.BorderColor],localstorageKey:"__table-bg-used-color",defaultColorMap:vF},n)}buildTools(){let n=document.createElement("div");n.classList.add(this.bem.b()),Object.assign(n.style,{display:"flex"});for(let e of this.options.tools){let{name:t,icon:r,handle:i,isColorChoose:o,key:l,tip:a=""}=e,u=document.createElement("span");if(u.classList.add(this.bem.be("item")),t==="break")u.classList.add(this.bem.is("break"));else{let h=document.createElement("i");if(h.classList.add("icon"),tm(r)?h.appendChild(r(this.tableModule)):h.innerHTML=r,u.appendChild(h),o&&l){let x=this.createColorChoose(u,{name:t,icon:r,handle:i,isColorChoose:o,key:l,tip:a});this.tooltipItem.push(x),u.classList.add(JB)}else tm(i)&&u.addEventListener("click",x=>{this.quill.focus(),i(this.tableModule,this.getSelectedTds(),x)},!1);let y=this.tableModule.options.texts[t]||a;this.options.tipText&&y&&a&&this.createTipText(u,y)}n.appendChild(u)}return n}createColorChoose(n,{handle:e,key:t}){let r=document.createElement("div");if(r.classList.add(Lu.selectWrapper),this.options.defaultColorMap.length>0){let _=document.createElement("div");_.classList.add(Lu.map);for(let S of this.options.defaultColorMap){let R=document.createElement("div");R.classList.add(Lu.mapRow);for(let I of S){let O=document.createElement("div");O.classList.add(Lu.item),O.style.backgroundColor=I,R.appendChild(O)}_.appendChild(R)}r.appendChild(_)}let i=document.createElement("div");i.classList.add(Lu.mapRow),Object.assign(i.style,{marginTop:"4px"});let o=document.createElement("div");o.classList.add(Lu.btn,"transparent"),o.textContent=this.tableModule.options.texts.transparent,o.addEventListener("click",()=>{e(this.tableModule,this.getSelectedTds(),"transparent")});let l=document.createElement("div");l.classList.add(Lu.btn,"clear"),l.textContent=this.tableModule.options.texts.clear,l.addEventListener("click",()=>{e(this.tableModule,this.getSelectedTds(),null)});let a=document.createElement("div");a.classList.add(Lu.btn,"custom"),a.textContent=this.tableModule.options.texts.custom;let u=TF({onChange:_=>{e(this.tableModule,this.getSelectedTds(),_),this.updateUsedColor(_)}}),{hide:h,destroy:y}=Mb(a,{direction:"right",type:"click",content:u,container:a});i.appendChild(o),i.appendChild(l),i.appendChild(a),r.appendChild(i);let x=document.createElement("div");x.classList.add(Lu.used,this.colorItemClass);for(let _ of this.usedColors){let S=document.createElement("div");S.classList.add(Lu.item),S.style.backgroundColor=_,x.appendChild(S)}r.appendChild(x),r.addEventListener("click",_=>{_.stopPropagation(),h();let S=_.target,R=S.style.backgroundColor,I=this.getSelectedTds();if(S&&R&&I.length>0){if(this.tableModule.setCellAttrs(I,t,R,!0),!S.closest(`.${Lu.item}`))return;this.updateUsedColor(R)}});let w=Mb(n,{type:"click",content:r,onOpen:()=>(this.isMenuDisplay&&this.tableModule.tableSelection&&this.tableModule.tableSelection.hideDisplay(),this.setActiveTooltip(w),!1),onClose:()=>(this.isMenuDisplay&&this.tableModule.tableSelection&&(this.tableModule.tableSelection.updateWithSelectedTds(),this.tableModule.tableSelection.showDisplay()),r.contains(u)&&h(),this.activeTooltip===w&&(this.activeTooltip=null),!1),onDestroy:()=>{y(),this.activeTooltip===w&&(this.activeTooltip=null)},...this.colorChooseTooltipOption});return w.isColorPick=!0,w}setActiveTooltip(n){this.activeTooltip&&this.activeTooltip!==n&&this.activeTooltip.hide(!0),this.activeTooltip=n}getSelectedTds(){var n;return((n=this.tableModule.tableSelection)==null?void 0:n.selectedTds)||[]}createTipText(n,e){let t=Mb(n,{msg:e});t&&this.tooltipItem.push(t)}show(){!this.menu||!this.tableModule.tableSelection||!this.tableModule.tableSelection.boundary||(Object.assign(this.menu.style,{display:"flex"}),this.isMenuDisplay=!0,this.update())}update(){}hide(){this.menu&&Object.assign(this.menu.style,{display:"none"});for(let n of this.tooltipItem)n.hide(!0);this.isMenuDisplay=!1}destroy(){this.quill.off(qe.events.TEXT_CHANGE,this.updateWhenTextChange),this.activeTooltip=null;for(let n of this.tooltipItem)n.destroy();this.menu&&(this.hide(),this.menu.remove(),this.menu=null)}},qB=class extends QB{constructor(n,e,t){super(n,e,t),this.tableModule=n,this.quill=e,this.menu=this.buildTools(),this.tableModule.addContainer(this.menu),this.show(),this.update()}update(){!this.isMenuDisplay||!this.menu||!this.tableModule.tableSelection||!this.tableModule.tableSelection.isDisplaySelection||(super.update(),E4(this.tableModule.tableSelection.cellSelect,this.menu,{placement:"bottom",middleware:[_4(),C4({limiter:S4()}),w4(20)]}).then(({x:n,y:e})=>{Object.assign(this.menu.style,{left:`${n}px`,top:`${e}px`})}))}};const Dp=n=>!n.full&&n.align==="right";var jB=class{constructor(n,e){Ae(this,"colIndex",-1);Ae(this,"tableMain");Ae(this,"dragging",!1);Ae(this,"dragColBreak",null);Ae(this,"handleColMouseUpFunc",this.handleColMouseUp.bind(this));Ae(this,"handleColMouseMoveFunc",this.handleColMouseMove.bind(this));Ae(this,"handleColMouseDownFunc",this.handleColMouseDown.bind(this));Ae(this,"rowIndex",-1);Ae(this,"dragRowBreak",null);Ae(this,"handleRowMouseUpFunc",this.handleRowMouseUp.bind(this));Ae(this,"handleRowMouseMoveFunc",this.handleRowMouseMove.bind(this));Ae(this,"handleRowMouseDownFunc",this.handleRowMouseDown.bind(this));Ae(this,"dragBEM",cu("drag-line"));this.tableModule=n,this.quill=e}findCurrentColIndex(n){return-1}colWidthChange(n,e,t){}async createConfirmDialog({message:n,confirm:e,cancel:t}){return new Promise(r=>{let i=document.createElement("div");Object.assign(i.style,{padding:"8px 12px",fontSize:"14px",lineHeight:"1.5"});let o=document.createElement("p");o.textContent=n;let l=document.createElement("div");Object.assign(l.style,{display:"flex",justifyContent:"flex-end",gap:"6px"});let a=av({content:t}),u=av({type:"confirm",content:e});l.appendChild(a),l.appendChild(u),i.appendChild(o),i.appendChild(l);let{close:h}=c4({child:i});a.addEventListener("click",()=>{r(!1),h()}),u.addEventListener("click",()=>{r(!0),h()})})}async handleColMouseUp(){if(!this.dragColBreak||!this.tableMain||this.colIndex===-1)return;let n=this.tableMain.getCols(),e=Number.parseInt(this.dragColBreak.dataset.w||"0"),t=this.tableMain.full,r=!1,i=[];if(t){let o=this.tableMain.domNode.getBoundingClientRect().width,l=e/o*100,a=n[this.colIndex].width;if(l<a){if(l=Math.max(Ss.colMinWidthPre,l),n[this.colIndex+1]||n[this.colIndex-1]){let u=n[this.colIndex+1]?this.colIndex+1:this.colIndex-1;i.push({index:u,width:n[u].width+a-l})}else l=100;r=!0,i.push({index:this.colIndex,width:l})}else if(n[this.colIndex+1]){let u=a+n[this.colIndex+1].width;l=Math.min(u-Ss.colMinWidthPre,l),r=!0,i.push({index:this.colIndex,width:l},{index:this.colIndex+1,width:u-l})}}else this.tableMain.domNode.style.width=`${Number.parseFloat(this.tableMain.domNode.style.width)-n[this.colIndex].domNode.getBoundingClientRect().width+e}px`,r=!0,i.push({index:this.colIndex,width:e});if(document.body.removeChild(this.dragColBreak),this.dragColBreak=null,document.removeEventListener("mouseup",this.handleColMouseUpFunc),document.removeEventListener("mousemove",this.handleColMouseMoveFunc),this.dragging=!1,r){let o=this.tableMain.domNode.getBoundingClientRect().width;if(t){let l=0,a=new Set(i.map(({index:u,width:h})=>(l+=h,u)));for(let[u,h]of n.entries())a.has(u)||(l+=h.width);if(l>100){if(!await this.createConfirmDialog({message:this.tableModule.options.texts.perWidthInsufficient,confirm:this.tableModule.options.texts.confirmText,cancel:this.tableModule.options.texts.cancelText}))return;this.tableMain.cancelFull(),t=!1;for(let[u,h]of i.entries()){let{width:y,index:x}=h;i[u]={index:x,width:y/100*o}}}}for(let{index:l,width:a}of i)n[l].width=`${Math.round(a)}${t?"%":"px"}`,this.colWidthChange(l,{px:Math.round(a/100*o),pre:Math.round(a)},t)}this.quill.emitter.emit(sv.AFTER_TABLE_RESIZE)}getColumnRect(n){if(!this.tableMain)return null;let e=this.tableMain.getCols();if(n>=e.length)return null;let t=e[0].domNode.getBoundingClientRect().left;for(let o=0;o<n;o++){let l=e[o].domNode.getBoundingClientRect();t+=l.width}let r=e[n],i=r.domNode.getBoundingClientRect().width;return{left:t,right:t+i,width:i}}handleColMouseMove(n){if(n.preventDefault(),!this.dragColBreak||!this.tableMain||this.colIndex===-1)return;let e=this.tableMain.getCols(),t=this.getColumnRect(this.colIndex),r=this.tableMain.domNode.getBoundingClientRect(),i=n.clientX;if(this.tableMain.full){let l=Ss.colMinWidthPre/100*r.width,a=r.right;i>t.right&&e[this.colIndex+1]&&(a=Math.max(this.getColumnRect(this.colIndex+1).right-l,t.left+l));let u=t.left+l;i=Math.min(Math.max(i,u),a)}else Dp(this.tableMain)?t.right-i<Ss.colMinWidthPx&&(i=t.right-Ss.colMinWidthPx):i-t.left<Ss.colMinWidthPx&&(i=t.left+Ss.colMinWidthPx);let o=i-t.left;return Dp(this.tableMain)&&(o=t.right-i),this.dragColBreak.style.left=`${i}px`,this.dragColBreak.dataset.w=String(o),{left:i,width:o}}handleColMouseDown(n){if(n.button!==0||(n.preventDefault(),!this.tableMain))return;let{rect:e,body:t}=Qm(this.tableMain);if(!t||!e)return;let r=this.tableMain.getCols();if(this.colIndex=this.findCurrentColIndex(n),this.colIndex===-1)return;let i=r[this.colIndex].width,o=this.tableMain.full?i/100*e.width:i;document.addEventListener("mouseup",this.handleColMouseUpFunc),document.addEventListener("mousemove",this.handleColMouseMoveFunc),this.dragging=!0;let l=document.createElement("div");l.classList.add(this.dragBEM.b(),this.dragBEM.is("col")),l.dataset.w=String(o);let a={top:e.y,left:n.clientX,height:e.height};Object.assign(l.style,{top:`${a.top}px`,left:`${a.left}px`,height:`${a.height}px`});let u=document.body;return u.appendChild(l),this.dragColBreak&&u.removeChild(this.dragColBreak),this.dragColBreak=l,a}findCurrentRowIndex(n){return-1}rowHeightChange(n,e){}handleRowMouseUp(){if(!this.tableMain||!this.dragRowBreak||this.rowIndex===-1)return;let n=Number.parseInt(this.dragRowBreak.dataset.h||"0");this.tableMain.getRows()[this.rowIndex].setHeight(`${n}px`),this.rowHeightChange(this.rowIndex,n),document.body.removeChild(this.dragRowBreak),this.dragRowBreak=null,document.removeEventListener("mouseup",this.handleRowMouseUpFunc),document.removeEventListener("mousemove",this.handleRowMouseMoveFunc),this.dragging=!1,this.quill.emitter.emit(sv.AFTER_TABLE_RESIZE)}handleRowMouseMove(n){if(!this.tableMain||!this.dragRowBreak||this.rowIndex===-1)return;n.preventDefault();let e=this.tableMain.getRows(),t=e[this.rowIndex].domNode.getBoundingClientRect(),r=n.clientY;return r-t.y<Ss.rowMinHeightPx&&(r=t.y+Ss.rowMinHeightPx),this.dragRowBreak.style.top=`${r}px`,this.dragRowBreak.dataset.h=String(r-t.y),{top:r,height:r-t.y}}handleRowMouseDown(n){if(n.button!==0||(n.preventDefault(),!this.tableMain)||(this.rowIndex=this.findCurrentRowIndex(n),this.rowIndex===-1))return;this.dragging=!0,document.addEventListener("mouseup",this.handleRowMouseUpFunc),document.addEventListener("mousemove",this.handleRowMouseMoveFunc);let e=this.tableMain.getRows(),t=e[this.rowIndex].domNode.getBoundingClientRect().height,r=this.tableMain.domNode.getBoundingClientRect(),i=document.createElement("div");i.classList.add(this.dragBEM.b(),this.dragBEM.is("row")),i.dataset.h=String(t);let o={top:n.clientY,left:r.x,width:r.width};Object.assign(i.style,{top:`${o.top}px`,left:`${o.left}px`,width:`${o.width}px`});let l=document.body;return l.appendChild(i),this.dragRowBreak&&l.removeChild(this.dragRowBreak),this.dragRowBreak=i,o}update(){}destroy(){}},$B=class extends jB{constructor(e,t,r){super(e,r);Ae(this,"colResizer");Ae(this,"rowResizer");Ae(this,"currentTableCell");Ae(this,"dragging",!1);Ae(this,"curColIndex",-1);Ae(this,"curRowIndex",-1);Ae(this,"tableCellBlot");Ae(this,"bem",cu("resize-line"));Ae(this,"mousemoveHandler",e=>{if(this.dragging||this.tableModule.tableSelection&&this.tableModule.tableSelection.dragging)return;let t=this.findTableCell(e);if(!t)return this.hide();let r=qe.find(t);r&&this.currentTableCell!==t&&(this.show(),this.currentTableCell=t,this.tableCellBlot=r,this.tableMain=Kl(r,et.tableMain),this.tableMain.getCols().length>0&&this.updateColResizer(),this.updateRowResizer())});Ae(this,"hideWhenTextChange",()=>{this.hide()});Ae(this,"handleColMouseUpFunc",(async function(){await this.handleColMouseUp(),this.updateColResizer()}).bind(this));Ae(this,"handleRowMouseUpFunc",(function(){this.handleRowMouseUp(),this.updateRowResizer()}).bind(this));this.tableModule=e,this.table=t,this.colResizer=this.tableModule.addContainer(this.bem.be("col")),this.rowResizer=this.tableModule.addContainer(this.bem.be("row")),this.table.addEventListener("mousemove",this.mousemoveHandler),this.quill.on(qe.events.TEXT_CHANGE,this.hideWhenTextChange)}findTableCell(e){for(let t of e.composedPath()){if(t instanceof HTMLElement&&t.tagName==="TD")return t;if(t===document.body)return null}return null}findCurrentColIndex(){var e;return this.curColIndex+(((e=this.tableCellBlot)==null?void 0:e.colspan)||1)-1}updateColResizer(){if(!this.tableMain||!this.tableCellBlot)return;let e=this.tableCellBlot;this.tableModule.toolBox.removeChild(this.colResizer),this.colResizer=this.tableModule.addContainer(this.bem.be("col"));let[t]=A1(e,[et.tableBody]),r=t.domNode.getBoundingClientRect(),i=e.domNode.getBoundingClientRect(),o=this.quill.root.getBoundingClientRect(),l=i.right-o.x;Dp(this.tableMain)&&(l=i.left-o.x),Object.assign(this.colResizer.style,{top:`${r.y-o.y}px`,left:`${l}px`,height:`${r.height}px`});let a=this.tableMain.getCols();this.curColIndex=a.findIndex(u=>u.colId===e.colId),this.colResizer.addEventListener("mousedown",this.handleColMouseDownFunc),this.colResizer.addEventListener("dragstart",u=>{u.preventDefault()})}findCurrentRowIndex(){return this.curRowIndex}updateRowResizer(){if(!this.tableMain||!this.tableCellBlot)return;let e=this.tableCellBlot;this.tableModule.toolBox.removeChild(this.rowResizer),this.rowResizer=this.tableModule.addContainer(this.bem.be("row"));let t=e.parent;if(!(t instanceof qd))return;let[r]=A1(e,[et.tableBody]),i=r.domNode.getBoundingClientRect(),o=e.domNode.getBoundingClientRect(),l=this.quill.root.getBoundingClientRect();Object.assign(this.rowResizer.style,{top:`${o.bottom-l.y}px`,left:`${i.x-l.x}px`,width:`${i.width}px`});let a=this.tableMain.getRows();this.curRowIndex=a.indexOf(t),this.rowResizer.addEventListener("mousedown",this.handleRowMouseDownFunc),this.rowResizer.addEventListener("dragstart",u=>{u.preventDefault()})}show(){this.rowResizer.classList.remove(this.bem.is("hidden")),this.colResizer.classList.remove(this.bem.is("hidden"))}hide(){this.currentTableCell=void 0,this.rowResizer.classList.add(this.bem.is("hidden")),this.colResizer.classList.add(this.bem.is("hidden"))}update(){this.updateColResizer(),this.updateRowResizer()}destroy(){this.colResizer.remove(),this.rowResizer.remove(),this.table.removeEventListener("mousemove",this.mousemoveHandler),this.quill.off(qe.events.TEXT_CHANGE,this.hideWhenTextChange)}},ez=class{constructor(n,e,t,r){Ae(this,"scrollHandler",[]);Ae(this,"tableMainBlot",null);Ae(this,"tableWrapperBlot",null);Ae(this,"bem",cu("scale"));Ae(this,"startX",0);Ae(this,"startY",0);Ae(this,"offset",6);Ae(this,"options");Ae(this,"root");Ae(this,"block");Ae(this,"resizeobserver",new ResizeObserver(()=>this.update()));Ae(this,"updateWhenTextChange",()=>{this.update()});this.tableModule=n,this.table=e,this.quill=t,this.options=this.resolveOptions(r),this.tableMainBlot=qe.find(e),this.tableMainBlot&&!this.tableMainBlot.full&&(this.tableWrapperBlot=this.tableMainBlot.parent,this.buildResizer(),this.show()),this.quill.on(qe.events.TEXT_CHANGE,this.updateWhenTextChange)}resolveOptions(n){return Object.assign({blockSize:12},n)}buildResizer(){if(!this.tableMainBlot||!this.tableWrapperBlot)return;this.root=this.tableModule.addContainer(this.bem.b()),this.root.classList.add(this.bem.is("hidden")),this.block=document.createElement("div"),this.block.classList.add(this.bem.be("block")),Object.assign(this.block.style,{width:`${this.options.blockSize}px`,height:`${this.options.blockSize}px`}),this.root.appendChild(this.block);let n=[],e=[],t=i=>{if(!this.tableMainBlot)return;let o=Dp(this.tableMainBlot)?-1:1,l=(i.clientX-this.startX)*o,a=i.clientY-this.startY,u=Math.floor(l/n.length),h=Math.floor(a/e.length);for(let{blot:y,width:x}of n)y.width=Math.max(x+u,Ss.colMinWidthPx);for(let{blot:y,height:x}of e)y.setHeight(`${Math.max(x+h,Ss.rowMinHeightPx)}px`)},r=()=>{n=[],e=[],document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r)};this.block.addEventListener("mousedown",i=>{!this.tableMainBlot||this.isTableOutofEditor()||(this.startX=i.clientX,this.startY=i.clientY,n=this.tableMainBlot.getCols().map(o=>({blot:o,width:Math.floor(o.width)})),e=this.tableMainBlot.getRows().map(o=>({blot:o,height:Math.floor(o.domNode.getBoundingClientRect().height)})),document.addEventListener("mousemove",t),document.addEventListener("mouseup",r))}),this.block.addEventListener("dragstart",i=>i.preventDefault()),this.resizeobserver.observe(this.tableMainBlot.domNode),hv.call(this,this.quill.root,()=>this.update()),hv.call(this,this.tableWrapperBlot.domNode,()=>this.update())}isTableOutofEditor(){if(!this.tableMainBlot||!this.tableWrapperBlot||this.tableMainBlot.full)return!1;let n=this.tableMainBlot.domNode.getBoundingClientRect(),e=this.tableWrapperBlot.domNode.getBoundingClientRect();if(n.width>e.width){for(let t of this.tableMainBlot.getCols())t.width=Math.floor(t.width/n.width*e.width);return this.tableMainBlot.colWidthFillTable(),!0}return!1}update(){if(!this.block||!this.root||!this.tableMainBlot||!this.tableWrapperBlot)return;if(this.tableMainBlot.full){this.hide();return}let{rect:n,body:e}=Qm(this.tableMainBlot);if(!e||!n)return;let t=this.tableWrapperBlot.domNode.getBoundingClientRect(),r=this.quill.root.getBoundingClientRect(),{scrollTop:i,scrollLeft:o}=this.tableWrapperBlot.domNode,l=this.options.blockSize*2+this.offset,a=Math.min(n.width,t.width)+l,u=Math.min(n.height,t.height)+l;Object.assign(this.root.style,{width:`${a}px`,height:`${u}px`,left:`${Math.max(n.x,t.x)-r.x-this.options.blockSize}px`,top:`${Math.max(n.y,t.y)-r.y-this.options.blockSize}px`});let h={left:`${n.width+l-o}px`,top:`${u-i}px`};Dp(this.tableMainBlot)?(this.root.classList.add(this.bem.is("align-right")),h.left=`${this.options.blockSize+-1*o}px`):this.root.classList.remove(this.bem.is("align-right")),Object.assign(this.block.style,h)}show(){this.root&&(this.root.classList.remove(this.bem.is("hidden")),this.update())}hide(){this.root&&this.root.classList.add(this.bem.is("hidden"))}destroy(){this.hide(),this.quill.off(qe.events.TEXT_CHANGE,this.updateWhenTextChange),this.resizeobserver.disconnect(),this.root&&this.root.remove(),K0.call(this)}};const tz=0;var nz=class{constructor(n,e,t={}){Ae(this,"options");Ae(this,"boundary",null);Ae(this,"scrollRecordEls",[]);Ae(this,"startScrollRecordPosition",[]);Ae(this,"selectedTableScrollX",0);Ae(this,"selectedTableScrollY",0);Ae(this,"selectedEditorScrollX",0);Ae(this,"selectedEditorScrollY",0);Ae(this,"selectedTds",[]);Ae(this,"cellSelectWrap");Ae(this,"cellSelect");Ae(this,"dragging",!1);Ae(this,"scrollHandler",[]);Ae(this,"tableMenu");Ae(this,"resizeObserver");Ae(this,"table");Ae(this,"isDisplaySelection",!1);Ae(this,"bem",cu("selection"));Ae(this,"lastSelection",{anchorNode:null,anchorOffset:0,focusNode:null,focusOffset:0});Ae(this,"updateAfterEvent",()=>{this.updateWithSelectedTds()});Ae(this,"quillSelectionChangeHandler",(n,e,t)=>{if(t!==qe.sources.API&&n&&!this.quill.composition.isComposing&&this.selectedTds.length>0){let r=this.quill.getFormat(n),[i]=this.quill.getLine(n.index),o=!!r[et.tableCellInner]&&!!i,l=this.selectedTds.some(a=>a.children.contains(i));if(o&&!l)try{let a=Kl(i,et.tableCellInner);this.selectedTds=[a],this.updateWithSelectedTds()}catch{}else o&&l||this.hide()}});Ae(this,"selectionChangeHandler",()=>{let n=window.getSelection();if(!n)return;let{anchorNode:e,focusNode:t,anchorOffset:r,focusOffset:i}=n;if(!e||!t)return;let o=qe.find(e),l=qe.find(t);if(!o||!l||o.scroll!==this.quill.scroll||l.scroll!==this.quill.scroll)return;let a=hw(o),u=hw(l),h=a.has(et.tableColgroup),y=u.has(et.tableColgroup);if(h||y){let S=e,R=r,I=t,O=i;if(h){let P=a.get(et.tableWrapper),Y=P.descendants(af);Y.length>0&&(S=Y[0].domNode,R=0)}if(y){let P=u.get(et.tableWrapper),Y=P.descendants(af);Y.length>0&&(I=Y[0].domNode,O=0)}this.setSelectionData(n,{anchorNode:S,anchorOffset:R,focusNode:I,focusOffset:O});return}let x=a.has(et.tableCellInner),w=u.has(et.tableCellInner),_=x&&w;if(_){let S=a.get(et.tableCellInner),R=u.get(et.tableCellInner);_&&(_=S!==R)}if(x&&w&&_||!x&&w||!w&&x){this.setSelectionData(n,this.lastSelection),this.selectedTds.length>0&&this.hide();return}this.lastSelection={anchorNode:e,anchorOffset:r,focusNode:t,focusOffset:i}});Ae(this,"mouseDownHandler",n=>{let{button:e,target:t,clientX:r,clientY:i}=n,o=t.closest(".ql-table"),l=t.closest("caption");if(e!==0||!o||l)return;this.setSelectionTable(o);let a=o.dataset.tableId,u={x:r,y:i};this.recordScrollPosition(),this.selectedTds=this.computeSelectedTds(u,u),this.dragging=!0,this.show();let h=x=>{this.tableMenu&&this.tableMenu.hide(),this.tableModule.tableResize&&this.tableModule.tableResize.hide();let{button:w,target:_,clientX:S,clientY:R}=x,I=_.closest(".ql-table"),O=_.closest("caption");if(w!==0||O||!I||I.dataset.tableId!==a)return;let P={x:S,y:R};this.selectedTds=this.computeSelectedTds(u,P),this.selectedTds.length>1&&this.quill.blur(),this.update()},y=()=>{document.body.removeEventListener("mousemove",h,!1),document.body.removeEventListener("mouseup",y,!1),this.dragging=!1,this.clearRecordScrollPosition(),this.tableMenu&&this.selectedTds.length>0&&this.tableMenu.show()};document.body.addEventListener("mousemove",h,!1),document.body.addEventListener("mouseup",y,!1)});Ae(this,"removeCell",n=>{let e=this.quill.getSelection(),t=document.activeElement;if(!(e||n.key!=="Backspace"&&n.key!=="Delete"||!this.quill.root.contains(t))){if(this.table){let r=qe.find(this.table),i=r.descendants(af);if(this.selectedTds.length===i.length){r.remove();return}}for(let r of this.selectedTds)r.deleteAt(0,r.length()-1)}});this.tableModule=n,this.quill=e,this.options=this.resolveOptions(t),this.scrollRecordEls=[this.quill.root,document.documentElement],this.cellSelectWrap=n.addContainer(this.bem.b()),this.cellSelect=this.helpLinesInitial(),this.resizeObserver=hB(()=>this.updateAfterEvent(),{ignoreFirstBind:!0}),this.resizeObserver.observe(this.quill.root),this.quill.root.addEventListener("mousedown",this.mouseDownHandler,{passive:!1}),document.addEventListener("selectionchange",this.selectionChangeHandler,{passive:!1}),this.quill.on(sv.AFTER_TABLE_RESIZE,this.updateAfterEvent),this.quill.on(qe.events.SELECTION_CHANGE,this.quillSelectionChangeHandler),this.quill.on(qe.events.TEXT_CHANGE,this.updateAfterEvent),this.options.tableMenu&&(this.tableMenu=new this.options.tableMenu(n,e,this.options.tableMenuOptions)),this.hide()}getFirstTextNode(n){for(let e of Array.from(n.childNodes))if(e.nodeType===Node.TEXT_NODE)return e;return n}getLastTextNode(n){for(let e=n.childNodes.length-1;e>=0;e--){let t=n.childNodes[e];if(t.nodeType===Node.TEXT_NODE)return t}return n}getNodeTailOffset(n){let e=document.createRange();return e.selectNodeContents(n),e.collapse(!1),e.startOffset}setSelectionData(n,e){let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:o}=e;if(!t||!i)return;let l=document.createRange(),a=this.selectionDirectionUp(e);a?(l.setStart(t,r),l.setEnd(t,r)):(l.setStart(t,r),l.setEnd(i,o)),n.removeAllRanges(),n.addRange(l),a&&n.extend(i,o)}selectionDirectionUp(n){let{anchorNode:e,anchorOffset:t,focusNode:r,focusOffset:i}=n;if(!e||!r)return!1;if(e===r)return t>i;let o=e.compareDocumentPosition(r);return o&Node.DOCUMENT_POSITION_CONTAINS||o&Node.DOCUMENT_POSITION_CONTAINED_BY?(o&Node.DOCUMENT_POSITION_FOLLOWING)!==0:(o&Node.DOCUMENT_POSITION_PRECEDING)!==0}findWrapSelection(n){let e=null,t=0,r=null,i=0;for(let{node:o,offset:l}of n)o&&((!e||this.selectionDirectionUp({anchorNode:e,anchorOffset:t,focusNode:o,focusOffset:l}))&&(e=o,t=l),(!r||this.selectionDirectionUp({anchorNode:o,anchorOffset:l,focusNode:r,focusOffset:i}))&&(r=o,i=l));return{startNode:e,startOffset:t,endNode:r,endOffset:i}}resolveOptions(n){return Object.assign({selectColor:"#0589f340",tableMenuOptions:{}},n)}helpLinesInitial(){this.cellSelectWrap.style.setProperty("--select-color",this.options.selectColor);let n=document.createElement("div");return n.classList.add(this.bem.be("line")),this.cellSelectWrap.appendChild(n),n}computeSelectedTds(n,e){if(!this.table)return[];let t=qe.find(this.table);if(!t)return[];let r=t.descendants(eg)[0];if(!r)return[];let i=new Set(r.descendants(Df).map((w,_)=>(w.index=_,w))),o=this.getScrollPositionDiff(),{rect:l}=Qm(t);if(!l)return[];let a=n.x+o.x,u=n.y+o.y,h={x:Math.max(l.left,Math.min(e.x,a)),y:Math.max(l.top,Math.min(e.y,u)),x1:Math.min(l.right,Math.max(e.x,a)),y1:Math.min(l.bottom,Math.max(e.y,u))},y=new Set,x=!0;for(;x;){x=!1;for(let w of i){w.__rect||(w.__rect=w.domNode.getBoundingClientRect());let{x:_,y:S,right:R,bottom:I}=w.__rect;if(uB({x:Math.floor(h.x),y:Math.floor(h.y),x1:Math.floor(h.x1),y1:Math.floor(h.y1)},{x:Math.floor(_),y:Math.floor(S),x1:Math.floor(R),y1:Math.floor(I)},tz,y.size===0)){y.add(w),i.delete(w),h={x:Math.min(h.x,_),y:Math.min(h.y,S),x1:Math.max(h.x1,R),y1:Math.max(h.y1,I)},x=!0;break}}}for(let w of[...y,...i])delete w.__rect;return this.boundary=fB({...h,width:h.x1-h.x,height:h.y1-h.y},this.quill.root),Array.from(y).sort((w,_)=>w.index-_.index).map(w=>(delete w.index,w.getCellInner()))}getScrollPositionDiff(){let{x:n,y:e}=this.getTableViewScroll(),{x:t,y:r}=sp(this.quill.root);return this.selectedTableScrollX=n,this.selectedTableScrollY=e,this.selectedEditorScrollX=t,this.selectedEditorScrollY=r,this.startScrollRecordPosition.reduce((i,{x:o,y:l},a)=>{let{x:u,y:h}=sp(this.scrollRecordEls[a]);return i.x+=o-u,i.y+=l-h,i},{x:0,y:0})}recordScrollPosition(){this.clearRecordScrollPosition();for(let n of this.scrollRecordEls)this.startScrollRecordPosition.push(sp(n))}clearRecordScrollPosition(){this.startScrollRecordPosition=[]}updateWithSelectedTds(){if(this.selectedTds.length<=0)return;let n={x:1/0,y:1/0},e={x:-1/0,y:-1/0};for(let t of this.selectedTds){let r=t.domNode.getBoundingClientRect();n.x=Math.min(n.x,r.left),n.y=Math.min(n.y,r.top),e.x=Math.max(e.x,r.right),e.y=Math.max(e.y,r.bottom)}this.selectedTds=this.computeSelectedTds(n,e),this.selectedTds.length>0?this.update():this.hide()}update(){if(this.selectedTds.length===0||!this.boundary||!this.table)return;let{x:n,y:e}=sp(this.quill.root),{x:t,y:r}=this.getTableViewScroll(),i=this.table.parentElement.getBoundingClientRect(),o=this.quill.root.getBoundingClientRect(),l=i.x-o.x,a=i.y-o.y;Object.assign(this.cellSelect.style,{left:`${this.selectedEditorScrollX*2-n+this.boundary.x+this.selectedTableScrollX-t-l}px`,top:`${this.selectedEditorScrollY*2-e+this.boundary.y+this.selectedTableScrollY-r-a}px`,width:`${this.boundary.width}px`,height:`${this.boundary.height}px`}),Object.assign(this.cellSelectWrap.style,{left:`${l}px`,top:`${a}px`,width:`${i.width}px`,height:`${i.height}px`}),!this.dragging&&this.tableMenu&&this.tableMenu.update()}getTableViewScroll(){return this.table?sp(this.table.parentElement):{x:0,y:0}}setSelectionTable(n){this.table!==n&&(this.table=n,this.table?this.scrollRecordEls.push(this.table.parentElement):this.scrollRecordEls.pop())}showDisplay(){Object.assign(this.cellSelectWrap.style,{display:"block"}),this.isDisplaySelection=!0,this.table&&this.resizeObserver.observe(this.table)}show(){this.table&&(K0.call(this),this.update(),this.showDisplay(),document.addEventListener("keydown",this.removeCell),hv.call(this,this.quill.root,()=>{this.update()}),hv.call(this,this.table.parentElement,()=>{this.update()}))}hideDisplay(){Object.assign(this.cellSelectWrap.style,{display:"none"}),this.isDisplaySelection=!1,this.table&&this.resizeObserver.unobserve(this.table)}hide(){K0.call(this),document.removeEventListener("keydown",this.removeCell),this.hideDisplay(),this.boundary=null,this.selectedTds=[],this.setSelectionTable(void 0),this.tableMenu&&this.tableMenu.hide()}destroy(){this.resizeObserver.disconnect(),this.hide(),this.cellSelectWrap.remove(),this.tableMenu&&this.tableMenu.destroy(),K0.call(this),this.quill.root.removeEventListener("mousedown",this.mouseDownHandler),document.removeEventListener("selectionchange",this.selectionChangeHandler),this.quill.off(qe.events.SELECTION_CHANGE,this.quillSelectionChangeHandler),this.quill.off(qe.events.TEXT_CHANGE,this.updateAfterEvent),this.quill.on(sv.AFTER_TABLE_RESIZE,this.updateAfterEvent)}};const Rw=qe.import("parchment"),Yh=qe.import("delta"),rz=qe.import("ui/icons"),iz=qe.import("blots/break"),oz=qe.import("blots/block"),Iw=qe.import("blots/block/embed");function lz(n,{tableId:e,rowId:t,colId:r}){let i={tableId:e,rowId:t,colId:r,colspan:1,rowspan:1},o=n.create(et.tableCell,i),l=n.create(et.tableCellInner,i),a=n.create("block");return a.appendChild(n.create("break")),l.appendChild(a),o.appendChild(l),o}function sz(n,e){return IF({onSelect:(t,r)=>{n.insertTable(t,r),e&&e.close()},customBtn:n.options.customBtn,texts:n.options.texts})}function kw(n){return{bindInHead:!1,key:n?"ArrowUp":"ArrowDown",collapsed:!0,format:[et.tableCellInner],handler(e,t){let r=n?"prev":"next",i=n?"tail":"head";if(t.line[r])return!0;let o=this.quill.selection.getBounds(e.index),l=t.line.domNode.getBoundingClientRect();if(!o||!l)return!0;if(n){if(o.top-l.top>3)return!0}else if(l.bottom-o.bottom>3)return!0;let a,u,h,y;try{[a,u,h,y]=A1(t.line,[et.tableWrapper,et.tableMain,et.tableRow,et.tableCell])}catch{return!0}let x=u.getColIds(),w=a.descendants(J0,0)[0],_;if(w){let R=window.getComputedStyle(w.domNode);_=r==="next"&&R.captionSide==="bottom"?w:r==="next"?a.next:w}else _=a[r];if(t.line[r]||!_)return!0;let S=h[r];if(S){let R=x.indexOf(y.colId),I=S.getCellByColId(x[R],r);if(!I)return!0;let O=I.children[i];O.children&&(O=O.children[i]);let P=O.offset(this.quill.scroll)+Math.min(t.offset,O.length()-1);this.quill.setSelection(P,0,qe.sources.USER)}else{let R=_.offset(this.quill.scroll)+(n?_.length()-1:0);this.quill.setSelection(R,0,qe.sources.USER)}return!1}}}var Sh,az=(Sh=class{constructor(e,t){Ae(this,"quill");Ae(this,"options");Ae(this,"toolBox");Ae(this,"fixTableByLisenter",A4(this.balanceTables,100));Ae(this,"selector");Ae(this,"table");Ae(this,"tableSelection");Ae(this,"tableResize");Ae(this,"tableScrollbar");Ae(this,"tableAlign");Ae(this,"tableResizeScale");Ae(this,"resizeOb");if(this.quill=e,this.options=this.resolveOptions(t||{}),this.toolBox=this.initialContainer(),!this.options.scrollbar){let o=cu("scrollbar");this.quill.container.classList.add(o.bm("origin"))}this.options.selection&&(this.tableSelection=new this.options.selection(this,this.quill,this.options.selectionOptions));let r=this.quill.getModule("toolbar");if(r&&this.quill.theme.pickers){let[,o]=(r.controls||[]).find(([l])=>l===this.statics.toolName)||[];if(o&&o.tagName.toLocaleLowerCase()==="select"){let l=this.quill.theme.pickers.find(a=>a.select===o);l&&(l.label.innerHTML=this.options.icon,this.buildCustomSelect(this.options.customSelect,l),l.label.addEventListener("mousedown",()=>{if(!this.selector||!l)return;let a=this.selector.getBoundingClientRect(),{leftLimited:u}=dB(a);if(u){let h=l.label.getBoundingClientRect();Object.assign(l.options.style,{transform:`translateX(calc(-100% + ${h.width}px))`})}else Object.assign(l.options.style,{transform:void 0})}))}}let i=this.quill.getModule("keyboard");for(let o of Object.values(Sh.keyboradHandler))o.bindInHead?i.bindings[o.key].unshift(o):i.addBinding(o.key,o);this.quill.root.addEventListener("click",o=>{let l=o.composedPath();if(!l||l.length<=0)return;let a=l.find(u=>u.tagName&&u.tagName.toUpperCase()==="TABLE"&&u.classList.contains("ql-table"));if(a){if(this.table===a){this.tableSelection&&this.tableSelection.show(),this.tableAlign&&this.tableAlign.update(),this.tableResize&&this.tableResize.update(),this.tableScrollbar&&this.tableScrollbar.update();return}this.table&&this.hideTableTools(),this.showTableTools(a)}else this.table&&this.hideTableTools()},!1),this.quill.on(qe.events.EDITOR_CHANGE,o=>{o===qe.events.TEXT_CHANGE&&(!this.table||!this.quill.root.contains(this.table))&&this.hideTableTools()}),this.quillHack(),this.listenBalanceCells()}static register(){jg.allowedChildren=[Nf],Nf.allowedChildren=[eg,Tg,J0],Nf.requiredContainer=jg,J0.requiredContainer=Nf,Tg.allowedChildren=[Ig],Tg.requiredContainer=Nf,eg.allowedChildren=[qd],eg.requiredContainer=Nf,qd.allowedChildren=[Df],Df.requiredContainer=eg,Df.allowedChildren=[af,iz],Df.requiredContainer=qd,af.requiredContainer=Df;let e=new Set(["table"]),t=Object.entries(qe.imports).filter(([i,o])=>{let l=i.split("formats/")[1];return i.startsWith("formats/")&&!e.has(l)&&!R0(o,Rw.Attributor)&&(R0(o,oz)||R0(o,Iw))}),r=t.reduce((i,[o,l])=>{let a=R0(l,Iw)?Aw:om;return i[o]=class extends CF(l,[a]){static register(){}},i},{});qe.register({"blots/scroll":_B,"blots/block":om,"blots/block/embed":Aw,...r,[`blots/${et.container}`]:hg,[`formats/${et.tableCell}`]:Df,[`formats/${et.tableCellInner}`]:af,[`formats/${et.tableRow}`]:qd,[`formats/${et.tableBody}`]:eg,[`formats/${et.tableCol}`]:Ig,[`formats/${et.tableColgroup}`]:Tg,[`formats/${et.tableCaption}`]:J0,[`formats/${et.tableMain}`]:Nf,[`formats/${et.tableWrapper}`]:jg,"modules/clipboard":OB},!0)}get statics(){return this.constructor}initialContainer(){let e=cu("toolbox"),t=this.quill.addContainer(e.b()),r=()=>{let i=this.quill.root.getBoundingClientRect(),{offsetLeft:o,offsetTop:l}=this.quill.root;Object.assign(t.style,{top:`${l}px`,left:`${o}px`,width:`${i.width}px`,height:`${i.height}px`})};return this.resizeOb=new ResizeObserver(r),this.resizeOb.observe(this.quill.root),t}addContainer(e){if(Lg(e)){let t=document.createElement("div");for(let r of e.split(" "))t.classList.add(r);return this.toolBox.appendChild(t),t}else return this.toolBox.appendChild(e),e}resolveOptions(e){return Object.assign({customBtn:!1,texts:this.resolveTexts(e.texts||{}),full:!1,fullSwitch:!0,icon:rz.table,selectionOptions:{},alignOptions:{},scrollbarOptions:{},resizeOptions:{},resizeScaleOptions:{},autoMergeCell:!0},e)}resolveTexts(e){return Object.assign({fullCheckboxText:"Insert full width table",customBtnText:"Custom",confirmText:"Confirm",cancelText:"Cancel",rowText:"Row",colText:"Column",notPositiveNumberError:"Please enter a positive integer",custom:"Custom",clear:"Clear",transparent:"Transparent",perWidthInsufficient:"The percentage width is insufficient. To complete the operation, the table needs to be converted to a fixed width. Do you want to continue?",CopyCell:"Copy cell",CutCell:"Cut cell",InsertTop:"Insert row above",InsertRight:"Insert column right",InsertBottom:"Insert row below",InsertLeft:"Insert column Left",MergeCell:"Merge Cell",SplitCell:"Split Cell",DeleteRow:"Delete Row",DeleteColumn:"Delete Column",DeleteTable:"Delete table",BackgroundColor:"Set background color",BorderColor:"Set border color"},e)}quillHack(){var i;let e=this.quill.getSemanticHTML;this.quill.getSemanticHTML=(o=0,l)=>{let a=e.call(this.quill,o,l),u=qe.import(`formats/${et.tableWrapper}`),h=new DOMParser,y=h.parseFromString(a,"text/html");for(let x of Array.from(y.querySelectorAll(`.${u.className} caption[contenteditable], .${u.className} td > [contenteditable]`)))x.removeAttribute("contenteditable");return y.body.innerHTML};let t=this.quill.format;this.quill.format=function(o,l,a=qe.sources.API){if(!(this.scroll.query(o).prototype instanceof Rw.EmbedBlot)){let h=this.getModule(Ib.moduleName),y=this.getSelection(!0);if(!this.getFormat(y)[et.tableCellInner]||y.length>0||h&&h.tableSelection&&h.tableSelection.selectedTds.length<=1)return t.call(this,o,l,a);if(h&&h.tableSelection&&h.tableSelection.selectedTds.length>0){let w=h.tableSelection.selectedTds,_=!1,S=[];for(let P of w){let Y=P.offset(this.scroll),z=P.length();S.push({index:Y,length:z}),this.getFormat(Y,z)[o]!==l&&(_=!0)}let R=_?l:!1,I=new Yh;for(let[P,{index:Y,length:z}]of S.entries()){let W=P===0?0:S[P-1].index+S[P-1].length;I.retain(Y-W).retain(z,{[o]:R})}let O=this.updateContents(I,a);return this.blur(),O}}return t.call(this,o,l,a)};let r=this.quill.theme.modules.toolbar;if(r){let o=(i=r.handlers)==null?void 0:i.clean;if(o){let l=(a,u,h=()=>"")=>{let y=this.quill.getText(a,u),[x,w]=this.quill.getLine(a+u),_=0,S=new Yh;x!=null&&(_=x.length()-w,S=x.delta().slice(w,w+_-1).insert(`
|
|
459
|
+
`));let R=this.quill.getContents(a,u+_),I=R.diff(new Yh().insert(y).concat(S)),O=0,P=I.ops.map(Y=>{let{attributes:z,...W}=Y;if(Y.insert?O-=Lg(Y.insert)?Y.insert.length:1:Y.retain?O+=SF(Y.retain)?Y.retain:1:Y.delete&&(O+=Y.delete),z){let{[et.tableCellInner]:B,...ee}=z;if(h){let H=R.slice(O-1,O).ops[0];if(H&&H.attributes&&H.attributes[et.tableCellInner]){let V=H.attributes[et.tableCellInner],{style:de,...Z}=V,te=h(de);return te?{...W,attributes:{...ee,[et.tableCellInner]:{style:te,...Z}}}:{...W,attributes:{...ee,[et.tableCellInner]:Z}}}}return{...W,attributes:{...ee}}}return Y});return new Yh(P)};r.handlers.clean=function(a){let u=this.quill.getModule(Ib.moduleName),h=this.quill.getSelection();if(h&&h.length>0&&this.quill.getFormat(h)[et.tableCellInner]){let x=l(h.index,h.length,!1),w=new Yh().retain(h.index).concat(x);this.quill.updateContents(w,qe.sources.USER);return}if(u&&u.tableSelection&&u.tableSelection.selectedTds.length>0&&u.tableSelection.table){let y=qe.find(u.tableSelection.table);if(!y){console.warn("TableMainFormat not found");return}let x=u.tableSelection.selectedTds,w=new Set,_=[];for(let P of x)if(P.parent instanceof Df){for(let Y of P.parent.getNearByCell("top"))w.has(Y)||(w.add(Y),_.push({td:Y,cleanBorder:"bottom"}));for(let Y of P.parent.getNearByCell("left"))w.has(Y)||(w.add(Y),_.push({td:Y,cleanBorder:"right"}));w.add(P.parent),_.push({td:P.parent,cleanBorder:!0})}let S=y.descendants(Df),R=new Map(S.map((P,Y)=>[P,Y]));_.sort((P,Y)=>R.get(P.td)-R.get(Y.td));let I=new Yh,O=0;for(let{td:P,cleanBorder:Y}of _){let z=P.getCellInner().offset(this.quill.scroll),W=P.getCellInner().length(),B=l(z,W-1,H=>{if(!H||Y===!0)return"";let V=gv(H),de=Object.keys(V).filter(Z=>!Z.startsWith(I1(`border-${Y}`))).reduce((Z,te)=>(Z[te]=V[te],Z),{});return im(de)}),ee=new Yh().retain(z-O).concat(B);I=I.concat(ee),O=z+W}this.quill.updateContents(I,qe.sources.USER),x.length>1&&this.quill.blur();return}return o.call(this,a)}}}}showTableTools(e){var t;e&&(this.table=e,(t=this.tableSelection)==null||t.show(),this.options.align&&(this.tableAlign=new this.options.align(this,e,this.quill,this.options.alignOptions)),this.options.scrollbar&&(this.tableScrollbar=new this.options.scrollbar(this,e,this.quill,this.options.scrollbarOptions)),this.options.resize&&(this.tableResize=new this.options.resize(this,e,this.quill,this.options.resizeOptions)),this.options.resizeScale&&(this.tableResizeScale=new this.options.resizeScale(this,e,this.quill,this.options.resizeScaleOptions)))}hideTableTools(){var e;(e=this.tableSelection)==null||e.hide(),this.tableScrollbar&&(this.tableScrollbar.destroy(),this.tableScrollbar=void 0),this.tableAlign&&(this.tableAlign.destroy(),this.tableAlign=void 0),this.tableResize&&(this.tableResize.destroy(),this.tableResize=void 0),this.tableResizeScale&&this.tableResizeScale.destroy(),this.table=void 0}async buildCustomSelect(e,t){if(!e||!tm(e))return;let r=document.createElement("div");if(r.classList.add("ql-custom-select"),this.selector=await e(this,t),r.appendChild(this.selector),this.options.fullSwitch){let i=cu("creator"),o=document.createElement("label");o.classList.add(i.be("checkbox"));let l=document.createElement("input");l.type="checkbox",l.checked=this.options.full,l.addEventListener("change",()=>{this.options.full=l.checked});let a=document.createElement("span");a.textContent=this.options.texts.fullCheckboxText,o.appendChild(l),o.appendChild(a),r.appendChild(o)}t.options.innerHTML="",t.options.appendChild(r)}setCellAttrs(e,t,r,i=!1){if(e.length!==0)for(let o of e)o.setFormatValue(t,r,i)}getTextByCell(e){let t="";for(let r of e){let i=r.offset(this.quill.scroll),o=r.length();for(let l of this.quill.getContents(i,o).ops)Lg(l.insert)&&(t+=l.insert)}return t}getHTMLByCell(e,t=!1){if(e.length===0)return"";let r=null;try{for(let I of e){let O=Kl(I,et.tableMain);if(r||(r=O),O!==r)return console.error("tableMain is not same"),""}}catch{return console.error("tds must be in same tableMain"),""}if(!r)return"";let i=this.quill.getIndex(r),o=r.length(),l=this.quill.getSemanticHTML(i,o),a=new DOMParser,u=a.parseFromString(l,"text/html"),h=[],y=new Set,x=new Set;for(let I of e)y.add(I.colId),x.add(`${I.rowId}-${I.colId}`);for(let I of Array.from(u.querySelectorAll("col")))y.has(I.dataset.colId)?h.push(I.getAttribute("width")):I.remove();let w=0,_=null;for(let I of Array.from(u.querySelectorAll("td")))if(x.has(`${I.dataset.rowId}-${I.dataset.colId}`))_!==I.dataset.rowId&&(w+=1,_=I.dataset.rowId);else{let O=I.parentElement;I.remove(),O&&O.children.length<=0&&O.remove()}let S=Array.from(u.querySelectorAll("col")),R=S.map(I=>Ig.value(I));if(r.full){let I=R.reduce((O,P)=>P.width+O,0);for(let[O,P]of R.entries())P.width=Math.round(P.width/I*100),S[O].setAttribute("width",`${P.width}%`)}else{let I=0;for(let P of R)I+=P.width;let O=u.querySelector("table");O.style.width=`${I}px`}if(t){let I=r.getRows();if(w===I.length)this.removeCol(e);else for(let O of e)O.domNode.innerHTML="<p><br></p>"}return u.body.innerHTML}insertTable(e,t){if(e>=30||t>=30)throw Error("Both rows and columns must be less than 30.");this.quill.focus();let r=this.quill.getSelection();if(r==null)return;let[i]=this.quill.getLeaf(r.index);if(!i)return;if(l4(i))throw Error(`Not supported ${i.statics.blotName} insert into table.`);let o=this.calculateTableCellBorderWidth(),l=getComputedStyle(this.quill.root),a=Number.parseInt(l.paddingLeft),u=Number.parseInt(l.paddingRight),h=Number.parseInt(l.width)-a-u-o,y=Ba(),x=Array(t).fill(0).map(()=>Ba()),w=this.options.full?`${Math.max(1/t*100,Ss.colMinWidthPre)}%`:`${Math.max(Math.floor(h/t),Ss.colMinWidthPx)}px`,_=[{retain:r.index}],S=this.quill.getContents(r.index,1),[,R]=this.quill.getLine(r.index);S.ops[0].insert!==`
|
|
460
460
|
`&&R!==0&&_.push({insert:`
|
|
461
461
|
`});for(let I=0;I<t;I++)_.push({insert:{[et.tableCol]:{width:w,tableId:y,colId:x[I],full:this.options.full}}});for(let I=0;I<e;I++){let O=Ba();for(let P=0;P<t;P++)_.push({insert:`
|
|
462
462
|
`,attributes:{[et.tableCellInner]:{tableId:y,rowId:O,colId:x[P],rowspan:1,colspan:1}}})}this.quill.updateContents(new Yh(_),qe.sources.USER),this.quill.setSelection(r.index+t,qe.sources.SILENT),this.quill.focus()}calculateTableCellBorderWidth(){let e=`
|
|
@@ -467,21 +467,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
467
467
|
</tr>
|
|
468
468
|
</tbody>
|
|
469
469
|
</table>
|
|
470
|
-
`,t=document.createElement("div");t.className=jg.className,t.innerHTML=e,t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.visibility="hidden",this.quill.root.appendChild(t);let r=window.getComputedStyle(t.querySelector("td")),i=Number.parseFloat(r.borderWidth)||0;return this.quill.root.removeChild(t),i}fixUnusuaDeletelTable(e){let t=e.getRows(),r=e.getColIds();if(t.length===0)return e.remove();if(r.length===0)return;let i=Array(t.length).fill(0).map(()=>Array(r.length).fill(!1)),o=e.tableId;for(let[l,a]of t.entries()){let u=0,h=0,y=i[l],x=a.descendants(Df);for(;h<r.length;){if(y[h]){h+=1;continue}let w=x[u];if(!w||w.colId!==r[h])a.insertBefore(nz(this.quill.scroll,{tableId:o,colId:r[h],rowId:a.rowId}),w);else{l+w.rowspan-1>=t.length&&(w.getCellInner().rowspan=t.length-l);let{colspan:_,rowspan:S}=w;if(_>1)for(let R=1;R<_;R++)y[h+R]=!0;if(S>1)for(let R=l+1;R<l+S;R++)for(let I=0;I<_;I++)i[R][h+I]=!0;u+=1}h+=1}if(u<x.length)for(let w=u;w<x.length;w++)x[w].remove()}}balanceTables(){for(let e of this.quill.scroll.descendants(Nf))e.checkEmptyCol(this.options.autoMergeCell),e.checkEmptyRow(this.options.autoMergeCell),this.fixUnusuaDeletelTable(e)}listenBalanceCells(){this.quill.on(qe.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.fixTableByLisenter(),!0):!1);for(let t of e){let r=t.target;if(r.tagName==="TABLE"){let i=qe.find(r);if(i){i.sortMergeChildren();break}}}})}deleteTable(e){if(e.length===0)return;let t=Kl(e[0],et.tableMain);t&&t.remove(),this.hideTableTools()}appendRow(e,t){if(e.length<=0)return;let r=e[t?e.length-1:0],[i,o,l]=A1(r,[et.tableMain,et.tableBody,et.tableRow]),a=i.getRows(),u=a.indexOf(l),h=u+(t?r.rowspan:0);o.insertRow(h)}appendCol(e,t){if(e.length<=0)return;let[r]=e.reduce((w,_)=>{let S=_.getColumnIndex();return(!t&&S<=w[1]||t&&S>=w[1])&&(w=[_,S]),w},[e[0],e[0].getColumnIndex()]),i=r.getColumnIndex()+(t?r.colspan:0),o=Kl(r,et.tableMain),l=o.tableId,a=Ba(),[u]=o.descendants(Tg);u&&u.insertColByIndex(i,{tableId:l,colId:a,width:o.full?6:160,full:o.full});let h=o.getRows(),y=[],x=0;for(let w of Object.values(h)){let _=y.shift()||0;if(x>0){--x;continue}let S=w.insertCell(i-_,{tableId:l,rowId:w.rowId,colId:a,rowspan:1,colspan:1});S.skipRowNum&&(x+=S.skipRowNum);for(let[R,I]of S.entries())y[R]=(y[R]||0)+I}}fixTableByRemove(e){if(!this.options.autoMergeCell)return;let t=e.getRows(),r=e.getCols(),i=r.reduce((u,h)=>(u[h.colId]=0,u),{}),o=[...t].reverse(),l=[];for(let[u,h]of o.entries()){let y=t.length-u-1;h.children.length<=0?l.push(y):h.foreachCellInner(x=>{let w=l.reduce((_,S)=>x.rowspan+y>S?_+1:_,0);x.rowspan-=w,i[x.colId]+=1})}let a=0;for(let u of Object.values(i))if(u===0){let h=[],y=0;for(let x of Object.values(t)){let w=h.shift()||0,_=[];y>0?(_=x.getCellByColumIndex(a-w)[2],--y):(_=x.removeCell(a-w),_.skipRowNum&&(y+=_.skipRowNum));for(let[S,R]of _.entries())h[S]=(h[S]||0)+R}}else a+=1;for(let u of r)i[u.colId]===0&&(u.prev?u.prev.width+=u.width:u.next&&(u.next.width+=u.width),u.remove())}removeRow(e){if(e.length<=0)return;let t=e[0],r=Kl(t,et.tableMain),i=r.getRows(),o=i.length,l=-1;for(let u of e){let h=Kl(u,et.tableRow),y=i.indexOf(h);y<o&&(o=y),y+u.rowspan>l&&(l=y+u.rowspan)}let a={};for(let u=o;u<Math.min(i.length,l);u++){let h=i[u];h.foreachCellInner(y=>{y.rowspan+u>l&&(a[y.colId]={rowspan:y.rowspan+u-l,colspan:y.colspan,colIndex:y.getColumnIndex()}),y.parent.remove()}),h.length()===0&&h.remove()}if(i[l]){let u=i[l],h=r.tableId;for(let[y,{colIndex:x,colspan:w,rowspan:_}]of Object.entries(a))u.insertCell(x,{tableId:h,rowId:u.rowId,colId:y,colspan:w,rowspan:_})}this.fixTableByRemove(r)}removeCol(e){if(e.length<=0)return;let t=e[0],r=Kl(t,et.tableMain),i={};for(let h of e)i[h.rowId]||(i[h.rowId]=0),i[h.rowId]+=h.colspan;let o=Math.max(...Object.values(i)),l=t.getColumnIndex(),a=r.descendants(qd);for(let h=0;h<o;h++){let y=[],x=0;for(let w of Object.values(a)){let _=y.shift()||0;if(x>0){--x;continue}let S=w.removeCell(l-_);S.skipRowNum&&(x+=S.skipRowNum);for(let[R,I]of S.entries())y[R]=(y[R]||0)+I}}let[u]=r.descendants(Tg);if(u)for(let h=0;h<o;h++)u.removeColByIndex(l);this.fixTableByRemove(r)}mergeCells(e){if(e.length<=1)return;let t=e.reduce((a,u,h)=>{let y=u.colId;a[0][y]||(a[0][y]=0),a[0][y]+=u.rowspan;let x=u.rowId;return a[1][x]||(a[1][x]=0),a[1][x]+=u.colspan,h!==0&&(u.moveChildren(a[2]),u.parent.remove()),a},[{},{},e[0]]),r=Math.max(...Object.values(t[0])),i=Math.max(...Object.values(t[1])),o=t[2];o.colspan=i,o.rowspan=r;let l=Kl(o,et.tableMain);this.fixTableByRemove(l)}splitCell(e){if(e.length!==1)return;let t=e[0];if(t.colspan===1&&t.rowspan===1)return;let[r,i]=A1(t,[et.tableMain,et.tableRow]),o=r.tableId,l=t.getColumnIndex(),a=r.getColIds().slice(l,l+t.colspan).reverse(),u=t.formats()[et.tableCellInner].style,h=i,y=t.rowspan;for(t.colspan=1,t.rowspan=1;h&&y>0;){for(let x of a){if(h===i&&x===t.colId)continue;let w={tableId:o,rowId:h.rowId,colId:x,rowspan:1,colspan:1};u&&(w.style=u),h.insertCell(l+(h===i?1:0),w)}--y,h=h.next}}},Ae(Sh,"moduleName",Ib.moduleName),Ae(Sh,"toolName",et.tableWrapper),Ae(Sh,"keyboradHandler",{"forbid remove table by backspace":{bindInHead:!0,key:"Backspace",collapsed:!0,offset:0,handler(e,t){let r=this.quill.getLine(e.index),i=r[0];return i.prev instanceof jg?(i.prev.remove(),!1):!(t.format[et.tableCellInner]&&i.offset(Kl(i,et.tableCellInner))===0)}},"forbid remove table by delete":{bindInHead:!0,key:"Delete",collapsed:!0,handler(e,t){let r=this.quill.getLine(e.index),i=r[0],o=r[1];if((i.next instanceof jg||i.next instanceof Ig)&&o===i.length()-1)return!1;if(t.format[et.tableCellInner]){let l=Kl(i,et.tableCellInner);if(i===l.children.tail&&o===i.length()-1)return!1}return!0}},"table up":kw(!0),"table down":kw(!1),"table caption break":{bindInHead:!0,key:"Enter",shiftKey:null,format:[et.tableCaption],handler(e,t){return!1}}}),Sh),T4=iz;const oz="_AEditorContainer_e2odv_1",lz="_AEditor_e2odv_1",sz="_Primary_e2odv_19",az="_ReadOnly_e2odv_49",cz="_Raw_e2odv_123",uz="_Limit_e2odv_140",fz="_Resizer_e2odv_145",dz="_Resizing_e2odv_178",vd={AEditorContainer:oz,AEditor:lz,Primary:sz,"ql-toolbar":"_ql-toolbar_e2odv_19","ql-snow":"_ql-snow_e2odv_19",ReadOnly:az,Error:"_Error_e2odv_86",Raw:cz,Limit:uz,Resizer:fz,Resizing:dz,"ql-image-resizer-overlay":"_ql-image-resizer-overlay_e2odv_188","ql-image-resizer-handle":"_ql-image-resizer-handle_e2odv_195","ql-image-resizer-display":"_ql-image-resizer-display_e2odv_205","ql-image-resizer-toolbar":"_ql-image-resizer-toolbar_e2odv_216","ql-image-resizer-toolbar-button":"_ql-image-resizer-toolbar-button_e2odv_224"};class hz{constructor(e,t={}){Ae(this,"quill");Ae(this,"cleanupFunctions",[]);this.quill=e,t.isTitleMode&&this.setupTitleModePaste()}setupTitleModePaste(){const e=this.quill.root,t=r=>{if(r.preventDefault(),!r.clipboardData)return;const i=r.clipboardData.getData("text/html"),o=r.clipboardData.getData("text/plain"),l=this.quill.getSelection(!0);if(l)if(l.length>0&&this.quill.deleteText(l.index,l.length,qe.sources.USER),i){const a=document.createElement("div");a.innerHTML=i,this.replaceBreaksWithSpaces(a);const h=this.quill.getModule("clipboard").convert({html:a.innerHTML});this.quill.updateContents(h,qe.sources.USER),setTimeout(()=>{const y=h.reduce((x,w)=>x+(typeof w.insert=="string"?w.insert.length:1),0);this.quill.setSelection(l.index+y,0,qe.sources.SILENT)},0)}else{const a=o.replace(/[\r\n]+/g," ").trim();this.quill.insertText(l.index,a,qe.sources.USER),this.quill.setSelection(l.index+a.length,0,qe.sources.SILENT)}};e.addEventListener("paste",t,{capture:!0}),this.cleanupFunctions.push(()=>{e.removeEventListener("paste",t,{capture:!0})})}replaceBreaksWithSpaces(e){var i,o;const t=l=>{var a;if(l.nodeType===Node.TEXT_NODE)l.textContent=((a=l.textContent)==null?void 0:a.replace(/[\r\n]+/g," "))??"";else for(const u of Array.from(l.childNodes))t(u)};t(e);const r=e.querySelectorAll("br, p, div");for(const l of Array.from(r))l.tagName==="BR"?(i=l.parentNode)==null||i.replaceChild(document.createTextNode(" "),l):(l.tagName==="P"||l.tagName==="DIV")&&l.nextSibling&&!((o=l.textContent)!=null&&o.endsWith(" "))&&l.appendChild(document.createTextNode(" "));e.innerHTML=e.innerHTML.replace(/\s+$/,""),e.innerHTML=e.innerHTML.replace(/\s{2,}/g," ")}destroy(){this.cleanupFunctions.forEach(e=>e()),this.cleanupFunctions=[]}async copyContent(e){var t;try{const r=this.quill.getText(),i=this.quill.root.innerHTML;return this.copyToClipboard(r,i,e)}catch(r){return console.error("Error in copyContent:",r),(t=e==null?void 0:e.onError)==null||t.call(e),!1}}async copyToClipboard(e,t,r){var i,o;try{return await this.tryModernClipboardWithHtml(e,t,r)||await this.tryModernClipboardText(e,r)||t&&this.tryLegacyClipboardWithHtml(t,r)||this.tryLegacyClipboardText(e,r)?!0:((i=r==null?void 0:r.onError)==null||i.call(r),!1)}catch(l){return console.error("복사 중 오류 발생:",l),(o=r==null?void 0:r.onError)==null||o.call(r),!1}}async tryModernClipboardWithHtml(e,t,r){var i;if(!navigator.clipboard||!t||!window.ClipboardItem||!window.isSecureContext)return!1;try{return await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([t],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]),(i=r==null?void 0:r.onSuccess)==null||i.call(r),!0}catch{return!1}}async tryModernClipboardText(e,t){var r;if(!navigator.clipboard||!window.isSecureContext)return!1;try{return await navigator.clipboard.writeText(e),(r=t==null?void 0:t.onSuccess)==null||r.call(t),!0}catch{return!1}}tryLegacyClipboardWithHtml(e,t){const r=document.createElement("div");r.innerHTML=e,r.style.cssText="position:fixed;left:-9999px;top:-9999px;opacity:0;",document.body.appendChild(r);try{const i=document.createRange();i.selectNodeContents(r);const o=window.getSelection();return o?(o.removeAllRanges(),o.addRange(i),this.tryClipboardEventCopy({html:e,text:r.textContent??""},t)):!1}finally{document.body.removeChild(r)}}tryLegacyClipboardText(e,t){const r=document.createElement("textarea");r.value=e,r.style.cssText="position:fixed;left:-9999px;top:-9999px;opacity:0;",document.body.appendChild(r);try{return r.focus(),r.select(),this.tryClipboardEventCopy({text:e},t)}finally{document.body.removeChild(r)}}tryClipboardEventCopy(e,t){var o;let r=!1;const i=l=>{l.preventDefault(),l.clipboardData&&(l.clipboardData.setData("text/plain",e.text),e.html&&l.clipboardData.setData("text/html",e.html),r=!0)};document.addEventListener("copy",i);try{const l=new ClipboardEvent("copy",{clipboardData:new DataTransfer});if(document.dispatchEvent(l),r)return(o=t==null?void 0:t.onSuccess)==null||o.call(t),!0}catch{return!1}return document.removeEventListener("copy",i),!1}}const gz=qe.import("blots/block/embed"),pz=qe.import("ui/icons");pz.divider=s1.renderToString(k.jsx(ho,{icon:"Minus",strokeWidth:2.5,width:"100%"}));class sm extends gz{static create(e){const t=super.create(e);return t.style.border="var(--AEditor_Addon_Primary_border)",t.style.borderBottom="none",t.style.transition="border var(--Transition)",t}}Ae(sm,"blotName","divider"),Ae(sm,"tagName","hr");class vz{constructor(e,t){this.debug=e,this.suppressErrorLogging=t}prefixString(){return"</> quill-image-compress: "}get log(){return this.debug?console.warn.bind(console,this.prefixString()):()=>{}}get error(){return this.suppressErrorLogging?()=>{}:console.error.bind(console,this.prefixString())}get warn(){return this.suppressErrorLogging?()=>{}:console.warn.bind(console,this.prefixString())}}async function R4(n){const e=new FileReader,t=new Promise((r,i)=>{e.addEventListener("load",()=>{const o=e.result;typeof o=="string"?r(o):i(new Error("could not convert file to base64"))},!1)});return e.readAsDataURL(n),t}function bz(n,e,t,r){if(t&&r&&n<=t&&e<=r)return[n,e];if(t&&n>t){const i=t,o=Math.floor(e/n*i);if(r&&o>r){const l=r;return[Math.floor(n/e*l),l]}else return[i,o]}if(r&&e>r){const i=r;return[Math.floor(n/e*i),i]}return[n,e]}async function yz(n,e,t={}){const r=e.split(";")[0].split(":")[1],{maxWidth:i,maxHeight:o,imageType:l="image/jpeg",keepImageTypes:a,ignoreImageTypes:u,imageQuality:h=.7}=t,y=new Image;y.src=e,await new Promise(I=>{y.onload=()=>{I()}});const[x,w]=bz(y.width,y.height,i,o),_=document.createElement("canvas");_.width=x,_.height=w;const S=_.getContext("2d");if(l==="image/jpeg"&&(S.fillStyle="#FFFFFF",S.fillRect(0,0,y.width,y.height)),u!=null&&u.includes(r))return e;a!=null&&a.includes(r)&&(t.imageType=r),S.drawImage(y,0,0,x,w);const R=_.toDataURL(t.imageType??l,h);return n.log("downscaling image...",{args:{dataUrl:e,...t},newHeight:w,newWidth:x}),R}function mz(n,e){n.maxWidth??(n.maxWidth=1e3),n.maxHeight??(n.maxHeight=1e3),xz(n,e),wz(n,e),Cz(n,e),_z(n,e),Sz(n,e)}function xz(n,e){n.maxWidth&&typeof n.maxWidth!="number"&&(e.warn(`[config error] 'maxWidth' is required to be a "number" (in pixels),
|
|
470
|
+
`,t=document.createElement("div");t.className=jg.className,t.innerHTML=e,t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.visibility="hidden",this.quill.root.appendChild(t);let r=window.getComputedStyle(t.querySelector("td")),i=Number.parseFloat(r.borderWidth)||0;return this.quill.root.removeChild(t),i}fixUnusuaDeletelTable(e){let t=e.getRows(),r=e.getColIds();if(t.length===0)return e.remove();if(r.length===0)return;let i=Array(t.length).fill(0).map(()=>Array(r.length).fill(!1)),o=e.tableId;for(let[l,a]of t.entries()){let u=0,h=0,y=i[l],x=a.descendants(Df);for(;h<r.length;){if(y[h]){h+=1;continue}let w=x[u];if(!w||w.colId!==r[h])a.insertBefore(lz(this.quill.scroll,{tableId:o,colId:r[h],rowId:a.rowId}),w);else{l+w.rowspan-1>=t.length&&(w.getCellInner().rowspan=t.length-l);let{colspan:_,rowspan:S}=w;if(_>1)for(let R=1;R<_;R++)y[h+R]=!0;if(S>1)for(let R=l+1;R<l+S;R++)for(let I=0;I<_;I++)i[R][h+I]=!0;u+=1}h+=1}if(u<x.length)for(let w=u;w<x.length;w++)x[w].remove()}}balanceTables(){for(let e of this.quill.scroll.descendants(Nf))e.checkEmptyCol(this.options.autoMergeCell),e.checkEmptyRow(this.options.autoMergeCell),this.fixUnusuaDeletelTable(e)}listenBalanceCells(){this.quill.on(qe.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.fixTableByLisenter(),!0):!1);for(let t of e){let r=t.target;if(r.tagName==="TABLE"){let i=qe.find(r);if(i){i.sortMergeChildren();break}}}})}deleteTable(e){if(e.length===0)return;let t=Kl(e[0],et.tableMain);t&&t.remove(),this.hideTableTools()}appendRow(e,t){if(e.length<=0)return;let r=e[t?e.length-1:0],[i,o,l]=A1(r,[et.tableMain,et.tableBody,et.tableRow]),a=i.getRows(),u=a.indexOf(l),h=u+(t?r.rowspan:0);o.insertRow(h)}appendCol(e,t){if(e.length<=0)return;let[r]=e.reduce((w,_)=>{let S=_.getColumnIndex();return(!t&&S<=w[1]||t&&S>=w[1])&&(w=[_,S]),w},[e[0],e[0].getColumnIndex()]),i=r.getColumnIndex()+(t?r.colspan:0),o=Kl(r,et.tableMain),l=o.tableId,a=Ba(),[u]=o.descendants(Tg);u&&u.insertColByIndex(i,{tableId:l,colId:a,width:o.full?6:160,full:o.full});let h=o.getRows(),y=[],x=0;for(let w of Object.values(h)){let _=y.shift()||0;if(x>0){--x;continue}let S=w.insertCell(i-_,{tableId:l,rowId:w.rowId,colId:a,rowspan:1,colspan:1});S.skipRowNum&&(x+=S.skipRowNum);for(let[R,I]of S.entries())y[R]=(y[R]||0)+I}}fixTableByRemove(e){if(!this.options.autoMergeCell)return;let t=e.getRows(),r=e.getCols(),i=r.reduce((u,h)=>(u[h.colId]=0,u),{}),o=[...t].reverse(),l=[];for(let[u,h]of o.entries()){let y=t.length-u-1;h.children.length<=0?l.push(y):h.foreachCellInner(x=>{let w=l.reduce((_,S)=>x.rowspan+y>S?_+1:_,0);x.rowspan-=w,i[x.colId]+=1})}let a=0;for(let u of Object.values(i))if(u===0){let h=[],y=0;for(let x of Object.values(t)){let w=h.shift()||0,_=[];y>0?(_=x.getCellByColumIndex(a-w)[2],--y):(_=x.removeCell(a-w),_.skipRowNum&&(y+=_.skipRowNum));for(let[S,R]of _.entries())h[S]=(h[S]||0)+R}}else a+=1;for(let u of r)i[u.colId]===0&&(u.prev?u.prev.width+=u.width:u.next&&(u.next.width+=u.width),u.remove())}removeRow(e){if(e.length<=0)return;let t=e[0],r=Kl(t,et.tableMain),i=r.getRows(),o=i.length,l=-1;for(let u of e){let h=Kl(u,et.tableRow),y=i.indexOf(h);y<o&&(o=y),y+u.rowspan>l&&(l=y+u.rowspan)}let a={};for(let u=o;u<Math.min(i.length,l);u++){let h=i[u];h.foreachCellInner(y=>{y.rowspan+u>l&&(a[y.colId]={rowspan:y.rowspan+u-l,colspan:y.colspan,colIndex:y.getColumnIndex()}),y.parent.remove()}),h.length()===0&&h.remove()}if(i[l]){let u=i[l],h=r.tableId;for(let[y,{colIndex:x,colspan:w,rowspan:_}]of Object.entries(a))u.insertCell(x,{tableId:h,rowId:u.rowId,colId:y,colspan:w,rowspan:_})}this.fixTableByRemove(r)}removeCol(e){if(e.length<=0)return;let t=e[0],r=Kl(t,et.tableMain),i={};for(let h of e)i[h.rowId]||(i[h.rowId]=0),i[h.rowId]+=h.colspan;let o=Math.max(...Object.values(i)),l=t.getColumnIndex(),a=r.descendants(qd);for(let h=0;h<o;h++){let y=[],x=0;for(let w of Object.values(a)){let _=y.shift()||0;if(x>0){--x;continue}let S=w.removeCell(l-_);S.skipRowNum&&(x+=S.skipRowNum);for(let[R,I]of S.entries())y[R]=(y[R]||0)+I}}let[u]=r.descendants(Tg);if(u)for(let h=0;h<o;h++)u.removeColByIndex(l);this.fixTableByRemove(r)}mergeCells(e){if(e.length<=1)return;let t=e.reduce((a,u,h)=>{let y=u.colId;a[0][y]||(a[0][y]=0),a[0][y]+=u.rowspan;let x=u.rowId;return a[1][x]||(a[1][x]=0),a[1][x]+=u.colspan,h!==0&&(u.moveChildren(a[2]),u.parent.remove()),a},[{},{},e[0]]),r=Math.max(...Object.values(t[0])),i=Math.max(...Object.values(t[1])),o=t[2];o.colspan=i,o.rowspan=r;let l=Kl(o,et.tableMain);this.fixTableByRemove(l)}splitCell(e){if(e.length!==1)return;let t=e[0];if(t.colspan===1&&t.rowspan===1)return;let[r,i]=A1(t,[et.tableMain,et.tableRow]),o=r.tableId,l=t.getColumnIndex(),a=r.getColIds().slice(l,l+t.colspan).reverse(),u=t.formats()[et.tableCellInner].style,h=i,y=t.rowspan;for(t.colspan=1,t.rowspan=1;h&&y>0;){for(let x of a){if(h===i&&x===t.colId)continue;let w={tableId:o,rowId:h.rowId,colId:x,rowspan:1,colspan:1};u&&(w.style=u),h.insertCell(l+(h===i?1:0),w)}--y,h=h.next}}},Ae(Sh,"moduleName",Ib.moduleName),Ae(Sh,"toolName",et.tableWrapper),Ae(Sh,"keyboradHandler",{"forbid remove table by backspace":{bindInHead:!0,key:"Backspace",collapsed:!0,offset:0,handler(e,t){let r=this.quill.getLine(e.index),i=r[0];return i.prev instanceof jg?(i.prev.remove(),!1):!(t.format[et.tableCellInner]&&i.offset(Kl(i,et.tableCellInner))===0)}},"forbid remove table by delete":{bindInHead:!0,key:"Delete",collapsed:!0,handler(e,t){let r=this.quill.getLine(e.index),i=r[0],o=r[1];if((i.next instanceof jg||i.next instanceof Ig)&&o===i.length()-1)return!1;if(t.format[et.tableCellInner]){let l=Kl(i,et.tableCellInner);if(i===l.children.tail&&o===i.length()-1)return!1}return!0}},"table up":kw(!0),"table down":kw(!1),"table caption break":{bindInHead:!0,key:"Enter",shiftKey:null,format:[et.tableCaption],handler(e,t){return!1}}}),Sh),T4=az;const cz="_AEditorContainer_e2odv_1",uz="_AEditor_e2odv_1",fz="_Primary_e2odv_19",dz="_ReadOnly_e2odv_49",hz="_Raw_e2odv_123",gz="_Limit_e2odv_140",pz="_Resizer_e2odv_145",vz="_Resizing_e2odv_178",vd={AEditorContainer:cz,AEditor:uz,Primary:fz,"ql-toolbar":"_ql-toolbar_e2odv_19","ql-snow":"_ql-snow_e2odv_19",ReadOnly:dz,Error:"_Error_e2odv_86",Raw:hz,Limit:gz,Resizer:pz,Resizing:vz,"ql-image-resizer-overlay":"_ql-image-resizer-overlay_e2odv_188","ql-image-resizer-handle":"_ql-image-resizer-handle_e2odv_195","ql-image-resizer-display":"_ql-image-resizer-display_e2odv_205","ql-image-resizer-toolbar":"_ql-image-resizer-toolbar_e2odv_216","ql-image-resizer-toolbar-button":"_ql-image-resizer-toolbar-button_e2odv_224"};class bz{constructor(e,t={}){Ae(this,"quill");Ae(this,"cleanupFunctions",[]);this.quill=e,t.isTitleMode&&this.setupTitleModePaste()}setupTitleModePaste(){const e=this.quill.root,t=r=>{if(r.preventDefault(),!r.clipboardData)return;const i=r.clipboardData.getData("text/html"),o=r.clipboardData.getData("text/plain"),l=this.quill.getSelection(!0);if(l)if(l.length>0&&this.quill.deleteText(l.index,l.length,qe.sources.USER),i){const a=document.createElement("div");a.innerHTML=i,this.replaceBreaksWithSpaces(a);const h=this.quill.getModule("clipboard").convert({html:a.innerHTML});this.quill.updateContents(h,qe.sources.USER),setTimeout(()=>{const y=h.reduce((x,w)=>x+(typeof w.insert=="string"?w.insert.length:1),0);this.quill.setSelection(l.index+y,0,qe.sources.SILENT)},0)}else{const a=o.replace(/[\r\n]+/g," ").trim();this.quill.insertText(l.index,a,qe.sources.USER),this.quill.setSelection(l.index+a.length,0,qe.sources.SILENT)}};e.addEventListener("paste",t,{capture:!0}),this.cleanupFunctions.push(()=>{e.removeEventListener("paste",t,{capture:!0})})}replaceBreaksWithSpaces(e){var i,o;const t=l=>{var a;if(l.nodeType===Node.TEXT_NODE)l.textContent=((a=l.textContent)==null?void 0:a.replace(/[\r\n]+/g," "))??"";else for(const u of Array.from(l.childNodes))t(u)};t(e);const r=e.querySelectorAll("br, p, div");for(const l of Array.from(r))l.tagName==="BR"?(i=l.parentNode)==null||i.replaceChild(document.createTextNode(" "),l):(l.tagName==="P"||l.tagName==="DIV")&&l.nextSibling&&!((o=l.textContent)!=null&&o.endsWith(" "))&&l.appendChild(document.createTextNode(" "));e.innerHTML=e.innerHTML.replace(/\s+$/,""),e.innerHTML=e.innerHTML.replace(/\s{2,}/g," ")}destroy(){this.cleanupFunctions.forEach(e=>e()),this.cleanupFunctions=[]}async copyContent(e){var t;try{const r=this.quill.getText(),i=this.quill.root.innerHTML;return this.copyToClipboard(r,i,e)}catch(r){return console.error("Error in copyContent:",r),(t=e==null?void 0:e.onError)==null||t.call(e),!1}}async copyToClipboard(e,t,r){var i,o;try{return await this.tryModernClipboardWithHtml(e,t,r)||await this.tryModernClipboardText(e,r)||t&&this.tryLegacyClipboardWithHtml(t,r)||this.tryLegacyClipboardText(e,r)?!0:((i=r==null?void 0:r.onError)==null||i.call(r),!1)}catch(l){return console.error("복사 중 오류 발생:",l),(o=r==null?void 0:r.onError)==null||o.call(r),!1}}async tryModernClipboardWithHtml(e,t,r){var i;if(!navigator.clipboard||!t||!window.ClipboardItem||!window.isSecureContext)return!1;try{return await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([t],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]),(i=r==null?void 0:r.onSuccess)==null||i.call(r),!0}catch{return!1}}async tryModernClipboardText(e,t){var r;if(!navigator.clipboard||!window.isSecureContext)return!1;try{return await navigator.clipboard.writeText(e),(r=t==null?void 0:t.onSuccess)==null||r.call(t),!0}catch{return!1}}tryLegacyClipboardWithHtml(e,t){const r=document.createElement("div");r.innerHTML=e,r.style.cssText="position:fixed;left:-9999px;top:-9999px;opacity:0;",document.body.appendChild(r);try{const i=document.createRange();i.selectNodeContents(r);const o=window.getSelection();return o?(o.removeAllRanges(),o.addRange(i),this.tryClipboardEventCopy({html:e,text:r.textContent??""},t)):!1}finally{document.body.removeChild(r)}}tryLegacyClipboardText(e,t){const r=document.createElement("textarea");r.value=e,r.style.cssText="position:fixed;left:-9999px;top:-9999px;opacity:0;",document.body.appendChild(r);try{return r.focus(),r.select(),this.tryClipboardEventCopy({text:e},t)}finally{document.body.removeChild(r)}}tryClipboardEventCopy(e,t){var o;let r=!1;const i=l=>{l.preventDefault(),l.clipboardData&&(l.clipboardData.setData("text/plain",e.text),e.html&&l.clipboardData.setData("text/html",e.html),r=!0)};document.addEventListener("copy",i);try{const l=new ClipboardEvent("copy",{clipboardData:new DataTransfer});if(document.dispatchEvent(l),r)return(o=t==null?void 0:t.onSuccess)==null||o.call(t),!0}catch{return!1}return document.removeEventListener("copy",i),!1}}const yz=qe.import("blots/block/embed"),mz=qe.import("ui/icons");mz.divider=s1.renderToString(k.jsx(ho,{icon:"Minus",strokeWidth:2.5,width:"100%"}));class sm extends yz{static create(e){const t=super.create(e);return t.style.border="var(--AEditor_Addon_Primary_border)",t.style.borderBottom="none",t.style.transition="border var(--Transition)",t}}Ae(sm,"blotName","divider"),Ae(sm,"tagName","hr");class xz{constructor(e,t){this.debug=e,this.suppressErrorLogging=t}prefixString(){return"</> quill-image-compress: "}get log(){return this.debug?console.warn.bind(console,this.prefixString()):()=>{}}get error(){return this.suppressErrorLogging?()=>{}:console.error.bind(console,this.prefixString())}get warn(){return this.suppressErrorLogging?()=>{}:console.warn.bind(console,this.prefixString())}}async function R4(n){const e=new FileReader,t=new Promise((r,i)=>{e.addEventListener("load",()=>{const o=e.result;typeof o=="string"?r(o):i(new Error("could not convert file to base64"))},!1)});return e.readAsDataURL(n),t}function wz(n,e,t,r){if(t&&r&&n<=t&&e<=r)return[n,e];if(t&&n>t){const i=t,o=Math.floor(e/n*i);if(r&&o>r){const l=r;return[Math.floor(n/e*l),l]}else return[i,o]}if(r&&e>r){const i=r;return[Math.floor(n/e*i),i]}return[n,e]}async function Cz(n,e,t={}){const r=e.split(";")[0].split(":")[1],{maxWidth:i,maxHeight:o,imageType:l="image/jpeg",keepImageTypes:a,ignoreImageTypes:u,imageQuality:h=.7}=t,y=new Image;y.src=e,await new Promise(I=>{y.onload=()=>{I()}});const[x,w]=wz(y.width,y.height,i,o),_=document.createElement("canvas");_.width=x,_.height=w;const S=_.getContext("2d");if(l==="image/jpeg"&&(S.fillStyle="#FFFFFF",S.fillRect(0,0,y.width,y.height)),u!=null&&u.includes(r))return e;a!=null&&a.includes(r)&&(t.imageType=r),S.drawImage(y,0,0,x,w);const R=_.toDataURL(t.imageType??l,h);return n.log("downscaling image...",{args:{dataUrl:e,...t},newHeight:w,newWidth:x}),R}function _z(n,e){n.maxWidth??(n.maxWidth=1e3),n.maxHeight??(n.maxHeight=1e3),Sz(n,e),Ez(n,e),Az(n,e),Tz(n,e),Rz(n,e)}function Sz(n,e){n.maxWidth&&typeof n.maxWidth!="number"&&(e.warn(`[config error] 'maxWidth' is required to be a "number" (in pixels),
|
|
471
471
|
received: ${n.maxWidth}
|
|
472
472
|
-> using default 1000`),n.maxWidth=1e3),n.maxHeight&&typeof n.maxHeight!="number"&&(e.warn(`[config error] 'maxHeight' is required to be a "number" (in pixels),
|
|
473
473
|
received: ${n.maxHeight}
|
|
474
|
-
-> using default 1000`),n.maxHeight=1e3)}function
|
|
474
|
+
-> using default 1000`),n.maxHeight=1e3)}function Ez(n,e){n.quality&&typeof n.quality!="number"&&(e.warn(`quill.imageCompressor: [config error] 'quality' is required to be a "number",
|
|
475
475
|
received: ${n.quality}
|
|
476
|
-
-> using default 0.7`),n.quality=.7)}function
|
|
476
|
+
-> using default 0.7`),n.quality=.7)}function Az(n,e){n.imageType&&(typeof n.imageType!="string"||!n.imageType.startsWith("image/"))&&(e.warn(`quill.imageCompressor: [config error] 'imageType' is required be in the form of "image/png" or "image/jpeg" etc ...,
|
|
477
477
|
received: ${n.imageType}
|
|
478
|
-
-> using default image/jpeg`),n.imageType="image/jpeg")}function _z(n,e){n.keepImageTypes??(n.keepImageTypes=[]),n.keepImageTypes&&!Array.isArray(n.keepImageTypes)&&(e.warn(`quill.imageCompressor: [config error] 'keepImageTypes' is required to be a "array", received: ${n.keepImageTypes} -> using default []`),n.keepImageTypes=[]),n.ignoreImageTypes??(n.ignoreImageTypes=[]),n.ignoreImageTypes&&!Array.isArray(n.ignoreImageTypes)&&(e.warn(`quill.imageCompressor: [config error] 'ignoreImageTypes' is required to be a "array", received: ${n.ignoreImageTypes} -> using default []`),n.ignoreImageTypes=[])}function Sz(n,e){n.handleOnPaste&&typeof n.handleOnPaste!="boolean"&&typeof n.handleOnPaste!="function"&&(e.warn(`quill.imageCompressor: [config error] 'handlePaste' is required to be a "boolean" or a "function", received: ${n.ignoreImageTypes} -> using default true`),n.handleOnPaste=!0),n.insertIntoEditor&&typeof n.insertIntoEditor!="function"&&(e.warn(`quill.imageCompressor: [config error] 'insertIntoEditor' is required to be a "function", received: ${n.insertIntoEditor} -> using default undefined`),n.insertIntoEditor=void 0)}function Mw(n){return!!/^image\/(gif|jpe?g|a?png|svg|webp|bmp)/i.exec(n)}class Ez{constructor(e,t,r,i){Ae(this,"localDrag",!1);this.quill=e,this.onNewDataUrl=t,this.logger=r,this.handleOnPaste=i,this.quill.root.addEventListener("dragstart",o=>this.handleDragStart(o),!1),this.quill.root.addEventListener("dragend",o=>this.handleDragEnd(o),!1),this.quill.root.addEventListener("drop",o=>this.handleDrop(o),!0),this.handleOnPaste!==!1&&this.quill.root.addEventListener("paste",o=>this.handlePaste(o),!0)}handleDragStart(e){this.localDrag=!0}handleDragEnd(e){this.localDrag=!1}async handleDrop(e){var l,a,u,h;if(this.localDrag)return;e.preventDefault();const t=document.getSelection();if(t&&document.caretPositionFromPoint){const y=document.caretPositionFromPoint(e.clientX,e.clientY);y&&t.setBaseAndExtent(y.offsetNode,y.offset,y.offsetNode,y.offset)}this.logger.log("handleDrop",{evt:e});const r=(l=e.dataTransfer)==null?void 0:l.files,i=Array.from(r||[]).filter(y=>Mw(y.type));if(i.length>0){e.stopPropagation(),this.logger.log("handleDrop","found files",{evt:e,files:r,imageFiles:i}),await this.pasteFilesIntoQuill(i);return}if((a=e.dataTransfer)!=null&&a.items){e.stopPropagation(),this.logger.log("handleDrop","found items",{evt:e,files:r,imageFiles:i}),await this.handleDataTransferList((u=e.dataTransfer)==null?void 0:u.items,e);return}const o=(h=e.dataTransfer)==null?void 0:h.getData("URL");if(this.logger.log("handleDrop","trying getData('URL')",{draggedUrl:o}),o){const y=await(await fetch(o)).blob();this.logger.log("handleDrop","blob from drag event",{evt:e,files:r,imageFiles:i}),await this.pasteFilesIntoQuill([y])}}async handlePaste(e){var t;typeof this.handleOnPaste=="function"&&!this.handleOnPaste(e)||await this.handleDataTransferList((t=e.clipboardData)==null?void 0:t.items,e)}async handleDataTransferList(e,t){const r=Array.from(e||[]),i=r.filter(a=>a.kind==="file"&&Mw(a.type)),o=r.map(a=>({type:a.type,kind:a.kind}));if(this.logger.log("handleDataTransferList",{fileTypes:o,imageCount:i.length}),!i.length)return;t.preventDefault(),t.stopPropagation();const l=i.map(a=>a.getAsFile());await this.pasteFilesIntoQuill(l)}async pasteFilesIntoQuill(e){this.logger.log(" pasteFilesIntoQuill",`pasting ${e.length} images...`),await Promise.all(e.map(async(t,r)=>{if(!t)return;const i=await R4(t);this.logger.log(" pasteFilesIntoQuill",`pasting image (${r})`),this.onNewDataUrl(i)})),this.logger.log(" pasteFilesIntoQuill","done")}}class Np{constructor(e,t){Ae(this,"quill");Ae(this,"range");Ae(this,"options");Ae(this,"imageDrop");Ae(this,"fileHolder");Ae(this,"Logger");this.quill=e,this.options=t||{};const r=!!t.debug,i=!!t.suppressErrorLogging;this.Logger=new vz(r,i),mz(t,this.Logger);const o=async a=>{this.Logger.log("onImageDrop",{dataUrl:a});const u=await this.downscaleImageFromUrl(a);this.insertToEditor(u,Np.b64toBlob(u))};this.imageDrop=new Ez(e,o,this.Logger,typeof this.options.handleOnPaste=="function"?this.options.handleOnPaste:this.options.handleOnPaste!==!1),this.Logger.log("fileChanged",{options:t,quill:e,debug:r});const l=this.quill.getModule("toolbar");l?l.addHandler("image",()=>this.selectLocalImage()):this.Logger.error("Quill toolbar module not found! need { toolbar: // options } in Quill.modules for image icon to sit in")}static b64toBlob(e){const t=atob(e.split(",")[1]),r=e.slice(5).split(";")[0],i=new ArrayBuffer(t.length);let o=new Uint8Array(i);for(let l=0;l<t.length;l++)o[l]=t.charCodeAt(l);return new Blob([i],{type:r})}destroy(){this.imageDrop&&console.warn("ImageDrop instance cleanup")}selectLocalImage(e){this.range=this.quill.getSelection(),this.fileHolder=document.createElement("input"),this.fileHolder.setAttribute("type","file"),this.fileHolder.setAttribute("accept","image/*"),this.fileHolder.setAttribute("style","visibility:hidden"),this.fileHolder.onchange=()=>this.fileChanged().then(()=>e&&e()),document.body.appendChild(this.fileHolder),this.fileHolder.click(),window.requestAnimationFrame(()=>{this.fileHolder&&document.body.removeChild(this.fileHolder)})}async fileChanged(e){var l;const t=e||((l=this.fileHolder)==null?void 0:l.files);if(!(t!=null&&t.length))return;const r=t[0];if(this.Logger.log("fileChanged",{file:r}),!r)return;const i=await R4(r),o=await this.downscaleImageFromUrl(i);this.insertToEditor(o,Np.b64toBlob(o))}async downscaleImageFromUrl(e){const t=await yz(this.Logger,e,{maxWidth:this.options.maxWidth,maxHeight:this.options.maxHeight,imageType:this.options.imageType,keepImageTypes:this.options.keepImageTypes,ignoreImageTypes:this.options.ignoreImageTypes,imageQuality:this.options.quality});return this.Logger.log("downscaleImageFromUrl",{dataUrl:e,dataUrlCompressed:t}),t}insertToEditor(e,t){if(this.options.insertIntoEditor)this.options.insertIntoEditor(e,t,this.quill);else{this.Logger.log("insertToEditor",{url:e}),this.range=this.quill.getSelection();const r=this.range;if(!r)return;this.logFileSize(e),this.quill.insertEmbed(r.index,"image",`${e}`,"user"),r.index++,this.quill.setSelection(r,"api")}}logFileSize(e){const i=(Math.round((e.length-"data:image/png;base64,".length)*3/4)/1024).toFixed(0);this.Logger.log("estimated img size: "+i+" kb")}}window.imageCompressor=Np;const Fp={OVERLAY:"ql-image-resizer-overlay",HANDLE:"ql-image-resizer-handle",DISPLAY:"ql-image-resizer-display",TOOLBAR:"ql-image-resizer-toolbar",TOOLBAR_BUTTON:"ql-image-resizer-toolbar-button"},Vh={BACKSPACE:8,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40},P0=(n,e)=>{const t=n?"top":"bottom",r=e?"left":"right",i=n===e?"nwse-resize":"nesw-resize";return{[t]:"-5px",[r]:"-5px",cursor:i}},Az={tl:P0(!0,!0),tr:P0(!0,!1),bl:P0(!1,!0),br:P0(!1,!1)},Tz={modules:["DisplaySize","Toolbar","Resize","Keyboard"],embedTags:["VIDEO","IFRAME"],tools:["left","center","right","justify"],contentOptions:[{attribute:["width"],limit:{minWidth:100},blotName:"image"},{attribute:["width","height"],limit:{minWidth:200,ratio:.5625},blotName:"video"}]},Rz=qe.import("formats/image");class Q0 extends Rz{static get ATTRIBUTES(){return["alt","height","width","class","style","data-align"]}static formats(e){return this.ATTRIBUTES.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)??""),t),{})}format(e,t){this.constructor.ATTRIBUTES.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}Ae(Q0,"blotName","image"),Ae(Q0,"tagName","img"),Ae(Q0,"scope",Jn.INLINE);qe.register("formats/image",Q0,!0);class Zp{constructor(e){Ae(this,"resizer");Ae(this,"quill");Ae(this,"overlay");Ae(this,"activeEle");Ae(this,"blot");Ae(this,"options");Ae(this,"requestUpdate");this.resizer=e,this.quill=e.quill,this.overlay=e.overlay,this.activeEle=e.activeEle,this.blot=e.blot,this.options=e.options,this.requestUpdate=()=>e.onUpdate(!0)}onCreate(){}onDestroy(){}onUpdate(){}}class Iz extends Zp{constructor(){super(...arguments);Ae(this,"display")}onCreate(){var t;this.display=document.createElement("div"),this.display.className=vd[Fp.DISPLAY],(t=this.overlay)==null||t.appendChild(this.display)}onUpdate(){if(!this.display||!this.activeEle)return;const[t,r]=[this.activeEle.offsetWidth,this.activeEle.offsetHeight];this.display.innerHTML=`${t} × ${r}`,this.positionDisplay(t,r)}positionDisplay(t,r){var a;if(!this.display)return;const i=this.display.getBoundingClientRect(),o=t>120&&r>30,l=((a=this.activeEle)==null?void 0:a.style.float)==="right";Object.assign(this.display.style,{right:o?"4px":l?"auto":`-${i.width+4}px`,bottom:o?"4px":`-${i.height+4}px`,left:o?"auto":l?`-${i.width+4}px`:"auto"})}}class kz extends Zp{constructor(){super(...arguments);Ae(this,"boxes",[]);Ae(this,"dragBox",null);Ae(this,"dragStartX",0);Ae(this,"dragStartY",0);Ae(this,"contentOption");Ae(this,"preDragSize",{width:0,height:0});Ae(this,"naturalSize",[0,0]);Ae(this,"handleDragProxy",null);Ae(this,"handleMouseupProxy",null);Ae(this,"handleMousedown",t=>{!this.blot||!this.activeEle||(this.dragBox=t.target,this.dragStartX=t.clientX,this.dragStartY=t.clientY,this.preDragSize={width:this.activeEle.offsetWidth,height:this.activeEle.offsetHeight},this.naturalSize=this.getNaturalSize(),this.setCursor(window.getComputedStyle(this.dragBox).cursor),this.handleDragProxy=this.handleDrag.bind(this),this.handleMouseupProxy=this.handleMouseup.bind(this),document.addEventListener("mousemove",this.handleDragProxy,!0),document.addEventListener("mouseup",this.handleMouseupProxy,!0))});Ae(this,"handleMouseup",t=>{if(!this.activeEle||!this.blot||!this.contentOption)return;const r=this.calcSize(t,this.contentOption.limit);Object.assign(this.activeEle,r),Object.assign(this.activeEle.style,{width:null,height:null}),this.setCursor(""),this.removeEventListeners()});Ae(this,"handleDrag",t=>{!this.activeEle||!this.blot||!this.contentOption||(Object.assign(this.activeEle.style,this.calcSize(t,{...this.contentOption.limit,unit:!0})),this.requestUpdate())});Ae(this,"handleDoubleClick",t=>{if(!this.blot||!this.activeEle||!this.contentOption)return;t.stopPropagation();const[r,i]=this.naturalSize,o={};this.contentOption.attribute.includes("width")&&(o.width=r),this.contentOption.attribute.includes("height")&&(o.height=i);const l=this.applyConstraints(o,this.contentOption.limit);Object.assign(this.activeEle,l),this.requestUpdate()})}onCreate(){!this.blot||!this.options.contentOptions||(this.contentOption=this.options.contentOptions.find(t=>t.blotName===this.blot.statics.blotName),this.boxes=[],["tl","tr","br","bl"].forEach(this.addBox.bind(this)))}onDestroy(){this.setCursor("")}addBox(t){var i;const r=document.createElement("div");r.className=`${vd[Fp.HANDLE]} ${t}`,r.addEventListener("mousedown",this.handleMousedown,!1),r.addEventListener("dblclick",this.handleDoubleClick,!1),Object.assign(r.style,Az[t]),(i=this.overlay)==null||i.appendChild(r),this.boxes.push(r)}removeEventListeners(){this.handleDragProxy&&(document.removeEventListener("mousemove",this.handleDragProxy,!0),this.handleDragProxy=null),this.handleMouseupProxy&&(document.removeEventListener("mouseup",this.handleMouseupProxy,!0),this.handleMouseupProxy=null)}calcSize(t,r={}){var u;if(!this.dragBox||!this.activeEle)return{};const i=t.clientX-this.dragStartX,o=t.clientY-this.dragStartY,l=this.dragBox===this.boxes[0]||this.dragBox===this.boxes[3]?-1:1,a={};return(u=this.contentOption)!=null&&u.attribute?this.contentOption.attribute.forEach(h=>a[h]=this.preDragSize[h]):a.width=this.preDragSize.width,a.width&&(a.width=Math.round(this.preDragSize.width+i*l)),a.height&&(a.height=Math.round(this.preDragSize.height+o*l)),this.applyConstraints(a,r)}applyConstraints(t,r={}){const i=typeof t.width=="string"?parseInt(t.width,10):t.width||0,o=typeof t.height=="string"?parseInt(t.height,10):t.height||0;let l=i,a=o;if(r.ratio){l=this.applyLimit(l,r.minWidth,r.maxWidth),a=l*r.ratio;const h=this.applyLimit(a,r.minHeight,r.maxHeight);h!==a&&(a=h,l=a/r.ratio)}else i&&(l=this.applyLimit(l,r.minWidth,r.maxWidth)),o&&(a=this.applyLimit(a,r.minHeight,r.maxHeight));const u={};return t.width!==void 0&&(u.width=r.unit?`${l}px`:l),t.height!==void 0&&(u.height=r.unit?`${a}px`:a),u}applyLimit(t,r,i){let o=t;return r!==void 0&&(o=Math.max(r,o)),i!==void 0&&(o=Math.min(i,o)),o}getNaturalSize(){if(!this.activeEle)return[0,0];const t=this.activeEle.getAttribute("data-size");if(!t){const r=this.activeEle,i=[r.offsetWidth,r.offsetHeight];return r.setAttribute("data-size",i.join(",")),i}return t.split(",").map(Number)}setCursor(t){[document.body,this.activeEle].forEach(r=>r&&(r.style.cursor=t))}}const qh=class qh extends Zp{constructor(){super(...arguments);Ae(this,"keyboardProxy",null)}static injectInit(t){var i;const r=(i=t.keyboard)==null?void 0:i.bindings;r&&[qh.keys.LEFT,qh.keys.RIGHT].forEach(o=>(r[o]||[]).unshift(qh.makeArrowHandler(o)))}static makeArrowHandler(t){const r=t===qh.keys.LEFT;return{key:t,shiftKey:!1,altKey:null,[r?"prefix":"suffix"]:/^$/,handler(i){const o=this.quill;if(!o.resizer)return!0;let l=i.index;const a=t===qh.keys.RIGHT,[u]=o.getLine(l+(r?-1:0));if(!u)return!0;if(o.resizer.judgeShow(u))return!1;const h=o.getIndex(u);if(a&&h+u.length()-1===l)return!0;a&&(l+=i.length+1);const[y]=o.getLeaf(l);if(!y)return!0;const x=y.offset(y.parent),w=y.constructor&&"scope"in y.constructor&&y.constructor.scope===Jn.BLOCK_BLOT;if(r&&(w&&l===x||l===0||l===h))return!0;let _=y;if(r&&x===0){const[S]=o.getLeaf(l-1);S&&(_=S)}return!_||!o.resizer.judgeShow(_)}}}onCreate(){this.keyboardProxy=this.keyboardHandle.bind(this),document.addEventListener("keydown",this.keyboardProxy,!0)}onDestroy(){this.keyboardProxy&&document.removeEventListener("keydown",this.keyboardProxy,!0)}keyboardHandle(t){if(t.defaultPrevented||t.shiftKey||t.ctrlKey||t.altKey||!this.activeEle)return;const r=t.keyCode;let i=this.blot.offset(this.quill.scroll),o=null,l=!1;r===Vh.BACKSPACE||r===Vh.DELETE?(this.handleDelete(),l=!0):r>=Vh.LEFT&&r<=Vh.DOWN&&([i,o]=this.handleArrowKeys(r,i),l=!0),l&&(t.stopPropagation(),t.preventDefault()),!(o&&this.resizer.judgeShow(o,o.domNode))&&(this.quill.setSelection(i),this.resizer.hide())}handleDelete(){this.blot&&(this.blot.deleteAt(0,1),this.blot.parent.optimize({}))}handleArrowKeys(t,r){let i=null;return t===Vh.RIGHT?r+=this.blot.length()||1:t===Vh.UP?(r=this.getOtherLineIndex(-1),i=this.quill.getLeaf(r)[0]):t===Vh.DOWN&&(r=this.getOtherLineIndex(1),i=this.quill.getLeaf(r)[0]),[r,i]}getOtherLineIndex(t){if(!this.blot)return 0;const r=this.blot.offset(this.quill.scroll),[i]=this.quill.getLine(r);if(!i)return r;const o=this.blot.offset(i)+1,l=t>0?i.next:i.prev;if(!l)return r;let a=l.length();return l.statics.blotName==="block"&&a--,l.offset(this.quill.scroll)+Math.min(a,o)}};Ae(qh,"keys",Vh);let pv=qh;const u1=class u1 extends Zp{constructor(t){super(t);Ae(this,"toolbar");Ae(this,"blot");this.blot=t.blot}createStyleTool(t,r){const i={left:{float:"left"},right:{float:"right"},center:{display:"block",margin:"0 auto",float:"none"},justify:{display:"block",float:"none",margin:"0",width:"100%"}};return{icon:t,apply:o=>{const l=i[r];Object.assign(o.style,l),o.setAttribute("data-align",r)},isApplied:o=>{const l=o.style;switch(r){case"center":return l.float==="none";case"justify":return l.display==="block"&&l.width==="100%";case"left":case"right":return l.float===r;default:return!1}}}}onCreate(){var t;this.toolbar=document.createElement("div"),this.toolbar.className=vd[Fp.TOOLBAR],(t=this.overlay)==null||t.appendChild(this.toolbar),Object.keys(u1.Tools).forEach(r=>{const i=r;u1.Tools[i]=this.createStyleTool(u1.Tools[i].icon,i)}),this._addToolbarButtons()}_addToolbarButtons(){if(!this.toolbar||!this.activeEle)return;const{Tools:t}=this.constructor;this.options.tools.forEach(r=>{const i=r,o=t[i];if(!o)return;const l=document.createElement("button");l.type="button",l.className=vd[Fp.TOOLBAR_BUTTON],l.innerHTML=s1.renderToString(k.jsx(ho,{icon:o.icon,size:"xs"})),l.setAttribute("data-tool",i),o.isApplied&&o.isApplied.call(this,this.activeEle)&&(l.style.backgroundColor="var(--AEditor_Addon_Secondary_color)"),this.addButtonClickHandler(l,o),this.toolbar.appendChild(l)})}addButtonClickHandler(t,r){!this.activeEle||!this.blot||t.addEventListener("click",i=>{var l;if(i.stopPropagation(),r.handler&&r.handler.call(this,i,t,this.activeEle)!==!0)return;const o=r.isApplied&&r.isApplied.call(this,this.activeEle);return this.toolbar&&Array.from(this.toolbar.querySelectorAll("button")).forEach(a=>a.style.backgroundColor=""),o?(this.activeEle.style.cssText="",this.activeEle.setAttribute("data-align","")):(t.style.backgroundColor="var(--AEditor_Addon_Secondary_color)",(l=r.apply)==null||l.call(r,this.activeEle)),this.requestUpdate(),!1})}};Ae(u1,"Tools",{left:{icon:"AlignLeft"},center:{icon:"AlignCenter"},right:{icon:"AlignRight"},justify:{icon:"AlignJustify"}});let am=u1;class I4{constructor(e,t={}){Ae(this,"quill");Ae(this,"options");Ae(this,"moduleClasses");Ae(this,"modules",[]);Ae(this,"blot");Ae(this,"selectedBlots",[]);Ae(this,"embedClassName","");Ae(this,"activeEle");Ae(this,"overlay");Ae(this,"updateFromModule",!1);Ae(this,"hideProxy",null);Ae(this,"updateOverlayPositionProxy",null);var i;e.resizer=this,this.quill=e;const r=t.modules?[...t.modules]:null;this.options={...Tz,...t},r&&(this.options.modules=r),document.execCommand("enableObjectResizing",!1,"false"),this.moduleClasses=this.options.modules,this.quill.root.addEventListener("mousedown",this.handleClick.bind(this),!1),this.quill.on("text-change",this.handleChange.bind(this)),this.quill.container.style.position=this.quill.container.style.position||"relative",this.quill.on("selection-change",this.addBlotsSelectedClass.bind(this)),pv.injectInit(this.quill),(i=this.options.embedTags)!=null&&i.length&&this.initializeEmbed()}initializeModules(){this.modules.forEach(e=>e.onDestroy()),this.modules=[],this.modules=this.moduleClasses.map(e=>new(this.constructor.Modules[e]||e)(this)),this.modules.forEach(e=>e.onCreate()),this.repositionElements(),this.modules.forEach(e=>e.onUpdate())}initializeEmbed(){if(!this.options.embedTags.length)return;this.embedClassName=`ql-${Array.from({length},()=>[Math.floor(Math.random()*62)]).join("")}`;const e=[""].concat(this.options.embedTags).join(`, .${this.embedClassName} `).slice(2)+"{pointer-events: none;}",t=document.createElement("style");t.textContent=e,this.quill.container.appendChild(t),this.quill.root.classList.add(this.embedClassName)}onUpdate(e){this.updateFromModule=!!e,this.repositionElements(),this.modules.forEach(t=>t.onUpdate())}handleClick(e){if(this.overlay&&(e.target===this.overlay||this.overlay.contains(e.target)))return;let t=e.target;if(t=this.getEventTarget(e,t),t!=null&&t.tagName){const r=this.quill.scroll.find(t);if(r&&this.judgeShow(r,t)){e.preventDefault();return}}this.activeEle&&this.hide()}getEventTarget(e,t){var o;const r=(o=this.options.embedTags)==null?void 0:o.join();if(!r)return t;const i=this.quill.root;return(t===i||t.querySelectorAll(r).length)&&(i.classList.remove(this.embedClassName),t=document.elementFromPoint(e.clientX,e.clientY),i.classList.add(this.embedClassName)),t}judgeShow(e,t){if(!e||!this.options.contentOptions)return!1;!t&&e.domNode&&(t=e.domNode);const r=this.options.contentOptions.find(o=>o.blotName===e.statics.blotName);if(!r)return!1;if(this.activeEle===t)return!0;const i=r.limit||{};return!i.minWidth||i.minWidth&&t.offsetWidth>=i.minWidth?(this.activeEle&&this.hide(),this.activeEle=t,this.blot=e,this.showOverlay(),this.initializeModules(),!0):!1}handleChange(e,t,r){if(this.updateFromModule){this.updateFromModule=!1;return}r!=="user"||!this.overlay||!this.activeEle||this.onUpdate()}showOverlay(){this.overlay&&this.hideOverlay(),this.quill.setSelection(null),[document.body,this.quill.root].forEach(e=>e.style.userSelect="none"),this.overlay=document.createElement("div"),this.overlay.className=`${vd[Fp.OVERLAY]}`,this.overlay.addEventListener("wheel",e=>{e.preventDefault(),e.stopPropagation(),this.quill.root.scrollTop+=e.deltaY*.5},{passive:!1}),this.quill.container.appendChild(this.overlay),this.hideProxy=()=>this.activeEle&&this.hide(),this.updateOverlayPositionProxy=()=>this.overlay&&(this.overlay.style.marginTop=-1*this.quill.root.scrollTop+"px"),this.quill.root.addEventListener("input",this.hideProxy,!0),this.quill.root.addEventListener("scroll",this.updateOverlayPositionProxy),this.repositionElements()}hideOverlay(){this.overlay&&(this.quill.container.removeChild(this.overlay),this.overlay=void 0,this.hideProxy&&this.quill.root.removeEventListener("input",this.hideProxy,!0),this.updateOverlayPositionProxy&&this.quill.root.removeEventListener("scroll",this.updateOverlayPositionProxy),[document.body,this.quill.root].forEach(e=>e.style.userSelect=""))}repositionElements(){if(!this.overlay||!this.activeEle)return;const e=this.quill.container,t=this.activeEle.getBoundingClientRect(),r=e.getBoundingClientRect();Object.assign(this.overlay.style,{left:`${t.left-r.left-1+e.scrollLeft}px`,top:`${t.top-r.top+this.quill.root.scrollTop}px`,width:`${t.width}px`,height:`${t.height}px`,marginTop:-1*this.quill.root.scrollTop+"px"})}addBlotsSelectedClass(e){if(!e){this.selectedBlots=[];return}try{const t=i=>{var o;return["image","iframe","video"].includes((o=i.statics)==null?void 0:o.blotName)},r=this.quill.scroll.descendants(t,e.index,e.length);this.selectedBlots=r.filter(i=>!i.statics||!this.options.contentOptions?!1:!!this.options.contentOptions.find(o=>o.blotName===i.statics.blotName))}catch{}}hide(){this.hideOverlay(),this.modules.forEach(e=>e.onDestroy()),this.modules=[],this.activeEle=void 0,this.blot=void 0}}Ae(I4,"Modules",{Base:Zp,DisplaySize:Iz,Toolbar:am,Resize:kz,Keyboard:pv});const D0=qe.import("delta"),Mz=qe.import("modules/clipboard");function Lz(n){let e=Number.parseFloat(n.getAttribute("width")||String(Ss.colDefaultWidth));if(Number.isNaN(e)){const t=n.style.width;e=t?Number.parseFloat(t):n.offsetWidth}return e}function Oz(n,e){const t=new Array(e).fill(Ss.colDefaultWidth),r=Array.from(n.querySelectorAll("tr"));for(const i of r){const o=Array.from(i.querySelectorAll("td"));for(const[l,a]of o.entries())if(l<e){const u=Lz(a);t[l]=u||t[l]}else break}return t}class Pz extends Mz{constructor(t,r){super(t,r);Ae(this,"tableId",Ba());Ae(this,"rowId",Ba());Ae(this,"colIds",[]);Ae(this,"rowspanCount",[]);Ae(this,"cellCount",0);Ae(this,"colCount",0);Ae(this,"STYLE_PROPERTIES",["color","background","background-color","mso-pattern","border","border-color","border-top","border-right","border-bottom","border-left"]);this.quill=t,this.addMatcher("table",this.matchTable.bind(this)),this.addMatcher("colgroup",this.matchColgroup.bind(this)),this.addMatcher("col",this.matchCol.bind(this)),this.addMatcher("tr",this.matchTr.bind(this)),this.addMatcher("td",this.matchTd.bind(this)),this.addMatcher("th",this.matchTd.bind(this)),this.addMatcher("caption",this.matchCaption.bind(this))}matchTable(t,r){if(r.ops.length===0)return r;const i=[],o=[];let l=-1;for(let h=0;h<r.ops.length;h++){const{attributes:y,insert:x}=r.ops[h],{table:w,[et.tableCell]:_,...S}=y||{},R=tg.isObject(x)&&x[et.tableCol];R?o.push({insert:x}):i.push({attributes:S,insert:x}),!(S!=null&&S[et.tableCellInner])&&!R&&(l=h)}const u=Oz(t,this.colIds.length).reduce((h,y,x)=>(o[x]?h.push(o[x]):h.push({insert:{[et.tableCol]:{tableId:this.tableId,colId:this.colIds[x],width:y,full:!0}}}),h),[]);return i.splice(l+1,0,...u),this.tableId=Ba(),this.colIds=[],this.rowspanCount=[],this.cellCount=0,this.colCount=0,new D0(i)}matchColgroup(t,r){const i=[];for(let o=0;o<r.ops.length;o++){const l=r.ops[o];l&&tg.isObject(l.insert)&&l.insert[et.tableCol]&&i.push(l)}return new D0(i)}matchCol(t){this.colIds[this.colCount]=Ba();const r=new D0().insert({[et.tableCol]:Object.assign(Ig.value(t),{tableId:this.tableId,colId:this.colIds[this.colCount]})});return this.colCount+=1,r}matchTr(t,r){this.rowId=Ba(),this.cellCount=0;for(const[i,o]of this.rowspanCount.entries())o.rowspan>0&&(o.rowspan-=1),o.rowspan<=0&&(this.rowspanCount[i]={rowspan:0,colspan:0});return r}matchTd(t,r){const i=t,o=Df.formats(i);if(!this.colIds[this.cellCount]||!this.rowspanCount[this.cellCount])for(let y=this.cellCount;y>=0;y--)this.colIds[y]||(this.colIds[y]=Ba()),this.rowspanCount[y]||(this.rowspanCount[y]={rowspan:0,colspan:0});const{colspan:l}=this.rowspanCount[this.cellCount];this.cellCount+=l,o.rowspan>0&&(this.rowspanCount[this.cellCount]={rowspan:o.rowspan,colspan:o.colspan});const a=this.colIds[this.cellCount];this.cellCount+=o.colspan;const u=Object.assign(o,{tableId:this.tableId,rowId:this.rowId,colId:a});this.handleBorderNoneStyles(i,u);const h=[];for(const y of r.ops){const{attributes:x={},...w}=y,{[et.tableCell]:_,...S}=x;h.push({...w,attributes:{...S,[et.tableCellInner]:u}})}return(h.length<=0||!tg.isString(h[h.length-1].insert)||!h[h.length-1].insert.endsWith(`
|
|
478
|
+
-> using default image/jpeg`),n.imageType="image/jpeg")}function Tz(n,e){n.keepImageTypes??(n.keepImageTypes=[]),n.keepImageTypes&&!Array.isArray(n.keepImageTypes)&&(e.warn(`quill.imageCompressor: [config error] 'keepImageTypes' is required to be a "array", received: ${n.keepImageTypes} -> using default []`),n.keepImageTypes=[]),n.ignoreImageTypes??(n.ignoreImageTypes=[]),n.ignoreImageTypes&&!Array.isArray(n.ignoreImageTypes)&&(e.warn(`quill.imageCompressor: [config error] 'ignoreImageTypes' is required to be a "array", received: ${n.ignoreImageTypes} -> using default []`),n.ignoreImageTypes=[])}function Rz(n,e){n.handleOnPaste&&typeof n.handleOnPaste!="boolean"&&typeof n.handleOnPaste!="function"&&(e.warn(`quill.imageCompressor: [config error] 'handlePaste' is required to be a "boolean" or a "function", received: ${n.ignoreImageTypes} -> using default true`),n.handleOnPaste=!0),n.insertIntoEditor&&typeof n.insertIntoEditor!="function"&&(e.warn(`quill.imageCompressor: [config error] 'insertIntoEditor' is required to be a "function", received: ${n.insertIntoEditor} -> using default undefined`),n.insertIntoEditor=void 0)}function Mw(n){return!!/^image\/(gif|jpe?g|a?png|svg|webp|bmp)/i.exec(n)}class Iz{constructor(e,t,r,i){Ae(this,"localDrag",!1);this.quill=e,this.onNewDataUrl=t,this.logger=r,this.handleOnPaste=i,this.quill.root.addEventListener("dragstart",o=>this.handleDragStart(o),!1),this.quill.root.addEventListener("dragend",o=>this.handleDragEnd(o),!1),this.quill.root.addEventListener("drop",o=>this.handleDrop(o),!0),this.handleOnPaste!==!1&&this.quill.root.addEventListener("paste",o=>this.handlePaste(o),!0)}handleDragStart(e){this.localDrag=!0}handleDragEnd(e){this.localDrag=!1}async handleDrop(e){var l,a,u,h;if(this.localDrag)return;e.preventDefault();const t=document.getSelection();if(t&&document.caretPositionFromPoint){const y=document.caretPositionFromPoint(e.clientX,e.clientY);y&&t.setBaseAndExtent(y.offsetNode,y.offset,y.offsetNode,y.offset)}this.logger.log("handleDrop",{evt:e});const r=(l=e.dataTransfer)==null?void 0:l.files,i=Array.from(r||[]).filter(y=>Mw(y.type));if(i.length>0){e.stopPropagation(),this.logger.log("handleDrop","found files",{evt:e,files:r,imageFiles:i}),await this.pasteFilesIntoQuill(i);return}if((a=e.dataTransfer)!=null&&a.items){e.stopPropagation(),this.logger.log("handleDrop","found items",{evt:e,files:r,imageFiles:i}),await this.handleDataTransferList((u=e.dataTransfer)==null?void 0:u.items,e);return}const o=(h=e.dataTransfer)==null?void 0:h.getData("URL");if(this.logger.log("handleDrop","trying getData('URL')",{draggedUrl:o}),o){const y=await(await fetch(o)).blob();this.logger.log("handleDrop","blob from drag event",{evt:e,files:r,imageFiles:i}),await this.pasteFilesIntoQuill([y])}}async handlePaste(e){var t;typeof this.handleOnPaste=="function"&&!this.handleOnPaste(e)||await this.handleDataTransferList((t=e.clipboardData)==null?void 0:t.items,e)}async handleDataTransferList(e,t){const r=Array.from(e||[]),i=r.filter(a=>a.kind==="file"&&Mw(a.type)),o=r.map(a=>({type:a.type,kind:a.kind}));if(this.logger.log("handleDataTransferList",{fileTypes:o,imageCount:i.length}),!i.length)return;t.preventDefault(),t.stopPropagation();const l=i.map(a=>a.getAsFile());await this.pasteFilesIntoQuill(l)}async pasteFilesIntoQuill(e){this.logger.log(" pasteFilesIntoQuill",`pasting ${e.length} images...`),await Promise.all(e.map(async(t,r)=>{if(!t)return;const i=await R4(t);this.logger.log(" pasteFilesIntoQuill",`pasting image (${r})`),this.onNewDataUrl(i)})),this.logger.log(" pasteFilesIntoQuill","done")}}class Np{constructor(e,t){Ae(this,"quill");Ae(this,"range");Ae(this,"options");Ae(this,"imageDrop");Ae(this,"fileHolder");Ae(this,"Logger");this.quill=e,this.options=t||{};const r=!!t.debug,i=!!t.suppressErrorLogging;this.Logger=new xz(r,i),_z(t,this.Logger);const o=async a=>{this.Logger.log("onImageDrop",{dataUrl:a});const u=await this.downscaleImageFromUrl(a);this.insertToEditor(u,Np.b64toBlob(u))};this.imageDrop=new Iz(e,o,this.Logger,typeof this.options.handleOnPaste=="function"?this.options.handleOnPaste:this.options.handleOnPaste!==!1),this.Logger.log("fileChanged",{options:t,quill:e,debug:r});const l=this.quill.getModule("toolbar");l?l.addHandler("image",()=>this.selectLocalImage()):this.Logger.error("Quill toolbar module not found! need { toolbar: // options } in Quill.modules for image icon to sit in")}static b64toBlob(e){const t=atob(e.split(",")[1]),r=e.slice(5).split(";")[0],i=new ArrayBuffer(t.length);let o=new Uint8Array(i);for(let l=0;l<t.length;l++)o[l]=t.charCodeAt(l);return new Blob([i],{type:r})}destroy(){this.imageDrop&&console.warn("ImageDrop instance cleanup")}selectLocalImage(e){this.range=this.quill.getSelection(),this.fileHolder=document.createElement("input"),this.fileHolder.setAttribute("type","file"),this.fileHolder.setAttribute("accept","image/*"),this.fileHolder.setAttribute("style","visibility:hidden"),this.fileHolder.onchange=()=>this.fileChanged().then(()=>e&&e()),document.body.appendChild(this.fileHolder),this.fileHolder.click(),window.requestAnimationFrame(()=>{this.fileHolder&&document.body.removeChild(this.fileHolder)})}async fileChanged(e){var l;const t=e||((l=this.fileHolder)==null?void 0:l.files);if(!(t!=null&&t.length))return;const r=t[0];if(this.Logger.log("fileChanged",{file:r}),!r)return;const i=await R4(r),o=await this.downscaleImageFromUrl(i);this.insertToEditor(o,Np.b64toBlob(o))}async downscaleImageFromUrl(e){const t=await Cz(this.Logger,e,{maxWidth:this.options.maxWidth,maxHeight:this.options.maxHeight,imageType:this.options.imageType,keepImageTypes:this.options.keepImageTypes,ignoreImageTypes:this.options.ignoreImageTypes,imageQuality:this.options.quality});return this.Logger.log("downscaleImageFromUrl",{dataUrl:e,dataUrlCompressed:t}),t}insertToEditor(e,t){if(this.options.insertIntoEditor)this.options.insertIntoEditor(e,t,this.quill);else{this.Logger.log("insertToEditor",{url:e}),this.range=this.quill.getSelection();const r=this.range;if(!r)return;this.logFileSize(e),this.quill.insertEmbed(r.index,"image",`${e}`,"user"),r.index++,this.quill.setSelection(r,"api")}}logFileSize(e){const i=(Math.round((e.length-"data:image/png;base64,".length)*3/4)/1024).toFixed(0);this.Logger.log("estimated img size: "+i+" kb")}}window.imageCompressor=Np;const Fp={OVERLAY:"ql-image-resizer-overlay",HANDLE:"ql-image-resizer-handle",DISPLAY:"ql-image-resizer-display",TOOLBAR:"ql-image-resizer-toolbar",TOOLBAR_BUTTON:"ql-image-resizer-toolbar-button"},Vh={BACKSPACE:8,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40},P0=(n,e)=>{const t=n?"top":"bottom",r=e?"left":"right",i=n===e?"nwse-resize":"nesw-resize";return{[t]:"-5px",[r]:"-5px",cursor:i}},kz={tl:P0(!0,!0),tr:P0(!0,!1),bl:P0(!1,!0),br:P0(!1,!1)},Mz={modules:["DisplaySize","Toolbar","Resize","Keyboard"],embedTags:["VIDEO","IFRAME"],tools:["left","center","right","justify"],contentOptions:[{attribute:["width"],limit:{minWidth:100},blotName:"image"},{attribute:["width","height"],limit:{minWidth:200,ratio:.5625},blotName:"video"}]},Lz=qe.import("formats/image");class Q0 extends Lz{static get ATTRIBUTES(){return["alt","height","width","class","style","data-align"]}static formats(e){return this.ATTRIBUTES.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)??""),t),{})}format(e,t){this.constructor.ATTRIBUTES.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}Ae(Q0,"blotName","image"),Ae(Q0,"tagName","img"),Ae(Q0,"scope",Jn.INLINE);qe.register("formats/image",Q0,!0);class Zp{constructor(e){Ae(this,"resizer");Ae(this,"quill");Ae(this,"overlay");Ae(this,"activeEle");Ae(this,"blot");Ae(this,"options");Ae(this,"requestUpdate");this.resizer=e,this.quill=e.quill,this.overlay=e.overlay,this.activeEle=e.activeEle,this.blot=e.blot,this.options=e.options,this.requestUpdate=()=>e.onUpdate(!0)}onCreate(){}onDestroy(){}onUpdate(){}}class Oz extends Zp{constructor(){super(...arguments);Ae(this,"display")}onCreate(){var t;this.display=document.createElement("div"),this.display.className=vd[Fp.DISPLAY],(t=this.overlay)==null||t.appendChild(this.display)}onUpdate(){if(!this.display||!this.activeEle)return;const[t,r]=[this.activeEle.offsetWidth,this.activeEle.offsetHeight];this.display.innerHTML=`${t} × ${r}`,this.positionDisplay(t,r)}positionDisplay(t,r){var a;if(!this.display)return;const i=this.display.getBoundingClientRect(),o=t>120&&r>30,l=((a=this.activeEle)==null?void 0:a.style.float)==="right";Object.assign(this.display.style,{right:o?"4px":l?"auto":`-${i.width+4}px`,bottom:o?"4px":`-${i.height+4}px`,left:o?"auto":l?`-${i.width+4}px`:"auto"})}}class Pz extends Zp{constructor(){super(...arguments);Ae(this,"boxes",[]);Ae(this,"dragBox",null);Ae(this,"dragStartX",0);Ae(this,"dragStartY",0);Ae(this,"contentOption");Ae(this,"preDragSize",{width:0,height:0});Ae(this,"naturalSize",[0,0]);Ae(this,"handleDragProxy",null);Ae(this,"handleMouseupProxy",null);Ae(this,"handleMousedown",t=>{!this.blot||!this.activeEle||(this.dragBox=t.target,this.dragStartX=t.clientX,this.dragStartY=t.clientY,this.preDragSize={width:this.activeEle.offsetWidth,height:this.activeEle.offsetHeight},this.naturalSize=this.getNaturalSize(),this.setCursor(window.getComputedStyle(this.dragBox).cursor),this.handleDragProxy=this.handleDrag.bind(this),this.handleMouseupProxy=this.handleMouseup.bind(this),document.addEventListener("mousemove",this.handleDragProxy,!0),document.addEventListener("mouseup",this.handleMouseupProxy,!0))});Ae(this,"handleMouseup",t=>{if(!this.activeEle||!this.blot||!this.contentOption)return;const r=this.calcSize(t,this.contentOption.limit);Object.assign(this.activeEle,r),Object.assign(this.activeEle.style,{width:null,height:null}),this.setCursor(""),this.removeEventListeners()});Ae(this,"handleDrag",t=>{!this.activeEle||!this.blot||!this.contentOption||(Object.assign(this.activeEle.style,this.calcSize(t,{...this.contentOption.limit,unit:!0})),this.requestUpdate())});Ae(this,"handleDoubleClick",t=>{if(!this.blot||!this.activeEle||!this.contentOption)return;t.stopPropagation();const[r,i]=this.naturalSize,o={};this.contentOption.attribute.includes("width")&&(o.width=r),this.contentOption.attribute.includes("height")&&(o.height=i);const l=this.applyConstraints(o,this.contentOption.limit);Object.assign(this.activeEle,l),this.requestUpdate()})}onCreate(){!this.blot||!this.options.contentOptions||(this.contentOption=this.options.contentOptions.find(t=>t.blotName===this.blot.statics.blotName),this.boxes=[],["tl","tr","br","bl"].forEach(this.addBox.bind(this)))}onDestroy(){this.setCursor("")}addBox(t){var i;const r=document.createElement("div");r.className=`${vd[Fp.HANDLE]} ${t}`,r.addEventListener("mousedown",this.handleMousedown,!1),r.addEventListener("dblclick",this.handleDoubleClick,!1),Object.assign(r.style,kz[t]),(i=this.overlay)==null||i.appendChild(r),this.boxes.push(r)}removeEventListeners(){this.handleDragProxy&&(document.removeEventListener("mousemove",this.handleDragProxy,!0),this.handleDragProxy=null),this.handleMouseupProxy&&(document.removeEventListener("mouseup",this.handleMouseupProxy,!0),this.handleMouseupProxy=null)}calcSize(t,r={}){var u;if(!this.dragBox||!this.activeEle)return{};const i=t.clientX-this.dragStartX,o=t.clientY-this.dragStartY,l=this.dragBox===this.boxes[0]||this.dragBox===this.boxes[3]?-1:1,a={};return(u=this.contentOption)!=null&&u.attribute?this.contentOption.attribute.forEach(h=>a[h]=this.preDragSize[h]):a.width=this.preDragSize.width,a.width&&(a.width=Math.round(this.preDragSize.width+i*l)),a.height&&(a.height=Math.round(this.preDragSize.height+o*l)),this.applyConstraints(a,r)}applyConstraints(t,r={}){const i=typeof t.width=="string"?parseInt(t.width,10):t.width||0,o=typeof t.height=="string"?parseInt(t.height,10):t.height||0;let l=i,a=o;if(r.ratio){l=this.applyLimit(l,r.minWidth,r.maxWidth),a=l*r.ratio;const h=this.applyLimit(a,r.minHeight,r.maxHeight);h!==a&&(a=h,l=a/r.ratio)}else i&&(l=this.applyLimit(l,r.minWidth,r.maxWidth)),o&&(a=this.applyLimit(a,r.minHeight,r.maxHeight));const u={};return t.width!==void 0&&(u.width=r.unit?`${l}px`:l),t.height!==void 0&&(u.height=r.unit?`${a}px`:a),u}applyLimit(t,r,i){let o=t;return r!==void 0&&(o=Math.max(r,o)),i!==void 0&&(o=Math.min(i,o)),o}getNaturalSize(){if(!this.activeEle)return[0,0];const t=this.activeEle.getAttribute("data-size");if(!t){const r=this.activeEle,i=[r.offsetWidth,r.offsetHeight];return r.setAttribute("data-size",i.join(",")),i}return t.split(",").map(Number)}setCursor(t){[document.body,this.activeEle].forEach(r=>r&&(r.style.cursor=t))}}const qh=class qh extends Zp{constructor(){super(...arguments);Ae(this,"keyboardProxy",null)}static injectInit(t){var i;const r=(i=t.keyboard)==null?void 0:i.bindings;r&&[qh.keys.LEFT,qh.keys.RIGHT].forEach(o=>(r[o]||[]).unshift(qh.makeArrowHandler(o)))}static makeArrowHandler(t){const r=t===qh.keys.LEFT;return{key:t,shiftKey:!1,altKey:null,[r?"prefix":"suffix"]:/^$/,handler(i){const o=this.quill;if(!o.resizer)return!0;let l=i.index;const a=t===qh.keys.RIGHT,[u]=o.getLine(l+(r?-1:0));if(!u)return!0;if(o.resizer.judgeShow(u))return!1;const h=o.getIndex(u);if(a&&h+u.length()-1===l)return!0;a&&(l+=i.length+1);const[y]=o.getLeaf(l);if(!y)return!0;const x=y.offset(y.parent),w=y.constructor&&"scope"in y.constructor&&y.constructor.scope===Jn.BLOCK_BLOT;if(r&&(w&&l===x||l===0||l===h))return!0;let _=y;if(r&&x===0){const[S]=o.getLeaf(l-1);S&&(_=S)}return!_||!o.resizer.judgeShow(_)}}}onCreate(){this.keyboardProxy=this.keyboardHandle.bind(this),document.addEventListener("keydown",this.keyboardProxy,!0)}onDestroy(){this.keyboardProxy&&document.removeEventListener("keydown",this.keyboardProxy,!0)}keyboardHandle(t){if(t.defaultPrevented||t.shiftKey||t.ctrlKey||t.altKey||!this.activeEle)return;const r=t.keyCode;let i=this.blot.offset(this.quill.scroll),o=null,l=!1;r===Vh.BACKSPACE||r===Vh.DELETE?(this.handleDelete(),l=!0):r>=Vh.LEFT&&r<=Vh.DOWN&&([i,o]=this.handleArrowKeys(r,i),l=!0),l&&(t.stopPropagation(),t.preventDefault()),!(o&&this.resizer.judgeShow(o,o.domNode))&&(this.quill.setSelection(i),this.resizer.hide())}handleDelete(){this.blot&&(this.blot.deleteAt(0,1),this.blot.parent.optimize({}))}handleArrowKeys(t,r){let i=null;return t===Vh.RIGHT?r+=this.blot.length()||1:t===Vh.UP?(r=this.getOtherLineIndex(-1),i=this.quill.getLeaf(r)[0]):t===Vh.DOWN&&(r=this.getOtherLineIndex(1),i=this.quill.getLeaf(r)[0]),[r,i]}getOtherLineIndex(t){if(!this.blot)return 0;const r=this.blot.offset(this.quill.scroll),[i]=this.quill.getLine(r);if(!i)return r;const o=this.blot.offset(i)+1,l=t>0?i.next:i.prev;if(!l)return r;let a=l.length();return l.statics.blotName==="block"&&a--,l.offset(this.quill.scroll)+Math.min(a,o)}};Ae(qh,"keys",Vh);let pv=qh;const u1=class u1 extends Zp{constructor(t){super(t);Ae(this,"toolbar");Ae(this,"blot");this.blot=t.blot}createStyleTool(t,r){const i={left:{float:"left"},right:{float:"right"},center:{display:"block",margin:"0 auto",float:"none"},justify:{display:"block",float:"none",margin:"0",width:"100%"}};return{icon:t,apply:o=>{const l=i[r];Object.assign(o.style,l),o.setAttribute("data-align",r)},isApplied:o=>{const l=o.style;switch(r){case"center":return l.float==="none";case"justify":return l.display==="block"&&l.width==="100%";case"left":case"right":return l.float===r;default:return!1}}}}onCreate(){var t;this.toolbar=document.createElement("div"),this.toolbar.className=vd[Fp.TOOLBAR],(t=this.overlay)==null||t.appendChild(this.toolbar),Object.keys(u1.Tools).forEach(r=>{const i=r;u1.Tools[i]=this.createStyleTool(u1.Tools[i].icon,i)}),this._addToolbarButtons()}_addToolbarButtons(){if(!this.toolbar||!this.activeEle)return;const{Tools:t}=this.constructor;this.options.tools.forEach(r=>{const i=r,o=t[i];if(!o)return;const l=document.createElement("button");l.type="button",l.className=vd[Fp.TOOLBAR_BUTTON],l.innerHTML=s1.renderToString(k.jsx(ho,{icon:o.icon,size:"xs"})),l.setAttribute("data-tool",i),o.isApplied&&o.isApplied.call(this,this.activeEle)&&(l.style.backgroundColor="var(--AEditor_Addon_Secondary_color)"),this.addButtonClickHandler(l,o),this.toolbar.appendChild(l)})}addButtonClickHandler(t,r){!this.activeEle||!this.blot||t.addEventListener("click",i=>{var l;if(i.stopPropagation(),r.handler&&r.handler.call(this,i,t,this.activeEle)!==!0)return;const o=r.isApplied&&r.isApplied.call(this,this.activeEle);return this.toolbar&&Array.from(this.toolbar.querySelectorAll("button")).forEach(a=>a.style.backgroundColor=""),o?(this.activeEle.style.cssText="",this.activeEle.setAttribute("data-align","")):(t.style.backgroundColor="var(--AEditor_Addon_Secondary_color)",(l=r.apply)==null||l.call(r,this.activeEle)),this.requestUpdate(),!1})}};Ae(u1,"Tools",{left:{icon:"AlignLeft"},center:{icon:"AlignCenter"},right:{icon:"AlignRight"},justify:{icon:"AlignJustify"}});let am=u1;class I4{constructor(e,t={}){Ae(this,"quill");Ae(this,"options");Ae(this,"moduleClasses");Ae(this,"modules",[]);Ae(this,"blot");Ae(this,"selectedBlots",[]);Ae(this,"embedClassName","");Ae(this,"activeEle");Ae(this,"overlay");Ae(this,"updateFromModule",!1);Ae(this,"hideProxy",null);Ae(this,"updateOverlayPositionProxy",null);var i;e.resizer=this,this.quill=e;const r=t.modules?[...t.modules]:null;this.options={...Mz,...t},r&&(this.options.modules=r),document.execCommand("enableObjectResizing",!1,"false"),this.moduleClasses=this.options.modules,this.quill.root.addEventListener("mousedown",this.handleClick.bind(this),!1),this.quill.on("text-change",this.handleChange.bind(this)),this.quill.container.style.position=this.quill.container.style.position||"relative",this.quill.on("selection-change",this.addBlotsSelectedClass.bind(this)),pv.injectInit(this.quill),(i=this.options.embedTags)!=null&&i.length&&this.initializeEmbed()}initializeModules(){this.modules.forEach(e=>e.onDestroy()),this.modules=[],this.modules=this.moduleClasses.map(e=>new(this.constructor.Modules[e]||e)(this)),this.modules.forEach(e=>e.onCreate()),this.repositionElements(),this.modules.forEach(e=>e.onUpdate())}initializeEmbed(){if(!this.options.embedTags.length)return;this.embedClassName=`ql-${Array.from({length},()=>[Math.floor(Math.random()*62)]).join("")}`;const e=[""].concat(this.options.embedTags).join(`, .${this.embedClassName} `).slice(2)+"{pointer-events: none;}",t=document.createElement("style");t.textContent=e,this.quill.container.appendChild(t),this.quill.root.classList.add(this.embedClassName)}onUpdate(e){this.updateFromModule=!!e,this.repositionElements(),this.modules.forEach(t=>t.onUpdate())}handleClick(e){if(this.overlay&&(e.target===this.overlay||this.overlay.contains(e.target)))return;let t=e.target;if(t=this.getEventTarget(e,t),t!=null&&t.tagName){const r=this.quill.scroll.find(t);if(r&&this.judgeShow(r,t)){e.preventDefault();return}}this.activeEle&&this.hide()}getEventTarget(e,t){var o;const r=(o=this.options.embedTags)==null?void 0:o.join();if(!r)return t;const i=this.quill.root;return(t===i||t.querySelectorAll(r).length)&&(i.classList.remove(this.embedClassName),t=document.elementFromPoint(e.clientX,e.clientY),i.classList.add(this.embedClassName)),t}judgeShow(e,t){if(!e||!this.options.contentOptions)return!1;!t&&e.domNode&&(t=e.domNode);const r=this.options.contentOptions.find(o=>o.blotName===e.statics.blotName);if(!r)return!1;if(this.activeEle===t)return!0;const i=r.limit||{};return!i.minWidth||i.minWidth&&t.offsetWidth>=i.minWidth?(this.activeEle&&this.hide(),this.activeEle=t,this.blot=e,this.showOverlay(),this.initializeModules(),!0):!1}handleChange(e,t,r){if(this.updateFromModule){this.updateFromModule=!1;return}r!=="user"||!this.overlay||!this.activeEle||this.onUpdate()}showOverlay(){this.overlay&&this.hideOverlay(),this.quill.setSelection(null),[document.body,this.quill.root].forEach(e=>e.style.userSelect="none"),this.overlay=document.createElement("div"),this.overlay.className=`${vd[Fp.OVERLAY]}`,this.overlay.addEventListener("wheel",e=>{e.preventDefault(),e.stopPropagation(),this.quill.root.scrollTop+=e.deltaY*.5},{passive:!1}),this.quill.container.appendChild(this.overlay),this.hideProxy=()=>this.activeEle&&this.hide(),this.updateOverlayPositionProxy=()=>this.overlay&&(this.overlay.style.marginTop=-1*this.quill.root.scrollTop+"px"),this.quill.root.addEventListener("input",this.hideProxy,!0),this.quill.root.addEventListener("scroll",this.updateOverlayPositionProxy),this.repositionElements()}hideOverlay(){this.overlay&&(this.quill.container.removeChild(this.overlay),this.overlay=void 0,this.hideProxy&&this.quill.root.removeEventListener("input",this.hideProxy,!0),this.updateOverlayPositionProxy&&this.quill.root.removeEventListener("scroll",this.updateOverlayPositionProxy),[document.body,this.quill.root].forEach(e=>e.style.userSelect=""))}repositionElements(){if(!this.overlay||!this.activeEle)return;const e=this.quill.container,t=this.activeEle.getBoundingClientRect(),r=e.getBoundingClientRect();Object.assign(this.overlay.style,{left:`${t.left-r.left-1+e.scrollLeft}px`,top:`${t.top-r.top+this.quill.root.scrollTop}px`,width:`${t.width}px`,height:`${t.height}px`,marginTop:-1*this.quill.root.scrollTop+"px"})}addBlotsSelectedClass(e){if(!e){this.selectedBlots=[];return}try{const t=i=>{var o;return["image","iframe","video"].includes((o=i.statics)==null?void 0:o.blotName)},r=this.quill.scroll.descendants(t,e.index,e.length);this.selectedBlots=r.filter(i=>!i.statics||!this.options.contentOptions?!1:!!this.options.contentOptions.find(o=>o.blotName===i.statics.blotName))}catch{}}hide(){this.hideOverlay(),this.modules.forEach(e=>e.onDestroy()),this.modules=[],this.activeEle=void 0,this.blot=void 0}}Ae(I4,"Modules",{Base:Zp,DisplaySize:Oz,Toolbar:am,Resize:Pz,Keyboard:pv});const D0=qe.import("delta"),Dz=qe.import("modules/clipboard");function Nz(n){let e=Number.parseFloat(n.getAttribute("width")||String(Ss.colDefaultWidth));if(Number.isNaN(e)){const t=n.style.width;e=t?Number.parseFloat(t):n.offsetWidth}return e}function Fz(n,e){const t=new Array(e).fill(Ss.colDefaultWidth),r=Array.from(n.querySelectorAll("tr"));for(const i of r){const o=Array.from(i.querySelectorAll("td"));for(const[l,a]of o.entries())if(l<e){const u=Nz(a);t[l]=u||t[l]}else break}return t}class Bz extends Dz{constructor(t,r){super(t,r);Ae(this,"tableId",Ba());Ae(this,"rowId",Ba());Ae(this,"colIds",[]);Ae(this,"rowspanCount",[]);Ae(this,"cellCount",0);Ae(this,"colCount",0);Ae(this,"STYLE_PROPERTIES",["color","background","background-color","mso-pattern","border","border-color","border-top","border-right","border-bottom","border-left"]);this.quill=t,this.addMatcher("table",this.matchTable.bind(this)),this.addMatcher("colgroup",this.matchColgroup.bind(this)),this.addMatcher("col",this.matchCol.bind(this)),this.addMatcher("tr",this.matchTr.bind(this)),this.addMatcher("td",this.matchTd.bind(this)),this.addMatcher("th",this.matchTd.bind(this)),this.addMatcher("caption",this.matchCaption.bind(this))}matchTable(t,r){if(r.ops.length===0)return r;const i=[],o=[];let l=-1;for(let h=0;h<r.ops.length;h++){const{attributes:y,insert:x}=r.ops[h],{table:w,[et.tableCell]:_,...S}=y||{},R=tg.isObject(x)&&x[et.tableCol];R?o.push({insert:x}):i.push({attributes:S,insert:x}),!(S!=null&&S[et.tableCellInner])&&!R&&(l=h)}const u=Fz(t,this.colIds.length).reduce((h,y,x)=>(o[x]?h.push(o[x]):h.push({insert:{[et.tableCol]:{tableId:this.tableId,colId:this.colIds[x],width:y,full:!0}}}),h),[]);return i.splice(l+1,0,...u),this.tableId=Ba(),this.colIds=[],this.rowspanCount=[],this.cellCount=0,this.colCount=0,new D0(i)}matchColgroup(t,r){const i=[];for(let o=0;o<r.ops.length;o++){const l=r.ops[o];l&&tg.isObject(l.insert)&&l.insert[et.tableCol]&&i.push(l)}return new D0(i)}matchCol(t){this.colIds[this.colCount]=Ba();const r=new D0().insert({[et.tableCol]:Object.assign(Ig.value(t),{tableId:this.tableId,colId:this.colIds[this.colCount]})});return this.colCount+=1,r}matchTr(t,r){this.rowId=Ba(),this.cellCount=0;for(const[i,o]of this.rowspanCount.entries())o.rowspan>0&&(o.rowspan-=1),o.rowspan<=0&&(this.rowspanCount[i]={rowspan:0,colspan:0});return r}matchTd(t,r){const i=t,o=Df.formats(i);if(!this.colIds[this.cellCount]||!this.rowspanCount[this.cellCount])for(let y=this.cellCount;y>=0;y--)this.colIds[y]||(this.colIds[y]=Ba()),this.rowspanCount[y]||(this.rowspanCount[y]={rowspan:0,colspan:0});const{colspan:l}=this.rowspanCount[this.cellCount];this.cellCount+=l,o.rowspan>0&&(this.rowspanCount[this.cellCount]={rowspan:o.rowspan,colspan:o.colspan});const a=this.colIds[this.cellCount];this.cellCount+=o.colspan;const u=Object.assign(o,{tableId:this.tableId,rowId:this.rowId,colId:a});this.handleBorderNoneStyles(i,u);const h=[];for(const y of r.ops){const{attributes:x={},...w}=y,{[et.tableCell]:_,...S}=x;h.push({...w,attributes:{...S,[et.tableCellInner]:u}})}return(h.length<=0||!tg.isString(h[h.length-1].insert)||!h[h.length-1].insert.endsWith(`
|
|
479
479
|
`))&&h.push({insert:`
|
|
480
|
-
`,attributes:{[et.tableCellInner]:u}}),new D0(h)}handleBorderNoneStyles(t,r){if(!(r!=null&&r.style))return;["border",...["top","right","bottom","left"].flatMap(o=>[`border-${o}`,`border-${o}-style`])].filter(o=>t.style[o]==="none").forEach(o=>r.style=r.style.replaceAll(new RegExp(`${o}:none;?`,"g"),""))}convert({html:t,text:r},i={}){if(t){const a=new DOMParser().parseFromString(t,"text/html");this.preprocessTableHtml(a),this.mergeClassStylesToInline(a),t=a.body.innerHTML}const o=super.convert({html:t,text:r},i);if(i[et.tableCellInner])for(const l of o.ops){if(tg.isObject(l.insert)&&l.insert[et.tableCol]){l.insert="";continue}l.attributes||(l.attributes={}),l.attributes[et.tableCellInner]=i[et.tableCellInner]}return o}parseStyleWithFilter(t,r){if(!t)return{};const i={};let o="",l="",a=!0,u=0;for(let h=0;h<t.length;h++){const y=t[h];y===":"&&a?(o=t.substring(u,h).trim(),u=h+1,a=!1):y===";"&&(!a&&o&&(l=t.substring(u,h).trim(),(!r||r(o))&&(i[o]=l)),u=h+1,a=!0)}return!a&&o&&u<t.length&&(l=t.substring(u).trim(),(!r||r(o))&&(i[o]=l)),i}mergeClassStylesToInline(t){var r;try{const i=t.querySelectorAll("td[class], th[class]");if(i.length===0)return;const o=new Set;for(const y of i)(y.getAttribute("class")||"").split(/\s+/).filter(Boolean).forEach(w=>o.add(w));if(o.size===0)return;const l=t.querySelectorAll("style");if(l.length===0)return;const a=Array.from(l).map(y=>y.textContent||"").join("");if(!a)return;const u={},h=y=>this.STYLE_PROPERTIES.some(x=>y.startsWith(x));for(const y of o){const x=new RegExp(`\\.${y}[^{]*{([^}]*)}`,"g");let w;for(;(w=x.exec(a))!==null;){const _=w[1],S=this.parseStyleWithFilter(_),R={};let I=!1;for(const O in S)h(O)&&(R[O]=S[O],I=!0);I&&(u[y]=R)}}if(Object.keys(u).length===0)return;for(let y=0;y<i.length;y++){const x=i[y],w=((r=x.getAttribute("class"))==null?void 0:r.split(/\s+/).filter(Boolean))||[],_=x.getAttribute("style")||"",S=this.parseStyleWithFilter(_);let R=!1;for(const I of w){const O=u[I];if(O)for(const P in O)S[P]||(S[P]=O[P],R=!0)}if(R){let I="";for(const O in S)I+=O+":"+S[O]+";";I&&x.setAttribute("style",I)}x.removeAttribute("class")}}catch(i){console.error("스타일 처리 오류",i)}}matchCaption(t,r){for(let i=0;i<r.ops.length;i++){const o=r.ops[i],{attributes:l}=o;l&&l[et.tableCaption]&&(l[et.tableCaption].tableId=this.tableId,o.attributes=l)}return r}preprocessTableHtml(t){try{const r=t.querySelectorAll("table");for(const i of Array.from(r))i.querySelectorAll("tr").length!==0&&(this.cleanupTableStyles(i),this.applyRowspanHeights(i),this.fixRowspanCells(i));this.mergeClassStylesToInline(t)}catch(r){console.error("테이블 전처리 오류",r)}}cleanupTableStyles(t){const r=t.querySelectorAll("td, th, tr, colgroup");for(const i of r){const o=i;o.removeAttribute("height");const l=o.getAttribute("style");if(l){const a=l.replace(/height\s*:[^;]*;?/gi,"").trim();o.setAttribute("style",a||"")}}}applyRowspanHeights(t){const i=t.querySelectorAll("td, th");t.style.borderCollapse="collapse";for(const o of i){const l=o,u=parseInt(l.getAttribute("rowspan")||"1")*24,h=l.getAttribute("style")||"",y=h+(h?"; ":"")+`height: ${u}px`;l.setAttribute("style",y)}}fixRowspanCells(t){const r=t.querySelectorAll("tr");if(r.length<=1)return;const i=[],o=new Map;for(let l=0;l<r.length;l++){const u=r[l].querySelectorAll("td, th");if(u.length===0&&l<r.length-1){i.push(l);continue}for(const h of Array.from(u)){const y=parseInt(h.getAttribute("rowspan")||"1");if(y>1)for(let x=1;x<y;x++){const w=l+x;if(w>=r.length)break;o.has(w)||o.set(w,[]),o.get(w).push(h)}}}i.length>0&&this.processEmptyRows(i,r,o)}processEmptyRows(t,r,i){for(const o of t){const l=i.get(o);if(l)for(const a of l){const u=parseInt(a.getAttribute("rowspan")||"1");u>1&&a.setAttribute("rowspan",(u-1).toString())}}for(const o of t.reverse())r[o].remove()}}class Dz extends T4{fixUnusuaDeletelTable(){}mergeCells(e){if(!this.table||!this.tableSelection)return;const t=this.tableSelection.selectedTds||[];if(t.length>1&&(e=t),!e||e.length<=1)return;const r=Kl(e[0],et.tableMain),i=r.getRows(),o=e.map(w=>{if(!w||!w.parent||!w.parent.domNode)return null;const _=w.parent.domNode;if(!_)return null;const S=i.findIndex(O=>O.rowId===w.rowId);if(S===-1)return null;const R=w.getColumnIndex();if(R===-1)return null;const I=_.getBoundingClientRect();return!I||I.width===0||I.height===0?null:{td:w,rowIndex:S,colIndex:R,rowspan:w.rowspan,colspan:w.colspan,visualLeft:I.left,visualRight:I.right,visualTop:I.top,visualBottom:I.bottom}}).filter(Boolean);if(o.length<=1)return;o.sort((w,_)=>w.visualTop-_.visualTop||w.visualLeft-_.visualLeft);const l=o[0],a=l.td,u=Math.max(...o.map(w=>w.rowIndex+w.rowspan-1)),h=Math.max(...o.map(w=>w.colIndex+w.colspan-1)),y=u-l.rowIndex+1,x=h-l.colIndex+1;for(const w of o)w.td!==a&&(w.td.moveChildren(a),w.td.parent.remove());a.rowspan=y,a.colspan=x,this.fixTableByRemove(r)}}qe.register({"modules/imageCompress":Np,"modules/resize":I4,"modules/tableUp":Dz,"modules/magicUrl":fF,"formats/divider":sm,"modules/clipboard":Pz,"modules/copy":hz,"modules/toggleFullscreen":o4},!0);const c1={KB:1024,QUALITY:.7,IMAGE_SIZES:new Map},Nz={getCharLength:n=>Array.from(n).length,calculateTextSize:n=>{if(!n.ops||n.ops.length===0)return 0;let e=0;for(const t of n.ops)if(typeof t.insert=="string")e+=new TextEncoder().encode(t.insert).length-1;else if(typeof t.insert=="object"&&t.insert.image){const r=t.insert.image;r&&(e+=c1.IMAGE_SIZES.get(r)||Math.ceil(r.length*c1.QUALITY))}return e}},Fz=n=>{const{type:e="Primary",editorRef:t,useValue:r,useError:i,placeholder:o,tabIndex:l,autoFocus:a,editorProps:u,style:h,minHeight:y,maxHeight:x,contentHeight:w,contentMaxHeight:_=1e3,toolbarSize:S="Med",toolbarType:R="Default",readOnly:I,limitPosition:O="Bottom",maxLength:P,size:Y=100,editorClassName:z,editorStyle:W,noImageResize:B,...ee}=n,[{wrapId:H,wrapProps:V,labelProps:de,...Z},te]=Bg(ee),ne=N.useMemo(()=>e==="ReadOnly"||I,[e,I]),fe=N.useMemo(()=>w?20:0,[w]),[ae,j]=N.useState(S==="Med"?40:50),re=N.useMemo(()=>ne||e==="Raw"?0:ae,[e,ne,ae]),[he,be]=N.useState(w),[le,J]=N.useState(!1),pe=N.useRef(null),Te=N.useRef(0),Fe=N.useRef(0),_e=N.useMemo(()=>R==="Title",[R]),Me=N.useMemo(()=>{let ye;return y&&x||e==="Raw"?ye=void 0:ye=0,he?he+re:ye},[y,x,e,he,re]),De=N.useMemo(()=>{const ye=[y,w].filter(se=>se!=null);return ye.length?Math.min(...ye):void 0},[y,w]),Re=N.useMemo(()=>x??"100%",[x]),Le=N.useMemo(()=>(Array.isArray(Z.errorMessage)?Z.errorMessage.some(Boolean):!!Z.errorMessage)?"Error":e,[Z.errorMessage,e]),Oe=N.useCallback(ye=>{let se=ye;se=y7.sanitize(ye);const He=document.createElement("div");return He.innerHTML=se,new qe(He,{readOnly:!0}).getContents()},[]),[Ge,Ve]=Ho(r,""),[Pe,ot]=N.useState(()=>Oe(Ge));N.useEffect(()=>{Ve===void 0&&ot(Oe(Ge))},[Oe,Ve,Ge]);const Xe=N.useRef(null),lt=N.useRef([]),[Ye,mt]=N.useState("NoTransition");N.useEffect(()=>{const ye=setTimeout(()=>mt(""),0);return()=>{clearTimeout(ye),lt.current.forEach(se=>se()),lt.current=[]}},[]);const bt=N.useCallback((ye,se)=>{if(!w)return se;const We=Math.max(y||w,0);return Math.min(x||_,Math.max(We,se+ye))},[w,y,x,_]),Mt=N.useCallback(ye=>{if(!le||!w)return;const se=ye.clientY-Fe.current,He=bt(se,Te.current);he!==He&&be(He),ye.preventDefault(),ye.stopPropagation()},[le,w,bt,he]),Nt=N.useCallback(ye=>{J(!1),document.removeEventListener("mousemove",Mt),document.removeEventListener("mouseup",Nt),ye.preventDefault(),ye.stopPropagation()},[Mt]),_t=N.useCallback(ye=>{if(!w)return;if(ye.detail===2){be(w);return}he?Te.current=he:(be(w),Te.current=w),J(!0),Fe.current=ye.clientY;const se=We=>{if(!w)return;const pt=We.clientY-Fe.current,wt=bt(pt,Te.current);be(wt),We.preventDefault(),We.stopPropagation()},He=We=>{J(!1),document.removeEventListener("mousemove",se),document.removeEventListener("mouseup",He),We.preventDefault(),We.stopPropagation()};document.addEventListener("mousemove",se),document.addEventListener("mouseup",He),ye.preventDefault(),ye.stopPropagation()},[bt,he,w]),rn=N.useCallback((ye,se,He,We)=>{if(He!=="user"&&He!=="api")return;const pt=We.getContents(),wt=We.getLength()-1,qt=P!==void 0&&wt>P,Jt=En=>En.replace(/\s{2,}/g,Cn=>" ".repeat(Cn.length)),Vt=ye.replace(/^<p><br><\/p>$/,"").trim(),hn=Jt(Vt);if(!qt){ot(pt),Ve==null||Ve(hn);return}const ln=pn(pt,P);ot(ln);const kn=new qe(document.createElement("div"));kn.setContents(ln);const Nn=Jt(kn.root.innerHTML.replace(/^<p><br><\/p>$/,"").trim());Ve==null||Ve(Nn)},[P,Ve]),pn=(ye,se)=>{var pt,wt,qt;if(!ye.ops)return ye;const He=new Kn;let We=0;for(const Jt of ye.ops){if(We>=se)break;if(Jt.insert&&typeof Jt.insert=="string"){const Vt=Jt.insert,hn=se-We;if(Vt.length<=hn)(pt=He.ops)==null||pt.push(Jt),We+=Vt.length;else{const ln={...Jt,insert:Vt.substring(0,hn)};(wt=He.ops)==null||wt.push(ln),We+=hn;break}}else We<se&&((qt=He.ops)==null||qt.push(Jt),We+=1)}return He},Kt=N.useCallback(ye=>{var pt,wt;const se=ye.getEditor().container;if(!se)return null;const He=(pt=se.closest(".AEditorContainer"))==null?void 0:pt.querySelector(".ql-toolbar");return He||((wt=se.parentElement)==null?void 0:wt.querySelector(".ql-toolbar"))||null},[]),dn=N.useCallback((ye,se,He,We)=>{if(!ye)return;const pt=He;ye.addEventListener(se,pt,We),lt.current.push(()=>ye.removeEventListener(se,pt,We))},[]),zt=N.useCallback((ye,se,He)=>{const We=se.getFormat();ye.forEach(pt=>{if(We[pt]){const wt=We[pt],qt=`.ql-${pt}`,Jt=He.querySelector(`${qt} .ql-picker-label`),Vt=He.querySelectorAll(`${qt} .ql-picker-item`),hn=Array.from(Vt).find(ln=>ln.getAttribute("data-value")===wt);hn&&(hn.classList.add("ql-selected"),Jt==null||Jt.classList.add("ql-active"))}})},[]),wn=N.useCallback(ye=>{if(!ye.length)return;const We=ye[0].target.getBoundingClientRect(),pt=Math.ceil(We.height);j(wt=>Math.abs(wt-pt)<.1?wt:pt)},[]),$t=N.useCallback((ye,se)=>{if(ye.key!=="Backspace")return;const He=se.getSelection(!1);if(!He||He.length>0)return;const We=He.index;if(We<=0)return;const[pt]=se.getLine(We);if(pt&&We===se.getIndex(pt)||se.getFormat(We,1).link)return;const wt=se.getFormat(We-1,1);if(wt.link){ye.preventDefault();let qt=We-1;for(;qt>0&&se.getFormat(qt-1,1).link===wt.link;)qt--;const[Jt]=se.scroll.descendant(Vt=>{var hn;return((hn=Vt==null?void 0:Vt.statics)==null?void 0:hn.blotName)==="link"},qt);if(Jt!=null&&Jt.domNode){const Vt=(Jt.domNode.textContent||"").length;se.removeFormat(qt,Vt)}}},[]),vn=N.useCallback(()=>({clipboard:{matchers:[["img",()=>!1],["table",()=>!1],["iframe",()=>!1],["video",()=>!1],["h1, h2, h3, h4, h5, h6",()=>!1],["blockquote",()=>!1],["hr",()=>!1]]},copy:{isTitleMode:!0},keyboard:{bindings:{enter:{key:"Enter",handler:()=>!1},newline:{key:"Enter",shiftKey:!0,handler:()=>!1},tab:{key:"Tab",handler:()=>!1},"remove-newline":{key:"Backspace",collapsed:!0,format:["blockquote","list","code-block"],offset:0,handler:function(ye){const{blockquote:se,list:He,["code-block"]:We}=ye.getFormat();return se||He||We?(ye.format("blockquote",!1),ye.format("list",!1),ye.format("code-block",!1),!1):!0}}}},magicUrl:!0,toolbar:{container:[["bold","italic","underline","strike",{color:[]},{background:[]},"clean"]]}}),[]),Pt=N.useCallback(()=>({clipboard:{},copy:{},keyboard:{},magicUrl:!0,toggleFullscreen:{type:Le,maximize:s1.renderToString(k.jsx(ho,{icon:"Maximize",size:S==="Med"?"sm":"md"})),minimize:s1.renderToString(k.jsx(ho,{icon:"Minimize",size:S==="Med"?"sm":"md"}))},imageCompress:{quality:c1.QUALITY,imageType:"image/jpeg",maxWidth:1500,maxHeight:1500,debug:!1,handleOnPaste:ye=>{var se,He;try{const We=(se=ye.clipboardData)==null?void 0:se.items;if(!We)return!0;const pt=Array.from(We).some(Jt=>{const Vt=Jt.type.toLowerCase();return Vt.includes("Excel")||Vt.includes("text/html")}),wt=(He=ye.clipboardData)==null?void 0:He.getData("text/html"),qt=wt&&(wt.includes("<table")||wt.includes("<tbody")||wt.includes("<td"));return!(pt||qt)}catch(We){return console.warn("Error in handleOnPaste:",We),!0}},insertIntoEditor:(ye,se,He)=>{c1.IMAGE_SIZES.has(ye)||c1.IMAGE_SIZES.set(ye,se.size);const We=He.getSelection();We&&He.insertEmbed(We.index,"image",ye,qe.sources.USER)}},...!ne&&{...!B&&{resize:{}},table:!1,tableUp:{fullSwitch:!1,icon:s1.renderToString(k.jsx(ho,{icon:"Table",size:S==="Med"?"sm":"md",strokeWidth:2.5})),resize:JB,resizeScale:QB,customSelect:rz,selection:jB,fixUnusuaDeletelTable:!1,selectionOptions:{tableMenu:XB,tableMenuOptions:{localstorageKey:"used-color",tipText:!0,tools:[lo.InsertCaption,lo.InsertTop,lo.InsertRight,lo.InsertBottom,lo.InsertLeft,lo.Break,lo.MergeCell,lo.SplitCell,lo.Break,lo.DeleteRow,lo.DeleteColumn,lo.DeleteTable,lo.Break,lo.BackgroundColor,lo.BorderColor,lo.Break,lo.CopyCell,lo.CutCell,lo.Break,lo.SwitchWidth]}},texts:{fullCheckboxText:Nr.AEditor["Insert Full Width Table"],customBtnText:Nr.AEditor.Custom,confirmText:Nr.AEditor.Confirm,cancelText:Nr.AEditor.Cancel,rowText:Nr.AEditor.Row,colText:Nr.AEditor.Column,CopyCell:Nr.AEditor["Copy Cell"],CutCell:Nr.AEditor["Cut Cell"],notPositiveNumberError:Nr.AEditor["Not Positive Number Error"],custom:Nr.AEditor.Custom,clear:Nr.AEditor.Clear,transparent:Nr.AEditor.Transparent,perWidthInsufficient:Nr.AEditor.perWidthInsufficient,InsertTop:Nr.AEditor["Insert Row Top"],InsertRight:Nr.AEditor["Insert Column Right"],InsertBottom:Nr.AEditor["Insert Row Bottom"],InsertLeft:Nr.AEditor["Insert Column Left"],MergeCell:Nr.AEditor["Merge Cell"],SplitCell:Nr.AEditor["Split Cell"],DeleteRow:Nr.AEditor["Delete Row"],DeleteColumn:Nr.AEditor["Delete Column"],DeleteTable:Nr.AEditor["Delete Table"],BackgroundColor:Nr.AEditor["Set Background Color"],BorderColor:Nr.AEditor["Set Border Color"],SwitchWidth:Nr.AEditor["Switch Table Width"],InsertCaption:Nr.AEditor["Insert Table Caption"]}},toolbar:{container:[[{header:[1,2,3,!1,4]}],["bold","italic","underline","strike","blockquote","divider",{[T4.toolName]:[]},{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],handlers:{divider:function(){const ye=this.quill,se=ye.getSelection(!0);if(!se)return;const He=Math.min(se.index+1,ye.getLength()-1);ye.insertEmbed(He,"divider",!0,qe.sources.USER),setTimeout(()=>ye.setSelection(Math.min(He+1,ye.getLength()-1),0,qe.sources.SILENT),0)}}}}}),[ne,B,S,Le]),Yt=N.useMemo(()=>_e?vn():Pt(),[_e,vn,Pt]),ct=N.useCallback(ye=>{if(!ye)return;const se=ye.getEditor();if(!se)return;const He=se.root,We=Kt(ye);He&&z&&He.classList.add(...z.split(" ")),He&&W&&Object.entries(W).forEach(([wt,qt])=>{const Jt=wt.replace(/([A-Z])/g,Vt=>`-${Vt[0].toLowerCase()}`);He.style[Jt]=qt}),dn(He,"keydown",wt=>$t(wt,se));const pt=new ResizeObserver(wn);if(We){pt.observe(We),lt.current.push(()=>pt.disconnect());const wt=["header","color","background"];wt.forEach(qt=>{const Jt=We.querySelector(`.ql-${qt} .ql-picker-label`);Jt&&dn(Jt,"click",()=>zt(wt,se,We))})}},[Kt,z,W,dn,wn,$t,zt]),Tt=N.useCallback(ye=>{if(lt.current.forEach(He=>He()),lt.current=[],Xe.current=ye,!ye){tg.isFunction(t)?t(null):t!=null&&t.current&&(t.current=null);return}const se=ye;se.copyContent=He=>{ye.getEditor().getModule("copy").copyContent(He)},tg.isFunction(t)?t(se):t&&(t.current=se),ct(ye)},[t,ct]),It=N.useCallback(()=>k.jsx(zz,{htmlDelta:Pe,isReadonly:ne,limit:Y*c1.KB,noTransition:Ye,useError:i}),[Pe,ne,Ye,Y,i]);return k.jsx(lg,{wrapId:H,...Z,helperText:k.jsx(N.Activity,{mode:O==="Bottom"?"visible":"hidden",children:It()}),wrapProps:{...V,style:{...V==null?void 0:V.style,height:w?"fit-content":"100%"}},label:k.jsxs(bl,{style:{gap:4},children:[Z.label,k.jsx(N.Activity,{mode:O==="Top"?"visible":"hidden",children:It()})]}),labelProps:{...de,style:{minHeight:Z.label?20:void 0,marginBottom:Z.label?4:0,...de==null?void 0:de.style}},children:k.jsxs(Gi,{...te,className:gt.clsx(te.className,vd.AEditorContainer,Ye),style:{...h,height:Me,minHeight:De,maxHeight:Re},children:[k.jsx(Ov,{...u,ref:Tt,preserveWhitespace:!0,className:gt.clsx(u==null?void 0:u.className,vd.AEditor,vd[Le],_e&&"Title",Ye),modules:Yt,placeholder:o,readOnly:ne,theme:"snow",value:Pe,style:{...u==null?void 0:u.style,"--editor-padding":_e?"8px 12px":"12px","--title-color-picker-row":_e?1:4,"--icon-size":`${S==="Med"?20:24}px`,"--toolbar-padding":`${S==="Med"?7.5:12.5}px`,"--title-header-font-size":`${S==="Med"?12:14}px`,"--edit-text":`'${Nr.AEditor.Edit}'`,"--save-text":`'${Nr.AEditor.Save}'`,"--remove-text":`'${Nr.AEditor.Remove}'`,"--default-text":`'${Nr.AEditor.Default}'`,"--visit-url-text":`'${Nr.AEditor["Visit URL:"]}'`,"--enter-link-text":`'${Nr.AEditor["Enter link:"]}'`,"--enter-video-text":`'${Nr.AEditor["Enter video:"]}'`,"--arrow-background":`url("data:image/svg+xml,${encodeURIComponent(s1.renderToString(k.jsx(ho,{icon:"EditorArrow"})))}`},onChange:rn}),k.jsx(Bz,{contentHeight:w,currentHeight:he,handleResizeStart:_t,isResizing:le,noTransition:Ye,resizeRef:pe,resizerHeight:fe})]})})},Bz=n=>{const e=Dn.c(16),{contentHeight:t,resizeRef:r,noTransition:i,resizerHeight:o,handleResizeStart:l,currentHeight:a,isResizing:u}=n,h=t?"visible":"hidden";let y;e[0]!==u||e[1]!==i?(y=gt.clsx(vd.Resizer,u&&vd.Resizing,i,"Caption1"),e[0]=u,e[1]=i,e[2]=y):y=e[2];let x;e[3]!==a?(x=Math.round(a??0),e[3]=a,e[4]=x):x=e[4];const w=`${x}px`;let _;e[5]!==o?(_={height:o},e[5]=o,e[6]=_):_=e[6];let S;e[7]!==l||e[8]!==r||e[9]!==y||e[10]!==w||e[11]!==_?(S=k.jsx("div",{ref:r,className:y,"data-height":w,style:_,onMouseDown:l}),e[7]=l,e[8]=r,e[9]=y,e[10]=w,e[11]=_,e[12]=S):S=e[12];let R;return e[13]!==h||e[14]!==S?(R=k.jsx(N.Activity,{mode:h,children:S}),e[13]=h,e[14]=S,e[15]=R):R=e[15],R},zz=n=>{const e=Dn.c(20),{htmlDelta:t,limit:r,useError:i,isReadonly:o,noTransition:l}=n,[a,u]=Ho(i,!1),h=Nz.calculateTextSize(t);let y,x;if(e[0]!==h||e[1]!==r||e[2]!==u?(y=()=>u==null?void 0:u(h>r),x=[h,r,u],e[0]=h,e[1]=r,e[2]=u,e[3]=y,e[4]=x):(y=e[3],x=e[4]),N.useEffect(y,x),!i||o)return null;let w;e[5]!==l?(w=gt.clsx(vd.Limit,"NoSelect",l),e[5]=l,e[6]=w):w=e[6];let _;e[7]!==a?(_=gt.clsx(a&&vd.Error),e[7]=a,e[8]=_):_=e[8];let S;e[9]!==h?(S=Mg(h),e[9]=h,e[10]=S):S=e[10];let R;e[11]!==_||e[12]!==S?(R=k.jsx("span",{className:_,children:S}),e[11]=_,e[12]=S,e[13]=R):R=e[13];let I;e[14]!==r?(I=Mg(r),e[14]=r,e[15]=I):I=e[15];let O;return e[16]!==w||e[17]!==R||e[18]!==I?(O=k.jsxs(nh,{className:w,children:["(",R," / ",I,")"]}),e[16]=w,e[17]=R,e[18]=I,e[19]=O):O=e[19],O};function Hz(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return N.useMemo(()=>r=>{e.forEach(i=>i(r))},e)}const Bv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function D1(n){const e=Object.prototype.toString.call(n);return e==="[object Window]"||e==="[object global]"}function qm(n){return"nodeType"in n}function cf(n){var e,t;return n?D1(n)?n:qm(n)&&(e=(t=n.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function jm(n){const{Document:e}=cf(n);return n instanceof e}function Xp(n){return D1(n)?!1:n instanceof cf(n).HTMLElement}function k4(n){return n instanceof cf(n).SVGElement}function N1(n){return n?D1(n)?n.document:qm(n)?jm(n)?n:Xp(n)||k4(n)?n.ownerDocument:document:document:document}const lh=Bv?N.useLayoutEffect:N.useEffect;function $m(n){const e=N.useRef(n);return lh(()=>{e.current=n}),N.useCallback(function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function Wz(){const n=N.useRef(null),e=N.useCallback((r,i)=>{n.current=setInterval(r,i)},[]),t=N.useCallback(()=>{n.current!==null&&(clearInterval(n.current),n.current=null)},[]);return[e,t]}function Bp(n,e){e===void 0&&(e=[n]);const t=N.useRef(n);return lh(()=>{t.current!==n&&(t.current=n)},e),t}function Kp(n,e){const t=N.useRef();return N.useMemo(()=>{const r=n(t.current);return t.current=r,r},[...e])}function vv(n){const e=$m(n),t=N.useRef(null),r=N.useCallback(i=>{i!==t.current&&(e==null||e(i,t.current)),t.current=i},[]);return[t,r]}function cm(n){const e=N.useRef();return N.useEffect(()=>{e.current=n},[n]),e.current}let Ob={};function Jp(n,e){return N.useMemo(()=>{if(e)return e;const t=Ob[n]==null?0:Ob[n]+1;return Ob[n]=t,n+"-"+t},[n,e])}function M4(n){return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((o,l)=>{const a=Object.entries(l);for(const[u,h]of a){const y=o[u];y!=null&&(o[u]=y+n*h)}return o},{...e})}}const y1=M4(1),bv=M4(-1);function Uz(n){return"clientX"in n&&"clientY"in n}function e2(n){if(!n)return!1;const{KeyboardEvent:e}=cf(n.target);return e&&n instanceof e}function Gz(n){if(!n)return!1;const{TouchEvent:e}=cf(n.target);return e&&n instanceof e}function um(n){if(Gz(n)){if(n.touches&&n.touches.length){const{clientX:e,clientY:t}=n.touches[0];return{x:e,y:t}}else if(n.changedTouches&&n.changedTouches.length){const{clientX:e,clientY:t}=n.changedTouches[0];return{x:e,y:t}}}return Uz(n)?{x:n.clientX,y:n.clientY}:null}const zp=Object.freeze({Translate:{toString(n){if(!n)return;const{x:e,y:t}=n;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:e,scaleY:t}=n;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(n){if(n)return[zp.Translate.toString(n),zp.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:e,duration:t,easing:r}=n;return e+" "+t+"ms "+r}}}),Lw="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Yz(n){return n.matches(Lw)?n:n.querySelector(Lw)}const Vz={display:"none"};function Zz(n){let{id:e,value:t}=n;return N.createElement("div",{id:e,style:Vz},t)}function Xz(n){let{id:e,announcement:t,ariaLiveType:r="assertive"}=n;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return N.createElement("div",{id:e,style:i,role:"status","aria-live":r,"aria-atomic":!0},t)}function Kz(){const[n,e]=N.useState("");return{announce:N.useCallback(r=>{r!=null&&e(r)},[]),announcement:n}}const L4=N.createContext(null);function Jz(n){const e=N.useContext(L4);N.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(n)},[n,e])}function Qz(){const[n]=N.useState(()=>new Set),e=N.useCallback(r=>(n.add(r),()=>n.delete(r)),[n]);return[N.useCallback(r=>{let{type:i,event:o}=r;n.forEach(l=>{var a;return(a=l[i])==null?void 0:a.call(l,o)})},[n]),e]}const qz={draggable:`
|
|
480
|
+
`,attributes:{[et.tableCellInner]:u}}),new D0(h)}handleBorderNoneStyles(t,r){if(!(r!=null&&r.style))return;["border",...["top","right","bottom","left"].flatMap(o=>[`border-${o}`,`border-${o}-style`])].filter(o=>t.style[o]==="none").forEach(o=>r.style=r.style.replaceAll(new RegExp(`${o}:none;?`,"g"),""))}convert({html:t,text:r},i={}){if(t){const a=new DOMParser().parseFromString(t,"text/html");this.preprocessTableHtml(a),this.mergeClassStylesToInline(a),t=a.body.innerHTML}const o=super.convert({html:t,text:r},i);if(i[et.tableCellInner])for(const l of o.ops){if(tg.isObject(l.insert)&&l.insert[et.tableCol]){l.insert="";continue}l.attributes||(l.attributes={}),l.attributes[et.tableCellInner]=i[et.tableCellInner]}return o}parseStyleWithFilter(t,r){if(!t)return{};const i={};let o="",l="",a=!0,u=0;for(let h=0;h<t.length;h++){const y=t[h];y===":"&&a?(o=t.substring(u,h).trim(),u=h+1,a=!1):y===";"&&(!a&&o&&(l=t.substring(u,h).trim(),(!r||r(o))&&(i[o]=l)),u=h+1,a=!0)}return!a&&o&&u<t.length&&(l=t.substring(u).trim(),(!r||r(o))&&(i[o]=l)),i}mergeClassStylesToInline(t){var r;try{const i=t.querySelectorAll("td[class], th[class]");if(i.length===0)return;const o=new Set;for(const y of i)(y.getAttribute("class")||"").split(/\s+/).filter(Boolean).forEach(w=>o.add(w));if(o.size===0)return;const l=t.querySelectorAll("style");if(l.length===0)return;const a=Array.from(l).map(y=>y.textContent||"").join("");if(!a)return;const u={},h=y=>this.STYLE_PROPERTIES.some(x=>y.startsWith(x));for(const y of o){const x=new RegExp(`\\.${y}[^{]*{([^}]*)}`,"g");let w;for(;(w=x.exec(a))!==null;){const _=w[1],S=this.parseStyleWithFilter(_),R={};let I=!1;for(const O in S)h(O)&&(R[O]=S[O],I=!0);I&&(u[y]=R)}}if(Object.keys(u).length===0)return;for(let y=0;y<i.length;y++){const x=i[y],w=((r=x.getAttribute("class"))==null?void 0:r.split(/\s+/).filter(Boolean))||[],_=x.getAttribute("style")||"",S=this.parseStyleWithFilter(_);let R=!1;for(const I of w){const O=u[I];if(O)for(const P in O)S[P]||(S[P]=O[P],R=!0)}if(R){let I="";for(const O in S)I+=O+":"+S[O]+";";I&&x.setAttribute("style",I)}x.removeAttribute("class")}}catch(i){console.error("스타일 처리 오류",i)}}matchCaption(t,r){for(let i=0;i<r.ops.length;i++){const o=r.ops[i],{attributes:l}=o;l&&l[et.tableCaption]&&(l[et.tableCaption].tableId=this.tableId,o.attributes=l)}return r}preprocessTableHtml(t){try{const r=t.querySelectorAll("table");for(const i of Array.from(r))i.querySelectorAll("tr").length!==0&&(this.cleanupTableStyles(i),this.applyRowspanHeights(i),this.fixRowspanCells(i));this.mergeClassStylesToInline(t)}catch(r){console.error("테이블 전처리 오류",r)}}cleanupTableStyles(t){const r=t.querySelectorAll("td, th, tr, colgroup");for(const i of r){const o=i;o.removeAttribute("height");const l=o.getAttribute("style");if(l){const a=l.replace(/height\s*:[^;]*;?/gi,"").trim();o.setAttribute("style",a||"")}}}applyRowspanHeights(t){const i=t.querySelectorAll("td, th");t.style.borderCollapse="collapse";for(const o of i){const l=o,u=parseInt(l.getAttribute("rowspan")||"1")*24,h=l.getAttribute("style")||"",y=h+(h?"; ":"")+`height: ${u}px`;l.setAttribute("style",y)}}fixRowspanCells(t){const r=t.querySelectorAll("tr");if(r.length<=1)return;const i=[],o=new Map;for(let l=0;l<r.length;l++){const u=r[l].querySelectorAll("td, th");if(u.length===0&&l<r.length-1){i.push(l);continue}for(const h of Array.from(u)){const y=parseInt(h.getAttribute("rowspan")||"1");if(y>1)for(let x=1;x<y;x++){const w=l+x;if(w>=r.length)break;o.has(w)||o.set(w,[]),o.get(w).push(h)}}}i.length>0&&this.processEmptyRows(i,r,o)}processEmptyRows(t,r,i){for(const o of t){const l=i.get(o);if(l)for(const a of l){const u=parseInt(a.getAttribute("rowspan")||"1");u>1&&a.setAttribute("rowspan",(u-1).toString())}}for(const o of t.reverse())r[o].remove()}}class zz extends T4{fixUnusuaDeletelTable(){}mergeCells(e){if(!this.table||!this.tableSelection)return;const t=this.tableSelection.selectedTds||[];if(t.length>1&&(e=t),!e||e.length<=1)return;const r=Kl(e[0],et.tableMain),i=r.getRows(),o=e.map(w=>{if(!w||!w.parent||!w.parent.domNode)return null;const _=w.parent.domNode;if(!_)return null;const S=i.findIndex(O=>O.rowId===w.rowId);if(S===-1)return null;const R=w.getColumnIndex();if(R===-1)return null;const I=_.getBoundingClientRect();return!I||I.width===0||I.height===0?null:{td:w,rowIndex:S,colIndex:R,rowspan:w.rowspan,colspan:w.colspan,visualLeft:I.left,visualRight:I.right,visualTop:I.top,visualBottom:I.bottom}}).filter(Boolean);if(o.length<=1)return;o.sort((w,_)=>w.visualTop-_.visualTop||w.visualLeft-_.visualLeft);const l=o[0],a=l.td,u=Math.max(...o.map(w=>w.rowIndex+w.rowspan-1)),h=Math.max(...o.map(w=>w.colIndex+w.colspan-1)),y=u-l.rowIndex+1,x=h-l.colIndex+1;for(const w of o)w.td!==a&&(w.td.moveChildren(a),w.td.parent.remove());a.rowspan=y,a.colspan=x,this.fixTableByRemove(r)}}qe.register({"modules/imageCompress":Np,"modules/resize":I4,"modules/tableUp":zz,"modules/magicUrl":pF,"formats/divider":sm,"modules/clipboard":Bz,"modules/copy":bz,"modules/toggleFullscreen":o4},!0);const c1={KB:1024,QUALITY:.7,IMAGE_SIZES:new Map},Hz={getCharLength:n=>Array.from(n).length,calculateTextSize:n=>{if(!n.ops||n.ops.length===0)return 0;let e=0;for(const t of n.ops)if(typeof t.insert=="string")e+=new TextEncoder().encode(t.insert).length-1;else if(typeof t.insert=="object"&&t.insert.image){const r=t.insert.image;r&&(e+=c1.IMAGE_SIZES.get(r)||Math.ceil(r.length*c1.QUALITY))}return e}},Wz=n=>{const{type:e="Primary",editorRef:t,useValue:r,useError:i,placeholder:o,tabIndex:l,autoFocus:a,editorProps:u,style:h,minHeight:y,maxHeight:x,contentHeight:w,contentMaxHeight:_=1e3,toolbarSize:S="Med",toolbarType:R="Default",readOnly:I,limitPosition:O="Bottom",maxLength:P,size:Y=100,editorClassName:z,editorStyle:W,noImageResize:B,...ee}=n,[{wrapId:H,wrapProps:V,labelProps:de,...Z},te]=Bg(ee),ne=N.useMemo(()=>e==="ReadOnly"||I,[e,I]),fe=N.useMemo(()=>w?20:0,[w]),[ae,j]=N.useState(S==="Med"?40:50),re=N.useMemo(()=>ne||e==="Raw"?0:ae,[e,ne,ae]),[he,be]=N.useState(w),[le,J]=N.useState(!1),pe=N.useRef(null),Te=N.useRef(0),Fe=N.useRef(0),_e=N.useMemo(()=>R==="Title",[R]),Me=N.useMemo(()=>{let ye;return y&&x||e==="Raw"?ye=void 0:ye=0,he?he+re:ye},[y,x,e,he,re]),De=N.useMemo(()=>{const ye=[y,w].filter(se=>se!=null);return ye.length?Math.min(...ye):void 0},[y,w]),Re=N.useMemo(()=>x??"100%",[x]),Le=N.useMemo(()=>(Array.isArray(Z.errorMessage)?Z.errorMessage.some(Boolean):!!Z.errorMessage)?"Error":e,[Z.errorMessage,e]),Oe=N.useCallback(ye=>{let se=ye;se=C7.sanitize(ye);const He=document.createElement("div");return He.innerHTML=se,new qe(He,{readOnly:!0}).getContents()},[]),[Ge,Ve]=Ho(r,""),[Pe,ot]=N.useState(()=>Oe(Ge));N.useEffect(()=>{Ve===void 0&&ot(Oe(Ge))},[Oe,Ve,Ge]);const Xe=N.useRef(null),lt=N.useRef([]),[Ye,mt]=N.useState("NoTransition");N.useEffect(()=>{const ye=setTimeout(()=>mt(""),0);return()=>{clearTimeout(ye),lt.current.forEach(se=>se()),lt.current=[]}},[]);const bt=N.useCallback((ye,se)=>{if(!w)return se;const We=Math.max(y||w,0);return Math.min(x||_,Math.max(We,se+ye))},[w,y,x,_]),Mt=N.useCallback(ye=>{if(!le||!w)return;const se=ye.clientY-Fe.current,He=bt(se,Te.current);he!==He&&be(He),ye.preventDefault(),ye.stopPropagation()},[le,w,bt,he]),Nt=N.useCallback(ye=>{J(!1),document.removeEventListener("mousemove",Mt),document.removeEventListener("mouseup",Nt),ye.preventDefault(),ye.stopPropagation()},[Mt]),_t=N.useCallback(ye=>{if(!w)return;if(ye.detail===2){be(w);return}he?Te.current=he:(be(w),Te.current=w),J(!0),Fe.current=ye.clientY;const se=We=>{if(!w)return;const pt=We.clientY-Fe.current,wt=bt(pt,Te.current);be(wt),We.preventDefault(),We.stopPropagation()},He=We=>{J(!1),document.removeEventListener("mousemove",se),document.removeEventListener("mouseup",He),We.preventDefault(),We.stopPropagation()};document.addEventListener("mousemove",se),document.addEventListener("mouseup",He),ye.preventDefault(),ye.stopPropagation()},[bt,he,w]),rn=N.useCallback((ye,se,He,We)=>{if(He!=="user"&&He!=="api")return;const pt=We.getContents(),wt=We.getLength()-1,qt=P!==void 0&&wt>P,Jt=En=>En.replace(/\s{2,}/g,Cn=>" ".repeat(Cn.length)),Vt=ye.replace(/^<p><br><\/p>$/,"").trim(),hn=Jt(Vt);if(!qt){ot(pt),Ve==null||Ve(hn);return}const ln=pn(pt,P);ot(ln);const kn=new qe(document.createElement("div"));kn.setContents(ln);const Nn=Jt(kn.root.innerHTML.replace(/^<p><br><\/p>$/,"").trim());Ve==null||Ve(Nn)},[P,Ve]),pn=(ye,se)=>{var pt,wt,qt;if(!ye.ops)return ye;const He=new Kn;let We=0;for(const Jt of ye.ops){if(We>=se)break;if(Jt.insert&&typeof Jt.insert=="string"){const Vt=Jt.insert,hn=se-We;if(Vt.length<=hn)(pt=He.ops)==null||pt.push(Jt),We+=Vt.length;else{const ln={...Jt,insert:Vt.substring(0,hn)};(wt=He.ops)==null||wt.push(ln),We+=hn;break}}else We<se&&((qt=He.ops)==null||qt.push(Jt),We+=1)}return He},Kt=N.useCallback(ye=>{var pt,wt;const se=ye.getEditor().container;if(!se)return null;const He=(pt=se.closest(".AEditorContainer"))==null?void 0:pt.querySelector(".ql-toolbar");return He||((wt=se.parentElement)==null?void 0:wt.querySelector(".ql-toolbar"))||null},[]),dn=N.useCallback((ye,se,He,We)=>{if(!ye)return;const pt=He;ye.addEventListener(se,pt,We),lt.current.push(()=>ye.removeEventListener(se,pt,We))},[]),zt=N.useCallback((ye,se,He)=>{const We=se.getFormat();ye.forEach(pt=>{if(We[pt]){const wt=We[pt],qt=`.ql-${pt}`,Jt=He.querySelector(`${qt} .ql-picker-label`),Vt=He.querySelectorAll(`${qt} .ql-picker-item`),hn=Array.from(Vt).find(ln=>ln.getAttribute("data-value")===wt);hn&&(hn.classList.add("ql-selected"),Jt==null||Jt.classList.add("ql-active"))}})},[]),wn=N.useCallback(ye=>{if(!ye.length)return;const We=ye[0].target.getBoundingClientRect(),pt=Math.ceil(We.height);j(wt=>Math.abs(wt-pt)<.1?wt:pt)},[]),$t=N.useCallback((ye,se)=>{if(ye.key!=="Backspace")return;const He=se.getSelection(!1);if(!He||He.length>0)return;const We=He.index;if(We<=0)return;const[pt]=se.getLine(We);if(pt&&We===se.getIndex(pt)||se.getFormat(We,1).link)return;const wt=se.getFormat(We-1,1);if(wt.link){ye.preventDefault();let qt=We-1;for(;qt>0&&se.getFormat(qt-1,1).link===wt.link;)qt--;const[Jt]=se.scroll.descendant(Vt=>{var hn;return((hn=Vt==null?void 0:Vt.statics)==null?void 0:hn.blotName)==="link"},qt);if(Jt!=null&&Jt.domNode){const Vt=(Jt.domNode.textContent||"").length;se.removeFormat(qt,Vt)}}},[]),vn=N.useCallback(()=>({clipboard:{matchers:[["img",()=>!1],["table",()=>!1],["iframe",()=>!1],["video",()=>!1],["h1, h2, h3, h4, h5, h6",()=>!1],["blockquote",()=>!1],["hr",()=>!1]]},copy:{isTitleMode:!0},keyboard:{bindings:{enter:{key:"Enter",handler:()=>!1},newline:{key:"Enter",shiftKey:!0,handler:()=>!1},tab:{key:"Tab",handler:()=>!1},"remove-newline":{key:"Backspace",collapsed:!0,format:["blockquote","list","code-block"],offset:0,handler:function(ye){const{blockquote:se,list:He,["code-block"]:We}=ye.getFormat();return se||He||We?(ye.format("blockquote",!1),ye.format("list",!1),ye.format("code-block",!1),!1):!0}}}},magicUrl:!0,toolbar:{container:[["bold","italic","underline","strike",{color:[]},{background:[]},"clean"]]}}),[]),Pt=N.useCallback(()=>({clipboard:{},copy:{},keyboard:{},magicUrl:!0,toggleFullscreen:{type:Le,maximize:s1.renderToString(k.jsx(ho,{icon:"Maximize",size:S==="Med"?"sm":"md"})),minimize:s1.renderToString(k.jsx(ho,{icon:"Minimize",size:S==="Med"?"sm":"md"}))},imageCompress:{quality:c1.QUALITY,imageType:"image/jpeg",maxWidth:1500,maxHeight:1500,debug:!1,handleOnPaste:ye=>{var se,He;try{const We=(se=ye.clipboardData)==null?void 0:se.items;if(!We)return!0;const pt=Array.from(We).some(Jt=>{const Vt=Jt.type.toLowerCase();return Vt.includes("Excel")||Vt.includes("text/html")}),wt=(He=ye.clipboardData)==null?void 0:He.getData("text/html"),qt=wt&&(wt.includes("<table")||wt.includes("<tbody")||wt.includes("<td"));return!(pt||qt)}catch(We){return console.warn("Error in handleOnPaste:",We),!0}},insertIntoEditor:(ye,se,He)=>{c1.IMAGE_SIZES.has(ye)||c1.IMAGE_SIZES.set(ye,se.size);const We=He.getSelection();We&&He.insertEmbed(We.index,"image",ye,qe.sources.USER)}},...!ne&&{...!B&&{resize:{}},table:!1,tableUp:{fullSwitch:!1,icon:s1.renderToString(k.jsx(ho,{icon:"Table",size:S==="Med"?"sm":"md",strokeWidth:2.5})),resize:$B,resizeScale:ez,customSelect:sz,selection:nz,fixUnusuaDeletelTable:!1,selectionOptions:{tableMenu:qB,tableMenuOptions:{localstorageKey:"used-color",tipText:!0,tools:[lo.InsertCaption,lo.InsertTop,lo.InsertRight,lo.InsertBottom,lo.InsertLeft,lo.Break,lo.MergeCell,lo.SplitCell,lo.Break,lo.DeleteRow,lo.DeleteColumn,lo.DeleteTable,lo.Break,lo.BackgroundColor,lo.BorderColor,lo.Break,lo.CopyCell,lo.CutCell,lo.Break,lo.SwitchWidth]}},texts:{fullCheckboxText:Nr.AEditor["Insert Full Width Table"],customBtnText:Nr.AEditor.Custom,confirmText:Nr.AEditor.Confirm,cancelText:Nr.AEditor.Cancel,rowText:Nr.AEditor.Row,colText:Nr.AEditor.Column,CopyCell:Nr.AEditor["Copy Cell"],CutCell:Nr.AEditor["Cut Cell"],notPositiveNumberError:Nr.AEditor["Not Positive Number Error"],custom:Nr.AEditor.Custom,clear:Nr.AEditor.Clear,transparent:Nr.AEditor.Transparent,perWidthInsufficient:Nr.AEditor.perWidthInsufficient,InsertTop:Nr.AEditor["Insert Row Top"],InsertRight:Nr.AEditor["Insert Column Right"],InsertBottom:Nr.AEditor["Insert Row Bottom"],InsertLeft:Nr.AEditor["Insert Column Left"],MergeCell:Nr.AEditor["Merge Cell"],SplitCell:Nr.AEditor["Split Cell"],DeleteRow:Nr.AEditor["Delete Row"],DeleteColumn:Nr.AEditor["Delete Column"],DeleteTable:Nr.AEditor["Delete Table"],BackgroundColor:Nr.AEditor["Set Background Color"],BorderColor:Nr.AEditor["Set Border Color"],SwitchWidth:Nr.AEditor["Switch Table Width"],InsertCaption:Nr.AEditor["Insert Table Caption"]}},toolbar:{container:[[{header:[1,2,3,!1,4]}],["bold","italic","underline","strike","blockquote","divider",{[T4.toolName]:[]},{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],handlers:{divider:function(){const ye=this.quill,se=ye.getSelection(!0);if(!se)return;const He=Math.min(se.index+1,ye.getLength()-1);ye.insertEmbed(He,"divider",!0,qe.sources.USER),setTimeout(()=>ye.setSelection(Math.min(He+1,ye.getLength()-1),0,qe.sources.SILENT),0)}}}}}),[ne,B,S,Le]),Yt=N.useMemo(()=>_e?vn():Pt(),[_e,vn,Pt]),ct=N.useCallback(ye=>{if(!ye)return;const se=ye.getEditor();if(!se)return;const He=se.root,We=Kt(ye);He&&z&&He.classList.add(...z.split(" ")),He&&W&&Object.entries(W).forEach(([wt,qt])=>{const Jt=wt.replace(/([A-Z])/g,Vt=>`-${Vt[0].toLowerCase()}`);He.style[Jt]=qt}),dn(He,"keydown",wt=>$t(wt,se));const pt=new ResizeObserver(wn);if(We){pt.observe(We),lt.current.push(()=>pt.disconnect());const wt=["header","color","background"];wt.forEach(qt=>{const Jt=We.querySelector(`.ql-${qt} .ql-picker-label`);Jt&&dn(Jt,"click",()=>zt(wt,se,We))})}},[Kt,z,W,dn,wn,$t,zt]),Tt=N.useCallback(ye=>{if(lt.current.forEach(He=>He()),lt.current=[],Xe.current=ye,!ye){tg.isFunction(t)?t(null):t!=null&&t.current&&(t.current=null);return}const se=ye;se.copyContent=He=>{ye.getEditor().getModule("copy").copyContent(He)},tg.isFunction(t)?t(se):t&&(t.current=se),ct(ye)},[t,ct]),It=N.useCallback(()=>k.jsx(Gz,{htmlDelta:Pe,isReadonly:ne,limit:Y*c1.KB,noTransition:Ye,useError:i}),[Pe,ne,Ye,Y,i]);return k.jsx(lg,{wrapId:H,...Z,helperText:k.jsx(N.Activity,{mode:O==="Bottom"?"visible":"hidden",children:It()}),wrapProps:{...V,style:{...V==null?void 0:V.style,height:w?"fit-content":"100%"}},label:k.jsxs(bl,{style:{gap:4},children:[Z.label,k.jsx(N.Activity,{mode:O==="Top"?"visible":"hidden",children:It()})]}),labelProps:{...de,style:{minHeight:Z.label?20:void 0,marginBottom:Z.label?4:0,...de==null?void 0:de.style}},children:k.jsxs(Gi,{...te,className:gt.clsx(te.className,vd.AEditorContainer,Ye),style:{...h,height:Me,minHeight:De,maxHeight:Re},children:[k.jsx(Ov,{...u,ref:Tt,preserveWhitespace:!0,className:gt.clsx(u==null?void 0:u.className,vd.AEditor,vd[Le],_e&&"Title",Ye),modules:Yt,placeholder:o,readOnly:ne,theme:"snow",value:Pe,style:{...u==null?void 0:u.style,"--editor-padding":_e?"8px 12px":"12px","--title-color-picker-row":_e?1:4,"--icon-size":`${S==="Med"?20:24}px`,"--toolbar-padding":`${S==="Med"?7.5:12.5}px`,"--title-header-font-size":`${S==="Med"?12:14}px`,"--edit-text":`'${Nr.AEditor.Edit}'`,"--save-text":`'${Nr.AEditor.Save}'`,"--remove-text":`'${Nr.AEditor.Remove}'`,"--default-text":`'${Nr.AEditor.Default}'`,"--visit-url-text":`'${Nr.AEditor["Visit URL:"]}'`,"--enter-link-text":`'${Nr.AEditor["Enter link:"]}'`,"--enter-video-text":`'${Nr.AEditor["Enter video:"]}'`,"--arrow-background":`url("data:image/svg+xml,${encodeURIComponent(s1.renderToString(k.jsx(ho,{icon:"EditorArrow"})))}`},onChange:rn}),k.jsx(Uz,{contentHeight:w,currentHeight:he,handleResizeStart:_t,isResizing:le,noTransition:Ye,resizeRef:pe,resizerHeight:fe})]})})},Uz=n=>{const e=Dn.c(16),{contentHeight:t,resizeRef:r,noTransition:i,resizerHeight:o,handleResizeStart:l,currentHeight:a,isResizing:u}=n,h=t?"visible":"hidden";let y;e[0]!==u||e[1]!==i?(y=gt.clsx(vd.Resizer,u&&vd.Resizing,i,"Caption1"),e[0]=u,e[1]=i,e[2]=y):y=e[2];let x;e[3]!==a?(x=Math.round(a??0),e[3]=a,e[4]=x):x=e[4];const w=`${x}px`;let _;e[5]!==o?(_={height:o},e[5]=o,e[6]=_):_=e[6];let S;e[7]!==l||e[8]!==r||e[9]!==y||e[10]!==w||e[11]!==_?(S=k.jsx("div",{ref:r,className:y,"data-height":w,style:_,onMouseDown:l}),e[7]=l,e[8]=r,e[9]=y,e[10]=w,e[11]=_,e[12]=S):S=e[12];let R;return e[13]!==h||e[14]!==S?(R=k.jsx(N.Activity,{mode:h,children:S}),e[13]=h,e[14]=S,e[15]=R):R=e[15],R},Gz=n=>{const e=Dn.c(20),{htmlDelta:t,limit:r,useError:i,isReadonly:o,noTransition:l}=n,[a,u]=Ho(i,!1),h=Hz.calculateTextSize(t);let y,x;if(e[0]!==h||e[1]!==r||e[2]!==u?(y=()=>u==null?void 0:u(h>r),x=[h,r,u],e[0]=h,e[1]=r,e[2]=u,e[3]=y,e[4]=x):(y=e[3],x=e[4]),N.useEffect(y,x),!i||o)return null;let w;e[5]!==l?(w=gt.clsx(vd.Limit,"NoSelect",l),e[5]=l,e[6]=w):w=e[6];let _;e[7]!==a?(_=gt.clsx(a&&vd.Error),e[7]=a,e[8]=_):_=e[8];let S;e[9]!==h?(S=Mg(h),e[9]=h,e[10]=S):S=e[10];let R;e[11]!==_||e[12]!==S?(R=k.jsx("span",{className:_,children:S}),e[11]=_,e[12]=S,e[13]=R):R=e[13];let I;e[14]!==r?(I=Mg(r),e[14]=r,e[15]=I):I=e[15];let O;return e[16]!==w||e[17]!==R||e[18]!==I?(O=k.jsxs(nh,{className:w,children:["(",R," / ",I,")"]}),e[16]=w,e[17]=R,e[18]=I,e[19]=O):O=e[19],O};function Yz(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return N.useMemo(()=>r=>{e.forEach(i=>i(r))},e)}const Bv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function D1(n){const e=Object.prototype.toString.call(n);return e==="[object Window]"||e==="[object global]"}function qm(n){return"nodeType"in n}function cf(n){var e,t;return n?D1(n)?n:qm(n)&&(e=(t=n.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function jm(n){const{Document:e}=cf(n);return n instanceof e}function Xp(n){return D1(n)?!1:n instanceof cf(n).HTMLElement}function k4(n){return n instanceof cf(n).SVGElement}function N1(n){return n?D1(n)?n.document:qm(n)?jm(n)?n:Xp(n)||k4(n)?n.ownerDocument:document:document:document}const lh=Bv?N.useLayoutEffect:N.useEffect;function $m(n){const e=N.useRef(n);return lh(()=>{e.current=n}),N.useCallback(function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function Vz(){const n=N.useRef(null),e=N.useCallback((r,i)=>{n.current=setInterval(r,i)},[]),t=N.useCallback(()=>{n.current!==null&&(clearInterval(n.current),n.current=null)},[]);return[e,t]}function Bp(n,e){e===void 0&&(e=[n]);const t=N.useRef(n);return lh(()=>{t.current!==n&&(t.current=n)},e),t}function Kp(n,e){const t=N.useRef();return N.useMemo(()=>{const r=n(t.current);return t.current=r,r},[...e])}function vv(n){const e=$m(n),t=N.useRef(null),r=N.useCallback(i=>{i!==t.current&&(e==null||e(i,t.current)),t.current=i},[]);return[t,r]}function cm(n){const e=N.useRef();return N.useEffect(()=>{e.current=n},[n]),e.current}let Ob={};function Jp(n,e){return N.useMemo(()=>{if(e)return e;const t=Ob[n]==null?0:Ob[n]+1;return Ob[n]=t,n+"-"+t},[n,e])}function M4(n){return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((o,l)=>{const a=Object.entries(l);for(const[u,h]of a){const y=o[u];y!=null&&(o[u]=y+n*h)}return o},{...e})}}const y1=M4(1),bv=M4(-1);function Zz(n){return"clientX"in n&&"clientY"in n}function e2(n){if(!n)return!1;const{KeyboardEvent:e}=cf(n.target);return e&&n instanceof e}function Xz(n){if(!n)return!1;const{TouchEvent:e}=cf(n.target);return e&&n instanceof e}function um(n){if(Xz(n)){if(n.touches&&n.touches.length){const{clientX:e,clientY:t}=n.touches[0];return{x:e,y:t}}else if(n.changedTouches&&n.changedTouches.length){const{clientX:e,clientY:t}=n.changedTouches[0];return{x:e,y:t}}}return Zz(n)?{x:n.clientX,y:n.clientY}:null}const zp=Object.freeze({Translate:{toString(n){if(!n)return;const{x:e,y:t}=n;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:e,scaleY:t}=n;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(n){if(n)return[zp.Translate.toString(n),zp.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:e,duration:t,easing:r}=n;return e+" "+t+"ms "+r}}}),Lw="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Kz(n){return n.matches(Lw)?n:n.querySelector(Lw)}const Jz={display:"none"};function Qz(n){let{id:e,value:t}=n;return N.createElement("div",{id:e,style:Jz},t)}function qz(n){let{id:e,announcement:t,ariaLiveType:r="assertive"}=n;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return N.createElement("div",{id:e,style:i,role:"status","aria-live":r,"aria-atomic":!0},t)}function jz(){const[n,e]=N.useState("");return{announce:N.useCallback(r=>{r!=null&&e(r)},[]),announcement:n}}const L4=N.createContext(null);function $z(n){const e=N.useContext(L4);N.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(n)},[n,e])}function eH(){const[n]=N.useState(()=>new Set),e=N.useCallback(r=>(n.add(r),()=>n.delete(r)),[n]);return[N.useCallback(r=>{let{type:i,event:o}=r;n.forEach(l=>{var a;return(a=l[i])==null?void 0:a.call(l,o)})},[n]),e]}const tH={draggable:`
|
|
481
481
|
To pick up a draggable item, press the space bar.
|
|
482
482
|
While dragging, use the arrow keys to move the item.
|
|
483
483
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
484
|
-
`},jz={onDragStart(n){let{active:e}=n;return"Picked up draggable item "+e.id+"."},onDragOver(n){let{active:e,over:t}=n;return t?"Draggable item "+e.id+" was moved over droppable area "+t.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(n){let{active:e,over:t}=n;return t?"Draggable item "+e.id+" was dropped over droppable area "+t.id:"Draggable item "+e.id+" was dropped."},onDragCancel(n){let{active:e}=n;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function $z(n){let{announcements:e=jz,container:t,hiddenTextDescribedById:r,screenReaderInstructions:i=qz}=n;const{announce:o,announcement:l}=Kz(),a=Jp("DndLiveRegion"),[u,h]=N.useState(!1);if(N.useEffect(()=>{h(!0)},[]),Jz(N.useMemo(()=>({onDragStart(x){let{active:w}=x;o(e.onDragStart({active:w}))},onDragMove(x){let{active:w,over:_}=x;e.onDragMove&&o(e.onDragMove({active:w,over:_}))},onDragOver(x){let{active:w,over:_}=x;o(e.onDragOver({active:w,over:_}))},onDragEnd(x){let{active:w,over:_}=x;o(e.onDragEnd({active:w,over:_}))},onDragCancel(x){let{active:w,over:_}=x;o(e.onDragCancel({active:w,over:_}))}}),[o,e])),!u)return null;const y=N.createElement(N.Fragment,null,N.createElement(Zz,{id:r,value:i.draggable}),N.createElement(Xz,{id:a,announcement:l}));return t?su.createPortal(y,t):y}var za;(function(n){n.DragStart="dragStart",n.DragMove="dragMove",n.DragEnd="dragEnd",n.DragCancel="dragCancel",n.DragOver="dragOver",n.RegisterDroppable="registerDroppable",n.SetDroppableDisabled="setDroppableDisabled",n.UnregisterDroppable="unregisterDroppable"})(za||(za={}));function yv(){}function Ow(n,e){return N.useMemo(()=>({sensor:n,options:e??{}}),[n,e])}function eH(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return N.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const Bd=Object.freeze({x:0,y:0});function tH(n,e){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function nH(n,e){let{data:{value:t}}=n,{data:{value:r}}=e;return t-r}function rH(n,e){let{data:{value:t}}=n,{data:{value:r}}=e;return r-t}function iH(n,e){if(!n||n.length===0)return null;const[t]=n;return t[e]}function Pw(n,e,t){return e===void 0&&(e=n.left),t===void 0&&(t=n.top),{x:e+n.width*.5,y:t+n.height*.5}}const oH=n=>{let{collisionRect:e,droppableRects:t,droppableContainers:r}=n;const i=Pw(e,e.left,e.top),o=[];for(const l of r){const{id:a}=l,u=t.get(a);if(u){const h=tH(Pw(u),i);o.push({id:a,data:{droppableContainer:l,value:h}})}}return o.sort(nH)};function lH(n,e){const t=Math.max(e.top,n.top),r=Math.max(e.left,n.left),i=Math.min(e.left+e.width,n.left+n.width),o=Math.min(e.top+e.height,n.top+n.height),l=i-r,a=o-t;if(r<i&&t<o){const u=e.width*e.height,h=n.width*n.height,y=l*a,x=y/(u+h-y);return Number(x.toFixed(4))}return 0}const sH=n=>{let{collisionRect:e,droppableRects:t,droppableContainers:r}=n;const i=[];for(const o of r){const{id:l}=o,a=t.get(l);if(a){const u=lH(a,e);u>0&&i.push({id:l,data:{droppableContainer:o,value:u}})}}return i.sort(rH)};function aH(n,e,t){return{...n,scaleX:e&&t?e.width/t.width:1,scaleY:e&&t?e.height/t.height:1}}function O4(n,e){return n&&e?{x:n.left-e.left,y:n.top-e.top}:Bd}function cH(n){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((l,a)=>({...l,top:l.top+n*a.y,bottom:l.bottom+n*a.y,left:l.left+n*a.x,right:l.right+n*a.x}),{...t})}}const uH=cH(1);function fH(n){if(n.startsWith("matrix3d(")){const e=n.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(n.startsWith("matrix(")){const e=n.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function dH(n,e,t){const r=fH(e);if(!r)return n;const{scaleX:i,scaleY:o,x:l,y:a}=r,u=n.left-l-(1-i)*parseFloat(t),h=n.top-a-(1-o)*parseFloat(t.slice(t.indexOf(" ")+1)),y=i?n.width/i:n.width,x=o?n.height/o:n.height;return{width:y,height:x,top:h,right:u+y,bottom:h+x,left:u}}const hH={ignoreTransform:!1};function F1(n,e){e===void 0&&(e=hH);let t=n.getBoundingClientRect();if(e.ignoreTransform){const{transform:h,transformOrigin:y}=cf(n).getComputedStyle(n);h&&(t=dH(t,h,y))}const{top:r,left:i,width:o,height:l,bottom:a,right:u}=t;return{top:r,left:i,width:o,height:l,bottom:a,right:u}}function Dw(n){return F1(n,{ignoreTransform:!0})}function gH(n){const e=n.innerWidth,t=n.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function pH(n,e){return e===void 0&&(e=cf(n).getComputedStyle(n)),e.position==="fixed"}function vH(n,e){e===void 0&&(e=cf(n).getComputedStyle(n));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=e[i];return typeof o=="string"?t.test(o):!1})}function t2(n,e){const t=[];function r(i){if(e!=null&&t.length>=e||!i)return t;if(jm(i)&&i.scrollingElement!=null&&!t.includes(i.scrollingElement))return t.push(i.scrollingElement),t;if(!Xp(i)||k4(i)||t.includes(i))return t;const o=cf(n).getComputedStyle(i);return i!==n&&vH(i,o)&&t.push(i),pH(i,o)?t:r(i.parentNode)}return n?r(n):t}function P4(n){const[e]=t2(n,1);return e??null}function Pb(n){return!Bv||!n?null:D1(n)?n:qm(n)?jm(n)||n===N1(n).scrollingElement?window:Xp(n)?n:null:null}function D4(n){return D1(n)?n.scrollX:n.scrollLeft}function N4(n){return D1(n)?n.scrollY:n.scrollTop}function fm(n){return{x:D4(n),y:N4(n)}}var lc;(function(n){n[n.Forward=1]="Forward",n[n.Backward=-1]="Backward"})(lc||(lc={}));function F4(n){return!Bv||!n?!1:n===document.scrollingElement}function B4(n){const e={x:0,y:0},t=F4(n)?{height:window.innerHeight,width:window.innerWidth}:{height:n.clientHeight,width:n.clientWidth},r={x:n.scrollWidth-t.width,y:n.scrollHeight-t.height},i=n.scrollTop<=e.y,o=n.scrollLeft<=e.x,l=n.scrollTop>=r.y,a=n.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:l,isRight:a,maxScroll:r,minScroll:e}}const bH={x:.2,y:.2};function yH(n,e,t,r,i){let{top:o,left:l,right:a,bottom:u}=t;r===void 0&&(r=10),i===void 0&&(i=bH);const{isTop:h,isBottom:y,isLeft:x,isRight:w}=B4(n),_={x:0,y:0},S={x:0,y:0},R={height:e.height*i.y,width:e.width*i.x};return!h&&o<=e.top+R.height?(_.y=lc.Backward,S.y=r*Math.abs((e.top+R.height-o)/R.height)):!y&&u>=e.bottom-R.height&&(_.y=lc.Forward,S.y=r*Math.abs((e.bottom-R.height-u)/R.height)),!w&&a>=e.right-R.width?(_.x=lc.Forward,S.x=r*Math.abs((e.right-R.width-a)/R.width)):!x&&l<=e.left+R.width&&(_.x=lc.Backward,S.x=r*Math.abs((e.left+R.width-l)/R.width)),{direction:_,speed:S}}function mH(n){if(n===document.scrollingElement){const{innerWidth:o,innerHeight:l}=window;return{top:0,left:0,right:o,bottom:l,width:o,height:l}}const{top:e,left:t,right:r,bottom:i}=n.getBoundingClientRect();return{top:e,left:t,right:r,bottom:i,width:n.clientWidth,height:n.clientHeight}}function z4(n){return n.reduce((e,t)=>y1(e,fm(t)),Bd)}function xH(n){return n.reduce((e,t)=>e+D4(t),0)}function wH(n){return n.reduce((e,t)=>e+N4(t),0)}function CH(n,e){if(e===void 0&&(e=F1),!n)return;const{top:t,left:r,bottom:i,right:o}=e(n);P4(n)&&(i<=0||o<=0||t>=window.innerHeight||r>=window.innerWidth)&&n.scrollIntoView({block:"center",inline:"center"})}const _H=[["x",["left","right"],xH],["y",["top","bottom"],wH]];class n2{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=t2(t),i=z4(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,l,a]of _H)for(const u of l)Object.defineProperty(this,u,{get:()=>{const h=a(r),y=i[o]-h;return this.rect[u]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class mp{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...t)})},this.target=e}add(e,t,r){var i;(i=this.target)==null||i.addEventListener(e,t,r),this.listeners.push([e,t,r])}}function SH(n){const{EventTarget:e}=cf(n);return n instanceof e?n:N1(n)}function Db(n,e){const t=Math.abs(n.x),r=Math.abs(n.y);return typeof e=="number"?Math.sqrt(t**2+r**2)>e:"x"in e&&"y"in e?t>e.x&&r>e.y:"x"in e?t>e.x:"y"in e?r>e.y:!1}var fd;(function(n){n.Click="click",n.DragStart="dragstart",n.Keydown="keydown",n.ContextMenu="contextmenu",n.Resize="resize",n.SelectionChange="selectionchange",n.VisibilityChange="visibilitychange"})(fd||(fd={}));function Nw(n){n.preventDefault()}function EH(n){n.stopPropagation()}var Ao;(function(n){n.Space="Space",n.Down="ArrowDown",n.Right="ArrowRight",n.Left="ArrowLeft",n.Up="ArrowUp",n.Esc="Escape",n.Enter="Enter",n.Tab="Tab"})(Ao||(Ao={}));const H4={start:[Ao.Space,Ao.Enter],cancel:[Ao.Esc],end:[Ao.Space,Ao.Enter,Ao.Tab]},AH=(n,e)=>{let{currentCoordinates:t}=e;switch(n.code){case Ao.Right:return{...t,x:t.x+25};case Ao.Left:return{...t,x:t.x-25};case Ao.Down:return{...t,y:t.y+25};case Ao.Up:return{...t,y:t.y-25}}};class r2{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new mp(N1(t)),this.windowListeners=new mp(cf(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fd.Resize,this.handleCancel),this.windowListeners.add(fd.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fd.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,r=e.node.current;r&&CH(r),t(Bd)}handleKeyDown(e){if(e2(e)){const{active:t,context:r,options:i}=this.props,{keyboardCodes:o=H4,coordinateGetter:l=AH,scrollBehavior:a="smooth"}=i,{code:u}=e;if(o.end.includes(u)){this.handleEnd(e);return}if(o.cancel.includes(u)){this.handleCancel(e);return}const{collisionRect:h}=r.current,y=h?{x:h.left,y:h.top}:Bd;this.referenceCoordinates||(this.referenceCoordinates=y);const x=l(e,{active:t,context:r.current,currentCoordinates:y});if(x){const w=bv(x,y),_={x:0,y:0},{scrollableAncestors:S}=r.current;for(const R of S){const I=e.code,{isTop:O,isRight:P,isLeft:Y,isBottom:z,maxScroll:W,minScroll:B}=B4(R),ee=mH(R),H={x:Math.min(I===Ao.Right?ee.right-ee.width/2:ee.right,Math.max(I===Ao.Right?ee.left:ee.left+ee.width/2,x.x)),y:Math.min(I===Ao.Down?ee.bottom-ee.height/2:ee.bottom,Math.max(I===Ao.Down?ee.top:ee.top+ee.height/2,x.y))},V=I===Ao.Right&&!P||I===Ao.Left&&!Y,de=I===Ao.Down&&!z||I===Ao.Up&&!O;if(V&&H.x!==x.x){const Z=R.scrollLeft+w.x,te=I===Ao.Right&&Z<=W.x||I===Ao.Left&&Z>=B.x;if(te&&!w.y){R.scrollTo({left:Z,behavior:a});return}te?_.x=R.scrollLeft-Z:_.x=I===Ao.Right?R.scrollLeft-W.x:R.scrollLeft-B.x,_.x&&R.scrollBy({left:-_.x,behavior:a});break}else if(de&&H.y!==x.y){const Z=R.scrollTop+w.y,te=I===Ao.Down&&Z<=W.y||I===Ao.Up&&Z>=B.y;if(te&&!w.x){R.scrollTo({top:Z,behavior:a});return}te?_.y=R.scrollTop-Z:_.y=I===Ao.Down?R.scrollTop-W.y:R.scrollTop-B.y,_.y&&R.scrollBy({top:-_.y,behavior:a});break}}this.handleMove(e,y1(bv(x,this.referenceCoordinates),_))}}}handleMove(e,t){const{onMove:r}=this.props;e.preventDefault(),r(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}r2.activators=[{eventName:"onKeyDown",handler:(n,e,t)=>{let{keyboardCodes:r=H4,onActivation:i}=e,{active:o}=t;const{code:l}=n.nativeEvent;if(r.start.includes(l)){const a=o.activatorNode.current;return a&&n.target!==a?!1:(n.preventDefault(),i==null||i({event:n.nativeEvent}),!0)}return!1}}];function Fw(n){return!!(n&&"distance"in n)}function Bw(n){return!!(n&&"delay"in n)}class i2{constructor(e,t,r){var i;r===void 0&&(r=SH(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:l}=o;this.props=e,this.events=t,this.document=N1(l),this.documentListeners=new mp(this.document),this.listeners=new mp(r),this.windowListeners=new mp(cf(l)),this.initialCoordinates=(i=um(o))!=null?i:Bd,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(fd.Resize,this.handleCancel),this.windowListeners.add(fd.DragStart,Nw),this.windowListeners.add(fd.VisibilityChange,this.handleCancel),this.windowListeners.add(fd.ContextMenu,Nw),this.documentListeners.add(fd.Keydown,this.handleKeydown),t){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bw(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Fw(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:r,onPending:i}=this.props;i(r,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(fd.Click,EH,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fd.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:l,options:{activationConstraint:a}}=o;if(!i)return;const u=(t=um(e))!=null?t:Bd,h=bv(i,u);if(!r&&a){if(Fw(a)){if(a.tolerance!=null&&Db(h,a.tolerance))return this.handleCancel();if(Db(h,a.distance))return this.handleStart()}if(Bw(a)&&Db(h,a.tolerance))return this.handleCancel();this.handlePending(a,h);return}e.cancelable&&e.preventDefault(),l(u)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Ao.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const TH={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class o2 extends i2{constructor(e){const{event:t}=e,r=N1(t.target);super(e,TH,r)}}o2.activators=[{eventName:"onPointerDown",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:r}=e;return!t.isPrimary||t.button!==0?!1:(r==null||r({event:t}),!0)}}];const RH={move:{name:"mousemove"},end:{name:"mouseup"}};var dm;(function(n){n[n.RightClick=2]="RightClick"})(dm||(dm={}));class IH extends i2{constructor(e){super(e,RH,N1(e.event.target))}}IH.activators=[{eventName:"onMouseDown",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:r}=e;return t.button===dm.RightClick?!1:(r==null||r({event:t}),!0)}}];const Nb={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class kH extends i2{constructor(e){super(e,Nb)}static setup(){return window.addEventListener(Nb.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Nb.move.name,e)};function e(){}}}kH.activators=[{eventName:"onTouchStart",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:r}=e;const{touches:i}=t;return i.length>1?!1:(r==null||r({event:t}),!0)}}];var xp;(function(n){n[n.Pointer=0]="Pointer",n[n.DraggableRect=1]="DraggableRect"})(xp||(xp={}));var mv;(function(n){n[n.TreeOrder=0]="TreeOrder",n[n.ReversedTreeOrder=1]="ReversedTreeOrder"})(mv||(mv={}));function MH(n){let{acceleration:e,activator:t=xp.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:l=5,order:a=mv.TreeOrder,pointerCoordinates:u,scrollableAncestors:h,scrollableAncestorRects:y,delta:x,threshold:w}=n;const _=OH({delta:x,disabled:!o}),[S,R]=Wz(),I=N.useRef({x:0,y:0}),O=N.useRef({x:0,y:0}),P=N.useMemo(()=>{switch(t){case xp.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case xp.DraggableRect:return i}},[t,i,u]),Y=N.useRef(null),z=N.useCallback(()=>{const B=Y.current;if(!B)return;const ee=I.current.x*O.current.x,H=I.current.y*O.current.y;B.scrollBy(ee,H)},[]),W=N.useMemo(()=>a===mv.TreeOrder?[...h].reverse():h,[a,h]);N.useEffect(()=>{if(!o||!h.length||!P){R();return}for(const B of W){if((r==null?void 0:r(B))===!1)continue;const ee=h.indexOf(B),H=y[ee];if(!H)continue;const{direction:V,speed:de}=yH(B,H,P,e,w);for(const Z of["x","y"])_[Z][V[Z]]||(de[Z]=0,V[Z]=0);if(de.x>0||de.y>0){R(),Y.current=B,S(z,l),I.current=de,O.current=V;return}}I.current={x:0,y:0},O.current={x:0,y:0},R()},[e,z,r,R,o,l,JSON.stringify(P),JSON.stringify(_),S,h,W,y,JSON.stringify(w)])}const LH={x:{[lc.Backward]:!1,[lc.Forward]:!1},y:{[lc.Backward]:!1,[lc.Forward]:!1}};function OH(n){let{delta:e,disabled:t}=n;const r=cm(e);return Kp(i=>{if(t||!r||!i)return LH;const o={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[lc.Backward]:i.x[lc.Backward]||o.x===-1,[lc.Forward]:i.x[lc.Forward]||o.x===1},y:{[lc.Backward]:i.y[lc.Backward]||o.y===-1,[lc.Forward]:i.y[lc.Forward]||o.y===1}}},[t,e,r])}function PH(n,e){const t=e!=null?n.get(e):void 0,r=t?t.node.current:null;return Kp(i=>{var o;return e==null?null:(o=r??i)!=null?o:null},[r,e])}function DH(n,e){return N.useMemo(()=>n.reduce((t,r)=>{const{sensor:i}=r,o=i.activators.map(l=>({eventName:l.eventName,handler:e(l.handler,r)}));return[...t,...o]},[]),[n,e])}var k1;(function(n){n[n.Always=0]="Always",n[n.BeforeDragging=1]="BeforeDragging",n[n.WhileDragging=2]="WhileDragging"})(k1||(k1={}));var hm;(function(n){n.Optimized="optimized"})(hm||(hm={}));const zw=new Map;function NH(n,e){let{dragging:t,dependencies:r,config:i}=e;const[o,l]=N.useState(null),{frequency:a,measure:u,strategy:h}=i,y=N.useRef(n),x=I(),w=Bp(x),_=N.useCallback(function(O){O===void 0&&(O=[]),!w.current&&l(P=>P===null?O:P.concat(O.filter(Y=>!P.includes(Y))))},[w]),S=N.useRef(null),R=Kp(O=>{if(x&&!t)return zw;if(!O||O===zw||y.current!==n||o!=null){const P=new Map;for(let Y of n){if(!Y)continue;if(o&&o.length>0&&!o.includes(Y.id)&&Y.rect.current){P.set(Y.id,Y.rect.current);continue}const z=Y.node.current,W=z?new n2(u(z),z):null;Y.rect.current=W,W&&P.set(Y.id,W)}return P}return O},[n,o,t,x,u]);return N.useEffect(()=>{y.current=n},[n]),N.useEffect(()=>{x||_()},[t,x]),N.useEffect(()=>{o&&o.length>0&&l(null)},[JSON.stringify(o)]),N.useEffect(()=>{x||typeof a!="number"||S.current!==null||(S.current=setTimeout(()=>{_(),S.current=null},a))},[a,x,_,...r]),{droppableRects:R,measureDroppableContainers:_,measuringScheduled:o!=null};function I(){switch(h){case k1.Always:return!1;case k1.BeforeDragging:return t;default:return!t}}}function W4(n,e){return Kp(t=>n?t||(typeof e=="function"?e(n):n):null,[e,n])}function FH(n,e){return W4(n,e)}function BH(n){let{callback:e,disabled:t}=n;const r=$m(e),i=N.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,t]);return N.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function zv(n){let{callback:e,disabled:t}=n;const r=$m(e),i=N.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[t]);return N.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function zH(n){return new n2(F1(n),n)}function Hw(n,e,t){e===void 0&&(e=zH);const[r,i]=N.useState(null);function o(){i(u=>{if(!n)return null;if(n.isConnected===!1){var h;return(h=u??t)!=null?h:null}const y=e(n);return JSON.stringify(u)===JSON.stringify(y)?u:y})}const l=BH({callback(u){if(n)for(const h of u){const{type:y,target:x}=h;if(y==="childList"&&x instanceof HTMLElement&&x.contains(n)){o();break}}}}),a=zv({callback:o});return lh(()=>{o(),n?(a==null||a.observe(n),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),l==null||l.disconnect())},[n]),r}function HH(n){const e=W4(n);return O4(n,e)}const Ww=[];function WH(n){const e=N.useRef(n),t=Kp(r=>n?r&&r!==Ww&&n&&e.current&&n.parentNode===e.current.parentNode?r:t2(n):Ww,[n]);return N.useEffect(()=>{e.current=n},[n]),t}function UH(n){const[e,t]=N.useState(null),r=N.useRef(n),i=N.useCallback(o=>{const l=Pb(o.target);l&&t(a=>a?(a.set(l,fm(l)),new Map(a)):null)},[]);return N.useEffect(()=>{const o=r.current;if(n!==o){l(o);const a=n.map(u=>{const h=Pb(u);return h?(h.addEventListener("scroll",i,{passive:!0}),[h,fm(h)]):null}).filter(u=>u!=null);t(a.length?new Map(a):null),r.current=n}return()=>{l(n),l(o)};function l(a){a.forEach(u=>{const h=Pb(u);h==null||h.removeEventListener("scroll",i)})}},[i,n]),N.useMemo(()=>n.length?e?Array.from(e.values()).reduce((o,l)=>y1(o,l),Bd):z4(n):Bd,[n,e])}function Uw(n,e){e===void 0&&(e=[]);const t=N.useRef(null);return N.useEffect(()=>{t.current=null},e),N.useEffect(()=>{const r=n!==Bd;r&&!t.current&&(t.current=n),!r&&t.current&&(t.current=null)},[n]),t.current?bv(n,t.current):Bd}function GH(n){N.useEffect(()=>{if(!Bv)return;const e=n.map(t=>{let{sensor:r}=t;return r.setup==null?void 0:r.setup()});return()=>{for(const t of e)t==null||t()}},n.map(e=>{let{sensor:t}=e;return t}))}function YH(n,e){return N.useMemo(()=>n.reduce((t,r)=>{let{eventName:i,handler:o}=r;return t[i]=l=>{o(l,e)},t},{}),[n,e])}function U4(n){return N.useMemo(()=>n?gH(n):null,[n])}const Gw=[];function VH(n,e){e===void 0&&(e=F1);const[t]=n,r=U4(t?cf(t):null),[i,o]=N.useState(Gw);function l(){o(()=>n.length?n.map(u=>F4(u)?r:new n2(e(u),u)):Gw)}const a=zv({callback:l});return lh(()=>{a==null||a.disconnect(),l(),n.forEach(u=>a==null?void 0:a.observe(u))},[n]),i}function ZH(n){if(!n)return null;if(n.children.length>1)return n;const e=n.children[0];return Xp(e)?e:n}function XH(n){let{measure:e}=n;const[t,r]=N.useState(null),i=N.useCallback(h=>{for(const{target:y}of h)if(Xp(y)){r(x=>{const w=e(y);return x?{...x,width:w.width,height:w.height}:w});break}},[e]),o=zv({callback:i}),l=N.useCallback(h=>{const y=ZH(h);o==null||o.disconnect(),y&&(o==null||o.observe(y)),r(y?e(y):null)},[e,o]),[a,u]=vv(l);return N.useMemo(()=>({nodeRef:a,rect:t,setRef:u}),[t,a,u])}const KH=[{sensor:o2,options:{}},{sensor:r2,options:{}}],JH={current:{}},q0={draggable:{measure:Dw},droppable:{measure:Dw,strategy:k1.WhileDragging,frequency:hm.Optimized},dragOverlay:{measure:F1}};class wp extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,r;return(t=(r=this.get(e))==null?void 0:r.node.current)!=null?t:void 0}}const QH={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new wp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:yv},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:q0,measureDroppableContainers:yv,windowRect:null,measuringScheduled:!1},qH={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:yv,draggableNodes:new Map,over:null,measureDroppableContainers:yv},Hv=N.createContext(qH),G4=N.createContext(QH);function jH(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new wp}}}function $H(n,e){switch(e.type){case za.DragStart:return{...n,draggable:{...n.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case za.DragMove:return n.draggable.active==null?n:{...n,draggable:{...n.draggable,translate:{x:e.coordinates.x-n.draggable.initialCoordinates.x,y:e.coordinates.y-n.draggable.initialCoordinates.y}}};case za.DragEnd:case za.DragCancel:return{...n,draggable:{...n.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case za.RegisterDroppable:{const{element:t}=e,{id:r}=t,i=new wp(n.droppable.containers);return i.set(r,t),{...n,droppable:{...n.droppable,containers:i}}}case za.SetDroppableDisabled:{const{id:t,key:r,disabled:i}=e,o=n.droppable.containers.get(t);if(!o||r!==o.key)return n;const l=new wp(n.droppable.containers);return l.set(t,{...o,disabled:i}),{...n,droppable:{...n.droppable,containers:l}}}case za.UnregisterDroppable:{const{id:t,key:r}=e,i=n.droppable.containers.get(t);if(!i||r!==i.key)return n;const o=new wp(n.droppable.containers);return o.delete(t),{...n,droppable:{...n.droppable,containers:o}}}default:return n}}function eW(n){let{disabled:e}=n;const{active:t,activatorEvent:r,draggableNodes:i}=N.useContext(Hv),o=cm(r),l=cm(t==null?void 0:t.id);return N.useEffect(()=>{if(!e&&!r&&o&&l!=null){if(!e2(o)||document.activeElement===o.target)return;const a=i.get(l);if(!a)return;const{activatorNode:u,node:h}=a;if(!u.current&&!h.current)return;requestAnimationFrame(()=>{for(const y of[u.current,h.current]){if(!y)continue;const x=Yz(y);if(x){x.focus();break}}})}},[r,e,i,l,o]),null}function tW(n,e){let{transform:t,...r}=e;return n!=null&&n.length?n.reduce((i,o)=>o({transform:i,...r}),t):t}function nW(n){return N.useMemo(()=>({draggable:{...q0.draggable,...n==null?void 0:n.draggable},droppable:{...q0.droppable,...n==null?void 0:n.droppable},dragOverlay:{...q0.dragOverlay,...n==null?void 0:n.dragOverlay}}),[n==null?void 0:n.draggable,n==null?void 0:n.droppable,n==null?void 0:n.dragOverlay])}function rW(n){let{activeNode:e,measure:t,initialRect:r,config:i=!0}=n;const o=N.useRef(!1),{x:l,y:a}=typeof i=="boolean"?{x:i,y:i}:i;lh(()=>{if(!l&&!a||!e){o.current=!1;return}if(o.current||!r)return;const h=e==null?void 0:e.node.current;if(!h||h.isConnected===!1)return;const y=t(h),x=O4(y,r);if(l||(x.x=0),a||(x.y=0),o.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const w=P4(h);w&&w.scrollBy({top:x.y,left:x.x})}},[e,l,a,r,t])}const Y4=N.createContext({...Bd,scaleX:1,scaleY:1});var Jh;(function(n){n[n.Uninitialized=0]="Uninitialized",n[n.Initializing=1]="Initializing",n[n.Initialized=2]="Initialized"})(Jh||(Jh={}));const iW=N.memo(function(e){var t,r,i,o;let{id:l,accessibility:a,autoScroll:u=!0,children:h,sensors:y=KH,collisionDetection:x=sH,measuring:w,modifiers:_,...S}=e;const R=N.useReducer($H,void 0,jH),[I,O]=R,[P,Y]=Qz(),[z,W]=N.useState(Jh.Uninitialized),B=z===Jh.Initialized,{draggable:{active:ee,nodes:H,translate:V},droppable:{containers:de}}=I,Z=ee!=null?H.get(ee):null,te=N.useRef({initial:null,translated:null}),ne=N.useMemo(()=>{var qt;return ee!=null?{id:ee,data:(qt=Z==null?void 0:Z.data)!=null?qt:JH,rect:te}:null},[ee,Z]),fe=N.useRef(null),[ae,j]=N.useState(null),[re,he]=N.useState(null),be=Bp(S,Object.values(S)),le=Jp("DndDescribedBy",l),J=N.useMemo(()=>de.getEnabled(),[de]),pe=nW(w),{droppableRects:Te,measureDroppableContainers:Fe,measuringScheduled:_e}=NH(J,{dragging:B,dependencies:[V.x,V.y],config:pe.droppable}),Me=PH(H,ee),De=N.useMemo(()=>re?um(re):null,[re]),Re=wt(),Le=FH(Me,pe.draggable.measure);rW({activeNode:ee!=null?H.get(ee):null,config:Re.layoutShiftCompensation,initialRect:Le,measure:pe.draggable.measure});const Oe=Hw(Me,pe.draggable.measure,Le),Ge=Hw(Me?Me.parentElement:null),Ve=N.useRef({activatorEvent:null,active:null,activeNode:Me,collisionRect:null,collisions:null,droppableRects:Te,draggableNodes:H,draggingNode:null,draggingNodeRect:null,droppableContainers:de,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Pe=de.getNodeFor((t=Ve.current.over)==null?void 0:t.id),ot=XH({measure:pe.dragOverlay.measure}),Xe=(r=ot.nodeRef.current)!=null?r:Me,lt=B?(i=ot.rect)!=null?i:Oe:null,Ye=!!(ot.nodeRef.current&&ot.rect),mt=HH(Ye?null:Oe),bt=U4(Xe?cf(Xe):null),Mt=WH(B?Pe??Me:null),Nt=VH(Mt),_t=tW(_,{transform:{x:V.x-mt.x,y:V.y-mt.y,scaleX:1,scaleY:1},activatorEvent:re,active:ne,activeNodeRect:Oe,containerNodeRect:Ge,draggingNodeRect:lt,over:Ve.current.over,overlayNodeRect:ot.rect,scrollableAncestors:Mt,scrollableAncestorRects:Nt,windowRect:bt}),rn=De?y1(De,V):null,pn=UH(Mt),Kt=Uw(pn),dn=Uw(pn,[Oe]),zt=y1(_t,Kt),wn=lt?uH(lt,_t):null,$t=ne&&wn?x({active:ne,collisionRect:wn,droppableRects:Te,droppableContainers:J,pointerCoordinates:rn}):null,vn=iH($t,"id"),[Pt,Yt]=N.useState(null),ct=Ye?_t:y1(_t,dn),Tt=aH(ct,(o=Pt==null?void 0:Pt.rect)!=null?o:null,Oe),It=N.useRef(null),ye=N.useCallback((qt,Jt)=>{let{sensor:Vt,options:hn}=Jt;if(fe.current==null)return;const ln=H.get(fe.current);if(!ln)return;const kn=qt.nativeEvent,Nn=new Vt({active:fe.current,activeNode:ln,event:kn,options:hn,context:Ve,onAbort(Cn){if(!H.get(Cn))return;const{onDragAbort:Bt}=be.current,Ut={id:Cn};Bt==null||Bt(Ut),P({type:"onDragAbort",event:Ut})},onPending(Cn,rr,Bt,Ut){if(!H.get(Cn))return;const{onDragPending:Ft}=be.current,jn={id:Cn,constraint:rr,initialCoordinates:Bt,offset:Ut};Ft==null||Ft(jn),P({type:"onDragPending",event:jn})},onStart(Cn){const rr=fe.current;if(rr==null)return;const Bt=H.get(rr);if(!Bt)return;const{onDragStart:Ut}=be.current,yn={activatorEvent:kn,active:{id:rr,data:Bt.data,rect:te}};su.unstable_batchedUpdates(()=>{Ut==null||Ut(yn),W(Jh.Initializing),O({type:za.DragStart,initialCoordinates:Cn,active:rr}),P({type:"onDragStart",event:yn}),j(It.current),he(kn)})},onMove(Cn){O({type:za.DragMove,coordinates:Cn})},onEnd:En(za.DragEnd),onCancel:En(za.DragCancel)});It.current=Nn;function En(Cn){return async function(){const{active:Bt,collisions:Ut,over:yn,scrollAdjustedTranslate:Ft}=Ve.current;let jn=null;if(Bt&&Ft){const{cancelDrop:Hn}=be.current;jn={activatorEvent:kn,active:Bt,collisions:Ut,delta:Ft,over:yn},Cn===za.DragEnd&&typeof Hn=="function"&&await Promise.resolve(Hn(jn))&&(Cn=za.DragCancel)}fe.current=null,su.unstable_batchedUpdates(()=>{O({type:Cn}),W(Jh.Uninitialized),Yt(null),j(null),he(null),It.current=null;const Hn=Cn===za.DragEnd?"onDragEnd":"onDragCancel";if(jn){const Rn=be.current[Hn];Rn==null||Rn(jn),P({type:Hn,event:jn})}})}}},[H]),se=N.useCallback((qt,Jt)=>(Vt,hn)=>{const ln=Vt.nativeEvent,kn=H.get(hn);if(fe.current!==null||!kn||ln.dndKit||ln.defaultPrevented)return;const Nn={active:kn};qt(Vt,Jt.options,Nn)===!0&&(ln.dndKit={capturedBy:Jt.sensor},fe.current=hn,ye(Vt,Jt))},[H,ye]),He=DH(y,se);GH(y),lh(()=>{Oe&&z===Jh.Initializing&&W(Jh.Initialized)},[Oe,z]),N.useEffect(()=>{const{onDragMove:qt}=be.current,{active:Jt,activatorEvent:Vt,collisions:hn,over:ln}=Ve.current;if(!Jt||!Vt)return;const kn={active:Jt,activatorEvent:Vt,collisions:hn,delta:{x:zt.x,y:zt.y},over:ln};su.unstable_batchedUpdates(()=>{qt==null||qt(kn),P({type:"onDragMove",event:kn})})},[zt.x,zt.y]),N.useEffect(()=>{const{active:qt,activatorEvent:Jt,collisions:Vt,droppableContainers:hn,scrollAdjustedTranslate:ln}=Ve.current;if(!qt||fe.current==null||!Jt||!ln)return;const{onDragOver:kn}=be.current,Nn=hn.get(vn),En=Nn&&Nn.rect.current?{id:Nn.id,rect:Nn.rect.current,data:Nn.data,disabled:Nn.disabled}:null,Cn={active:qt,activatorEvent:Jt,collisions:Vt,delta:{x:ln.x,y:ln.y},over:En};su.unstable_batchedUpdates(()=>{Yt(En),kn==null||kn(Cn),P({type:"onDragOver",event:Cn})})},[vn]),lh(()=>{Ve.current={activatorEvent:re,active:ne,activeNode:Me,collisionRect:wn,collisions:$t,droppableRects:Te,draggableNodes:H,draggingNode:Xe,draggingNodeRect:lt,droppableContainers:de,over:Pt,scrollableAncestors:Mt,scrollAdjustedTranslate:zt},te.current={initial:lt,translated:wn}},[ne,Me,$t,wn,H,Xe,lt,Te,de,Pt,Mt,zt]),MH({...Re,delta:V,draggingRect:wn,pointerCoordinates:rn,scrollableAncestors:Mt,scrollableAncestorRects:Nt});const We=N.useMemo(()=>({active:ne,activeNode:Me,activeNodeRect:Oe,activatorEvent:re,collisions:$t,containerNodeRect:Ge,dragOverlay:ot,draggableNodes:H,droppableContainers:de,droppableRects:Te,over:Pt,measureDroppableContainers:Fe,scrollableAncestors:Mt,scrollableAncestorRects:Nt,measuringConfiguration:pe,measuringScheduled:_e,windowRect:bt}),[ne,Me,Oe,re,$t,Ge,ot,H,de,Te,Pt,Fe,Mt,Nt,pe,_e,bt]),pt=N.useMemo(()=>({activatorEvent:re,activators:He,active:ne,activeNodeRect:Oe,ariaDescribedById:{draggable:le},dispatch:O,draggableNodes:H,over:Pt,measureDroppableContainers:Fe}),[re,He,ne,Oe,O,le,H,Pt,Fe]);return N.createElement(L4.Provider,{value:Y},N.createElement(Hv.Provider,{value:pt},N.createElement(G4.Provider,{value:We},N.createElement(Y4.Provider,{value:Tt},h)),N.createElement(eW,{disabled:(a==null?void 0:a.restoreFocus)===!1})),N.createElement($z,{...a,hiddenTextDescribedById:le}));function wt(){const qt=(ae==null?void 0:ae.autoScrollEnabled)===!1,Jt=typeof u=="object"?u.enabled===!1:u===!1,Vt=B&&!qt&&!Jt;return typeof u=="object"?{...u,enabled:Vt}:{enabled:Vt}}}),oW=N.createContext(null),Yw="button",lW="Draggable";function sW(n){let{id:e,data:t,disabled:r=!1,attributes:i}=n;const o=Jp(lW),{activators:l,activatorEvent:a,active:u,activeNodeRect:h,ariaDescribedById:y,draggableNodes:x,over:w}=N.useContext(Hv),{role:_=Yw,roleDescription:S="draggable",tabIndex:R=0}=i??{},I=(u==null?void 0:u.id)===e,O=N.useContext(I?Y4:oW),[P,Y]=vv(),[z,W]=vv(),B=YH(l,e),ee=Bp(t);lh(()=>(x.set(e,{id:e,key:o,node:P,activatorNode:z,data:ee}),()=>{const V=x.get(e);V&&V.key===o&&x.delete(e)}),[x,e]);const H=N.useMemo(()=>({role:_,tabIndex:R,"aria-disabled":r,"aria-pressed":I&&_===Yw?!0:void 0,"aria-roledescription":S,"aria-describedby":y.draggable}),[r,_,R,I,S,y.draggable]);return{active:u,activatorEvent:a,activeNodeRect:h,attributes:H,isDragging:I,listeners:r?void 0:B,node:P,over:w,setNodeRef:Y,setActivatorNodeRef:W,transform:O}}function aW(){return N.useContext(G4)}const cW="Droppable",uW={timeout:25};function fW(n){let{data:e,disabled:t=!1,id:r,resizeObserverConfig:i}=n;const o=Jp(cW),{active:l,dispatch:a,over:u,measureDroppableContainers:h}=N.useContext(Hv),y=N.useRef({disabled:t}),x=N.useRef(!1),w=N.useRef(null),_=N.useRef(null),{disabled:S,updateMeasurementsFor:R,timeout:I}={...uW,...i},O=Bp(R??r),P=N.useCallback(()=>{if(!x.current){x.current=!0;return}_.current!=null&&clearTimeout(_.current),_.current=setTimeout(()=>{h(Array.isArray(O.current)?O.current:[O.current]),_.current=null},I)},[I]),Y=zv({callback:P,disabled:S||!l}),z=N.useCallback((H,V)=>{Y&&(V&&(Y.unobserve(V),x.current=!1),H&&Y.observe(H))},[Y]),[W,B]=vv(z),ee=Bp(e);return N.useEffect(()=>{!Y||!W.current||(Y.disconnect(),x.current=!1,Y.observe(W.current))},[W,Y]),N.useEffect(()=>(a({type:za.RegisterDroppable,element:{id:r,key:o,disabled:t,node:W,rect:w,data:ee}}),()=>a({type:za.UnregisterDroppable,key:o,id:r})),[r]),N.useEffect(()=>{t!==y.current.disabled&&(a({type:za.SetDroppableDisabled,id:r,key:o,disabled:t}),y.current.disabled=t)},[r,o,t,a]),{active:l,rect:w,isOver:(u==null?void 0:u.id)===r,node:W,over:u,setNodeRef:B}}function V4(n,e,t){const r={...n};return e.top+n.y<=t.top?r.y=t.top-e.top:e.bottom+n.y>=t.top+t.height&&(r.y=t.top+t.height-e.bottom),e.left+n.x<=t.left?r.x=t.left-e.left:e.right+n.x>=t.left+t.width&&(r.x=t.left+t.width-e.right),r}const dW=n=>{let{containerNodeRect:e,draggingNodeRect:t,transform:r}=n;return!t||!e?r:V4(r,t,e)},hW=n=>{let{transform:e,draggingNodeRect:t,windowRect:r}=n;return!t||!r?e:V4(e,t,r)};function xv(n,e,t){const r=n.slice();return r.splice(t<0?r.length+t:t,0,r.splice(e,1)[0]),r}function gW(n,e){return n.reduce((t,r,i)=>{const o=e.get(r);return o&&(t[i]=o),t},Array(n.length))}function N0(n){return n!==null&&n>=0}function pW(n,e){if(n===e)return!0;if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function vW(n){return typeof n=="boolean"?{draggable:n,droppable:n}:n}const Z4=n=>{let{rects:e,activeIndex:t,overIndex:r,index:i}=n;const o=xv(e,r,t),l=e[i],a=o[i];return!a||!l?null:{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}},F0={scaleX:1,scaleY:1},bW=n=>{var e;let{activeIndex:t,activeNodeRect:r,index:i,rects:o,overIndex:l}=n;const a=(e=o[t])!=null?e:r;if(!a)return null;if(i===t){const h=o[l];return h?{x:0,y:t<l?h.top+h.height-(a.top+a.height):h.top-a.top,...F0}:null}const u=yW(o,i,t);return i>t&&i<=l?{x:0,y:-a.height-u,...F0}:i<t&&i>=l?{x:0,y:a.height+u,...F0}:{x:0,y:0,...F0}};function yW(n,e,t){const r=n[e],i=n[e-1],o=n[e+1];return r?t<e?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const X4="Sortable",K4=N.createContext({activeIndex:-1,containerId:X4,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Z4,disabled:{draggable:!1,droppable:!1}});function mW(n){let{children:e,id:t,items:r,strategy:i=Z4,disabled:o=!1}=n;const{active:l,dragOverlay:a,droppableRects:u,over:h,measureDroppableContainers:y}=aW(),x=Jp(X4,t),w=a.rect!==null,_=N.useMemo(()=>r.map(B=>typeof B=="object"&&"id"in B?B.id:B),[r]),S=l!=null,R=l?_.indexOf(l.id):-1,I=h?_.indexOf(h.id):-1,O=N.useRef(_),P=!pW(_,O.current),Y=I!==-1&&R===-1||P,z=vW(o);lh(()=>{P&&S&&y(_)},[P,_,S,y]),N.useEffect(()=>{O.current=_},[_]);const W=N.useMemo(()=>({activeIndex:R,containerId:x,disabled:z,disableTransforms:Y,items:_,overIndex:I,useDragOverlay:w,sortedRects:gW(_,u),strategy:i}),[R,x,z.draggable,z.droppable,Y,_,I,u,w,i]);return N.createElement(K4.Provider,{value:W},e)}const xW=n=>{let{id:e,items:t,activeIndex:r,overIndex:i}=n;return xv(t,r,i).indexOf(e)},wW=n=>{let{containerId:e,isSorting:t,wasDragging:r,index:i,items:o,newIndex:l,previousItems:a,previousContainerId:u,transition:h}=n;return!h||!r||a!==o&&i===l?!1:t?!0:l!==i&&e===u},CW={duration:200,easing:"ease"},J4="transform",_W=zp.Transition.toString({property:J4,duration:0,easing:"linear"}),SW={roleDescription:"sortable"};function EW(n){let{disabled:e,index:t,node:r,rect:i}=n;const[o,l]=N.useState(null),a=N.useRef(t);return lh(()=>{if(!e&&t!==a.current&&r.current){const u=i.current;if(u){const h=F1(r.current,{ignoreTransform:!0}),y={x:u.left-h.left,y:u.top-h.top,scaleX:u.width/h.width,scaleY:u.height/h.height};(y.x||y.y)&&l(y)}}t!==a.current&&(a.current=t)},[e,t,r,i]),N.useEffect(()=>{o&&l(null)},[o]),o}function AW(n){let{animateLayoutChanges:e=wW,attributes:t,disabled:r,data:i,getNewIndex:o=xW,id:l,strategy:a,resizeObserverConfig:u,transition:h=CW}=n;const{items:y,containerId:x,activeIndex:w,disabled:_,disableTransforms:S,sortedRects:R,overIndex:I,useDragOverlay:O,strategy:P}=N.useContext(K4),Y=TW(r,_),z=y.indexOf(l),W=N.useMemo(()=>({sortable:{containerId:x,index:z,items:y},...i}),[x,i,z,y]),B=N.useMemo(()=>y.slice(y.indexOf(l)),[y,l]),{rect:ee,node:H,isOver:V,setNodeRef:de}=fW({id:l,data:W,disabled:Y.droppable,resizeObserverConfig:{updateMeasurementsFor:B,...u}}),{active:Z,activatorEvent:te,activeNodeRect:ne,attributes:fe,setNodeRef:ae,listeners:j,isDragging:re,over:he,setActivatorNodeRef:be,transform:le}=sW({id:l,data:W,attributes:{...SW,...t},disabled:Y.draggable}),J=Hz(de,ae),pe=!!Z,Te=pe&&!S&&N0(w)&&N0(I),Fe=!O&&re,_e=Fe&&Te?le:null,De=Te?_e??(a??P)({rects:R,activeNodeRect:ne,activeIndex:w,overIndex:I,index:z}):null,Re=N0(w)&&N0(I)?o({id:l,items:y,activeIndex:w,overIndex:I}):z,Le=Z==null?void 0:Z.id,Oe=N.useRef({activeId:Le,items:y,newIndex:Re,containerId:x}),Ge=y!==Oe.current.items,Ve=e({active:Z,containerId:x,isDragging:re,isSorting:pe,id:l,index:z,items:y,newIndex:Oe.current.newIndex,previousItems:Oe.current.items,previousContainerId:Oe.current.containerId,transition:h,wasDragging:Oe.current.activeId!=null}),Pe=EW({disabled:!Ve,index:z,node:H,rect:ee});return N.useEffect(()=>{pe&&Oe.current.newIndex!==Re&&(Oe.current.newIndex=Re),x!==Oe.current.containerId&&(Oe.current.containerId=x),y!==Oe.current.items&&(Oe.current.items=y)},[pe,Re,x,y]),N.useEffect(()=>{if(Le===Oe.current.activeId)return;if(Le!=null&&Oe.current.activeId==null){Oe.current.activeId=Le;return}const Xe=setTimeout(()=>{Oe.current.activeId=Le},50);return()=>clearTimeout(Xe)},[Le]),{active:Z,activeIndex:w,attributes:fe,data:W,rect:ee,index:z,newIndex:Re,items:y,isOver:V,isSorting:pe,isDragging:re,listeners:j,node:H,overIndex:I,over:he,setNodeRef:J,setActivatorNodeRef:be,setDroppableNodeRef:de,setDraggableNodeRef:ae,transform:Pe??De,transition:ot()};function ot(){if(Pe||Ge&&Oe.current.newIndex===z)return _W;if(!(Fe&&!e2(te)||!h)&&(pe||Ve))return zp.Transition.toString({...h,property:J4})}}function TW(n,e){var t,r;return typeof n=="boolean"?{draggable:n,droppable:!1}:{draggable:(t=n==null?void 0:n.draggable)!=null?t:e.draggable,droppable:(r=n==null?void 0:n.droppable)!=null?r:e.droppable}}Ao.Down,Ao.Right,Ao.Up,Ao.Left;function wv(n,e){Array.isArray(n)||(n=[n]);for(const t of n){if(e(t))return t;if(!t.children||t.children.length<1)continue;const r=wv(t.children,e);if(r)return r}}function Qp(n,e){Array.isArray(n)||(n=[n]);for(const t of n)e(t),!(!t.children||t.children.length<1)&&Qp(t.children,e)}function Q4(n,e){Array.isArray(n)||(n=[n]);const t=[];return Qp(n,(r,i)=>t.push(e(r,i))),t}function q4(n,e){Array.isArray(n)||(n=[n]);for(const t of n){if(!e(t))return!1;if(!(!t.children||t.children.length<1)&&!q4(t.children,e))return!1}return!0}function RW(n,e){Array.isArray(n)||(n=[n]);const t=[];return Qp(n,(r,i)=>{e(r,i)&&t.push(r)}),t}function IW(n){Array.isArray(n)||(n=[n]);let e=0;return Qp(n,()=>e++),e}function kW(n,e,t,r){if(r(e,t))return null;Array.isArray(n)||(n=[n]);const i=wv(n,l=>{var a;return(a=l.children)==null?void 0:a.some(u=>r(u,e))}),o=wv(n,l=>{var a;return(a=l.children)==null?void 0:a.some(u=>r(u,t))});if(i===void 0&&o===void 0){const l=n.findIndex(u=>r(u,e)),a=n.findIndex(u=>r(u,t));return n.splice(l,1),n.splice(a,0,e),[...n]}else if(i!==void 0&&o!==void 0&&r(i,o)&&i.children){const l=i.children.findIndex(u=>r(u,e)),a=i.children.findIndex(u=>r(u,t));return l===void 0||a===void 0?null:(i.children.splice(l,1),i.children.splice(a,0,e),i.children=[...i.children],[...n])}return null}function MW(n,e,t){const r=[],i=[...e];for(;i.length>0;){const o=i.shift();if(o&&!r.find(l=>t(l,o))&&(r.push(o),!(!o.children||o.children.length<1)))for(const l of o.children)i.push(l)}return r}function LW(n,e,t){Array.isArray(n)||(n=[n]);const r=Q4(n,l=>l),i=[],o=[...e];for(;o.length>0;){const l=o.shift();if(!l||i.find(u=>t(u,l)))continue;i.push(l);const a=r.find(u=>{var h;return(h=u.children)==null?void 0:h.some(y=>t(y,l))});a&&o.push(a)}return i}const Qh={find:wv,forEach:Qp,map:Q4,every:q4,filter:RW,length:IW,replace:kW,descendants:MW,ancestors:LW},OW="_AWrap_1n0ow_1",PW="_AContainer_1n0ow_10",DW="_ATree_1n0ow_18",NW="_ATreeBody_1n0ow_30",FW="_TreeTopAddon_1n0ow_36",BW="_CoverBorder_1n0ow_46",zW="_InsertBorder_1n0ow_55",HW="_ATreeHeader_1n0ow_86",WW="_ATreeBodyHeader_1n0ow_92",UW="_ATreeBodyHeaderResources_1n0ow_102",GW="_ATreeItem_1n0ow_108",YW="_IsSelectUsed_1n0ow_124",VW="_IsSelected_1n0ow_127",ZW="_IsSearchSelected_1n0ow_132",XW="_IsHovered_1n0ow_143",KW="_CheckBox_1n0ow_147",JW="_Indents_1n0ow_159",QW="_ExpandIcon_1n0ow_166",qW="_Content_1n0ow_179",jW="_RightSticky_1n0ow_188",$W="_SearchInputWrap_1n0ow_197",eU="_SearchInput_1n0ow_197",tU="_RightAddon_1n0ow_209",nU="_RightAddonIcon_1n0ow_220",rU="_Loader_1n0ow_227",iU="_IsChildOfDragSource_1n0ow_232",zo={AWrap:OW,AContainer:PW,ATree:DW,ATreeBody:NW,TreeTopAddon:FW,CoverBorder:BW,InsertBorder:zW,ATreeHeader:HW,ATreeBodyHeader:WW,ATreeBodyHeaderResources:UW,ATreeItem:GW,IsSelectUsed:YW,IsSelected:VW,IsSearchSelected:ZW,IsHovered:XW,CheckBox:KW,Indents:JW,ExpandIcon:QW,Content:qW,RightSticky:jW,SearchInputWrap:$W,SearchInput:eU,RightAddon:tU,RightAddonIcon:nU,Loader:rU,IsChildOfDragSource:iU},oU=24,lU=8,sU=12,aU=n=>{const{isEqual:e,item:t,itemId:r,selectDisabled:i,selectUnused:o,isParentDisabled:l,indents:a,extIndents:u,useExpand:h,useSelect:y,useSearch:x,showCheckbox:w,icons:_,isSelectMulti:S,isDraggable:R,isParentCheckHovered:I,hoverdItem:O,onMouseOver:P,onMouseLeave:Y,ContentRenderer:z,TreeItemRenderer:W,RightStickyAddon:B,resources:ee,containerRef:H,TreeItemStyle:V,TreeItemClassName:de,searchItemStyle:Z,searchItemClassName:te,height:ne,isDragSrcItem:fe,isChildOfDragItem:ae,getItemId:j,treeItemTooltip:re,treeItemTooltipDelay:he,treeItemTooltipDirection:be,treeItemTooltipDistance:le}=n,{children:J}=N.useMemo(()=>t,[t]),[pe,Te]=N.useMemo(()=>h,[h]),[Fe,_e]=N.useMemo(()=>y,[y]),[Me,De]=N.useMemo(()=>x,[x]),Re=N.useMemo(()=>o?o(t):!1,[o,t]),Le=N.useMemo(()=>!i||l?l:i(t),[i,l,t]),Oe=N.useMemo(()=>pe.some(Bt=>e(Bt,t)),[pe,e,t]),Ge=N.useMemo(()=>!J||J.length<1?"noChild":Oe?"expanded":"collapsed",[J,Oe]),Ve=N.useMemo(()=>Zr.getContent(_,n),[_,n]),Pe=N.useCallback((Bt,Ut)=>Ve&&Bt in Ve&&typeof Ve[Bt]=="number"?Ve[Bt]:Ut,[Ve]),ot=N.useMemo(()=>Pe("iconWidth",oU),[Pe]),Xe=N.useMemo(()=>Pe("iconGap",lU),[Pe]),lt=N.useMemo(()=>Pe("iconPadding",sU),[Pe]),Ye=N.useMemo(()=>{if(!Ve)return null;const Bt=Ve[Ge];if(!Bt)return null;if(bm.includes(Bt))return k.jsx(ho,{icon:Bt,style:{width:ot,height:ot}});if(N.isValidElement(Bt)){const Ut=Bt.props;return N.cloneElement(Bt,{style:{width:ot,height:ot,...Ut==null?void 0:Ut.style}})}return Bt},[Ve,Ge,ot]),mt=N.useCallback(Bt=>{!Te||Ge==="noChild"||(Te(Oe?pe.filter(Ut=>!e(Ut,t)):[...pe,t]),Bt.stopPropagation())},[Te,pe,Oe,t,e,Ge]),bt=N.useMemo(()=>Fe.some(Bt=>e(Bt,t)),[Fe,e,t]),Mt=N.useCallback(()=>{!_e||Le||(_e(S?bt?Fe.filter(Bt=>!e(Bt,t)):[...Fe,t]:[t]),Me&&De&&Me.items.some(Bt=>e(Bt,t))&&De({...Me,item:t}))},[S,Le,bt,Me,De,_e,e,Fe,t]),Nt=N.useMemo(()=>Me==null?void 0:Me.items.some(Bt=>e(Bt,t)),[Me,e,t]),_t=N.useMemo(()=>Nt&&(Me==null?void 0:Me.item)&&e(Me.item,t),[Nt,Me,e,t]),rn=N.useRef(null),pn=N.useRef(null),{attributes:Kt,listeners:dn,setNodeRef:zt,transform:wn,transition:$t,isDragging:vn}=AW({id:r||`item-${JSON.stringify(t)}`,disabled:!R||!!l||!r}),Pt=N.useMemo(()=>ae?ae(t):!1,[ae,t]),Yt=N.useMemo(()=>{const Bt=wn?{transform:zp.Transform.toString(wn),transition:$t,opacity:vn?.5:1,zIndex:vn?1:"auto"}:{};return fe||Pt?{...Bt,opacity:.5,zIndex:10}:Bt},[wn,$t,vn,fe,Pt]);N.useEffect(()=>{r&&zt&&pn.current&&zt(pn.current)},[r,zt]),N.useEffect(()=>{setTimeout(()=>{if(_t&&rn.current&&H.current){const{top:Bt,bottom:Ut}=rn.current.getBoundingClientRect(),{top:yn,bottom:Ft}=H.current.getBoundingClientRect();(Bt<yn||Ut>Ft)&&rn.current.scrollIntoView({behavior:"smooth",block:"center"})}},10)},[H,_t]);const[ct,Tt]=N.useState(!1),It=N.useCallback(()=>!Le&&Tt(!0),[Le]),ye=N.useCallback(()=>!Le&&Tt(!1),[Le]),se=N.useMemo(()=>Qh.map(t,Bt=>Bt).filter(Bt=>!(i!=null&&i(Bt))&&!(o!=null&&o(Bt))),[i,o,t]),He=N.useMemo(()=>!w||!S?!1:bt&&se.some(Bt=>Fe.some(Ut=>e(Bt,Ut)))&&se.some(Bt=>!Fe.some(Ut=>e(Bt,Ut))),[w,S,bt,se,e,Fe]),We=N.useMemo(()=>w?S?se.every(Bt=>Fe.some(Ut=>e(Bt,Ut))):Fe.some(Bt=>e(Bt,t)):!1,[w,S,se,t,e,Fe]),pt=N.useCallback(()=>{if(!(!_e||Le))if(S)if(bt){const Bt=Fe.filter(Ut=>!(o!=null&&o(Ut))&&!(i!=null&&i(Ut))&&se.some(yn=>e(yn,Ut)));Bt.length>0&&_e(Fe.filter(Ut=>!Bt.some(yn=>e(Ut,yn))))}else{const Bt=se.filter(Ut=>!(o!=null&&o(Ut))&&!(i!=null&&i(Ut))&&!Fe.some(yn=>e(yn,Ut)));Bt.length>0&&_e([...Fe,...Bt])}else _e([t])},[Le,i,o,S,_e,e,bt,Fe,se,t]),wt=N.useCallback(Bt=>{Le||pt(),Bt.stopPropagation()},[Le,pt]),qt=N.useMemo(()=>{if(!w||!S||Le)return"";if(bt){const Ut=Fe.filter(yn=>!(o!=null&&o(yn))&&!(i!=null&&i(yn))&&se.some(Ft=>e(Ft,yn)));if(Ut.length>0)return ee["deselect n"](Ut.length)}const Bt=se.filter(Ut=>!(o!=null&&o(Ut))&&!(i!=null&&i(Ut))&&!Fe.some(yn=>e(yn,Ut)));return ee["select n"](Bt.length)},[i,o,ee,Le,w,S,bt,se,e,Fe]),Jt=N.useMemo(()=>Zr.getContent(B,n),[B,n]),Vt=N.useMemo(()=>Zr.getContent(V,n),[n,V]),hn=N.useMemo(()=>Zr.getContent(de,n),[n,de]),ln=N.useMemo(()=>Zr.getContent(te,n),[n,te]),kn=N.useMemo(()=>Zr.getContent(Z,n),[n,Z]),Nn=N.useMemo(()=>Zr.getContent(re,n),[n,re]),En=N.useMemo(()=>Zr.getContent(he,n),[n,he]),Cn=N.useMemo(()=>Zr.getContent(be,n),[n,be]),rr=N.useMemo(()=>Zr.getContent(le,n),[n,le]);return k.jsxs(N.Fragment,{children:[k.jsxs(Gi,{abaseRef:pn,isDisabled:Le,className:gt.clsx(zo.ATreeItem,bt&&zo.IsSelected,!Le&&(ct||I)&&zo.IsHovered,Nt&&zo.IsSearched,_t&&(ln||zo.IsSearchSelected),!Re&&zo.IsSelectUsed,Pt&&zo.IsChildOfDragSource,"NoSelect",hn),style:{...Vt,..._t&&kn?kn:{},"--ATreeItem_height":`${ne}px`,...Yt||{}},onClick:Mt,onMouseLeave:Bt=>Y==null?void 0:Y(Bt,t),onMouseOver:Bt=>P==null?void 0:P(Bt,t),...R&&!Le&&Kt?Kt:{},...R&&!Le&&dn?dn:{},tooltip:Nn,tooltipDelay:En,tooltipDirection:Cn,tooltipDistance:rr,children:[w&&k.jsx(x1,{className:zo.CheckBox,isDisabled:Le,isIndeterminate:He,tooltip:qt,useCheck:[+We,pt],style:{visibility:Le||Re?"hidden":"visible",zIndex:Le||Re?0:2},onClick:wt,onMouseOut:ye,onMouseOver:It}),k.jsx("div",{className:zo.Indents,style:{paddingLeft:w?0:Ve!=null&&Ve.noChild?lt:0},children:a.map((Bt,Ut)=>{const yn=Ut===a.length-1;return k.jsx(D3,{value:Bt,map:{Collapsed:u?u({iconWidth:ot}).collapsed:k.jsx(uU,{iconWidth:ot}),Expanded:u?u({iconWidth:ot,isLast:yn}).expanded:k.jsx(cU,{iconWidth:ot,isLast:yn}),IsLast:u?u({iconWidth:ot}).isLast:k.jsx(fU,{iconWidth:ot})}},Ut)})}),Ye&&k.jsx("div",{className:zo.ExpandIcon,style:{"--ATree_icon-width":`${ot}px`,"--ATree_icon-gap":`${Xe}px`},onClick:mt,children:Ye}),k.jsx("div",{className:gt.clsx(zo.Content,"NoSelect"),children:k.jsx(z,{containerRef:H,ContentRenderer:z,extIndents:u,height:ne,hoverdItem:O,icons:_,indents:a,isDraggable:R,isEqual:e,isParentCheckHovered:S&&(ct||I),isSelectMulti:S,item:t,itemId:r,resources:ee,RightStickyAddon:B,searchItemClassName:ln,searchItemStyle:Z,showCheckbox:w,TreeItemClassName:de,TreeItemRenderer:W,TreeItemStyle:V,treeItemTooltip:re,treeItemTooltipDelay:he,treeItemTooltipDirection:be,treeItemTooltipDistance:le,useExpand:h,useSearch:x,useSelect:y,onMouseLeave:Y,onMouseOver:P})}),Jt&&k.jsx("div",{className:zo.RightSticky,children:Jt})]}),Oe&&(J==null?void 0:J.map((Bt,Ut)=>k.jsx(W,{containerRef:H,ContentRenderer:z,extIndents:u,height:ne,hoverdItem:O,icons:_,isChildOfDragItem:ae,isDraggable:R,isDragSrcItem:fe,isEqual:e,isParentCheckHovered:S&&(ct||I),isSelectMulti:S,item:Bt,itemId:j?`${j(t)}-child-${Ut}`:r?`${r}-child-${Ut}`:void 0,resources:ee,RightStickyAddon:B,searchItemClassName:ln,searchItemStyle:Z,selectDisabled:i,selectUnused:o,showCheckbox:w,TreeItemClassName:de,TreeItemRenderer:W,TreeItemStyle:V,treeItemTooltip:re,treeItemTooltipDelay:he,treeItemTooltipDirection:be,treeItemTooltipDistance:le,useExpand:h,useSearch:x,useSelect:y,indents:[...a.map(yn=>yn==="IsLast"?"Collapsed":yn),Ut===J.length-1?"IsLast":"Expanded"],onMouseLeave:Y,onMouseOver:P},j?j(Bt):Ut)))]})},cU=n=>{const e=Dn.c(9),{iconWidth:t,isLast:r}=n,i=t/8*3,o=t/2,l=t/8;let a;e[0]!==i||e[1]!==o||e[2]!==l?(a={width:i,height:"100%",borderLeft:"var(--ATree_Indent_border)",marginLeft:o,marginRight:l,boxSizing:"border-box",transition:"border-color var(--Transition)"},e[0]=i,e[1]=o,e[2]=l,e[3]=a):a=e[3];let u;e[4]!==r?(u=r&&k.jsx("div",{style:{borderBottom:"var(--ATree_Indent_border)",height:"50%",transition:"border-color var(--Transition)"}}),e[4]=r,e[5]=u):u=e[5];let h;return e[6]!==a||e[7]!==u?(h=k.jsx("div",{style:a,children:u}),e[6]=a,e[7]=u,e[8]=h):h=e[8],h},uU=n=>{const e=Dn.c(2),{iconWidth:t}=n;let r;return e[0]!==t?(r=k.jsx("div",{style:{width:t,height:"100%",borderLeft:"none",marginLeft:0,transition:"border-color var(--Transition)"}}),e[0]=t,e[1]=r):r=e[1],r},fU=n=>{const e=Dn.c(4),{iconWidth:t}=n,r=t/8*3,i=t/2,o=t/8;let l;return e[0]!==r||e[1]!==i||e[2]!==o?(l=k.jsx("div",{style:{width:r,height:"50%",borderLeft:"var(--ATree_Indent_border)",borderBottom:"var(--ATree_Indent_border)",marginLeft:i,marginRight:o,boxSizing:"border-box",transition:"border-color var(--Transition)"}}),e[0]=r,e[1]=i,e[2]=o,e[3]=l):l=e[3],l},dU=n=>{const e=Dn.c(26),{isEqual:t,searchResult:r,initSearch:i,searchUp:o,searchDown:l,searchEnter:a,isDisabled:u,isLoading:h,resources:y,maxLength:x,autoFocus:w}=n;let _;e[0]!==l||e[1]!==a||e[2]!==o?(_=V=>{V.key==="Enter"?a():V.key==="ArrowDown"?l():V.key==="ArrowUp"&&o(),V.preventDefault(),V.stopPropagation()},e[0]=l,e[1]=a,e[2]=o,e[3]=_):_=e[3];const S=_;let R;e[4]!==i?(R=V=>{i(V)},e[4]=i,e[5]=R):R=e[5];const I=R;let O;u||h?O=-1:O=void 0;const P=O,Y=y["Search(Placeholder)"],z=(r==null?void 0:r.keyword)??"";let W;e[6]!==I||e[7]!==z?(W=[z,I],e[6]=I,e[7]=z,e[8]=W):W=e[8];let B;e[9]!==t||e[10]!==y||e[11]!==l||e[12]!==a||e[13]!==r||e[14]!==o?(B=k.jsx(hU,{isEqual:t,resources:y,searchDown:l,searchEnter:a,searchResult:r,searchUp:o}),e[9]=t,e[10]=y,e[11]=l,e[12]=a,e[13]=r,e[14]=o,e[15]=B):B=e[15];let ee;e[16]===Symbol.for("react.memo_cache_sentinel")?(ee={className:zo.SearchInputWrap},e[16]=ee):ee=e[16];let H;return e[17]!==w||e[18]!==u||e[19]!==x||e[20]!==S||e[21]!==Y||e[22]!==W||e[23]!==B||e[24]!==P?(H=k.jsx(sg,{autoFocus:w,className:zo.SearchInput,isDisabled:u,maxLength:x,placeholder:Y,tabIndex:P,useValue:W,RightAddon:B,wrapProps:ee,onKeyDown:S}),e[17]=w,e[18]=u,e[19]=x,e[20]=S,e[21]=Y,e[22]=W,e[23]=B,e[24]=P,e[25]=H):H=e[25],H},hU=n=>{const e=Dn.c(22),{isEqual:t,searchResult:r,searchUp:i,searchDown:o,searchEnter:l,resources:a}=n;let u;if(!r||r.items.length<1)u=0;else{let H;e[0]!==t||e[1]!==r.item?(H=V=>r.item&&t(V,r.item),e[0]=t,e[1]=r.item,e[2]=H):H=e[2],u=r.items.findIndex(H)+1}const h=u;let y;!r||r.items.length<1?y=0:y=r.items.length;const x=y;let w;h<2?w=!0:w=!1;const _=w;let S;h>=x?S=!0:S=!1;const R=S;let I;e[3]!==_||e[4]!==i?(I=H=>{H.stopPropagation(),!_&&i()},e[3]=_,e[4]=i,e[5]=I):I=e[5];const O=I;let P;e[6]!==R||e[7]!==o?(P=H=>{H.stopPropagation(),!R&&o()},e[6]=R,e[7]=o,e[8]=P):P=e[8];const Y=P;let z;e[9]!==l?(z=H=>{H.stopPropagation(),l()},e[9]=l,e[10]=z):z=e[10];const W=z;let B;e[11]===Symbol.for("react.memo_cache_sentinel")?(B=gt.clsx(zo.RightAddon,"NoSelect"),e[11]=B):B=e[11];let ee;return e[12]!==R||e[13]!==_||e[14]!==x||e[15]!==Y||e[16]!==W||e[17]!==O||e[18]!==h||e[19]!==a||e[20]!==r?(ee=k.jsx("div",{className:B,children:r?k.jsxs(k.Fragment,{children:[h,"/",x,k.jsx(Gi,{isDisabled:_,onClick:O,children:k.jsx(ho,{className:zo.RightAddonIcon,icon:"ArrowUp",mask:""})}),k.jsx(Gi,{isDisabled:R,onClick:Y,children:k.jsx(ho,{className:zo.RightAddonIcon,icon:"ArrowDown"})})]}):k.jsx(ba,{className:zo.RightAddonIcon,icon:"Search",style:{marginRight:4},tooltip:a["Search(Button)"],type:"Raw",onClick:W})}),e[12]=R,e[13]=_,e[14]=x,e[15]=Y,e[16]=W,e[17]=O,e[18]=h,e[19]=a,e[20]=r,e[21]=ee):ee=e[21],ee},gU=n=>{var Rn;const{pk:e,selectDisabled:t,selectUnused:r,useItems:i,useExpand:o,useSelect:l,useSearch:a,showCheckbox:u,icons:h={noChild:"Folder",collapsed:"FolderCopy",expanded:"FolderOpen"},indents:y,isSelectMulti:x=!1,noSearch:w=!1,isDraggable:_,noSyncSearchSelect:S=!1,actionRef:R,placeholder:I,searchPredicate:O=vU,isDisabled:P,isLoading:Y,ContentRenderer:z=pU,TreeItemRenderer:W=aU,RightStickyAddon:B,TopRightAddon:ee,TreeTopAddon:H,resources:V,maxLength:de,autoFocus:Z,TreeHeaderStyle:te,TreeHeaderClassName:ne,TreeItemStyle:fe,TreeItemClassName:ae,OverflowPadding:j,insertBorder:re,width:he,searchItemClassName:be,searchItemStyle:le,height:J=40,treeItemTooltip:pe,treeItemTooltipDelay:Te,treeItemTooltipDirection:Fe,treeItemTooltipDistance:_e,...Me}=n,De=N.useMemo(()=>({...Nr.ATree,...V}),[V]),Re=N.useCallback((Et,rt)=>!Et||!rt?!1:e!==void 0?Array.isArray(e)?e.every(tn=>Et&&rt&&Et[tn]!==void 0&&rt[tn]!==void 0&&ud.isEqual(Et[tn],rt[tn])):Et&&rt&&Et[e]!==void 0&&rt[e]!==void 0&&ud.isEqual(Et[e],rt[e]):ud.isEqual(Et,rt),[e]),Le=N.useRef(null),[Oe,Ge]=Ho(i,[]),Ve=N.useMemo(()=>Qh.map(Oe,Et=>Et),[Oe]),[Pe,ot]=Ho(o,[]),[Xe,lt]=Ho(l,[]),[Ye,mt]=Ho(a,void 0),bt=N.useCallback(Et=>{if(P||!ot||Pe.some(Ln=>Re(Ln,Et)))return;const rt=[];let tn=Et;for(;tn;){const Ln=tn;Pe.find(mr=>Re(mr,Ln))||rt.push(Ln),tn=Ve.find(mr=>{var wr;return(wr=mr.children)==null?void 0:wr.some(gn=>Re(gn,Ln))})}ot([...Pe,...rt])},[Pe,P,Re,ot,Ve]),Mt=N.useCallback(()=>{!ot||P||ot([...Ve])},[Ve,P,ot]),Nt=N.useCallback(()=>{!ot||P||ot([])},[ot,P]),_t=N.useCallback(Et=>{!lt||P||r!=null&&r(Et)||(lt([Et]),bt(Et))},[lt,P,r,bt]),rn=N.useCallback(Et=>{if(!mt||P)return;if(!Et||w){mt(void 0),S||lt==null||lt([]);return}const rt=Qh.filter(Oe,Ln=>O(Et,Ln));let tn;if(rt.find(Ln=>(Ye==null?void 0:Ye.item)&&Re(Ln,Ye.item))?tn=Ye==null?void 0:Ye.item:rt.length>0&&(tn=rt[0]),mt({keyword:Et,items:rt,item:tn}),tn&&bt(tn),lt&&!S)if(x)lt(rt);else{const Ln=rt.find(mr=>tn&&Re(mr,tn));lt(Ln?[Ln]:[])}},[Oe,P,Re,O,mt,lt,bt,S,w,x,Ye]),pn=N.useRef(!1);N.useEffect(()=>{pn.current=!0},[Oe]),N.useEffect(()=>{Ye&&pn.current&&(rn(Ye.keyword),pn.current=!1)},[rn,Ye]);const Kt=N.useCallback(()=>{if(!Ye||!mt||P)return;let Et=Ye.items.findIndex(rt=>Ye.item&&Re(rt,Ye.item))-1;Et<0||(mt({...Ye,item:Ye.items[Et]}),bt(Ye.items[Et]),S||_t(Ye.items[Et]))},[Ye,bt,mt,P,_t,Re,S]),dn=N.useCallback(()=>{if(!Ye||!mt||P)return;let Et=Ye.items.findIndex(rt=>Ye.item&&Re(rt,Ye.item))+1;Et>=Ye.items.length||(mt({...Ye,item:Ye.items[Et]}),bt(Ye.items[Et]),S||_t(Ye.items[Et]))},[Ye,bt,P,mt,_t,Re,S]),zt=N.useCallback(()=>{if(!Ye||!mt||P)return;let Et=Ye.items.findIndex(tn=>Ye.item&&Re(tn,Ye.item));if(!S||r!=null&&r(Ye.items[Et])){dn();return}if(Xe.some(tn=>Ye.item&&Re(tn,Ye.item))){let tn=Et+1;const Ln=Ye.items[tn];if(tn>=Ye.items.length)return;mt({...Ye,item:Ln}),_t(Ln)}else _t(Ye.items[Et])},[Ye,mt,P,Xe,S,dn,Re,_t,r]),[wn,$t]=N.useState(!1),vn=N.useCallback(()=>$t(!0),[]),Pt=N.useCallback(()=>$t(!1),[]),Yt=N.useMemo(()=>r?Qh.map(Oe,Et=>Et).filter(Et=>!r(Et)):t?Qh.map(Oe,Et=>Et).filter(Et=>!t(Et)):Qh.map(Oe,Et=>Et),[r,t,Oe]),ct=N.useMemo(()=>!u||!x?!1:Xe.length>0&&Yt.length>Xe.length,[u,x,Xe,Yt]),Tt=N.useMemo(()=>!u||!x?!1:Xe.length>0&&Yt.length===Xe.length,[u,x,Xe,Yt]),It=N.useCallback(()=>{if(!lt||!x||P)return;const Et=Xe.filter(rt=>!(r!=null&&r(rt))&&!(t!=null&&t(rt))&&Yt.some(tn=>Re(tn,rt)));if(Et.length>0)lt(Xe.filter(rt=>!Et.some(tn=>Re(rt,tn))));else{const rt=Yt.filter(tn=>!(r!=null&&r(tn))&&!(t!=null&&t(tn))&&!Xe.some(Ln=>Re(Ln,tn)));rt.length>0&<([...Xe,...rt])}},[x,P,r,t,lt,Xe,Yt,Re]),ye=N.useMemo(()=>{if(!u||!x||P)return"";const Et=Xe.filter(rt=>!(r!=null&&r(rt))&&!(t!=null&&t(rt))&&Yt.some(tn=>Re(tn,rt)));if(Et.length>0)return De["deselect n"](Et.length);{const rt=Yt.filter(tn=>!(r!=null&&r(tn))&&!(t!=null&&t(tn))&&!Xe.some(Ln=>Re(Ln,tn)));return De["select n"](rt.length)}},[r,t,P,De,u,x,Yt,Xe,Re]),[se,He]=N.useState(),We=eH(Ow(o2,{activationConstraint:{distance:8}}),Ow(r2)),pt=N.useRef(new Map),wt=N.useCallback(Et=>{if(!pt.current.has(Et)){const rt=`item_${ud.uniqueId()}`;pt.current.set(Et,rt)}return pt.current.get(Et)},[]),qt=N.useCallback(Et=>Ve.find(rt=>wt(rt)===Et),[Ve,wt]),Jt=N.useCallback(Et=>!se||!se.children?!1:se.children.some(tn=>Re(tn,Et))?!0:se.children.some(tn=>tn.children?Qh.find(tn,Ln=>Re(Ln,Et))!==void 0:!1),[se,Re]),Vt=N.useCallback(Et=>{if(!_||P)return;const rt=qt(Et.active.id);rt&&He(rt)},[_,P,qt]),hn=N.useCallback((Et,rt,tn,Ln)=>{const mr=Et.findIndex(gn=>Ln(gn,rt)),wr=Et.findIndex(gn=>Ln(gn,tn));return mr!==-1&&wr!==-1?xv(Et,mr,wr):Et.map(gn=>{if(!gn.children)return gn;const Dt=gn.children.findIndex(it=>Ln(it,rt)),Se=gn.children.findIndex(it=>Ln(it,tn));return Dt!==-1&&Se!==-1?{...gn,children:xv(gn.children,Dt,Se)}:gn.children?{...gn,children:hn(gn.children,rt,tn,Ln)}:gn})},[]),ln=N.useCallback(Et=>{!_||P||!se||!Et.over||qt(Et.over.id)},[_,P,se,qt]),kn=N.useCallback(Et=>{if(!_||P||!Ge||!se||!Et.over)return;const rt=qt(Et.over.id);if(!rt||Re(se,rt)){He(void 0);return}const tn=hn(Oe,se,rt,Re);Ge(tn),He(void 0)},[_,P,Ge,se,qt,Re,Oe,hn]),Nn=N.useMemo(()=>Oe.map(Et=>wt(Et)),[Oe,wt]);N.useEffect(()=>{var Et;u||(Et=Le.current)==null||Et.scrollTo(0,0)},[u,Le]),N.useEffect(()=>{!x&&Xe.length>1&&(lt==null||lt([Xe[Xe.length-1]]))},[x,lt,Xe]),N.useEffect(()=>{R&&(R.current={expandAll:Mt,collapseAll:Nt})},[R,Mt,Nt]),N.useEffect(()=>{if(!t||!lt)return;const Et=Xe.filter(rt=>!t(rt));Xe.length!==Et.length&<(Et)},[t,Xe,lt]),N.useEffect(()=>{if(!r||!lt)return;const Et=Xe.filter(rt=>!r(rt));Xe.length!==Et.length&<(Et)},[r,Xe,lt]),N.useEffect(()=>{mt&&mt(void 0)},[mt]);const[En,Cn]=N.useState(null),rr=N.useCallback((Et,rt)=>{P||(Et.stopPropagation(),Et.preventDefault(),Cn(rt))},[P]),Bt=N.useCallback((Et,rt)=>{En===null||P||Re(rt,En)&&(Et.stopPropagation(),Et.preventDefault(),Cn(null))},[En,P,Re]),Ut=N.useRef(null),[yn,Ft]=N.useState(!1),[jn,Hn]=N.useState((Rn=Ut.current)==null?void 0:Rn.scrollHeight);return N.useEffect(()=>{if(Pe.length<0)return;const Et=Le.current,rt=Ut.current,tn=Et.clientHeight<rt.clientHeight;Hn(tn?rt.scrollHeight:Et.clientHeight),Ft(tn)},[Pe]),k.jsxs(Gi,{...Me,className:gt.clsx(Me.className,zo.AWrap),isDisabled:P,children:[(!w||ee)&&k.jsxs(bl,{className:gt.clsx(zo.ATreeHeader,ne),style:te,children:[!w&&k.jsx(dU,{autoFocus:Z,initSearch:rn,isDisabled:P,isEqual:Re,isLoading:Y,maxLength:de,resources:De,searchDown:dn,searchEnter:zt,searchResult:Ye,searchUp:Kt}),!w&&ee&&k.jsx(cs,{w:8}),ee]}),(!w||ee||u&&x||_)&&k.jsx(Am,{isLoading:Y&&Oe.length!==0}),(u&&x||_)&&k.jsxs("div",{className:gt.clsx(zo.ATreeBodyHeader,"NoSelect"),children:[u&&k.jsx(x1,{className:zo.CheckBox,isDisabled:P,isIndeterminate:ct,tooltip:ye,useCheck:[+Tt,()=>It()],onMouseOut:Pt,onMouseOver:vn}),De.Items,k.jsx(zg,{}),k.jsxs("div",{className:gt.clsx(zo.ATreeBodyHeaderResources,"NoSelect"),style:{marginRight:yn?8:0},children:[k.jsx("span",{children:u&&De["*Click row for single select"]}),k.jsx("span",{children:_&&De["*Change order to row drag"]})]})]}),H&&k.jsx("div",{className:zo.TreeTopAddon,children:H}),k.jsx("div",{ref:Le,className:gt.clsx(Me.className,zo.AContainer),children:k.jsxs("div",{className:zo.ATree,style:{minWidth:he||"fit-content",marginRight:j&&yn?8:0},children:[k.jsxs("div",{ref:Ut,className:zo.ATreeBody,children:[Oe.length===0?Y?k.jsx(bU,{text:De["Loading Contents..."]}):I:null,k.jsx(iW,{collisionDetection:oH,modifiers:[dW,hW],sensors:We,measuring:{droppable:{strategy:k1.Always}},onDragEnd:kn,onDragOver:ln,onDragStart:Vt,children:k.jsx(mW,{items:Nn,strategy:bW,children:Oe.map(Et=>k.jsx(W,{containerRef:Le,ContentRenderer:z,extIndents:y,getItemId:wt,height:J,hoverdItem:En,icons:h,indents:[],isChildOfDragItem:Jt,isDraggable:_,isDragSrcItem:Re(Et,se),isEqual:Re,isParentCheckHovered:x&&wn,isParentDisabled:P,isSelectMulti:x,item:Et,itemId:wt(Et),resources:De,RightStickyAddon:B,searchItemClassName:be,searchItemStyle:le,selectDisabled:t,selectUnused:r,showCheckbox:u,TreeItemClassName:ae,TreeItemRenderer:W,TreeItemStyle:fe,treeItemTooltip:pe,treeItemTooltipDelay:Te,treeItemTooltipDirection:Fe,treeItemTooltipDistance:_e,useExpand:[Pe,ot],useSearch:[Ye,mt],useSelect:[Xe,lt],onMouseLeave:Bt,onMouseOver:rr},wt(Et)))})})]}),re&&k.jsxs(k.Fragment,{children:[k.jsx("div",{className:zo.CoverBorder}),k.jsx("div",{className:zo.InsertBorder,style:{"--InsertBorder_height":`${J}px`,height:yn?jn:"100%"}})]})]})})]})},pU=n=>{const{item:e}=n,t={};return er.keys(e).forEach(r=>{r!=="children"&&(t[r]=e[r])}),JSON.stringify(t)};function vU(n,e){return er.some(e,(t,r)=>{var i;return(i=er.stringify(r))==null?void 0:i.toLowerCase().includes(n.toLowerCase())})}const bU=n=>{const e=Dn.c(4),{text:t}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=gt.clsx(zo.Loader,"NoSelect"),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=k.jsx(ho,{height:40,icon:"Spinner",style:{height:40},width:40}),e[1]=i):i=e[1];let o;return e[2]!==t?(o=k.jsxs(bl,{className:r,children:[i,k.jsx(X3,{text:t})]}),e[2]=t,e[3]=o):o=e[3],o};var Fb,Vw;function B1(){return Vw||(Vw=1,Fb=TypeError),Fb}const yU={},mU=Object.freeze(Object.defineProperty({__proto__:null,default:yU},Symbol.toStringTag,{value:"Module"})),xU=RE(mU);var Bb,Zw;function Wv(){if(Zw)return Bb;Zw=1;var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=n&&e&&typeof e.get=="function"?e.get:null,r=n&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=i&&o&&typeof o.get=="function"?o.get:null,a=i&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,h=u?WeakMap.prototype.has:null,y=typeof WeakSet=="function"&&WeakSet.prototype,x=y?WeakSet.prototype.has:null,w=typeof WeakRef=="function"&&WeakRef.prototype,_=w?WeakRef.prototype.deref:null,S=Boolean.prototype.valueOf,R=Object.prototype.toString,I=Function.prototype.toString,O=String.prototype.match,P=String.prototype.slice,Y=String.prototype.replace,z=String.prototype.toUpperCase,W=String.prototype.toLowerCase,B=RegExp.prototype.test,ee=Array.prototype.concat,H=Array.prototype.join,V=Array.prototype.slice,de=Math.floor,Z=typeof BigInt=="function"?BigInt.prototype.valueOf:null,te=Object.getOwnPropertySymbols,ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,fe=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ae=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===fe||!0)?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,re=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ye){return ye.__proto__}:null);function he(ye,se){if(ye===1/0||ye===-1/0||ye!==ye||ye&&ye>-1e3&&ye<1e3||B.call(/e/,se))return se;var He=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ye=="number"){var We=ye<0?-de(-ye):de(ye);if(We!==ye){var pt=String(We),wt=P.call(se,pt.length+1);return Y.call(pt,He,"$&_")+"."+Y.call(Y.call(wt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Y.call(se,He,"$&_")}var be=xU,le=be.custom,J=ot(le)?le:null,pe={__proto__:null,double:'"',single:"'"},Te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Bb=function ye(se,He,We,pt){var wt=He||{};if(Ye(wt,"quoteStyle")&&!Ye(pe,wt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ye(wt,"maxStringLength")&&(typeof wt.maxStringLength=="number"?wt.maxStringLength<0&&wt.maxStringLength!==1/0:wt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var qt=Ye(wt,"customInspect")?wt.customInspect:!0;if(typeof qt!="boolean"&&qt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ye(wt,"indent")&&wt.indent!==null&&wt.indent!==" "&&!(parseInt(wt.indent,10)===wt.indent&&wt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ye(wt,"numericSeparator")&&typeof wt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Jt=wt.numericSeparator;if(typeof se>"u")return"undefined";if(se===null)return"null";if(typeof se=="boolean")return se?"true":"false";if(typeof se=="string")return zt(se,wt);if(typeof se=="number"){if(se===0)return 1/0/se>0?"0":"-0";var Vt=String(se);return Jt?he(se,Vt):Vt}if(typeof se=="bigint"){var hn=String(se)+"n";return Jt?he(se,hn):hn}var ln=typeof wt.depth>"u"?5:wt.depth;if(typeof We>"u"&&(We=0),We>=ln&&ln>0&&typeof se=="object")return De(se)?"[Array]":"[Object]";var kn=ct(wt,We);if(typeof pt>"u")pt=[];else if(Mt(pt,se)>=0)return"[Circular]";function Nn(gn,Dt,Se){if(Dt&&(pt=V.call(pt),pt.push(Dt)),Se){var it={depth:wt.depth};return Ye(wt,"quoteStyle")&&(it.quoteStyle=wt.quoteStyle),ye(gn,it,We+1,pt)}return ye(gn,wt,We+1,pt)}if(typeof se=="function"&&!Le(se)){var En=bt(se),Cn=It(se,Nn);return"[Function"+(En?": "+En:" (anonymous)")+"]"+(Cn.length>0?" { "+H.call(Cn,", ")+" }":"")}if(ot(se)){var rr=fe?Y.call(String(se),/^(Symbol\(.*\))_[^)]*$/,"$1"):ne.call(se);return typeof se=="object"&&!fe?$t(rr):rr}if(dn(se)){for(var Bt="<"+W.call(String(se.nodeName)),Ut=se.attributes||[],yn=0;yn<Ut.length;yn++)Bt+=" "+Ut[yn].name+"="+Fe(_e(Ut[yn].value),"double",wt);return Bt+=">",se.childNodes&&se.childNodes.length&&(Bt+="..."),Bt+="</"+W.call(String(se.nodeName))+">",Bt}if(De(se)){if(se.length===0)return"[]";var Ft=It(se,Nn);return kn&&!Yt(Ft)?"["+Tt(Ft,kn)+"]":"[ "+H.call(Ft,", ")+" ]"}if(Oe(se)){var jn=It(se,Nn);return!("cause"in Error.prototype)&&"cause"in se&&!j.call(se,"cause")?"{ ["+String(se)+"] "+H.call(ee.call("[cause]: "+Nn(se.cause),jn),", ")+" }":jn.length===0?"["+String(se)+"]":"{ ["+String(se)+"] "+H.call(jn,", ")+" }"}if(typeof se=="object"&&qt){if(J&&typeof se[J]=="function"&&be)return be(se,{depth:ln-We});if(qt!=="symbol"&&typeof se.inspect=="function")return se.inspect()}if(Nt(se)){var Hn=[];return r&&r.call(se,function(gn,Dt){Hn.push(Nn(Dt,se,!0)+" => "+Nn(gn,se))}),Pt("Map",t.call(se),Hn,kn)}if(pn(se)){var Rn=[];return a&&a.call(se,function(gn){Rn.push(Nn(gn,se))}),Pt("Set",l.call(se),Rn,kn)}if(_t(se))return vn("WeakMap");if(Kt(se))return vn("WeakSet");if(rn(se))return vn("WeakRef");if(Ve(se))return $t(Nn(Number(se)));if(Xe(se))return $t(Nn(Z.call(se)));if(Pe(se))return $t(S.call(se));if(Ge(se))return $t(Nn(String(se)));if(typeof window<"u"&&se===window)return"{ [object Window] }";if(typeof globalThis<"u"&&se===globalThis||typeof jd<"u"&&se===jd)return"{ [object globalThis] }";if(!Re(se)&&!Le(se)){var Et=It(se,Nn),rt=re?re(se)===Object.prototype:se instanceof Object||se.constructor===Object,tn=se instanceof Object?"":"null prototype",Ln=!rt&&ae&&Object(se)===se&&ae in se?P.call(mt(se),8,-1):tn?"Object":"",mr=rt||typeof se.constructor!="function"?"":se.constructor.name?se.constructor.name+" ":"",wr=mr+(Ln||tn?"["+H.call(ee.call([],Ln||[],tn||[]),": ")+"] ":"");return Et.length===0?wr+"{}":kn?wr+"{"+Tt(Et,kn)+"}":wr+"{ "+H.call(Et,", ")+" }"}return String(se)};function Fe(ye,se,He){var We=He.quoteStyle||se,pt=pe[We];return pt+ye+pt}function _e(ye){return Y.call(String(ye),/"/g,""")}function Me(ye){return!ae||!(typeof ye=="object"&&(ae in ye||typeof ye[ae]<"u"))}function De(ye){return mt(ye)==="[object Array]"&&Me(ye)}function Re(ye){return mt(ye)==="[object Date]"&&Me(ye)}function Le(ye){return mt(ye)==="[object RegExp]"&&Me(ye)}function Oe(ye){return mt(ye)==="[object Error]"&&Me(ye)}function Ge(ye){return mt(ye)==="[object String]"&&Me(ye)}function Ve(ye){return mt(ye)==="[object Number]"&&Me(ye)}function Pe(ye){return mt(ye)==="[object Boolean]"&&Me(ye)}function ot(ye){if(fe)return ye&&typeof ye=="object"&&ye instanceof Symbol;if(typeof ye=="symbol")return!0;if(!ye||typeof ye!="object"||!ne)return!1;try{return ne.call(ye),!0}catch{}return!1}function Xe(ye){if(!ye||typeof ye!="object"||!Z)return!1;try{return Z.call(ye),!0}catch{}return!1}var lt=Object.prototype.hasOwnProperty||function(ye){return ye in this};function Ye(ye,se){return lt.call(ye,se)}function mt(ye){return R.call(ye)}function bt(ye){if(ye.name)return ye.name;var se=O.call(I.call(ye),/^function\s*([\w$]+)/);return se?se[1]:null}function Mt(ye,se){if(ye.indexOf)return ye.indexOf(se);for(var He=0,We=ye.length;He<We;He++)if(ye[He]===se)return He;return-1}function Nt(ye){if(!t||!ye||typeof ye!="object")return!1;try{t.call(ye);try{l.call(ye)}catch{return!0}return ye instanceof Map}catch{}return!1}function _t(ye){if(!h||!ye||typeof ye!="object")return!1;try{h.call(ye,h);try{x.call(ye,x)}catch{return!0}return ye instanceof WeakMap}catch{}return!1}function rn(ye){if(!_||!ye||typeof ye!="object")return!1;try{return _.call(ye),!0}catch{}return!1}function pn(ye){if(!l||!ye||typeof ye!="object")return!1;try{l.call(ye);try{t.call(ye)}catch{return!0}return ye instanceof Set}catch{}return!1}function Kt(ye){if(!x||!ye||typeof ye!="object")return!1;try{x.call(ye,x);try{h.call(ye,h)}catch{return!0}return ye instanceof WeakSet}catch{}return!1}function dn(ye){return!ye||typeof ye!="object"?!1:typeof HTMLElement<"u"&&ye instanceof HTMLElement?!0:typeof ye.nodeName=="string"&&typeof ye.getAttribute=="function"}function zt(ye,se){if(ye.length>se.maxStringLength){var He=ye.length-se.maxStringLength,We="... "+He+" more character"+(He>1?"s":"");return zt(P.call(ye,0,se.maxStringLength),se)+We}var pt=Te[se.quoteStyle||"single"];pt.lastIndex=0;var wt=Y.call(Y.call(ye,pt,"\\$1"),/[\x00-\x1f]/g,wn);return Fe(wt,"single",se)}function wn(ye){var se=ye.charCodeAt(0),He={8:"b",9:"t",10:"n",12:"f",13:"r"}[se];return He?"\\"+He:"\\x"+(se<16?"0":"")+z.call(se.toString(16))}function $t(ye){return"Object("+ye+")"}function vn(ye){return ye+" { ? }"}function Pt(ye,se,He,We){var pt=We?Tt(He,We):H.call(He,", ");return ye+" ("+se+") {"+pt+"}"}function Yt(ye){for(var se=0;se<ye.length;se++)if(Mt(ye[se],`
|
|
484
|
+
`},nH={onDragStart(n){let{active:e}=n;return"Picked up draggable item "+e.id+"."},onDragOver(n){let{active:e,over:t}=n;return t?"Draggable item "+e.id+" was moved over droppable area "+t.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(n){let{active:e,over:t}=n;return t?"Draggable item "+e.id+" was dropped over droppable area "+t.id:"Draggable item "+e.id+" was dropped."},onDragCancel(n){let{active:e}=n;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function rH(n){let{announcements:e=nH,container:t,hiddenTextDescribedById:r,screenReaderInstructions:i=tH}=n;const{announce:o,announcement:l}=jz(),a=Jp("DndLiveRegion"),[u,h]=N.useState(!1);if(N.useEffect(()=>{h(!0)},[]),$z(N.useMemo(()=>({onDragStart(x){let{active:w}=x;o(e.onDragStart({active:w}))},onDragMove(x){let{active:w,over:_}=x;e.onDragMove&&o(e.onDragMove({active:w,over:_}))},onDragOver(x){let{active:w,over:_}=x;o(e.onDragOver({active:w,over:_}))},onDragEnd(x){let{active:w,over:_}=x;o(e.onDragEnd({active:w,over:_}))},onDragCancel(x){let{active:w,over:_}=x;o(e.onDragCancel({active:w,over:_}))}}),[o,e])),!u)return null;const y=N.createElement(N.Fragment,null,N.createElement(Qz,{id:r,value:i.draggable}),N.createElement(qz,{id:a,announcement:l}));return t?su.createPortal(y,t):y}var za;(function(n){n.DragStart="dragStart",n.DragMove="dragMove",n.DragEnd="dragEnd",n.DragCancel="dragCancel",n.DragOver="dragOver",n.RegisterDroppable="registerDroppable",n.SetDroppableDisabled="setDroppableDisabled",n.UnregisterDroppable="unregisterDroppable"})(za||(za={}));function yv(){}function Ow(n,e){return N.useMemo(()=>({sensor:n,options:e??{}}),[n,e])}function iH(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return N.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const Bd=Object.freeze({x:0,y:0});function oH(n,e){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function lH(n,e){let{data:{value:t}}=n,{data:{value:r}}=e;return t-r}function sH(n,e){let{data:{value:t}}=n,{data:{value:r}}=e;return r-t}function aH(n,e){if(!n||n.length===0)return null;const[t]=n;return t[e]}function Pw(n,e,t){return e===void 0&&(e=n.left),t===void 0&&(t=n.top),{x:e+n.width*.5,y:t+n.height*.5}}const cH=n=>{let{collisionRect:e,droppableRects:t,droppableContainers:r}=n;const i=Pw(e,e.left,e.top),o=[];for(const l of r){const{id:a}=l,u=t.get(a);if(u){const h=oH(Pw(u),i);o.push({id:a,data:{droppableContainer:l,value:h}})}}return o.sort(lH)};function uH(n,e){const t=Math.max(e.top,n.top),r=Math.max(e.left,n.left),i=Math.min(e.left+e.width,n.left+n.width),o=Math.min(e.top+e.height,n.top+n.height),l=i-r,a=o-t;if(r<i&&t<o){const u=e.width*e.height,h=n.width*n.height,y=l*a,x=y/(u+h-y);return Number(x.toFixed(4))}return 0}const fH=n=>{let{collisionRect:e,droppableRects:t,droppableContainers:r}=n;const i=[];for(const o of r){const{id:l}=o,a=t.get(l);if(a){const u=uH(a,e);u>0&&i.push({id:l,data:{droppableContainer:o,value:u}})}}return i.sort(sH)};function dH(n,e,t){return{...n,scaleX:e&&t?e.width/t.width:1,scaleY:e&&t?e.height/t.height:1}}function O4(n,e){return n&&e?{x:n.left-e.left,y:n.top-e.top}:Bd}function hH(n){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((l,a)=>({...l,top:l.top+n*a.y,bottom:l.bottom+n*a.y,left:l.left+n*a.x,right:l.right+n*a.x}),{...t})}}const gH=hH(1);function pH(n){if(n.startsWith("matrix3d(")){const e=n.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(n.startsWith("matrix(")){const e=n.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function vH(n,e,t){const r=pH(e);if(!r)return n;const{scaleX:i,scaleY:o,x:l,y:a}=r,u=n.left-l-(1-i)*parseFloat(t),h=n.top-a-(1-o)*parseFloat(t.slice(t.indexOf(" ")+1)),y=i?n.width/i:n.width,x=o?n.height/o:n.height;return{width:y,height:x,top:h,right:u+y,bottom:h+x,left:u}}const bH={ignoreTransform:!1};function F1(n,e){e===void 0&&(e=bH);let t=n.getBoundingClientRect();if(e.ignoreTransform){const{transform:h,transformOrigin:y}=cf(n).getComputedStyle(n);h&&(t=vH(t,h,y))}const{top:r,left:i,width:o,height:l,bottom:a,right:u}=t;return{top:r,left:i,width:o,height:l,bottom:a,right:u}}function Dw(n){return F1(n,{ignoreTransform:!0})}function yH(n){const e=n.innerWidth,t=n.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function mH(n,e){return e===void 0&&(e=cf(n).getComputedStyle(n)),e.position==="fixed"}function xH(n,e){e===void 0&&(e=cf(n).getComputedStyle(n));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=e[i];return typeof o=="string"?t.test(o):!1})}function t2(n,e){const t=[];function r(i){if(e!=null&&t.length>=e||!i)return t;if(jm(i)&&i.scrollingElement!=null&&!t.includes(i.scrollingElement))return t.push(i.scrollingElement),t;if(!Xp(i)||k4(i)||t.includes(i))return t;const o=cf(n).getComputedStyle(i);return i!==n&&xH(i,o)&&t.push(i),mH(i,o)?t:r(i.parentNode)}return n?r(n):t}function P4(n){const[e]=t2(n,1);return e??null}function Pb(n){return!Bv||!n?null:D1(n)?n:qm(n)?jm(n)||n===N1(n).scrollingElement?window:Xp(n)?n:null:null}function D4(n){return D1(n)?n.scrollX:n.scrollLeft}function N4(n){return D1(n)?n.scrollY:n.scrollTop}function fm(n){return{x:D4(n),y:N4(n)}}var lc;(function(n){n[n.Forward=1]="Forward",n[n.Backward=-1]="Backward"})(lc||(lc={}));function F4(n){return!Bv||!n?!1:n===document.scrollingElement}function B4(n){const e={x:0,y:0},t=F4(n)?{height:window.innerHeight,width:window.innerWidth}:{height:n.clientHeight,width:n.clientWidth},r={x:n.scrollWidth-t.width,y:n.scrollHeight-t.height},i=n.scrollTop<=e.y,o=n.scrollLeft<=e.x,l=n.scrollTop>=r.y,a=n.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:l,isRight:a,maxScroll:r,minScroll:e}}const wH={x:.2,y:.2};function CH(n,e,t,r,i){let{top:o,left:l,right:a,bottom:u}=t;r===void 0&&(r=10),i===void 0&&(i=wH);const{isTop:h,isBottom:y,isLeft:x,isRight:w}=B4(n),_={x:0,y:0},S={x:0,y:0},R={height:e.height*i.y,width:e.width*i.x};return!h&&o<=e.top+R.height?(_.y=lc.Backward,S.y=r*Math.abs((e.top+R.height-o)/R.height)):!y&&u>=e.bottom-R.height&&(_.y=lc.Forward,S.y=r*Math.abs((e.bottom-R.height-u)/R.height)),!w&&a>=e.right-R.width?(_.x=lc.Forward,S.x=r*Math.abs((e.right-R.width-a)/R.width)):!x&&l<=e.left+R.width&&(_.x=lc.Backward,S.x=r*Math.abs((e.left+R.width-l)/R.width)),{direction:_,speed:S}}function _H(n){if(n===document.scrollingElement){const{innerWidth:o,innerHeight:l}=window;return{top:0,left:0,right:o,bottom:l,width:o,height:l}}const{top:e,left:t,right:r,bottom:i}=n.getBoundingClientRect();return{top:e,left:t,right:r,bottom:i,width:n.clientWidth,height:n.clientHeight}}function z4(n){return n.reduce((e,t)=>y1(e,fm(t)),Bd)}function SH(n){return n.reduce((e,t)=>e+D4(t),0)}function EH(n){return n.reduce((e,t)=>e+N4(t),0)}function AH(n,e){if(e===void 0&&(e=F1),!n)return;const{top:t,left:r,bottom:i,right:o}=e(n);P4(n)&&(i<=0||o<=0||t>=window.innerHeight||r>=window.innerWidth)&&n.scrollIntoView({block:"center",inline:"center"})}const TH=[["x",["left","right"],SH],["y",["top","bottom"],EH]];class n2{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=t2(t),i=z4(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,l,a]of TH)for(const u of l)Object.defineProperty(this,u,{get:()=>{const h=a(r),y=i[o]-h;return this.rect[u]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class mp{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...t)})},this.target=e}add(e,t,r){var i;(i=this.target)==null||i.addEventListener(e,t,r),this.listeners.push([e,t,r])}}function RH(n){const{EventTarget:e}=cf(n);return n instanceof e?n:N1(n)}function Db(n,e){const t=Math.abs(n.x),r=Math.abs(n.y);return typeof e=="number"?Math.sqrt(t**2+r**2)>e:"x"in e&&"y"in e?t>e.x&&r>e.y:"x"in e?t>e.x:"y"in e?r>e.y:!1}var fd;(function(n){n.Click="click",n.DragStart="dragstart",n.Keydown="keydown",n.ContextMenu="contextmenu",n.Resize="resize",n.SelectionChange="selectionchange",n.VisibilityChange="visibilitychange"})(fd||(fd={}));function Nw(n){n.preventDefault()}function IH(n){n.stopPropagation()}var Ao;(function(n){n.Space="Space",n.Down="ArrowDown",n.Right="ArrowRight",n.Left="ArrowLeft",n.Up="ArrowUp",n.Esc="Escape",n.Enter="Enter",n.Tab="Tab"})(Ao||(Ao={}));const H4={start:[Ao.Space,Ao.Enter],cancel:[Ao.Esc],end:[Ao.Space,Ao.Enter,Ao.Tab]},kH=(n,e)=>{let{currentCoordinates:t}=e;switch(n.code){case Ao.Right:return{...t,x:t.x+25};case Ao.Left:return{...t,x:t.x-25};case Ao.Down:return{...t,y:t.y+25};case Ao.Up:return{...t,y:t.y-25}}};class r2{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new mp(N1(t)),this.windowListeners=new mp(cf(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fd.Resize,this.handleCancel),this.windowListeners.add(fd.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fd.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,r=e.node.current;r&&AH(r),t(Bd)}handleKeyDown(e){if(e2(e)){const{active:t,context:r,options:i}=this.props,{keyboardCodes:o=H4,coordinateGetter:l=kH,scrollBehavior:a="smooth"}=i,{code:u}=e;if(o.end.includes(u)){this.handleEnd(e);return}if(o.cancel.includes(u)){this.handleCancel(e);return}const{collisionRect:h}=r.current,y=h?{x:h.left,y:h.top}:Bd;this.referenceCoordinates||(this.referenceCoordinates=y);const x=l(e,{active:t,context:r.current,currentCoordinates:y});if(x){const w=bv(x,y),_={x:0,y:0},{scrollableAncestors:S}=r.current;for(const R of S){const I=e.code,{isTop:O,isRight:P,isLeft:Y,isBottom:z,maxScroll:W,minScroll:B}=B4(R),ee=_H(R),H={x:Math.min(I===Ao.Right?ee.right-ee.width/2:ee.right,Math.max(I===Ao.Right?ee.left:ee.left+ee.width/2,x.x)),y:Math.min(I===Ao.Down?ee.bottom-ee.height/2:ee.bottom,Math.max(I===Ao.Down?ee.top:ee.top+ee.height/2,x.y))},V=I===Ao.Right&&!P||I===Ao.Left&&!Y,de=I===Ao.Down&&!z||I===Ao.Up&&!O;if(V&&H.x!==x.x){const Z=R.scrollLeft+w.x,te=I===Ao.Right&&Z<=W.x||I===Ao.Left&&Z>=B.x;if(te&&!w.y){R.scrollTo({left:Z,behavior:a});return}te?_.x=R.scrollLeft-Z:_.x=I===Ao.Right?R.scrollLeft-W.x:R.scrollLeft-B.x,_.x&&R.scrollBy({left:-_.x,behavior:a});break}else if(de&&H.y!==x.y){const Z=R.scrollTop+w.y,te=I===Ao.Down&&Z<=W.y||I===Ao.Up&&Z>=B.y;if(te&&!w.x){R.scrollTo({top:Z,behavior:a});return}te?_.y=R.scrollTop-Z:_.y=I===Ao.Down?R.scrollTop-W.y:R.scrollTop-B.y,_.y&&R.scrollBy({top:-_.y,behavior:a});break}}this.handleMove(e,y1(bv(x,this.referenceCoordinates),_))}}}handleMove(e,t){const{onMove:r}=this.props;e.preventDefault(),r(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}r2.activators=[{eventName:"onKeyDown",handler:(n,e,t)=>{let{keyboardCodes:r=H4,onActivation:i}=e,{active:o}=t;const{code:l}=n.nativeEvent;if(r.start.includes(l)){const a=o.activatorNode.current;return a&&n.target!==a?!1:(n.preventDefault(),i==null||i({event:n.nativeEvent}),!0)}return!1}}];function Fw(n){return!!(n&&"distance"in n)}function Bw(n){return!!(n&&"delay"in n)}class i2{constructor(e,t,r){var i;r===void 0&&(r=RH(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:l}=o;this.props=e,this.events=t,this.document=N1(l),this.documentListeners=new mp(this.document),this.listeners=new mp(r),this.windowListeners=new mp(cf(l)),this.initialCoordinates=(i=um(o))!=null?i:Bd,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(fd.Resize,this.handleCancel),this.windowListeners.add(fd.DragStart,Nw),this.windowListeners.add(fd.VisibilityChange,this.handleCancel),this.windowListeners.add(fd.ContextMenu,Nw),this.documentListeners.add(fd.Keydown,this.handleKeydown),t){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bw(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Fw(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:r,onPending:i}=this.props;i(r,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(fd.Click,IH,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fd.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:l,options:{activationConstraint:a}}=o;if(!i)return;const u=(t=um(e))!=null?t:Bd,h=bv(i,u);if(!r&&a){if(Fw(a)){if(a.tolerance!=null&&Db(h,a.tolerance))return this.handleCancel();if(Db(h,a.distance))return this.handleStart()}if(Bw(a)&&Db(h,a.tolerance))return this.handleCancel();this.handlePending(a,h);return}e.cancelable&&e.preventDefault(),l(u)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Ao.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const MH={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class o2 extends i2{constructor(e){const{event:t}=e,r=N1(t.target);super(e,MH,r)}}o2.activators=[{eventName:"onPointerDown",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:r}=e;return!t.isPrimary||t.button!==0?!1:(r==null||r({event:t}),!0)}}];const LH={move:{name:"mousemove"},end:{name:"mouseup"}};var dm;(function(n){n[n.RightClick=2]="RightClick"})(dm||(dm={}));class OH extends i2{constructor(e){super(e,LH,N1(e.event.target))}}OH.activators=[{eventName:"onMouseDown",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:r}=e;return t.button===dm.RightClick?!1:(r==null||r({event:t}),!0)}}];const Nb={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class PH extends i2{constructor(e){super(e,Nb)}static setup(){return window.addEventListener(Nb.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Nb.move.name,e)};function e(){}}}PH.activators=[{eventName:"onTouchStart",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:r}=e;const{touches:i}=t;return i.length>1?!1:(r==null||r({event:t}),!0)}}];var xp;(function(n){n[n.Pointer=0]="Pointer",n[n.DraggableRect=1]="DraggableRect"})(xp||(xp={}));var mv;(function(n){n[n.TreeOrder=0]="TreeOrder",n[n.ReversedTreeOrder=1]="ReversedTreeOrder"})(mv||(mv={}));function DH(n){let{acceleration:e,activator:t=xp.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:l=5,order:a=mv.TreeOrder,pointerCoordinates:u,scrollableAncestors:h,scrollableAncestorRects:y,delta:x,threshold:w}=n;const _=FH({delta:x,disabled:!o}),[S,R]=Vz(),I=N.useRef({x:0,y:0}),O=N.useRef({x:0,y:0}),P=N.useMemo(()=>{switch(t){case xp.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case xp.DraggableRect:return i}},[t,i,u]),Y=N.useRef(null),z=N.useCallback(()=>{const B=Y.current;if(!B)return;const ee=I.current.x*O.current.x,H=I.current.y*O.current.y;B.scrollBy(ee,H)},[]),W=N.useMemo(()=>a===mv.TreeOrder?[...h].reverse():h,[a,h]);N.useEffect(()=>{if(!o||!h.length||!P){R();return}for(const B of W){if((r==null?void 0:r(B))===!1)continue;const ee=h.indexOf(B),H=y[ee];if(!H)continue;const{direction:V,speed:de}=CH(B,H,P,e,w);for(const Z of["x","y"])_[Z][V[Z]]||(de[Z]=0,V[Z]=0);if(de.x>0||de.y>0){R(),Y.current=B,S(z,l),I.current=de,O.current=V;return}}I.current={x:0,y:0},O.current={x:0,y:0},R()},[e,z,r,R,o,l,JSON.stringify(P),JSON.stringify(_),S,h,W,y,JSON.stringify(w)])}const NH={x:{[lc.Backward]:!1,[lc.Forward]:!1},y:{[lc.Backward]:!1,[lc.Forward]:!1}};function FH(n){let{delta:e,disabled:t}=n;const r=cm(e);return Kp(i=>{if(t||!r||!i)return NH;const o={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[lc.Backward]:i.x[lc.Backward]||o.x===-1,[lc.Forward]:i.x[lc.Forward]||o.x===1},y:{[lc.Backward]:i.y[lc.Backward]||o.y===-1,[lc.Forward]:i.y[lc.Forward]||o.y===1}}},[t,e,r])}function BH(n,e){const t=e!=null?n.get(e):void 0,r=t?t.node.current:null;return Kp(i=>{var o;return e==null?null:(o=r??i)!=null?o:null},[r,e])}function zH(n,e){return N.useMemo(()=>n.reduce((t,r)=>{const{sensor:i}=r,o=i.activators.map(l=>({eventName:l.eventName,handler:e(l.handler,r)}));return[...t,...o]},[]),[n,e])}var k1;(function(n){n[n.Always=0]="Always",n[n.BeforeDragging=1]="BeforeDragging",n[n.WhileDragging=2]="WhileDragging"})(k1||(k1={}));var hm;(function(n){n.Optimized="optimized"})(hm||(hm={}));const zw=new Map;function HH(n,e){let{dragging:t,dependencies:r,config:i}=e;const[o,l]=N.useState(null),{frequency:a,measure:u,strategy:h}=i,y=N.useRef(n),x=I(),w=Bp(x),_=N.useCallback(function(O){O===void 0&&(O=[]),!w.current&&l(P=>P===null?O:P.concat(O.filter(Y=>!P.includes(Y))))},[w]),S=N.useRef(null),R=Kp(O=>{if(x&&!t)return zw;if(!O||O===zw||y.current!==n||o!=null){const P=new Map;for(let Y of n){if(!Y)continue;if(o&&o.length>0&&!o.includes(Y.id)&&Y.rect.current){P.set(Y.id,Y.rect.current);continue}const z=Y.node.current,W=z?new n2(u(z),z):null;Y.rect.current=W,W&&P.set(Y.id,W)}return P}return O},[n,o,t,x,u]);return N.useEffect(()=>{y.current=n},[n]),N.useEffect(()=>{x||_()},[t,x]),N.useEffect(()=>{o&&o.length>0&&l(null)},[JSON.stringify(o)]),N.useEffect(()=>{x||typeof a!="number"||S.current!==null||(S.current=setTimeout(()=>{_(),S.current=null},a))},[a,x,_,...r]),{droppableRects:R,measureDroppableContainers:_,measuringScheduled:o!=null};function I(){switch(h){case k1.Always:return!1;case k1.BeforeDragging:return t;default:return!t}}}function W4(n,e){return Kp(t=>n?t||(typeof e=="function"?e(n):n):null,[e,n])}function WH(n,e){return W4(n,e)}function UH(n){let{callback:e,disabled:t}=n;const r=$m(e),i=N.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,t]);return N.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function zv(n){let{callback:e,disabled:t}=n;const r=$m(e),i=N.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[t]);return N.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function GH(n){return new n2(F1(n),n)}function Hw(n,e,t){e===void 0&&(e=GH);const[r,i]=N.useState(null);function o(){i(u=>{if(!n)return null;if(n.isConnected===!1){var h;return(h=u??t)!=null?h:null}const y=e(n);return JSON.stringify(u)===JSON.stringify(y)?u:y})}const l=UH({callback(u){if(n)for(const h of u){const{type:y,target:x}=h;if(y==="childList"&&x instanceof HTMLElement&&x.contains(n)){o();break}}}}),a=zv({callback:o});return lh(()=>{o(),n?(a==null||a.observe(n),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),l==null||l.disconnect())},[n]),r}function YH(n){const e=W4(n);return O4(n,e)}const Ww=[];function VH(n){const e=N.useRef(n),t=Kp(r=>n?r&&r!==Ww&&n&&e.current&&n.parentNode===e.current.parentNode?r:t2(n):Ww,[n]);return N.useEffect(()=>{e.current=n},[n]),t}function ZH(n){const[e,t]=N.useState(null),r=N.useRef(n),i=N.useCallback(o=>{const l=Pb(o.target);l&&t(a=>a?(a.set(l,fm(l)),new Map(a)):null)},[]);return N.useEffect(()=>{const o=r.current;if(n!==o){l(o);const a=n.map(u=>{const h=Pb(u);return h?(h.addEventListener("scroll",i,{passive:!0}),[h,fm(h)]):null}).filter(u=>u!=null);t(a.length?new Map(a):null),r.current=n}return()=>{l(n),l(o)};function l(a){a.forEach(u=>{const h=Pb(u);h==null||h.removeEventListener("scroll",i)})}},[i,n]),N.useMemo(()=>n.length?e?Array.from(e.values()).reduce((o,l)=>y1(o,l),Bd):z4(n):Bd,[n,e])}function Uw(n,e){e===void 0&&(e=[]);const t=N.useRef(null);return N.useEffect(()=>{t.current=null},e),N.useEffect(()=>{const r=n!==Bd;r&&!t.current&&(t.current=n),!r&&t.current&&(t.current=null)},[n]),t.current?bv(n,t.current):Bd}function XH(n){N.useEffect(()=>{if(!Bv)return;const e=n.map(t=>{let{sensor:r}=t;return r.setup==null?void 0:r.setup()});return()=>{for(const t of e)t==null||t()}},n.map(e=>{let{sensor:t}=e;return t}))}function KH(n,e){return N.useMemo(()=>n.reduce((t,r)=>{let{eventName:i,handler:o}=r;return t[i]=l=>{o(l,e)},t},{}),[n,e])}function U4(n){return N.useMemo(()=>n?yH(n):null,[n])}const Gw=[];function JH(n,e){e===void 0&&(e=F1);const[t]=n,r=U4(t?cf(t):null),[i,o]=N.useState(Gw);function l(){o(()=>n.length?n.map(u=>F4(u)?r:new n2(e(u),u)):Gw)}const a=zv({callback:l});return lh(()=>{a==null||a.disconnect(),l(),n.forEach(u=>a==null?void 0:a.observe(u))},[n]),i}function QH(n){if(!n)return null;if(n.children.length>1)return n;const e=n.children[0];return Xp(e)?e:n}function qH(n){let{measure:e}=n;const[t,r]=N.useState(null),i=N.useCallback(h=>{for(const{target:y}of h)if(Xp(y)){r(x=>{const w=e(y);return x?{...x,width:w.width,height:w.height}:w});break}},[e]),o=zv({callback:i}),l=N.useCallback(h=>{const y=QH(h);o==null||o.disconnect(),y&&(o==null||o.observe(y)),r(y?e(y):null)},[e,o]),[a,u]=vv(l);return N.useMemo(()=>({nodeRef:a,rect:t,setRef:u}),[t,a,u])}const jH=[{sensor:o2,options:{}},{sensor:r2,options:{}}],$H={current:{}},q0={draggable:{measure:Dw},droppable:{measure:Dw,strategy:k1.WhileDragging,frequency:hm.Optimized},dragOverlay:{measure:F1}};class wp extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,r;return(t=(r=this.get(e))==null?void 0:r.node.current)!=null?t:void 0}}const eW={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new wp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:yv},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:q0,measureDroppableContainers:yv,windowRect:null,measuringScheduled:!1},tW={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:yv,draggableNodes:new Map,over:null,measureDroppableContainers:yv},Hv=N.createContext(tW),G4=N.createContext(eW);function nW(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new wp}}}function rW(n,e){switch(e.type){case za.DragStart:return{...n,draggable:{...n.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case za.DragMove:return n.draggable.active==null?n:{...n,draggable:{...n.draggable,translate:{x:e.coordinates.x-n.draggable.initialCoordinates.x,y:e.coordinates.y-n.draggable.initialCoordinates.y}}};case za.DragEnd:case za.DragCancel:return{...n,draggable:{...n.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case za.RegisterDroppable:{const{element:t}=e,{id:r}=t,i=new wp(n.droppable.containers);return i.set(r,t),{...n,droppable:{...n.droppable,containers:i}}}case za.SetDroppableDisabled:{const{id:t,key:r,disabled:i}=e,o=n.droppable.containers.get(t);if(!o||r!==o.key)return n;const l=new wp(n.droppable.containers);return l.set(t,{...o,disabled:i}),{...n,droppable:{...n.droppable,containers:l}}}case za.UnregisterDroppable:{const{id:t,key:r}=e,i=n.droppable.containers.get(t);if(!i||r!==i.key)return n;const o=new wp(n.droppable.containers);return o.delete(t),{...n,droppable:{...n.droppable,containers:o}}}default:return n}}function iW(n){let{disabled:e}=n;const{active:t,activatorEvent:r,draggableNodes:i}=N.useContext(Hv),o=cm(r),l=cm(t==null?void 0:t.id);return N.useEffect(()=>{if(!e&&!r&&o&&l!=null){if(!e2(o)||document.activeElement===o.target)return;const a=i.get(l);if(!a)return;const{activatorNode:u,node:h}=a;if(!u.current&&!h.current)return;requestAnimationFrame(()=>{for(const y of[u.current,h.current]){if(!y)continue;const x=Kz(y);if(x){x.focus();break}}})}},[r,e,i,l,o]),null}function oW(n,e){let{transform:t,...r}=e;return n!=null&&n.length?n.reduce((i,o)=>o({transform:i,...r}),t):t}function lW(n){return N.useMemo(()=>({draggable:{...q0.draggable,...n==null?void 0:n.draggable},droppable:{...q0.droppable,...n==null?void 0:n.droppable},dragOverlay:{...q0.dragOverlay,...n==null?void 0:n.dragOverlay}}),[n==null?void 0:n.draggable,n==null?void 0:n.droppable,n==null?void 0:n.dragOverlay])}function sW(n){let{activeNode:e,measure:t,initialRect:r,config:i=!0}=n;const o=N.useRef(!1),{x:l,y:a}=typeof i=="boolean"?{x:i,y:i}:i;lh(()=>{if(!l&&!a||!e){o.current=!1;return}if(o.current||!r)return;const h=e==null?void 0:e.node.current;if(!h||h.isConnected===!1)return;const y=t(h),x=O4(y,r);if(l||(x.x=0),a||(x.y=0),o.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const w=P4(h);w&&w.scrollBy({top:x.y,left:x.x})}},[e,l,a,r,t])}const Y4=N.createContext({...Bd,scaleX:1,scaleY:1});var Jh;(function(n){n[n.Uninitialized=0]="Uninitialized",n[n.Initializing=1]="Initializing",n[n.Initialized=2]="Initialized"})(Jh||(Jh={}));const aW=N.memo(function(e){var t,r,i,o;let{id:l,accessibility:a,autoScroll:u=!0,children:h,sensors:y=jH,collisionDetection:x=fH,measuring:w,modifiers:_,...S}=e;const R=N.useReducer(rW,void 0,nW),[I,O]=R,[P,Y]=eH(),[z,W]=N.useState(Jh.Uninitialized),B=z===Jh.Initialized,{draggable:{active:ee,nodes:H,translate:V},droppable:{containers:de}}=I,Z=ee!=null?H.get(ee):null,te=N.useRef({initial:null,translated:null}),ne=N.useMemo(()=>{var qt;return ee!=null?{id:ee,data:(qt=Z==null?void 0:Z.data)!=null?qt:$H,rect:te}:null},[ee,Z]),fe=N.useRef(null),[ae,j]=N.useState(null),[re,he]=N.useState(null),be=Bp(S,Object.values(S)),le=Jp("DndDescribedBy",l),J=N.useMemo(()=>de.getEnabled(),[de]),pe=lW(w),{droppableRects:Te,measureDroppableContainers:Fe,measuringScheduled:_e}=HH(J,{dragging:B,dependencies:[V.x,V.y],config:pe.droppable}),Me=BH(H,ee),De=N.useMemo(()=>re?um(re):null,[re]),Re=wt(),Le=WH(Me,pe.draggable.measure);sW({activeNode:ee!=null?H.get(ee):null,config:Re.layoutShiftCompensation,initialRect:Le,measure:pe.draggable.measure});const Oe=Hw(Me,pe.draggable.measure,Le),Ge=Hw(Me?Me.parentElement:null),Ve=N.useRef({activatorEvent:null,active:null,activeNode:Me,collisionRect:null,collisions:null,droppableRects:Te,draggableNodes:H,draggingNode:null,draggingNodeRect:null,droppableContainers:de,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Pe=de.getNodeFor((t=Ve.current.over)==null?void 0:t.id),ot=qH({measure:pe.dragOverlay.measure}),Xe=(r=ot.nodeRef.current)!=null?r:Me,lt=B?(i=ot.rect)!=null?i:Oe:null,Ye=!!(ot.nodeRef.current&&ot.rect),mt=YH(Ye?null:Oe),bt=U4(Xe?cf(Xe):null),Mt=VH(B?Pe??Me:null),Nt=JH(Mt),_t=oW(_,{transform:{x:V.x-mt.x,y:V.y-mt.y,scaleX:1,scaleY:1},activatorEvent:re,active:ne,activeNodeRect:Oe,containerNodeRect:Ge,draggingNodeRect:lt,over:Ve.current.over,overlayNodeRect:ot.rect,scrollableAncestors:Mt,scrollableAncestorRects:Nt,windowRect:bt}),rn=De?y1(De,V):null,pn=ZH(Mt),Kt=Uw(pn),dn=Uw(pn,[Oe]),zt=y1(_t,Kt),wn=lt?gH(lt,_t):null,$t=ne&&wn?x({active:ne,collisionRect:wn,droppableRects:Te,droppableContainers:J,pointerCoordinates:rn}):null,vn=aH($t,"id"),[Pt,Yt]=N.useState(null),ct=Ye?_t:y1(_t,dn),Tt=dH(ct,(o=Pt==null?void 0:Pt.rect)!=null?o:null,Oe),It=N.useRef(null),ye=N.useCallback((qt,Jt)=>{let{sensor:Vt,options:hn}=Jt;if(fe.current==null)return;const ln=H.get(fe.current);if(!ln)return;const kn=qt.nativeEvent,Nn=new Vt({active:fe.current,activeNode:ln,event:kn,options:hn,context:Ve,onAbort(Cn){if(!H.get(Cn))return;const{onDragAbort:Bt}=be.current,Ut={id:Cn};Bt==null||Bt(Ut),P({type:"onDragAbort",event:Ut})},onPending(Cn,rr,Bt,Ut){if(!H.get(Cn))return;const{onDragPending:Ft}=be.current,jn={id:Cn,constraint:rr,initialCoordinates:Bt,offset:Ut};Ft==null||Ft(jn),P({type:"onDragPending",event:jn})},onStart(Cn){const rr=fe.current;if(rr==null)return;const Bt=H.get(rr);if(!Bt)return;const{onDragStart:Ut}=be.current,yn={activatorEvent:kn,active:{id:rr,data:Bt.data,rect:te}};su.unstable_batchedUpdates(()=>{Ut==null||Ut(yn),W(Jh.Initializing),O({type:za.DragStart,initialCoordinates:Cn,active:rr}),P({type:"onDragStart",event:yn}),j(It.current),he(kn)})},onMove(Cn){O({type:za.DragMove,coordinates:Cn})},onEnd:En(za.DragEnd),onCancel:En(za.DragCancel)});It.current=Nn;function En(Cn){return async function(){const{active:Bt,collisions:Ut,over:yn,scrollAdjustedTranslate:Ft}=Ve.current;let jn=null;if(Bt&&Ft){const{cancelDrop:Hn}=be.current;jn={activatorEvent:kn,active:Bt,collisions:Ut,delta:Ft,over:yn},Cn===za.DragEnd&&typeof Hn=="function"&&await Promise.resolve(Hn(jn))&&(Cn=za.DragCancel)}fe.current=null,su.unstable_batchedUpdates(()=>{O({type:Cn}),W(Jh.Uninitialized),Yt(null),j(null),he(null),It.current=null;const Hn=Cn===za.DragEnd?"onDragEnd":"onDragCancel";if(jn){const Rn=be.current[Hn];Rn==null||Rn(jn),P({type:Hn,event:jn})}})}}},[H]),se=N.useCallback((qt,Jt)=>(Vt,hn)=>{const ln=Vt.nativeEvent,kn=H.get(hn);if(fe.current!==null||!kn||ln.dndKit||ln.defaultPrevented)return;const Nn={active:kn};qt(Vt,Jt.options,Nn)===!0&&(ln.dndKit={capturedBy:Jt.sensor},fe.current=hn,ye(Vt,Jt))},[H,ye]),He=zH(y,se);XH(y),lh(()=>{Oe&&z===Jh.Initializing&&W(Jh.Initialized)},[Oe,z]),N.useEffect(()=>{const{onDragMove:qt}=be.current,{active:Jt,activatorEvent:Vt,collisions:hn,over:ln}=Ve.current;if(!Jt||!Vt)return;const kn={active:Jt,activatorEvent:Vt,collisions:hn,delta:{x:zt.x,y:zt.y},over:ln};su.unstable_batchedUpdates(()=>{qt==null||qt(kn),P({type:"onDragMove",event:kn})})},[zt.x,zt.y]),N.useEffect(()=>{const{active:qt,activatorEvent:Jt,collisions:Vt,droppableContainers:hn,scrollAdjustedTranslate:ln}=Ve.current;if(!qt||fe.current==null||!Jt||!ln)return;const{onDragOver:kn}=be.current,Nn=hn.get(vn),En=Nn&&Nn.rect.current?{id:Nn.id,rect:Nn.rect.current,data:Nn.data,disabled:Nn.disabled}:null,Cn={active:qt,activatorEvent:Jt,collisions:Vt,delta:{x:ln.x,y:ln.y},over:En};su.unstable_batchedUpdates(()=>{Yt(En),kn==null||kn(Cn),P({type:"onDragOver",event:Cn})})},[vn]),lh(()=>{Ve.current={activatorEvent:re,active:ne,activeNode:Me,collisionRect:wn,collisions:$t,droppableRects:Te,draggableNodes:H,draggingNode:Xe,draggingNodeRect:lt,droppableContainers:de,over:Pt,scrollableAncestors:Mt,scrollAdjustedTranslate:zt},te.current={initial:lt,translated:wn}},[ne,Me,$t,wn,H,Xe,lt,Te,de,Pt,Mt,zt]),DH({...Re,delta:V,draggingRect:wn,pointerCoordinates:rn,scrollableAncestors:Mt,scrollableAncestorRects:Nt});const We=N.useMemo(()=>({active:ne,activeNode:Me,activeNodeRect:Oe,activatorEvent:re,collisions:$t,containerNodeRect:Ge,dragOverlay:ot,draggableNodes:H,droppableContainers:de,droppableRects:Te,over:Pt,measureDroppableContainers:Fe,scrollableAncestors:Mt,scrollableAncestorRects:Nt,measuringConfiguration:pe,measuringScheduled:_e,windowRect:bt}),[ne,Me,Oe,re,$t,Ge,ot,H,de,Te,Pt,Fe,Mt,Nt,pe,_e,bt]),pt=N.useMemo(()=>({activatorEvent:re,activators:He,active:ne,activeNodeRect:Oe,ariaDescribedById:{draggable:le},dispatch:O,draggableNodes:H,over:Pt,measureDroppableContainers:Fe}),[re,He,ne,Oe,O,le,H,Pt,Fe]);return N.createElement(L4.Provider,{value:Y},N.createElement(Hv.Provider,{value:pt},N.createElement(G4.Provider,{value:We},N.createElement(Y4.Provider,{value:Tt},h)),N.createElement(iW,{disabled:(a==null?void 0:a.restoreFocus)===!1})),N.createElement(rH,{...a,hiddenTextDescribedById:le}));function wt(){const qt=(ae==null?void 0:ae.autoScrollEnabled)===!1,Jt=typeof u=="object"?u.enabled===!1:u===!1,Vt=B&&!qt&&!Jt;return typeof u=="object"?{...u,enabled:Vt}:{enabled:Vt}}}),cW=N.createContext(null),Yw="button",uW="Draggable";function fW(n){let{id:e,data:t,disabled:r=!1,attributes:i}=n;const o=Jp(uW),{activators:l,activatorEvent:a,active:u,activeNodeRect:h,ariaDescribedById:y,draggableNodes:x,over:w}=N.useContext(Hv),{role:_=Yw,roleDescription:S="draggable",tabIndex:R=0}=i??{},I=(u==null?void 0:u.id)===e,O=N.useContext(I?Y4:cW),[P,Y]=vv(),[z,W]=vv(),B=KH(l,e),ee=Bp(t);lh(()=>(x.set(e,{id:e,key:o,node:P,activatorNode:z,data:ee}),()=>{const V=x.get(e);V&&V.key===o&&x.delete(e)}),[x,e]);const H=N.useMemo(()=>({role:_,tabIndex:R,"aria-disabled":r,"aria-pressed":I&&_===Yw?!0:void 0,"aria-roledescription":S,"aria-describedby":y.draggable}),[r,_,R,I,S,y.draggable]);return{active:u,activatorEvent:a,activeNodeRect:h,attributes:H,isDragging:I,listeners:r?void 0:B,node:P,over:w,setNodeRef:Y,setActivatorNodeRef:W,transform:O}}function dW(){return N.useContext(G4)}const hW="Droppable",gW={timeout:25};function pW(n){let{data:e,disabled:t=!1,id:r,resizeObserverConfig:i}=n;const o=Jp(hW),{active:l,dispatch:a,over:u,measureDroppableContainers:h}=N.useContext(Hv),y=N.useRef({disabled:t}),x=N.useRef(!1),w=N.useRef(null),_=N.useRef(null),{disabled:S,updateMeasurementsFor:R,timeout:I}={...gW,...i},O=Bp(R??r),P=N.useCallback(()=>{if(!x.current){x.current=!0;return}_.current!=null&&clearTimeout(_.current),_.current=setTimeout(()=>{h(Array.isArray(O.current)?O.current:[O.current]),_.current=null},I)},[I]),Y=zv({callback:P,disabled:S||!l}),z=N.useCallback((H,V)=>{Y&&(V&&(Y.unobserve(V),x.current=!1),H&&Y.observe(H))},[Y]),[W,B]=vv(z),ee=Bp(e);return N.useEffect(()=>{!Y||!W.current||(Y.disconnect(),x.current=!1,Y.observe(W.current))},[W,Y]),N.useEffect(()=>(a({type:za.RegisterDroppable,element:{id:r,key:o,disabled:t,node:W,rect:w,data:ee}}),()=>a({type:za.UnregisterDroppable,key:o,id:r})),[r]),N.useEffect(()=>{t!==y.current.disabled&&(a({type:za.SetDroppableDisabled,id:r,key:o,disabled:t}),y.current.disabled=t)},[r,o,t,a]),{active:l,rect:w,isOver:(u==null?void 0:u.id)===r,node:W,over:u,setNodeRef:B}}function V4(n,e,t){const r={...n};return e.top+n.y<=t.top?r.y=t.top-e.top:e.bottom+n.y>=t.top+t.height&&(r.y=t.top+t.height-e.bottom),e.left+n.x<=t.left?r.x=t.left-e.left:e.right+n.x>=t.left+t.width&&(r.x=t.left+t.width-e.right),r}const vW=n=>{let{containerNodeRect:e,draggingNodeRect:t,transform:r}=n;return!t||!e?r:V4(r,t,e)},bW=n=>{let{transform:e,draggingNodeRect:t,windowRect:r}=n;return!t||!r?e:V4(e,t,r)};function xv(n,e,t){const r=n.slice();return r.splice(t<0?r.length+t:t,0,r.splice(e,1)[0]),r}function yW(n,e){return n.reduce((t,r,i)=>{const o=e.get(r);return o&&(t[i]=o),t},Array(n.length))}function N0(n){return n!==null&&n>=0}function mW(n,e){if(n===e)return!0;if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function xW(n){return typeof n=="boolean"?{draggable:n,droppable:n}:n}const Z4=n=>{let{rects:e,activeIndex:t,overIndex:r,index:i}=n;const o=xv(e,r,t),l=e[i],a=o[i];return!a||!l?null:{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}},F0={scaleX:1,scaleY:1},wW=n=>{var e;let{activeIndex:t,activeNodeRect:r,index:i,rects:o,overIndex:l}=n;const a=(e=o[t])!=null?e:r;if(!a)return null;if(i===t){const h=o[l];return h?{x:0,y:t<l?h.top+h.height-(a.top+a.height):h.top-a.top,...F0}:null}const u=CW(o,i,t);return i>t&&i<=l?{x:0,y:-a.height-u,...F0}:i<t&&i>=l?{x:0,y:a.height+u,...F0}:{x:0,y:0,...F0}};function CW(n,e,t){const r=n[e],i=n[e-1],o=n[e+1];return r?t<e?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const X4="Sortable",K4=N.createContext({activeIndex:-1,containerId:X4,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Z4,disabled:{draggable:!1,droppable:!1}});function _W(n){let{children:e,id:t,items:r,strategy:i=Z4,disabled:o=!1}=n;const{active:l,dragOverlay:a,droppableRects:u,over:h,measureDroppableContainers:y}=dW(),x=Jp(X4,t),w=a.rect!==null,_=N.useMemo(()=>r.map(B=>typeof B=="object"&&"id"in B?B.id:B),[r]),S=l!=null,R=l?_.indexOf(l.id):-1,I=h?_.indexOf(h.id):-1,O=N.useRef(_),P=!mW(_,O.current),Y=I!==-1&&R===-1||P,z=xW(o);lh(()=>{P&&S&&y(_)},[P,_,S,y]),N.useEffect(()=>{O.current=_},[_]);const W=N.useMemo(()=>({activeIndex:R,containerId:x,disabled:z,disableTransforms:Y,items:_,overIndex:I,useDragOverlay:w,sortedRects:yW(_,u),strategy:i}),[R,x,z.draggable,z.droppable,Y,_,I,u,w,i]);return N.createElement(K4.Provider,{value:W},e)}const SW=n=>{let{id:e,items:t,activeIndex:r,overIndex:i}=n;return xv(t,r,i).indexOf(e)},EW=n=>{let{containerId:e,isSorting:t,wasDragging:r,index:i,items:o,newIndex:l,previousItems:a,previousContainerId:u,transition:h}=n;return!h||!r||a!==o&&i===l?!1:t?!0:l!==i&&e===u},AW={duration:200,easing:"ease"},J4="transform",TW=zp.Transition.toString({property:J4,duration:0,easing:"linear"}),RW={roleDescription:"sortable"};function IW(n){let{disabled:e,index:t,node:r,rect:i}=n;const[o,l]=N.useState(null),a=N.useRef(t);return lh(()=>{if(!e&&t!==a.current&&r.current){const u=i.current;if(u){const h=F1(r.current,{ignoreTransform:!0}),y={x:u.left-h.left,y:u.top-h.top,scaleX:u.width/h.width,scaleY:u.height/h.height};(y.x||y.y)&&l(y)}}t!==a.current&&(a.current=t)},[e,t,r,i]),N.useEffect(()=>{o&&l(null)},[o]),o}function kW(n){let{animateLayoutChanges:e=EW,attributes:t,disabled:r,data:i,getNewIndex:o=SW,id:l,strategy:a,resizeObserverConfig:u,transition:h=AW}=n;const{items:y,containerId:x,activeIndex:w,disabled:_,disableTransforms:S,sortedRects:R,overIndex:I,useDragOverlay:O,strategy:P}=N.useContext(K4),Y=MW(r,_),z=y.indexOf(l),W=N.useMemo(()=>({sortable:{containerId:x,index:z,items:y},...i}),[x,i,z,y]),B=N.useMemo(()=>y.slice(y.indexOf(l)),[y,l]),{rect:ee,node:H,isOver:V,setNodeRef:de}=pW({id:l,data:W,disabled:Y.droppable,resizeObserverConfig:{updateMeasurementsFor:B,...u}}),{active:Z,activatorEvent:te,activeNodeRect:ne,attributes:fe,setNodeRef:ae,listeners:j,isDragging:re,over:he,setActivatorNodeRef:be,transform:le}=fW({id:l,data:W,attributes:{...RW,...t},disabled:Y.draggable}),J=Yz(de,ae),pe=!!Z,Te=pe&&!S&&N0(w)&&N0(I),Fe=!O&&re,_e=Fe&&Te?le:null,De=Te?_e??(a??P)({rects:R,activeNodeRect:ne,activeIndex:w,overIndex:I,index:z}):null,Re=N0(w)&&N0(I)?o({id:l,items:y,activeIndex:w,overIndex:I}):z,Le=Z==null?void 0:Z.id,Oe=N.useRef({activeId:Le,items:y,newIndex:Re,containerId:x}),Ge=y!==Oe.current.items,Ve=e({active:Z,containerId:x,isDragging:re,isSorting:pe,id:l,index:z,items:y,newIndex:Oe.current.newIndex,previousItems:Oe.current.items,previousContainerId:Oe.current.containerId,transition:h,wasDragging:Oe.current.activeId!=null}),Pe=IW({disabled:!Ve,index:z,node:H,rect:ee});return N.useEffect(()=>{pe&&Oe.current.newIndex!==Re&&(Oe.current.newIndex=Re),x!==Oe.current.containerId&&(Oe.current.containerId=x),y!==Oe.current.items&&(Oe.current.items=y)},[pe,Re,x,y]),N.useEffect(()=>{if(Le===Oe.current.activeId)return;if(Le!=null&&Oe.current.activeId==null){Oe.current.activeId=Le;return}const Xe=setTimeout(()=>{Oe.current.activeId=Le},50);return()=>clearTimeout(Xe)},[Le]),{active:Z,activeIndex:w,attributes:fe,data:W,rect:ee,index:z,newIndex:Re,items:y,isOver:V,isSorting:pe,isDragging:re,listeners:j,node:H,overIndex:I,over:he,setNodeRef:J,setActivatorNodeRef:be,setDroppableNodeRef:de,setDraggableNodeRef:ae,transform:Pe??De,transition:ot()};function ot(){if(Pe||Ge&&Oe.current.newIndex===z)return TW;if(!(Fe&&!e2(te)||!h)&&(pe||Ve))return zp.Transition.toString({...h,property:J4})}}function MW(n,e){var t,r;return typeof n=="boolean"?{draggable:n,droppable:!1}:{draggable:(t=n==null?void 0:n.draggable)!=null?t:e.draggable,droppable:(r=n==null?void 0:n.droppable)!=null?r:e.droppable}}Ao.Down,Ao.Right,Ao.Up,Ao.Left;function wv(n,e){Array.isArray(n)||(n=[n]);for(const t of n){if(e(t))return t;if(!t.children||t.children.length<1)continue;const r=wv(t.children,e);if(r)return r}}function Qp(n,e){Array.isArray(n)||(n=[n]);for(const t of n)e(t),!(!t.children||t.children.length<1)&&Qp(t.children,e)}function Q4(n,e){Array.isArray(n)||(n=[n]);const t=[];return Qp(n,(r,i)=>t.push(e(r,i))),t}function q4(n,e){Array.isArray(n)||(n=[n]);for(const t of n){if(!e(t))return!1;if(!(!t.children||t.children.length<1)&&!q4(t.children,e))return!1}return!0}function LW(n,e){Array.isArray(n)||(n=[n]);const t=[];return Qp(n,(r,i)=>{e(r,i)&&t.push(r)}),t}function OW(n){Array.isArray(n)||(n=[n]);let e=0;return Qp(n,()=>e++),e}function PW(n,e,t,r){if(r(e,t))return null;Array.isArray(n)||(n=[n]);const i=wv(n,l=>{var a;return(a=l.children)==null?void 0:a.some(u=>r(u,e))}),o=wv(n,l=>{var a;return(a=l.children)==null?void 0:a.some(u=>r(u,t))});if(i===void 0&&o===void 0){const l=n.findIndex(u=>r(u,e)),a=n.findIndex(u=>r(u,t));return n.splice(l,1),n.splice(a,0,e),[...n]}else if(i!==void 0&&o!==void 0&&r(i,o)&&i.children){const l=i.children.findIndex(u=>r(u,e)),a=i.children.findIndex(u=>r(u,t));return l===void 0||a===void 0?null:(i.children.splice(l,1),i.children.splice(a,0,e),i.children=[...i.children],[...n])}return null}function DW(n,e,t){const r=[],i=[...e];for(;i.length>0;){const o=i.shift();if(o&&!r.find(l=>t(l,o))&&(r.push(o),!(!o.children||o.children.length<1)))for(const l of o.children)i.push(l)}return r}function NW(n,e,t){Array.isArray(n)||(n=[n]);const r=Q4(n,l=>l),i=[],o=[...e];for(;o.length>0;){const l=o.shift();if(!l||i.find(u=>t(u,l)))continue;i.push(l);const a=r.find(u=>{var h;return(h=u.children)==null?void 0:h.some(y=>t(y,l))});a&&o.push(a)}return i}const Qh={find:wv,forEach:Qp,map:Q4,every:q4,filter:LW,length:OW,replace:PW,descendants:DW,ancestors:NW},FW="_AWrap_1n0ow_1",BW="_AContainer_1n0ow_10",zW="_ATree_1n0ow_18",HW="_ATreeBody_1n0ow_30",WW="_TreeTopAddon_1n0ow_36",UW="_CoverBorder_1n0ow_46",GW="_InsertBorder_1n0ow_55",YW="_ATreeHeader_1n0ow_86",VW="_ATreeBodyHeader_1n0ow_92",ZW="_ATreeBodyHeaderResources_1n0ow_102",XW="_ATreeItem_1n0ow_108",KW="_IsSelectUsed_1n0ow_124",JW="_IsSelected_1n0ow_127",QW="_IsSearchSelected_1n0ow_132",qW="_IsHovered_1n0ow_143",jW="_CheckBox_1n0ow_147",$W="_Indents_1n0ow_159",eU="_ExpandIcon_1n0ow_166",tU="_Content_1n0ow_179",nU="_RightSticky_1n0ow_188",rU="_SearchInputWrap_1n0ow_197",iU="_SearchInput_1n0ow_197",oU="_RightAddon_1n0ow_209",lU="_RightAddonIcon_1n0ow_220",sU="_Loader_1n0ow_227",aU="_IsChildOfDragSource_1n0ow_232",zo={AWrap:FW,AContainer:BW,ATree:zW,ATreeBody:HW,TreeTopAddon:WW,CoverBorder:UW,InsertBorder:GW,ATreeHeader:YW,ATreeBodyHeader:VW,ATreeBodyHeaderResources:ZW,ATreeItem:XW,IsSelectUsed:KW,IsSelected:JW,IsSearchSelected:QW,IsHovered:qW,CheckBox:jW,Indents:$W,ExpandIcon:eU,Content:tU,RightSticky:nU,SearchInputWrap:rU,SearchInput:iU,RightAddon:oU,RightAddonIcon:lU,Loader:sU,IsChildOfDragSource:aU},cU=24,uU=8,fU=12,dU=n=>{const{isEqual:e,item:t,itemId:r,selectDisabled:i,selectUnused:o,isParentDisabled:l,indents:a,extIndents:u,useExpand:h,useSelect:y,useSearch:x,showCheckbox:w,icons:_,isSelectMulti:S,isDraggable:R,isParentCheckHovered:I,hoverdItem:O,onMouseOver:P,onMouseLeave:Y,ContentRenderer:z,TreeItemRenderer:W,RightStickyAddon:B,resources:ee,containerRef:H,TreeItemStyle:V,TreeItemClassName:de,searchItemStyle:Z,searchItemClassName:te,height:ne,isDragSrcItem:fe,isChildOfDragItem:ae,getItemId:j,treeItemTooltip:re,treeItemTooltipDelay:he,treeItemTooltipDirection:be,treeItemTooltipDistance:le}=n,{children:J}=N.useMemo(()=>t,[t]),[pe,Te]=N.useMemo(()=>h,[h]),[Fe,_e]=N.useMemo(()=>y,[y]),[Me,De]=N.useMemo(()=>x,[x]),Re=N.useMemo(()=>o?o(t):!1,[o,t]),Le=N.useMemo(()=>!i||l?l:i(t),[i,l,t]),Oe=N.useMemo(()=>pe.some(Bt=>e(Bt,t)),[pe,e,t]),Ge=N.useMemo(()=>!J||J.length<1?"noChild":Oe?"expanded":"collapsed",[J,Oe]),Ve=N.useMemo(()=>Zr.getContent(_,n),[_,n]),Pe=N.useCallback((Bt,Ut)=>Ve&&Bt in Ve&&typeof Ve[Bt]=="number"?Ve[Bt]:Ut,[Ve]),ot=N.useMemo(()=>Pe("iconWidth",cU),[Pe]),Xe=N.useMemo(()=>Pe("iconGap",uU),[Pe]),lt=N.useMemo(()=>Pe("iconPadding",fU),[Pe]),Ye=N.useMemo(()=>{if(!Ve)return null;const Bt=Ve[Ge];if(!Bt)return null;if(bm.includes(Bt))return k.jsx(ho,{icon:Bt,style:{width:ot,height:ot}});if(N.isValidElement(Bt)){const Ut=Bt.props;return N.cloneElement(Bt,{style:{width:ot,height:ot,...Ut==null?void 0:Ut.style}})}return Bt},[Ve,Ge,ot]),mt=N.useCallback(Bt=>{!Te||Ge==="noChild"||(Te(Oe?pe.filter(Ut=>!e(Ut,t)):[...pe,t]),Bt.stopPropagation())},[Te,pe,Oe,t,e,Ge]),bt=N.useMemo(()=>Fe.some(Bt=>e(Bt,t)),[Fe,e,t]),Mt=N.useCallback(()=>{!_e||Le||(_e(S?bt?Fe.filter(Bt=>!e(Bt,t)):[...Fe,t]:[t]),Me&&De&&Me.items.some(Bt=>e(Bt,t))&&De({...Me,item:t}))},[S,Le,bt,Me,De,_e,e,Fe,t]),Nt=N.useMemo(()=>Me==null?void 0:Me.items.some(Bt=>e(Bt,t)),[Me,e,t]),_t=N.useMemo(()=>Nt&&(Me==null?void 0:Me.item)&&e(Me.item,t),[Nt,Me,e,t]),rn=N.useRef(null),pn=N.useRef(null),{attributes:Kt,listeners:dn,setNodeRef:zt,transform:wn,transition:$t,isDragging:vn}=kW({id:r||`item-${JSON.stringify(t)}`,disabled:!R||!!l||!r}),Pt=N.useMemo(()=>ae?ae(t):!1,[ae,t]),Yt=N.useMemo(()=>{const Bt=wn?{transform:zp.Transform.toString(wn),transition:$t,opacity:vn?.5:1,zIndex:vn?1:"auto"}:{};return fe||Pt?{...Bt,opacity:.5,zIndex:10}:Bt},[wn,$t,vn,fe,Pt]);N.useEffect(()=>{r&&zt&&pn.current&&zt(pn.current)},[r,zt]),N.useEffect(()=>{setTimeout(()=>{if(_t&&rn.current&&H.current){const{top:Bt,bottom:Ut}=rn.current.getBoundingClientRect(),{top:yn,bottom:Ft}=H.current.getBoundingClientRect();(Bt<yn||Ut>Ft)&&rn.current.scrollIntoView({behavior:"smooth",block:"center"})}},10)},[H,_t]);const[ct,Tt]=N.useState(!1),It=N.useCallback(()=>!Le&&Tt(!0),[Le]),ye=N.useCallback(()=>!Le&&Tt(!1),[Le]),se=N.useMemo(()=>Qh.map(t,Bt=>Bt).filter(Bt=>!(i!=null&&i(Bt))&&!(o!=null&&o(Bt))),[i,o,t]),He=N.useMemo(()=>!w||!S?!1:bt&&se.some(Bt=>Fe.some(Ut=>e(Bt,Ut)))&&se.some(Bt=>!Fe.some(Ut=>e(Bt,Ut))),[w,S,bt,se,e,Fe]),We=N.useMemo(()=>w?S?se.every(Bt=>Fe.some(Ut=>e(Bt,Ut))):Fe.some(Bt=>e(Bt,t)):!1,[w,S,se,t,e,Fe]),pt=N.useCallback(()=>{if(!(!_e||Le))if(S)if(bt){const Bt=Fe.filter(Ut=>!(o!=null&&o(Ut))&&!(i!=null&&i(Ut))&&se.some(yn=>e(yn,Ut)));Bt.length>0&&_e(Fe.filter(Ut=>!Bt.some(yn=>e(Ut,yn))))}else{const Bt=se.filter(Ut=>!(o!=null&&o(Ut))&&!(i!=null&&i(Ut))&&!Fe.some(yn=>e(yn,Ut)));Bt.length>0&&_e([...Fe,...Bt])}else _e([t])},[Le,i,o,S,_e,e,bt,Fe,se,t]),wt=N.useCallback(Bt=>{Le||pt(),Bt.stopPropagation()},[Le,pt]),qt=N.useMemo(()=>{if(!w||!S||Le)return"";if(bt){const Ut=Fe.filter(yn=>!(o!=null&&o(yn))&&!(i!=null&&i(yn))&&se.some(Ft=>e(Ft,yn)));if(Ut.length>0)return ee["deselect n"](Ut.length)}const Bt=se.filter(Ut=>!(o!=null&&o(Ut))&&!(i!=null&&i(Ut))&&!Fe.some(yn=>e(yn,Ut)));return ee["select n"](Bt.length)},[i,o,ee,Le,w,S,bt,se,e,Fe]),Jt=N.useMemo(()=>Zr.getContent(B,n),[B,n]),Vt=N.useMemo(()=>Zr.getContent(V,n),[n,V]),hn=N.useMemo(()=>Zr.getContent(de,n),[n,de]),ln=N.useMemo(()=>Zr.getContent(te,n),[n,te]),kn=N.useMemo(()=>Zr.getContent(Z,n),[n,Z]),Nn=N.useMemo(()=>Zr.getContent(re,n),[n,re]),En=N.useMemo(()=>Zr.getContent(he,n),[n,he]),Cn=N.useMemo(()=>Zr.getContent(be,n),[n,be]),rr=N.useMemo(()=>Zr.getContent(le,n),[n,le]);return k.jsxs(N.Fragment,{children:[k.jsxs(Gi,{abaseRef:pn,isDisabled:Le,className:gt.clsx(zo.ATreeItem,bt&&zo.IsSelected,!Le&&(ct||I)&&zo.IsHovered,Nt&&zo.IsSearched,_t&&(ln||zo.IsSearchSelected),!Re&&zo.IsSelectUsed,Pt&&zo.IsChildOfDragSource,"NoSelect",hn),style:{...Vt,..._t&&kn?kn:{},"--ATreeItem_height":`${ne}px`,...Yt||{}},onClick:Mt,onMouseLeave:Bt=>Y==null?void 0:Y(Bt,t),onMouseOver:Bt=>P==null?void 0:P(Bt,t),...R&&!Le&&Kt?Kt:{},...R&&!Le&&dn?dn:{},tooltip:Nn,tooltipDelay:En,tooltipDirection:Cn,tooltipDistance:rr,children:[w&&k.jsx(x1,{className:zo.CheckBox,isDisabled:Le,isIndeterminate:He,tooltip:qt,useCheck:[+We,pt],style:{visibility:Le||Re?"hidden":"visible",zIndex:Le||Re?0:2},onClick:wt,onMouseOut:ye,onMouseOver:It}),k.jsx("div",{className:zo.Indents,style:{paddingLeft:w?0:Ve!=null&&Ve.noChild?lt:0},children:a.map((Bt,Ut)=>{const yn=Ut===a.length-1;return k.jsx(D3,{value:Bt,map:{Collapsed:u?u({iconWidth:ot}).collapsed:k.jsx(gU,{iconWidth:ot}),Expanded:u?u({iconWidth:ot,isLast:yn}).expanded:k.jsx(hU,{iconWidth:ot,isLast:yn}),IsLast:u?u({iconWidth:ot}).isLast:k.jsx(pU,{iconWidth:ot})}},Ut)})}),Ye&&k.jsx("div",{className:zo.ExpandIcon,style:{"--ATree_icon-width":`${ot}px`,"--ATree_icon-gap":`${Xe}px`},onClick:mt,children:Ye}),k.jsx("div",{className:gt.clsx(zo.Content,"NoSelect"),children:k.jsx(z,{containerRef:H,ContentRenderer:z,extIndents:u,height:ne,hoverdItem:O,icons:_,indents:a,isDraggable:R,isEqual:e,isParentCheckHovered:S&&(ct||I),isSelectMulti:S,item:t,itemId:r,resources:ee,RightStickyAddon:B,searchItemClassName:ln,searchItemStyle:Z,showCheckbox:w,TreeItemClassName:de,TreeItemRenderer:W,TreeItemStyle:V,treeItemTooltip:re,treeItemTooltipDelay:he,treeItemTooltipDirection:be,treeItemTooltipDistance:le,useExpand:h,useSearch:x,useSelect:y,onMouseLeave:Y,onMouseOver:P})}),Jt&&k.jsx("div",{className:zo.RightSticky,children:Jt})]}),Oe&&(J==null?void 0:J.map((Bt,Ut)=>k.jsx(W,{containerRef:H,ContentRenderer:z,extIndents:u,height:ne,hoverdItem:O,icons:_,isChildOfDragItem:ae,isDraggable:R,isDragSrcItem:fe,isEqual:e,isParentCheckHovered:S&&(ct||I),isSelectMulti:S,item:Bt,itemId:j?`${j(t)}-child-${Ut}`:r?`${r}-child-${Ut}`:void 0,resources:ee,RightStickyAddon:B,searchItemClassName:ln,searchItemStyle:Z,selectDisabled:i,selectUnused:o,showCheckbox:w,TreeItemClassName:de,TreeItemRenderer:W,TreeItemStyle:V,treeItemTooltip:re,treeItemTooltipDelay:he,treeItemTooltipDirection:be,treeItemTooltipDistance:le,useExpand:h,useSearch:x,useSelect:y,indents:[...a.map(yn=>yn==="IsLast"?"Collapsed":yn),Ut===J.length-1?"IsLast":"Expanded"],onMouseLeave:Y,onMouseOver:P},j?j(Bt):Ut)))]})},hU=n=>{const e=Dn.c(9),{iconWidth:t,isLast:r}=n,i=t/8*3,o=t/2,l=t/8;let a;e[0]!==i||e[1]!==o||e[2]!==l?(a={width:i,height:"100%",borderLeft:"var(--ATree_Indent_border)",marginLeft:o,marginRight:l,boxSizing:"border-box",transition:"border-color var(--Transition)"},e[0]=i,e[1]=o,e[2]=l,e[3]=a):a=e[3];let u;e[4]!==r?(u=r&&k.jsx("div",{style:{borderBottom:"var(--ATree_Indent_border)",height:"50%",transition:"border-color var(--Transition)"}}),e[4]=r,e[5]=u):u=e[5];let h;return e[6]!==a||e[7]!==u?(h=k.jsx("div",{style:a,children:u}),e[6]=a,e[7]=u,e[8]=h):h=e[8],h},gU=n=>{const e=Dn.c(2),{iconWidth:t}=n;let r;return e[0]!==t?(r=k.jsx("div",{style:{width:t,height:"100%",borderLeft:"none",marginLeft:0,transition:"border-color var(--Transition)"}}),e[0]=t,e[1]=r):r=e[1],r},pU=n=>{const e=Dn.c(4),{iconWidth:t}=n,r=t/8*3,i=t/2,o=t/8;let l;return e[0]!==r||e[1]!==i||e[2]!==o?(l=k.jsx("div",{style:{width:r,height:"50%",borderLeft:"var(--ATree_Indent_border)",borderBottom:"var(--ATree_Indent_border)",marginLeft:i,marginRight:o,boxSizing:"border-box",transition:"border-color var(--Transition)"}}),e[0]=r,e[1]=i,e[2]=o,e[3]=l):l=e[3],l},vU=n=>{const e=Dn.c(26),{isEqual:t,searchResult:r,initSearch:i,searchUp:o,searchDown:l,searchEnter:a,isDisabled:u,isLoading:h,resources:y,maxLength:x,autoFocus:w}=n;let _;e[0]!==l||e[1]!==a||e[2]!==o?(_=V=>{V.key==="Enter"?a():V.key==="ArrowDown"?l():V.key==="ArrowUp"&&o(),V.preventDefault(),V.stopPropagation()},e[0]=l,e[1]=a,e[2]=o,e[3]=_):_=e[3];const S=_;let R;e[4]!==i?(R=V=>{i(V)},e[4]=i,e[5]=R):R=e[5];const I=R;let O;u||h?O=-1:O=void 0;const P=O,Y=y["Search(Placeholder)"],z=(r==null?void 0:r.keyword)??"";let W;e[6]!==I||e[7]!==z?(W=[z,I],e[6]=I,e[7]=z,e[8]=W):W=e[8];let B;e[9]!==t||e[10]!==y||e[11]!==l||e[12]!==a||e[13]!==r||e[14]!==o?(B=k.jsx(bU,{isEqual:t,resources:y,searchDown:l,searchEnter:a,searchResult:r,searchUp:o}),e[9]=t,e[10]=y,e[11]=l,e[12]=a,e[13]=r,e[14]=o,e[15]=B):B=e[15];let ee;e[16]===Symbol.for("react.memo_cache_sentinel")?(ee={className:zo.SearchInputWrap},e[16]=ee):ee=e[16];let H;return e[17]!==w||e[18]!==u||e[19]!==x||e[20]!==S||e[21]!==Y||e[22]!==W||e[23]!==B||e[24]!==P?(H=k.jsx(sg,{autoFocus:w,className:zo.SearchInput,isDisabled:u,maxLength:x,placeholder:Y,tabIndex:P,useValue:W,RightAddon:B,wrapProps:ee,onKeyDown:S}),e[17]=w,e[18]=u,e[19]=x,e[20]=S,e[21]=Y,e[22]=W,e[23]=B,e[24]=P,e[25]=H):H=e[25],H},bU=n=>{const e=Dn.c(22),{isEqual:t,searchResult:r,searchUp:i,searchDown:o,searchEnter:l,resources:a}=n;let u;if(!r||r.items.length<1)u=0;else{let H;e[0]!==t||e[1]!==r.item?(H=V=>r.item&&t(V,r.item),e[0]=t,e[1]=r.item,e[2]=H):H=e[2],u=r.items.findIndex(H)+1}const h=u;let y;!r||r.items.length<1?y=0:y=r.items.length;const x=y;let w;h<2?w=!0:w=!1;const _=w;let S;h>=x?S=!0:S=!1;const R=S;let I;e[3]!==_||e[4]!==i?(I=H=>{H.stopPropagation(),!_&&i()},e[3]=_,e[4]=i,e[5]=I):I=e[5];const O=I;let P;e[6]!==R||e[7]!==o?(P=H=>{H.stopPropagation(),!R&&o()},e[6]=R,e[7]=o,e[8]=P):P=e[8];const Y=P;let z;e[9]!==l?(z=H=>{H.stopPropagation(),l()},e[9]=l,e[10]=z):z=e[10];const W=z;let B;e[11]===Symbol.for("react.memo_cache_sentinel")?(B=gt.clsx(zo.RightAddon,"NoSelect"),e[11]=B):B=e[11];let ee;return e[12]!==R||e[13]!==_||e[14]!==x||e[15]!==Y||e[16]!==W||e[17]!==O||e[18]!==h||e[19]!==a||e[20]!==r?(ee=k.jsx("div",{className:B,children:r?k.jsxs(k.Fragment,{children:[h,"/",x,k.jsx(Gi,{isDisabled:_,onClick:O,children:k.jsx(ho,{className:zo.RightAddonIcon,icon:"ArrowUp",mask:""})}),k.jsx(Gi,{isDisabled:R,onClick:Y,children:k.jsx(ho,{className:zo.RightAddonIcon,icon:"ArrowDown"})})]}):k.jsx(ba,{className:zo.RightAddonIcon,icon:"Search",style:{marginRight:4},tooltip:a["Search(Button)"],type:"Raw",onClick:W})}),e[12]=R,e[13]=_,e[14]=x,e[15]=Y,e[16]=W,e[17]=O,e[18]=h,e[19]=a,e[20]=r,e[21]=ee):ee=e[21],ee},yU=n=>{var Rn;const{pk:e,selectDisabled:t,selectUnused:r,useItems:i,useExpand:o,useSelect:l,useSearch:a,showCheckbox:u,icons:h={noChild:"Folder",collapsed:"FolderCopy",expanded:"FolderOpen"},indents:y,isSelectMulti:x=!1,noSearch:w=!1,isDraggable:_,noSyncSearchSelect:S=!1,actionRef:R,placeholder:I,searchPredicate:O=xU,isDisabled:P,isLoading:Y,ContentRenderer:z=mU,TreeItemRenderer:W=dU,RightStickyAddon:B,TopRightAddon:ee,TreeTopAddon:H,resources:V,maxLength:de,autoFocus:Z,TreeHeaderStyle:te,TreeHeaderClassName:ne,TreeItemStyle:fe,TreeItemClassName:ae,OverflowPadding:j,insertBorder:re,width:he,searchItemClassName:be,searchItemStyle:le,height:J=40,treeItemTooltip:pe,treeItemTooltipDelay:Te,treeItemTooltipDirection:Fe,treeItemTooltipDistance:_e,...Me}=n,De=N.useMemo(()=>({...Nr.ATree,...V}),[V]),Re=N.useCallback((Et,rt)=>!Et||!rt?!1:e!==void 0?Array.isArray(e)?e.every(tn=>Et&&rt&&Et[tn]!==void 0&&rt[tn]!==void 0&&ud.isEqual(Et[tn],rt[tn])):Et&&rt&&Et[e]!==void 0&&rt[e]!==void 0&&ud.isEqual(Et[e],rt[e]):ud.isEqual(Et,rt),[e]),Le=N.useRef(null),[Oe,Ge]=Ho(i,[]),Ve=N.useMemo(()=>Qh.map(Oe,Et=>Et),[Oe]),[Pe,ot]=Ho(o,[]),[Xe,lt]=Ho(l,[]),[Ye,mt]=Ho(a,void 0),bt=N.useCallback(Et=>{if(P||!ot||Pe.some(Ln=>Re(Ln,Et)))return;const rt=[];let tn=Et;for(;tn;){const Ln=tn;Pe.find(mr=>Re(mr,Ln))||rt.push(Ln),tn=Ve.find(mr=>{var wr;return(wr=mr.children)==null?void 0:wr.some(gn=>Re(gn,Ln))})}ot([...Pe,...rt])},[Pe,P,Re,ot,Ve]),Mt=N.useCallback(()=>{!ot||P||ot([...Ve])},[Ve,P,ot]),Nt=N.useCallback(()=>{!ot||P||ot([])},[ot,P]),_t=N.useCallback(Et=>{!lt||P||r!=null&&r(Et)||(lt([Et]),bt(Et))},[lt,P,r,bt]),rn=N.useCallback(Et=>{if(!mt||P)return;if(!Et||w){mt(void 0),S||lt==null||lt([]);return}const rt=Qh.filter(Oe,Ln=>O(Et,Ln));let tn;if(rt.find(Ln=>(Ye==null?void 0:Ye.item)&&Re(Ln,Ye.item))?tn=Ye==null?void 0:Ye.item:rt.length>0&&(tn=rt[0]),mt({keyword:Et,items:rt,item:tn}),tn&&bt(tn),lt&&!S)if(x)lt(rt);else{const Ln=rt.find(mr=>tn&&Re(mr,tn));lt(Ln?[Ln]:[])}},[Oe,P,Re,O,mt,lt,bt,S,w,x,Ye]),pn=N.useRef(!1);N.useEffect(()=>{pn.current=!0},[Oe]),N.useEffect(()=>{Ye&&pn.current&&(rn(Ye.keyword),pn.current=!1)},[rn,Ye]);const Kt=N.useCallback(()=>{if(!Ye||!mt||P)return;let Et=Ye.items.findIndex(rt=>Ye.item&&Re(rt,Ye.item))-1;Et<0||(mt({...Ye,item:Ye.items[Et]}),bt(Ye.items[Et]),S||_t(Ye.items[Et]))},[Ye,bt,mt,P,_t,Re,S]),dn=N.useCallback(()=>{if(!Ye||!mt||P)return;let Et=Ye.items.findIndex(rt=>Ye.item&&Re(rt,Ye.item))+1;Et>=Ye.items.length||(mt({...Ye,item:Ye.items[Et]}),bt(Ye.items[Et]),S||_t(Ye.items[Et]))},[Ye,bt,P,mt,_t,Re,S]),zt=N.useCallback(()=>{if(!Ye||!mt||P)return;let Et=Ye.items.findIndex(tn=>Ye.item&&Re(tn,Ye.item));if(!S||r!=null&&r(Ye.items[Et])){dn();return}if(Xe.some(tn=>Ye.item&&Re(tn,Ye.item))){let tn=Et+1;const Ln=Ye.items[tn];if(tn>=Ye.items.length)return;mt({...Ye,item:Ln}),_t(Ln)}else _t(Ye.items[Et])},[Ye,mt,P,Xe,S,dn,Re,_t,r]),[wn,$t]=N.useState(!1),vn=N.useCallback(()=>$t(!0),[]),Pt=N.useCallback(()=>$t(!1),[]),Yt=N.useMemo(()=>r?Qh.map(Oe,Et=>Et).filter(Et=>!r(Et)):t?Qh.map(Oe,Et=>Et).filter(Et=>!t(Et)):Qh.map(Oe,Et=>Et),[r,t,Oe]),ct=N.useMemo(()=>!u||!x?!1:Xe.length>0&&Yt.length>Xe.length,[u,x,Xe,Yt]),Tt=N.useMemo(()=>!u||!x?!1:Xe.length>0&&Yt.length===Xe.length,[u,x,Xe,Yt]),It=N.useCallback(()=>{if(!lt||!x||P)return;const Et=Xe.filter(rt=>!(r!=null&&r(rt))&&!(t!=null&&t(rt))&&Yt.some(tn=>Re(tn,rt)));if(Et.length>0)lt(Xe.filter(rt=>!Et.some(tn=>Re(rt,tn))));else{const rt=Yt.filter(tn=>!(r!=null&&r(tn))&&!(t!=null&&t(tn))&&!Xe.some(Ln=>Re(Ln,tn)));rt.length>0&<([...Xe,...rt])}},[x,P,r,t,lt,Xe,Yt,Re]),ye=N.useMemo(()=>{if(!u||!x||P)return"";const Et=Xe.filter(rt=>!(r!=null&&r(rt))&&!(t!=null&&t(rt))&&Yt.some(tn=>Re(tn,rt)));if(Et.length>0)return De["deselect n"](Et.length);{const rt=Yt.filter(tn=>!(r!=null&&r(tn))&&!(t!=null&&t(tn))&&!Xe.some(Ln=>Re(Ln,tn)));return De["select n"](rt.length)}},[r,t,P,De,u,x,Yt,Xe,Re]),[se,He]=N.useState(),We=iH(Ow(o2,{activationConstraint:{distance:8}}),Ow(r2)),pt=N.useRef(new Map),wt=N.useCallback(Et=>{if(!pt.current.has(Et)){const rt=`item_${ud.uniqueId()}`;pt.current.set(Et,rt)}return pt.current.get(Et)},[]),qt=N.useCallback(Et=>Ve.find(rt=>wt(rt)===Et),[Ve,wt]),Jt=N.useCallback(Et=>!se||!se.children?!1:se.children.some(tn=>Re(tn,Et))?!0:se.children.some(tn=>tn.children?Qh.find(tn,Ln=>Re(Ln,Et))!==void 0:!1),[se,Re]),Vt=N.useCallback(Et=>{if(!_||P)return;const rt=qt(Et.active.id);rt&&He(rt)},[_,P,qt]),hn=N.useCallback((Et,rt,tn,Ln)=>{const mr=Et.findIndex(gn=>Ln(gn,rt)),wr=Et.findIndex(gn=>Ln(gn,tn));return mr!==-1&&wr!==-1?xv(Et,mr,wr):Et.map(gn=>{if(!gn.children)return gn;const Dt=gn.children.findIndex(it=>Ln(it,rt)),Se=gn.children.findIndex(it=>Ln(it,tn));return Dt!==-1&&Se!==-1?{...gn,children:xv(gn.children,Dt,Se)}:gn.children?{...gn,children:hn(gn.children,rt,tn,Ln)}:gn})},[]),ln=N.useCallback(Et=>{!_||P||!se||!Et.over||qt(Et.over.id)},[_,P,se,qt]),kn=N.useCallback(Et=>{if(!_||P||!Ge||!se||!Et.over)return;const rt=qt(Et.over.id);if(!rt||Re(se,rt)){He(void 0);return}const tn=hn(Oe,se,rt,Re);Ge(tn),He(void 0)},[_,P,Ge,se,qt,Re,Oe,hn]),Nn=N.useMemo(()=>Oe.map(Et=>wt(Et)),[Oe,wt]);N.useEffect(()=>{var Et;u||(Et=Le.current)==null||Et.scrollTo(0,0)},[u,Le]),N.useEffect(()=>{!x&&Xe.length>1&&(lt==null||lt([Xe[Xe.length-1]]))},[x,lt,Xe]),N.useEffect(()=>{R&&(R.current={expandAll:Mt,collapseAll:Nt})},[R,Mt,Nt]),N.useEffect(()=>{if(!t||!lt)return;const Et=Xe.filter(rt=>!t(rt));Xe.length!==Et.length&<(Et)},[t,Xe,lt]),N.useEffect(()=>{if(!r||!lt)return;const Et=Xe.filter(rt=>!r(rt));Xe.length!==Et.length&<(Et)},[r,Xe,lt]),N.useEffect(()=>{mt&&mt(void 0)},[mt]);const[En,Cn]=N.useState(null),rr=N.useCallback((Et,rt)=>{P||(Et.stopPropagation(),Et.preventDefault(),Cn(rt))},[P]),Bt=N.useCallback((Et,rt)=>{En===null||P||Re(rt,En)&&(Et.stopPropagation(),Et.preventDefault(),Cn(null))},[En,P,Re]),Ut=N.useRef(null),[yn,Ft]=N.useState(!1),[jn,Hn]=N.useState((Rn=Ut.current)==null?void 0:Rn.scrollHeight);return N.useEffect(()=>{if(Pe.length<0)return;const Et=Le.current,rt=Ut.current,tn=Et.clientHeight<rt.clientHeight;Hn(tn?rt.scrollHeight:Et.clientHeight),Ft(tn)},[Pe]),k.jsxs(Gi,{...Me,className:gt.clsx(Me.className,zo.AWrap),isDisabled:P,children:[(!w||ee)&&k.jsxs(bl,{className:gt.clsx(zo.ATreeHeader,ne),style:te,children:[!w&&k.jsx(vU,{autoFocus:Z,initSearch:rn,isDisabled:P,isEqual:Re,isLoading:Y,maxLength:de,resources:De,searchDown:dn,searchEnter:zt,searchResult:Ye,searchUp:Kt}),!w&&ee&&k.jsx(cs,{w:8}),ee]}),(!w||ee||u&&x||_)&&k.jsx(Am,{isLoading:Y&&Oe.length!==0}),(u&&x||_)&&k.jsxs("div",{className:gt.clsx(zo.ATreeBodyHeader,"NoSelect"),children:[u&&k.jsx(x1,{className:zo.CheckBox,isDisabled:P,isIndeterminate:ct,tooltip:ye,useCheck:[+Tt,()=>It()],onMouseOut:Pt,onMouseOver:vn}),De.Items,k.jsx(zg,{}),k.jsxs("div",{className:gt.clsx(zo.ATreeBodyHeaderResources,"NoSelect"),style:{marginRight:yn?8:0},children:[k.jsx("span",{children:u&&De["*Click row for single select"]}),k.jsx("span",{children:_&&De["*Change order to row drag"]})]})]}),H&&k.jsx("div",{className:zo.TreeTopAddon,children:H}),k.jsx("div",{ref:Le,className:gt.clsx(Me.className,zo.AContainer),children:k.jsxs("div",{className:zo.ATree,style:{minWidth:he||"fit-content",marginRight:j&&yn?8:0},children:[k.jsxs("div",{ref:Ut,className:zo.ATreeBody,children:[Oe.length===0?Y?k.jsx(wU,{text:De["Loading Contents..."]}):I:null,k.jsx(aW,{collisionDetection:cH,modifiers:[vW,bW],sensors:We,measuring:{droppable:{strategy:k1.Always}},onDragEnd:kn,onDragOver:ln,onDragStart:Vt,children:k.jsx(_W,{items:Nn,strategy:wW,children:Oe.map(Et=>k.jsx(W,{containerRef:Le,ContentRenderer:z,extIndents:y,getItemId:wt,height:J,hoverdItem:En,icons:h,indents:[],isChildOfDragItem:Jt,isDraggable:_,isDragSrcItem:Re(Et,se),isEqual:Re,isParentCheckHovered:x&&wn,isParentDisabled:P,isSelectMulti:x,item:Et,itemId:wt(Et),resources:De,RightStickyAddon:B,searchItemClassName:be,searchItemStyle:le,selectDisabled:t,selectUnused:r,showCheckbox:u,TreeItemClassName:ae,TreeItemRenderer:W,TreeItemStyle:fe,treeItemTooltip:pe,treeItemTooltipDelay:Te,treeItemTooltipDirection:Fe,treeItemTooltipDistance:_e,useExpand:[Pe,ot],useSearch:[Ye,mt],useSelect:[Xe,lt],onMouseLeave:Bt,onMouseOver:rr},wt(Et)))})})]}),re&&k.jsxs(k.Fragment,{children:[k.jsx("div",{className:zo.CoverBorder}),k.jsx("div",{className:zo.InsertBorder,style:{"--InsertBorder_height":`${J}px`,height:yn?jn:"100%"}})]})]})})]})},mU=n=>{const{item:e}=n,t={};return er.keys(e).forEach(r=>{r!=="children"&&(t[r]=e[r])}),JSON.stringify(t)};function xU(n,e){return er.some(e,(t,r)=>{var i;return(i=er.stringify(r))==null?void 0:i.toLowerCase().includes(n.toLowerCase())})}const wU=n=>{const e=Dn.c(4),{text:t}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=gt.clsx(zo.Loader,"NoSelect"),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=k.jsx(ho,{height:40,icon:"Spinner",style:{height:40},width:40}),e[1]=i):i=e[1];let o;return e[2]!==t?(o=k.jsxs(bl,{className:r,children:[i,k.jsx(X3,{text:t})]}),e[2]=t,e[3]=o):o=e[3],o};var Fb,Vw;function B1(){return Vw||(Vw=1,Fb=TypeError),Fb}const CU={},_U=Object.freeze(Object.defineProperty({__proto__:null,default:CU},Symbol.toStringTag,{value:"Module"})),SU=RE(_U);var Bb,Zw;function Wv(){if(Zw)return Bb;Zw=1;var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=n&&e&&typeof e.get=="function"?e.get:null,r=n&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=i&&o&&typeof o.get=="function"?o.get:null,a=i&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,h=u?WeakMap.prototype.has:null,y=typeof WeakSet=="function"&&WeakSet.prototype,x=y?WeakSet.prototype.has:null,w=typeof WeakRef=="function"&&WeakRef.prototype,_=w?WeakRef.prototype.deref:null,S=Boolean.prototype.valueOf,R=Object.prototype.toString,I=Function.prototype.toString,O=String.prototype.match,P=String.prototype.slice,Y=String.prototype.replace,z=String.prototype.toUpperCase,W=String.prototype.toLowerCase,B=RegExp.prototype.test,ee=Array.prototype.concat,H=Array.prototype.join,V=Array.prototype.slice,de=Math.floor,Z=typeof BigInt=="function"?BigInt.prototype.valueOf:null,te=Object.getOwnPropertySymbols,ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,fe=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ae=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===fe||!0)?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,re=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ye){return ye.__proto__}:null);function he(ye,se){if(ye===1/0||ye===-1/0||ye!==ye||ye&&ye>-1e3&&ye<1e3||B.call(/e/,se))return se;var He=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ye=="number"){var We=ye<0?-de(-ye):de(ye);if(We!==ye){var pt=String(We),wt=P.call(se,pt.length+1);return Y.call(pt,He,"$&_")+"."+Y.call(Y.call(wt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Y.call(se,He,"$&_")}var be=SU,le=be.custom,J=ot(le)?le:null,pe={__proto__:null,double:'"',single:"'"},Te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Bb=function ye(se,He,We,pt){var wt=He||{};if(Ye(wt,"quoteStyle")&&!Ye(pe,wt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ye(wt,"maxStringLength")&&(typeof wt.maxStringLength=="number"?wt.maxStringLength<0&&wt.maxStringLength!==1/0:wt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var qt=Ye(wt,"customInspect")?wt.customInspect:!0;if(typeof qt!="boolean"&&qt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ye(wt,"indent")&&wt.indent!==null&&wt.indent!==" "&&!(parseInt(wt.indent,10)===wt.indent&&wt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ye(wt,"numericSeparator")&&typeof wt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Jt=wt.numericSeparator;if(typeof se>"u")return"undefined";if(se===null)return"null";if(typeof se=="boolean")return se?"true":"false";if(typeof se=="string")return zt(se,wt);if(typeof se=="number"){if(se===0)return 1/0/se>0?"0":"-0";var Vt=String(se);return Jt?he(se,Vt):Vt}if(typeof se=="bigint"){var hn=String(se)+"n";return Jt?he(se,hn):hn}var ln=typeof wt.depth>"u"?5:wt.depth;if(typeof We>"u"&&(We=0),We>=ln&&ln>0&&typeof se=="object")return De(se)?"[Array]":"[Object]";var kn=ct(wt,We);if(typeof pt>"u")pt=[];else if(Mt(pt,se)>=0)return"[Circular]";function Nn(gn,Dt,Se){if(Dt&&(pt=V.call(pt),pt.push(Dt)),Se){var it={depth:wt.depth};return Ye(wt,"quoteStyle")&&(it.quoteStyle=wt.quoteStyle),ye(gn,it,We+1,pt)}return ye(gn,wt,We+1,pt)}if(typeof se=="function"&&!Le(se)){var En=bt(se),Cn=It(se,Nn);return"[Function"+(En?": "+En:" (anonymous)")+"]"+(Cn.length>0?" { "+H.call(Cn,", ")+" }":"")}if(ot(se)){var rr=fe?Y.call(String(se),/^(Symbol\(.*\))_[^)]*$/,"$1"):ne.call(se);return typeof se=="object"&&!fe?$t(rr):rr}if(dn(se)){for(var Bt="<"+W.call(String(se.nodeName)),Ut=se.attributes||[],yn=0;yn<Ut.length;yn++)Bt+=" "+Ut[yn].name+"="+Fe(_e(Ut[yn].value),"double",wt);return Bt+=">",se.childNodes&&se.childNodes.length&&(Bt+="..."),Bt+="</"+W.call(String(se.nodeName))+">",Bt}if(De(se)){if(se.length===0)return"[]";var Ft=It(se,Nn);return kn&&!Yt(Ft)?"["+Tt(Ft,kn)+"]":"[ "+H.call(Ft,", ")+" ]"}if(Oe(se)){var jn=It(se,Nn);return!("cause"in Error.prototype)&&"cause"in se&&!j.call(se,"cause")?"{ ["+String(se)+"] "+H.call(ee.call("[cause]: "+Nn(se.cause),jn),", ")+" }":jn.length===0?"["+String(se)+"]":"{ ["+String(se)+"] "+H.call(jn,", ")+" }"}if(typeof se=="object"&&qt){if(J&&typeof se[J]=="function"&&be)return be(se,{depth:ln-We});if(qt!=="symbol"&&typeof se.inspect=="function")return se.inspect()}if(Nt(se)){var Hn=[];return r&&r.call(se,function(gn,Dt){Hn.push(Nn(Dt,se,!0)+" => "+Nn(gn,se))}),Pt("Map",t.call(se),Hn,kn)}if(pn(se)){var Rn=[];return a&&a.call(se,function(gn){Rn.push(Nn(gn,se))}),Pt("Set",l.call(se),Rn,kn)}if(_t(se))return vn("WeakMap");if(Kt(se))return vn("WeakSet");if(rn(se))return vn("WeakRef");if(Ve(se))return $t(Nn(Number(se)));if(Xe(se))return $t(Nn(Z.call(se)));if(Pe(se))return $t(S.call(se));if(Ge(se))return $t(Nn(String(se)));if(typeof window<"u"&&se===window)return"{ [object Window] }";if(typeof globalThis<"u"&&se===globalThis||typeof jd<"u"&&se===jd)return"{ [object globalThis] }";if(!Re(se)&&!Le(se)){var Et=It(se,Nn),rt=re?re(se)===Object.prototype:se instanceof Object||se.constructor===Object,tn=se instanceof Object?"":"null prototype",Ln=!rt&&ae&&Object(se)===se&&ae in se?P.call(mt(se),8,-1):tn?"Object":"",mr=rt||typeof se.constructor!="function"?"":se.constructor.name?se.constructor.name+" ":"",wr=mr+(Ln||tn?"["+H.call(ee.call([],Ln||[],tn||[]),": ")+"] ":"");return Et.length===0?wr+"{}":kn?wr+"{"+Tt(Et,kn)+"}":wr+"{ "+H.call(Et,", ")+" }"}return String(se)};function Fe(ye,se,He){var We=He.quoteStyle||se,pt=pe[We];return pt+ye+pt}function _e(ye){return Y.call(String(ye),/"/g,""")}function Me(ye){return!ae||!(typeof ye=="object"&&(ae in ye||typeof ye[ae]<"u"))}function De(ye){return mt(ye)==="[object Array]"&&Me(ye)}function Re(ye){return mt(ye)==="[object Date]"&&Me(ye)}function Le(ye){return mt(ye)==="[object RegExp]"&&Me(ye)}function Oe(ye){return mt(ye)==="[object Error]"&&Me(ye)}function Ge(ye){return mt(ye)==="[object String]"&&Me(ye)}function Ve(ye){return mt(ye)==="[object Number]"&&Me(ye)}function Pe(ye){return mt(ye)==="[object Boolean]"&&Me(ye)}function ot(ye){if(fe)return ye&&typeof ye=="object"&&ye instanceof Symbol;if(typeof ye=="symbol")return!0;if(!ye||typeof ye!="object"||!ne)return!1;try{return ne.call(ye),!0}catch{}return!1}function Xe(ye){if(!ye||typeof ye!="object"||!Z)return!1;try{return Z.call(ye),!0}catch{}return!1}var lt=Object.prototype.hasOwnProperty||function(ye){return ye in this};function Ye(ye,se){return lt.call(ye,se)}function mt(ye){return R.call(ye)}function bt(ye){if(ye.name)return ye.name;var se=O.call(I.call(ye),/^function\s*([\w$]+)/);return se?se[1]:null}function Mt(ye,se){if(ye.indexOf)return ye.indexOf(se);for(var He=0,We=ye.length;He<We;He++)if(ye[He]===se)return He;return-1}function Nt(ye){if(!t||!ye||typeof ye!="object")return!1;try{t.call(ye);try{l.call(ye)}catch{return!0}return ye instanceof Map}catch{}return!1}function _t(ye){if(!h||!ye||typeof ye!="object")return!1;try{h.call(ye,h);try{x.call(ye,x)}catch{return!0}return ye instanceof WeakMap}catch{}return!1}function rn(ye){if(!_||!ye||typeof ye!="object")return!1;try{return _.call(ye),!0}catch{}return!1}function pn(ye){if(!l||!ye||typeof ye!="object")return!1;try{l.call(ye);try{t.call(ye)}catch{return!0}return ye instanceof Set}catch{}return!1}function Kt(ye){if(!x||!ye||typeof ye!="object")return!1;try{x.call(ye,x);try{h.call(ye,h)}catch{return!0}return ye instanceof WeakSet}catch{}return!1}function dn(ye){return!ye||typeof ye!="object"?!1:typeof HTMLElement<"u"&&ye instanceof HTMLElement?!0:typeof ye.nodeName=="string"&&typeof ye.getAttribute=="function"}function zt(ye,se){if(ye.length>se.maxStringLength){var He=ye.length-se.maxStringLength,We="... "+He+" more character"+(He>1?"s":"");return zt(P.call(ye,0,se.maxStringLength),se)+We}var pt=Te[se.quoteStyle||"single"];pt.lastIndex=0;var wt=Y.call(Y.call(ye,pt,"\\$1"),/[\x00-\x1f]/g,wn);return Fe(wt,"single",se)}function wn(ye){var se=ye.charCodeAt(0),He={8:"b",9:"t",10:"n",12:"f",13:"r"}[se];return He?"\\"+He:"\\x"+(se<16?"0":"")+z.call(se.toString(16))}function $t(ye){return"Object("+ye+")"}function vn(ye){return ye+" { ? }"}function Pt(ye,se,He,We){var pt=We?Tt(He,We):H.call(He,", ");return ye+" ("+se+") {"+pt+"}"}function Yt(ye){for(var se=0;se<ye.length;se++)if(Mt(ye[se],`
|
|
485
485
|
`)>=0)return!1;return!0}function ct(ye,se){var He;if(ye.indent===" ")He=" ";else if(typeof ye.indent=="number"&&ye.indent>0)He=H.call(Array(ye.indent+1)," ");else return null;return{base:He,prev:H.call(Array(se+1),He)}}function Tt(ye,se){if(ye.length===0)return"";var He=`
|
|
486
486
|
`+se.prev+se.base;return He+H.call(ye,","+He)+`
|
|
487
|
-
`+se.prev}function It(ye,se){var He=De(ye),We=[];if(He){We.length=ye.length;for(var pt=0;pt<ye.length;pt++)We[pt]=Ye(ye,pt)?se(ye[pt],ye):""}var wt=typeof te=="function"?te(ye):[],qt;if(fe){qt={};for(var Jt=0;Jt<wt.length;Jt++)qt["$"+wt[Jt]]=wt[Jt]}for(var Vt in ye)Ye(ye,Vt)&&(He&&String(Number(Vt))===Vt&&Vt<ye.length||fe&&qt["$"+Vt]instanceof Symbol||(B.call(/[^\w$]/,Vt)?We.push(se(Vt,ye)+": "+se(ye[Vt],ye)):We.push(Vt+": "+se(ye[Vt],ye))));if(typeof te=="function")for(var hn=0;hn<wt.length;hn++)j.call(ye,wt[hn])&&We.push("["+se(wt[hn])+"]: "+se(ye[wt[hn]],ye));return We}return Bb}var zb,Xw;function wU(){if(Xw)return zb;Xw=1;var n=Wv(),e=B1(),t=function(a,u,h){for(var y=a,x;(x=y.next)!=null;y=x)if(x.key===u)return y.next=x.next,h||(x.next=a.next,a.next=x),x},r=function(a,u){if(a){var h=t(a,u);return h&&h.value}},i=function(a,u,h){var y=t(a,u);y?y.value=h:a.next={key:u,next:a.next,value:h}},o=function(a,u){return a?!!t(a,u):!1},l=function(a,u){if(a)return t(a,u,!0)};return zb=function(){var u,h={assert:function(y){if(!h.has(y))throw new e("Side channel does not contain "+n(y))},delete:function(y){var x=u&&u.next,w=l(u,y);return w&&x&&x===w&&(u=void 0),!!w},get:function(y){return r(u,y)},has:function(y){return o(u,y)},set:function(y,x){u||(u={next:void 0}),i(u,y,x)}};return h},zb}var Hb,Kw;function j4(){return Kw||(Kw=1,Hb=Object),Hb}var Wb,Jw;function CU(){return Jw||(Jw=1,Wb=Error),Wb}var Ub,Qw;function _U(){return Qw||(Qw=1,Ub=EvalError),Ub}var Gb,qw;function SU(){return qw||(qw=1,Gb=RangeError),Gb}var Yb,jw;function EU(){return jw||(jw=1,Yb=ReferenceError),Yb}var Vb,$w;function AU(){return $w||($w=1,Vb=SyntaxError),Vb}var Zb,eC;function TU(){return eC||(eC=1,Zb=URIError),Zb}var Xb,tC;function RU(){return tC||(tC=1,Xb=Math.abs),Xb}var Kb,nC;function IU(){return nC||(nC=1,Kb=Math.floor),Kb}var Jb,rC;function kU(){return rC||(rC=1,Jb=Math.max),Jb}var Qb,iC;function MU(){return iC||(iC=1,Qb=Math.min),Qb}var qb,oC;function LU(){return oC||(oC=1,qb=Math.pow),qb}var jb,lC;function OU(){return lC||(lC=1,jb=Math.round),jb}var $b,sC;function PU(){return sC||(sC=1,$b=Number.isNaN||function(e){return e!==e}),$b}var ey,aC;function DU(){if(aC)return ey;aC=1;var n=PU();return ey=function(t){return n(t)||t===0?t:t<0?-1:1},ey}var ty,cC;function NU(){return cC||(cC=1,ty=Object.getOwnPropertyDescriptor),ty}var ny,uC;function $4(){if(uC)return ny;uC=1;var n=NU();if(n)try{n([],"length")}catch{n=null}return ny=n,ny}var ry,fC;function FU(){if(fC)return ry;fC=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return ry=n,ry}var iy,dC;function BU(){return dC||(dC=1,iy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var l=Object.getOwnPropertySymbols(e);if(l.length!==1||l[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}),iy}var oy,hC;function zU(){if(hC)return oy;hC=1;var n=typeof Symbol<"u"&&Symbol,e=BU();return oy=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},oy}var ly,gC;function e5(){return gC||(gC=1,ly=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ly}var sy,pC;function t5(){if(pC)return sy;pC=1;var n=j4();return sy=n.getPrototypeOf||null,sy}var ay,vC;function HU(){if(vC)return ay;vC=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,r="[object Function]",i=function(u,h){for(var y=[],x=0;x<u.length;x+=1)y[x]=u[x];for(var w=0;w<h.length;w+=1)y[w+u.length]=h[w];return y},o=function(u,h){for(var y=[],x=h,w=0;x<u.length;x+=1,w+=1)y[w]=u[x];return y},l=function(a,u){for(var h="",y=0;y<a.length;y+=1)h+=a[y],y+1<a.length&&(h+=u);return h};return ay=function(u){var h=this;if(typeof h!="function"||e.apply(h)!==r)throw new TypeError(n+h);for(var y=o(arguments,1),x,w=function(){if(this instanceof x){var O=h.apply(this,i(y,arguments));return Object(O)===O?O:this}return h.apply(u,i(y,arguments))},_=t(0,h.length-y.length),S=[],R=0;R<_;R++)S[R]="$"+R;if(x=Function("binder","return function ("+l(S,",")+"){ return binder.apply(this,arguments); }")(w),h.prototype){var I=function(){};I.prototype=h.prototype,x.prototype=new I,I.prototype=null}return x},ay}var cy,bC;function Uv(){if(bC)return cy;bC=1;var n=HU();return cy=Function.prototype.bind||n,cy}var uy,yC;function l2(){return yC||(yC=1,uy=Function.prototype.call),uy}var fy,mC;function n5(){return mC||(mC=1,fy=Function.prototype.apply),fy}var dy,xC;function WU(){return xC||(xC=1,dy=typeof Reflect<"u"&&Reflect&&Reflect.apply),dy}var hy,wC;function UU(){if(wC)return hy;wC=1;var n=Uv(),e=n5(),t=l2(),r=WU();return hy=r||n.call(t,e),hy}var gy,CC;function r5(){if(CC)return gy;CC=1;var n=Uv(),e=B1(),t=l2(),r=UU();return gy=function(o){if(o.length<1||typeof o[0]!="function")throw new e("a function is required");return r(n,t,o)},gy}var py,_C;function GU(){if(_C)return py;_C=1;var n=r5(),e=$4(),t;try{t=[].__proto__===Array.prototype}catch(l){if(!l||typeof l!="object"||!("code"in l)||l.code!=="ERR_PROTO_ACCESS")throw l}var r=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return py=r&&typeof r.get=="function"?n([r.get]):typeof o=="function"?function(a){return o(a==null?a:i(a))}:!1,py}var vy,SC;function YU(){if(SC)return vy;SC=1;var n=e5(),e=t5(),t=GU();return vy=n?function(i){return n(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,vy}var by,EC;function VU(){if(EC)return by;EC=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=Uv();return by=t.call(n,e),by}var yy,AC;function s2(){if(AC)return yy;AC=1;var n,e=j4(),t=CU(),r=_U(),i=SU(),o=EU(),l=AU(),a=B1(),u=TU(),h=RU(),y=IU(),x=kU(),w=MU(),_=LU(),S=OU(),R=DU(),I=Function,O=function(Le){try{return I('"use strict"; return ('+Le+").constructor;")()}catch{}},P=$4(),Y=FU(),z=function(){throw new a},W=P?(function(){try{return arguments.callee,z}catch{try{return P(arguments,"callee").get}catch{return z}}})():z,B=zU()(),ee=YU(),H=t5(),V=e5(),de=n5(),Z=l2(),te={},ne=typeof Uint8Array>"u"||!ee?n:ee(Uint8Array),fe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":B&&ee?ee([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":te,"%AsyncGenerator%":te,"%AsyncGeneratorFunction%":te,"%AsyncIteratorPrototype%":te,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":I,"%GeneratorFunction%":te,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":B&&ee?ee(ee([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!B||!ee?n:ee(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":P,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!B||!ee?n:ee(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":B&&ee?ee(""[Symbol.iterator]()):n,"%Symbol%":B?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":W,"%TypedArray%":ne,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":Z,"%Function.prototype.apply%":de,"%Object.defineProperty%":Y,"%Object.getPrototypeOf%":H,"%Math.abs%":h,"%Math.floor%":y,"%Math.max%":x,"%Math.min%":w,"%Math.pow%":_,"%Math.round%":S,"%Math.sign%":R,"%Reflect.getPrototypeOf%":V};if(ee)try{null.error}catch(Le){var ae=ee(ee(Le));fe["%Error.prototype%"]=ae}var j=function Le(Oe){var Ge;if(Oe==="%AsyncFunction%")Ge=O("async function () {}");else if(Oe==="%GeneratorFunction%")Ge=O("function* () {}");else if(Oe==="%AsyncGeneratorFunction%")Ge=O("async function* () {}");else if(Oe==="%AsyncGenerator%"){var Ve=Le("%AsyncGeneratorFunction%");Ve&&(Ge=Ve.prototype)}else if(Oe==="%AsyncIteratorPrototype%"){var Pe=Le("%AsyncGenerator%");Pe&&ee&&(Ge=ee(Pe.prototype))}return fe[Oe]=Ge,Ge},re={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},he=Uv(),be=VU(),le=he.call(Z,Array.prototype.concat),J=he.call(de,Array.prototype.splice),pe=he.call(Z,String.prototype.replace),Te=he.call(Z,String.prototype.slice),Fe=he.call(Z,RegExp.prototype.exec),_e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Me=/\\(\\)?/g,De=function(Oe){var Ge=Te(Oe,0,1),Ve=Te(Oe,-1);if(Ge==="%"&&Ve!=="%")throw new l("invalid intrinsic syntax, expected closing `%`");if(Ve==="%"&&Ge!=="%")throw new l("invalid intrinsic syntax, expected opening `%`");var Pe=[];return pe(Oe,_e,function(ot,Xe,lt,Ye){Pe[Pe.length]=lt?pe(Ye,Me,"$1"):Xe||ot}),Pe},Re=function(Oe,Ge){var Ve=Oe,Pe;if(be(re,Ve)&&(Pe=re[Ve],Ve="%"+Pe[0]+"%"),be(fe,Ve)){var ot=fe[Ve];if(ot===te&&(ot=j(Ve)),typeof ot>"u"&&!Ge)throw new a("intrinsic "+Oe+" exists, but is not available. Please file an issue!");return{alias:Pe,name:Ve,value:ot}}throw new l("intrinsic "+Oe+" does not exist!")};return yy=function(Oe,Ge){if(typeof Oe!="string"||Oe.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ge!="boolean")throw new a('"allowMissing" argument must be a boolean');if(Fe(/^%?[^%]*%?$/,Oe)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ve=De(Oe),Pe=Ve.length>0?Ve[0]:"",ot=Re("%"+Pe+"%",Ge),Xe=ot.name,lt=ot.value,Ye=!1,mt=ot.alias;mt&&(Pe=mt[0],J(Ve,le([0,1],mt)));for(var bt=1,Mt=!0;bt<Ve.length;bt+=1){var Nt=Ve[bt],_t=Te(Nt,0,1),rn=Te(Nt,-1);if((_t==='"'||_t==="'"||_t==="`"||rn==='"'||rn==="'"||rn==="`")&&_t!==rn)throw new l("property names with quotes must have matching quotes");if((Nt==="constructor"||!Mt)&&(Ye=!0),Pe+="."+Nt,Xe="%"+Pe+"%",be(fe,Xe))lt=fe[Xe];else if(lt!=null){if(!(Nt in lt)){if(!Ge)throw new a("base intrinsic for "+Oe+" exists, but the property is not available.");return}if(P&&bt+1>=Ve.length){var pn=P(lt,Nt);Mt=!!pn,Mt&&"get"in pn&&!("originalValue"in pn.get)?lt=pn.get:lt=lt[Nt]}else Mt=be(lt,Nt),lt=lt[Nt];Mt&&!Ye&&(fe[Xe]=lt)}}return lt},yy}var my,TC;function i5(){if(TC)return my;TC=1;var n=s2(),e=r5(),t=e([n("%String.prototype.indexOf%")]);return my=function(i,o){var l=n(i,!!o);return typeof l=="function"&&t(i,".prototype.")>-1?e([l]):l},my}var xy,RC;function o5(){if(RC)return xy;RC=1;var n=s2(),e=i5(),t=Wv(),r=B1(),i=n("%Map%",!0),o=e("Map.prototype.get",!0),l=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),h=e("Map.prototype.size",!0);return xy=!!i&&function(){var x,w={assert:function(_){if(!w.has(_))throw new r("Side channel does not contain "+t(_))},delete:function(_){if(x){var S=u(x,_);return h(x)===0&&(x=void 0),S}return!1},get:function(_){if(x)return o(x,_)},has:function(_){return x?a(x,_):!1},set:function(_,S){x||(x=new i),l(x,_,S)}};return w},xy}var wy,IC;function ZU(){if(IC)return wy;IC=1;var n=s2(),e=i5(),t=Wv(),r=o5(),i=B1(),o=n("%WeakMap%",!0),l=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),h=e("WeakMap.prototype.delete",!0);return wy=o?function(){var x,w,_={assert:function(S){if(!_.has(S))throw new i("Side channel does not contain "+t(S))},delete:function(S){if(o&&S&&(typeof S=="object"||typeof S=="function")){if(x)return h(x,S)}else if(r&&w)return w.delete(S);return!1},get:function(S){return o&&S&&(typeof S=="object"||typeof S=="function")&&x?l(x,S):w&&w.get(S)},has:function(S){return o&&S&&(typeof S=="object"||typeof S=="function")&&x?u(x,S):!!w&&w.has(S)},set:function(S,R){o&&S&&(typeof S=="object"||typeof S=="function")?(x||(x=new o),a(x,S,R)):r&&(w||(w=r()),w.set(S,R))}};return _}:r,wy}var Cy,kC;function XU(){if(kC)return Cy;kC=1;var n=B1(),e=Wv(),t=wU(),r=o5(),i=ZU(),o=i||r||t;return Cy=function(){var a,u={assert:function(h){if(!u.has(h))throw new n("Side channel does not contain "+e(h))},delete:function(h){return!!a&&a.delete(h)},get:function(h){return a&&a.get(h)},has:function(h){return!!a&&a.has(h)},set:function(h,y){a||(a=o()),a.set(h,y)}};return u},Cy}var _y,MC;function a2(){if(MC)return _y;MC=1;var n=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return _y={default:t.RFC3986,formatters:{RFC1738:function(r){return n.call(r,e,"+")},RFC3986:function(r){return String(r)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},_y}var Sy,LC;function l5(){if(LC)return Sy;LC=1;var n=a2(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r=(function(){for(var I=[],O=0;O<256;++O)I.push("%"+((O<16?"0":"")+O.toString(16)).toUpperCase());return I})(),i=function(O){for(;O.length>1;){var P=O.pop(),Y=P.obj[P.prop];if(t(Y)){for(var z=[],W=0;W<Y.length;++W)typeof Y[W]<"u"&&z.push(Y[W]);P.obj[P.prop]=z}}},o=function(O,P){for(var Y=P&&P.plainObjects?{__proto__:null}:{},z=0;z<O.length;++z)typeof O[z]<"u"&&(Y[z]=O[z]);return Y},l=function I(O,P,Y){if(!P)return O;if(typeof P!="object"&&typeof P!="function"){if(t(O))O.push(P);else if(O&&typeof O=="object")(Y&&(Y.plainObjects||Y.allowPrototypes)||!e.call(Object.prototype,P))&&(O[P]=!0);else return[O,P];return O}if(!O||typeof O!="object")return[O].concat(P);var z=O;return t(O)&&!t(P)&&(z=o(O,Y)),t(O)&&t(P)?(P.forEach(function(W,B){if(e.call(O,B)){var ee=O[B];ee&&typeof ee=="object"&&W&&typeof W=="object"?O[B]=I(ee,W,Y):O.push(W)}else O[B]=W}),O):Object.keys(P).reduce(function(W,B){var ee=P[B];return e.call(W,B)?W[B]=I(W[B],ee,Y):W[B]=ee,W},z)},a=function(O,P){return Object.keys(P).reduce(function(Y,z){return Y[z]=P[z],Y},O)},u=function(I,O,P){var Y=I.replace(/\+/g," ");if(P==="iso-8859-1")return Y.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(Y)}catch{return Y}},h=1024,y=function(O,P,Y,z,W){if(O.length===0)return O;var B=O;if(typeof O=="symbol"?B=Symbol.prototype.toString.call(O):typeof O!="string"&&(B=String(O)),Y==="iso-8859-1")return escape(B).replace(/%u[0-9a-f]{4}/gi,function(ne){return"%26%23"+parseInt(ne.slice(2),16)+"%3B"});for(var ee="",H=0;H<B.length;H+=h){for(var V=B.length>=h?B.slice(H,H+h):B,de=[],Z=0;Z<V.length;++Z){var te=V.charCodeAt(Z);if(te===45||te===46||te===95||te===126||te>=48&&te<=57||te>=65&&te<=90||te>=97&&te<=122||W===n.RFC1738&&(te===40||te===41)){de[de.length]=V.charAt(Z);continue}if(te<128){de[de.length]=r[te];continue}if(te<2048){de[de.length]=r[192|te>>6]+r[128|te&63];continue}if(te<55296||te>=57344){de[de.length]=r[224|te>>12]+r[128|te>>6&63]+r[128|te&63];continue}Z+=1,te=65536+((te&1023)<<10|V.charCodeAt(Z)&1023),de[de.length]=r[240|te>>18]+r[128|te>>12&63]+r[128|te>>6&63]+r[128|te&63]}ee+=de.join("")}return ee},x=function(O){for(var P=[{obj:{o:O},prop:"o"}],Y=[],z=0;z<P.length;++z)for(var W=P[z],B=W.obj[W.prop],ee=Object.keys(B),H=0;H<ee.length;++H){var V=ee[H],de=B[V];typeof de=="object"&&de!==null&&Y.indexOf(de)===-1&&(P.push({obj:B,prop:V}),Y.push(de))}return i(P),O},w=function(O){return Object.prototype.toString.call(O)==="[object RegExp]"},_=function(O){return!O||typeof O!="object"?!1:!!(O.constructor&&O.constructor.isBuffer&&O.constructor.isBuffer(O))},S=function(O,P){return[].concat(O,P)},R=function(O,P){if(t(O)){for(var Y=[],z=0;z<O.length;z+=1)Y.push(P(O[z]));return Y}return P(O)};return Sy={arrayToObject:o,assign:a,combine:S,compact:x,decode:u,encode:y,isBuffer:_,isRegExp:w,maybeMap:R,merge:l},Sy}var Ey,OC;function KU(){if(OC)return Ey;OC=1;var n=XU(),e=l5(),t=a2(),r=Object.prototype.hasOwnProperty,i={brackets:function(I){return I+"[]"},comma:"comma",indices:function(I,O){return I+"["+O+"]"},repeat:function(I){return I}},o=Array.isArray,l=Array.prototype.push,a=function(R,I){l.apply(R,o(I)?I:[I])},u=Date.prototype.toISOString,h=t.default,y={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:h,formatter:t.formatters[h],indices:!1,serializeDate:function(I){return u.call(I)},skipNulls:!1,strictNullHandling:!1},x=function(I){return typeof I=="string"||typeof I=="number"||typeof I=="boolean"||typeof I=="symbol"||typeof I=="bigint"},w={},_=function R(I,O,P,Y,z,W,B,ee,H,V,de,Z,te,ne,fe,ae,j,re){for(var he=I,be=re,le=0,J=!1;(be=be.get(w))!==void 0&&!J;){var pe=be.get(I);if(le+=1,typeof pe<"u"){if(pe===le)throw new RangeError("Cyclic object value");J=!0}typeof be.get(w)>"u"&&(le=0)}if(typeof V=="function"?he=V(O,he):he instanceof Date?he=te(he):P==="comma"&&o(he)&&(he=e.maybeMap(he,function(Xe){return Xe instanceof Date?te(Xe):Xe})),he===null){if(W)return H&&!ae?H(O,y.encoder,j,"key",ne):O;he=""}if(x(he)||e.isBuffer(he)){if(H){var Te=ae?O:H(O,y.encoder,j,"key",ne);return[fe(Te)+"="+fe(H(he,y.encoder,j,"value",ne))]}return[fe(O)+"="+fe(String(he))]}var Fe=[];if(typeof he>"u")return Fe;var _e;if(P==="comma"&&o(he))ae&&H&&(he=e.maybeMap(he,H)),_e=[{value:he.length>0?he.join(",")||null:void 0}];else if(o(V))_e=V;else{var Me=Object.keys(he);_e=de?Me.sort(de):Me}var De=ee?String(O).replace(/\./g,"%2E"):String(O),Re=Y&&o(he)&&he.length===1?De+"[]":De;if(z&&o(he)&&he.length===0)return Re+"[]";for(var Le=0;Le<_e.length;++Le){var Oe=_e[Le],Ge=typeof Oe=="object"&&Oe&&typeof Oe.value<"u"?Oe.value:he[Oe];if(!(B&&Ge===null)){var Ve=Z&&ee?String(Oe).replace(/\./g,"%2E"):String(Oe),Pe=o(he)?typeof P=="function"?P(Re,Ve):Re:Re+(Z?"."+Ve:"["+Ve+"]");re.set(I,le);var ot=n();ot.set(w,re),a(Fe,R(Ge,Pe,P,Y,z,W,B,ee,P==="comma"&&ae&&o(he)?null:H,V,de,Z,te,ne,fe,ae,j,ot))}}return Fe},S=function(I){if(!I)return y;if(typeof I.allowEmptyArrays<"u"&&typeof I.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof I.encodeDotInKeys<"u"&&typeof I.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(I.encoder!==null&&typeof I.encoder<"u"&&typeof I.encoder!="function")throw new TypeError("Encoder has to be a function.");var O=I.charset||y.charset;if(typeof I.charset<"u"&&I.charset!=="utf-8"&&I.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var P=t.default;if(typeof I.format<"u"){if(!r.call(t.formatters,I.format))throw new TypeError("Unknown format option provided.");P=I.format}var Y=t.formatters[P],z=y.filter;(typeof I.filter=="function"||o(I.filter))&&(z=I.filter);var W;if(I.arrayFormat in i?W=I.arrayFormat:"indices"in I?W=I.indices?"indices":"repeat":W=y.arrayFormat,"commaRoundTrip"in I&&typeof I.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var B=typeof I.allowDots>"u"?I.encodeDotInKeys===!0?!0:y.allowDots:!!I.allowDots;return{addQueryPrefix:typeof I.addQueryPrefix=="boolean"?I.addQueryPrefix:y.addQueryPrefix,allowDots:B,allowEmptyArrays:typeof I.allowEmptyArrays=="boolean"?!!I.allowEmptyArrays:y.allowEmptyArrays,arrayFormat:W,charset:O,charsetSentinel:typeof I.charsetSentinel=="boolean"?I.charsetSentinel:y.charsetSentinel,commaRoundTrip:!!I.commaRoundTrip,delimiter:typeof I.delimiter>"u"?y.delimiter:I.delimiter,encode:typeof I.encode=="boolean"?I.encode:y.encode,encodeDotInKeys:typeof I.encodeDotInKeys=="boolean"?I.encodeDotInKeys:y.encodeDotInKeys,encoder:typeof I.encoder=="function"?I.encoder:y.encoder,encodeValuesOnly:typeof I.encodeValuesOnly=="boolean"?I.encodeValuesOnly:y.encodeValuesOnly,filter:z,format:P,formatter:Y,serializeDate:typeof I.serializeDate=="function"?I.serializeDate:y.serializeDate,skipNulls:typeof I.skipNulls=="boolean"?I.skipNulls:y.skipNulls,sort:typeof I.sort=="function"?I.sort:null,strictNullHandling:typeof I.strictNullHandling=="boolean"?I.strictNullHandling:y.strictNullHandling}};return Ey=function(R,I){var O=R,P=S(I),Y,z;typeof P.filter=="function"?(z=P.filter,O=z("",O)):o(P.filter)&&(z=P.filter,Y=z);var W=[];if(typeof O!="object"||O===null)return"";var B=i[P.arrayFormat],ee=B==="comma"&&P.commaRoundTrip;Y||(Y=Object.keys(O)),P.sort&&Y.sort(P.sort);for(var H=n(),V=0;V<Y.length;++V){var de=Y[V],Z=O[de];P.skipNulls&&Z===null||a(W,_(Z,de,B,ee,P.allowEmptyArrays,P.strictNullHandling,P.skipNulls,P.encodeDotInKeys,P.encode?P.encoder:null,P.filter,P.sort,P.allowDots,P.serializeDate,P.format,P.formatter,P.encodeValuesOnly,P.charset,H))}var te=W.join(P.delimiter),ne=P.addQueryPrefix===!0?"?":"";return P.charsetSentinel&&(P.charset==="iso-8859-1"?ne+="utf8=%26%2310003%3B&":ne+="utf8=%E2%9C%93&"),te.length>0?ne+te:""},Ey}var Ay,PC;function JU(){if(PC)return Ay;PC=1;var n=l5(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},i=function(w){return w.replace(/&#(\d+);/g,function(_,S){return String.fromCharCode(parseInt(S,10))})},o=function(w,_,S){if(w&&typeof w=="string"&&_.comma&&w.indexOf(",")>-1)return w.split(",");if(_.throwOnLimitExceeded&&S>=_.arrayLimit)throw new RangeError("Array limit exceeded. Only "+_.arrayLimit+" element"+(_.arrayLimit===1?"":"s")+" allowed in an array.");return w},l="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",u=function(_,S){var R={__proto__:null},I=S.ignoreQueryPrefix?_.replace(/^\?/,""):_;I=I.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var O=S.parameterLimit===1/0?void 0:S.parameterLimit,P=I.split(S.delimiter,S.throwOnLimitExceeded?O+1:O);if(S.throwOnLimitExceeded&&P.length>O)throw new RangeError("Parameter limit exceeded. Only "+O+" parameter"+(O===1?"":"s")+" allowed.");var Y=-1,z,W=S.charset;if(S.charsetSentinel)for(z=0;z<P.length;++z)P[z].indexOf("utf8=")===0&&(P[z]===a?W="utf-8":P[z]===l&&(W="iso-8859-1"),Y=z,z=P.length);for(z=0;z<P.length;++z)if(z!==Y){var B=P[z],ee=B.indexOf("]="),H=ee===-1?B.indexOf("="):ee+1,V,de;H===-1?(V=S.decoder(B,r.decoder,W,"key"),de=S.strictNullHandling?null:""):(V=S.decoder(B.slice(0,H),r.decoder,W,"key"),de=n.maybeMap(o(B.slice(H+1),S,t(R[V])?R[V].length:0),function(te){return S.decoder(te,r.decoder,W,"value")})),de&&S.interpretNumericEntities&&W==="iso-8859-1"&&(de=i(String(de))),B.indexOf("[]=")>-1&&(de=t(de)?[de]:de);var Z=e.call(R,V);Z&&S.duplicates==="combine"?R[V]=n.combine(R[V],de):(!Z||S.duplicates==="last")&&(R[V]=de)}return R},h=function(w,_,S,R){var I=0;if(w.length>0&&w[w.length-1]==="[]"){var O=w.slice(0,-1).join("");I=Array.isArray(_)&&_[O]?_[O].length:0}for(var P=R?_:o(_,S,I),Y=w.length-1;Y>=0;--Y){var z,W=w[Y];if(W==="[]"&&S.parseArrays)z=S.allowEmptyArrays&&(P===""||S.strictNullHandling&&P===null)?[]:n.combine([],P);else{z=S.plainObjects?{__proto__:null}:{};var B=W.charAt(0)==="["&&W.charAt(W.length-1)==="]"?W.slice(1,-1):W,ee=S.decodeDotInKeys?B.replace(/%2E/g,"."):B,H=parseInt(ee,10);!S.parseArrays&&ee===""?z={0:P}:!isNaN(H)&&W!==ee&&String(H)===ee&&H>=0&&S.parseArrays&&H<=S.arrayLimit?(z=[],z[H]=P):ee!=="__proto__"&&(z[ee]=P)}P=z}return P},y=function(_,S,R,I){if(_){var O=R.allowDots?_.replace(/\.([^.[]+)/g,"[$1]"):_,P=/(\[[^[\]]*])/,Y=/(\[[^[\]]*])/g,z=R.depth>0&&P.exec(O),W=z?O.slice(0,z.index):O,B=[];if(W){if(!R.plainObjects&&e.call(Object.prototype,W)&&!R.allowPrototypes)return;B.push(W)}for(var ee=0;R.depth>0&&(z=Y.exec(O))!==null&&ee<R.depth;){if(ee+=1,!R.plainObjects&&e.call(Object.prototype,z[1].slice(1,-1))&&!R.allowPrototypes)return;B.push(z[1])}if(z){if(R.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+R.depth+" and strictDepth is true");B.push("["+O.slice(z.index)+"]")}return h(B,S,R,I)}},x=function(_){if(!_)return r;if(typeof _.allowEmptyArrays<"u"&&typeof _.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof _.decodeDotInKeys<"u"&&typeof _.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(_.decoder!==null&&typeof _.decoder<"u"&&typeof _.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof _.charset<"u"&&_.charset!=="utf-8"&&_.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof _.throwOnLimitExceeded<"u"&&typeof _.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var S=typeof _.charset>"u"?r.charset:_.charset,R=typeof _.duplicates>"u"?r.duplicates:_.duplicates;if(R!=="combine"&&R!=="first"&&R!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var I=typeof _.allowDots>"u"?_.decodeDotInKeys===!0?!0:r.allowDots:!!_.allowDots;return{allowDots:I,allowEmptyArrays:typeof _.allowEmptyArrays=="boolean"?!!_.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof _.allowPrototypes=="boolean"?_.allowPrototypes:r.allowPrototypes,allowSparse:typeof _.allowSparse=="boolean"?_.allowSparse:r.allowSparse,arrayLimit:typeof _.arrayLimit=="number"?_.arrayLimit:r.arrayLimit,charset:S,charsetSentinel:typeof _.charsetSentinel=="boolean"?_.charsetSentinel:r.charsetSentinel,comma:typeof _.comma=="boolean"?_.comma:r.comma,decodeDotInKeys:typeof _.decodeDotInKeys=="boolean"?_.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof _.decoder=="function"?_.decoder:r.decoder,delimiter:typeof _.delimiter=="string"||n.isRegExp(_.delimiter)?_.delimiter:r.delimiter,depth:typeof _.depth=="number"||_.depth===!1?+_.depth:r.depth,duplicates:R,ignoreQueryPrefix:_.ignoreQueryPrefix===!0,interpretNumericEntities:typeof _.interpretNumericEntities=="boolean"?_.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof _.parameterLimit=="number"?_.parameterLimit:r.parameterLimit,parseArrays:_.parseArrays!==!1,plainObjects:typeof _.plainObjects=="boolean"?_.plainObjects:r.plainObjects,strictDepth:typeof _.strictDepth=="boolean"?!!_.strictDepth:r.strictDepth,strictNullHandling:typeof _.strictNullHandling=="boolean"?_.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof _.throwOnLimitExceeded=="boolean"?_.throwOnLimitExceeded:!1}};return Ay=function(w,_){var S=x(_);if(w===""||w===null||typeof w>"u")return S.plainObjects?{__proto__:null}:{};for(var R=typeof w=="string"?u(w,S):w,I=S.plainObjects?{__proto__:null}:{},O=Object.keys(R),P=0;P<O.length;++P){var Y=O[P],z=y(Y,R[Y],S,typeof w=="string");I=n.merge(I,z,S)}return S.allowSparse===!0?I:n.compact(I)},Ay}var Ty,DC;function QU(){if(DC)return Ty;DC=1;var n=KU(),e=JU(),t=a2();return Ty={formats:t,parse:e,stringify:n},Ty}var qU=QU();const jU=M1(qU),gm={StoredContexts:{},defaultHandler:()=>{}},s5={Init:()=>{},Create:n=>{const e=n.method+n.url;return gm.StoredContexts[e]=n,$U(n)},FetchBaseUrl:()=>window.location.href,useDefaultHandler:n=>{gm.defaultHandler=n}};function $U(n){const e=`[${n.method}] ${n.url}`;return{Call:async r=>{let{url:i,method:o,stream:l,paramType:a}=n;const{po:u,onStream:h,onStreamEnd:y,noDefaultHandle:x=[]}=r??{};(a==="query"||o==="GET")&&u!==void 0&&(i+="?"+jU.stringify(u,{arrayFormat:"comma"}));const w={method:o,headers:{Accept:"application/json;charset=UTF-8","X-Requested-With":"XMLHttpRequest","Cache-Control":"no-cache",Pragma:"no-cache",crossDomain:"true"}};if(a==="form"){const R=new FormData;if(u!==void 0)for(const I in u){const O=u[I];R.append(I,O)}w.body=R}else(a==="body"||a===void 0&&n.method!=="GET")&&(w.body=JSON.stringify(u),w.headers["Content-Type"]="application/json;charset=UTF-8");let _={errorCode:0,message:""};const S=Date.now();i=s5.FetchBaseUrl()+i;try{let R=await fetch(i,w);if(R.ok===!1)return _.errorCode=R.status,_.message=R.statusText,_;{const I=new TextDecoder("utf-8");if(l){if(R.body){let O=R.body.getReader(),P="";for(;;){const Y=await O.read();if(Y.done)break;const z=I.decode(Y.value).trim();P+=z;let W=null;try{const B=z.split("\0");let ee=B[B.length-1];for(let H=B.length-2;H>=0;H--)if(B[H].trim().length!==0){ee=B[H];break}W=await JSON.parse(ee)}catch{try{const ee=P.split("\0");let H=ee[ee.length-1];for(let V=ee.length-2;V>=0;V--)if(ee[V].trim().length!==0){H=ee[V];break}W=await JSON.parse(H)}catch{}}if(W!=null&&(Object.keys(W).includes("err_code")?_.errorCode=W.err_code:(_.errorCode=0,_.data=W,P="",Y.done?y==null||y(_.data):h==null||h(_.data))),Y.done)break}}}else if(R.body){const P=await R.body.getReader().read(),Y=I.decode(P.value);if(Y==="null")return _;{let z=await JSON.parse(Y.replaceAll("\0",""));Object.keys(z).includes("err_code")?(_.errorCode=z.err_code,_.message=z.err_msg):_.data=z}}}}catch(R){console.warn(R),_.errorCode=-1,_.message=R.message}return console.debug(`${e} ${Date.now()-S}ms`),x!==!0&&await gm.defaultHandler(_,x),_}}}exports.ABase=Gi;exports.ABaseStyleKeys=i3;exports.AButton=Ic;exports.AButtonStyleKeys=l3;exports.AButtonTypes=cT;exports.ACheckBox=x1;exports.ACheckBoxStyleKeys=u3;exports.AChip=xm;exports.AChipKeys=k3;exports.AChips=w6;exports.AClock=F6;exports.AColFrame=P3;exports.ADatePicker=Sm;exports.ADatePickerStyleKeys=w3;exports.ADatePickerTypes=h8;exports.ADateRangePicker=Cm;exports.ADateRangePickerStyleKeys=C3;exports.ADialog=C8;exports.ADialogStyleKeys=f3;exports.ADialogTypes=w8;exports.ADivideFrame=N3;exports.AEditor=Fz;exports.AEditorStyleKeys=c3;exports.AFileBox=O8;exports.AFileBoxStyleKeys=b3;exports.AFileUploader=f9;exports.AFileUploaderStyleKeys=y3;exports.AFloatMenu=H3;exports.AFloatMenuKeys=A3;exports.AFrameStyleKeys=E3;exports.AGrow=zg;exports.AIcon=ho;exports.AIconButton=ba;exports.AIconButtonStyleKeys=_3;exports.AIconButtonTypes=uT;exports.AIconHOC=gA;exports.AIcons=bm;exports.AInput=sg;exports.AInputStyleKeys=s3;exports.AInputTypes=j6;exports.AListView=C9;exports.AListViewStyleKeys=m3;exports.ALoadingBorder=Am;exports.ALoadingBorderKeys=T3;exports.AMultiSelect=J9;exports.AMultiSelectStyleKeys=h3;exports.ANumInput=b9;exports.AOverflowFrame=nh;exports.AProgressBar=VC;exports.ARadioSelect=P9;exports.ARadioSelectKeys=I3;exports.ARowFrame=bl;exports.ASelect=Ah;exports.ASelectStyleKeys=d3;exports.ASelectTypes=gR;exports.ASpace=cs;exports.AStepper=uI;exports.AStepperStyleKeys=x3;exports.ASwitch=qC;exports.ASwitchFrame=D3;exports.ASwitchStyleKeys=p3;exports.ATab=U3;exports.ATabStyleKeys=v3;exports.ATabTypes=_I;exports.ATable=Nk;exports.ATableStyleKeys=S3;exports.AText=X3;exports.ATextArea=Jk;exports.ATextAreaStyleKeys=a3;exports.ATextAreaTypes=Kk;exports.AThemeButton=NT;exports.AThemes=gp;exports.ATooltip=QC;exports.ATooltipStyleKeys=o3;exports.ATree=gU;exports.ATreeStyleKeys=g3;exports.AWrap=lg;exports.AWrapKeys=R3;exports.AWrapPropsExtract=Bg;exports.AWrapTypes=vT;exports.ApiContext=s5;exports.BodyStyleKeys=r3;exports.CreateADC=R8;exports.DefaultOptionRenderer=W3;exports.EDir12=L1;exports.EDir4=oc;exports.FileSizeTrans=Mg;exports.Icons=Cv;exports.IsCursorPointer=WC;exports.IsFixedShape=HC;exports.IsInteractive=UC;exports.NoSelect=BC;exports.NoTransition=zC;exports.Resources=Nr;exports.SetResources=IA;exports.alphanumericRegex=S6;exports.bound=hp;exports.cbF=Zr;exports.changeSemanticMode=mm;exports.componentStyleKeys=RT;exports.createEvent=Ag;exports.dateF=Yn;exports.dbF=Td;exports.defaultPredicate=Y3;exports.dlgF=I8;exports.emailIdRegex=T6;exports.emailRegex=A6;exports.fileF=z3;exports.getFileKey=B3;exports.getMonthsOptions=Ap;exports.getYearsOptions=_m;exports.hangulRegex=I6;exports.hexRegex=R6;exports.key=FC;exports.noHanguljamoRegex=M6;exports.noSpaceRegex=k6;exports.numF=U0;exports.objF=er;exports.onlyAlphanumericRegex=E6;exports.paletteKeys=jC;exports.paletteModes=_v;exports.passwordRegex=O6;exports.refinedDesignTokens=sc;exports.sF=gt;exports.semanticKeys=t3;exports.semanticModes=m1;exports.setDir12Style=ym;exports.setDir12StyleElem=KC;exports.specialCharRegex=L6;exports.strF=wm;exports.tableF=_h;exports.textMeasurement=kg;exports.treeF=Qh;exports.useADialogCore=A8;exports.useADialogCores=E8;exports.useDB=L3;exports.useEvent=Z3;exports.useInit=G3;exports.useLayoutDB=O3;exports.useOffset=XC;exports.useValues=Ho;exports.uuidRegex=P6;
|
|
487
|
+
`+se.prev}function It(ye,se){var He=De(ye),We=[];if(He){We.length=ye.length;for(var pt=0;pt<ye.length;pt++)We[pt]=Ye(ye,pt)?se(ye[pt],ye):""}var wt=typeof te=="function"?te(ye):[],qt;if(fe){qt={};for(var Jt=0;Jt<wt.length;Jt++)qt["$"+wt[Jt]]=wt[Jt]}for(var Vt in ye)Ye(ye,Vt)&&(He&&String(Number(Vt))===Vt&&Vt<ye.length||fe&&qt["$"+Vt]instanceof Symbol||(B.call(/[^\w$]/,Vt)?We.push(se(Vt,ye)+": "+se(ye[Vt],ye)):We.push(Vt+": "+se(ye[Vt],ye))));if(typeof te=="function")for(var hn=0;hn<wt.length;hn++)j.call(ye,wt[hn])&&We.push("["+se(wt[hn])+"]: "+se(ye[wt[hn]],ye));return We}return Bb}var zb,Xw;function EU(){if(Xw)return zb;Xw=1;var n=Wv(),e=B1(),t=function(a,u,h){for(var y=a,x;(x=y.next)!=null;y=x)if(x.key===u)return y.next=x.next,h||(x.next=a.next,a.next=x),x},r=function(a,u){if(a){var h=t(a,u);return h&&h.value}},i=function(a,u,h){var y=t(a,u);y?y.value=h:a.next={key:u,next:a.next,value:h}},o=function(a,u){return a?!!t(a,u):!1},l=function(a,u){if(a)return t(a,u,!0)};return zb=function(){var u,h={assert:function(y){if(!h.has(y))throw new e("Side channel does not contain "+n(y))},delete:function(y){var x=u&&u.next,w=l(u,y);return w&&x&&x===w&&(u=void 0),!!w},get:function(y){return r(u,y)},has:function(y){return o(u,y)},set:function(y,x){u||(u={next:void 0}),i(u,y,x)}};return h},zb}var Hb,Kw;function j4(){return Kw||(Kw=1,Hb=Object),Hb}var Wb,Jw;function AU(){return Jw||(Jw=1,Wb=Error),Wb}var Ub,Qw;function TU(){return Qw||(Qw=1,Ub=EvalError),Ub}var Gb,qw;function RU(){return qw||(qw=1,Gb=RangeError),Gb}var Yb,jw;function IU(){return jw||(jw=1,Yb=ReferenceError),Yb}var Vb,$w;function kU(){return $w||($w=1,Vb=SyntaxError),Vb}var Zb,eC;function MU(){return eC||(eC=1,Zb=URIError),Zb}var Xb,tC;function LU(){return tC||(tC=1,Xb=Math.abs),Xb}var Kb,nC;function OU(){return nC||(nC=1,Kb=Math.floor),Kb}var Jb,rC;function PU(){return rC||(rC=1,Jb=Math.max),Jb}var Qb,iC;function DU(){return iC||(iC=1,Qb=Math.min),Qb}var qb,oC;function NU(){return oC||(oC=1,qb=Math.pow),qb}var jb,lC;function FU(){return lC||(lC=1,jb=Math.round),jb}var $b,sC;function BU(){return sC||(sC=1,$b=Number.isNaN||function(e){return e!==e}),$b}var ey,aC;function zU(){if(aC)return ey;aC=1;var n=BU();return ey=function(t){return n(t)||t===0?t:t<0?-1:1},ey}var ty,cC;function HU(){return cC||(cC=1,ty=Object.getOwnPropertyDescriptor),ty}var ny,uC;function $4(){if(uC)return ny;uC=1;var n=HU();if(n)try{n([],"length")}catch{n=null}return ny=n,ny}var ry,fC;function WU(){if(fC)return ry;fC=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return ry=n,ry}var iy,dC;function UU(){return dC||(dC=1,iy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var l=Object.getOwnPropertySymbols(e);if(l.length!==1||l[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}),iy}var oy,hC;function GU(){if(hC)return oy;hC=1;var n=typeof Symbol<"u"&&Symbol,e=UU();return oy=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},oy}var ly,gC;function e5(){return gC||(gC=1,ly=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ly}var sy,pC;function t5(){if(pC)return sy;pC=1;var n=j4();return sy=n.getPrototypeOf||null,sy}var ay,vC;function YU(){if(vC)return ay;vC=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,r="[object Function]",i=function(u,h){for(var y=[],x=0;x<u.length;x+=1)y[x]=u[x];for(var w=0;w<h.length;w+=1)y[w+u.length]=h[w];return y},o=function(u,h){for(var y=[],x=h,w=0;x<u.length;x+=1,w+=1)y[w]=u[x];return y},l=function(a,u){for(var h="",y=0;y<a.length;y+=1)h+=a[y],y+1<a.length&&(h+=u);return h};return ay=function(u){var h=this;if(typeof h!="function"||e.apply(h)!==r)throw new TypeError(n+h);for(var y=o(arguments,1),x,w=function(){if(this instanceof x){var O=h.apply(this,i(y,arguments));return Object(O)===O?O:this}return h.apply(u,i(y,arguments))},_=t(0,h.length-y.length),S=[],R=0;R<_;R++)S[R]="$"+R;if(x=Function("binder","return function ("+l(S,",")+"){ return binder.apply(this,arguments); }")(w),h.prototype){var I=function(){};I.prototype=h.prototype,x.prototype=new I,I.prototype=null}return x},ay}var cy,bC;function Uv(){if(bC)return cy;bC=1;var n=YU();return cy=Function.prototype.bind||n,cy}var uy,yC;function l2(){return yC||(yC=1,uy=Function.prototype.call),uy}var fy,mC;function n5(){return mC||(mC=1,fy=Function.prototype.apply),fy}var dy,xC;function VU(){return xC||(xC=1,dy=typeof Reflect<"u"&&Reflect&&Reflect.apply),dy}var hy,wC;function ZU(){if(wC)return hy;wC=1;var n=Uv(),e=n5(),t=l2(),r=VU();return hy=r||n.call(t,e),hy}var gy,CC;function r5(){if(CC)return gy;CC=1;var n=Uv(),e=B1(),t=l2(),r=ZU();return gy=function(o){if(o.length<1||typeof o[0]!="function")throw new e("a function is required");return r(n,t,o)},gy}var py,_C;function XU(){if(_C)return py;_C=1;var n=r5(),e=$4(),t;try{t=[].__proto__===Array.prototype}catch(l){if(!l||typeof l!="object"||!("code"in l)||l.code!=="ERR_PROTO_ACCESS")throw l}var r=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return py=r&&typeof r.get=="function"?n([r.get]):typeof o=="function"?function(a){return o(a==null?a:i(a))}:!1,py}var vy,SC;function KU(){if(SC)return vy;SC=1;var n=e5(),e=t5(),t=XU();return vy=n?function(i){return n(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,vy}var by,EC;function JU(){if(EC)return by;EC=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=Uv();return by=t.call(n,e),by}var yy,AC;function s2(){if(AC)return yy;AC=1;var n,e=j4(),t=AU(),r=TU(),i=RU(),o=IU(),l=kU(),a=B1(),u=MU(),h=LU(),y=OU(),x=PU(),w=DU(),_=NU(),S=FU(),R=zU(),I=Function,O=function(Le){try{return I('"use strict"; return ('+Le+").constructor;")()}catch{}},P=$4(),Y=WU(),z=function(){throw new a},W=P?(function(){try{return arguments.callee,z}catch{try{return P(arguments,"callee").get}catch{return z}}})():z,B=GU()(),ee=KU(),H=t5(),V=e5(),de=n5(),Z=l2(),te={},ne=typeof Uint8Array>"u"||!ee?n:ee(Uint8Array),fe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":B&&ee?ee([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":te,"%AsyncGenerator%":te,"%AsyncGeneratorFunction%":te,"%AsyncIteratorPrototype%":te,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":I,"%GeneratorFunction%":te,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":B&&ee?ee(ee([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!B||!ee?n:ee(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":P,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!B||!ee?n:ee(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":B&&ee?ee(""[Symbol.iterator]()):n,"%Symbol%":B?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":W,"%TypedArray%":ne,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":Z,"%Function.prototype.apply%":de,"%Object.defineProperty%":Y,"%Object.getPrototypeOf%":H,"%Math.abs%":h,"%Math.floor%":y,"%Math.max%":x,"%Math.min%":w,"%Math.pow%":_,"%Math.round%":S,"%Math.sign%":R,"%Reflect.getPrototypeOf%":V};if(ee)try{null.error}catch(Le){var ae=ee(ee(Le));fe["%Error.prototype%"]=ae}var j=function Le(Oe){var Ge;if(Oe==="%AsyncFunction%")Ge=O("async function () {}");else if(Oe==="%GeneratorFunction%")Ge=O("function* () {}");else if(Oe==="%AsyncGeneratorFunction%")Ge=O("async function* () {}");else if(Oe==="%AsyncGenerator%"){var Ve=Le("%AsyncGeneratorFunction%");Ve&&(Ge=Ve.prototype)}else if(Oe==="%AsyncIteratorPrototype%"){var Pe=Le("%AsyncGenerator%");Pe&&ee&&(Ge=ee(Pe.prototype))}return fe[Oe]=Ge,Ge},re={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},he=Uv(),be=JU(),le=he.call(Z,Array.prototype.concat),J=he.call(de,Array.prototype.splice),pe=he.call(Z,String.prototype.replace),Te=he.call(Z,String.prototype.slice),Fe=he.call(Z,RegExp.prototype.exec),_e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Me=/\\(\\)?/g,De=function(Oe){var Ge=Te(Oe,0,1),Ve=Te(Oe,-1);if(Ge==="%"&&Ve!=="%")throw new l("invalid intrinsic syntax, expected closing `%`");if(Ve==="%"&&Ge!=="%")throw new l("invalid intrinsic syntax, expected opening `%`");var Pe=[];return pe(Oe,_e,function(ot,Xe,lt,Ye){Pe[Pe.length]=lt?pe(Ye,Me,"$1"):Xe||ot}),Pe},Re=function(Oe,Ge){var Ve=Oe,Pe;if(be(re,Ve)&&(Pe=re[Ve],Ve="%"+Pe[0]+"%"),be(fe,Ve)){var ot=fe[Ve];if(ot===te&&(ot=j(Ve)),typeof ot>"u"&&!Ge)throw new a("intrinsic "+Oe+" exists, but is not available. Please file an issue!");return{alias:Pe,name:Ve,value:ot}}throw new l("intrinsic "+Oe+" does not exist!")};return yy=function(Oe,Ge){if(typeof Oe!="string"||Oe.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ge!="boolean")throw new a('"allowMissing" argument must be a boolean');if(Fe(/^%?[^%]*%?$/,Oe)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ve=De(Oe),Pe=Ve.length>0?Ve[0]:"",ot=Re("%"+Pe+"%",Ge),Xe=ot.name,lt=ot.value,Ye=!1,mt=ot.alias;mt&&(Pe=mt[0],J(Ve,le([0,1],mt)));for(var bt=1,Mt=!0;bt<Ve.length;bt+=1){var Nt=Ve[bt],_t=Te(Nt,0,1),rn=Te(Nt,-1);if((_t==='"'||_t==="'"||_t==="`"||rn==='"'||rn==="'"||rn==="`")&&_t!==rn)throw new l("property names with quotes must have matching quotes");if((Nt==="constructor"||!Mt)&&(Ye=!0),Pe+="."+Nt,Xe="%"+Pe+"%",be(fe,Xe))lt=fe[Xe];else if(lt!=null){if(!(Nt in lt)){if(!Ge)throw new a("base intrinsic for "+Oe+" exists, but the property is not available.");return}if(P&&bt+1>=Ve.length){var pn=P(lt,Nt);Mt=!!pn,Mt&&"get"in pn&&!("originalValue"in pn.get)?lt=pn.get:lt=lt[Nt]}else Mt=be(lt,Nt),lt=lt[Nt];Mt&&!Ye&&(fe[Xe]=lt)}}return lt},yy}var my,TC;function i5(){if(TC)return my;TC=1;var n=s2(),e=r5(),t=e([n("%String.prototype.indexOf%")]);return my=function(i,o){var l=n(i,!!o);return typeof l=="function"&&t(i,".prototype.")>-1?e([l]):l},my}var xy,RC;function o5(){if(RC)return xy;RC=1;var n=s2(),e=i5(),t=Wv(),r=B1(),i=n("%Map%",!0),o=e("Map.prototype.get",!0),l=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),h=e("Map.prototype.size",!0);return xy=!!i&&function(){var x,w={assert:function(_){if(!w.has(_))throw new r("Side channel does not contain "+t(_))},delete:function(_){if(x){var S=u(x,_);return h(x)===0&&(x=void 0),S}return!1},get:function(_){if(x)return o(x,_)},has:function(_){return x?a(x,_):!1},set:function(_,S){x||(x=new i),l(x,_,S)}};return w},xy}var wy,IC;function QU(){if(IC)return wy;IC=1;var n=s2(),e=i5(),t=Wv(),r=o5(),i=B1(),o=n("%WeakMap%",!0),l=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),h=e("WeakMap.prototype.delete",!0);return wy=o?function(){var x,w,_={assert:function(S){if(!_.has(S))throw new i("Side channel does not contain "+t(S))},delete:function(S){if(o&&S&&(typeof S=="object"||typeof S=="function")){if(x)return h(x,S)}else if(r&&w)return w.delete(S);return!1},get:function(S){return o&&S&&(typeof S=="object"||typeof S=="function")&&x?l(x,S):w&&w.get(S)},has:function(S){return o&&S&&(typeof S=="object"||typeof S=="function")&&x?u(x,S):!!w&&w.has(S)},set:function(S,R){o&&S&&(typeof S=="object"||typeof S=="function")?(x||(x=new o),a(x,S,R)):r&&(w||(w=r()),w.set(S,R))}};return _}:r,wy}var Cy,kC;function qU(){if(kC)return Cy;kC=1;var n=B1(),e=Wv(),t=EU(),r=o5(),i=QU(),o=i||r||t;return Cy=function(){var a,u={assert:function(h){if(!u.has(h))throw new n("Side channel does not contain "+e(h))},delete:function(h){return!!a&&a.delete(h)},get:function(h){return a&&a.get(h)},has:function(h){return!!a&&a.has(h)},set:function(h,y){a||(a=o()),a.set(h,y)}};return u},Cy}var _y,MC;function a2(){if(MC)return _y;MC=1;var n=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return _y={default:t.RFC3986,formatters:{RFC1738:function(r){return n.call(r,e,"+")},RFC3986:function(r){return String(r)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},_y}var Sy,LC;function l5(){if(LC)return Sy;LC=1;var n=a2(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r=(function(){for(var I=[],O=0;O<256;++O)I.push("%"+((O<16?"0":"")+O.toString(16)).toUpperCase());return I})(),i=function(O){for(;O.length>1;){var P=O.pop(),Y=P.obj[P.prop];if(t(Y)){for(var z=[],W=0;W<Y.length;++W)typeof Y[W]<"u"&&z.push(Y[W]);P.obj[P.prop]=z}}},o=function(O,P){for(var Y=P&&P.plainObjects?{__proto__:null}:{},z=0;z<O.length;++z)typeof O[z]<"u"&&(Y[z]=O[z]);return Y},l=function I(O,P,Y){if(!P)return O;if(typeof P!="object"&&typeof P!="function"){if(t(O))O.push(P);else if(O&&typeof O=="object")(Y&&(Y.plainObjects||Y.allowPrototypes)||!e.call(Object.prototype,P))&&(O[P]=!0);else return[O,P];return O}if(!O||typeof O!="object")return[O].concat(P);var z=O;return t(O)&&!t(P)&&(z=o(O,Y)),t(O)&&t(P)?(P.forEach(function(W,B){if(e.call(O,B)){var ee=O[B];ee&&typeof ee=="object"&&W&&typeof W=="object"?O[B]=I(ee,W,Y):O.push(W)}else O[B]=W}),O):Object.keys(P).reduce(function(W,B){var ee=P[B];return e.call(W,B)?W[B]=I(W[B],ee,Y):W[B]=ee,W},z)},a=function(O,P){return Object.keys(P).reduce(function(Y,z){return Y[z]=P[z],Y},O)},u=function(I,O,P){var Y=I.replace(/\+/g," ");if(P==="iso-8859-1")return Y.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(Y)}catch{return Y}},h=1024,y=function(O,P,Y,z,W){if(O.length===0)return O;var B=O;if(typeof O=="symbol"?B=Symbol.prototype.toString.call(O):typeof O!="string"&&(B=String(O)),Y==="iso-8859-1")return escape(B).replace(/%u[0-9a-f]{4}/gi,function(ne){return"%26%23"+parseInt(ne.slice(2),16)+"%3B"});for(var ee="",H=0;H<B.length;H+=h){for(var V=B.length>=h?B.slice(H,H+h):B,de=[],Z=0;Z<V.length;++Z){var te=V.charCodeAt(Z);if(te===45||te===46||te===95||te===126||te>=48&&te<=57||te>=65&&te<=90||te>=97&&te<=122||W===n.RFC1738&&(te===40||te===41)){de[de.length]=V.charAt(Z);continue}if(te<128){de[de.length]=r[te];continue}if(te<2048){de[de.length]=r[192|te>>6]+r[128|te&63];continue}if(te<55296||te>=57344){de[de.length]=r[224|te>>12]+r[128|te>>6&63]+r[128|te&63];continue}Z+=1,te=65536+((te&1023)<<10|V.charCodeAt(Z)&1023),de[de.length]=r[240|te>>18]+r[128|te>>12&63]+r[128|te>>6&63]+r[128|te&63]}ee+=de.join("")}return ee},x=function(O){for(var P=[{obj:{o:O},prop:"o"}],Y=[],z=0;z<P.length;++z)for(var W=P[z],B=W.obj[W.prop],ee=Object.keys(B),H=0;H<ee.length;++H){var V=ee[H],de=B[V];typeof de=="object"&&de!==null&&Y.indexOf(de)===-1&&(P.push({obj:B,prop:V}),Y.push(de))}return i(P),O},w=function(O){return Object.prototype.toString.call(O)==="[object RegExp]"},_=function(O){return!O||typeof O!="object"?!1:!!(O.constructor&&O.constructor.isBuffer&&O.constructor.isBuffer(O))},S=function(O,P){return[].concat(O,P)},R=function(O,P){if(t(O)){for(var Y=[],z=0;z<O.length;z+=1)Y.push(P(O[z]));return Y}return P(O)};return Sy={arrayToObject:o,assign:a,combine:S,compact:x,decode:u,encode:y,isBuffer:_,isRegExp:w,maybeMap:R,merge:l},Sy}var Ey,OC;function jU(){if(OC)return Ey;OC=1;var n=qU(),e=l5(),t=a2(),r=Object.prototype.hasOwnProperty,i={brackets:function(I){return I+"[]"},comma:"comma",indices:function(I,O){return I+"["+O+"]"},repeat:function(I){return I}},o=Array.isArray,l=Array.prototype.push,a=function(R,I){l.apply(R,o(I)?I:[I])},u=Date.prototype.toISOString,h=t.default,y={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:h,formatter:t.formatters[h],indices:!1,serializeDate:function(I){return u.call(I)},skipNulls:!1,strictNullHandling:!1},x=function(I){return typeof I=="string"||typeof I=="number"||typeof I=="boolean"||typeof I=="symbol"||typeof I=="bigint"},w={},_=function R(I,O,P,Y,z,W,B,ee,H,V,de,Z,te,ne,fe,ae,j,re){for(var he=I,be=re,le=0,J=!1;(be=be.get(w))!==void 0&&!J;){var pe=be.get(I);if(le+=1,typeof pe<"u"){if(pe===le)throw new RangeError("Cyclic object value");J=!0}typeof be.get(w)>"u"&&(le=0)}if(typeof V=="function"?he=V(O,he):he instanceof Date?he=te(he):P==="comma"&&o(he)&&(he=e.maybeMap(he,function(Xe){return Xe instanceof Date?te(Xe):Xe})),he===null){if(W)return H&&!ae?H(O,y.encoder,j,"key",ne):O;he=""}if(x(he)||e.isBuffer(he)){if(H){var Te=ae?O:H(O,y.encoder,j,"key",ne);return[fe(Te)+"="+fe(H(he,y.encoder,j,"value",ne))]}return[fe(O)+"="+fe(String(he))]}var Fe=[];if(typeof he>"u")return Fe;var _e;if(P==="comma"&&o(he))ae&&H&&(he=e.maybeMap(he,H)),_e=[{value:he.length>0?he.join(",")||null:void 0}];else if(o(V))_e=V;else{var Me=Object.keys(he);_e=de?Me.sort(de):Me}var De=ee?String(O).replace(/\./g,"%2E"):String(O),Re=Y&&o(he)&&he.length===1?De+"[]":De;if(z&&o(he)&&he.length===0)return Re+"[]";for(var Le=0;Le<_e.length;++Le){var Oe=_e[Le],Ge=typeof Oe=="object"&&Oe&&typeof Oe.value<"u"?Oe.value:he[Oe];if(!(B&&Ge===null)){var Ve=Z&&ee?String(Oe).replace(/\./g,"%2E"):String(Oe),Pe=o(he)?typeof P=="function"?P(Re,Ve):Re:Re+(Z?"."+Ve:"["+Ve+"]");re.set(I,le);var ot=n();ot.set(w,re),a(Fe,R(Ge,Pe,P,Y,z,W,B,ee,P==="comma"&&ae&&o(he)?null:H,V,de,Z,te,ne,fe,ae,j,ot))}}return Fe},S=function(I){if(!I)return y;if(typeof I.allowEmptyArrays<"u"&&typeof I.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof I.encodeDotInKeys<"u"&&typeof I.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(I.encoder!==null&&typeof I.encoder<"u"&&typeof I.encoder!="function")throw new TypeError("Encoder has to be a function.");var O=I.charset||y.charset;if(typeof I.charset<"u"&&I.charset!=="utf-8"&&I.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var P=t.default;if(typeof I.format<"u"){if(!r.call(t.formatters,I.format))throw new TypeError("Unknown format option provided.");P=I.format}var Y=t.formatters[P],z=y.filter;(typeof I.filter=="function"||o(I.filter))&&(z=I.filter);var W;if(I.arrayFormat in i?W=I.arrayFormat:"indices"in I?W=I.indices?"indices":"repeat":W=y.arrayFormat,"commaRoundTrip"in I&&typeof I.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var B=typeof I.allowDots>"u"?I.encodeDotInKeys===!0?!0:y.allowDots:!!I.allowDots;return{addQueryPrefix:typeof I.addQueryPrefix=="boolean"?I.addQueryPrefix:y.addQueryPrefix,allowDots:B,allowEmptyArrays:typeof I.allowEmptyArrays=="boolean"?!!I.allowEmptyArrays:y.allowEmptyArrays,arrayFormat:W,charset:O,charsetSentinel:typeof I.charsetSentinel=="boolean"?I.charsetSentinel:y.charsetSentinel,commaRoundTrip:!!I.commaRoundTrip,delimiter:typeof I.delimiter>"u"?y.delimiter:I.delimiter,encode:typeof I.encode=="boolean"?I.encode:y.encode,encodeDotInKeys:typeof I.encodeDotInKeys=="boolean"?I.encodeDotInKeys:y.encodeDotInKeys,encoder:typeof I.encoder=="function"?I.encoder:y.encoder,encodeValuesOnly:typeof I.encodeValuesOnly=="boolean"?I.encodeValuesOnly:y.encodeValuesOnly,filter:z,format:P,formatter:Y,serializeDate:typeof I.serializeDate=="function"?I.serializeDate:y.serializeDate,skipNulls:typeof I.skipNulls=="boolean"?I.skipNulls:y.skipNulls,sort:typeof I.sort=="function"?I.sort:null,strictNullHandling:typeof I.strictNullHandling=="boolean"?I.strictNullHandling:y.strictNullHandling}};return Ey=function(R,I){var O=R,P=S(I),Y,z;typeof P.filter=="function"?(z=P.filter,O=z("",O)):o(P.filter)&&(z=P.filter,Y=z);var W=[];if(typeof O!="object"||O===null)return"";var B=i[P.arrayFormat],ee=B==="comma"&&P.commaRoundTrip;Y||(Y=Object.keys(O)),P.sort&&Y.sort(P.sort);for(var H=n(),V=0;V<Y.length;++V){var de=Y[V],Z=O[de];P.skipNulls&&Z===null||a(W,_(Z,de,B,ee,P.allowEmptyArrays,P.strictNullHandling,P.skipNulls,P.encodeDotInKeys,P.encode?P.encoder:null,P.filter,P.sort,P.allowDots,P.serializeDate,P.format,P.formatter,P.encodeValuesOnly,P.charset,H))}var te=W.join(P.delimiter),ne=P.addQueryPrefix===!0?"?":"";return P.charsetSentinel&&(P.charset==="iso-8859-1"?ne+="utf8=%26%2310003%3B&":ne+="utf8=%E2%9C%93&"),te.length>0?ne+te:""},Ey}var Ay,PC;function $U(){if(PC)return Ay;PC=1;var n=l5(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},i=function(w){return w.replace(/&#(\d+);/g,function(_,S){return String.fromCharCode(parseInt(S,10))})},o=function(w,_,S){if(w&&typeof w=="string"&&_.comma&&w.indexOf(",")>-1)return w.split(",");if(_.throwOnLimitExceeded&&S>=_.arrayLimit)throw new RangeError("Array limit exceeded. Only "+_.arrayLimit+" element"+(_.arrayLimit===1?"":"s")+" allowed in an array.");return w},l="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",u=function(_,S){var R={__proto__:null},I=S.ignoreQueryPrefix?_.replace(/^\?/,""):_;I=I.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var O=S.parameterLimit===1/0?void 0:S.parameterLimit,P=I.split(S.delimiter,S.throwOnLimitExceeded?O+1:O);if(S.throwOnLimitExceeded&&P.length>O)throw new RangeError("Parameter limit exceeded. Only "+O+" parameter"+(O===1?"":"s")+" allowed.");var Y=-1,z,W=S.charset;if(S.charsetSentinel)for(z=0;z<P.length;++z)P[z].indexOf("utf8=")===0&&(P[z]===a?W="utf-8":P[z]===l&&(W="iso-8859-1"),Y=z,z=P.length);for(z=0;z<P.length;++z)if(z!==Y){var B=P[z],ee=B.indexOf("]="),H=ee===-1?B.indexOf("="):ee+1,V,de;H===-1?(V=S.decoder(B,r.decoder,W,"key"),de=S.strictNullHandling?null:""):(V=S.decoder(B.slice(0,H),r.decoder,W,"key"),de=n.maybeMap(o(B.slice(H+1),S,t(R[V])?R[V].length:0),function(te){return S.decoder(te,r.decoder,W,"value")})),de&&S.interpretNumericEntities&&W==="iso-8859-1"&&(de=i(String(de))),B.indexOf("[]=")>-1&&(de=t(de)?[de]:de);var Z=e.call(R,V);Z&&S.duplicates==="combine"?R[V]=n.combine(R[V],de):(!Z||S.duplicates==="last")&&(R[V]=de)}return R},h=function(w,_,S,R){var I=0;if(w.length>0&&w[w.length-1]==="[]"){var O=w.slice(0,-1).join("");I=Array.isArray(_)&&_[O]?_[O].length:0}for(var P=R?_:o(_,S,I),Y=w.length-1;Y>=0;--Y){var z,W=w[Y];if(W==="[]"&&S.parseArrays)z=S.allowEmptyArrays&&(P===""||S.strictNullHandling&&P===null)?[]:n.combine([],P);else{z=S.plainObjects?{__proto__:null}:{};var B=W.charAt(0)==="["&&W.charAt(W.length-1)==="]"?W.slice(1,-1):W,ee=S.decodeDotInKeys?B.replace(/%2E/g,"."):B,H=parseInt(ee,10);!S.parseArrays&&ee===""?z={0:P}:!isNaN(H)&&W!==ee&&String(H)===ee&&H>=0&&S.parseArrays&&H<=S.arrayLimit?(z=[],z[H]=P):ee!=="__proto__"&&(z[ee]=P)}P=z}return P},y=function(_,S,R,I){if(_){var O=R.allowDots?_.replace(/\.([^.[]+)/g,"[$1]"):_,P=/(\[[^[\]]*])/,Y=/(\[[^[\]]*])/g,z=R.depth>0&&P.exec(O),W=z?O.slice(0,z.index):O,B=[];if(W){if(!R.plainObjects&&e.call(Object.prototype,W)&&!R.allowPrototypes)return;B.push(W)}for(var ee=0;R.depth>0&&(z=Y.exec(O))!==null&&ee<R.depth;){if(ee+=1,!R.plainObjects&&e.call(Object.prototype,z[1].slice(1,-1))&&!R.allowPrototypes)return;B.push(z[1])}if(z){if(R.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+R.depth+" and strictDepth is true");B.push("["+O.slice(z.index)+"]")}return h(B,S,R,I)}},x=function(_){if(!_)return r;if(typeof _.allowEmptyArrays<"u"&&typeof _.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof _.decodeDotInKeys<"u"&&typeof _.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(_.decoder!==null&&typeof _.decoder<"u"&&typeof _.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof _.charset<"u"&&_.charset!=="utf-8"&&_.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof _.throwOnLimitExceeded<"u"&&typeof _.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var S=typeof _.charset>"u"?r.charset:_.charset,R=typeof _.duplicates>"u"?r.duplicates:_.duplicates;if(R!=="combine"&&R!=="first"&&R!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var I=typeof _.allowDots>"u"?_.decodeDotInKeys===!0?!0:r.allowDots:!!_.allowDots;return{allowDots:I,allowEmptyArrays:typeof _.allowEmptyArrays=="boolean"?!!_.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof _.allowPrototypes=="boolean"?_.allowPrototypes:r.allowPrototypes,allowSparse:typeof _.allowSparse=="boolean"?_.allowSparse:r.allowSparse,arrayLimit:typeof _.arrayLimit=="number"?_.arrayLimit:r.arrayLimit,charset:S,charsetSentinel:typeof _.charsetSentinel=="boolean"?_.charsetSentinel:r.charsetSentinel,comma:typeof _.comma=="boolean"?_.comma:r.comma,decodeDotInKeys:typeof _.decodeDotInKeys=="boolean"?_.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof _.decoder=="function"?_.decoder:r.decoder,delimiter:typeof _.delimiter=="string"||n.isRegExp(_.delimiter)?_.delimiter:r.delimiter,depth:typeof _.depth=="number"||_.depth===!1?+_.depth:r.depth,duplicates:R,ignoreQueryPrefix:_.ignoreQueryPrefix===!0,interpretNumericEntities:typeof _.interpretNumericEntities=="boolean"?_.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof _.parameterLimit=="number"?_.parameterLimit:r.parameterLimit,parseArrays:_.parseArrays!==!1,plainObjects:typeof _.plainObjects=="boolean"?_.plainObjects:r.plainObjects,strictDepth:typeof _.strictDepth=="boolean"?!!_.strictDepth:r.strictDepth,strictNullHandling:typeof _.strictNullHandling=="boolean"?_.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof _.throwOnLimitExceeded=="boolean"?_.throwOnLimitExceeded:!1}};return Ay=function(w,_){var S=x(_);if(w===""||w===null||typeof w>"u")return S.plainObjects?{__proto__:null}:{};for(var R=typeof w=="string"?u(w,S):w,I=S.plainObjects?{__proto__:null}:{},O=Object.keys(R),P=0;P<O.length;++P){var Y=O[P],z=y(Y,R[Y],S,typeof w=="string");I=n.merge(I,z,S)}return S.allowSparse===!0?I:n.compact(I)},Ay}var Ty,DC;function eG(){if(DC)return Ty;DC=1;var n=jU(),e=$U(),t=a2();return Ty={formats:t,parse:e,stringify:n},Ty}var tG=eG();const nG=M1(tG),gm={StoredContexts:{},defaultHandler:()=>{}},s5={Init:()=>{},Create:n=>{const e=n.method+n.url;return gm.StoredContexts[e]=n,rG(n)},FetchBaseUrl:()=>window.location.href,useDefaultHandler:n=>{gm.defaultHandler=n}};function rG(n){const e=`[${n.method}] ${n.url}`;return{Call:async r=>{let{url:i,method:o,stream:l,paramType:a}=n;const{po:u,onStream:h,onStreamEnd:y,noDefaultHandle:x=[]}=r??{};(a==="query"||o==="GET")&&u!==void 0&&(i+="?"+nG.stringify(u,{arrayFormat:"comma"}));const w={method:o,headers:{Accept:"application/json;charset=UTF-8","X-Requested-With":"XMLHttpRequest","Cache-Control":"no-cache",Pragma:"no-cache",crossDomain:"true"}};if(a==="form"){const R=new FormData;if(u!==void 0)for(const I in u){const O=u[I];R.append(I,O)}w.body=R}else(a==="body"||a===void 0&&n.method!=="GET")&&(w.body=JSON.stringify(u),w.headers["Content-Type"]="application/json;charset=UTF-8");let _={errorCode:0,message:""};const S=Date.now();i=s5.FetchBaseUrl()+i;try{let R=await fetch(i,w);if(R.ok===!1)return _.errorCode=R.status,_.message=R.statusText,_;{const I=new TextDecoder("utf-8");if(l){if(R.body){let O=R.body.getReader(),P="";for(;;){const Y=await O.read();if(Y.done)break;const z=I.decode(Y.value).trim();P+=z;let W=null;try{const B=z.split("\0");let ee=B[B.length-1];for(let H=B.length-2;H>=0;H--)if(B[H].trim().length!==0){ee=B[H];break}W=await JSON.parse(ee)}catch{try{const ee=P.split("\0");let H=ee[ee.length-1];for(let V=ee.length-2;V>=0;V--)if(ee[V].trim().length!==0){H=ee[V];break}W=await JSON.parse(H)}catch{}}if(W!=null&&(Object.keys(W).includes("err_code")?_.errorCode=W.err_code:(_.errorCode=0,_.data=W,P="",Y.done?y==null||y(_.data):h==null||h(_.data))),Y.done)break}}}else if(R.body){const P=await R.body.getReader().read(),Y=I.decode(P.value);if(Y==="null")return _;{let z=await JSON.parse(Y.replaceAll("\0",""));Object.keys(z).includes("err_code")?(_.errorCode=z.err_code,_.message=z.err_msg):_.data=z}}}}catch(R){console.warn(R),_.errorCode=-1,_.message=R.message}return console.debug(`${e} ${Date.now()-S}ms`),x!==!0&&await gm.defaultHandler(_,x),_}}}exports.ABase=Gi;exports.ABaseStyleKeys=i3;exports.AButton=Ic;exports.AButtonStyleKeys=l3;exports.AButtonTypes=cT;exports.ACheckBox=x1;exports.ACheckBoxStyleKeys=u3;exports.AChip=xm;exports.AChipKeys=k3;exports.AChips=w6;exports.AClock=F6;exports.AColFrame=P3;exports.ADatePicker=Sm;exports.ADatePickerStyleKeys=w3;exports.ADatePickerTypes=h8;exports.ADateRangePicker=Cm;exports.ADateRangePickerStyleKeys=C3;exports.ADialog=C8;exports.ADialogStyleKeys=f3;exports.ADialogTypes=w8;exports.ADivideFrame=N3;exports.AEditor=Wz;exports.AEditorStyleKeys=c3;exports.AFileBox=O8;exports.AFileBoxStyleKeys=b3;exports.AFileUploader=p9;exports.AFileUploaderStyleKeys=y3;exports.AFloatMenu=H3;exports.AFloatMenuKeys=A3;exports.AFrameStyleKeys=E3;exports.AGrow=zg;exports.AIcon=ho;exports.AIconButton=ba;exports.AIconButtonStyleKeys=_3;exports.AIconButtonTypes=uT;exports.AIconHOC=gA;exports.AIcons=bm;exports.AInput=sg;exports.AInputStyleKeys=s3;exports.AInputTypes=j6;exports.AListView=A9;exports.AListViewStyleKeys=m3;exports.ALoadingBorder=Am;exports.ALoadingBorderKeys=T3;exports.AMultiSelect=$9;exports.AMultiSelectStyleKeys=h3;exports.ANumInput=w9;exports.AOverflowFrame=nh;exports.AProgressBar=VC;exports.ARadioSelect=B9;exports.ARadioSelectKeys=I3;exports.ARowFrame=bl;exports.ASelect=Ah;exports.ASelectStyleKeys=d3;exports.ASelectTypes=gR;exports.ASpace=cs;exports.AStepper=gI;exports.AStepperStyleKeys=x3;exports.ASwitch=qC;exports.ASwitchFrame=D3;exports.ASwitchStyleKeys=p3;exports.ATab=U3;exports.ATabStyleKeys=v3;exports.ATabTypes=TI;exports.ATable=Hk;exports.ATableStyleKeys=S3;exports.AText=X3;exports.ATextArea=$k;exports.ATextAreaStyleKeys=a3;exports.ATextAreaTypes=jk;exports.AThemeButton=NT;exports.AThemes=gp;exports.ATooltip=QC;exports.ATooltipStyleKeys=o3;exports.ATree=yU;exports.ATreeStyleKeys=g3;exports.AWrap=lg;exports.AWrapKeys=R3;exports.AWrapPropsExtract=Bg;exports.AWrapTypes=vT;exports.ApiContext=s5;exports.BodyStyleKeys=r3;exports.CreateADC=R8;exports.DefaultOptionRenderer=W3;exports.EDir12=L1;exports.EDir4=oc;exports.FileSizeTrans=Mg;exports.Icons=Cv;exports.IsCursorPointer=WC;exports.IsFixedShape=HC;exports.IsInteractive=UC;exports.NoSelect=BC;exports.NoTransition=zC;exports.Resources=Nr;exports.SetResources=IA;exports.alphanumericRegex=S6;exports.bound=hp;exports.cbF=Zr;exports.changeSemanticMode=mm;exports.componentStyleKeys=RT;exports.createEvent=Ag;exports.dateF=Yn;exports.dbF=Td;exports.defaultPredicate=Y3;exports.dlgF=I8;exports.emailIdRegex=T6;exports.emailRegex=A6;exports.fileF=z3;exports.getFileKey=B3;exports.getMonthsOptions=Ap;exports.getYearsOptions=_m;exports.hangulRegex=I6;exports.hexRegex=R6;exports.key=FC;exports.noHanguljamoRegex=M6;exports.noSpaceRegex=k6;exports.numF=U0;exports.objF=er;exports.onlyAlphanumericRegex=E6;exports.paletteKeys=jC;exports.paletteModes=_v;exports.passwordRegex=O6;exports.refinedDesignTokens=sc;exports.sF=gt;exports.semanticKeys=t3;exports.semanticModes=m1;exports.setDir12Style=ym;exports.setDir12StyleElem=KC;exports.specialCharRegex=L6;exports.strF=wm;exports.tableF=_h;exports.textMeasurement=kg;exports.treeF=Qh;exports.useADialogCore=A8;exports.useADialogCores=E8;exports.useDB=L3;exports.useEvent=Z3;exports.useInit=G3;exports.useLayoutDB=O3;exports.useOffset=XC;exports.useValues=Ho;exports.uuidRegex=P6;
|