ados-rcm 1.1.423 → 1.1.424

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.
@@ -97,11 +97,11 @@ export interface IATableDef<T extends IItem> {
97
97
  */
98
98
  isSortable?: boolean;
99
99
  /**
100
- * sortF? : (a: T, b: T) => number
100
+ * sortF? : (a: T, b: T, isAsc?: boolean) => number
101
101
  *
102
102
  * Description : sortF of the column
103
103
  */
104
- sortF?: (a: T, b: T) => number;
104
+ sortF?: (a: T, b: T, isAsc?: boolean) => number;
105
105
  /**
106
106
  * content? : TCanCallback<IATableTDProps<T>, React.ReactNode>
107
107
  *
@@ -392,7 +392,7 @@ export type TATableFilteration<T extends IItem, K extends IItem = any> = {
392
392
  } & {
393
393
  [key: string]: TATableSomeFilter<T, K>;
394
394
  };
395
- export type TATableSortF<T extends IItem> = (a: T, b: T) => number;
395
+ export type TATableSortF<T extends IItem> = (a: T, b: T, isAsc?: boolean) => number;
396
396
  export interface IATableSortation<T extends IItem> {
397
397
  /**
398
398
  * defKey? : keyof T
package/dist/index.cjs.js CHANGED
@@ -157,7 +157,7 @@ Error generating stack: `+h.message+`
157
157
 
158
158
  ${j["Invalid file(s)"]}: ${Lt}${Mt?`
159
159
 
160
- `+Mt:""}`)}De.length>0&&U([...H||[],...De])},[U,be,m,g,j,H]),ge=A.useCallback(()=>{var Ae;return(Ae=X.current)==null?void 0:Ae.click()},[]),Le=A.useCallback(Ae=>{const De=Ae.target.files;De!=null&&De.length&&(Xe(De),Oe())},[Xe,Oe]),We=A.useCallback(Ae=>{if(E==null||E(Ae),!U||!H)return;const De=fe(Ae),ot=H.filter(st=>fe(st)!==De);U(ot),Oe()},[E,U,H,Oe,fe]),Je=A.useCallback(()=>{U&&(U([]),Oe())},[U,Oe]),Ke=A.useCallback(Ae=>{if(!I)return Promise.resolve();const De=fe(Ae);return le(De,"Loading"),new Promise(ot=>{I(Ae,st=>{le(De,st),ot()})})},[I,fe,le]),Ne=A.useCallback(async()=>{if(!(H!=null&&H.length))return;const Ae={...J};H.forEach(De=>Ae[fe(De)]="Loading"),ue==null||ue(Ae);for(const De of H)await Ke(De)},[H,fe,J,ue,Ke]),Te=A.useMemo(()=>{const Ae=De=>(De.preventDefault(),De.stopPropagation(),De);return{onDragEnter:De=>{Ae(De),!Z&&!w&&ee(!0)},onDragOver:De=>{Ae(De),!Z&&!w&&De.dataTransfer&&(De.dataTransfer.dropEffect="copy")},onDragLeave:De=>{var st;Ae(De);const ot=(st=re.current)==null?void 0:st.contains(De.relatedTarget);(!De.relatedTarget||!ot)&&ee(!1)},onDrop:De=>{var ot;Ae(De),ee(!1),!Z&&!w&&((ot=De.dataTransfer.files)!=null&&ot.length)&&Xe(De.dataTransfer.files)}}},[Z,w,Xe]),_e=A.useMemo(()=>{const Ae=je.clsx(Fn.ButtonRenderer,"NoSelect");return{upload:De=>v.jsx(_i,{icon:"X",iconSize:"sm",tooltip:j.Delete,type:"Raw",className:Ae,style:{color:"var(--label-neutral)"},onClick:()=>We(De)}),loading:()=>v.jsx(_i,{icon:"Spinner",iconSize:"sm",type:"Raw",className:Ae}),error:()=>v.jsx(_i,{icon:"CircleAlertOutline",iconSize:"sm",type:"Raw",className:je.clsx(Ae,Fn.ErrorColor,Fn.ErrorCursor),tooltip:j["Fail Download"]}),download:De=>v.jsx(_i,{icon:"FileDownload",iconSize:"sm",tooltip:j.Download,type:"Raw",className:Ae,style:{color:"var(--acent-brand)"},onClick:()=>Ke(De)})}},[j,We,Ke]),Ue=A.useCallback((Ae,De)=>{const ot=ce(Ae),st=se(Ae),yt=()=>b==="Upload"?_e.upload(Ae):ot?_e.loading():st?_e.error():_e.download(Ae);return v.jsx(pm,{label:v.jsx("div",{className:Fn.FileChipContent,children:v.jsxs(Sn,{className:Fn.FileNameContainer,children:[v.jsx(Sa,{className:je.clsx(st&&Fn.ErrorColor),children:Ae.name}),v.jsx("span",{className:Fn.FileSize,children:Kc(Ae.size)})]})}),ButtonRenderer:yt,className:je.clsx(Fn.FileChip,st&&Fn.ErrorBorder)},De)},[ce,se,b,_e]),ht=A.useCallback(()=>v.jsx("div",{className:je.clsx(Fn.FileBox,Z&&Fn.ErrorBorder,Z&&Fn.ErrorColor,Z&&Fn.ErrorCursor),...Te,ref:re,children:B?v.jsxs(Sn,{className:je.clsx("NoSelect"),style:{gap:4},children:[v.jsx(jr,{icon:"FileDownload"}),v.jsx("span",{children:j["Drop file to select"]})]}):v.jsx(Fi,{type:"Raw",className:je.clsx(Fn.SelectRenderer,"NoSelect"),onClick:ge,isDisabled:Z||w,children:j["Insert File"]})}),[Z,B,j,ge,w,Te]),St=A.useMemo(()=>{const Ae=b==="Upload",De=Ae?j["Delete All"]:j["Download All"],ot=Ae?Je:Ne;return v.jsxs(Sn,{className:Fn.LabelContainer,children:[t,b==="Upload"&&v.jsxs(Sa,{className:je.clsx(Fn.TotalFileSize,"NoSelect"),children:["(",v.jsx("span",{className:je.clsx(Z&&Fn.ErrorColor),children:Kc(ve)})," / ",Kc(S),")"]}),v.jsx("span",{className:je.clsx(Fn.LabelButton,"Label1",pe&&Fn.Disabled,Ae&&Fn.Delete),onClick:pe?void 0:ot,children:De})]})},[b,j,Je,Ne,t,Z,ve,S,pe]);return b==="Download"&&!(H!=null&&H.length)?null:v.jsxs(ec,{helperText:e,wrapProps:i,wrapType:l,labelProps:n,errorMessage:u,label:St,children:[v.jsx("input",{style:{display:"none"},ref:X,type:"file",multiple:!0,onChange:Le,accept:g||""}),v.jsx($r,{...O,className:je.clsx(Fn.AFileUploader,L),children:v.jsxs(Sn,{className:Fn.ChipsContainer,children:[b==="Upload"&&ht(),H==null?void 0:H.map(Ue)]})})]})},e8="_AFloatMenu_xco8u_1",t8="_Content_xco8u_10",s0={AFloatMenu:e8,Content:t8},B2=r=>{const{defs:e,defaultDef:t,actionRef:n,offset:i,onClose:l,onClick:u,onPaperClick:f,position:g=ef.ES,width:m=137}=r,I=A.useMemo(()=>({content:r8,...t}),[t]),E=A.useMemo(()=>{const B={};return er.keys(e).forEach(ee=>{const X=e[ee],re={...I,...X};re.noDisplay||(B[ee]=re)}),B},[I,e]),[b,S]=A.useState(null),_=A.useCallback(B=>{J_(B,O,g,i),S(B)},[g,i]),[M,w]=A.useState(!1),[x,L]=A.useState(!1),O=A.useRef(null),j=A.useCallback(B=>{L(!0),setTimeout(()=>w(!0),0),setTimeout(()=>_(B),0)},[_]),H=A.useCallback(()=>{w(!1),L(!0),l==null||l()},[l]),U=A.useCallback(()=>L(!1),[]),Z=A.useCallback(async B=>{const ee=document.getElementById("root"),X=B.target,re=O.current;!ee||!re||!X||!re.contains(X)&&ee.contains(X)&&(await(f==null?void 0:f(B)),H())},[H,f]);A.useEffect(()=>{if(M)return setTimeout(()=>document.addEventListener("mousedown",Z),0),()=>document.removeEventListener("mousedown",Z)},[M,Z]);const de=A.useCallback(()=>{b&&_(b)},[_,b]);A.useEffect(()=>{if(!M||!b)return;let B=b.parentElement;for(;B;)B.addEventListener("scroll",de),B=B.parentElement;return()=>{let ee=b.parentElement;for(;ee;)ee.removeEventListener("scroll",de),ee=ee.parentElement}},[b,M,de]),A.useEffect(()=>{if(M)return window.addEventListener("resize",de),()=>window.removeEventListener("resize",de)},[M,de]);const J=A.useCallback(B=>{B[0].intersectionRatio===0&&H()},[H]);A.useEffect(()=>{if(!M)return;const B=new IntersectionObserver(J,{threshold:0});return O.current&&B.observe(O.current),()=>B.disconnect()},[O,M,J]),A.useEffect(()=>{n&&(n.current={open:j,close:H})},[n,j,H]);const ue=A.useCallback(B=>{var ee;if(M){if((ee=E[B])!=null&&ee.isDisabled)return}else return;u==null||u(B),H()},[M,u,H,E]);return!M&&!x?null:Hs.createPortal(v.jsx("div",{className:s0.AFloatMenu,style:{opacity:+M,visibility:M&&Object.keys(E).length>0?"visible":"hidden",minWidth:m},onTransitionEnd:U,ref:O,children:er.map(E,([B],ee)=>{const X={...I,...E[B]};let{content:re,noDisplay:fe,tooltipDirection:ve=yi.E,...be}=X;return fe?null:(re=Lr.getContent(X.content,{defKey:B,def:X}),A.createElement($r,{...be,key:ee,className:je.clsx(s0.Content,"Label2","IsClickable",be.className),onClick:le=>{var ke;ue==null||ue(B),(ke=be.onClick)==null||ke.call(be,le)},tooltipDirection:ve},re))})}),document.body)},r8=r=>r.defKey;function n8(r){try{const e=Number.parseInt(r);return isNaN(e)?void 0:e}catch{return}}const H2={parseInt:n8},i8=`${Number.MAX_SAFE_INTEGER}`.length-1,o8=r=>{const{unit:e,type:t="Secondary",min:n,max:i,useValue:l,onEnterPress:u,canAsterisk:f=!1,onFocus:g,...m}=r,I=A.useMemo(()=>i!==void 0&&n!==void 0?Math.max(`${i}`.length+1,`${n}`.length+1):i8,[n,i]),[E,b]=nn(l,""),S=A.useCallback(x=>{if(b)if(f&&x.startsWith("*"))b("*");else if(x==="")b("");else if(x==="-")b("-");else{x=x.replace(/[^0-9-]/g,"");try{const L=H2.parseInt(x);L!==void 0&&(n!==void 0&&L<n?b(`${n}`):i!==void 0&&L>i?b(`${i}`):b(`${L}`))}catch(L){console.error("ANumInput : ",L)}}},[b,f,n,i]),_=A.useRef(null),M=A.useCallback(x=>{var L;(L=_.current)==null||L.blur(),u==null||u(x)},[u]),w=A.useMemo(()=>n===void 0&&i===void 0?e??"number":`${n??""}~${i??""}`,[n,i,e]);return v.jsx(tc,{...m,type:t,className:je.clsx(to.ANumInput,r.className),autoComplete:"off",onEnterPress:M,useValue:[E,S],maxLength:I,placeholder:w,RightAddon:r.unit&&v.jsx("span",{style:{marginRight:4},children:r.unit}),inputRef:_})},s8="_AListView_k7t2d_1",a8="_Row_k7t2d_10",l8="_Label_k7t2d_20",c8="_Content_k7t2d_30",kd={AListView:s8,Row:a8,Label:l8,Content:c8},u8=r=>{const{defs:e,defaultDef:t,item:n,rowHeight:i,labelWidth:l,noBorder:u,style:f,...g}=r,m=u?"":"var(--AListView_border-thin)",I=u?"":"var(--AListView_border-thick)",E=A.useMemo(()=>({content:d8,label:f8,...t}),[t]),b=A.useMemo(()=>{const S={};return er.keys(e).forEach(_=>{const M=e[_],w={...E,...M};S[_]=w}),S},[E,e]);return v.jsx($r,{...g,className:je.clsx(kd.AListView,g.className),style:{...f,borderTop:m},children:er.map(b,([S])=>{const _={...E,...b[S]},M=Lr.getContent(_.label,{defKey:S,item:n,def:_}),w=Lr.getContent(_.content,{defKey:S,item:n||{[S]:""},def:_}),x=Lr.getContent(_.bold||"label",{defKey:S,item:n,def:_});return v.jsxs("div",{className:kd.Row,style:{height:i,borderBottom:m},children:[v.jsx("div",{className:je.clsx(kd.Label,"NoSelect",x!=="content"&&"Bold"),style:{width:l,minWidth:l,maxWidth:l,borderLeft:I,paddingLeft:u?0:10},children:v.jsx(Sa,{children:M})}),v.jsx("div",{className:je.clsx(kd.Content,x!=="label"&&"Bold"),style:{borderLeft:I,borderRight:I},children:v.jsx(Sa,{style:{width:"100%",padding:u?0:10},children:w})})]},S)})})},f8=r=>r.defKey,d8=r=>{const{defKey:e,item:t}=r;if(t)if(er.hasKey(t,e)){const n=t[e];return er.isReactNode(n)?n:null}else return null;else return null},h8="_ALoadingBorder_kwc1g_1",p8="_ProgressBar_kwc1g_9",g8="_IsLoading_kwc1g_15",m8="_load_kwc1g_1",v8="_Cover_kwc1g_19",Lf={ALoadingBorder:h8,ProgressBar:p8,IsLoading:g8,load:m8,Cover:v8},ym=r=>{const{isLoading:e}=r,[t,n]=A.useState(!1),i=A.useRef(null);return A.useEffect(()=>{e?(n(!0),i.current&&clearTimeout(i.current)):i.current=setTimeout(()=>n(!1),300)},[e]),v.jsxs("div",{className:Lf.ALoadingBorder,children:[v.jsx("div",{className:je.clsx(Lf.ProgressBar,t&&Lf.IsLoading)}),v.jsx("div",{className:je.clsx(Lf.Cover,e&&Lf.IsLoading),style:{transition:"all 300ms"}})]})},y8="_Container_tmqll_1",b8="_Option_tmqll_7",_8="_RadioButton_tmqll_14",x8="_InnerCircle_tmqll_24",S8="_isChecked_tmqll_29",qu={Container:y8,Option:b8,RadioButton:_8,InnerCircle:x8,isChecked:S8},C8=r=>{const{options:e,useSelect:t,selectDisabled:n,radius:i=23,innerRadius:l=i*.6,OptionRenderer:u=q2}=r,[f,g]=nn(t,e[0]);return v.jsx("div",{className:qu.Container,children:e.map((m,I)=>{const E=n==null?void 0:n(m),b=()=>E?null:g==null?void 0:g(m);return v.jsxs(Sn,{className:je.clsx(qu.Option,"IsClickable"),isDisabled:E,onClick:b,children:[v.jsx(w8,{isChecked:f===m,radius:i,innerRadius:l},I),v.jsx(u,{option:m})]},I)})})},q2=({option:r})=>r,w8=({isChecked:r,radius:e,innerRadius:t})=>v.jsx($r,{className:je.clsx(qu.RadioButton,r&&qu.isChecked),style:{width:e,height:e},children:v.jsx($r,{className:je.clsx(qu.InnerCircle,r&&qu.isChecked),style:{width:t,height:t}})}),A8="_AMultiSelect_mr38x_1",T8="_Arrow_mr38x_15",E8="_Primary_mr38x_24",k8="_UnAvailable_mr38x_35",R8="_IsOpen_mr38x_35",I8="_Secondary_mr38x_42",L8="_Placeholder_mr38x_58",M8="_ValuesContainer_mr38x_63",D8="_Values_mr38x_63",O8="_Options_mr38x_82",P8="_Option_mr38x_82",N8="_Selected_mr38x_124",F8="_CheckBox_mr38x_131",yo={AMultiSelect:A8,Arrow:T8,Primary:E8,UnAvailable:k8,IsOpen:R8,Secondary:I8,Placeholder:L8,ValuesContainer:M8,Values:D8,Options:O8,Option:P8,Selected:N8,CheckBox:F8},j8=r=>{const{options:e,useSelect:t,type:n="Primary",placeholder:i=hn.AMultiSelect["Select(Placeholder)"],onClose:l,SelectedRenderer:u=H8,OptionRenderer:f=q8,minShowRows:g=2,maxShowRows:m=6,arrowProps:I,isAutoWidth:E=!1,...b}=r,S=A.useRef(null),_=A.useMemo(()=>b.abaseRef??S,[b.abaseRef]),M=A.useRef(null),[w,x]=nn(t,[]),[L,O]=A.useState(void 0),j=A.useRef(e),H=A.useRef(null),[U,Z]=A.useState(!1),[de,J]=A.useState(!1),ue=A.useCallback(()=>J(!1),[]),B=A.useCallback(()=>{b.isDisabled||b.isLoading||e.length<1||(J(!0),setTimeout(()=>Z(!0),0),setTimeout(()=>Jh(M,_,e,g,m),0))},[_,b.isDisabled,b.isLoading,e,g,m]),ee=A.useCallback(()=>{Z(!1),J(!0),l==null||l()},[l]),X=A.useCallback(ce=>{var se;U?ee():B(),setTimeout(()=>Jh(M,_,e,g,m),0),(se=b.onClick)==null||se.call(b,ce)},[_,b,e,U,ee,B,g,m]),re=A.useCallback(()=>{Jh(M,_,e,g,m)},[_,e,g,m]);A.useEffect(()=>{if(!U||!_.current)return;const ce=_.current;let se=ce.parentElement;for(;se;)se.addEventListener("scroll",re),se=se.parentElement;return()=>{let pe=ce.parentElement;for(;pe;)pe.removeEventListener("scroll",re),pe=pe.parentElement}},[_,U,re]),A.useEffect(()=>{if(U)return window.addEventListener("resize",re),()=>window.removeEventListener("resize",re)},[U,re]);const fe=A.useCallback(ce=>{ce[0].intersectionRatio===0&&ee()},[ee]);A.useEffect(()=>{if(!U)return;const ce=new IntersectionObserver(fe,{threshold:0});return _.current&&ce.observe(_.current),()=>ce.disconnect()},[_,U,fe]);const ve=A.useCallback(ce=>{const se=ce.target,pe=_.current,Oe=M.current;!pe||!se||!Oe||!pe.contains(se)&&!Oe.contains(se)&&ee()},[_,ee]),be=A.useMemo(()=>b.isDisabled||b.isLoading||e.length<1,[b.isDisabled,b.isLoading,e]);A.useEffect(()=>{if(U)return setTimeout(()=>document.addEventListener("mousedown",ve),0),()=>document.removeEventListener("mousedown",ve)},[U,ve]);const le=A.useCallback((ce,se)=>{ce.stopPropagation(),ce.preventDefault();let pe=[...w];pe.includes(se)?pe=pe.filter(Oe=>Oe!==se):pe.push(se),x==null||x(pe)},[w,x]),ke=A.useCallback(()=>{if(!E||!_.current)return;const ce=Zc.calculateOptimalSelectWidth({elementRef:_,options:e,selectedOptions:w,placeholder:i,optionRenderer:se=>f({option:se}),type:n,isMulti:!0});O(ce)},[E,_,e,w,i,f,n]);return A.useEffect(()=>E?((e!==j.current||L===void 0)&&(H.current!==null&&cancelAnimationFrame(H.current),H.current=requestAnimationFrame(()=>{ke(),H.current=null,j.current=[...e]})),()=>{H.current!==null&&(cancelAnimationFrame(H.current),H.current=null)}):void 0,[E,e,ke,L]),A.useEffect(()=>()=>{typeof Zc.clearCache=="function"&&Zc.clearCache()},[]),v.jsxs(v.Fragment,{children:[v.jsxs($r,{...b,isDisabled:b.isDisabled||e.length<1,className:je.clsx(b.className,yo.AMultiSelect,"NoSelect",U&&yo.IsOpen,be&&yo.UnAvailable,yo[n]),style:{padding:n==="Secondary"?"8px 8px 8px 0":0,width:L?`${L}px`:E?"100px":void 0,...b.style},abaseRef:_,onClick:X,children:[v.jsx("div",{className:yo.ValuesContainer,children:v.jsx("div",{className:je.clsx(yo.Values,w.length<1&&yo.Placeholder),children:v.jsx(u,{OptionRenderer:f,selectedOptions:w,placeholder:i})})}),v.jsx("div",{...I,className:je.clsx(yo.Arrow,I==null?void 0:I.className),children:v.jsx(jr,{style:{transform:U?"rotate(180deg)":"",transition:"var(--Transition)"},icon:"TriangleDown"})})]}),e.length>0&&(U||de)&&Hs.createPortal(v.jsx("div",{className:je.clsx(yo.Options,yo[n]),onTransitionEnd:ue,style:{opacity:+U,visibility:U?"visible":"hidden",pointerEvents:U?void 0:"none",width:L?`${L}px`:E?"100px":void 0,borderRadius:_.current?window.getComputedStyle(_.current).borderRadius:void 0},ref:M,children:e.map((ce,se)=>{var Oe;const pe=w.includes(ce);return v.jsxs("div",{className:je.clsx(yo.Option,pe&&yo.Selected,"NoSelect",yo[n]),style:{height:(Oe=_.current)==null?void 0:Oe.getBoundingClientRect().height},onClick:Xe=>le(Xe,ce),children:[v.jsx(Zu,{className:yo.CheckBox,useCheck:[+pe,void 0]}),v.jsx(f,{option:ce})]},se)})}),document.body)]})};function Jh(r,e,t,n,i){if(!e.current||!r.current||!t||t.length<1)return;const l=e.current.getBoundingClientRect(),u=B8(l,t.length,n,i),f=window.getComputedStyle(e.current);r.current.style.top=`calc(${u.top??0}px - ${f.borderTopWidth})`,r.current.style.bottom=u.bottom?u.bottom+"px":"",r.current.style.left=u.left+"px",r.current.style.width||(r.current.style.minWidth=u.minWidth+"px"),r.current.style.minHeight=u.minHeight+"px",r.current.style.maxHeight=u.maxHeight+"px",r.current.style.visibility="visible"}function B8(r,e,t,n){const i={top:r.bottom,bottom:void 0,left:r.left,height:"fit-content",minWidth:r.width,minHeight:r.height*Math.min(t,e),maxHeight:r.height*n>window.innerHeight-r.bottom-10?window.innerHeight-r.bottom-10:r.height*n};return window.innerHeight-r.bottom-10<i.height&&(window.innerHeight-r.bottom-10<i.minHeight?(i.top=r.top-e*r.height,i.top<0&&(i.top=10,i.minHeight=r.top-10,i.height=r.top-10)):i.height=window.innerHeight-r.bottom-10),i}const H8=r=>{const{OptionRenderer:e,selectedOptions:t,placeholder:n}=r;return t.length<1?n:t.length===1?v.jsx(e,{option:t[0]}):`${t.length} selected`},q8=r=>{const{option:e}=r;return er.isReactNode(e)?e:null},z8="_Container_10ion_1",$8="_Steps_10ion_9",U8="_Step_10ion_9",W8="_OutCircle_10ion_26",V8="_IsOver_10ion_37",G8="_InCircle_10ion_41",Z8="_Line_10ion_54",K8="_Left_10ion_66",Y8="_Right_10ion_69",X8="_ContentContainer_10ion_73",J8="_Content_10ion_73",eo={Container:z8,Steps:$8,Step:U8,OutCircle:W8,IsOver:V8,InCircle:G8,Line:Z8,Left:K8,Right:Y8,ContentContainer:X8,Content:J8},Q8=r=>{const{useSelect:e,steps:t,StepRenderer:n=a0,ContentRenderer:i=a0}=r;if(t.length===0)throw new Error("steps should have at least one element");const l=A.useRef(null),[u,f]=nn(e,t[0]),g=A.useCallback(I=>f==null?void 0:f(I),[f]),m=A.useMemo(()=>t.indexOf(u),[u,t]);return A.useEffect(()=>{m<0&&g(t[0])},[m,t,g]),v.jsxs("div",{className:eo.Container,children:[v.jsx("div",{className:eo.Steps,children:t.map((I,E)=>{const b=t.indexOf(I),S=m>=E,_=m>E;return v.jsxs("div",{className:eo.Step,children:[E!==0&&v.jsx("div",{className:je.clsx(eo.Line,eo.Left,S&&eo.IsOver)}),E!==t.length-1&&v.jsx("div",{className:je.clsx(eo.Line,eo.Right,_&&eo.IsOver)}),v.jsx(Fi,{type:"Raw",className:je.clsx(eo.OutCircle,S&&eo.IsOver),onClick:()=>g(I),children:v.jsx("div",{className:je.clsx(eo.InCircle,S&&eo.IsOver)})}),v.jsx(n,{step:I,stepIdx:b})]},E)})}),v.jsx("div",{className:eo.ContentContainer,ref:l,children:t.map((I,E)=>{const b=t.indexOf(I);return v.jsx("div",{className:eo.Content,style:E===0?{marginLeft:`${m*-100}%`}:{},children:v.jsx(i,{step:I,stepIdx:b})},E)})})]})},a0=r=>{const{step:e}=r;return typeof e=="object"?er.stringify(e):e},ek="_ATab_1ikea_1",tk="_Option_1ikea_9",rk="_Underline_1ikea_22",nk="_IsSelected_1ikea_22",ik="_IndicatorTrack_1ikea_33",ok="_Indicator_1ikea_33",sk="_Primary_1ikea_49",ak="_Secondary_1ikea_56",lk="_IsDisabled_1ikea_66",ck="_Tertiary_1ikea_80",uk="_Quaternary_1ikea_110",Zl={ATab:ek,Option:tk,Underline:rk,IsSelected:nk,IndicatorTrack:ik,Indicator:ok,Primary:sk,Secondary:ak,IsDisabled:lk,Tertiary:ck,Quaternary:uk},fk=["Primary","Secondary","Tertiary","Quaternary"],z2=r=>{const{options:e,useSelect:t,selectDisabled:n,type:i="Primary",tabProps:l,optionProps:u,optionWidth:f,OptionRenderer:g=dk,RightAddon:m,color:I,underline:E}=r;if(e.length===0)throw new Error("options should have at least one element");const b=A.useMemo(()=>e.findIndex(le=>!(n!=null&&n(le))),[e,n]),S=i==="Tertiary"?2:0,_=i==="Secondary"?8:0,M=A.useMemo(()=>S+_,[S,_]),w=i==="Tertiary"?2:0,x=A.useMemo(()=>(_-S-w-w)/e.length,[e.length,S,_,w]),[L,O]=nn(t,e[b]),j=A.useRef([]),H=A.useCallback(le=>O==null?void 0:O(le),[O]),U=A.useMemo(()=>typeof f=="number"?f+"px":f,[f]),Z=A.useMemo(()=>e.indexOf(L),[e,L]),de=A.useMemo(()=>`calc(${100/e.length}% + ${x}px)`,[e.length,x]),J=A.useMemo(()=>U||`calc(${de} - ${M}px)`,[de,M,U]),[ue,B]=A.useState(0),[ee,X]=A.useState(0),[re,fe]=A.useState(J),ve=A.useMemo(()=>{let le;switch(U){case void 0:le=`calc(${de} * ${Z})`;break;case"fit-content":le=`calc(${ue}px)`;break;default:le=`calc((${U} + ${M}px) * ${Z})`;break}return`calc(${le} + ${w}px)`},[U,w,de,Z,ue,M]),be=A.useMemo(()=>{switch(U){case void 0:return;case"fit-content":return`calc(${ee}px)`;default:return`calc((${U} + ${M}px - ${x}px) * ${e.length})`}},[U,x,M,e,ee]);return A.useEffect(()=>{var ke,ce;if(e.includes(L)||O==null||O(e[b]),U!=="fit-content"){fe(J);return}let le=0;j.current.forEach((se,pe)=>{pe<Z&&se.current&&(le+=se.current.offsetWidth+M)}),B(le),fe(`calc(${((ce=(ke=j.current[Z])==null?void 0:ke.current)==null?void 0:ce.offsetWidth)||0}px)`),X(j.current.reduce((se,pe)=>{var Oe;return se+((((Oe=pe.current)==null?void 0:Oe.offsetWidth)||0)+M-x)},0))},[U,j,e,L,O,b,x,M,Z,J]),v.jsxs("div",{...l,className:je.clsx(Zl.ATab,"Headline2",Zl[i],l==null?void 0:l.className),children:[v.jsx("div",{className:Zl.Indicator,style:{minWidth:re,left:ve,marginLeft:S}}),v.jsx("div",{className:Zl.IndicatorTrack,style:{width:be}}),v.jsx(mn,{w}),e.map((le,ke)=>{const ce=n==null?void 0:n(le);return j.current[ke]||(j.current[ke]=A.createRef()),v.jsx($r,{abaseRef:j.current[ke],...u,style:{minWidth:J,maxWidth:J,marginLeft:S,marginRight:_,"--color":I,...u==null?void 0:u.style},className:je.clsx(Zl.Option,ce&&Zl.IsDiabled,le===L&&Zl.IsSelected,"IsClickable",E&&Zl.Underline,u==null?void 0:u.className),onClick:se=>{!ce&&H(le),u&&u.onClick&&u.onClick(se)},isDisabled:ce,children:v.jsx(g,{option:le})},ke)}),v.jsx(mn,{w:w+S}),m&&v.jsxs(v.Fragment,{children:[v.jsx(Qc,{}),m]})]})},dk=r=>{const{option:e}=r;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 $2(...r){const e=A.useRef(!1);A.useEffect(()=>{e.current||(e.current=!0,r.forEach(t=>t()))},[r])}const U2={String:(r,e,t,n)=>{const{value:i}=n;if(i===void 0)return!1;if(t==="")return er.keys(e).some(I=>{const E=e[I],b=Lr.getContent(E.asText,{defKey:I,def:E,item:r});if(b!==void 0)return b.toString().toLowerCase().includes(i.toLowerCase());const S=Lr.getContent(E.content,{defKey:I,def:E,item:r});return["string","number"].includes(typeof S)&&S!==void 0&&S!==null?S.toString().toLowerCase().includes(i.toLowerCase()):!1});const l=er.keys(e),u=t;if(!l.includes(u))return!1;const f=e[u],g=Lr.getContent(f.asText,{defKey:u,def:f,item:r});if(g!==void 0)return g.toString().toLowerCase().includes(i.toLowerCase());const m=Lr.getContent(f.content,{defKey:u,def:f,item:r});return["string","number"].includes(typeof m)&&m!==void 0&&m!==null?m.toString().toLowerCase().includes(i.toLowerCase()):!1},Select:(r,e,t,n)=>{const{value:i}=n;if(i==null)return!1;const l=er.keys(e),u=t;if(!l.includes(u))return!1;const f=e[u],g=Lr.getContent(f.asText,{defKey:u,def:f,item:r});if(g!==void 0)return i.toString().toLowerCase()===g.toString().toLowerCase();const m=Lr.getContent(f.content,{defKey:u,def:f,item:r});return["string","number"].includes(typeof m)&&m!==void 0&&m!==null?i.toString().toLowerCase()===m.toString().toLowerCase():!1},Date:(r,e,t,n)=>{const{value:i}=n;if(i===void 0)return!1;const l=er.keys(e),u=t;if(!l.includes(u))return!1;const f=e[u],g=Lr.getContent(f.asText,{defKey:u,def:f,item:r});if(g!==void 0){const I=Yt.toDate(g.toString());return I&&Yt.eq(I,i)}const m=Lr.getContent(f.content,{defKey:u,def:f,item:r});if(["string","number"].includes(typeof m)&&m!==void 0&&m!==null){const I=Yt.toDate(m.toString());return I&&Yt.eq(I,i)}return!1},DateRange:(r,e,t,n)=>{const{value:i}=n;if(i===void 0)return!1;const l=er.keys(e),u=t;if(!l.includes(u))return!1;const f=e[u],g=Lr.getContent(f.asText,{defKey:u,def:f,item:r});if(g!==void 0){const I=Yt.toDate(g.toString());return I&&Yt.be(i.sDate,I,i.eDate)}const m=Lr.getContent(f.content,{defKey:u,def:f,item:r});if(["string","number"].includes(typeof m)&&m!==void 0&&m!==null){const I=Yt.toDate(m.toString());return I&&Yt.be(i.sDate,I,i.eDate)}return!1}},hk=(r,e,t)=>{let n=r;return er.keys(t).forEach(l=>{const u=t[l];u.value===void 0||u.value===null||u.value===""||(n=n.filter(f=>{var g;return(g=u.predicate??U2[u.type])==null?void 0:g(f,e,l,u)}))}),n},pk=(r,e,t)=>{if(!t)return r;const n=t.defKey,i=e[n];if(n===void 0)return r;const l=t.sortF??((u,f)=>{const g=Lr.getContent(i.content,{defKey:n,def:i,item:u}),m=Lr.getContent(i.content,{defKey:n,def:i,item:f});return typeof g=="string"&&typeof m=="string"?g<m?-1:g>m?1:0:typeof g=="number"&&typeof m=="number"?g-m:typeof g=="string"&&typeof m=="number"?-1:typeof g=="number"&&typeof m=="string"||g===void 0&&m!==void 0?1:g!==void 0&&m===void 0?-1:0});return r.slice().sort((u,f)=>t.isAsc?l(u,f):l(f,u))},gk=(r,e,t)=>r.slice((e-1)*t,e*t),W2=(r,e)=>{const t=Math.max(Math.ceil(r/e),1);return Array.from({length:t},(n,i)=>i+1)},mk=(r,e,t,n)=>{const i=W2(e,t),l=Math.floor((r-1)/n),u=l*n+1,f=(l+1)*n,g=i.slice(u-1,f);return{pages:i,rangedPages:g}},vk=(r,e,t)=>{const n=[],i=Object.keys(t),l=[];i.forEach(b=>{const S=t[b],_=Lr.getContent(S.hContent,{defKey:b,def:S});if(_!==void 0){if(typeof _=="string"){l.push(_);return}else if(typeof _=="number"){l.push(_.toString());return}}const M=Lr.getContent(S.name,{defKey:b,def:S});if(M!==void 0&&typeof M=="string"){l.push(M);return}l.push(b)});const u=l.map(b=>`"${b.replaceAll('"','""')}"`);n.push(u.join(",")),e.forEach(b=>{const S=[];i.forEach(M=>{const w=t[M],x=Lr.getContent(w.content,{defKey:M,def:w,item:b});if(x!==void 0){if(typeof x=="string"){S.push(x);return}else if(typeof x=="number"){S.push(x.toString());return}}const L=b[M];typeof L=="string"?S.push(L):typeof L=="number"?S.push(L.toString()):S.push("")});const _=S.map(M=>`"${M.replaceAll('"','""')}"`);n.push(_.join(","))});const f=`${r}.csv`,g="\uFEFF"+n.join(`
160
+ `+Mt:""}`)}De.length>0&&U([...H||[],...De])},[U,be,m,g,j,H]),ge=A.useCallback(()=>{var Ae;return(Ae=X.current)==null?void 0:Ae.click()},[]),Le=A.useCallback(Ae=>{const De=Ae.target.files;De!=null&&De.length&&(Xe(De),Oe())},[Xe,Oe]),We=A.useCallback(Ae=>{if(E==null||E(Ae),!U||!H)return;const De=fe(Ae),ot=H.filter(st=>fe(st)!==De);U(ot),Oe()},[E,U,H,Oe,fe]),Je=A.useCallback(()=>{U&&(U([]),Oe())},[U,Oe]),Ke=A.useCallback(Ae=>{if(!I)return Promise.resolve();const De=fe(Ae);return le(De,"Loading"),new Promise(ot=>{I(Ae,st=>{le(De,st),ot()})})},[I,fe,le]),Ne=A.useCallback(async()=>{if(!(H!=null&&H.length))return;const Ae={...J};H.forEach(De=>Ae[fe(De)]="Loading"),ue==null||ue(Ae);for(const De of H)await Ke(De)},[H,fe,J,ue,Ke]),Te=A.useMemo(()=>{const Ae=De=>(De.preventDefault(),De.stopPropagation(),De);return{onDragEnter:De=>{Ae(De),!Z&&!w&&ee(!0)},onDragOver:De=>{Ae(De),!Z&&!w&&De.dataTransfer&&(De.dataTransfer.dropEffect="copy")},onDragLeave:De=>{var st;Ae(De);const ot=(st=re.current)==null?void 0:st.contains(De.relatedTarget);(!De.relatedTarget||!ot)&&ee(!1)},onDrop:De=>{var ot;Ae(De),ee(!1),!Z&&!w&&((ot=De.dataTransfer.files)!=null&&ot.length)&&Xe(De.dataTransfer.files)}}},[Z,w,Xe]),_e=A.useMemo(()=>{const Ae=je.clsx(Fn.ButtonRenderer,"NoSelect");return{upload:De=>v.jsx(_i,{icon:"X",iconSize:"sm",tooltip:j.Delete,type:"Raw",className:Ae,style:{color:"var(--label-neutral)"},onClick:()=>We(De)}),loading:()=>v.jsx(_i,{icon:"Spinner",iconSize:"sm",type:"Raw",className:Ae}),error:()=>v.jsx(_i,{icon:"CircleAlertOutline",iconSize:"sm",type:"Raw",className:je.clsx(Ae,Fn.ErrorColor,Fn.ErrorCursor),tooltip:j["Fail Download"]}),download:De=>v.jsx(_i,{icon:"FileDownload",iconSize:"sm",tooltip:j.Download,type:"Raw",className:Ae,style:{color:"var(--acent-brand)"},onClick:()=>Ke(De)})}},[j,We,Ke]),Ue=A.useCallback((Ae,De)=>{const ot=ce(Ae),st=se(Ae),yt=()=>b==="Upload"?_e.upload(Ae):ot?_e.loading():st?_e.error():_e.download(Ae);return v.jsx(pm,{label:v.jsx("div",{className:Fn.FileChipContent,children:v.jsxs(Sn,{className:Fn.FileNameContainer,children:[v.jsx(Sa,{className:je.clsx(st&&Fn.ErrorColor),children:Ae.name}),v.jsx("span",{className:Fn.FileSize,children:Kc(Ae.size)})]})}),ButtonRenderer:yt,className:je.clsx(Fn.FileChip,st&&Fn.ErrorBorder)},De)},[ce,se,b,_e]),ht=A.useCallback(()=>v.jsx("div",{className:je.clsx(Fn.FileBox,Z&&Fn.ErrorBorder,Z&&Fn.ErrorColor,Z&&Fn.ErrorCursor),...Te,ref:re,children:B?v.jsxs(Sn,{className:je.clsx("NoSelect"),style:{gap:4},children:[v.jsx(jr,{icon:"FileDownload"}),v.jsx("span",{children:j["Drop file to select"]})]}):v.jsx(Fi,{type:"Raw",className:je.clsx(Fn.SelectRenderer,"NoSelect"),onClick:ge,isDisabled:Z||w,children:j["Insert File"]})}),[Z,B,j,ge,w,Te]),St=A.useMemo(()=>{const Ae=b==="Upload",De=Ae?j["Delete All"]:j["Download All"],ot=Ae?Je:Ne;return v.jsxs(Sn,{className:Fn.LabelContainer,children:[t,b==="Upload"&&v.jsxs(Sa,{className:je.clsx(Fn.TotalFileSize,"NoSelect"),children:["(",v.jsx("span",{className:je.clsx(Z&&Fn.ErrorColor),children:Kc(ve)})," / ",Kc(S),")"]}),v.jsx("span",{className:je.clsx(Fn.LabelButton,"Label1",pe&&Fn.Disabled,Ae&&Fn.Delete),onClick:pe?void 0:ot,children:De})]})},[b,j,Je,Ne,t,Z,ve,S,pe]);return b==="Download"&&!(H!=null&&H.length)?null:v.jsxs(ec,{helperText:e,wrapProps:i,wrapType:l,labelProps:n,errorMessage:u,label:St,children:[v.jsx("input",{style:{display:"none"},ref:X,type:"file",multiple:!0,onChange:Le,accept:g||""}),v.jsx($r,{...O,className:je.clsx(Fn.AFileUploader,L),children:v.jsxs(Sn,{className:Fn.ChipsContainer,children:[b==="Upload"&&ht(),H==null?void 0:H.map(Ue)]})})]})},e8="_AFloatMenu_xco8u_1",t8="_Content_xco8u_10",s0={AFloatMenu:e8,Content:t8},B2=r=>{const{defs:e,defaultDef:t,actionRef:n,offset:i,onClose:l,onClick:u,onPaperClick:f,position:g=ef.ES,width:m=137}=r,I=A.useMemo(()=>({content:r8,...t}),[t]),E=A.useMemo(()=>{const B={};return er.keys(e).forEach(ee=>{const X=e[ee],re={...I,...X};re.noDisplay||(B[ee]=re)}),B},[I,e]),[b,S]=A.useState(null),_=A.useCallback(B=>{J_(B,O,g,i),S(B)},[g,i]),[M,w]=A.useState(!1),[x,L]=A.useState(!1),O=A.useRef(null),j=A.useCallback(B=>{L(!0),setTimeout(()=>w(!0),0),setTimeout(()=>_(B),0)},[_]),H=A.useCallback(()=>{w(!1),L(!0),l==null||l()},[l]),U=A.useCallback(()=>L(!1),[]),Z=A.useCallback(async B=>{const ee=document.getElementById("root"),X=B.target,re=O.current;!ee||!re||!X||!re.contains(X)&&ee.contains(X)&&(await(f==null?void 0:f(B)),H())},[H,f]);A.useEffect(()=>{if(M)return setTimeout(()=>document.addEventListener("mousedown",Z),0),()=>document.removeEventListener("mousedown",Z)},[M,Z]);const de=A.useCallback(()=>{b&&_(b)},[_,b]);A.useEffect(()=>{if(!M||!b)return;let B=b.parentElement;for(;B;)B.addEventListener("scroll",de),B=B.parentElement;return()=>{let ee=b.parentElement;for(;ee;)ee.removeEventListener("scroll",de),ee=ee.parentElement}},[b,M,de]),A.useEffect(()=>{if(M)return window.addEventListener("resize",de),()=>window.removeEventListener("resize",de)},[M,de]);const J=A.useCallback(B=>{B[0].intersectionRatio===0&&H()},[H]);A.useEffect(()=>{if(!M)return;const B=new IntersectionObserver(J,{threshold:0});return O.current&&B.observe(O.current),()=>B.disconnect()},[O,M,J]),A.useEffect(()=>{n&&(n.current={open:j,close:H})},[n,j,H]);const ue=A.useCallback(B=>{var ee;if(M){if((ee=E[B])!=null&&ee.isDisabled)return}else return;u==null||u(B),H()},[M,u,H,E]);return!M&&!x?null:Hs.createPortal(v.jsx("div",{className:s0.AFloatMenu,style:{opacity:+M,visibility:M&&Object.keys(E).length>0?"visible":"hidden",minWidth:m},onTransitionEnd:U,ref:O,children:er.map(E,([B],ee)=>{const X={...I,...E[B]};let{content:re,noDisplay:fe,tooltipDirection:ve=yi.E,...be}=X;return fe?null:(re=Lr.getContent(X.content,{defKey:B,def:X}),A.createElement($r,{...be,key:ee,className:je.clsx(s0.Content,"Label2","IsClickable",be.className),onClick:le=>{var ke;ue==null||ue(B),(ke=be.onClick)==null||ke.call(be,le)},tooltipDirection:ve},re))})}),document.body)},r8=r=>r.defKey;function n8(r){try{const e=Number.parseInt(r);return isNaN(e)?void 0:e}catch{return}}const H2={parseInt:n8},i8=`${Number.MAX_SAFE_INTEGER}`.length-1,o8=r=>{const{unit:e,type:t="Secondary",min:n,max:i,useValue:l,onEnterPress:u,canAsterisk:f=!1,onFocus:g,...m}=r,I=A.useMemo(()=>i!==void 0&&n!==void 0?Math.max(`${i}`.length+1,`${n}`.length+1):i8,[n,i]),[E,b]=nn(l,""),S=A.useCallback(x=>{if(b)if(f&&x.startsWith("*"))b("*");else if(x==="")b("");else if(x==="-")b("-");else{x=x.replace(/[^0-9-]/g,"");try{const L=H2.parseInt(x);L!==void 0&&(n!==void 0&&L<n?b(`${n}`):i!==void 0&&L>i?b(`${i}`):b(`${L}`))}catch(L){console.error("ANumInput : ",L)}}},[b,f,n,i]),_=A.useRef(null),M=A.useCallback(x=>{var L;(L=_.current)==null||L.blur(),u==null||u(x)},[u]),w=A.useMemo(()=>n===void 0&&i===void 0?e??"number":`${n??""}~${i??""}`,[n,i,e]);return v.jsx(tc,{...m,type:t,className:je.clsx(to.ANumInput,r.className),autoComplete:"off",onEnterPress:M,useValue:[E,S],maxLength:I,placeholder:w,RightAddon:r.unit&&v.jsx("span",{style:{marginRight:4},children:r.unit}),inputRef:_})},s8="_AListView_k7t2d_1",a8="_Row_k7t2d_10",l8="_Label_k7t2d_20",c8="_Content_k7t2d_30",kd={AListView:s8,Row:a8,Label:l8,Content:c8},u8=r=>{const{defs:e,defaultDef:t,item:n,rowHeight:i,labelWidth:l,noBorder:u,style:f,...g}=r,m=u?"":"var(--AListView_border-thin)",I=u?"":"var(--AListView_border-thick)",E=A.useMemo(()=>({content:d8,label:f8,...t}),[t]),b=A.useMemo(()=>{const S={};return er.keys(e).forEach(_=>{const M=e[_],w={...E,...M};S[_]=w}),S},[E,e]);return v.jsx($r,{...g,className:je.clsx(kd.AListView,g.className),style:{...f,borderTop:m},children:er.map(b,([S])=>{const _={...E,...b[S]},M=Lr.getContent(_.label,{defKey:S,item:n,def:_}),w=Lr.getContent(_.content,{defKey:S,item:n||{[S]:""},def:_}),x=Lr.getContent(_.bold||"label",{defKey:S,item:n,def:_});return v.jsxs("div",{className:kd.Row,style:{height:i,borderBottom:m},children:[v.jsx("div",{className:je.clsx(kd.Label,"NoSelect",x!=="content"&&"Bold"),style:{width:l,minWidth:l,maxWidth:l,borderLeft:I,paddingLeft:u?0:10},children:v.jsx(Sa,{children:M})}),v.jsx("div",{className:je.clsx(kd.Content,x!=="label"&&"Bold"),style:{borderLeft:I,borderRight:I},children:v.jsx(Sa,{style:{width:"100%",padding:u?0:10},children:w})})]},S)})})},f8=r=>r.defKey,d8=r=>{const{defKey:e,item:t}=r;if(t)if(er.hasKey(t,e)){const n=t[e];return er.isReactNode(n)?n:null}else return null;else return null},h8="_ALoadingBorder_kwc1g_1",p8="_ProgressBar_kwc1g_9",g8="_IsLoading_kwc1g_15",m8="_load_kwc1g_1",v8="_Cover_kwc1g_19",Lf={ALoadingBorder:h8,ProgressBar:p8,IsLoading:g8,load:m8,Cover:v8},ym=r=>{const{isLoading:e}=r,[t,n]=A.useState(!1),i=A.useRef(null);return A.useEffect(()=>{e?(n(!0),i.current&&clearTimeout(i.current)):i.current=setTimeout(()=>n(!1),300)},[e]),v.jsxs("div",{className:Lf.ALoadingBorder,children:[v.jsx("div",{className:je.clsx(Lf.ProgressBar,t&&Lf.IsLoading)}),v.jsx("div",{className:je.clsx(Lf.Cover,e&&Lf.IsLoading),style:{transition:"all 300ms"}})]})},y8="_Container_tmqll_1",b8="_Option_tmqll_7",_8="_RadioButton_tmqll_14",x8="_InnerCircle_tmqll_24",S8="_isChecked_tmqll_29",qu={Container:y8,Option:b8,RadioButton:_8,InnerCircle:x8,isChecked:S8},C8=r=>{const{options:e,useSelect:t,selectDisabled:n,radius:i=23,innerRadius:l=i*.6,OptionRenderer:u=q2}=r,[f,g]=nn(t,e[0]);return v.jsx("div",{className:qu.Container,children:e.map((m,I)=>{const E=n==null?void 0:n(m),b=()=>E?null:g==null?void 0:g(m);return v.jsxs(Sn,{className:je.clsx(qu.Option,"IsClickable"),isDisabled:E,onClick:b,children:[v.jsx(w8,{isChecked:f===m,radius:i,innerRadius:l},I),v.jsx(u,{option:m})]},I)})})},q2=({option:r})=>r,w8=({isChecked:r,radius:e,innerRadius:t})=>v.jsx($r,{className:je.clsx(qu.RadioButton,r&&qu.isChecked),style:{width:e,height:e},children:v.jsx($r,{className:je.clsx(qu.InnerCircle,r&&qu.isChecked),style:{width:t,height:t}})}),A8="_AMultiSelect_mr38x_1",T8="_Arrow_mr38x_15",E8="_Primary_mr38x_24",k8="_UnAvailable_mr38x_35",R8="_IsOpen_mr38x_35",I8="_Secondary_mr38x_42",L8="_Placeholder_mr38x_58",M8="_ValuesContainer_mr38x_63",D8="_Values_mr38x_63",O8="_Options_mr38x_82",P8="_Option_mr38x_82",N8="_Selected_mr38x_124",F8="_CheckBox_mr38x_131",yo={AMultiSelect:A8,Arrow:T8,Primary:E8,UnAvailable:k8,IsOpen:R8,Secondary:I8,Placeholder:L8,ValuesContainer:M8,Values:D8,Options:O8,Option:P8,Selected:N8,CheckBox:F8},j8=r=>{const{options:e,useSelect:t,type:n="Primary",placeholder:i=hn.AMultiSelect["Select(Placeholder)"],onClose:l,SelectedRenderer:u=H8,OptionRenderer:f=q8,minShowRows:g=2,maxShowRows:m=6,arrowProps:I,isAutoWidth:E=!1,...b}=r,S=A.useRef(null),_=A.useMemo(()=>b.abaseRef??S,[b.abaseRef]),M=A.useRef(null),[w,x]=nn(t,[]),[L,O]=A.useState(void 0),j=A.useRef(e),H=A.useRef(null),[U,Z]=A.useState(!1),[de,J]=A.useState(!1),ue=A.useCallback(()=>J(!1),[]),B=A.useCallback(()=>{b.isDisabled||b.isLoading||e.length<1||(J(!0),setTimeout(()=>Z(!0),0),setTimeout(()=>Jh(M,_,e,g,m),0))},[_,b.isDisabled,b.isLoading,e,g,m]),ee=A.useCallback(()=>{Z(!1),J(!0),l==null||l()},[l]),X=A.useCallback(ce=>{var se;U?ee():B(),setTimeout(()=>Jh(M,_,e,g,m),0),(se=b.onClick)==null||se.call(b,ce)},[_,b,e,U,ee,B,g,m]),re=A.useCallback(()=>{Jh(M,_,e,g,m)},[_,e,g,m]);A.useEffect(()=>{if(!U||!_.current)return;const ce=_.current;let se=ce.parentElement;for(;se;)se.addEventListener("scroll",re),se=se.parentElement;return()=>{let pe=ce.parentElement;for(;pe;)pe.removeEventListener("scroll",re),pe=pe.parentElement}},[_,U,re]),A.useEffect(()=>{if(U)return window.addEventListener("resize",re),()=>window.removeEventListener("resize",re)},[U,re]);const fe=A.useCallback(ce=>{ce[0].intersectionRatio===0&&ee()},[ee]);A.useEffect(()=>{if(!U)return;const ce=new IntersectionObserver(fe,{threshold:0});return _.current&&ce.observe(_.current),()=>ce.disconnect()},[_,U,fe]);const ve=A.useCallback(ce=>{const se=ce.target,pe=_.current,Oe=M.current;!pe||!se||!Oe||!pe.contains(se)&&!Oe.contains(se)&&ee()},[_,ee]),be=A.useMemo(()=>b.isDisabled||b.isLoading||e.length<1,[b.isDisabled,b.isLoading,e]);A.useEffect(()=>{if(U)return setTimeout(()=>document.addEventListener("mousedown",ve),0),()=>document.removeEventListener("mousedown",ve)},[U,ve]);const le=A.useCallback((ce,se)=>{ce.stopPropagation(),ce.preventDefault();let pe=[...w];pe.includes(se)?pe=pe.filter(Oe=>Oe!==se):pe.push(se),x==null||x(pe)},[w,x]),ke=A.useCallback(()=>{if(!E||!_.current)return;const ce=Zc.calculateOptimalSelectWidth({elementRef:_,options:e,selectedOptions:w,placeholder:i,optionRenderer:se=>f({option:se}),type:n,isMulti:!0});O(ce)},[E,_,e,w,i,f,n]);return A.useEffect(()=>E?((e!==j.current||L===void 0)&&(H.current!==null&&cancelAnimationFrame(H.current),H.current=requestAnimationFrame(()=>{ke(),H.current=null,j.current=[...e]})),()=>{H.current!==null&&(cancelAnimationFrame(H.current),H.current=null)}):void 0,[E,e,ke,L]),A.useEffect(()=>()=>{typeof Zc.clearCache=="function"&&Zc.clearCache()},[]),v.jsxs(v.Fragment,{children:[v.jsxs($r,{...b,isDisabled:b.isDisabled||e.length<1,className:je.clsx(b.className,yo.AMultiSelect,"NoSelect",U&&yo.IsOpen,be&&yo.UnAvailable,yo[n]),style:{padding:n==="Secondary"?"8px 8px 8px 0":0,width:L?`${L}px`:E?"100px":void 0,...b.style},abaseRef:_,onClick:X,children:[v.jsx("div",{className:yo.ValuesContainer,children:v.jsx("div",{className:je.clsx(yo.Values,w.length<1&&yo.Placeholder),children:v.jsx(u,{OptionRenderer:f,selectedOptions:w,placeholder:i})})}),v.jsx("div",{...I,className:je.clsx(yo.Arrow,I==null?void 0:I.className),children:v.jsx(jr,{style:{transform:U?"rotate(180deg)":"",transition:"var(--Transition)"},icon:"TriangleDown"})})]}),e.length>0&&(U||de)&&Hs.createPortal(v.jsx("div",{className:je.clsx(yo.Options,yo[n]),onTransitionEnd:ue,style:{opacity:+U,visibility:U?"visible":"hidden",pointerEvents:U?void 0:"none",width:L?`${L}px`:E?"100px":void 0,borderRadius:_.current?window.getComputedStyle(_.current).borderRadius:void 0},ref:M,children:e.map((ce,se)=>{var Oe;const pe=w.includes(ce);return v.jsxs("div",{className:je.clsx(yo.Option,pe&&yo.Selected,"NoSelect",yo[n]),style:{height:(Oe=_.current)==null?void 0:Oe.getBoundingClientRect().height},onClick:Xe=>le(Xe,ce),children:[v.jsx(Zu,{className:yo.CheckBox,useCheck:[+pe,void 0]}),v.jsx(f,{option:ce})]},se)})}),document.body)]})};function Jh(r,e,t,n,i){if(!e.current||!r.current||!t||t.length<1)return;const l=e.current.getBoundingClientRect(),u=B8(l,t.length,n,i),f=window.getComputedStyle(e.current);r.current.style.top=`calc(${u.top??0}px - ${f.borderTopWidth})`,r.current.style.bottom=u.bottom?u.bottom+"px":"",r.current.style.left=u.left+"px",r.current.style.width||(r.current.style.minWidth=u.minWidth+"px"),r.current.style.minHeight=u.minHeight+"px",r.current.style.maxHeight=u.maxHeight+"px",r.current.style.visibility="visible"}function B8(r,e,t,n){const i={top:r.bottom,bottom:void 0,left:r.left,height:"fit-content",minWidth:r.width,minHeight:r.height*Math.min(t,e),maxHeight:r.height*n>window.innerHeight-r.bottom-10?window.innerHeight-r.bottom-10:r.height*n};return window.innerHeight-r.bottom-10<i.height&&(window.innerHeight-r.bottom-10<i.minHeight?(i.top=r.top-e*r.height,i.top<0&&(i.top=10,i.minHeight=r.top-10,i.height=r.top-10)):i.height=window.innerHeight-r.bottom-10),i}const H8=r=>{const{OptionRenderer:e,selectedOptions:t,placeholder:n}=r;return t.length<1?n:t.length===1?v.jsx(e,{option:t[0]}):`${t.length} selected`},q8=r=>{const{option:e}=r;return er.isReactNode(e)?e:null},z8="_Container_10ion_1",$8="_Steps_10ion_9",U8="_Step_10ion_9",W8="_OutCircle_10ion_26",V8="_IsOver_10ion_37",G8="_InCircle_10ion_41",Z8="_Line_10ion_54",K8="_Left_10ion_66",Y8="_Right_10ion_69",X8="_ContentContainer_10ion_73",J8="_Content_10ion_73",eo={Container:z8,Steps:$8,Step:U8,OutCircle:W8,IsOver:V8,InCircle:G8,Line:Z8,Left:K8,Right:Y8,ContentContainer:X8,Content:J8},Q8=r=>{const{useSelect:e,steps:t,StepRenderer:n=a0,ContentRenderer:i=a0}=r;if(t.length===0)throw new Error("steps should have at least one element");const l=A.useRef(null),[u,f]=nn(e,t[0]),g=A.useCallback(I=>f==null?void 0:f(I),[f]),m=A.useMemo(()=>t.indexOf(u),[u,t]);return A.useEffect(()=>{m<0&&g(t[0])},[m,t,g]),v.jsxs("div",{className:eo.Container,children:[v.jsx("div",{className:eo.Steps,children:t.map((I,E)=>{const b=t.indexOf(I),S=m>=E,_=m>E;return v.jsxs("div",{className:eo.Step,children:[E!==0&&v.jsx("div",{className:je.clsx(eo.Line,eo.Left,S&&eo.IsOver)}),E!==t.length-1&&v.jsx("div",{className:je.clsx(eo.Line,eo.Right,_&&eo.IsOver)}),v.jsx(Fi,{type:"Raw",className:je.clsx(eo.OutCircle,S&&eo.IsOver),onClick:()=>g(I),children:v.jsx("div",{className:je.clsx(eo.InCircle,S&&eo.IsOver)})}),v.jsx(n,{step:I,stepIdx:b})]},E)})}),v.jsx("div",{className:eo.ContentContainer,ref:l,children:t.map((I,E)=>{const b=t.indexOf(I);return v.jsx("div",{className:eo.Content,style:E===0?{marginLeft:`${m*-100}%`}:{},children:v.jsx(i,{step:I,stepIdx:b})},E)})})]})},a0=r=>{const{step:e}=r;return typeof e=="object"?er.stringify(e):e},ek="_ATab_1ikea_1",tk="_Option_1ikea_9",rk="_Underline_1ikea_22",nk="_IsSelected_1ikea_22",ik="_IndicatorTrack_1ikea_33",ok="_Indicator_1ikea_33",sk="_Primary_1ikea_49",ak="_Secondary_1ikea_56",lk="_IsDisabled_1ikea_66",ck="_Tertiary_1ikea_80",uk="_Quaternary_1ikea_110",Zl={ATab:ek,Option:tk,Underline:rk,IsSelected:nk,IndicatorTrack:ik,Indicator:ok,Primary:sk,Secondary:ak,IsDisabled:lk,Tertiary:ck,Quaternary:uk},fk=["Primary","Secondary","Tertiary","Quaternary"],z2=r=>{const{options:e,useSelect:t,selectDisabled:n,type:i="Primary",tabProps:l,optionProps:u,optionWidth:f,OptionRenderer:g=dk,RightAddon:m,color:I,underline:E}=r;if(e.length===0)throw new Error("options should have at least one element");const b=A.useMemo(()=>e.findIndex(le=>!(n!=null&&n(le))),[e,n]),S=i==="Tertiary"?2:0,_=i==="Secondary"?8:0,M=A.useMemo(()=>S+_,[S,_]),w=i==="Tertiary"?2:0,x=A.useMemo(()=>(_-S-w-w)/e.length,[e.length,S,_,w]),[L,O]=nn(t,e[b]),j=A.useRef([]),H=A.useCallback(le=>O==null?void 0:O(le),[O]),U=A.useMemo(()=>typeof f=="number"?f+"px":f,[f]),Z=A.useMemo(()=>e.indexOf(L),[e,L]),de=A.useMemo(()=>`calc(${100/e.length}% + ${x}px)`,[e.length,x]),J=A.useMemo(()=>U||`calc(${de} - ${M}px)`,[de,M,U]),[ue,B]=A.useState(0),[ee,X]=A.useState(0),[re,fe]=A.useState(J),ve=A.useMemo(()=>{let le;switch(U){case void 0:le=`calc(${de} * ${Z})`;break;case"fit-content":le=`calc(${ue}px)`;break;default:le=`calc((${U} + ${M}px) * ${Z})`;break}return`calc(${le} + ${w}px)`},[U,w,de,Z,ue,M]),be=A.useMemo(()=>{switch(U){case void 0:return;case"fit-content":return`calc(${ee}px)`;default:return`calc((${U} + ${M}px - ${x}px) * ${e.length})`}},[U,x,M,e,ee]);return A.useEffect(()=>{var ke,ce;if(e.includes(L)||O==null||O(e[b]),U!=="fit-content"){fe(J);return}let le=0;j.current.forEach((se,pe)=>{pe<Z&&se.current&&(le+=se.current.offsetWidth+M)}),B(le),fe(`calc(${((ce=(ke=j.current[Z])==null?void 0:ke.current)==null?void 0:ce.offsetWidth)||0}px)`),X(j.current.reduce((se,pe)=>{var Oe;return se+((((Oe=pe.current)==null?void 0:Oe.offsetWidth)||0)+M-x)},0))},[U,j,e,L,O,b,x,M,Z,J]),v.jsxs("div",{...l,className:je.clsx(Zl.ATab,"Headline2",Zl[i],l==null?void 0:l.className),children:[v.jsx("div",{className:Zl.Indicator,style:{minWidth:re,left:ve,marginLeft:S}}),v.jsx("div",{className:Zl.IndicatorTrack,style:{width:be}}),v.jsx(mn,{w}),e.map((le,ke)=>{const ce=n==null?void 0:n(le);return j.current[ke]||(j.current[ke]=A.createRef()),v.jsx($r,{abaseRef:j.current[ke],...u,style:{minWidth:J,maxWidth:J,marginLeft:S,marginRight:_,"--color":I,...u==null?void 0:u.style},className:je.clsx(Zl.Option,ce&&Zl.IsDiabled,le===L&&Zl.IsSelected,"IsClickable",E&&Zl.Underline,u==null?void 0:u.className),onClick:se=>{!ce&&H(le),u&&u.onClick&&u.onClick(se)},isDisabled:ce,children:v.jsx(g,{option:le})},ke)}),v.jsx(mn,{w:w+S}),m&&v.jsxs(v.Fragment,{children:[v.jsx(Qc,{}),m]})]})},dk=r=>{const{option:e}=r;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 $2(...r){const e=A.useRef(!1);A.useEffect(()=>{e.current||(e.current=!0,r.forEach(t=>t()))},[r])}const U2={String:(r,e,t,n)=>{const{value:i}=n;if(i===void 0)return!1;if(t==="")return er.keys(e).some(I=>{const E=e[I],b=Lr.getContent(E.asText,{defKey:I,def:E,item:r});if(b!==void 0)return b.toString().toLowerCase().includes(i.toLowerCase());const S=Lr.getContent(E.content,{defKey:I,def:E,item:r});return["string","number"].includes(typeof S)&&S!==void 0&&S!==null?S.toString().toLowerCase().includes(i.toLowerCase()):!1});const l=er.keys(e),u=t;if(!l.includes(u))return!1;const f=e[u],g=Lr.getContent(f.asText,{defKey:u,def:f,item:r});if(g!==void 0)return g.toString().toLowerCase().includes(i.toLowerCase());const m=Lr.getContent(f.content,{defKey:u,def:f,item:r});return["string","number"].includes(typeof m)&&m!==void 0&&m!==null?m.toString().toLowerCase().includes(i.toLowerCase()):!1},Select:(r,e,t,n)=>{const{value:i}=n;if(i==null)return!1;const l=er.keys(e),u=t;if(!l.includes(u))return!1;const f=e[u],g=Lr.getContent(f.asText,{defKey:u,def:f,item:r});if(g!==void 0)return i.toString().toLowerCase()===g.toString().toLowerCase();const m=Lr.getContent(f.content,{defKey:u,def:f,item:r});return["string","number"].includes(typeof m)&&m!==void 0&&m!==null?i.toString().toLowerCase()===m.toString().toLowerCase():!1},Date:(r,e,t,n)=>{const{value:i}=n;if(i===void 0)return!1;const l=er.keys(e),u=t;if(!l.includes(u))return!1;const f=e[u],g=Lr.getContent(f.asText,{defKey:u,def:f,item:r});if(g!==void 0){const I=Yt.toDate(g.toString());return I&&Yt.eq(I,i)}const m=Lr.getContent(f.content,{defKey:u,def:f,item:r});if(["string","number"].includes(typeof m)&&m!==void 0&&m!==null){const I=Yt.toDate(m.toString());return I&&Yt.eq(I,i)}return!1},DateRange:(r,e,t,n)=>{const{value:i}=n;if(i===void 0)return!1;const l=er.keys(e),u=t;if(!l.includes(u))return!1;const f=e[u],g=Lr.getContent(f.asText,{defKey:u,def:f,item:r});if(g!==void 0){const I=Yt.toDate(g.toString());return I&&Yt.be(i.sDate,I,i.eDate)}const m=Lr.getContent(f.content,{defKey:u,def:f,item:r});if(["string","number"].includes(typeof m)&&m!==void 0&&m!==null){const I=Yt.toDate(m.toString());return I&&Yt.be(i.sDate,I,i.eDate)}return!1}},hk=(r,e,t)=>{let n=r;return er.keys(t).forEach(l=>{const u=t[l];u.value===void 0||u.value===null||u.value===""||(n=n.filter(f=>{var g;return(g=u.predicate??U2[u.type])==null?void 0:g(f,e,l,u)}))}),n},pk=(r,e,t)=>{if(!t)return r;const n=t.defKey,i=e[n];if(n===void 0)return r;const l=t.sortF??((u,f)=>{const g=Lr.getContent(i.content,{defKey:n,def:i,item:u}),m=Lr.getContent(i.content,{defKey:n,def:i,item:f});return typeof g=="string"&&typeof m=="string"?g<m?-1:g>m?1:0:typeof g=="number"&&typeof m=="number"?g-m:typeof g=="string"&&typeof m=="number"?-1:typeof g=="number"&&typeof m=="string"||g===void 0&&m!==void 0?1:g!==void 0&&m===void 0?-1:0});return typeof l=="function"&&l.length>=3?r.slice().sort((u,f)=>l(u,f,t.isAsc)):r.slice().sort((u,f)=>{const g=l(u,f);return t.isAsc?g:-g})},gk=(r,e,t)=>r.slice((e-1)*t,e*t),W2=(r,e)=>{const t=Math.max(Math.ceil(r/e),1);return Array.from({length:t},(n,i)=>i+1)},mk=(r,e,t,n)=>{const i=W2(e,t),l=Math.floor((r-1)/n),u=l*n+1,f=(l+1)*n,g=i.slice(u-1,f);return{pages:i,rangedPages:g}},vk=(r,e,t)=>{const n=[],i=Object.keys(t),l=[];i.forEach(b=>{const S=t[b],_=Lr.getContent(S.hContent,{defKey:b,def:S});if(_!==void 0){if(typeof _=="string"){l.push(_);return}else if(typeof _=="number"){l.push(_.toString());return}}const M=Lr.getContent(S.name,{defKey:b,def:S});if(M!==void 0&&typeof M=="string"){l.push(M);return}l.push(b)});const u=l.map(b=>`"${b.replaceAll('"','""')}"`);n.push(u.join(",")),e.forEach(b=>{const S=[];i.forEach(M=>{const w=t[M],x=Lr.getContent(w.content,{defKey:M,def:w,item:b});if(x!==void 0){if(typeof x=="string"){S.push(x);return}else if(typeof x=="number"){S.push(x.toString());return}}const L=b[M];typeof L=="string"?S.push(L):typeof L=="number"?S.push(L.toString()):S.push("")});const _=S.map(M=>`"${M.replaceAll('"','""')}"`);n.push(_.join(","))});const f=`${r}.csv`,g="\uFEFF"+n.join(`
161
161
  `),m=new Blob([g],{type:"text/csv;charset=UTF-8"}),I=URL.createObjectURL(m),E=document.createElement("a");E.href=I,E.download=f,E.click(),URL.revokeObjectURL(I)},yk=r=>{const e=er.keys(r);if(e.length!==1)return;const t=e[0];if(t!=="")return;const n=r[t];if(n.type==="String")return n.value},bk=r=>{const e=Object.entries(r);let t={};return e.forEach(([n,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??n]=i.value)}),t},_k=r=>{const e=er.keys(r).filter(i=>i!=="");if(e.length!==1)return;const t=e[0],n=r[t];return!n||n.value===void 0||n.value===null||n.value===""?{selectedKey:t,value:void 0}:{selectedKey:t,value:n.value}},tl={applyFilteration:hk,applySortation:pk,applyPagination:gk,getPages:W2,getRangedPages:mk,downloadCsv:vk,getSingleFilterValue:yk,getMultiFilterValues:bk,getSelectFilterValue:_k},xk="_ATable_12zow_1",Sk={ATable:xk};function V2(r,e,t,n){A.useEffect(()=>{if(r)return r.addEventListener(e,t,n),()=>{r.removeEventListener(e,t,n)}},[r,e,t,n])}const Ck="_BodyHeader_ys4y0_1",wk="_TRow_ys4y0_7",Ak="_OverflowSpace_ys4y0_11",Tk="_BodyBody_ys4y0_16",Ek="_IsSelected_ys4y0_35",kk="_IsSelectable_ys4y0_39",Rk="_IsRowMarked_ys4y0_47",Ik="_TH_ys4y0_52",Lk="_TD_ys4y0_57",Mk="_IsMarked_ys4y0_57",Dk="_Resizer_ys4y0_76",Ok="_IsMoving_ys4y0_88",Pk="_IsResizable_ys4y0_91",Nk="_ResizerCenter_ys4y0_94",Fk="_ResizerOut_ys4y0_100",jk="_ResizerIn_ys4y0_104",Bk="_IsClicked_ys4y0_139",Hk="_NoItems_ys4y0_146",qk="_Content_ys4y0_152",_n={BodyHeader:Ck,TRow:wk,OverflowSpace:Ak,BodyBody:Tk,IsSelected:Ek,IsSelectable:kk,IsRowMarked:Rk,TH:Ik,TD:Lk,IsMarked:Mk,Resizer:Dk,IsMoving:Ok,IsResizable:Pk,ResizerCenter:Nk,ResizerOut:Fk,ResizerIn:jk,IsClicked:Bk,NoItems:Hk,Content:qk},Yl=25,Qh=50,zk=r=>{const{defs:e,isEqual:t,rProps:n,useSelect:i,isTableDisabled:l,isSelectMulti:u,selectDisabled:f,appliedFilteration:g,useSortation:m,pagination:I,pagedItems:E,noMarking:b,noDefHeader:S,isLoading:_,showRows:M,RowRenderer:w=Wk,isRowRendered:x,rowHeight:L,resources:O}=r,[j,H]=A.useMemo(()=>i??[],[i]),U=A.useCallback(Ae=>{l||!H||!j||f!=null&&f(Ae)||(u?j.some(De=>t(De,Ae))?H(j.filter(De=>!t(De,Ae))):H([...j,Ae]):H([Ae]))},[j,f,H,t,l,u]);A.useEffect(()=>{u||!j||!H||j.length>1&&H([j[j.length-1]])},[j,H,u]),A.useEffect(()=>{if(!j||!H)return;j.filter(De=>f==null?void 0:f(De)).length>0&&H(j.filter(De=>!(f!=null&&f(De))))},[j,H,f]);const[Z,de]=m,J=A.useCallback((Ae,De)=>{de&&((Z==null?void 0:Z.defKey)===Ae?Z.isAsc===!0?de({defKey:Ae,isAsc:!1,sortF:De}):Z.isAsc===!1?de(void 0):de({defKey:Ae,isAsc:!0,sortF:De}):de({defKey:Ae,isAsc:!0,sortF:De}))},[Z,de]),[ue,B]=A.useState({elem:null,row:null}),ee=A.useRef(null),X=A.useRef(null),re=A.useCallback(()=>B({elem:ee.current,row:X.current}),[]);A.useEffect(()=>re(),[E.length,re]),V2(window,"resize",re);const[fe,ve]=A.useState(L);A.useEffect(()=>{const{row:Ae}=ue;Ae!=null&&ve(Ae.clientHeight)},[ue,fe]);const be=A.useMemo(()=>{const{elem:Ae}=ue;return Ae?Math.floor(Ae.clientHeight/fe):0},[ue,fe]),le=A.useMemo(()=>M||(E.length<=be?be:E.length),[be,M,E]),ke=A.useMemo(()=>{if(M!==void 0)return M*fe},[M,fe]),ce=A.useMemo(()=>ke,[ke]),se=A.useMemo(()=>{const{elem:Ae}=ue;return Ae?Ae.getBoundingClientRect().height/fe<E.length:!1},[ue,fe,E.length]),[pe,Oe]=A.useState(),Xe=A.useMemo(()=>{const{elem:Ae}=ue;return!pe||!Ae?"100%":Ae.clientHeight+(x?0:50)},[pe,x,ue]),ge=A.useRef(null),[Le,We]=A.useState({}),Je=A.useRef({x:0,y:0}),Ke=A.useRef({}),Ne=A.useMemo(()=>er.keys(Le),[Le]),Te=A.useCallback((Ae,De)=>{const ot=ge.current;if(!ot)return;const st=[];ot.childNodes.forEach(wt=>{wt.classList.contains(_n.TH)&&st.push(wt)});const yt={};er.keys(e).forEach((wt,kt)=>{const Fe=st[kt];if(!Fe)return;const Qe=Fe.getBoundingClientRect().width;yt[wt]=Qe}),Ke.current=yt,Oe(De),Je.current={x:Ae.clientX,y:Ae.clientY};const Mt=wt=>{if(!ge.current)return;const Fe=wt.clientX-Je.current.x,Qe=Uk(e,De,Ke.current,Fe);We(Qe)};document.addEventListener("mousemove",Mt);const Lt=()=>{Oe(void 0),document.removeEventListener("mousemove",Mt),document.removeEventListener("mouseup",Lt)};document.addEventListener("mouseup",Lt)},[e]),_e=A.useCallback(()=>{Oe(void 0),We({})},[]),Ue=A.useMemo(()=>{if(Ne.length===0){const ot={},st=er.keys(e);for(let yt=0;yt<st.length;yt++){const Mt=st[yt],Lt=e[Mt],wt=Lr.getContent(Lt.colSpan,{defKey:Mt,def:Lt}),kt=Lt.width??80,Fe=Lt.minWidth??Yl,Qe=Lt.maxWidth,gt={width:kt,minWidth:Fe,maxWidth:Qe,flexGrow:wt??1};if(ot[Mt]=gt,wt!==void 0){for(let Ft=1;Ft<Math.min(wt,st.length-yt);Ft++){const bt=e[st[yt+Ft]],qe=bt.width??80,Rt=bt.minWidth??Yl,Dt=bt.maxWidth;gt.width+=qe,gt.minWidth+=Rt,gt.maxWidth!==void 0&&(Dt!==void 0?gt.maxWidth+=Dt:gt.maxWidth=void 0)}yt+=wt-1}}return ot}const Ae={},De=er.keys(e);for(let ot=0;ot<De.length;ot++){let st=De[ot];const yt=e[st];let Mt=Le[st];const Lt=Lr.getContent(yt.colSpan,{defKey:st,def:yt}),wt=yt.minWidth??Yl,kt=yt.maxWidth,Fe={width:Mt,minWidth:wt,maxWidth:kt,flexGrow:Lt??1};if(Ae[st]=Fe,Lt!==void 0){for(let Qe=1;Qe<Math.min(Lt,De.length-ot);Qe++){const gt=e[De[ot+Qe]],Ft=Le[De[ot+Qe]],bt=gt.minWidth??Yl,qe=gt.maxWidth;Fe.width+=Ft,Fe.minWidth+=bt,Fe.maxWidth!==void 0&&(qe!==void 0?Fe.maxWidth+=qe:Fe.maxWidth=void 0)}ot+=Lt-1}}return Ae},[e,Ne,Le]),ht=A.useRef(null),St=A.useMemo(()=>tl.getSingleFilterValue(g),[g]);return A.useEffect(()=>{ee.current&&ee.current.scrollTo({top:0})},[I.page]),A.useEffect(()=>{x&&X.current&&X.current.scrollIntoView({behavior:"smooth",block:"center"})},[j,E,x]),v.jsxs(v.Fragment,{children:[v.jsx(ym,{isLoading:_}),v.jsx("div",{className:je.clsx(_n.BodyHeader,pe!==void 0&&_n.IsClicked),onResizeCapture:re,ref:ht,style:{display:S||x?"none":"flex"},children:v.jsx("div",{className:_n.TRow,ref:ge,style:{minHeight:Qh,maxHeight:Qh},children:er.map(e,([Ae],De)=>{const ot=e[Ae],st=Lr.getContent(ot.hContent,{defKey:Ae,def:ot}),yt=ot.name,Mt=De===er.keys(e).length-1,Lt=ot.width??80,wt=ot.minWidth??Yl,kt=ot.maxWidth,Fe={width:Lt,minWidth:wt,maxWidth:kt,justifyContent:Lr.getContent(ot.hAlign,{defKey:Ae,def:ot})??"flex-start",...Lr.getContent(ot.hStyle,{defKey:Ae,def:ot})};Ne.includes(Ae)&&(Fe.width=Le[Ae]);const Qe=ot.isSortable,gt=(Z==null?void 0:Z.defKey)===Ae,Ft=Z==null?void 0:Z.isAsc;return v.jsxs(A.Fragment,{children:[v.jsxs("div",{style:Fe,onClick:()=>Qe&&J(Ae,ot.sortF),className:je.clsx(_n.TH,"Label1",Qe?"IsClickable":"NoSelect"),children:[v.jsx(Sa,{className:_n.Content,children:st??yt}),Qe&&v.jsx(jr,{icon:gt?Ft?"SortUp":"SortDown":"SortBoth",style:{width:16,height:16}})]}),!Mt&&v.jsxs("div",{className:je.sclsx(_n,"Resizer","IsResizable","NoSelect",pe!==void 0&&"IsMoving"),onMouseDown:bt=>Te(bt,Ae),onDoubleClick:_e,children:[v.jsx("div",{className:_n.ResizerOut}),v.jsx("div",{className:_n.ResizerIn}),v.jsx("div",{className:_n.ResizerCenter,style:{height:Xe}}),v.jsx("div",{className:_n.ResizerIn}),v.jsx("div",{className:_n.ResizerOut})]}),Mt&&v.jsx(mn,{className:_n.OverflowSpace,w:"var(--Scrollbar-width)",h:Qh,style:{color:Fe.color,backgroundColor:Fe.backgroundColor,transition:Fe.transition}})]},Ae)})})}),v.jsxs("div",{className:je.clsx(_n.BodyBody,pe!==void 0&&_n.IsClicked),ref:ee,style:{overflowY:se?"scroll":"hidden",minHeight:ke,maxHeight:ce},children:[E.map((Ae,De)=>{const ot=Lr.getContent(n,{item:Ae}),st=H&&!l,yt=j==null?void 0:j.some(kt=>t(kt,Ae)),Mt=j&&(f==null?void 0:f(Ae)),Lt=typeof Mt=="string"?Mt:void 0,wt={...Ae};return x&&er.keys(e).forEach(kt=>{const Fe=e[kt],Qe=Lr.getContent(Fe.content,{defKey:kt,def:Fe,item:Ae});let gt=!1;if(St&&!b){const Ft=Lr.getContent(Fe.asText,{defKey:kt,def:Fe,item:Ae});Ft!==void 0?gt=Ft.toString().toLowerCase().includes(St.toLowerCase()):["string","number"].includes(typeof Qe)&&Qe!==void 0&&Qe!==null&&(gt=Qe.toString().toLowerCase().includes(St.toLowerCase()))}wt[kt]=v.jsx("span",{className:je.clsx(gt&&_n.IsRowMarked),children:wt[kt]})}),v.jsx($r,{isDisabled:Mt,tooltip:Lt,...ot,onClick:kt=>{var Fe;U(Ae),(Fe=ot==null?void 0:ot.onClick)==null||Fe.call(ot,kt)},className:je.clsx(ot==null?void 0:ot.className,st&&_n.IsSelectable,yt&&_n.IsSelected),abaseRef:yt?X:void 0,children:v.jsx(w,{defs:e,item:Ae,markedItem:wt,noMarking:b,spanWidths:Ue,singleFilterValue:St,isBodyBodyOverflowed:se,rowHeight:L})},De)}),v.jsx($k,{showRows:le,itemsLength:E.length,isRowRendered:x,rowHeight:fe,resources:O})]})]})},$k=r=>{const{showRows:e,itemsLength:t,resources:n,isRowRendered:i,rowHeight:l}=r,u=A.useMemo(()=>t===0?e:e-t,[e,t]);return Array.from({length:u},(f,g)=>v.jsx("div",{className:je.clsx(_n.TRow,"NoSelect"),style:{minHeight:l,maxHeight:l,...i&&{border:"none"}},children:t===0&&g===Math.floor(e/2)&&v.jsx(Sn,{className:_n.NoItems,children:n["No Items"]})},g))};function Uk(r,e,t,n){const i={...t},l=er.keys(r).findIndex(m=>m===e)+1,u=Object.entries(r);let f=l-1,g=l;if(n<0){for(;n<0&&!(f<0||g>=u.length);){const[m,I]=[u[f][0],u[f][1]],[E,b]=[u[g][0],u[g][1]],S=I.minWidth??Yl,_=b.maxWidth,M=i[m],w=i[E];let x=M-S;_!==void 0&&(x=Math.min(x,_-w));let L=-n;L=Math.min(L,x),M-L<=S&&f--,_!==void 0&&w+L>=_&&g++,i[m]=M-L,i[E]=w+L,n+=L}return i}else if(n>0){for(;n>0&&!(f<0||g>=u.length);){const[m,I]=[u[f][0],u[f][1]],[E,b]=[u[g][0],u[g][1]],S=b.minWidth??Yl,_=I.maxWidth,M=i[E],w=i[m];let x=M-S;_!==void 0&&(x=Math.min(x,_-w));let L=n;L=Math.min(L,x),M-L<=S&&g++,_!==void 0&&w+L>=_&&f--,i[E]=M-L,i[m]=w+L,n-=L}return i}return i}const Wk=r=>{const{defs:e,item:t,noMarking:n,spanWidths:i,singleFilterValue:l,isBodyBodyOverflowed:u,rowHeight:f}=r;return v.jsx("div",{className:je.clsx(_n.TRow),style:{minHeight:f,maxHeight:f},children:er.map(e,([g],m)=>{const I=i[g];if(I===void 0)return null;const E=m===er.keys(e).length-1,b=e[g],S=Lr.getContent(b.content,{defKey:g,def:b,item:t}),_={width:I.width,minWidth:I.minWidth,maxWidth:I.maxWidth,flexGrow:I.flexGrow,justifyContent:Lr.getContent(b.align,{defKey:g,def:b,item:t})??"flex-start",...Lr.getContent(b.style,{defKey:g,def:b,item:t})};let M=!1;if(l&&!n){const w=Lr.getContent(b.asText,{defKey:g,def:b,item:t});w!==void 0?M=w.toString().toLowerCase().includes(l.toLowerCase()):["string","number"].includes(typeof S)&&S!==void 0&&S!==null&&(M=S.toString().toLowerCase().includes(l.toLowerCase()))}return v.jsxs(A.Fragment,{children:[v.jsx("div",{style:_,className:je.clsx(_n.TD,"Label1",M&&_n.IsMarked),children:v.jsx(Sa,{className:_n.Content,children:S})}),!u&&E&&v.jsx(mn,{className:_n.OverflowSpace,w:"var(--Scrollbar-width)",h:f,style:{color:_.color,backgroundColor:_.backgroundColor}})]},g)})})},Vk="_ATableFooter_w090q_1",Gk="_Button_w090q_10",Zk="_IsSelected_w090q_26",Kk="_IsDisabled_w090q_31",Ds={ATableFooter:Vk,Button:Gk,IsSelected:Zk,IsDisabled:Kk},Yk=r=>{const{pages:e,rangedPages:t,pageF:n,pagination:i}=r,l=A.useMemo(()=>e[e.length-1],[e]);return v.jsxs(Sn,{className:Ds.ATableFooter,children:[v.jsx(jr,{icon:"FirstPage",className:je.clsx(Ds.Button,i.page===1&&Ds.IsDisabled),onClick:n.moveFirst}),v.jsx(jr,{icon:"NavigateBefore",className:je.clsx(Ds.Button,i.page===1&&Ds.IsDisabled),onClick:n.movePrev}),t.map(u=>v.jsx("div",{className:je.clsx(Ds.Button,"NoSelect",i.page===u&&Ds.IsSelected),onClick:()=>n.move(u),children:u},u)),v.jsx(jr,{icon:"NavigateNext",className:je.clsx(Ds.Button,i.page===l&&Ds.IsDisabled),onClick:n.moveNext}),v.jsx(jr,{icon:"LastPage",className:je.clsx(Ds.Button,i.page===l&&Ds.IsDisabled),onClick:n.moveLast})]})},Xk="_Filter_1b9j0_1",Jk="_SelectFilter_1b9j0_11",Qk="_MainFilter_1b9j0_15",eR="_IsOpen_1b9j0_26",tR="_SubFilters_1b9j0_30",rR="_Input_1b9j0_44",nR="_Main_1b9j0_15",iR="_Sub_1b9j0_30",oR="_Actions_1b9j0_62",sR="_Icon_1b9j0_67",aR="_LeftIcon_1b9j0_74",lR="_CircleAlertOutline_1b9j0_79",cR="_Rotate_1b9j0_87",uR="_rotate_1b9j0_1",kr={Filter:Xk,SelectFilter:Jk,MainFilter:Qk,IsOpen:eR,SubFilters:tR,Input:rR,Main:nR,Sub:iR,Actions:oR,Icon:sR,LeftIcon:aR,CircleAlertOutline:lR,Rotate:cR,rotate:uR},fR=r=>{const{defs:e,useFilteration:t,hasToggleFilteration:n,filterF:i,isRowRendered:l,isFilterSort:u,filterType:f,resources:g,placeholder:m}=r,[I,E]=A.useState([]),[b,S]=A.useMemo(()=>t,[t]),_=A.useMemo(()=>f==="Select",[f]),M=A.useMemo(()=>er.keys(b).map(ge=>String(ge)),[b]),[w,x]=A.useState(_&&M.length>0?M[0]:null),L=A.useCallback((ge,Le,We)=>{if(!S)return;const Je={...b};ge.value=Le,S(Je),E(Ke=>Ke.map((Ne,Te)=>Te===(We?We+1:0)?"":Ne))},[b,S]),O=A.useMemo(()=>{let ge=[],Le=er.keys(b);_&&w&&(Le=Le.filter(We=>We===w));for(const We of Le)ge.push({key:We,def:e[We],filter:b[We]});return ge},[b,e,_,w]),j=A.useMemo(()=>O.length>0?O[0]:null,[O]),H=A.useMemo(()=>I.length>0?I[0]:"",[I]),U=A.useMemo(()=>O.length>1?O.slice(1):[],[O]),Z=A.useMemo(()=>I.length>1?I.slice(1):[],[I]),de=A.useMemo(()=>U.length>0,[U]),[J,ue]=A.useState(!1),[B,ee]=A.useState(!1),X=A.useRef(null),re=A.useCallback(()=>ue(!1),[]),fe=A.useRef(null),ve=A.useCallback(()=>{ee(!1),ue(!0),fe.current&&(document.removeEventListener("mousedown",fe.current),fe.current=null)},[]),be=A.useCallback(()=>{const ge=Le=>{const We=document.getElementById("root"),Je=Le.target,Ke=X.current;!We||!Ke||!Je||!Ke.contains(Je)&&We.contains(Je)&&ve()};return fe.current=ge,ge},[ve]),le=A.useCallback(()=>{ue(!0),ee(!0),setTimeout(()=>{const ge=be();document.addEventListener("mousedown",ge)},0)},[be]),ke=A.useMemo(()=>B?ve:le,[B,le,ve]),ce=A.useCallback(()=>{const ge=O.map((Le,We)=>Le.filter.type==="String"&&Le.filter.validation?Le.filter.validation(Le.filter.value||""):Le.filter.type==="Date"&&Le.filter.validation||Le.filter.type==="DateRange"&&Le.filter.validation?Le.filter.validation(Le.filter.value):I[We]);return E(ge),ge.every(Le=>!Le)},[I,O]),se=A.useCallback(ge=>{ge.key==="Enter"?(ce()&&i.apply(),ge.stopPropagation()):ge.key==="Escape"&&(ee(!1),ge.currentTarget.focus(),ge.currentTarget.blur(),ge.stopPropagation())},[ce,ee,i]),pe=A.useMemo(()=>({open:le,close:ve,toggle:ke,validate:ce}),[le,ve,ke,ce]),Oe=A.useCallback(()=>{i.clear()},[i]),Xe=A.useCallback(ge=>{if(!S||!ge)return;x(ge);const Le={...b};er.keys(Le).forEach(We=>{if(We!==ge&&Le[We])switch(Le[We].type){case"String":Le[We].value="";break;case"Select":Le[We].value=null;break;case"Date":Le[We].value=void 0;break;case"DateRange":Le[We].value=void 0;break}}),E([]),S(Le),i.clear(),setTimeout(()=>{var Je;const We=(Je=X.current)==null?void 0:Je.querySelector("input");We&&We.focus()},0)},[b,S,E,i]);return j?v.jsxs(v.Fragment,{children:[_&&v.jsx(rc,{className:je.clsx(kr.SelectFilter),options:M,isAutoWidth:!0,useSelect:[w,Xe],type:"Secondary",OptionRenderer:({option:ge})=>{const Le=e[ge];let We;if(Le!=null&&Le.hContent){const Je={defKey:ge,def:Le};We=typeof Le.hContent=="function"?Le.hContent(Je):Le.hContent}else{const Je=b[ge],Ke=(Le==null?void 0:Le.name)||(Je==null?void 0:Je.placeholder)||String(ge);We=v.jsx("span",{children:Ke})}return We}}),v.jsxs("div",{className:je.clsx(kr.Filter),ref:X,onKeyDown:se,onClick:ge=>{ge.preventDefault(),ge.stopPropagation()},style:{minWidth:l?u?180:void 0:180,maxWidth:l?u?300:void 0:300},tabIndex:-1,children:[v.jsx(dR,{filterSet:j,hasToggleFilteration:n,onChange:L,filterF:i,hasSubFilters:de,popupF:pe,isOpen:B,resources:g,errorMessage:H,hasSelectFilterType:_,placeholder:m}),!_&&v.jsx(hR,{subFilterSets:U,onChange:L,onClearClick:Oe,isOpen:B,isTransitioning:J,onTransitionEnd:re,resources:g,errorMessages:Z,placeholder:m,filterF:i,validate:ce})]})]}):null},dR=r=>{var b,S,_,M;const{filterSet:e,hasToggleFilteration:t,hasSelectFilterType:n,onChange:i,filterF:l,hasSubFilters:u,popupF:f,isOpen:g,resources:m,errorMessage:I,placeholder:E}=r;if(e.filter.type==="String"){const w=[e.filter.value??"",j=>i(e.filter,j)],x=E??e.filter.placeholder??((b=e.def)==null?void 0:b.name),L=e.filter.icon,O=e.filter.iconTooltip??x;return v.jsxs("div",{className:je.clsx(kr.MainFilter,g&&kr.IsOpen),children:[v.jsx(ya,{icon:L??"Type",tooltip:O,isOpen:g}),v.jsx(tc,{className:je.clsx(kr.Input,kr.Main),useValue:w,placeholder:x??m["Search(Placeholder)"],wrapProps:{style:{width:"100%",boxSizing:"border-box"}},LeftAddon:t&&v.jsx(Rd,{isOpen:g,filterF:l,popupF:f,resources:m}),RightAddon:v.jsx(Id,{hasSubFilters:u,popupF:f,isOpen:g,resources:m,errorMessage:I,hasSelectFilterType:n,filterF:l}),autoFocus:e.filter.autoFocus,maxLength:e.filter.maxLength,type:I?"Error":"Primary"})]})}else if(e.filter.type==="Select"){const w=[e.filter.value??null,j=>{i(e.filter,j),n&&setTimeout(()=>{f.validate()&&l.apply()},0)}],x=E??e.filter.placeholder??((S=e.def)==null?void 0:S.name),L=e.filter.icon,O=e.filter.iconTooltip??x;return v.jsxs("div",{className:je.clsx(kr.MainFilter,g&&kr.IsOpen),children:[v.jsx(ya,{icon:L??"Menu",tooltip:O,isOpen:g}),v.jsx(rc,{className:je.clsx(kr.Input,kr.Main),options:e.filter.options,useSelect:w,placeholder:x,OptionRenderer:e.filter.OptionRenderer,SelectedRenderer:({OptionRenderer:j,selectedOption:H})=>H===null?x||e.filter.placeholder:v.jsxs(v.Fragment,{children:[t&&v.jsx(Rd,{isOpen:g,filterF:l,popupF:f,resources:m}),v.jsx(j,{option:H}),v.jsx(Id,{hasSubFilters:u,popupF:f,isOpen:g,resources:m,hideSearchButton:!0,hasSelectFilterType:n,filterF:l})]})})]})}else if(e.filter.type==="Date"){const w=[e.filter.value,j=>i(e.filter,j)],x=E??e.filter.placeholder??((_=e.def)==null?void 0:_.name),L=e.filter.icon,O=e.filter.iconTooltip??x;return v.jsxs("div",{className:je.clsx(kr.MainFilter,g&&kr.IsOpen),children:[v.jsx(ya,{icon:L??"CalendarDay",tooltip:O,isOpen:g}),v.jsx(vm,{type:"Raw",className:je.clsx(kr.DatePicker,kr.Input,kr.Main),useDate:w,minDate:e.filter.minDate,maxDate:e.filter.maxDate,placeholder:x,LeftAddon:v.jsxs(v.Fragment,{children:[t&&v.jsx(Rd,{isOpen:g,filterF:l,popupF:f,resources:m}),!t&&v.jsx(mn,{w:g?0:6}),v.jsx(ya,{icon:L??"CalendarDay",tooltip:O,isOpen:!g}),v.jsx(mn,{w:g?8:0})]}),RightAddon:v.jsx(Id,{hasSubFilters:u,popupF:f,isOpen:g,resources:m,hasSelectFilterType:n,filterF:l})})]})}else if(e.filter.type==="DateRange"){const w=[e.filter.value,H=>i(e.filter,H)],{noDefaultChoices:x}=e.filter,L=E??e.filter.placeholder??((M=e.def)==null?void 0:M.name),O=e.filter.icon,j=e.filter.iconTooltip??L;return v.jsxs("div",{className:je.clsx(kr.MainFilter,g&&kr.IsOpen),children:[v.jsx(ya,{icon:O??"CalendarDay",tooltip:j,isOpen:g}),v.jsx(gm,{type:"Raw",className:je.clsx(kr.DatePicker,kr.Input,kr.Main),useDateRange:w,minDate:e.filter.minDate,maxDate:e.filter.maxDate,placeholder:L,noDefaultChoices:x,LeftAddon:v.jsxs(v.Fragment,{children:[t&&v.jsx(Rd,{isOpen:g,filterF:l,popupF:f,resources:m}),!t&&v.jsx(mn,{w:g?0:6}),v.jsx(ya,{icon:O??"CalendarDay",tooltip:j,isOpen:!g}),v.jsx(mn,{w:g?8:0})]}),RightAddon:v.jsx(Id,{hasSubFilters:u,popupF:f,isOpen:g,resources:m,hasSelectFilterType:n,filterF:l})})]})}return null},Rd=r=>{const{filterF:e,popupF:t,resources:n,isOpen:i}=r;return v.jsx(_i,{type:"Raw",className:kr.Icon,icon:"Convert",tooltip:n["Toggle Filter"],onMouseDown:l=>l.currentTarget.classList.remove(kr.Rotate),style:{width:i?0:24,marginLeft:i?0:8},onClick:l=>{l.currentTarget.classList.add(kr.Rotate),e.toggle(),t.close(),l.stopPropagation()}})},Id=r=>{const{hasSubFilters:e,popupF:t,isOpen:n,resources:i,errorMessage:l,hideSearchButton:u,hasSelectFilterType:f,filterF:g}=r,m=A.useCallback(b=>{b.stopPropagation(),t.open()},[t]),I=A.useCallback(b=>{b.stopPropagation(),t.close()},[t]),E=A.useCallback(b=>{b.stopPropagation(),t.validate()&&g.apply()},[t,g]);return v.jsxs(A.Fragment,{children:[l&&v.jsx(_i,{type:"Raw",className:kr.CircleAlertOutline,iconSize:"xs",icon:"CircleAlertOutline",tooltip:l}),e&&!f&&v.jsx(_i,{type:"Raw",className:kr.Icon,icon:"ListAdd",onClick:m,style:{opacity:+!n,visibility:+!n?"visible":"hidden",marginRight:-24,pointerEvents:n?"none":void 0}}),e&&!f&&v.jsx(_i,{type:"Raw",className:kr.Icon,icon:"ListRemove",onClick:I,style:{opacity:+n,visibility:+n?"visible":"hidden",marginRight:n?-24:0,pointerEvents:n?void 0:"none"}}),!u&&v.jsx(_i,{type:"Raw",className:kr.Icon,icon:"Search",tooltip:i["Search(Button)"],onClick:E,style:{opacity:+!n,visibility:+!n?"visible":"hidden",pointerEvents:n?"none":void 0,marginRight:4}})]})},hR=r=>{const{subFilterSets:e,onChange:t,onClearClick:n,isOpen:i,isTransitioning:l,onTransitionEnd:u,resources:f,errorMessages:g,placeholder:m,filterF:I,validate:E}=r;return!i&&!l?null:v.jsxs("div",{className:kr.SubFilters,onTransitionEnd:u,style:{opacity:+i,visibility:+i?"visible":"hidden"},children:[e.map((b,S)=>{var _,M,w,x;if(b.filter.type==="String"){const L=[b.filter.value??"",Z=>t(b.filter,Z,S)],O=g[S],j=m??b.filter.placeholder??((_=b.def)==null?void 0:_.name),H=b.filter.icon,U=b.filter.iconTooltip??j;return v.jsxs(Sn,{style:{marginBottom:6},children:[v.jsx(ya,{tooltip:U,icon:H??"Type"}),v.jsx(tc,{className:je.clsx(kr.Input,kr.Sub),wrapProps:{style:{width:"100%"}},useValue:L,placeholder:j??f["Search(Placeholder)"],type:O?"Error":"Secondary",RightAddon:O&&v.jsx(_i,{type:"Raw",className:kr.CircleAlertOutline,iconSize:"xs",icon:"CircleAlertOutline",tooltip:O}),autoFocus:b.filter.autoFocus,maxLength:b.filter.maxLength}),v.jsx(mn,{h:8})]},S)}else if(b.filter.type==="Select"){const L=[b.filter.value??null,U=>t(b.filter,U)],O=m??b.filter.placeholder??((M=b.def)==null?void 0:M.name),j=b.filter.icon,H=b.filter.iconTooltip??O;return v.jsxs(Sn,{style:{marginBottom:6},children:[v.jsx(ya,{tooltip:H,icon:j??"Menu"}),v.jsx(rc,{className:je.clsx(kr.Input,kr.Sub),options:b.filter.options,placeholder:O,OptionRenderer:b.filter.OptionRenderer,useSelect:L,arrowProps:{style:{marginRight:4}},type:"Secondary"}),v.jsx(mn,{h:8})]},S)}else if(b.filter.type==="Date"){const L=[b.filter.value,U=>t(b.filter,U)],O=m??b.filter.placeholder??((w=b.def)==null?void 0:w.name),j=b.filter.icon,H=b.filter.iconTooltip??O;return v.jsxs(Sn,{style:{marginBottom:6},children:[v.jsx(ya,{tooltip:H,icon:j??"CalendarDay"}),v.jsx(vm,{type:"Raw",LeftAddon:v.jsx(mn,{w:12}),placeholder:O,className:je.clsx(kr.DatePicker,kr.Input,kr.Sub),useDate:L,minDate:b.filter.minDate,maxDate:b.filter.maxDate}),v.jsx(mn,{h:8})]},S)}else if(b.filter.type==="DateRange"){const L=[b.filter.value,Z=>t(b.filter,Z)],{noDefaultChoices:O}=b.filter,j=m??b.filter.placeholder??((x=b.def)==null?void 0:x.name),H=b.filter.icon,U=b.filter.iconTooltip??j;return v.jsxs(Sn,{style:{marginBottom:6},children:[v.jsx(ya,{tooltip:U,icon:H??"CalendarDay"}),v.jsx(gm,{type:"Raw",LeftAddon:v.jsx(mn,{w:12}),className:je.clsx(kr.DatePicker,kr.Input,kr.Sub),useDateRange:L,placeholder:j,minDate:b.filter.minDate,maxDate:b.filter.maxDate,noDefaultChoices:O})]},S)}else return null}),v.jsxs(Sn,{className:kr.Actions,children:[v.jsx(Fi,{type:"Secondary",onClick:n,children:f["Clear(Button)"]}),v.jsx(Fi,{onClick:()=>{E()&&I.apply()},children:f["Search(Button)"]})]})]})},ya=r=>{const{icon:e,tooltip:t,isOpen:n=!0}=r;return v.jsx(_i,{type:"Raw",className:kr.LeftIcon,tooltip:t,icon:e,style:{width:n?24:0,marginRight:n?4:0,opacity:+n}})},pR="_ATableHeader_1hzfz_1",gR="_LeftHeaderContent_1hzfz_11",mR="_RightHeaderContent_1hzfz_19",vR="_TopRightAddon_1hzfz_27",yR="_HItem_1hzfz_32",Vc={ATableHeader:pR,LeftHeaderContent:gR,RightHeaderContent:mR,TopRightAddon:vR,HItem:yR},bR=r=>{const{defs:e,title:t,totalCount:n,useCheck:i,useFilteration:l,hasToggleFilteration:u,filterF:f,noFilter:g,noCount:m,isFiltered:I,TopLeftAddon:E,TopRightAddon:b,useSortation:S,resources:_=hn.ATable,filterType:M,placeholder:w}=r,[x]=A.useMemo(()=>i||[],[i]),L=A.useMemo(()=>I?_["Searched n items"](n):_["Total n items"](n),[_,I,n]),[O]=l,[j,H]=S,[U,Z]=A.useState(!1),de=A.useMemo(()=>{const be=er.values(O).filter(ce=>ce.type==="DateRange"),le=er.keys(O).filter(ce=>be.includes(O[ce])),ke=er.keys(e).filter(ce=>e[ce].isSortable);return le.length>0?(le.length>1&&Z(!0),ke.map(se=>le.includes(se)?[se+"_Asc",se+"_Desc"]:se).flat()):ke},[e,O]),J=A.useMemo(()=>r.isRowRendered&&de.length>0,[de.length,r.isRowRendered]),ue=A.useCallback((be,le)=>{H&&(j==null?void 0:j.defKey)===be&&(j.isAsc===!0?H({defKey:be,isAsc:!1,sortF:le}):H({defKey:be,isAsc:!0,sortF:le}))},[j,H]),B=A.useRef(),[ee,X]=A.useState(),[re,fe]=A.useState(j?j.defKey:de[0]),ve=A.useMemo(()=>{if(!ee)return{};const be=e[ee];return{SortUp:{onClick:()=>{H==null||H({defKey:ee,isAsc:!0,sortF:be.sortF}),fe(ee)},content:()=>_["Sort up"]},SortDown:{onClick:()=>{H==null||H({defKey:ee,isAsc:!1,sortF:be.sortF}),fe(ee)},content:()=>_["Sort down"]}}},[H,ee,e,_]);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:je.clsx(Vc.ATableHeader),children:[v.jsxs("div",{className:je.clsx(Vc.LeftHeaderContent,"NoSelect"),children:[v.jsxs(Sn,{style:{marginBottom:J?8:0},children:[E&&v.jsx("div",{className:je.clsx(Vc.HItem),children:E}),t&&v.jsx("div",{className:je.clsx(Vc.HItem),style:{whiteSpace:"nowrap"},children:t}),!m&&v.jsxs("div",{className:je.clsx(Vc.HItem),style:{maxHeight:14,...J&&{minHeight:14,color:"var(--label-neutral)"}},children:[L,x&&x.length>0&&v.jsxs(v.Fragment,{children:[" / ",_["Checked n items"](x.length)]})]})]}),J&&v.jsx(z2,{type:"Tertiary",options:de,useSelect:[re,()=>{}],optionWidth:"fit-content",tabProps:{style:{marginRight:8}},optionProps:{style:{cursor:"default"},onClick:be=>{var ce;const le=be.currentTarget.textContent;if(le===_[le])return;be.currentTarget.querySelector("svg")===null&&((ce=B.current)==null||ce.open(be.currentTarget))}},OptionRenderer:be=>{const le=/_Asc|_Desc/.test(be.option),ke=(j==null?void 0:j.defKey)===be.option,ce=re===be.option,se=j==null?void 0:j.isAsc,pe=()=>{if(le){X(void 0),fe(be.option);const[ge,Le]=be.option.split("_"),We=Le==="Asc";H==null||H({defKey:ge,isAsc:We,sortF:e[ge].sortF})}else ce?ue(be.option,e[be.option].sortF):X(be.option)},Xe=le?(ge=>{const[Le,We]=ge.split("_");return(U?Le+" ":"")+_[We]})(be.option):_["Sort by x"](be.option);return v.jsxs(Sn,{style:{height:"100%"},className:je.clsx(!(le&&ce)&&"IsClickable"),onClick:pe,children:[Xe,ce&&!le&&v.jsx(jr,{style:{marginRight:-5,marginLeft:4},icon:ke?se?"RowSortUp":"RowSortDown":"RowSortBoth"})]},be.option)}})]}),v.jsx(Qc,{}),v.jsxs("div",{className:je.clsx(Vc.RightHeaderContent,"NoSelect"),children:[!g&&v.jsx(fR,{defs:e,useFilteration:l,hasToggleFilteration:u,filterF:f,isRowRendered:r.isRowRendered,isFilterSort:de.length>0,resources:_,filterType:M,placeholder:w}),b&&v.jsx(Sn,{className:je.clsx(Vc.TopRightAddon),children:b})]})]}),v.jsx(B2,{defs:ve,actionRef:B,onClose:()=>X(void 0),width:100,position:ef.S})]})},_R=r=>{const{defs:e,pk:t,defaultDef:n,rProps:i,useSelect:l,isSelectMulti:u,selectDisabled:f,useCheck:g,checkDisabled:m,isLoading:I,isDisabled:E,title:b,entireItems:S,onStateChange:_,pagedItems:M,totalCount:w,useFilteration:x,useToggleFilteration:L,filterType:O="Default",placeholder:j,rowHeight:H=40,usePagination:U,useSortation:Z,showRows:de,noHeader:J,noDefHeader:ue,noFooter:B,noFilter:ee,noCount:X,noMarking:re,noStateChangeOnMount:fe,TopLeftAddon:ve,TopRightAddon:be,actionRef:le,RowRenderer:ke,resources:ce}=r,se=A.useMemo(()=>({...hn.ATable,...ce}),[ce]),pe=A.useCallback((Re,Ve)=>t!==void 0?Array.isArray(t)?t.every(xt=>nl.isEqual(Re[xt],Ve[xt])):nl.isEqual(Re[t],Ve[t]):nl.isEqual(Re,Ve),[t]),Oe=A.useMemo(()=>({content:xR,...n}),[n]),Xe=A.useMemo(()=>{const Re={};return er.keys(e).forEach(Ve=>{const xt=e[Ve],jt={...Oe,...xt};Re[Ve]=jt}),Re},[Oe,e]),[ge,Le]=nn(nl.cloneDeep(x),{"":{type:"String",placeholder:se["Search(Placeholder)"],value:""}}),[We,Je]=nn(nl.cloneDeep(L),void 0),[Ke,Ne]=A.useState(!1),[Te,_e]=A.useMemo(()=>Ke&&We?[We,Je]:[ge,Le],[ge,Ke,Le,Je,We]),[Ue,ht]=A.useState(Te),St=A.useMemo(()=>S?tl.applyFilteration(S,Xe,Ue):[],[S,Xe,Ue]),Ae=A.useMemo(()=>{for(const Re in Ue){const Ve=Ue[Re];if(Ve.value!==void 0&&Ve.value!==null&&Ve.value!=="")return!0}return!1},[Ue]),[De,ot]=nn(Z,void 0),st=A.useMemo(()=>tl.applySortation(St,Xe,De),[St,Xe,De]),yt=A.useMemo(()=>{if(M!==void 0)return tl.applySortation(M,Xe,De)},[M,Xe,De]),[Mt,Lt]=nn(U,{page:1,pageSize:50,pageRange:10}),wt=A.useMemo(()=>({pageSize:50,page:1,pageRange:10,...Mt}),[Mt]),{pagedItems:kt,totalCount:Fe,pagination:Qe}=A.useMemo(()=>{const Re={...wt};if(yt!==void 0){let Ve=w??yt.length;const xt=tl.getPages(Ve,Re.pageSize);return Re.page>xt.length?Re.page=xt.length:Re.page<1&&(Re.page=1),{pagedItems:yt,totalCount:Ve,pagination:Re}}else if(S!==void 0){const Ve=w??st.length,xt=tl.getPages(Ve,Re.pageSize);return Re.page>xt.length?Re.page=xt.length:Re.page<1&&(Re.page=1),{pagedItems:tl.applyPagination(st,Re.page,Re.pageSize),totalCount:Ve,pagination:Re}}else return{pagedItems:[],totalCount:w??0,pagination:wt}},[S,yt,w,wt,st]),{pages:gt,rangedPages:Ft}=A.useMemo(()=>tl.getRangedPages(Qe.page,Fe,Qe.pageSize,Qe.pageRange),[Fe,Qe.pageSize,Qe.page,Qe.pageRange]),[bt,qe]=A.useMemo(()=>g??[],[g]),Rt=A.useMemo(()=>kt.filter(Re=>bt==null?void 0:bt.some(Ve=>pe(Ve,Re))),[kt,bt,pe]),Dt=A.useMemo(()=>kt.filter(Re=>!(m!=null&&m(Re))),[kt,m]),pr=A.useMemo(()=>Dt.length>0&&Dt.every(Re=>Rt.some(Ve=>pe(Ve,Re))),[Rt,Dt,pe]),xr=A.useMemo(()=>pr?!1:Dt.some(Re=>Rt.some(Ve=>pe(Ve,Re))),[Rt,Dt,pr,pe]),wr=A.useCallback(()=>{!bt||!qe||E||qe(pr||xr?bt.filter(Re=>!Dt.some(Ve=>pe(Ve,Re))):[...bt,...Dt])},[bt,qe,pr,xr,Dt,E,pe]),me=A.useCallback(Re=>{!bt||!qe||E||(bt.some(Ve=>pe(Ve,Re))?qe(bt.filter(Ve=>!pe(Ve,Re))):qe([...bt,Re]))},[bt,qe,E,pe]);A.useEffect(()=>{if(!qe||!bt||!m)return;bt.filter(Ve=>m(Ve)).length>0&&qe(bt.filter(Ve=>!m(Ve)))},[m,bt,qe]);const ne=A.useMemo(()=>({hContent:bt&&v.jsx(Zu,{useCheck:[pr,wr],isIndeterminate:xr}),content:Re=>{const{item:Ve}=Re,xt=m==null?void 0:m(Ve),jt=typeof xt=="string"?xt:void 0,Ct=bt==null?void 0:bt.some(qt=>pe(qt,Ve));return v.jsx(Zu,{style:{zIndex:1},isDisabled:xt,tooltip:jt,onClick:qt=>qt.stopPropagation(),useCheck:[Ct,()=>me(Ve)]})},minWidth:32,maxWidth:32}),[bt,pr,xr,pe,wr,m,me]),et=A.useMemo(()=>g?{checkDef:ne,...Xe}:Xe,[Xe,ne,g]),[ct,tt]=A.useState(!1),Me=A.useMemo(()=>I??ct,[I,ct]),pt=A.useCallback(async Re=>{_&&(tt(!0),await _(Re),tt(!1)),Lt==null||Lt(Re.pagination),ot==null||ot(Re.sortation),ht(Re.filteration)},[_,Lt,ot]);A.useEffect(()=>{if(!le)return;const Re=xt=>{const jt={entireItems:S,filteration:Te,pagination:Qe,sortation:De},Ct=xt?xt(jt):jt;pt(Ct)},Ve=xt=>{const jt={...Qe,page:1},Ct=xt?xt(Te):Te;pt({entireItems:S,filteration:Ct,pagination:jt,sortation:De}),_e==null||_e(Ct)};le.current={fireOnStateChange:Re,applyFilteration:Ve}},[le,pt,S,_e,Te,Qe,De]);const Tt=A.useCallback(Re=>{Re.page===Qe.page&&Re.pageSize===Qe.pageSize||(Re.page<1?Re.page=1:Re.page>gt[gt.length-1]&&(Re.page=gt[gt.length-1]),pt({entireItems:S,filteration:Ue,pagination:Re,sortation:De}))},[Qe,gt,pt,S,Ue,De]),_t=A.useCallback(Re=>{_e&&_e(Re)},[_e]),Bt=A.useCallback(Re=>{pt({entireItems:S,filteration:Ue,pagination:Qe,sortation:Re})},[pt,S,Ue,Qe]),Wt=A.useCallback(Re=>{Tt({...Qe,page:Re})},[Tt,Qe]),rr=A.useCallback(()=>{Wt(Qe.page-1)},[Wt,Qe.page]),Ht=A.useCallback(()=>{Wt(Qe.page+1)},[Wt,Qe.page]),$t=A.useCallback(()=>{Wt(1)},[Wt]),nr=A.useCallback(()=>{Wt(gt[gt.length-1])},[Wt,gt]),rt=A.useMemo(()=>({move:Wt,movePrev:rr,moveNext:Ht,moveFirst:$t,moveLast:nr}),[Wt,rr,Ht,$t,nr]),At=A.useCallback(()=>{const Re={...Qe,page:1};pt({entireItems:S,filteration:Te,pagination:Re,sortation:De})},[Te,Qe,pt,S,De]),vt=A.useCallback(()=>{Ne(!Ke)},[Ke]),It=A.useCallback(()=>{Ke&&We?Je==null||Je(l0(We)):_e==null||_e(l0(ge))},[Ke,We,Je,ge,_e]),vr=A.useMemo(()=>({apply:At,toggle:vt,clear:It}),[At,vt,It]);$2(()=>{fe||pt({entireItems:S,filteration:Te,pagination:Qe,sortation:De})});const Y=A.useMemo(()=>er.map(Xe,([Ve])=>Xe[Ve].minWidth??Yl).reduce((Ve,xt)=>Ve+xt,0),[Xe]),ze=A.useMemo(()=>ke!==void 0,[ke]);return v.jsxs($r,{className:Sk.ATable,isDisabled:E,style:{minWidth:Y},children:[!J&&v.jsx(bR,{defs:Xe,title:b,totalCount:Fe,useCheck:g&&bt?[bt,qe]:void 0,useFilteration:[Te,_t],useSortation:[De,Bt],isRowRendered:ze,hasToggleFilteration:We!==void 0,filterF:vr,noFilter:ee,noCount:X,isFiltered:Ae,TopLeftAddon:ve,TopRightAddon:be,resources:se,filterType:O,placeholder:j}),v.jsx(zk,{defs:et,isEqual:pe,rProps:i,useSelect:l,isSelectMulti:u,selectDisabled:f,isTableDisabled:E,appliedFilteration:Ue,useSortation:[De,Bt],pagination:Qe,pagedItems:kt,showRows:de,isLoading:Me,noMarking:re,noDefHeader:ue,resources:se,RowRenderer:ke,isRowRendered:ze,rowHeight:H}),!B&&v.jsx(Yk,{pages:gt,rangedPages:Ft,pageF:rt,pagination:Qe})]})},xR=r=>{const{defKey:e,item:t}=r;if(er.hasKey(t,e)){const n=t[e];return er.isReactNode(n)?n:null}else return null};function l0(r){const e={...r};for(const t in e)e[t].value=void 0;return e}const SR="_AText_1asz6_1",CR={AText:SR},G2=r=>{const{text:e,styled:t,style:n}=r,i=A.useMemo(()=>{if(e)if(t)if(n){if(t===!0)return n==="bold"?v.jsx("b",{children:e}):v.jsx("span",{style:n,children:e});if(typeof t=="string"){const l=e.split(t);return n==="bold"?l.map((u,f)=>v.jsxs(A.Fragment,{children:[Ld(u),f<l.length-1?v.jsx("b",{children:Ld(t)}):""]},f)):l.map((u,f)=>v.jsxs(A.Fragment,{children:[Ld(u),f<l.length-1&&v.jsx("span",{style:n,children:Ld(t)})]},f))}}else return e;else return e;else return""},[e,n,t]);return v.jsx("div",{className:je.clsx("Body1Reading",CR.AText,"NoSelect"),children:i})};function Ld(r){const e=r.split(`
162
162
  `);return e.map((t,n)=>v.jsxs(A.Fragment,{children:[t,n!==e.length-1&&v.jsx("br",{})]},n))}const wR="_Base_sw5fu_7",AR="_ATextArea_sw5fu_11",TR="_Primary_sw5fu_34",ER="_UnAvailable_sw5fu_39",kR="_Secondary_sw5fu_47",RR="_ReadOnly_sw5fu_59",Md={Base:wR,ATextArea:AR,Primary:TR,UnAvailable:ER,Secondary:kR,ReadOnly:RR,Error:"_Error_sw5fu_66"},IR=["Primary","Secondary","ReadOnly","Error"],LR=r=>{const{onEnterPress:e,errorMessage:t,type:n="Primary",textAreaRef:i,useValue:l,rows:u,isReadonly:f,placeholder:g,maxLength:m,tabIndex:I,autoFocus:E,textAreaProps:b,wrapProps:S,helperText:_,label:M,wrapType:w,labelProps:x,...L}=r,O=A.useMemo(()=>MR(t)?"Error":n,[t,n]),j=A.useMemo(()=>O==="ReadOnly"?!0:f,[O,f]),H=A.useMemo(()=>L.isDisabled||L.isLoading,[L.isDisabled,L.isLoading]),[U,Z]=nn(l,""),de=A.useCallback(B=>{Z&&Z(B)},[Z]),J=A.useCallback(B=>{var ee;H||(de(B.target.value),(ee=b==null?void 0:b.onChange)==null||ee.call(b,B))},[H,de,b]),ue=A.useCallback(B=>{var ee;if(!H){if((ee=b==null?void 0:b.onKeyDown)==null||ee.call(b,B),B.key==="Tab"){const X=B.currentTarget.selectionStart,re=B.currentTarget.selectionEnd;B.currentTarget.value=B.currentTarget.value.substring(0,X)+" "+B.currentTarget.value.substring(re),B.currentTarget.selectionStart=B.currentTarget.selectionEnd=X+1,B.preventDefault()}else B.key==="Enter"&&(e==null||e(B.currentTarget.value),B.stopPropagation());B.key!=="Escape"&&B.stopPropagation()}},[H,e,b]);return v.jsx(ec,{wrapProps:S,label:M,helperText:_,errorMessage:t,labelProps:x,wrapType:w??O==="Error"?"Error":"Default",children:v.jsx($r,{...L,className:je.clsx(Md.Base,L.className),children:v.jsx("textarea",{...b,className:je.clsx(Md.ATextArea,Md[O],H&&Md.UnAvailable,b==null?void 0:b.className),value:U,rows:u,readOnly:j,onChange:J,onKeyDown:ue,placeholder:g,maxLength:m,tabIndex:L.isDisabled||L.isLoading?-1:I,autoFocus:E,ref:i})})})};function MR(r){return Array.isArray(r)?r.filter(Boolean).length>0:!!r}var Z2=typeof global=="object"&&global&&global.Object===Object&&global,DR=typeof self=="object"&&self&&self.Object===Object&&self,Aa=Z2||DR||Function("return this")(),nc=Aa.Symbol,K2=Object.prototype,OR=K2.hasOwnProperty,PR=K2.toString,Mf=nc?nc.toStringTag:void 0;function NR(r){var e=OR.call(r,Mf),t=r[Mf];try{r[Mf]=void 0;var n=!0}catch{}var i=PR.call(r);return n&&(e?r[Mf]=t:delete r[Mf]),i}var FR=Object.prototype,jR=FR.toString;function BR(r){return jR.call(r)}var HR="[object Null]",qR="[object Undefined]",c0=nc?nc.toStringTag:void 0;function tf(r){return r==null?r===void 0?qR:HR:c0&&c0 in Object(r)?NR(r):BR(r)}function il(r){return r!=null&&typeof r=="object"}var Yc=Array.isArray;function ic(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function Y2(r){return r}var zR="[object AsyncFunction]",$R="[object Function]",UR="[object GeneratorFunction]",WR="[object Proxy]";function bm(r){if(!ic(r))return!1;var e=tf(r);return e==$R||e==UR||e==zR||e==WR}var ep=Aa["__core-js_shared__"],u0=function(){var r=/[^.]+$/.exec(ep&&ep.keys&&ep.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function VR(r){return!!u0&&u0 in r}var GR=Function.prototype,ZR=GR.toString;function eu(r){if(r!=null){try{return ZR.call(r)}catch{}try{return r+""}catch{}}return""}var KR=/[\\^$.*+?()[\]{}|]/g,YR=/^\[object .+?Constructor\]$/,XR=Function.prototype,JR=Object.prototype,QR=XR.toString,e9=JR.hasOwnProperty,t9=RegExp("^"+QR.call(e9).replace(KR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function r9(r){if(!ic(r)||VR(r))return!1;var e=bm(r)?t9:YR;return e.test(eu(r))}function n9(r,e){return r==null?void 0:r[e]}function tu(r,e){var t=n9(r,e);return r9(t)?t:void 0}var H1=tu(Aa,"WeakMap"),f0=Object.create,i9=function(){function r(){}return function(e){if(!ic(e))return{};if(f0)return f0(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function o9(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function X2(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var s9=800,a9=16,l9=Date.now;function c9(r){var e=0,t=0;return function(){var n=l9(),i=a9-(n-t);if(t=n,i>0){if(++e>=s9)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function u9(r){return function(){return r}}var Qd=function(){try{var r=tu(Object,"defineProperty");return r({},"",{}),r}catch{}}(),f9=Qd?function(r,e){return Qd(r,"toString",{configurable:!0,enumerable:!1,value:u9(e),writable:!0})}:Y2,d9=c9(f9);function h9(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var p9=9007199254740991,g9=/^(?:0|[1-9]\d*)$/;function J2(r,e){var t=typeof r;return e=e??p9,!!e&&(t=="number"||t!="symbol"&&g9.test(r))&&r>-1&&r%1==0&&r<e}function _m(r,e,t){e=="__proto__"&&Qd?Qd(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}function nd(r,e){return r===e||r!==r&&e!==e}var m9=Object.prototype,v9=m9.hasOwnProperty;function Q2(r,e,t){var n=r[e];(!(v9.call(r,e)&&nd(n,t))||t===void 0&&!(e in r))&&_m(r,e,t)}function id(r,e,t,n){var i=!t;t||(t={});for(var l=-1,u=e.length;++l<u;){var f=e[l],g=void 0;g===void 0&&(g=r[f]),i?_m(t,f,g):Q2(t,f,g)}return t}var d0=Math.max;function y9(r,e,t){return e=d0(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,l=d0(n.length-e,0),u=Array(l);++i<l;)u[i]=n[e+i];i=-1;for(var f=Array(e+1);++i<e;)f[i]=n[i];return f[e]=t(u),o9(r,this,f)}}function b9(r,e){return d9(y9(r,e,Y2),r+"")}var _9=9007199254740991;function ex(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=_9}function ch(r){return r!=null&&ex(r.length)&&!bm(r)}function x9(r,e,t){if(!ic(t))return!1;var n=typeof e;return(n=="number"?ch(t)&&J2(e,t.length):n=="string"&&e in t)?nd(t[e],r):!1}function S9(r){return b9(function(e,t){var n=-1,i=t.length,l=i>1?t[i-1]:void 0,u=i>2?t[2]:void 0;for(l=r.length>3&&typeof l=="function"?(i--,l):void 0,u&&x9(t[0],t[1],u)&&(l=i<3?void 0:l,i=1),e=Object(e);++n<i;){var f=t[n];f&&r(e,f,n,l)}return e})}var C9=Object.prototype;function xm(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||C9;return r===t}function w9(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var A9="[object Arguments]";function h0(r){return il(r)&&tf(r)==A9}var tx=Object.prototype,T9=tx.hasOwnProperty,E9=tx.propertyIsEnumerable,q1=h0(function(){return arguments}())?h0:function(r){return il(r)&&T9.call(r,"callee")&&!E9.call(r,"callee")};function k9(){return!1}var rx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,p0=rx&&typeof module=="object"&&module&&!module.nodeType&&module,R9=p0&&p0.exports===rx,g0=R9?Aa.Buffer:void 0,I9=g0?g0.isBuffer:void 0,Yf=I9||k9,L9="[object Arguments]",M9="[object Array]",D9="[object Boolean]",O9="[object Date]",P9="[object Error]",N9="[object Function]",F9="[object Map]",j9="[object Number]",B9="[object Object]",H9="[object RegExp]",q9="[object Set]",z9="[object String]",$9="[object WeakMap]",U9="[object ArrayBuffer]",W9="[object DataView]",V9="[object Float32Array]",G9="[object Float64Array]",Z9="[object Int8Array]",K9="[object Int16Array]",Y9="[object Int32Array]",X9="[object Uint8Array]",J9="[object Uint8ClampedArray]",Q9="[object Uint16Array]",e7="[object Uint32Array]",xn={};xn[V9]=xn[G9]=xn[Z9]=xn[K9]=xn[Y9]=xn[X9]=xn[J9]=xn[Q9]=xn[e7]=!0;xn[L9]=xn[M9]=xn[U9]=xn[D9]=xn[W9]=xn[O9]=xn[P9]=xn[N9]=xn[F9]=xn[j9]=xn[B9]=xn[H9]=xn[q9]=xn[z9]=xn[$9]=!1;function t7(r){return il(r)&&ex(r.length)&&!!xn[tf(r)]}function Sm(r){return function(e){return r(e)}}var nx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$f=nx&&typeof module=="object"&&module&&!module.nodeType&&module,r7=$f&&$f.exports===nx,tp=r7&&Z2.process,Ku=function(){try{var r=$f&&$f.require&&$f.require("util").types;return r||tp&&tp.binding&&tp.binding("util")}catch{}}(),m0=Ku&&Ku.isTypedArray,Cm=m0?Sm(m0):t7,n7=Object.prototype,i7=n7.hasOwnProperty;function ix(r,e){var t=Yc(r),n=!t&&q1(r),i=!t&&!n&&Yf(r),l=!t&&!n&&!i&&Cm(r),u=t||n||i||l,f=u?w9(r.length,String):[],g=f.length;for(var m in r)(e||i7.call(r,m))&&!(u&&(m=="length"||i&&(m=="offset"||m=="parent")||l&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||J2(m,g)))&&f.push(m);return f}function ox(r,e){return function(t){return r(e(t))}}var o7=ox(Object.keys,Object),s7=Object.prototype,a7=s7.hasOwnProperty;function l7(r){if(!xm(r))return o7(r);var e=[];for(var t in Object(r))a7.call(r,t)&&t!="constructor"&&e.push(t);return e}function wm(r){return ch(r)?ix(r):l7(r)}function c7(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var u7=Object.prototype,f7=u7.hasOwnProperty;function d7(r){if(!ic(r))return c7(r);var e=xm(r),t=[];for(var n in r)n=="constructor"&&(e||!f7.call(r,n))||t.push(n);return t}function od(r){return ch(r)?ix(r,!0):d7(r)}var Xf=tu(Object,"create");function h7(){this.__data__=Xf?Xf(null):{},this.size=0}function p7(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var g7="__lodash_hash_undefined__",m7=Object.prototype,v7=m7.hasOwnProperty;function y7(r){var e=this.__data__;if(Xf){var t=e[r];return t===g7?void 0:t}return v7.call(e,r)?e[r]:void 0}var b7=Object.prototype,_7=b7.hasOwnProperty;function x7(r){var e=this.__data__;return Xf?e[r]!==void 0:_7.call(e,r)}var S7="__lodash_hash_undefined__";function C7(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Xf&&e===void 0?S7:e,this}function Xc(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Xc.prototype.clear=h7;Xc.prototype.delete=p7;Xc.prototype.get=y7;Xc.prototype.has=x7;Xc.prototype.set=C7;function w7(){this.__data__=[],this.size=0}function uh(r,e){for(var t=r.length;t--;)if(nd(r[t][0],e))return t;return-1}var A7=Array.prototype,T7=A7.splice;function E7(r){var e=this.__data__,t=uh(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():T7.call(e,t,1),--this.size,!0}function k7(r){var e=this.__data__,t=uh(e,r);return t<0?void 0:e[t][1]}function R7(r){return uh(this.__data__,r)>-1}function I7(r,e){var t=this.__data__,n=uh(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}function ll(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ll.prototype.clear=w7;ll.prototype.delete=E7;ll.prototype.get=k7;ll.prototype.has=R7;ll.prototype.set=I7;var Jf=tu(Aa,"Map");function L7(){this.size=0,this.__data__={hash:new Xc,map:new(Jf||ll),string:new Xc}}function M7(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function fh(r,e){var t=r.__data__;return M7(e)?t[typeof e=="string"?"string":"hash"]:t.map}function D7(r){var e=fh(this,r).delete(r);return this.size-=e?1:0,e}function O7(r){return fh(this,r).get(r)}function P7(r){return fh(this,r).has(r)}function N7(r,e){var t=fh(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}function ru(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ru.prototype.clear=L7;ru.prototype.delete=D7;ru.prototype.get=O7;ru.prototype.has=P7;ru.prototype.set=N7;function sx(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Am=ox(Object.getPrototypeOf,Object),F7="[object Object]",j7=Function.prototype,B7=Object.prototype,ax=j7.toString,H7=B7.hasOwnProperty,q7=ax.call(Object);function z7(r){if(!il(r)||tf(r)!=F7)return!1;var e=Am(r);if(e===null)return!0;var t=H7.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ax.call(t)==q7}function $7(){this.__data__=new ll,this.size=0}function U7(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function W7(r){return this.__data__.get(r)}function V7(r){return this.__data__.has(r)}var G7=200;function Z7(r,e){var t=this.__data__;if(t instanceof ll){var n=t.__data__;if(!Jf||n.length<G7-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new ru(n)}return t.set(r,e),this.size=t.size,this}function _a(r){var e=this.__data__=new ll(r);this.size=e.size}_a.prototype.clear=$7;_a.prototype.delete=U7;_a.prototype.get=W7;_a.prototype.has=V7;_a.prototype.set=Z7;function K7(r,e){return r&&id(e,wm(e),r)}function Y7(r,e){return r&&id(e,od(e),r)}var lx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,v0=lx&&typeof module=="object"&&module&&!module.nodeType&&module,X7=v0&&v0.exports===lx,y0=X7?Aa.Buffer:void 0,b0=y0?y0.allocUnsafe:void 0;function cx(r,e){if(e)return r.slice();var t=r.length,n=b0?b0(t):new r.constructor(t);return r.copy(n),n}function J7(r,e){for(var t=-1,n=r==null?0:r.length,i=0,l=[];++t<n;){var u=r[t];e(u,t,r)&&(l[i++]=u)}return l}function ux(){return[]}var Q7=Object.prototype,eI=Q7.propertyIsEnumerable,_0=Object.getOwnPropertySymbols,Tm=_0?function(r){return r==null?[]:(r=Object(r),J7(_0(r),function(e){return eI.call(r,e)}))}:ux;function tI(r,e){return id(r,Tm(r),e)}var rI=Object.getOwnPropertySymbols,fx=rI?function(r){for(var e=[];r;)sx(e,Tm(r)),r=Am(r);return e}:ux;function nI(r,e){return id(r,fx(r),e)}function dx(r,e,t){var n=e(r);return Yc(r)?n:sx(n,t(r))}function z1(r){return dx(r,wm,Tm)}function iI(r){return dx(r,od,fx)}var $1=tu(Aa,"DataView"),U1=tu(Aa,"Promise"),W1=tu(Aa,"Set"),x0="[object Map]",oI="[object Object]",S0="[object Promise]",C0="[object Set]",w0="[object WeakMap]",A0="[object DataView]",sI=eu($1),aI=eu(Jf),lI=eu(U1),cI=eu(W1),uI=eu(H1),Fs=tf;($1&&Fs(new $1(new ArrayBuffer(1)))!=A0||Jf&&Fs(new Jf)!=x0||U1&&Fs(U1.resolve())!=S0||W1&&Fs(new W1)!=C0||H1&&Fs(new H1)!=w0)&&(Fs=function(r){var e=tf(r),t=e==oI?r.constructor:void 0,n=t?eu(t):"";if(n)switch(n){case sI:return A0;case aI:return x0;case lI:return S0;case cI:return C0;case uI:return w0}return e});var fI=Object.prototype,dI=fI.hasOwnProperty;function hI(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&dI.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var eh=Aa.Uint8Array;function Em(r){var e=new r.constructor(r.byteLength);return new eh(e).set(new eh(r)),e}function pI(r,e){var t=e?Em(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var gI=/\w*$/;function mI(r){var e=new r.constructor(r.source,gI.exec(r));return e.lastIndex=r.lastIndex,e}var T0=nc?nc.prototype:void 0,E0=T0?T0.valueOf:void 0;function vI(r){return E0?Object(E0.call(r)):{}}function hx(r,e){var t=e?Em(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var yI="[object Boolean]",bI="[object Date]",_I="[object Map]",xI="[object Number]",SI="[object RegExp]",CI="[object Set]",wI="[object String]",AI="[object Symbol]",TI="[object ArrayBuffer]",EI="[object DataView]",kI="[object Float32Array]",RI="[object Float64Array]",II="[object Int8Array]",LI="[object Int16Array]",MI="[object Int32Array]",DI="[object Uint8Array]",OI="[object Uint8ClampedArray]",PI="[object Uint16Array]",NI="[object Uint32Array]";function FI(r,e,t){var n=r.constructor;switch(e){case TI:return Em(r);case yI:case bI:return new n(+r);case EI:return pI(r,t);case kI:case RI:case II:case LI:case MI:case DI:case OI:case PI:case NI:return hx(r,t);case _I:return new n;case xI:case wI:return new n(r);case SI:return mI(r);case CI:return new n;case AI:return vI(r)}}function px(r){return typeof r.constructor=="function"&&!xm(r)?i9(Am(r)):{}}var jI="[object Map]";function BI(r){return il(r)&&Fs(r)==jI}var k0=Ku&&Ku.isMap,HI=k0?Sm(k0):BI,qI="[object Set]";function zI(r){return il(r)&&Fs(r)==qI}var R0=Ku&&Ku.isSet,$I=R0?Sm(R0):zI,UI=1,WI=2,VI=4,gx="[object Arguments]",GI="[object Array]",ZI="[object Boolean]",KI="[object Date]",YI="[object Error]",mx="[object Function]",XI="[object GeneratorFunction]",JI="[object Map]",QI="[object Number]",vx="[object Object]",eL="[object RegExp]",tL="[object Set]",rL="[object String]",nL="[object Symbol]",iL="[object WeakMap]",oL="[object ArrayBuffer]",sL="[object DataView]",aL="[object Float32Array]",lL="[object Float64Array]",cL="[object Int8Array]",uL="[object Int16Array]",fL="[object Int32Array]",dL="[object Uint8Array]",hL="[object Uint8ClampedArray]",pL="[object Uint16Array]",gL="[object Uint32Array]",gn={};gn[gx]=gn[GI]=gn[oL]=gn[sL]=gn[ZI]=gn[KI]=gn[aL]=gn[lL]=gn[cL]=gn[uL]=gn[fL]=gn[JI]=gn[QI]=gn[vx]=gn[eL]=gn[tL]=gn[rL]=gn[nL]=gn[dL]=gn[hL]=gn[pL]=gn[gL]=!0;gn[YI]=gn[mx]=gn[iL]=!1;function Ud(r,e,t,n,i,l){var u,f=e&UI,g=e&WI,m=e&VI;if(u!==void 0)return u;if(!ic(r))return r;var I=Yc(r);if(I){if(u=hI(r),!f)return X2(r,u)}else{var E=Fs(r),b=E==mx||E==XI;if(Yf(r))return cx(r,f);if(E==vx||E==gx||b&&!i){if(u=g||b?{}:px(r),!f)return g?nI(r,Y7(u,r)):tI(r,K7(u,r))}else{if(!gn[E])return i?r:{};u=FI(r,E,f)}}l||(l=new _a);var S=l.get(r);if(S)return S;l.set(r,u),$I(r)?r.forEach(function(w){u.add(Ud(w,e,t,w,r,l))}):HI(r)&&r.forEach(function(w,x){u.set(x,Ud(w,e,t,x,r,l))});var _=m?g?iI:z1:g?od:wm,M=I?void 0:_(r);return h9(M||r,function(w,x){M&&(x=w,w=r[x]),Q2(u,x,Ud(w,e,t,x,r,l))}),u}var mL=1,vL=4;function Uu(r){return Ud(r,mL|vL)}var yL="__lodash_hash_undefined__";function bL(r){return this.__data__.set(r,yL),this}function _L(r){return this.__data__.has(r)}function th(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new ru;++e<t;)this.add(r[e])}th.prototype.add=th.prototype.push=bL;th.prototype.has=_L;function xL(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function SL(r,e){return r.has(e)}var CL=1,wL=2;function yx(r,e,t,n,i,l){var u=t&CL,f=r.length,g=e.length;if(f!=g&&!(u&&g>f))return!1;var m=l.get(r),I=l.get(e);if(m&&I)return m==e&&I==r;var E=-1,b=!0,S=t&wL?new th:void 0;for(l.set(r,e),l.set(e,r);++E<f;){var _=r[E],M=e[E];if(n)var w=u?n(M,_,E,e,r,l):n(_,M,E,r,e,l);if(w!==void 0){if(w)continue;b=!1;break}if(S){if(!xL(e,function(x,L){if(!SL(S,L)&&(_===x||i(_,x,t,n,l)))return S.push(L)})){b=!1;break}}else if(!(_===M||i(_,M,t,n,l))){b=!1;break}}return l.delete(r),l.delete(e),b}function AL(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}function TL(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var EL=1,kL=2,RL="[object Boolean]",IL="[object Date]",LL="[object Error]",ML="[object Map]",DL="[object Number]",OL="[object RegExp]",PL="[object Set]",NL="[object String]",FL="[object Symbol]",jL="[object ArrayBuffer]",BL="[object DataView]",I0=nc?nc.prototype:void 0,rp=I0?I0.valueOf:void 0;function HL(r,e,t,n,i,l,u){switch(t){case BL:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case jL:return!(r.byteLength!=e.byteLength||!l(new eh(r),new eh(e)));case RL:case IL:case DL:return nd(+r,+e);case LL:return r.name==e.name&&r.message==e.message;case OL:case NL:return r==e+"";case ML:var f=AL;case PL:var g=n&EL;if(f||(f=TL),r.size!=e.size&&!g)return!1;var m=u.get(r);if(m)return m==e;n|=kL,u.set(r,e);var I=yx(f(r),f(e),n,i,l,u);return u.delete(r),I;case FL:if(rp)return rp.call(r)==rp.call(e)}return!1}var qL=1,zL=Object.prototype,$L=zL.hasOwnProperty;function UL(r,e,t,n,i,l){var u=t&qL,f=z1(r),g=f.length,m=z1(e),I=m.length;if(g!=I&&!u)return!1;for(var E=g;E--;){var b=f[E];if(!(u?b in e:$L.call(e,b)))return!1}var S=l.get(r),_=l.get(e);if(S&&_)return S==e&&_==r;var M=!0;l.set(r,e),l.set(e,r);for(var w=u;++E<g;){b=f[E];var x=r[b],L=e[b];if(n)var O=u?n(L,x,b,e,r,l):n(x,L,b,r,e,l);if(!(O===void 0?x===L||i(x,L,t,n,l):O)){M=!1;break}w||(w=b=="constructor")}if(M&&!w){var j=r.constructor,H=e.constructor;j!=H&&"constructor"in r&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof H=="function"&&H instanceof H)&&(M=!1)}return l.delete(r),l.delete(e),M}var WL=1,L0="[object Arguments]",M0="[object Array]",Dd="[object Object]",VL=Object.prototype,D0=VL.hasOwnProperty;function GL(r,e,t,n,i,l){var u=Yc(r),f=Yc(e),g=u?M0:Fs(r),m=f?M0:Fs(e);g=g==L0?Dd:g,m=m==L0?Dd:m;var I=g==Dd,E=m==Dd,b=g==m;if(b&&Yf(r)){if(!Yf(e))return!1;u=!0,I=!1}if(b&&!I)return l||(l=new _a),u||Cm(r)?yx(r,e,t,n,i,l):HL(r,e,g,t,n,i,l);if(!(t&WL)){var S=I&&D0.call(r,"__wrapped__"),_=E&&D0.call(e,"__wrapped__");if(S||_){var M=S?r.value():r,w=_?e.value():e;return l||(l=new _a),i(M,w,t,n,l)}}return b?(l||(l=new _a),UL(r,e,t,n,i,l)):!1}function bx(r,e,t,n,i){return r===e?!0:r==null||e==null||!il(r)&&!il(e)?r!==r&&e!==e:GL(r,e,t,n,bx,i)}function ZL(r){return function(e,t,n){for(var i=-1,l=Object(e),u=n(e),f=u.length;f--;){var g=u[++i];if(t(l[g],g,l)===!1)break}return e}}var KL=ZL();function V1(r,e,t){(t!==void 0&&!nd(r[e],t)||t===void 0&&!(e in r))&&_m(r,e,t)}function YL(r){return il(r)&&ch(r)}function G1(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function XL(r){return id(r,od(r))}function JL(r,e,t,n,i,l,u){var f=G1(r,t),g=G1(e,t),m=u.get(g);if(m){V1(r,t,m);return}var I=l?l(f,g,t+"",r,e,u):void 0,E=I===void 0;if(E){var b=Yc(g),S=!b&&Yf(g),_=!b&&!S&&Cm(g);I=g,b||S||_?Yc(f)?I=f:YL(f)?I=X2(f):S?(E=!1,I=cx(g,!0)):_?(E=!1,I=hx(g,!0)):I=[]:z7(g)||q1(g)?(I=f,q1(f)?I=XL(f):(!ic(f)||bm(f))&&(I=px(g))):E=!1}E&&(u.set(g,I),i(I,g,n,l,u),u.delete(g)),V1(r,t,I)}function _x(r,e,t,n,i){r!==e&&KL(e,function(l,u){if(i||(i=new _a),ic(l))JL(r,e,u,t,_x,n,i);else{var f=n?n(G1(r,u),l,u+"",r,e,i):void 0;f===void 0&&(f=l),V1(r,u,f)}},od)}function km(r,e){return bx(r,e)}var Ql=S9(function(r,e,t){_x(r,e,t)}),Qt=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(Qt||{});class Ca{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const i=Qt.TYPE&Qt.ATTRIBUTE;this.scope=n.scope!=null?n.scope&Qt.LEVEL|i:Qt.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.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 Wu extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const xx=class Z1{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 n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(e,t,n){const i=this.query(t);if(i==null)throw new Wu(`Unable to create ${t} blot`);const l=i,u=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:l.create(n),f=new l(e,u,n);return Z1.blots.set(f.domNode,f),f}find(e,t=!1){return Z1.find(e,t)}query(e,t=Qt.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&Qt.LEVEL&Qt.BLOCK?n=this.types.block:e&Qt.LEVEL&Qt.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(n=this.classes[i],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&t&Qt.LEVEL&n.scope&&t&Qt.TYPE&n.scope?n:null}register(...e){return e.map(t=>{const n="blotName"in t,i="attrName"in t;if(!n&&!i)throw new Wu("Invalid definition");if(n&&t.blotName==="abstract")throw new Wu("Cannot register abstract class");const l=n?t.blotName:i?t.attrName:void 0;return this.types[l]=t,i?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):n&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(u=>u.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(u=>{(this.tags[u]==null||t.className==null)&&(this.tags[u]=t)}))),t})}};xx.blots=new WeakMap;let Yu=xx;function O0(r,e){return(r.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class QL extends Ca{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){O0(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(O0(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const Us=QL;function np(r){const e=r.split("-"),t=e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return e[0]+t}class eM extends Ca{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[np(this.keyName)]=t,!0):!1}remove(e){e.style[np(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[np(this.keyName)];return this.canAdd(e,t)?t:""}}const oc=eM;class tM{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=Yu.find(this.domNode);if(e==null)return;const t=Ca.keys(this.domNode),n=Us.keys(this.domNode),i=oc.keys(this.domNode);t.concat(n).concat(i).forEach(l=>{const u=e.scroll.query(l,Qt.ATTRIBUTE);u instanceof Ca&&(this.attributes[u.attrName]=u)})}copy(e){Object.keys(this.attributes).forEach(t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)})}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 dh=tM,Sx=class{constructor(e,t){this.scroll=e,this.domNode=t,Yu.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new Wu("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?(typeof e=="string"?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e=="number"&&(n=e),typeof n=="number"?t=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?t=document.createElement(n):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),Yu.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,i){const l=this.isolate(e,t);if(this.scroll.query(n,Qt.BLOT)!=null&&i)l.wrap(n,i);else if(this.scroll.query(n,Qt.ATTRIBUTE)!=null){const u=this.scroll.create(this.statics.scope);l.wrap(u),u.format(n,i)}}insertAt(e,t,n){const i=n==null?this.scroll.create("text",t):this.scroll.create(t,n),l=this.split(e);this.parent.insertBefore(i,l||void 0)}isolate(e,t){const n=this.split(e);if(n==null)throw new Error("Attempt to isolate at end");return n.split(t),n}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 n=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new Wu(`Cannot wrap ${e}`);return n.appendChild(this),n}};Sx.blotName="abstract";let Cx=Sx;const wx=class extends Cx{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 n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};wx.scope=Qt.INLINE_BLOT;let rM=wx;const qi=rM;class nM{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 n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),i=0;for(;n;){if(n===e)return i;i+=1,n=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,n=this.head;for(;n!=null;){if(n===e)return t;t+=n.length(),n=n.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 n=this.iterator();let i=n();for(;i;){const l=i.length();if(e<l||t&&e===l&&(i.next==null||i.next.length()!==0))return[i,e];e-=l,i=n()}return[null,0]}forEach(e){const t=this.iterator();let n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;const[i,l]=this.find(e);let u=e-l;const f=this.iterator(i);let g=f();for(;g&&u<e+t;){const m=g.length();e>u?n(g,e-u,Math.min(t,u+m-e)):n(g,0,Math.min(m,e+t-u)),u+=m,g=f()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){const n=this.iterator();let i=n();for(;i;)t=e(t,i),i=n();return t}}function P0(r,e){const t=e.find(r);if(t)return t;try{return e.create(r)}catch{const n=e.create(Qt.INLINE);return Array.from(r.childNodes).forEach(i=>{n.domNode.appendChild(i)}),r.parentNode&&r.parentNode.replaceChild(n.domNode,r),n.attach(),n}}const Ax=class Kl extends Cx{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,Kl.uiClass&&this.uiNode.classList.add(Kl.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new nM,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=P0(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Wu)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(n,i,l)=>{n.deleteAt(i,l)})}descendant(e,t=0){const[n,i]=this.children.find(t);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,i]:n instanceof Kl?n.descendant(e,i):[null,-1]}descendants(e,t=0,n=Number.MAX_VALUE){let i=[],l=n;return this.children.forEachAt(t,n,(u,f,g)=>{(e.blotName==null&&e(u)||e.blotName!=null&&u instanceof e)&&i.push(u),u instanceof Kl&&(i=i.concat(u.descendants(e,f,l))),l-=g}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(n=>t instanceof n)||(t.statics.scope===Qt.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof Kl?t.unwrap():t.remove())})}formatAt(e,t,n,i){this.children.forEachAt(e,t,(l,u,f)=>{l.formatAt(u,f,n,i)})}insertAt(e,t,n){const[i,l]=this.children.find(e);if(i)i.insertAt(l,t,n);else{const u=n==null?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(u)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,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[n,i]=this.children.find(e,t),l=[[this,e]];return n instanceof Kl?l.concat(n.path(i,t)):(n!=null&&l.push([n,i]),l)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return n instanceof Kl&&this.moveChildren(n),super.replaceWith(n)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(i,l,u)=>{const f=i.split(l,t);f!=null&&n.appendChild(f)}),n}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 n=[],i=[];e.forEach(l=>{l.target===this.domNode&&l.type==="childList"&&(n.push(...l.addedNodes),i.push(...l.removedNodes))}),i.forEach(l=>{if(l.parentNode!=null&&l.tagName!=="IFRAME"&&document.body.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const u=this.scroll.find(l);u!=null&&(u.domNode.parentNode==null||u.domNode.parentNode===this.domNode)&&u.detach()}),n.filter(l=>l.parentNode===this.domNode&&l!==this.uiNode).sort((l,u)=>l===u?0:l.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(l=>{let u=null;l.nextSibling!=null&&(u=this.scroll.find(l.nextSibling));const f=P0(l,this.scroll);(f.next!==u||f.next==null)&&(f.parent!=null&&f.parent.removeChild(this),this.insertBefore(f,u||void 0))}),this.enforceAllowedChildren()}};Ax.uiClass="";let iM=Ax;const qs=iM;function oM(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}const Pu=class Nu extends qs{static create(e){return super.create(e)}static formats(e,t){const n=t.query(Nu.blotName);if(!(n!=null&&e.tagName===n.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 dh(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(n=>{n instanceof Nu||(n=n.wrap(Nu.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(e,Qt.INLINE);if(n==null)return;n instanceof Ca?this.attributes.attribute(n,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,n,i){this.formats()[n]!=null||this.scroll.query(n,Qt.ATTRIBUTE)?this.isolate(e,t).format(n,i):super.formatAt(e,t,n,i)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const n=this.next;n instanceof Nu&&n.prev===this&&oM(t,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(e,t){const n=super.wrap(e,t);return n instanceof Nu&&this.attributes.move(n),n}};Pu.allowedChildren=[Pu,qi],Pu.blotName="inline",Pu.scope=Qt.INLINE_BLOT,Pu.tagName="SPAN";let sM=Pu;const Rm=sM,Fu=class K1 extends qs{static create(e){return super.create(e)}static formats(e,t){const n=t.query(K1.blotName);if(!(n!=null&&e.tagName===n.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 dh(this.domNode)}format(e,t){const n=this.scroll.query(e,Qt.BLOCK);n!=null&&(n instanceof Ca?this.attributes.attribute(n,t):e===this.statics.blotName&&!t?this.replaceWith(K1.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,n,i){this.scroll.query(n,Qt.BLOCK)!=null?this.format(n,i):super.formatAt(e,t,n,i)}insertAt(e,t,n){if(n==null||this.scroll.query(t,Qt.INLINE)!=null)super.insertAt(e,t,n);else{const i=this.split(e);if(i!=null){const l=this.scroll.create(t,n);i.parent.insertBefore(l,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};Fu.blotName="block",Fu.scope=Qt.BLOCK_BLOT,Fu.tagName="P",Fu.allowedChildren=[Rm,Fu,qi];let aM=Fu;const Qf=aM,Y1=class extends qs{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,i){super.formatAt(e,t,n,i),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Y1.blotName="container",Y1.scope=Qt.BLOCK_BLOT;let lM=Y1;const hh=lM;class cM extends qi{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,i){e===0&&t===this.length()?this.format(n,i):super.formatAt(e,t,n,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const zo=cM,uM={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},fM=100,ju=class extends qs{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,uM),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=Qt.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(n=>{n.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,i){this.update(),super.formatAt(e,t,n,i)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const l=(g,m=!0)=>{g==null||g===this||g.domNode.parentNode!=null&&(n.has(g.domNode)||n.set(g.domNode,[]),m&&l(g.parent))},u=g=>{n.has(g.domNode)&&(g instanceof qs&&g.children.forEach(u),n.delete(g.domNode),g.optimize(t))};let f=e;for(let g=0;f.length>0;g+=1){if(g>=fM)throw new Error("[Parchment] Maximum optimize iterations reached");for(f.forEach(m=>{const I=this.find(m.target,!0);I!=null&&(I.domNode===m.target&&(m.type==="childList"?(l(this.find(m.previousSibling,!1)),Array.from(m.addedNodes).forEach(E=>{const b=this.find(E,!1);l(b,!1),b instanceof qs&&b.children.forEach(S=>{l(S,!1)})})):m.type==="attributes"&&l(I.prev)),l(I))}),this.children.forEach(u),f=Array.from(this.observer.takeRecords()),i=f.slice();i.length>0;)e.push(i.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(i=>{const l=this.find(i.target,!0);return l==null?null:n.has(l.domNode)?(n.get(l.domNode).push(i),null):(n.set(l.domNode,[i]),l)}).forEach(i=>{i!=null&&i!==this&&n.has(i.domNode)&&i.update(n.get(i.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};ju.blotName="scroll",ju.defaultChild=Qf,ju.allowedChildren=[Qf,hh],ju.scope=Qt.BLOCK_BLOT,ju.tagName="DIV";let dM=ju;const Im=dM,X1=class Tx extends qi{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,n){n==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}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 Tx&&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 n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};X1.blotName="text",X1.scope=Qt.INLINE_BLOT;let hM=X1;const rh=hM,pM=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Ca,AttributorStore:dh,BlockBlot:Qf,ClassAttributor:Us,ContainerBlot:hh,EmbedBlot:zo,InlineBlot:Rm,LeafBlot:qi,ParentBlot:qs,Registry:Yu,Scope:Qt,ScrollBlot:Im,StyleAttributor:oc,TextBlot:rh},Symbol.toStringTag,{value:"Module"}));var Od={exports:{}},ip,N0;function gM(){if(N0)return ip;N0=1;var r=-1,e=1,t=0;function n(B,ee,X,re,fe){if(B===ee)return B?[[t,B]]:[];if(X!=null){var ve=J(B,ee,X);if(ve)return ve}var be=f(B,ee),le=B.substring(0,be);B=B.substring(be),ee=ee.substring(be),be=m(B,ee);var ke=B.substring(B.length-be);B=B.substring(0,B.length-be),ee=ee.substring(0,ee.length-be);var ce=i(B,ee);return le&&ce.unshift([t,le]),ke&&ce.push([t,ke]),L(ce,fe),re&&E(ce),ce}function i(B,ee){var X;if(!B)return[[e,ee]];if(!ee)return[[r,B]];var re=B.length>ee.length?B:ee,fe=B.length>ee.length?ee:B,ve=re.indexOf(fe);if(ve!==-1)return X=[[e,re.substring(0,ve)],[t,fe],[e,re.substring(ve+fe.length)]],B.length>ee.length&&(X[0][0]=X[2][0]=r),X;if(fe.length===1)return[[r,B],[e,ee]];var be=I(B,ee);if(be){var le=be[0],ke=be[1],ce=be[2],se=be[3],pe=be[4],Oe=n(le,ce),Xe=n(ke,se);return Oe.concat([[t,pe]],Xe)}return l(B,ee)}function l(B,ee){for(var X=B.length,re=ee.length,fe=Math.ceil((X+re)/2),ve=fe,be=2*fe,le=new Array(be),ke=new Array(be),ce=0;ce<be;ce++)le[ce]=-1,ke[ce]=-1;le[ve+1]=0,ke[ve+1]=0;for(var se=X-re,pe=se%2!==0,Oe=0,Xe=0,ge=0,Le=0,We=0;We<fe;We++){for(var Je=-We+Oe;Je<=We-Xe;Je+=2){var Ke=ve+Je,Ne;Je===-We||Je!==We&&le[Ke-1]<le[Ke+1]?Ne=le[Ke+1]:Ne=le[Ke-1]+1;for(var Te=Ne-Je;Ne<X&&Te<re&&B.charAt(Ne)===ee.charAt(Te);)Ne++,Te++;if(le[Ke]=Ne,Ne>X)Xe+=2;else if(Te>re)Oe+=2;else if(pe){var _e=ve+se-Je;if(_e>=0&&_e<be&&ke[_e]!==-1){var Ue=X-ke[_e];if(Ne>=Ue)return u(B,ee,Ne,Te)}}}for(var ht=-We+ge;ht<=We-Le;ht+=2){var _e=ve+ht,Ue;ht===-We||ht!==We&&ke[_e-1]<ke[_e+1]?Ue=ke[_e+1]:Ue=ke[_e-1]+1;for(var St=Ue-ht;Ue<X&&St<re&&B.charAt(X-Ue-1)===ee.charAt(re-St-1);)Ue++,St++;if(ke[_e]=Ue,Ue>X)Le+=2;else if(St>re)ge+=2;else if(!pe){var Ke=ve+se-ht;if(Ke>=0&&Ke<be&&le[Ke]!==-1){var Ne=le[Ke],Te=ve+Ne-Ke;if(Ue=X-Ue,Ne>=Ue)return u(B,ee,Ne,Te)}}}}return[[r,B],[e,ee]]}function u(B,ee,X,re){var fe=B.substring(0,X),ve=ee.substring(0,re),be=B.substring(X),le=ee.substring(re),ke=n(fe,ve),ce=n(be,le);return ke.concat(ce)}function f(B,ee){if(!B||!ee||B.charAt(0)!==ee.charAt(0))return 0;for(var X=0,re=Math.min(B.length,ee.length),fe=re,ve=0;X<fe;)B.substring(ve,fe)==ee.substring(ve,fe)?(X=fe,ve=X):re=fe,fe=Math.floor((re-X)/2+X);return O(B.charCodeAt(fe-1))&&fe--,fe}function g(B,ee){var X=B.length,re=ee.length;if(X==0||re==0)return 0;X>re?B=B.substring(X-re):X<re&&(ee=ee.substring(0,X));var fe=Math.min(X,re);if(B==ee)return fe;for(var ve=0,be=1;;){var le=B.substring(fe-be),ke=ee.indexOf(le);if(ke==-1)return ve;be+=ke,(ke==0||B.substring(fe-be)==ee.substring(0,be))&&(ve=be,be++)}}function m(B,ee){if(!B||!ee||B.slice(-1)!==ee.slice(-1))return 0;for(var X=0,re=Math.min(B.length,ee.length),fe=re,ve=0;X<fe;)B.substring(B.length-fe,B.length-ve)==ee.substring(ee.length-fe,ee.length-ve)?(X=fe,ve=X):re=fe,fe=Math.floor((re-X)/2+X);return j(B.charCodeAt(B.length-fe))&&fe--,fe}function I(B,ee){var X=B.length>ee.length?B:ee,re=B.length>ee.length?ee:B;if(X.length<4||re.length*2<X.length)return null;function fe(Xe,ge,Le){for(var We=Xe.substring(Le,Le+Math.floor(Xe.length/4)),Je=-1,Ke="",Ne,Te,_e,Ue;(Je=ge.indexOf(We,Je+1))!==-1;){var ht=f(Xe.substring(Le),ge.substring(Je)),St=m(Xe.substring(0,Le),ge.substring(0,Je));Ke.length<St+ht&&(Ke=ge.substring(Je-St,Je)+ge.substring(Je,Je+ht),Ne=Xe.substring(0,Le-St),Te=Xe.substring(Le+ht),_e=ge.substring(0,Je-St),Ue=ge.substring(Je+ht))}return Ke.length*2>=Xe.length?[Ne,Te,_e,Ue,Ke]:null}var ve=fe(X,re,Math.ceil(X.length/4)),be=fe(X,re,Math.ceil(X.length/2)),le;if(!ve&&!be)return null;be?ve?le=ve[4].length>be[4].length?ve:be:le=be:le=ve;var ke,ce,se,pe;B.length>ee.length?(ke=le[0],ce=le[1],se=le[2],pe=le[3]):(se=le[0],pe=le[1],ke=le[2],ce=le[3]);var Oe=le[4];return[ke,ce,se,pe,Oe]}function E(B){for(var ee=!1,X=[],re=0,fe=null,ve=0,be=0,le=0,ke=0,ce=0;ve<B.length;)B[ve][0]==t?(X[re++]=ve,be=ke,le=ce,ke=0,ce=0,fe=B[ve][1]):(B[ve][0]==e?ke+=B[ve][1].length:ce+=B[ve][1].length,fe&&fe.length<=Math.max(be,le)&&fe.length<=Math.max(ke,ce)&&(B.splice(X[re-1],0,[r,fe]),B[X[re-1]+1][0]=e,re--,re--,ve=re>0?X[re-1]:-1,be=0,le=0,ke=0,ce=0,fe=null,ee=!0)),ve++;for(ee&&L(B),x(B),ve=1;ve<B.length;){if(B[ve-1][0]==r&&B[ve][0]==e){var se=B[ve-1][1],pe=B[ve][1],Oe=g(se,pe),Xe=g(pe,se);Oe>=Xe?(Oe>=se.length/2||Oe>=pe.length/2)&&(B.splice(ve,0,[t,pe.substring(0,Oe)]),B[ve-1][1]=se.substring(0,se.length-Oe),B[ve+1][1]=pe.substring(Oe),ve++):(Xe>=se.length/2||Xe>=pe.length/2)&&(B.splice(ve,0,[t,se.substring(0,Xe)]),B[ve-1][0]=e,B[ve-1][1]=pe.substring(0,pe.length-Xe),B[ve+1][0]=r,B[ve+1][1]=se.substring(Xe),ve++),ve++}ve++}}var b=/[^a-zA-Z0-9]/,S=/\s/,_=/[\r\n]/,M=/\n\r?\n$/,w=/^\r?\n\r?\n/;function x(B){function ee(Xe,ge){if(!Xe||!ge)return 6;var Le=Xe.charAt(Xe.length-1),We=ge.charAt(0),Je=Le.match(b),Ke=We.match(b),Ne=Je&&Le.match(S),Te=Ke&&We.match(S),_e=Ne&&Le.match(_),Ue=Te&&We.match(_),ht=_e&&Xe.match(M),St=Ue&&ge.match(w);return ht||St?5:_e||Ue?4:Je&&!Ne&&Te?3:Ne||Te?2:Je||Ke?1:0}for(var X=1;X<B.length-1;){if(B[X-1][0]==t&&B[X+1][0]==t){var re=B[X-1][1],fe=B[X][1],ve=B[X+1][1],be=m(re,fe);if(be){var le=fe.substring(fe.length-be);re=re.substring(0,re.length-be),fe=le+fe.substring(0,fe.length-be),ve=le+ve}for(var ke=re,ce=fe,se=ve,pe=ee(re,fe)+ee(fe,ve);fe.charAt(0)===ve.charAt(0);){re+=fe.charAt(0),fe=fe.substring(1)+ve.charAt(0),ve=ve.substring(1);var Oe=ee(re,fe)+ee(fe,ve);Oe>=pe&&(pe=Oe,ke=re,ce=fe,se=ve)}B[X-1][1]!=ke&&(ke?B[X-1][1]=ke:(B.splice(X-1,1),X--),B[X][1]=ce,se?B[X+1][1]=se:(B.splice(X+1,1),X--))}X++}}function L(B,ee){B.push([t,""]);for(var X=0,re=0,fe=0,ve="",be="",le;X<B.length;){if(X<B.length-1&&!B[X][1]){B.splice(X,1);continue}switch(B[X][0]){case e:fe++,be+=B[X][1],X++;break;case r:re++,ve+=B[X][1],X++;break;case t:var ke=X-fe-re-1;if(ee){if(ke>=0&&U(B[ke][1])){var ce=B[ke][1].slice(-1);if(B[ke][1]=B[ke][1].slice(0,-1),ve=ce+ve,be=ce+be,!B[ke][1]){B.splice(ke,1),X--;var se=ke-1;B[se]&&B[se][0]===e&&(fe++,be=B[se][1]+be,se--),B[se]&&B[se][0]===r&&(re++,ve=B[se][1]+ve,se--),ke=se}}if(H(B[X][1])){var ce=B[X][1].charAt(0);B[X][1]=B[X][1].slice(1),ve+=ce,be+=ce}}if(X<B.length-1&&!B[X][1]){B.splice(X,1);break}if(ve.length>0||be.length>0){ve.length>0&&be.length>0&&(le=f(be,ve),le!==0&&(ke>=0?B[ke][1]+=be.substring(0,le):(B.splice(0,0,[t,be.substring(0,le)]),X++),be=be.substring(le),ve=ve.substring(le)),le=m(be,ve),le!==0&&(B[X][1]=be.substring(be.length-le)+B[X][1],be=be.substring(0,be.length-le),ve=ve.substring(0,ve.length-le)));var pe=fe+re;ve.length===0&&be.length===0?(B.splice(X-pe,pe),X=X-pe):ve.length===0?(B.splice(X-pe,pe,[e,be]),X=X-pe+1):be.length===0?(B.splice(X-pe,pe,[r,ve]),X=X-pe+1):(B.splice(X-pe,pe,[r,ve],[e,be]),X=X-pe+2)}X!==0&&B[X-1][0]===t?(B[X-1][1]+=B[X][1],B.splice(X,1)):X++,fe=0,re=0,ve="",be="";break}}B[B.length-1][1]===""&&B.pop();var Oe=!1;for(X=1;X<B.length-1;)B[X-1][0]===t&&B[X+1][0]===t&&(B[X][1].substring(B[X][1].length-B[X-1][1].length)===B[X-1][1]?(B[X][1]=B[X-1][1]+B[X][1].substring(0,B[X][1].length-B[X-1][1].length),B[X+1][1]=B[X-1][1]+B[X+1][1],B.splice(X-1,1),Oe=!0):B[X][1].substring(0,B[X+1][1].length)==B[X+1][1]&&(B[X-1][1]+=B[X+1][1],B[X][1]=B[X][1].substring(B[X+1][1].length)+B[X+1][1],B.splice(X+1,1),Oe=!0)),X++;Oe&&L(B,ee)}function O(B){return B>=55296&&B<=56319}function j(B){return B>=56320&&B<=57343}function H(B){return j(B.charCodeAt(0))}function U(B){return O(B.charCodeAt(B.length-1))}function Z(B){for(var ee=[],X=0;X<B.length;X++)B[X][1].length>0&&ee.push(B[X]);return ee}function de(B,ee,X,re){return U(B)||H(re)?null:Z([[t,B],[r,ee],[e,X],[t,re]])}function J(B,ee,X){var re=typeof X=="number"?{index:X,length:0}:X.oldRange,fe=typeof X=="number"?null:X.newRange,ve=B.length,be=ee.length;if(re.length===0&&(fe===null||fe.length===0)){var le=re.index,ke=B.slice(0,le),ce=B.slice(le),se=fe?fe.index:null;e:{var pe=le+be-ve;if(se!==null&&se!==pe||pe<0||pe>be)break e;var Oe=ee.slice(0,pe),Xe=ee.slice(pe);if(Xe!==ce)break e;var ge=Math.min(le,pe),Le=ke.slice(0,ge),We=Oe.slice(0,ge);if(Le!==We)break e;var Je=ke.slice(ge),Ke=Oe.slice(ge);return de(Le,Je,Ke,ce)}e:{if(se!==null&&se!==le)break e;var Ne=le,Oe=ee.slice(0,Ne),Xe=ee.slice(Ne);if(Oe!==ke)break e;var Te=Math.min(ve-Ne,be-Ne),_e=ce.slice(ce.length-Te),Ue=Xe.slice(Xe.length-Te);if(_e!==Ue)break e;var Je=ce.slice(0,ce.length-Te),Ke=Xe.slice(0,Xe.length-Te);return de(ke,Je,Ke,_e)}}if(re.length>0&&fe&&fe.length===0)e:{var Le=B.slice(0,re.index),_e=B.slice(re.index+re.length),ge=Le.length,Te=_e.length;if(be<ge+Te)break e;var We=ee.slice(0,ge),Ue=ee.slice(be-Te);if(Le!==We||_e!==Ue)break e;var Je=B.slice(ge,ve-Te),Ke=ee.slice(ge,be-Te);return de(Le,Je,Ke,_e)}return null}function ue(B,ee,X,re){return n(B,ee,X,re,!0)}return ue.INSERT=e,ue.DELETE=r,ue.EQUAL=t,ip=ue,ip}var jf={exports:{}};jf.exports;var F0;function Ex(){return F0||(F0=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=9007199254740991,l="[object Arguments]",u="[object Array]",f="[object Boolean]",g="[object Date]",m="[object Error]",I="[object Function]",E="[object GeneratorFunction]",b="[object Map]",S="[object Number]",_="[object Object]",M="[object Promise]",w="[object RegExp]",x="[object Set]",L="[object String]",O="[object Symbol]",j="[object WeakMap]",H="[object ArrayBuffer]",U="[object DataView]",Z="[object Float32Array]",de="[object Float64Array]",J="[object Int8Array]",ue="[object Int16Array]",B="[object Int32Array]",ee="[object Uint8Array]",X="[object Uint8ClampedArray]",re="[object Uint16Array]",fe="[object Uint32Array]",ve=/[\\^$.*+?()[\]{}|]/g,be=/\w*$/,le=/^\[object .+?Constructor\]$/,ke=/^(?:0|[1-9]\d*)$/,ce={};ce[l]=ce[u]=ce[H]=ce[U]=ce[f]=ce[g]=ce[Z]=ce[de]=ce[J]=ce[ue]=ce[B]=ce[b]=ce[S]=ce[_]=ce[w]=ce[x]=ce[L]=ce[O]=ce[ee]=ce[X]=ce[re]=ce[fe]=!0,ce[m]=ce[I]=ce[j]=!1;var se=typeof bi=="object"&&bi&&bi.Object===Object&&bi,pe=typeof self=="object"&&self&&self.Object===Object&&self,Oe=se||pe||Function("return this")(),Xe=e&&!e.nodeType&&e,ge=Xe&&!0&&r&&!r.nodeType&&r,Le=ge&&ge.exports===Xe;function We(R,G){return R.set(G[0],G[1]),R}function Je(R,G){return R.add(G),R}function Ke(R,G){for(var ae=-1,He=R?R.length:0;++ae<He&&G(R[ae],ae,R)!==!1;);return R}function Ne(R,G){for(var ae=-1,He=G.length,Xt=R.length;++ae<He;)R[Xt+ae]=G[ae];return R}function Te(R,G,ae,He){for(var Xt=-1,Gt=R?R.length:0;++Xt<Gt;)ae=G(ae,R[Xt],Xt,R);return ae}function _e(R,G){for(var ae=-1,He=Array(R);++ae<R;)He[ae]=G(ae);return He}function Ue(R,G){return R==null?void 0:R[G]}function ht(R){var G=!1;if(R!=null&&typeof R.toString!="function")try{G=!!(R+"")}catch{}return G}function St(R){var G=-1,ae=Array(R.size);return R.forEach(function(He,Xt){ae[++G]=[Xt,He]}),ae}function Ae(R,G){return function(ae){return R(G(ae))}}function De(R){var G=-1,ae=Array(R.size);return R.forEach(function(He){ae[++G]=He}),ae}var ot=Array.prototype,st=Function.prototype,yt=Object.prototype,Mt=Oe["__core-js_shared__"],Lt=function(){var R=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||"");return R?"Symbol(src)_1."+R:""}(),wt=st.toString,kt=yt.hasOwnProperty,Fe=yt.toString,Qe=RegExp("^"+wt.call(kt).replace(ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gt=Le?Oe.Buffer:void 0,Ft=Oe.Symbol,bt=Oe.Uint8Array,qe=Ae(Object.getPrototypeOf,Object),Rt=Object.create,Dt=yt.propertyIsEnumerable,pr=ot.splice,xr=Object.getOwnPropertySymbols,wr=gt?gt.isBuffer:void 0,me=Ae(Object.keys,Object),ne=Ot(Oe,"DataView"),et=Ot(Oe,"Map"),ct=Ot(Oe,"Promise"),tt=Ot(Oe,"Set"),Me=Ot(Oe,"WeakMap"),pt=Ot(Object,"create"),Tt=Xr(ne),_t=Xr(et),Bt=Xr(ct),Wt=Xr(tt),rr=Xr(Me),Ht=Ft?Ft.prototype:void 0,$t=Ht?Ht.valueOf:void 0;function nr(R){var G=-1,ae=R?R.length:0;for(this.clear();++G<ae;){var He=R[G];this.set(He[0],He[1])}}function rt(){this.__data__=pt?pt(null):{}}function At(R){return this.has(R)&&delete this.__data__[R]}function vt(R){var G=this.__data__;if(pt){var ae=G[R];return ae===n?void 0:ae}return kt.call(G,R)?G[R]:void 0}function It(R){var G=this.__data__;return pt?G[R]!==void 0:kt.call(G,R)}function vr(R,G){var ae=this.__data__;return ae[R]=pt&&G===void 0?n:G,this}nr.prototype.clear=rt,nr.prototype.delete=At,nr.prototype.get=vt,nr.prototype.has=It,nr.prototype.set=vr;function Y(R){var G=-1,ae=R?R.length:0;for(this.clear();++G<ae;){var He=R[G];this.set(He[0],He[1])}}function ze(){this.__data__=[]}function Re(R){var G=this.__data__,ae=Jn(G,R);if(ae<0)return!1;var He=G.length-1;return ae==He?G.pop():pr.call(G,ae,1),!0}function Ve(R){var G=this.__data__,ae=Jn(G,R);return ae<0?void 0:G[ae][1]}function xt(R){return Jn(this.__data__,R)>-1}function jt(R,G){var ae=this.__data__,He=Jn(ae,R);return He<0?ae.push([R,G]):ae[He][1]=G,this}Y.prototype.clear=ze,Y.prototype.delete=Re,Y.prototype.get=Ve,Y.prototype.has=xt,Y.prototype.set=jt;function Ct(R){var G=-1,ae=R?R.length:0;for(this.clear();++G<ae;){var He=R[G];this.set(He[0],He[1])}}function qt(){this.__data__={hash:new nr,map:new(et||Y),string:new nr}}function ir(R){return at(this,R).delete(R)}function or(R){return at(this,R).get(R)}function fr(R){return at(this,R).has(R)}function Ur(R,G){return at(this,R).set(R,G),this}Ct.prototype.clear=qt,Ct.prototype.delete=ir,Ct.prototype.get=or,Ct.prototype.has=fr,Ct.prototype.set=Ur;function yr(R){this.__data__=new Y(R)}function Kn(){this.__data__=new Y}function Cn(R){return this.__data__.delete(R)}function Dn(R){return this.__data__.get(R)}function Yr(R){return this.__data__.has(R)}function Yn(R,G){var ae=this.__data__;if(ae instanceof Y){var He=ae.__data__;if(!et||He.length<t-1)return He.push([R,G]),this;ae=this.__data__=new Ct(He)}return ae.set(R,G),this}yr.prototype.clear=Kn,yr.prototype.delete=Cn,yr.prototype.get=Dn,yr.prototype.has=Yr,yr.prototype.set=Yn;function En(R,G){var ae=bo(R)||ei(R)?_e(R.length,String):[],He=ae.length,Xt=!!He;for(var Gt in R)kt.call(R,Gt)&&!(Xt&&(Gt=="length"||yn(Gt,He)))&&ae.push(Gt);return ae}function Xn(R,G,ae){var He=R[G];(!(kt.call(R,G)&&Hn(He,ae))||ae===void 0&&!(G in R))&&(R[G]=ae)}function Jn(R,G){for(var ae=R.length;ae--;)if(Hn(R[ae][0],G))return ae;return-1}function on(R,G){return R&&Ee(G,Or(G),R)}function On(R,G,ae,He,Xt,Gt,gr){var Cr;if(He&&(Cr=Gt?He(R,Xt,Gt,gr):He(R)),Cr!==void 0)return Cr;if(!ri(R))return R;var dr=bo(R);if(dr){if(Cr=Sr(R),!G)return Q(R,Cr)}else{var Tr=zt(R),Jr=Tr==I||Tr==E;if(Rn(R))return An(R,G);if(Tr==_||Tr==l||Jr&&!Gt){if(ht(R))return Gt?R:{};if(Cr=Zr(Jr?{}:R),!G)return Se(R,on(Cr,R))}else{if(!ce[Tr])return Gt?R:{};Cr=vn(R,Tr,On,G)}}gr||(gr=new yr);var In=gr.get(R);if(In)return In;if(gr.set(R,Cr),!dr)var Vr=ae?Be(R):Or(R);return Ke(Vr||R,function(Br,Qr){Vr&&(Qr=Br,Br=R[Qr]),Xn(Cr,Qr,On(Br,G,ae,He,Qr,R,gr))}),Cr}function wn(R){return ri(R)?Rt(R):{}}function hi(R,G,ae){var He=G(R);return bo(R)?He:Ne(He,ae(R))}function Si(R){return Fe.call(R)}function Ci(R){if(!ri(R)||Bn(R))return!1;var G=_o(R)||ht(R)?Qe:le;return G.test(Xr(R))}function kn(R){if(!wi(R))return me(R);var G=[];for(var ae in Object(R))kt.call(R,ae)&&ae!="constructor"&&G.push(ae);return G}function An(R,G){if(G)return R.slice();var ae=new R.constructor(R.length);return R.copy(ae),ae}function un(R){var G=new R.constructor(R.byteLength);return new bt(G).set(new bt(R)),G}function Qn(R,G){var ae=G?un(R.buffer):R.buffer;return new R.constructor(ae,R.byteOffset,R.byteLength)}function sn(R,G,ae){var He=G?ae(St(R),!0):St(R);return Te(He,We,new R.constructor)}function pn(R){var G=new R.constructor(R.source,be.exec(R));return G.lastIndex=R.lastIndex,G}function C(R,G,ae){var He=G?ae(De(R),!0):De(R);return Te(He,Je,new R.constructor)}function N(R){return $t?Object($t.call(R)):{}}function V(R,G){var ae=G?un(R.buffer):R.buffer;return new R.constructor(ae,R.byteOffset,R.length)}function Q(R,G){var ae=-1,He=R.length;for(G||(G=Array(He));++ae<He;)G[ae]=R[ae];return G}function Ee(R,G,ae,He){ae||(ae={});for(var Xt=-1,Gt=G.length;++Xt<Gt;){var gr=G[Xt],Cr=void 0;Xn(ae,gr,Cr===void 0?R[gr]:Cr)}return ae}function Se(R,G){return Ee(R,Ut(R),G)}function Be(R){return hi(R,Or,Ut)}function at(R,G){var ae=R.__data__;return li(G)?ae[typeof G=="string"?"string":"hash"]:ae.map}function Ot(R,G){var ae=Ue(R,G);return Ci(ae)?ae:void 0}var Ut=xr?Ae(xr,Object):Ar,zt=Si;(ne&&zt(new ne(new ArrayBuffer(1)))!=U||et&&zt(new et)!=b||ct&&zt(ct.resolve())!=M||tt&&zt(new tt)!=x||Me&&zt(new Me)!=j)&&(zt=function(R){var G=Fe.call(R),ae=G==_?R.constructor:void 0,He=ae?Xr(ae):void 0;if(He)switch(He){case Tt:return U;case _t:return b;case Bt:return M;case Wt:return x;case rr:return j}return G});function Sr(R){var G=R.length,ae=R.constructor(G);return G&&typeof R[0]=="string"&&kt.call(R,"index")&&(ae.index=R.index,ae.input=R.input),ae}function Zr(R){return typeof R.constructor=="function"&&!wi(R)?wn(qe(R)):{}}function vn(R,G,ae,He){var Xt=R.constructor;switch(G){case H:return un(R);case f:case g:return new Xt(+R);case U:return Qn(R,He);case Z:case de:case J:case ue:case B:case ee:case X:case re:case fe:return V(R,He);case b:return sn(R,He,ae);case S:case L:return new Xt(R);case w:return pn(R);case x:return C(R,He,ae);case O:return N(R)}}function yn(R,G){return G=G??i,!!G&&(typeof R=="number"||ke.test(R))&&R>-1&&R%1==0&&R<G}function li(R){var G=typeof R;return G=="string"||G=="number"||G=="symbol"||G=="boolean"?R!=="__proto__":R===null}function Bn(R){return!!Lt&&Lt in R}function wi(R){var G=R&&R.constructor,ae=typeof G=="function"&&G.prototype||yt;return R===ae}function Xr(R){if(R!=null){try{return wt.call(R)}catch{}try{return R+""}catch{}}return""}function pi(R){return On(R,!0,!0)}function Hn(R,G){return R===G||R!==R&&G!==G}function ei(R){return no(R)&&kt.call(R,"callee")&&(!Dt.call(R,"callee")||Fe.call(R)==l)}var bo=Array.isArray;function ro(R){return R!=null&&ti(R.length)&&!_o(R)}function no(R){return $i(R)&&ro(R)}var Rn=wr||Mr;function _o(R){var G=ri(R)?Fe.call(R):"";return G==I||G==E}function ti(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=i}function ri(R){var G=typeof R;return!!R&&(G=="object"||G=="function")}function $i(R){return!!R&&typeof R=="object"}function Or(R){return ro(R)?En(R):kn(R)}function Ar(){return[]}function Mr(){return!1}r.exports=pi}(jf,jf.exports)),jf.exports}var Bf={exports:{}};Bf.exports;var j0;function kx(){return j0||(j0=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=1,l=2,u=9007199254740991,f="[object Arguments]",g="[object Array]",m="[object AsyncFunction]",I="[object Boolean]",E="[object Date]",b="[object Error]",S="[object Function]",_="[object GeneratorFunction]",M="[object Map]",w="[object Number]",x="[object Null]",L="[object Object]",O="[object Promise]",j="[object Proxy]",H="[object RegExp]",U="[object Set]",Z="[object String]",de="[object Symbol]",J="[object Undefined]",ue="[object WeakMap]",B="[object ArrayBuffer]",ee="[object DataView]",X="[object Float32Array]",re="[object Float64Array]",fe="[object Int8Array]",ve="[object Int16Array]",be="[object Int32Array]",le="[object Uint8Array]",ke="[object Uint8ClampedArray]",ce="[object Uint16Array]",se="[object Uint32Array]",pe=/[\\^$.*+?()[\]{}|]/g,Oe=/^\[object .+?Constructor\]$/,Xe=/^(?:0|[1-9]\d*)$/,ge={};ge[X]=ge[re]=ge[fe]=ge[ve]=ge[be]=ge[le]=ge[ke]=ge[ce]=ge[se]=!0,ge[f]=ge[g]=ge[B]=ge[I]=ge[ee]=ge[E]=ge[b]=ge[S]=ge[M]=ge[w]=ge[L]=ge[H]=ge[U]=ge[Z]=ge[ue]=!1;var Le=typeof bi=="object"&&bi&&bi.Object===Object&&bi,We=typeof self=="object"&&self&&self.Object===Object&&self,Je=Le||We||Function("return this")(),Ke=e&&!e.nodeType&&e,Ne=Ke&&!0&&r&&!r.nodeType&&r,Te=Ne&&Ne.exports===Ke,_e=Te&&Le.process,Ue=function(){try{return _e&&_e.binding&&_e.binding("util")}catch{}}(),ht=Ue&&Ue.isTypedArray;function St(R,G){for(var ae=-1,He=R==null?0:R.length,Xt=0,Gt=[];++ae<He;){var gr=R[ae];G(gr,ae,R)&&(Gt[Xt++]=gr)}return Gt}function Ae(R,G){for(var ae=-1,He=G.length,Xt=R.length;++ae<He;)R[Xt+ae]=G[ae];return R}function De(R,G){for(var ae=-1,He=R==null?0:R.length;++ae<He;)if(G(R[ae],ae,R))return!0;return!1}function ot(R,G){for(var ae=-1,He=Array(R);++ae<R;)He[ae]=G(ae);return He}function st(R){return function(G){return R(G)}}function yt(R,G){return R.has(G)}function Mt(R,G){return R==null?void 0:R[G]}function Lt(R){var G=-1,ae=Array(R.size);return R.forEach(function(He,Xt){ae[++G]=[Xt,He]}),ae}function wt(R,G){return function(ae){return R(G(ae))}}function kt(R){var G=-1,ae=Array(R.size);return R.forEach(function(He){ae[++G]=He}),ae}var Fe=Array.prototype,Qe=Function.prototype,gt=Object.prototype,Ft=Je["__core-js_shared__"],bt=Qe.toString,qe=gt.hasOwnProperty,Rt=function(){var R=/[^.]+$/.exec(Ft&&Ft.keys&&Ft.keys.IE_PROTO||"");return R?"Symbol(src)_1."+R:""}(),Dt=gt.toString,pr=RegExp("^"+bt.call(qe).replace(pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xr=Te?Je.Buffer:void 0,wr=Je.Symbol,me=Je.Uint8Array,ne=gt.propertyIsEnumerable,et=Fe.splice,ct=wr?wr.toStringTag:void 0,tt=Object.getOwnPropertySymbols,Me=xr?xr.isBuffer:void 0,pt=wt(Object.keys,Object),Tt=Ut(Je,"DataView"),_t=Ut(Je,"Map"),Bt=Ut(Je,"Promise"),Wt=Ut(Je,"Set"),rr=Ut(Je,"WeakMap"),Ht=Ut(Object,"create"),$t=Xr(Tt),nr=Xr(_t),rt=Xr(Bt),At=Xr(Wt),vt=Xr(rr),It=wr?wr.prototype:void 0,vr=It?It.valueOf:void 0;function Y(R){var G=-1,ae=R==null?0:R.length;for(this.clear();++G<ae;){var He=R[G];this.set(He[0],He[1])}}function ze(){this.__data__=Ht?Ht(null):{},this.size=0}function Re(R){var G=this.has(R)&&delete this.__data__[R];return this.size-=G?1:0,G}function Ve(R){var G=this.__data__;if(Ht){var ae=G[R];return ae===n?void 0:ae}return qe.call(G,R)?G[R]:void 0}function xt(R){var G=this.__data__;return Ht?G[R]!==void 0:qe.call(G,R)}function jt(R,G){var ae=this.__data__;return this.size+=this.has(R)?0:1,ae[R]=Ht&&G===void 0?n:G,this}Y.prototype.clear=ze,Y.prototype.delete=Re,Y.prototype.get=Ve,Y.prototype.has=xt,Y.prototype.set=jt;function Ct(R){var G=-1,ae=R==null?0:R.length;for(this.clear();++G<ae;){var He=R[G];this.set(He[0],He[1])}}function qt(){this.__data__=[],this.size=0}function ir(R){var G=this.__data__,ae=An(G,R);if(ae<0)return!1;var He=G.length-1;return ae==He?G.pop():et.call(G,ae,1),--this.size,!0}function or(R){var G=this.__data__,ae=An(G,R);return ae<0?void 0:G[ae][1]}function fr(R){return An(this.__data__,R)>-1}function Ur(R,G){var ae=this.__data__,He=An(ae,R);return He<0?(++this.size,ae.push([R,G])):ae[He][1]=G,this}Ct.prototype.clear=qt,Ct.prototype.delete=ir,Ct.prototype.get=or,Ct.prototype.has=fr,Ct.prototype.set=Ur;function yr(R){var G=-1,ae=R==null?0:R.length;for(this.clear();++G<ae;){var He=R[G];this.set(He[0],He[1])}}function Kn(){this.size=0,this.__data__={hash:new Y,map:new(_t||Ct),string:new Y}}function Cn(R){var G=Ot(this,R).delete(R);return this.size-=G?1:0,G}function Dn(R){return Ot(this,R).get(R)}function Yr(R){return Ot(this,R).has(R)}function Yn(R,G){var ae=Ot(this,R),He=ae.size;return ae.set(R,G),this.size+=ae.size==He?0:1,this}yr.prototype.clear=Kn,yr.prototype.delete=Cn,yr.prototype.get=Dn,yr.prototype.has=Yr,yr.prototype.set=Yn;function En(R){var G=-1,ae=R==null?0:R.length;for(this.__data__=new yr;++G<ae;)this.add(R[G])}function Xn(R){return this.__data__.set(R,n),this}function Jn(R){return this.__data__.has(R)}En.prototype.add=En.prototype.push=Xn,En.prototype.has=Jn;function on(R){var G=this.__data__=new Ct(R);this.size=G.size}function On(){this.__data__=new Ct,this.size=0}function wn(R){var G=this.__data__,ae=G.delete(R);return this.size=G.size,ae}function hi(R){return this.__data__.get(R)}function Si(R){return this.__data__.has(R)}function Ci(R,G){var ae=this.__data__;if(ae instanceof Ct){var He=ae.__data__;if(!_t||He.length<t-1)return He.push([R,G]),this.size=++ae.size,this;ae=this.__data__=new yr(He)}return ae.set(R,G),this.size=ae.size,this}on.prototype.clear=On,on.prototype.delete=wn,on.prototype.get=hi,on.prototype.has=Si,on.prototype.set=Ci;function kn(R,G){var ae=ei(R),He=!ae&&Hn(R),Xt=!ae&&!He&&ro(R),Gt=!ae&&!He&&!Xt&&$i(R),gr=ae||He||Xt||Gt,Cr=gr?ot(R.length,String):[],dr=Cr.length;for(var Tr in R)qe.call(R,Tr)&&!(gr&&(Tr=="length"||Xt&&(Tr=="offset"||Tr=="parent")||Gt&&(Tr=="buffer"||Tr=="byteLength"||Tr=="byteOffset")||vn(Tr,dr)))&&Cr.push(Tr);return Cr}function An(R,G){for(var ae=R.length;ae--;)if(pi(R[ae][0],G))return ae;return-1}function un(R,G,ae){var He=G(R);return ei(R)?He:Ae(He,ae(R))}function Qn(R){return R==null?R===void 0?J:x:ct&&ct in Object(R)?zt(R):wi(R)}function sn(R){return ri(R)&&Qn(R)==f}function pn(R,G,ae,He,Xt){return R===G?!0:R==null||G==null||!ri(R)&&!ri(G)?R!==R&&G!==G:C(R,G,ae,He,pn,Xt)}function C(R,G,ae,He,Xt,Gt){var gr=ei(R),Cr=ei(G),dr=gr?g:Zr(R),Tr=Cr?g:Zr(G);dr=dr==f?L:dr,Tr=Tr==f?L:Tr;var Jr=dr==L,In=Tr==L,Vr=dr==Tr;if(Vr&&ro(R)){if(!ro(G))return!1;gr=!0,Jr=!1}if(Vr&&!Jr)return Gt||(Gt=new on),gr||$i(R)?Ee(R,G,ae,He,Xt,Gt):Se(R,G,dr,ae,He,Xt,Gt);if(!(ae&i)){var Br=Jr&&qe.call(R,"__wrapped__"),Qr=In&&qe.call(G,"__wrapped__");if(Br||Qr){var ci=Br?R.value():R,gi=Qr?G.value():G;return Gt||(Gt=new on),Xt(ci,gi,ae,He,Gt)}}return Vr?(Gt||(Gt=new on),Be(R,G,ae,He,Xt,Gt)):!1}function N(R){if(!ti(R)||li(R))return!1;var G=Rn(R)?pr:Oe;return G.test(Xr(R))}function V(R){return ri(R)&&_o(R.length)&&!!ge[Qn(R)]}function Q(R){if(!Bn(R))return pt(R);var G=[];for(var ae in Object(R))qe.call(R,ae)&&ae!="constructor"&&G.push(ae);return G}function Ee(R,G,ae,He,Xt,Gt){var gr=ae&i,Cr=R.length,dr=G.length;if(Cr!=dr&&!(gr&&dr>Cr))return!1;var Tr=Gt.get(R);if(Tr&&Gt.get(G))return Tr==G;var Jr=-1,In=!0,Vr=ae&l?new En:void 0;for(Gt.set(R,G),Gt.set(G,R);++Jr<Cr;){var Br=R[Jr],Qr=G[Jr];if(He)var ci=gr?He(Qr,Br,Jr,G,R,Gt):He(Br,Qr,Jr,R,G,Gt);if(ci!==void 0){if(ci)continue;In=!1;break}if(Vr){if(!De(G,function(gi,qn){if(!yt(Vr,qn)&&(Br===gi||Xt(Br,gi,ae,He,Gt)))return Vr.push(qn)})){In=!1;break}}else if(!(Br===Qr||Xt(Br,Qr,ae,He,Gt))){In=!1;break}}return Gt.delete(R),Gt.delete(G),In}function Se(R,G,ae,He,Xt,Gt,gr){switch(ae){case ee:if(R.byteLength!=G.byteLength||R.byteOffset!=G.byteOffset)return!1;R=R.buffer,G=G.buffer;case B:return!(R.byteLength!=G.byteLength||!Gt(new me(R),new me(G)));case I:case E:case w:return pi(+R,+G);case b:return R.name==G.name&&R.message==G.message;case H:case Z:return R==G+"";case M:var Cr=Lt;case U:var dr=He&i;if(Cr||(Cr=kt),R.size!=G.size&&!dr)return!1;var Tr=gr.get(R);if(Tr)return Tr==G;He|=l,gr.set(R,G);var Jr=Ee(Cr(R),Cr(G),He,Xt,Gt,gr);return gr.delete(R),Jr;case de:if(vr)return vr.call(R)==vr.call(G)}return!1}function Be(R,G,ae,He,Xt,Gt){var gr=ae&i,Cr=at(R),dr=Cr.length,Tr=at(G),Jr=Tr.length;if(dr!=Jr&&!gr)return!1;for(var In=dr;In--;){var Vr=Cr[In];if(!(gr?Vr in G:qe.call(G,Vr)))return!1}var Br=Gt.get(R);if(Br&&Gt.get(G))return Br==G;var Qr=!0;Gt.set(R,G),Gt.set(G,R);for(var ci=gr;++In<dr;){Vr=Cr[In];var gi=R[Vr],qn=G[Vr];if(He)var xo=gr?He(qn,gi,Vr,G,R,Gt):He(gi,qn,Vr,R,G,Gt);if(!(xo===void 0?gi===qn||Xt(gi,qn,ae,He,Gt):xo)){Qr=!1;break}ci||(ci=Vr=="constructor")}if(Qr&&!ci){var Ui=R.constructor,an=G.constructor;Ui!=an&&"constructor"in R&&"constructor"in G&&!(typeof Ui=="function"&&Ui instanceof Ui&&typeof an=="function"&&an instanceof an)&&(Qr=!1)}return Gt.delete(R),Gt.delete(G),Qr}function at(R){return un(R,Or,Sr)}function Ot(R,G){var ae=R.__data__;return yn(G)?ae[typeof G=="string"?"string":"hash"]:ae.map}function Ut(R,G){var ae=Mt(R,G);return N(ae)?ae:void 0}function zt(R){var G=qe.call(R,ct),ae=R[ct];try{R[ct]=void 0;var He=!0}catch{}var Xt=Dt.call(R);return He&&(G?R[ct]=ae:delete R[ct]),Xt}var Sr=tt?function(R){return R==null?[]:(R=Object(R),St(tt(R),function(G){return ne.call(R,G)}))}:Ar,Zr=Qn;(Tt&&Zr(new Tt(new ArrayBuffer(1)))!=ee||_t&&Zr(new _t)!=M||Bt&&Zr(Bt.resolve())!=O||Wt&&Zr(new Wt)!=U||rr&&Zr(new rr)!=ue)&&(Zr=function(R){var G=Qn(R),ae=G==L?R.constructor:void 0,He=ae?Xr(ae):"";if(He)switch(He){case $t:return ee;case nr:return M;case rt:return O;case At:return U;case vt:return ue}return G});function vn(R,G){return G=G??u,!!G&&(typeof R=="number"||Xe.test(R))&&R>-1&&R%1==0&&R<G}function yn(R){var G=typeof R;return G=="string"||G=="number"||G=="symbol"||G=="boolean"?R!=="__proto__":R===null}function li(R){return!!Rt&&Rt in R}function Bn(R){var G=R&&R.constructor,ae=typeof G=="function"&&G.prototype||gt;return R===ae}function wi(R){return Dt.call(R)}function Xr(R){if(R!=null){try{return bt.call(R)}catch{}try{return R+""}catch{}}return""}function pi(R,G){return R===G||R!==R&&G!==G}var Hn=sn(function(){return arguments}())?sn:function(R){return ri(R)&&qe.call(R,"callee")&&!ne.call(R,"callee")},ei=Array.isArray;function bo(R){return R!=null&&_o(R.length)&&!Rn(R)}var ro=Me||Mr;function no(R,G){return pn(R,G)}function Rn(R){if(!ti(R))return!1;var G=Qn(R);return G==S||G==_||G==m||G==j}function _o(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=u}function ti(R){var G=typeof R;return R!=null&&(G=="object"||G=="function")}function ri(R){return R!=null&&typeof R=="object"}var $i=ht?st(ht):V;function Or(R){return bo(R)?kn(R):Q(R)}function Ar(){return[]}function Mr(){return!1}r.exports=no}(Bf,Bf.exports)),Bf.exports}var Pd={},B0;function mM(){if(B0)return Pd;B0=1,Object.defineProperty(Pd,"__esModule",{value:!0});const r=Ex(),e=kx();var t;return function(n){function i(g={},m={},I=!1){typeof g!="object"&&(g={}),typeof m!="object"&&(m={});let E=r(m);I||(E=Object.keys(E).reduce((b,S)=>(E[S]!=null&&(b[S]=E[S]),b),{}));for(const b in g)g[b]!==void 0&&m[b]===void 0&&(E[b]=g[b]);return Object.keys(E).length>0?E:void 0}n.compose=i;function l(g={},m={}){typeof g!="object"&&(g={}),typeof m!="object"&&(m={});const I=Object.keys(g).concat(Object.keys(m)).reduce((E,b)=>(e(g[b],m[b])||(E[b]=m[b]===void 0?null:m[b]),E),{});return Object.keys(I).length>0?I:void 0}n.diff=l;function u(g={},m={}){g=g||{};const I=Object.keys(m).reduce((E,b)=>(m[b]!==g[b]&&g[b]!==void 0&&(E[b]=m[b]),E),{});return Object.keys(g).reduce((E,b)=>(g[b]!==m[b]&&m[b]===void 0&&(E[b]=null),E),I)}n.invert=u;function f(g,m,I=!1){if(typeof g!="object")return m;if(typeof m!="object")return;if(!I)return m;const E=Object.keys(m).reduce((b,S)=>(g[S]===void 0&&(b[S]=m[S]),b),{});return Object.keys(E).length>0?E:void 0}n.transform=f}(t||(t={})),Pd.default=t,Pd}var Nd={},H0;function Rx(){if(H0)return Nd;H0=1,Object.defineProperty(Nd,"__esModule",{value:!0});var r;return function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t}(r||(r={})),Nd.default=r,Nd}var Fd={},q0;function vM(){if(q0)return Fd;q0=1,Object.defineProperty(Fd,"__esModule",{value:!0});const r=Rx();class e{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const i=this.ops[this.index];if(i){const l=this.offset,u=r.default.length(i);if(n>=u-l?(n=u-l,this.index+=1,this.offset=0):this.offset+=n,typeof i.delete=="number")return{delete:n};{const f={};return i.attributes&&(f.attributes=i.attributes),typeof i.retain=="number"?f.retain=n:typeof i.retain=="object"&&i.retain!==null?f.retain=i.retain:typeof i.insert=="string"?f.insert=i.insert.substr(l,n):f.insert=i.insert,f}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,i=this.index,l=this.next(),u=this.ops.slice(this.index);return this.offset=n,this.index=i,[l].concat(u)}}else return[]}}return Fd.default=e,Fd}var z0;function yM(){return z0||(z0=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=gM(),n=Ex(),i=kx(),l=mM();e.AttributeMap=l.default;const u=Rx();e.Op=u.default;const f=vM();e.OpIterator=f.default;const g="\0",m=(E,b)=>{if(typeof E!="object"||E===null)throw new Error(`cannot retain a ${typeof E}`);if(typeof b!="object"||b===null)throw new Error(`cannot retain a ${typeof b}`);const S=Object.keys(E)[0];if(!S||S!==Object.keys(b)[0])throw new Error(`embed types not matched: ${S} != ${Object.keys(b)[0]}`);return[S,E[S],b[S]]};class I{constructor(b){Array.isArray(b)?this.ops=b:b!=null&&Array.isArray(b.ops)?this.ops=b.ops:this.ops=[]}static registerEmbed(b,S){this.handlers[b]=S}static unregisterEmbed(b){delete this.handlers[b]}static getHandler(b){const S=this.handlers[b];if(!S)throw new Error(`no handlers for embed type "${b}"`);return S}insert(b,S){const _={};return typeof b=="string"&&b.length===0?this:(_.insert=b,S!=null&&typeof S=="object"&&Object.keys(S).length>0&&(_.attributes=S),this.push(_))}delete(b){return b<=0?this:this.push({delete:b})}retain(b,S){if(typeof b=="number"&&b<=0)return this;const _={retain:b};return S!=null&&typeof S=="object"&&Object.keys(S).length>0&&(_.attributes=S),this.push(_)}push(b){let S=this.ops.length,_=this.ops[S-1];if(b=n(b),typeof _=="object"){if(typeof b.delete=="number"&&typeof _.delete=="number")return this.ops[S-1]={delete:_.delete+b.delete},this;if(typeof _.delete=="number"&&b.insert!=null&&(S-=1,_=this.ops[S-1],typeof _!="object"))return this.ops.unshift(b),this;if(i(b.attributes,_.attributes)){if(typeof b.insert=="string"&&typeof _.insert=="string")return this.ops[S-1]={insert:_.insert+b.insert},typeof b.attributes=="object"&&(this.ops[S-1].attributes=b.attributes),this;if(typeof b.retain=="number"&&typeof _.retain=="number")return this.ops[S-1]={retain:_.retain+b.retain},typeof b.attributes=="object"&&(this.ops[S-1].attributes=b.attributes),this}}return S===this.ops.length?this.ops.push(b):this.ops.splice(S,0,b),this}chop(){const b=this.ops[this.ops.length-1];return b&&typeof b.retain=="number"&&!b.attributes&&this.ops.pop(),this}filter(b){return this.ops.filter(b)}forEach(b){this.ops.forEach(b)}map(b){return this.ops.map(b)}partition(b){const S=[],_=[];return this.forEach(M=>{(b(M)?S:_).push(M)}),[S,_]}reduce(b,S){return this.ops.reduce(b,S)}changeLength(){return this.reduce((b,S)=>S.insert?b+u.default.length(S):S.delete?b-S.delete:b,0)}length(){return this.reduce((b,S)=>b+u.default.length(S),0)}slice(b=0,S=1/0){const _=[],M=new f.default(this.ops);let w=0;for(;w<S&&M.hasNext();){let x;w<b?x=M.next(b-w):(x=M.next(S-w),_.push(x)),w+=u.default.length(x)}return new I(_)}compose(b){const S=new f.default(this.ops),_=new f.default(b.ops),M=[],w=_.peek();if(w!=null&&typeof w.retain=="number"&&w.attributes==null){let L=w.retain;for(;S.peekType()==="insert"&&S.peekLength()<=L;)L-=S.peekLength(),M.push(S.next());w.retain-L>0&&_.next(w.retain-L)}const x=new I(M);for(;S.hasNext()||_.hasNext();)if(_.peekType()==="insert")x.push(_.next());else if(S.peekType()==="delete")x.push(S.next());else{const L=Math.min(S.peekLength(),_.peekLength()),O=S.next(L),j=_.next(L);if(j.retain){const H={};if(typeof O.retain=="number")H.retain=typeof j.retain=="number"?L:j.retain;else if(typeof j.retain=="number")O.retain==null?H.insert=O.insert:H.retain=O.retain;else{const Z=O.retain==null?"insert":"retain",[de,J,ue]=m(O[Z],j.retain),B=I.getHandler(de);H[Z]={[de]:B.compose(J,ue,Z==="retain")}}const U=l.default.compose(O.attributes,j.attributes,typeof O.retain=="number");if(U&&(H.attributes=U),x.push(H),!_.hasNext()&&i(x.ops[x.ops.length-1],H)){const Z=new I(S.rest());return x.concat(Z).chop()}}else typeof j.delete=="number"&&(typeof O.retain=="number"||typeof O.retain=="object"&&O.retain!==null)&&x.push(j)}return x.chop()}concat(b){const S=new I(this.ops.slice());return b.ops.length>0&&(S.push(b.ops[0]),S.ops=S.ops.concat(b.ops.slice(1))),S}diff(b,S){if(this.ops===b.ops)return new I;const _=[this,b].map(O=>O.map(j=>{if(j.insert!=null)return typeof j.insert=="string"?j.insert:g;const H=O===b?"on":"with";throw new Error("diff() called "+H+" non-document")}).join("")),M=new I,w=t(_[0],_[1],S,!0),x=new f.default(this.ops),L=new f.default(b.ops);return w.forEach(O=>{let j=O[1].length;for(;j>0;){let H=0;switch(O[0]){case t.INSERT:H=Math.min(L.peekLength(),j),M.push(L.next(H));break;case t.DELETE:H=Math.min(j,x.peekLength()),x.next(H),M.delete(H);break;case t.EQUAL:H=Math.min(x.peekLength(),L.peekLength(),j);const U=x.next(H),Z=L.next(H);i(U.insert,Z.insert)?M.retain(H,l.default.diff(U.attributes,Z.attributes)):M.push(Z).delete(H);break}j-=H}}),M.chop()}eachLine(b,S=`
163
163
  `){const _=new f.default(this.ops);let M=new I,w=0;for(;_.hasNext();){if(_.peekType()!=="insert")return;const x=_.peek(),L=u.default.length(x)-_.peekLength(),O=typeof x.insert=="string"?x.insert.indexOf(S,L)-L:-1;if(O<0)M.push(_.next());else if(O>0)M.push(_.next(O));else{if(b(M,_.next(1).attributes||{},w)===!1)return;w+=1,M=new I}}M.length()>0&&b(M,{},w)}invert(b){const S=new I;return this.reduce((_,M)=>{if(M.insert)S.delete(u.default.length(M));else{if(typeof M.retain=="number"&&M.attributes==null)return S.retain(M.retain),_+M.retain;if(M.delete||typeof M.retain=="number"){const w=M.delete||M.retain;return b.slice(_,_+w).forEach(L=>{M.delete?S.push(L):M.retain&&M.attributes&&S.retain(u.default.length(L),l.default.invert(M.attributes,L.attributes))}),_+w}else if(typeof M.retain=="object"&&M.retain!==null){const w=b.slice(_,_+1),x=new f.default(w.ops).next(),[L,O,j]=m(M.retain,x.insert),H=I.getHandler(L);return S.retain({[L]:H.invert(O,j)},l.default.invert(M.attributes,x.attributes)),_+1}}return _},0),S.chop()}transform(b,S=!1){if(S=!!S,typeof b=="number")return this.transformPosition(b,S);const _=b,M=new f.default(this.ops),w=new f.default(_.ops),x=new I;for(;M.hasNext()||w.hasNext();)if(M.peekType()==="insert"&&(S||w.peekType()!=="insert"))x.retain(u.default.length(M.next()));else if(w.peekType()==="insert")x.push(w.next());else{const L=Math.min(M.peekLength(),w.peekLength()),O=M.next(L),j=w.next(L);if(O.delete)continue;if(j.delete)x.push(j);else{const H=O.retain,U=j.retain;let Z=typeof U=="object"&&U!==null?U:L;if(typeof H=="object"&&H!==null&&typeof U=="object"&&U!==null){const de=Object.keys(H)[0];if(de===Object.keys(U)[0]){const J=I.getHandler(de);J&&(Z={[de]:J.transform(H[de],U[de],S)})}}x.retain(Z,l.default.transform(O.attributes,j.attributes,S))}}return x.chop()}transformPosition(b,S=!1){S=!!S;const _=new f.default(this.ops);let M=0;for(;_.hasNext()&&M<=b;){const w=_.peekLength(),x=_.peekType();if(_.next(),x==="delete"){b-=Math.min(w,b-M);continue}else x==="insert"&&(M<b||!S)&&(b+=w);M+=w}return b}}I.Op=u.default,I.OpIterator=f.default,I.AttributeMap=l.default,I.handlers={},e.default=I,r.exports=I,r.exports.default=I}(Od,Od.exports)),Od.exports}var hs=yM();const Zt=al(hs);class Ws extends zo{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Ws.blotName="break";Ws.tagName="BR";let $s=class extends rh{};const bM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ph(r){return r.replace(/[&<>"']/g,e=>bM[e])}const va=class va extends Rm{static compare(e,t){const n=va.order.indexOf(e),i=va.order.indexOf(t);return n>=0||i>=0?n-i:e===t?0:e<t?-1:1}formatAt(e,t,n,i){if(va.compare(this.statics.blotName,n)<0&&this.scroll.query(n,Qt.BLOT)){const l=this.isolate(e,t);i&&l.wrap(n,i)}else super.formatAt(e,t,n,i)}optimize(e){if(super.optimize(e),this.parent instanceof va&&va.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};ft(va,"allowedChildren",[va,Ws,zo,$s]),ft(va,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let wa=va;const $0=1;class ji extends Qf{constructor(){super(...arguments);ft(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Ix(this)),this.cache.delta}deleteAt(t,n){super.deleteAt(t,n),this.cache={}}formatAt(t,n,i,l){n<=0||(this.scroll.query(i,Qt.BLOCK)?t+n===this.length()&&this.format(i,l):super.formatAt(t,Math.min(n,this.length()-t-1),i,l),this.cache={})}insertAt(t,n,i){if(i!=null){super.insertAt(t,n,i),this.cache={};return}if(n.length===0)return;const l=n.split(`
package/dist/index.es.js CHANGED
@@ -19546,7 +19546,10 @@ const M8 = {
19546
19546
  const g = Fr.getContent(i.content, { defKey: n, def: i, item: u }), m = Fr.getContent(i.content, { defKey: n, def: i, item: f });
19547
19547
  return typeof g == "string" && typeof m == "string" ? g < m ? -1 : g > m ? 1 : 0 : typeof g == "number" && typeof m == "number" ? g - m : typeof g == "string" && typeof m == "number" ? -1 : typeof g == "number" && typeof m == "string" || g === void 0 && m !== void 0 ? 1 : g !== void 0 && m === void 0 ? -1 : 0;
19548
19548
  });
19549
- return r.slice().sort((u, f) => t.isAsc ? l(u, f) : l(f, u));
19549
+ return typeof l == "function" && l.length >= 3 ? r.slice().sort((u, f) => l(u, f, t.isAsc)) : r.slice().sort((u, f) => {
19550
+ const g = l(u, f);
19551
+ return t.isAsc ? g : -g;
19552
+ });
19550
19553
  }, j8 = (r, e, t) => r.slice((e - 1) * t, e * t), l2 = (r, e) => {
19551
19554
  const t = Math.max(Math.ceil(r / e), 1);
19552
19555
  return Array.from({ length: t }, (n, i) => i + 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ados-rcm",
3
- "version": "1.1.423",
3
+ "version": "1.1.424",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",